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<math.h>
int main()
{
	int a,b,c,d,e,min,f,n=0;
	while(scanf("%d%d%d",&a,&b,&c)!=EOF)
	{
		d=abs(a-b);
		e=abs(a-c);
		f=abs(b-c);
		if(d>=e&&d>=f)
		{
			min=e+f;
		}
		if(e>=d&&e>=f)
		{
			min=d+f;
		}
		if(f>=e&&f>=d)
		{
			min=e+d;
		}
		printf("%d\n",min);
	}
	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d%d%d"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -24(%rbp)
	jmp	.L2
.L6:
	movl	-40(%rbp), %eax
	movl	-36(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	-40(%rbp), %eax
	movl	-32(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -16(%rbp)
	movl	-36(%rbp), %eax
	movl	-32(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L3
	movl	-20(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L3
	movl	-16(%rbp), %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -28(%rbp)
.L3:
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L4
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L4
	movl	-20(%rbp), %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -28(%rbp)
.L4:
	movl	-12(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L5
	movl	-12(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L5
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -28(%rbp)
.L5:
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-32(%rbp), %rcx
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L6
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	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	"%d\n"
.LC1:
	.string	"%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %r13
	leaq	16(%rsp), %r12
	leaq	12(%rsp), %rbp
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L6:
	movl	12(%rsp), %edx
	movl	16(%rsp), %esi
	movl	%edx, %ecx
	subl	%esi, %ecx
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	subl	20(%rsp), %edx
	movl	%edx, %ecx
	negl	%ecx
	cmovs	%edx, %ecx
	subl	20(%rsp), %esi
	movl	%esi, %edx
	negl	%edx
	cmovs	%esi, %edx
	cmpl	%edx, %ecx
	movl	%edx, %edi
	leal	(%rcx,%rdx), %esi
	cmovge	%ecx, %edi
	cmpl	%eax, %edi
	movl	%edx, %edi
	cmovle	%esi, %r15d
	cmpl	%edx, %eax
	leal	(%rax,%rdx), %esi
	cmovge	%eax, %edi
	cmpl	%ecx, %edi
	movl	$1, %edi
	cmovle	%esi, %r15d
	cmpl	%ecx, %eax
	movl	%ecx, %esi
	cmovge	%eax, %esi
	addl	%ecx, %eax
	cmpl	%esi, %edx
	movq	%r14, %rsi
	cmovge	%eax, %r15d
	xorl	%eax, %eax
	movl	%r15d, %edx
	call	__printf_chk@PLT
.L2:
	xorl	%eax, %eax
	movq	%r13, %rcx
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L6
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %r13
	leaq	16(%rsp), %r12
	leaq	12(%rsp), %rbp
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L6:
	movl	12(%rsp), %edx
	movl	16(%rsp), %esi
	movl	%edx, %ecx
	subl	%esi, %ecx
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	subl	20(%rsp), %edx
	movl	%edx, %ecx
	negl	%ecx
	cmovs	%edx, %ecx
	subl	20(%rsp), %esi
	movl	%esi, %edx
	negl	%edx
	cmovs	%esi, %edx
	cmpl	%edx, %ecx
	movl	%edx, %edi
	leal	(%rcx,%rdx), %esi
	cmovge	%ecx, %edi
	cmpl	%eax, %edi
	movl	%edx, %edi
	cmovle	%esi, %r15d
	cmpl	%edx, %eax
	leal	(%rax,%rdx), %esi
	cmovge	%eax, %edi
	cmpl	%ecx, %edi
	movl	$1, %edi
	cmovle	%esi, %r15d
	cmpl	%ecx, %eax
	movl	%ecx, %esi
	cmovge	%eax, %esi
	addl	%ecx, %eax
	cmpl	%esi, %edx
	movq	%r14, %rsi
	cmovge	%eax, %r15d
	xorl	%eax, %eax
	movl	%r15d, %edx
	call	__printf_chk@PLT
.L2:
	xorl	%eax, %eax
	movq	%r13, %rcx
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L6
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.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:

#include<stdio.h>
#include<math.h>
int main()
{
	int a,b,c,d,e,min,f,n=0;
	while(scanf("%d%d%d",&a,&b,&c)!=EOF)
	{
		d=abs(a-b);
		e=abs(a-c);
		f=abs(b-c);
		if(d>=e&&d>=f)
		{
			min=e+f;
		}
		if(e>=d&&e>=f)
		{
			min=d+f;
		}
		if(f>=e&&f>=d)
		{
			min=e+d;
		}
		printf("%d\n",min);
	}
	return 0;
}


1 12 3
 100 100 000
 11 5 2
 1 24 3
 3 5 2
 1 16 4
 4 3 2
 100 111 000
 4 3 0
 2 16 7

11
 100
 9
 23
 3
 15
 2
 111
 4
 14

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<math.h>
int main()
{
	int a,b,c,d,e,min,f,n=0;
	while(scanf("%d%d%d",&a,&b,&c)!=EOF)
	{
		d=abs(a-b);
		e=abs(a-c);
		f=abs(b-c);
		if(d>=e&&d>=f)
		{
			min=e+f;
		}
		if(e>=d&&e>=f)
		{
			min=d+f;
		}
		if(f>=e&&f>=d)
		{
			min=e+d;
		}
		printf("%d\n",min);
	}
	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d%d%d"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -24(%rbp)
	jmp	.L2
.L6:
	movl	-40(%rbp), %eax
	movl	-36(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	-40(%rbp), %eax
	movl	-32(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -16(%rbp)
	movl	-36(%rbp), %eax
	movl	-32(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L3
	movl	-20(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L3
	movl	-16(%rbp), %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -28(%rbp)
.L3:
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L4
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L4
	movl	-20(%rbp), %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -28(%rbp)
.L4:
	movl	-12(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L5
	movl	-12(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L5
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -28(%rbp)
.L5:
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-32(%rbp), %rcx
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L6
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	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	"%d\n"
.LC1:
	.string	"%d%d%d"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -24(%rbp)
	jmp	.L2
.L6:
	movl	-40(%rbp), %eax
	movl	-36(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	-40(%rbp), %eax
	movl	-32(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -16(%rbp)
	movl	-36(%rbp), %eax
	movl	-32(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L3
	movl	-20(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L3
	movl	-16(%rbp), %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -28(%rbp)
.L3:
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L4
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L4
	movl	-20(%rbp), %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -28(%rbp)
.L4:
	movl	-12(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L5
	movl	-12(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L5
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -28(%rbp)
.L5:
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-32(%rbp), %rcx
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L6
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	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:
