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 main(){
  int a,b,c,t;
  scanf("%d %d %d",&a,&b,&c);
  for(int i = 0;i < 2;i++){
    if(a > b){
      t = a;
      a = b;
      b = t;
    }
    if(b > c){
      t = b;
      b = c;
      c = t;
    }
  }
  if(a % 2 != b % 2){
    a++;
    c += 2;
  }
  printf("%d\n",c - b + (b - a) / 2);
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	movl	16(%rsp), %eax
	movl	20(%rsp), %esi
	cmpl	%eax, %edx
	movl	%eax, %edi
	movl	%edx, %r8d
	cmovg	%edx, %edi
	cmovg	%eax, %r8d
	movl	%esi, %ecx
	setg	%r9b
	cmpl	%esi, %edi
	jle	.L3
	movl	%edi, %eax
	cmpl	%esi, %r8d
	movl	%esi, %edi
	movl	%eax, %esi
	movl	$1, %eax
	jg	.L10
.L5:
	movl	%esi, 20(%rsp)
	movl	%esi, %ecx
.L6:
	movl	%edi, 16(%rsp)
	movl	%edi, %eax
	testb	%r9b, %r9b
	je	.L8
	movl	%r8d, 12(%rsp)
	movl	%r8d, %edx
.L8:
	movl	%edx, %esi
	movl	%eax, %r8d
	shrl	$31, %esi
	shrl	$31, %r8d
	leal	(%rdx,%rsi), %edi
	andl	$1, %edi
	subl	%esi, %edi
	leal	(%rax,%r8), %esi
	andl	$1, %esi
	subl	%r8d, %esi
	cmpl	%esi, %edi
	je	.L9
	addl	$1, %edx
	addl	$2, %ecx
	movl	%edx, 12(%rsp)
	movl	%ecx, 20(%rsp)
.L9:
	movl	%eax, %esi
	subl	12(%rsp), %esi
	subl	%eax, %ecx
	movl	$1, %edi
	movl	%esi, %edx
	xorl	%eax, %eax
	shrl	$31, %edx
	addl	%esi, %edx
	leaq	.LC1(%rip), %rsi
	sarl	%edx
	addl	%ecx, %edx
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L3:
	.cfi_restore_state
	cmpl	%edi, %r8d
	jle	.L30
	xorl	%eax, %eax
.L10:
	cmpl	%esi, %r8d
	jle	.L31
	movl	%esi, %eax
	movl	$1, %r9d
	movl	%r8d, %esi
	movl	%edi, %r8d
	movl	%eax, %edi
	jmp	.L5
.L30:
	testb	%r9b, %r9b
	jne	.L6
	jmp	.L8
.L29:
	call	__stack_chk_fail@PLT
.L31:
	xchgl	%edi, %r8d
	movl	$1, %r9d
	testb	%al, %al
	jne	.L5
	jmp	.L6
	.cfi_endproc
.LFE23:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	movl	16(%rsp), %eax
	movl	20(%rsp), %esi
	cmpl	%eax, %edx
	movl	%eax, %edi
	movl	%edx, %r8d
	cmovg	%edx, %edi
	cmovg	%eax, %r8d
	movl	%esi, %ecx
	setg	%r9b
	cmpl	%esi, %edi
	jle	.L3
	movl	%edi, %eax
	cmpl	%esi, %r8d
	movl	%esi, %edi
	movl	%eax, %esi
	movl	$1, %eax
	jg	.L10
.L5:
	movl	%esi, 20(%rsp)
	movl	%esi, %ecx
.L6:
	movl	%edi, 16(%rsp)
	movl	%edi, %eax
	testb	%r9b, %r9b
	je	.L8
	movl	%r8d, 12(%rsp)
	movl	%r8d, %edx
.L8:
	movl	%edx, %esi
	movl	%eax, %r8d
	shrl	$31, %esi
	shrl	$31, %r8d
	leal	(%rdx,%rsi), %edi
	andl	$1, %edi
	subl	%esi, %edi
	leal	(%rax,%r8), %esi
	andl	$1, %esi
	subl	%r8d, %esi
	cmpl	%esi, %edi
	je	.L9
	addl	$1, %edx
	addl	$2, %ecx
	movl	%edx, 12(%rsp)
	movl	%ecx, 20(%rsp)
.L9:
	movl	%eax, %esi
	subl	12(%rsp), %esi
	subl	%eax, %ecx
	movl	$1, %edi
	movl	%esi, %edx
	xorl	%eax, %eax
	shrl	$31, %edx
	addl	%esi, %edx
	leaq	.LC1(%rip), %rsi
	sarl	%edx
	addl	%ecx, %edx
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L3:
	.cfi_restore_state
	cmpl	%edi, %r8d
	jle	.L30
	xorl	%eax, %eax
.L10:
	cmpl	%esi, %r8d
	jle	.L31
	movl	%esi, %eax
	movl	$1, %r9d
	movl	%r8d, %esi
	movl	%edi, %r8d
	movl	%eax, %edi
	jmp	.L5
.L30:
	testb	%r9b, %r9b
	jne	.L6
	jmp	.L8
.L29:
	call	__stack_chk_fail@PLT
.L31:
	xchgl	%edi, %r8d
	movl	$1, %r9d
	testb	%al, %al
	jne	.L5
	jmp	.L6
	.cfi_endproc
.LFE23:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	movl	16(%rsp), %eax
	movl	20(%rsp), %esi
	cmpl	%eax, %edx
	movl	%eax, %edi
	movl	%edx, %r8d
	cmovg	%edx, %edi
	cmovg	%eax, %r8d
	movl	%esi, %ecx
	setg	%r9b
	cmpl	%esi, %edi
	jle	.L3
	movl	%edi, %eax
	cmpl	%esi, %r8d
	movl	%esi, %edi
	movl	%eax, %esi
	movl	$1, %eax
	jg	.L10
.L5:
	movl	%esi, 20(%rsp)
	movl	%esi, %ecx
.L6:
	movl	%edi, 16(%rsp)
	movl	%edi, %eax
	testb	%r9b, %r9b
	je	.L8
	movl	%r8d, 12(%rsp)
	movl	%r8d, %edx
.L8:
	movl	%edx, %esi
	movl	%eax, %r8d
	shrl	$31, %esi
	shrl	$31, %r8d
	leal	(%rdx,%rsi), %edi
	andl	$1, %edi
	subl	%esi, %edi
	leal	(%rax,%r8), %esi
	andl	$1, %esi
	subl	%r8d, %esi
	cmpl	%esi, %edi
	je	.L9
	addl	$1, %edx
	addl	$2, %ecx
	movl	%edx, 12(%rsp)
	movl	%ecx, 20(%rsp)
.L9:
	movl	%eax, %esi
	subl	12(%rsp), %esi
	subl	%eax, %ecx
	movl	$1, %edi
	movl	%esi, %edx
	xorl	%eax, %eax
	shrl	$31, %edx
	addl	%esi, %edx
	leaq	.LC1(%rip), %rsi
	sarl	%edx
	addl	%ecx, %edx
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L3:
	.cfi_restore_state
	cmpl	%edi, %r8d
	jle	.L30
	xorl	%eax, %eax
.L10:
	cmpl	%esi, %r8d
	jle	.L31
	movl	%esi, %eax
	movl	$1, %r9d
	movl	%r8d, %esi
	movl	%edi, %r8d
	movl	%eax, %edi
	jmp	.L5
.L30:
	testb	%r9b, %r9b
	jne	.L6
	jmp	.L8
.L29:
	call	__stack_chk_fail@PLT
.L31:
	xchgl	%edi, %r8d
	movl	$1, %r9d
	testb	%al, %al
	jne	.L5
	jmp	.L6
	.cfi_endproc
.LFE23:
	.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 main(){
  int a,b,c,t;
  scanf("%d %d %d",&a,&b,&c);
  for(int i = 0;i < 2;i++){
    if(a > b){
      t = a;
      a = b;
      b = t;
    }
    if(b > c){
      t = b;
      b = c;
      c = t;
    }
  }
  if(a % 2 != b % 2){
    a++;
    c += 2;
  }
  printf("%d\n",c - b + (b - a) / 2);
  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 main(){
  int a,b,c,t;
  scanf("%d %d %d",&a,&b,&c);
  for(int i = 0;i < 2;i++){
    if(a > b){
      t = a;
      a = b;
      b = t;
    }
    if(b > c){
      t = b;
      b = c;
      c = t;
    }
  }
  if(a % 2 != b % 2){
    a++;
    c += 2;
  }
  printf("%d\n",c - b + (b - a) / 2);
  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:

2 5 4

2

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 main(){
  int a,b,c,t;
  scanf("%d %d %d",&a,&b,&c);
  for(int i = 0;i < 2;i++){
    if(a > b){
      t = a;
      a = b;
      b = t;
    }
    if(b > c){
      t = b;
      b = c;
      c = t;
    }
  }
  if(a % 2 != b % 2){
    a++;
    c += 2;
  }
  printf("%d\n",c - b + (b - a) / 2);
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	movl	16(%rsp), %eax
	movl	20(%rsp), %esi
	cmpl	%eax, %edx
	movl	%eax, %edi
	movl	%edx, %r8d
	cmovg	%edx, %edi
	cmovg	%eax, %r8d
	movl	%esi, %ecx
	setg	%r9b
	cmpl	%esi, %edi
	jle	.L3
	movl	%edi, %eax
	cmpl	%esi, %r8d
	movl	%esi, %edi
	movl	%eax, %esi
	movl	$1, %eax
	jg	.L10
.L5:
	movl	%esi, 20(%rsp)
	movl	%esi, %ecx
.L6:
	movl	%edi, 16(%rsp)
	movl	%edi, %eax
	testb	%r9b, %r9b
	je	.L8
	movl	%r8d, 12(%rsp)
	movl	%r8d, %edx
.L8:
	movl	%edx, %esi
	movl	%eax, %r8d
	shrl	$31, %esi
	shrl	$31, %r8d
	leal	(%rdx,%rsi), %edi
	andl	$1, %edi
	subl	%esi, %edi
	leal	(%rax,%r8), %esi
	andl	$1, %esi
	subl	%r8d, %esi
	cmpl	%esi, %edi
	je	.L9
	addl	$1, %edx
	addl	$2, %ecx
	movl	%edx, 12(%rsp)
	movl	%ecx, 20(%rsp)
.L9:
	movl	%eax, %esi
	subl	12(%rsp), %esi
	subl	%eax, %ecx
	movl	$1, %edi
	movl	%esi, %edx
	xorl	%eax, %eax
	shrl	$31, %edx
	addl	%esi, %edx
	leaq	.LC1(%rip), %rsi
	sarl	%edx
	addl	%ecx, %edx
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L3:
	.cfi_restore_state
	cmpl	%edi, %r8d
	jle	.L30
	xorl	%eax, %eax
.L10:
	cmpl	%esi, %r8d
	jle	.L31
	movl	%esi, %eax
	movl	$1, %r9d
	movl	%r8d, %esi
	movl	%edi, %r8d
	movl	%eax, %edi
	jmp	.L5
.L30:
	testb	%r9b, %r9b
	jne	.L6
	jmp	.L8
.L29:
	call	__stack_chk_fail@PLT
.L31:
	xchgl	%edi, %r8d
	movl	$1, %r9d
	testb	%al, %al
	jne	.L5
	jmp	.L6
	.cfi_endproc
.LFE23:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	movl	16(%rsp), %eax
	movl	20(%rsp), %esi
	cmpl	%eax, %edx
	movl	%eax, %edi
	movl	%edx, %r8d
	cmovg	%edx, %edi
	cmovg	%eax, %r8d
	movl	%esi, %ecx
	setg	%r9b
	cmpl	%esi, %edi
	jle	.L3
	movl	%edi, %eax
	cmpl	%esi, %r8d
	movl	%esi, %edi
	movl	%eax, %esi
	movl	$1, %eax
	jg	.L10
.L5:
	movl	%esi, 20(%rsp)
	movl	%esi, %ecx
.L6:
	movl	%edi, 16(%rsp)
	movl	%edi, %eax
	testb	%r9b, %r9b
	je	.L8
	movl	%r8d, 12(%rsp)
	movl	%r8d, %edx
.L8:
	movl	%edx, %esi
	movl	%eax, %r8d
	shrl	$31, %esi
	shrl	$31, %r8d
	leal	(%rdx,%rsi), %edi
	andl	$1, %edi
	subl	%esi, %edi
	leal	(%rax,%r8), %esi
	andl	$1, %esi
	subl	%r8d, %esi
	cmpl	%esi, %edi
	je	.L9
	addl	$1, %edx
	addl	$2, %ecx
	movl	%edx, 12(%rsp)
	movl	%ecx, 20(%rsp)
.L9:
	movl	%eax, %esi
	subl	12(%rsp), %esi
	subl	%eax, %ecx
	movl	$1, %edi
	movl	%esi, %edx
	xorl	%eax, %eax
	shrl	$31, %edx
	addl	%esi, %edx
	leaq	.LC1(%rip), %rsi
	sarl	%edx
	addl	%ecx, %edx
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L3:
	.cfi_restore_state
	cmpl	%edi, %r8d
	jle	.L30
	xorl	%eax, %eax
.L10:
	cmpl	%esi, %r8d
	jle	.L31
	movl	%esi, %eax
	movl	$1, %r9d
	movl	%r8d, %esi
	movl	%edi, %r8d
	movl	%eax, %edi
	jmp	.L5
.L30:
	testb	%r9b, %r9b
	jne	.L6
	jmp	.L8
.L29:
	call	__stack_chk_fail@PLT
.L31:
	xchgl	%edi, %r8d
	movl	$1, %r9d
	testb	%al, %al
	jne	.L5
	jmp	.L6
	.cfi_endproc
.LFE23:
	.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:
```