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

```c
#include<stdio.h>

int max(int a, int b){
  if(a > b) return a;
  else return b;
}

int min(int a, int b){
  if(a < b) return a;
  else return b;
}

int main(){

  int a,b,c,x,y;
  scanf("%d %d %d %d %d",&a,&b,&c,&x,&y);

  int pay_a = 0;
  int pay_b = 0;
  int pay_c = 0;
  int pay = 0;

  pay_a = a*x+b*y;

  if(x>y){
    pay_b = 2*c*y + a*(x-y);
  }else{
    pay_b = 2*c*x + b*(y-x);
  }

  pay_c = 2*c*max(x,y);

  pay = min(pay_a,pay_b);
  pay = min (pay,pay_c);

  printf("%d",pay);

  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovge	%edi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	max, .-max
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d %d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rcx
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	16(%rsp), %r8
	leaq	20(%rsp), %r9
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	movl	8(%rsp), %esi
	movl	16(%rsp), %eax
	movl	20(%rsp), %edx
	movl	%edi, %ecx
	movl	%esi, %r8d
	imull	%eax, %ecx
	imull	%edx, %r8d
	addl	%r8d, %ecx
	cmpl	%edx, %eax
	jle	.L5
	movl	12(%rsp), %r8d
	movl	%eax, %esi
	subl	%edx, %esi
	imull	%edx, %r8d
	imull	%edi, %esi
	leal	(%rsi,%r8,2), %esi
.L6:
	cmpl	%edx, %eax
	movl	$1, %edi
	cmovge	%eax, %edx
	imull	12(%rsp), %edx
	addl	%edx, %edx
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L9
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	movl	12(%rsp), %r8d
	movl	%edx, %edi
	subl	%eax, %edi
	imull	%eax, %r8d
	imull	%edi, %esi
	leal	(%rsi,%r8,2), %esi
	jmp	.L6
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovge	%edi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	max, .-max
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d %d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rcx
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	16(%rsp), %r8
	leaq	20(%rsp), %r9
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	movl	8(%rsp), %esi
	movl	16(%rsp), %eax
	movl	20(%rsp), %edx
	movl	%edi, %ecx
	movl	%esi, %r8d
	imull	%eax, %ecx
	imull	%edx, %r8d
	addl	%r8d, %ecx
	cmpl	%edx, %eax
	jle	.L5
	movl	12(%rsp), %r8d
	movl	%eax, %esi
	subl	%edx, %esi
	imull	%edx, %r8d
	imull	%edi, %esi
	leal	(%rsi,%r8,2), %esi
.L6:
	cmpl	%edx, %eax
	movl	$1, %edi
	cmovge	%eax, %edx
	imull	12(%rsp), %edx
	addl	%edx, %edx
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L9
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	movl	12(%rsp), %r8d
	movl	%edx, %edi
	subl	%eax, %edi
	imull	%eax, %r8d
	imull	%edi, %esi
	leal	(%rsi,%r8,2), %esi
	jmp	.L6
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovge	%edi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	max, .-max
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d %d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rcx
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	16(%rsp), %r8
	leaq	20(%rsp), %r9
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	movl	8(%rsp), %esi
	movl	16(%rsp), %eax
	movl	20(%rsp), %edx
	movl	%edi, %ecx
	movl	%esi, %r8d
	imull	%eax, %ecx
	imull	%edx, %r8d
	addl	%r8d, %ecx
	cmpl	%edx, %eax
	jle	.L5
	movl	12(%rsp), %r8d
	movl	%eax, %esi
	subl	%edx, %esi
	imull	%edx, %r8d
	imull	%edi, %esi
	leal	(%rsi,%r8,2), %esi
.L6:
	cmpl	%edx, %eax
	movl	$1, %edi
	cmovge	%eax, %edx
	imull	12(%rsp), %edx
	addl	%edx, %edx
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L9
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	movl	12(%rsp), %r8d
	movl	%edx, %edi
	subl	%eax, %edi
	imull	%eax, %r8d
	imull	%edi, %esi
	leal	(%rsi,%r8,2), %esi
	jmp	.L6
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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:
```
```c
#include<stdio.h>

int max(int a, int b){
  if(a > b) return a;
  else return b;
}

int min(int a, int b){
  if(a < b) return a;
  else return b;
}

int main(){

  int a,b,c,x,y;
  scanf("%d %d %d %d %d",&a,&b,&c,&x,&y);

  int pay_a = 0;
  int pay_b = 0;
  int pay_c = 0;
  int pay = 0;

  pay_a = a*x+b*y;

  if(x>y){
    pay_b = 2*c*y + a*(x-y);
  }else{
    pay_b = 2*c*x + b*(y-x);
  }

  pay_c = 2*c*max(x,y);

  pay = min(pay_a,pay_b);
  pay = min (pay,pay_c);

  printf("%d",pay);

  return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

int max(int a, int b){
  if(a > b) return a;
  else return b;
}

int min(int a, int b){
  if(a < b) return a;
  else return b;
}

int main(){

  int a,b,c,x,y;
  scanf("%d %d %d %d %d",&a,&b,&c,&x,&y);

  int pay_a = 0;
  int pay_b = 0;
  int pay_c = 0;
  int pay = 0;

  pay_a = a*x+b*y;

  if(x>y){
    pay_b = 2*c*y + a*(x-y);
  }else{
    pay_b = 2*c*x + b*(y-x);
  }

  pay_c = 2*c*max(x,y);

  pay = min(pay_a,pay_b);
  pay = min (pay,pay_c);

  printf("%d",pay);

  return 0;
}```

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.
Optimized Assembly Code:

1500 1572 1600 3 2
 1500 2445 500 90000 100000
 1500 2000 1615 3 2
 1500 1572 1600 0 2
 1500 2000 1166 3 2
 1500 651 1600 0 2
 1500 3132 752 90000 100000
 1500 2000 1343 3 2
 1500 2000 1343 3 3
 1339 651 1600 0 1

7644 100000000 7960 3144 6164 1302 150400000 6872 8058 651
Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

int max(int a, int b){
  if(a > b) return a;
  else return b;
}

int min(int a, int b){
  if(a < b) return a;
  else return b;
}

int main(){

  int a,b,c,x,y;
  scanf("%d %d %d %d %d",&a,&b,&c,&x,&y);

  int pay_a = 0;
  int pay_b = 0;
  int pay_c = 0;
  int pay = 0;

  pay_a = a*x+b*y;

  if(x>y){
    pay_b = 2*c*y + a*(x-y);
  }else{
    pay_b = 2*c*x + b*(y-x);
  }

  pay_c = 2*c*max(x,y);

  pay = min(pay_a,pay_b);
  pay = min (pay,pay_c);

  printf("%d",pay);

  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovge	%edi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	max, .-max
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d %d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rcx
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	16(%rsp), %r8
	leaq	20(%rsp), %r9
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	movl	8(%rsp), %esi
	movl	16(%rsp), %eax
	movl	20(%rsp), %edx
	movl	%edi, %ecx
	movl	%esi, %r8d
	imull	%eax, %ecx
	imull	%edx, %r8d
	addl	%r8d, %ecx
	cmpl	%edx, %eax
	jle	.L5
	movl	12(%rsp), %r8d
	movl	%eax, %esi
	subl	%edx, %esi
	imull	%edx, %r8d
	imull	%edi, %esi
	leal	(%rsi,%r8,2), %esi
.L6:
	cmpl	%edx, %eax
	movl	$1, %edi
	cmovge	%eax, %edx
	imull	12(%rsp), %edx
	addl	%edx, %edx
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L9
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	movl	12(%rsp), %r8d
	movl	%edx, %edi
	subl	%eax, %edi
	imull	%eax, %r8d
	imull	%edi, %esi
	leal	(%rsi,%r8,2), %esi
	jmp	.L6
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovge	%edi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	max, .-max
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d %d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rcx
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	16(%rsp), %r8
	leaq	20(%rsp), %r9
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	movl	8(%rsp), %esi
	movl	16(%rsp), %eax
	movl	20(%rsp), %edx
	movl	%edi, %ecx
	movl	%esi, %r8d
	imull	%eax, %ecx
	imull	%edx, %r8d
	addl	%r8d, %ecx
	cmpl	%edx, %eax
	jle	.L5
	movl	12(%rsp), %r8d
	movl	%eax, %esi
	subl	%edx, %esi
	imull	%edx, %r8d
	imull	%edi, %esi
	leal	(%rsi,%r8,2), %esi
.L6:
	cmpl	%edx, %eax
	movl	$1, %edi
	cmovge	%eax, %edx
	imull	12(%rsp), %edx
	addl	%edx, %edx
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L9
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	movl	12(%rsp), %r8d
	movl	%edx, %edi
	subl	%eax, %edi
	imull	%eax, %r8d
	imull	%edi, %esi
	leal	(%rsi,%r8,2), %esi
	jmp	.L6
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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:
```