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<stdlib.h>

int main()
{
    int i,j,res,d,m = 0x3f3f3f3f;
    int min[10010];
    char str[13];
    gets(str);
    d=strlen(str);

    for(i=0; i<d-2; i++)
    {
        res=(str[i]-'0')*100+(str[i+1]-'0')*10+(str[i+2]-'0');

        min[i] = abs(753-res);

    }
    for (i=0; i<d-2; i++)
    {
        if(m > min[i])
            m = min[i];
    }

    printf("%d",m);

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-36864(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3216, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1061109567, -40076(%rbp)
	leaq	-21(%rbp), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	gets@PLT
	leaq	-21(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -40072(%rbp)
	movl	$0, -40080(%rbp)
	jmp	.L2
.L3:
	movl	-40080(%rbp), %eax
	cltq
	movzbl	-21(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	imull	$100, %eax, %ecx
	movl	-40080(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-21(%rbp,%rax), %eax
	movsbl	%al, %eax
	leal	-48(%rax), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	leal	(%rcx,%rax), %edx
	movl	-40080(%rbp), %eax
	addl	$2, %eax
	cltq
	movzbl	-21(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%edx, %eax
	movl	%eax, -40068(%rbp)
	movl	$753, %eax
	subl	-40068(%rbp), %eax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	-40080(%rbp), %eax
	cltq
	movl	%edx, -40064(%rbp,%rax,4)
	addl	$1, -40080(%rbp)
.L2:
	movl	-40072(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -40080(%rbp)
	jl	.L3
	movl	$0, -40080(%rbp)
	jmp	.L4
.L6:
	movl	-40080(%rbp), %eax
	cltq
	movl	-40064(%rbp,%rax,4), %eax
	cmpl	%eax, -40076(%rbp)
	jle	.L5
	movl	-40080(%rbp), %eax
	cltq
	movl	-40064(%rbp,%rax,4), %eax
	movl	%eax, -40076(%rbp)
.L5:
	addl	$1, -40080(%rbp)
.L4:
	movl	-40072(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -40080(%rbp)
	jl	.L6
	movl	-40076(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	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
.LFE6:
	.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
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-36864(%rsp), %r11
	.cfi_def_cfa 11, 36904
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3208, %rsp
	.cfi_def_cfa_offset 40112
	movq	%fs:40, %rax
	movq	%rax, 40056(%rsp)
	xorl	%eax, %eax
	leaq	40043(%rsp), %rbp
	movq	%rbp, %rdi
	call	gets@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	leal	-2(%rax), %ecx
	testl	%ecx, %ecx
	jle	.L13
	leal	-3(%rax), %r8d
	cmpq	$4, %rax
	jbe	.L14
	movsbl	40043(%rsp), %edx
	movsbl	40044(%rsp), %edi
	movsbl	40045(%rsp), %eax
	subl	$48, %edx
	subl	$48, %edi
	imull	$100, %edx, %edx
	leal	(%rdi,%rdi,4), %esi
	subl	$48, %eax
	leal	(%rdx,%rsi,2), %edx
	movl	$753, %esi
	addl	%eax, %edx
	movl	%esi, %r9d
	subl	%edx, %r9d
	movl	%r9d, %edx
	negl	%edx
	cmovs	%r9d, %edx
	imull	$100, %edi, %edi
	leal	(%rax,%rax,4), %r9d
	movl	%edx, (%rsp)
	movsbl	40046(%rsp), %edx
	leal	(%rdi,%r9,2), %edi
	movl	%esi, %r9d
	subl	$48, %edx
	addl	%edx, %edi
	subl	%edi, %r9d
	movl	%r9d, %edi
	negl	%edi
	cmovs	%r9d, %edi
	movl	%edi, 4(%rsp)
	cmpl	$3, %r8d
	jle	.L15
	imull	$10, %edx, %r10d
	movsbl	40047(%rsp), %edi
	movsbl	40048(%rsp), %r9d
	imull	$100, %eax, %eax
	subl	$48, %edi
	subl	$48, %r9d
	addl	%r10d, %eax
	movl	%esi, %r10d
	addl	%edi, %eax
	subl	%eax, %r10d
	movl	%r10d, %eax
	negl	%eax
	cmovns	%eax, %r10d
	imull	$10, %edi, %eax
	imull	$100, %edx, %edx
	movd	%r10d, %xmm0
	movl	%esi, %r10d
	addl	%eax, %edx
	addl	%r9d, %edx
	subl	%edx, %r10d
	movl	%r10d, %eax
	negl	%eax
	cmovs	%r10d, %eax
	movd	%eax, %xmm3
	punpckldq	%xmm3, %xmm0
	movq	%xmm0, 8(%rsp)
	cmpl	$5, %r8d
	jle	.L16
	imull	$100, %edi, %eax
	movsbl	40049(%rsp), %edx
	movsbl	40050(%rsp), %r10d
	imull	$10, %r9d, %edi
	subl	$48, %edx
	subl	$48, %r10d
	addl	%edi, %eax
	movl	%esi, %edi
	addl	%edx, %eax
	subl	%eax, %edi
	movl	%edi, %eax
	negl	%eax
	cmovns	%eax, %edi
	imull	$100, %r9d, %eax
	movd	%edi, %xmm0
	imull	$10, %edx, %edi
	addl	%edi, %eax
	movl	%esi, %edi
	addl	%r10d, %eax
	subl	%eax, %edi
	movl	%edi, %eax
	negl	%eax
	cmovs	%edi, %eax
	movd	%eax, %xmm4
	punpckldq	%xmm4, %xmm0
	movq	%xmm0, 16(%rsp)
	cmpl	$7, %r8d
	jle	.L17
	imull	$100, %edx, %eax
	movsbl	40051(%rsp), %edi
	imull	$10, %r10d, %edx
	subl	$48, %edi
	addl	%edx, %eax
	movl	%esi, %edx
	addl	%edi, %eax
	subl	%eax, %edx
	movl	%edx, %eax
	negl	%eax
	cmovns	%eax, %edx
	imull	$100, %r10d, %r10d
	movsbl	40052(%rsp), %eax
	imull	$10, %edi, %edi
	movd	%edx, %xmm0
	addl	%edi, %r10d
	leal	-48(%r10,%rax), %edx
	movl	%esi, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	$8, %eax
	movd	%edx, %xmm5
	punpckldq	%xmm5, %xmm0
	movq	%xmm0, 24(%rsp)
.L3:
	leal	1(%rax), %r9d
	movslq	%eax, %rbx
	leal	2(%rax), %r10d
	movslq	%r9d, %r11
	movsbl	40043(%rsp,%rbx), %edi
	movslq	%r10d, %rbp
	movsbl	40043(%rsp,%r11), %esi
	movsbl	40043(%rsp,%rbp), %edx
	subl	$48, %edi
	subl	$48, %esi
	imull	$100, %edi, %edi
	subl	$48, %edx
	imull	$10, %esi, %r12d
	addl	%r12d, %edi
	movl	$753, %r12d
	addl	%edx, %edi
	movl	%r12d, %r13d
	subl	%edi, %r13d
	movl	%r13d, %edi
	negl	%edi
	cmovs	%r13d, %edi
	movl	%edi, (%rsp,%rbx,4)
	cmpl	%ecx, %r9d
	jge	.L4
	imull	$10, %edx, %edi
	leal	3(%rax), %r9d
	movl	%r12d, %r13d
	imull	$100, %esi, %esi
	movslq	%r9d, %rbx
	addl	%edi, %esi
	movsbl	40043(%rsp,%rbx), %edi
	subl	$48, %edi
	addl	%edi, %esi
	subl	%esi, %r13d
	movl	%r13d, %esi
	negl	%esi
	cmovs	%r13d, %esi
	movl	%esi, (%rsp,%r11,4)
	cmpl	%r10d, %ecx
	jle	.L5
	imull	$10, %edi, %esi
	leal	4(%rax), %r10d
	movl	%r12d, %r13d
	imull	$100, %edx, %edx
	movslq	%r10d, %r11
	addl	%esi, %edx
	movsbl	40043(%rsp,%r11), %esi
	subl	$48, %esi
	addl	%esi, %edx
	subl	%edx, %r13d
	movl	%r13d, %edx
	negl	%edx
	cmovs	%r13d, %edx
	movl	%edx, (%rsp,%rbp,4)
	cmpl	%r9d, %ecx
	jle	.L5
	imull	$100, %edi, %edx
	leal	5(%rax), %r9d
	movl	%r12d, %r13d
	imull	$10, %esi, %edi
	movslq	%r9d, %rbp
	addl	%edi, %edx
	movsbl	40043(%rsp,%rbp), %edi
	subl	$48, %edi
	addl	%edi, %edx
	subl	%edx, %r13d
	movl	%r13d, %edx
	negl	%edx
	cmovs	%r13d, %edx
	movl	%edx, (%rsp,%rbx,4)
	cmpl	%r10d, %ecx
	jle	.L5
	imull	$100, %esi, %edx
	leal	6(%rax), %r10d
	movl	%r12d, %r13d
	imull	$10, %edi, %esi
	movslq	%r10d, %rbx
	addl	%esi, %edx
	movsbl	40043(%rsp,%rbx), %esi
	subl	$48, %esi
	addl	%esi, %edx
	subl	%edx, %r13d
	movl	%r13d, %edx
	negl	%edx
	cmovs	%r13d, %edx
	movl	%edx, (%rsp,%r11,4)
	cmpl	%r9d, %ecx
	jle	.L5
	imull	$100, %edi, %edx
	leal	7(%rax), %r9d
	movl	%r12d, %r13d
	imull	$10, %esi, %edi
	movslq	%r9d, %r11
	addl	%edi, %edx
	movsbl	40043(%rsp,%r11), %edi
	subl	$48, %edi
	addl	%edi, %edx
	subl	%edx, %r13d
	movl	%r13d, %edx
	negl	%edx
	cmovs	%r13d, %edx
	movl	%edx, (%rsp,%rbp,4)
	cmpl	%r10d, %ecx
	jle	.L5
	imull	$100, %esi, %edx
	leal	8(%rax), %ebp
	movl	%r12d, %r13d
	imull	$10, %edi, %esi
	addl	%esi, %edx
	movslq	%ebp, %rsi
	movsbl	40043(%rsp,%rsi), %r10d
	subl	$48, %r10d
	addl	%r10d, %edx
	subl	%edx, %r13d
	movl	%r13d, %edx
	negl	%edx
	cmovs	%r13d, %edx
	movl	%edx, (%rsp,%rbx,4)
	cmpl	%r9d, %ecx
	jle	.L5
	imull	$100, %edi, %edx
	leal	9(%rax), %r9d
	movl	%r12d, %ebx
	imull	$10, %r10d, %edi
	addl	%edi, %edx
	movslq	%r9d, %rdi
	movsbl	40043(%rsp,%rdi), %edi
	subl	$48, %edi
	addl	%edi, %edx
	subl	%edx, %ebx
	movl	%ebx, %edx
	negl	%edx
	cmovs	%ebx, %edx
	movl	%edx, (%rsp,%r11,4)
	cmpl	%ebp, %ecx
	jle	.L5
	imull	$100, %r10d, %edx
	addl	$10, %eax
	imull	$10, %edi, %r10d
	cltq
	movsbl	40043(%rsp,%rax), %eax
	addl	%r10d, %edx
	leal	-48(%rdx,%rax), %eax
	movl	%r12d, %edx
	subl	%eax, %edx
	movl	%edx, %eax
	negl	%eax
	cmovs	%edx, %eax
	movl	%eax, (%rsp,%rsi,4)
	cmpl	%r9d, %ecx
	jle	.L5
	movsbl	40053(%rsp), %eax
	imull	$100, %edi, %edi
	movsbl	40054(%rsp), %edx
	subl	$48, %eax
	imull	$10, %eax, %eax
	addl	%edi, %eax
	leal	-48(%rax,%rdx), %eax
	subl	%eax, %r12d
	movl	%r12d, %eax
	negl	%eax
	cmovs	%r12d, %eax
	movl	%eax, 36(%rsp)
.L5:
	cmpl	$2, %r8d
	jbe	.L25
.L11:
	movdqa	.LC0(%rip), %xmm1
	movdqa	(%rsp), %xmm0
	movl	%ecx, %eax
	shrl	$2, %eax
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm1
	pandn	(%rsp), %xmm0
	por	%xmm1, %xmm0
	cmpl	$1, %eax
	je	.L7
	movdqa	%xmm0, %xmm2
	movdqa	16(%rsp), %xmm1
	pcmpgtd	16(%rsp), %xmm2
	pand	%xmm2, %xmm1
	pandn	%xmm0, %xmm2
	por	%xmm1, %xmm2
	movdqa	%xmm2, %xmm0
.L7:
	movdqa	%xmm0, %xmm2
	movl	%ecx, %eax
	psrldq	$8, %xmm2
	andl	$-4, %eax
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movd	%xmm0, %edx
	testb	$3, %cl
	je	.L2
.L6:
	movslq	%eax, %rsi
	movl	(%rsp,%rsi,4), %esi
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	addl	$1, %eax
	cmpl	%eax, %ecx
	jle	.L2
.L9:
	movslq	%eax, %rsi
	movl	(%rsp,%rsi,4), %esi
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	addl	$1, %eax
	cmpl	%eax, %ecx
	jle	.L2
	cltq
	movl	(%rsp,%rax,4), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
.L2:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$40072, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	cmpl	$2, %r8d
	ja	.L11
	movl	$1061109567, %edx
	xorl	%eax, %eax
	jmp	.L6
.L17:
	movl	$6, %eax
	jmp	.L3
.L15:
	movl	$2, %eax
	jmp	.L3
.L16:
	movl	$4, %eax
	jmp	.L3
.L13:
	movl	$1061109567, %edx
	jmp	.L2
.L14:
	xorl	%eax, %eax
	jmp	.L3
.L25:
	movl	(%rsp), %edx
	movl	$1061109567, %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	movl	$1, %eax
	jmp	.L9
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1061109567
	.long	1061109567
	.long	1061109567
	.long	1061109567
	.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
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-36864(%rsp), %r11
	.cfi_def_cfa 11, 36904
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3208, %rsp
	.cfi_def_cfa_offset 40112
	movq	%fs:40, %rax
	movq	%rax, 40056(%rsp)
	xorl	%eax, %eax
	leaq	40043(%rsp), %rbp
	movq	%rbp, %rdi
	call	gets@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	leal	-2(%rax), %ecx
	testl	%ecx, %ecx
	jle	.L13
	leal	-3(%rax), %r8d
	cmpq	$4, %rax
	jbe	.L14
	movsbl	40043(%rsp), %edx
	movsbl	40044(%rsp), %edi
	movsbl	40045(%rsp), %eax
	subl	$48, %edx
	subl	$48, %edi
	imull	$100, %edx, %edx
	leal	(%rdi,%rdi,4), %esi
	subl	$48, %eax
	leal	(%rdx,%rsi,2), %edx
	movl	$753, %esi
	addl	%eax, %edx
	movl	%esi, %r9d
	subl	%edx, %r9d
	movl	%r9d, %edx
	negl	%edx
	cmovs	%r9d, %edx
	imull	$100, %edi, %edi
	leal	(%rax,%rax,4), %r9d
	movl	%edx, (%rsp)
	movsbl	40046(%rsp), %edx
	leal	(%rdi,%r9,2), %edi
	movl	%esi, %r9d
	subl	$48, %edx
	addl	%edx, %edi
	subl	%edi, %r9d
	movl	%r9d, %edi
	negl	%edi
	cmovs	%r9d, %edi
	movl	%edi, 4(%rsp)
	cmpl	$3, %r8d
	jle	.L15
	imull	$10, %edx, %r10d
	movsbl	40047(%rsp), %edi
	movsbl	40048(%rsp), %r9d
	imull	$100, %eax, %eax
	subl	$48, %edi
	subl	$48, %r9d
	addl	%r10d, %eax
	movl	%esi, %r10d
	addl	%edi, %eax
	subl	%eax, %r10d
	movl	%r10d, %eax
	negl	%eax
	cmovns	%eax, %r10d
	imull	$10, %edi, %eax
	imull	$100, %edx, %edx
	movd	%r10d, %xmm0
	movl	%esi, %r10d
	addl	%eax, %edx
	addl	%r9d, %edx
	subl	%edx, %r10d
	movl	%r10d, %eax
	negl	%eax
	cmovs	%r10d, %eax
	movd	%eax, %xmm3
	punpckldq	%xmm3, %xmm0
	movq	%xmm0, 8(%rsp)
	cmpl	$5, %r8d
	jle	.L16
	imull	$100, %edi, %eax
	movsbl	40049(%rsp), %edx
	movsbl	40050(%rsp), %r10d
	imull	$10, %r9d, %edi
	subl	$48, %edx
	subl	$48, %r10d
	addl	%edi, %eax
	movl	%esi, %edi
	addl	%edx, %eax
	subl	%eax, %edi
	movl	%edi, %eax
	negl	%eax
	cmovns	%eax, %edi
	imull	$100, %r9d, %eax
	movd	%edi, %xmm0
	imull	$10, %edx, %edi
	addl	%edi, %eax
	movl	%esi, %edi
	addl	%r10d, %eax
	subl	%eax, %edi
	movl	%edi, %eax
	negl	%eax
	cmovs	%edi, %eax
	movd	%eax, %xmm4
	punpckldq	%xmm4, %xmm0
	movq	%xmm0, 16(%rsp)
	cmpl	$7, %r8d
	jle	.L17
	imull	$100, %edx, %eax
	movsbl	40051(%rsp), %edi
	imull	$10, %r10d, %edx
	subl	$48, %edi
	addl	%edx, %eax
	movl	%esi, %edx
	addl	%edi, %eax
	subl	%eax, %edx
	movl	%edx, %eax
	negl	%eax
	cmovns	%eax, %edx
	imull	$100, %r10d, %r10d
	movsbl	40052(%rsp), %eax
	imull	$10, %edi, %edi
	movd	%edx, %xmm0
	addl	%edi, %r10d
	leal	-48(%r10,%rax), %edx
	movl	%esi, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	$8, %eax
	movd	%edx, %xmm5
	punpckldq	%xmm5, %xmm0
	movq	%xmm0, 24(%rsp)
.L3:
	leal	1(%rax), %r9d
	movslq	%eax, %rbx
	leal	2(%rax), %r10d
	movslq	%r9d, %r11
	movsbl	40043(%rsp,%rbx), %edi
	movslq	%r10d, %rbp
	movsbl	40043(%rsp,%r11), %esi
	movsbl	40043(%rsp,%rbp), %edx
	subl	$48, %edi
	subl	$48, %esi
	imull	$100, %edi, %edi
	subl	$48, %edx
	imull	$10, %esi, %r12d
	addl	%r12d, %edi
	movl	$753, %r12d
	addl	%edx, %edi
	movl	%r12d, %r13d
	subl	%edi, %r13d
	movl	%r13d, %edi
	negl	%edi
	cmovs	%r13d, %edi
	movl	%edi, (%rsp,%rbx,4)
	cmpl	%ecx, %r9d
	jge	.L4
	imull	$10, %edx, %edi
	leal	3(%rax), %r9d
	movl	%r12d, %r13d
	imull	$100, %esi, %esi
	movslq	%r9d, %rbx
	addl	%edi, %esi
	movsbl	40043(%rsp,%rbx), %edi
	subl	$48, %edi
	addl	%edi, %esi
	subl	%esi, %r13d
	movl	%r13d, %esi
	negl	%esi
	cmovs	%r13d, %esi
	movl	%esi, (%rsp,%r11,4)
	cmpl	%r10d, %ecx
	jle	.L5
	imull	$10, %edi, %esi
	leal	4(%rax), %r10d
	movl	%r12d, %r13d
	imull	$100, %edx, %edx
	movslq	%r10d, %r11
	addl	%esi, %edx
	movsbl	40043(%rsp,%r11), %esi
	subl	$48, %esi
	addl	%esi, %edx
	subl	%edx, %r13d
	movl	%r13d, %edx
	negl	%edx
	cmovs	%r13d, %edx
	movl	%edx, (%rsp,%rbp,4)
	cmpl	%r9d, %ecx
	jle	.L5
	imull	$100, %edi, %edx
	leal	5(%rax), %r9d
	movl	%r12d, %r13d
	imull	$10, %esi, %edi
	movslq	%r9d, %rbp
	addl	%edi, %edx
	movsbl	40043(%rsp,%rbp), %edi
	subl	$48, %edi
	addl	%edi, %edx
	subl	%edx, %r13d
	movl	%r13d, %edx
	negl	%edx
	cmovs	%r13d, %edx
	movl	%edx, (%rsp,%rbx,4)
	cmpl	%r10d, %ecx
	jle	.L5
	imull	$100, %esi, %edx
	leal	6(%rax), %r10d
	movl	%r12d, %r13d
	imull	$10, %edi, %esi
	movslq	%r10d, %rbx
	addl	%esi, %edx
	movsbl	40043(%rsp,%rbx), %esi
	subl	$48, %esi
	addl	%esi, %edx
	subl	%edx, %r13d
	movl	%r13d, %edx
	negl	%edx
	cmovs	%r13d, %edx
	movl	%edx, (%rsp,%r11,4)
	cmpl	%r9d, %ecx
	jle	.L5
	imull	$100, %edi, %edx
	leal	7(%rax), %r9d
	movl	%r12d, %r13d
	imull	$10, %esi, %edi
	movslq	%r9d, %r11
	addl	%edi, %edx
	movsbl	40043(%rsp,%r11), %edi
	subl	$48, %edi
	addl	%edi, %edx
	subl	%edx, %r13d
	movl	%r13d, %edx
	negl	%edx
	cmovs	%r13d, %edx
	movl	%edx, (%rsp,%rbp,4)
	cmpl	%r10d, %ecx
	jle	.L5
	imull	$100, %esi, %edx
	leal	8(%rax), %ebp
	movl	%r12d, %r13d
	imull	$10, %edi, %esi
	addl	%esi, %edx
	movslq	%ebp, %rsi
	movsbl	40043(%rsp,%rsi), %r10d
	subl	$48, %r10d
	addl	%r10d, %edx
	subl	%edx, %r13d
	movl	%r13d, %edx
	negl	%edx
	cmovs	%r13d, %edx
	movl	%edx, (%rsp,%rbx,4)
	cmpl	%r9d, %ecx
	jle	.L5
	imull	$100, %edi, %edx
	leal	9(%rax), %r9d
	movl	%r12d, %ebx
	imull	$10, %r10d, %edi
	addl	%edi, %edx
	movslq	%r9d, %rdi
	movsbl	40043(%rsp,%rdi), %edi
	subl	$48, %edi
	addl	%edi, %edx
	subl	%edx, %ebx
	movl	%ebx, %edx
	negl	%edx
	cmovs	%ebx, %edx
	movl	%edx, (%rsp,%r11,4)
	cmpl	%ebp, %ecx
	jle	.L5
	imull	$100, %r10d, %edx
	addl	$10, %eax
	imull	$10, %edi, %r10d
	cltq
	movsbl	40043(%rsp,%rax), %eax
	addl	%r10d, %edx
	leal	-48(%rdx,%rax), %eax
	movl	%r12d, %edx
	subl	%eax, %edx
	movl	%edx, %eax
	negl	%eax
	cmovs	%edx, %eax
	movl	%eax, (%rsp,%rsi,4)
	cmpl	%r9d, %ecx
	jle	.L5
	movsbl	40053(%rsp), %eax
	imull	$100, %edi, %edi
	movsbl	40054(%rsp), %edx
	subl	$48, %eax
	imull	$10, %eax, %eax
	addl	%edi, %eax
	leal	-48(%rax,%rdx), %eax
	subl	%eax, %r12d
	movl	%r12d, %eax
	negl	%eax
	cmovs	%r12d, %eax
	movl	%eax, 36(%rsp)
.L5:
	cmpl	$2, %r8d
	jbe	.L25
.L11:
	movdqa	.LC0(%rip), %xmm1
	movdqa	(%rsp), %xmm0
	movl	%ecx, %eax
	shrl	$2, %eax
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm1
	pandn	(%rsp), %xmm0
	por	%xmm1, %xmm0
	cmpl	$1, %eax
	je	.L7
	movdqa	%xmm0, %xmm2
	movdqa	16(%rsp), %xmm1
	pcmpgtd	16(%rsp), %xmm2
	pand	%xmm2, %xmm1
	pandn	%xmm0, %xmm2
	por	%xmm1, %xmm2
	movdqa	%xmm2, %xmm0
.L7:
	movdqa	%xmm0, %xmm2
	movl	%ecx, %eax
	psrldq	$8, %xmm2
	andl	$-4, %eax
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movd	%xmm0, %edx
	testb	$3, %cl
	je	.L2
.L6:
	movslq	%eax, %rsi
	movl	(%rsp,%rsi,4), %esi
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	addl	$1, %eax
	cmpl	%eax, %ecx
	jle	.L2
.L9:
	movslq	%eax, %rsi
	movl	(%rsp,%rsi,4), %esi
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	addl	$1, %eax
	cmpl	%eax, %ecx
	jle	.L2
	cltq
	movl	(%rsp,%rax,4), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
.L2:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$40072, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	cmpl	$2, %r8d
	ja	.L11
	movl	$1061109567, %edx
	xorl	%eax, %eax
	jmp	.L6
.L17:
	movl	$6, %eax
	jmp	.L3
.L15:
	movl	$2, %eax
	jmp	.L3
.L16:
	movl	$4, %eax
	jmp	.L3
.L13:
	movl	$1061109567, %edx
	jmp	.L2
.L14:
	xorl	%eax, %eax
	jmp	.L3
.L25:
	movl	(%rsp), %edx
	movl	$1061109567, %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	movl	$1, %eax
	jmp	.L9
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1061109567
	.long	1061109567
	.long	1061109567
	.long	1061109567
	.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<stdlib.h>

int main()
{
    int i,j,res,d,m = 0x3f3f3f3f;
    int min[10010];
    char str[13];
    gets(str);
    d=strlen(str);

    for(i=0; i<d-2; i++)
    {
        res=(str[i]-'0')*100+(str[i+1]-'0')*10+(str[i+2]-'0');

        min[i] = abs(753-res);

    }
    for (i=0; i<d-2; i++)
    {
        if(m > min[i])
            m = min[i];
    }

    printf("%d",m);

    return 0;
}
43594
 1133184093
 1110111111
 80343
 1646883079
 93622
 978408132
 120326
 1514858721
 226242

159 87 642 50 65 131 31 427 32 129
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<stdlib.h>

int main()
{
    int i,j,res,d,m = 0x3f3f3f3f;
    int min[10010];
    char str[13];
    gets(str);
    d=strlen(str);

    for(i=0; i<d-2; i++)
    {
        res=(str[i]-'0')*100+(str[i+1]-'0')*10+(str[i+2]-'0');

        min[i] = abs(753-res);

    }
    for (i=0; i<d-2; i++)
    {
        if(m > min[i])
            m = min[i];
    }

    printf("%d",m);

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-36864(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3216, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1061109567, -40076(%rbp)
	leaq	-21(%rbp), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	gets@PLT
	leaq	-21(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -40072(%rbp)
	movl	$0, -40080(%rbp)
	jmp	.L2
.L3:
	movl	-40080(%rbp), %eax
	cltq
	movzbl	-21(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	imull	$100, %eax, %ecx
	movl	-40080(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-21(%rbp,%rax), %eax
	movsbl	%al, %eax
	leal	-48(%rax), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	leal	(%rcx,%rax), %edx
	movl	-40080(%rbp), %eax
	addl	$2, %eax
	cltq
	movzbl	-21(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%edx, %eax
	movl	%eax, -40068(%rbp)
	movl	$753, %eax
	subl	-40068(%rbp), %eax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	-40080(%rbp), %eax
	cltq
	movl	%edx, -40064(%rbp,%rax,4)
	addl	$1, -40080(%rbp)
.L2:
	movl	-40072(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -40080(%rbp)
	jl	.L3
	movl	$0, -40080(%rbp)
	jmp	.L4
.L6:
	movl	-40080(%rbp), %eax
	cltq
	movl	-40064(%rbp,%rax,4), %eax
	cmpl	%eax, -40076(%rbp)
	jle	.L5
	movl	-40080(%rbp), %eax
	cltq
	movl	-40064(%rbp,%rax,4), %eax
	movl	%eax, -40076(%rbp)
.L5:
	addl	$1, -40080(%rbp)
.L4:
	movl	-40072(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -40080(%rbp)
	jl	.L6
	movl	-40076(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	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
.LFE6:
	.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"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-36864(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3216, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1061109567, -40076(%rbp)
	leaq	-21(%rbp), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	gets@PLT
	leaq	-21(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -40072(%rbp)
	movl	$0, -40080(%rbp)
	jmp	.L2
.L3:
	movl	-40080(%rbp), %eax
	cltq
	movzbl	-21(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	imull	$100, %eax, %ecx
	movl	-40080(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-21(%rbp,%rax), %eax
	movsbl	%al, %eax
	leal	-48(%rax), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	leal	(%rcx,%rax), %edx
	movl	-40080(%rbp), %eax
	addl	$2, %eax
	cltq
	movzbl	-21(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%edx, %eax
	movl	%eax, -40068(%rbp)
	movl	$753, %eax
	subl	-40068(%rbp), %eax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	-40080(%rbp), %eax
	cltq
	movl	%edx, -40064(%rbp,%rax,4)
	addl	$1, -40080(%rbp)
.L2:
	movl	-40072(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -40080(%rbp)
	jl	.L3
	movl	$0, -40080(%rbp)
	jmp	.L4
.L6:
	movl	-40080(%rbp), %eax
	cltq
	movl	-40064(%rbp,%rax,4), %eax
	cmpl	%eax, -40076(%rbp)
	jle	.L5
	movl	-40080(%rbp), %eax
	cltq
	movl	-40064(%rbp,%rax,4), %eax
	movl	%eax, -40076(%rbp)
.L5:
	addl	$1, -40080(%rbp)
.L4:
	movl	-40072(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -40080(%rbp)
	jl	.L6
	movl	-40076(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	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
.LFE6:
	.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:
