Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <string.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))


int main(){
	ll a,b,c,x,y;
	scanf("%lld%lld%lld%lld%lld",&a,&b,&c,&x,&y);
	ll ans=0;
	if(2*c<=a+b){
		ll d=min(x,y);
		ans+=c*2*d;
		x-=d;
		y-=d;
	}
	if(2*c<=a){
		ans+=c*2*x;
		x=0;
	}
	if(2*c<=b){
		ans+=c*2*y;
		y=0;
	}
	printf("%lld\n",ans+x*a+b*y);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld%lld%lld%lld%lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rdi
	leaq	-40(%rbp), %rsi
	leaq	-48(%rbp), %rcx
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -24(%rbp)
	movq	-48(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-64(%rbp), %rcx
	movq	-56(%rbp), %rax
	addq	%rcx, %rax
	cmpq	%rax, %rdx
	jg	.L2
	movq	-32(%rbp), %rdx
	movq	-40(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	imulq	-16(%rbp), %rax
	addq	%rax, %rax
	addq	%rax, -24(%rbp)
	movq	-40(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, -40(%rbp)
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, -32(%rbp)
.L2:
	movq	-48(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-64(%rbp), %rax
	cmpq	%rax, %rdx
	jg	.L3
	movq	-48(%rbp), %rdx
	movq	-40(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, %rax
	addq	%rax, -24(%rbp)
	movq	$0, -40(%rbp)
.L3:
	movq	-48(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-56(%rbp), %rax
	cmpq	%rax, %rdx
	jg	.L4
	movq	-48(%rbp), %rdx
	movq	-32(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, %rax
	addq	%rax, -24(%rbp)
	movq	$0, -32(%rbp)
.L4:
	movq	-40(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-56(%rbp), %rdx
	movq	-32(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld%lld%lld%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	subq	$56, %rsp
	.cfi_def_cfa_offset 64
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	leaq	24(%rsp), %r8
	leaq	32(%rsp), %r9
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rsi
	movq	(%rsp), %rdx
	xorl	%ecx, %ecx
	movq	8(%rsp), %rax
	leaq	(%rsi,%rsi), %rdi
	leaq	(%rdx,%rax), %r8
	cmpq	%r8, %rdi
	jg	.L2
	movq	32(%rsp), %r8
	movq	24(%rsp), %r9
	movq	%rsi, %rcx
	cmpq	%r9, %r8
	movq	%r9, %r10
	cmovle	%r8, %r10
	imulq	%r10, %rcx
	subq	%r10, %r9
	subq	%r10, %r8
	movq	%r9, 24(%rsp)
	movq	%r8, 32(%rsp)
	addq	%rcx, %rcx
.L2:
	cmpq	%rdx, %rdi
	jg	.L3
	movq	24(%rsp), %r8
	movq	$0, 24(%rsp)
	imulq	%rsi, %r8
	addq	%r8, %r8
	addq	%r8, %rcx
.L3:
	cmpq	%rax, %rdi
	jg	.L4
	imulq	32(%rsp), %rsi
	movq	$0, 32(%rsp)
	addq	%rsi, %rsi
	addq	%rsi, %rcx
.L4:
	imulq	24(%rsp), %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	imulq	32(%rsp), %rax
	addq	%rcx, %rdx
	addq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	xorl	%eax, %eax
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld%lld%lld%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	subq	$56, %rsp
	.cfi_def_cfa_offset 64
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	leaq	24(%rsp), %r8
	leaq	32(%rsp), %r9
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rsi
	movq	(%rsp), %rdx
	xorl	%ecx, %ecx
	movq	8(%rsp), %rax
	leaq	(%rsi,%rsi), %rdi
	leaq	(%rdx,%rax), %r8
	cmpq	%r8, %rdi
	jg	.L2
	movq	32(%rsp), %r8
	movq	24(%rsp), %r9
	movq	%rsi, %rcx
	cmpq	%r9, %r8
	movq	%r9, %r10
	cmovle	%r8, %r10
	imulq	%r10, %rcx
	subq	%r10, %r9
	subq	%r10, %r8
	movq	%r9, 24(%rsp)
	movq	%r8, 32(%rsp)
	addq	%rcx, %rcx
.L2:
	cmpq	%rdx, %rdi
	jg	.L3
	movq	24(%rsp), %r8
	movq	$0, 24(%rsp)
	imulq	%rsi, %r8
	addq	%r8, %r8
	addq	%r8, %rcx
.L3:
	cmpq	%rax, %rdi
	jg	.L4
	imulq	32(%rsp), %rsi
	movq	$0, 32(%rsp)
	addq	%rsi, %rsi
	addq	%rsi, %rcx
.L4:
	imulq	24(%rsp), %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	imulq	32(%rsp), %rax
	addq	%rcx, %rdx
	addq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	xorl	%eax, %eax
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>
#include <string.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))


int main(){
	ll a,b,c,x,y;
	scanf("%lld%lld%lld%lld%lld",&a,&b,&c,&x,&y);
	ll ans=0;
	if(2*c<=a+b){
		ll d=min(x,y);
		ans+=c*2*d;
		x-=d;
		y-=d;
	}
	if(2*c<=a){
		ans+=c*2*x;
		x=0;
	}
	if(2*c<=b){
		ans+=c*2*y;
		y=0;
	}
	printf("%lld\n",ans+x*a+b*y);
}
1500 2000 1600 3 2

7900

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <string.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))


int main(){
	ll a,b,c,x,y;
	scanf("%lld%lld%lld%lld%lld",&a,&b,&c,&x,&y);
	ll ans=0;
	if(2*c<=a+b){
		ll d=min(x,y);
		ans+=c*2*d;
		x-=d;
		y-=d;
	}
	if(2*c<=a){
		ans+=c*2*x;
		x=0;
	}
	if(2*c<=b){
		ans+=c*2*y;
		y=0;
	}
	printf("%lld\n",ans+x*a+b*y);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld%lld%lld%lld%lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rdi
	leaq	-40(%rbp), %rsi
	leaq	-48(%rbp), %rcx
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -24(%rbp)
	movq	-48(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-64(%rbp), %rcx
	movq	-56(%rbp), %rax
	addq	%rcx, %rax
	cmpq	%rax, %rdx
	jg	.L2
	movq	-32(%rbp), %rdx
	movq	-40(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	imulq	-16(%rbp), %rax
	addq	%rax, %rax
	addq	%rax, -24(%rbp)
	movq	-40(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, -40(%rbp)
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, -32(%rbp)
.L2:
	movq	-48(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-64(%rbp), %rax
	cmpq	%rax, %rdx
	jg	.L3
	movq	-48(%rbp), %rdx
	movq	-40(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, %rax
	addq	%rax, -24(%rbp)
	movq	$0, -40(%rbp)
.L3:
	movq	-48(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-56(%rbp), %rax
	cmpq	%rax, %rdx
	jg	.L4
	movq	-48(%rbp), %rdx
	movq	-32(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, %rax
	addq	%rax, -24(%rbp)
	movq	$0, -32(%rbp)
.L4:
	movq	-40(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-56(%rbp), %rdx
	movq	-32(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld%lld%lld%lld%lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rdi
	leaq	-40(%rbp), %rsi
	leaq	-48(%rbp), %rcx
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -24(%rbp)
	movq	-48(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-64(%rbp), %rcx
	movq	-56(%rbp), %rax
	addq	%rcx, %rax
	cmpq	%rax, %rdx
	jg	.L2
	movq	-32(%rbp), %rdx
	movq	-40(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	imulq	-16(%rbp), %rax
	addq	%rax, %rax
	addq	%rax, -24(%rbp)
	movq	-40(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, -40(%rbp)
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, -32(%rbp)
.L2:
	movq	-48(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-64(%rbp), %rax
	cmpq	%rax, %rdx
	jg	.L3
	movq	-48(%rbp), %rdx
	movq	-40(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, %rax
	addq	%rax, -24(%rbp)
	movq	$0, -40(%rbp)
.L3:
	movq	-48(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-56(%rbp), %rax
	cmpq	%rax, %rdx
	jg	.L4
	movq	-48(%rbp), %rdx
	movq	-32(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, %rax
	addq	%rax, -24(%rbp)
	movq	$0, -32(%rbp)
.L4:
	movq	-40(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-56(%rbp), %rdx
	movq	-32(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
