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>
int main(){
  int result=999;
  int i,tmp;
  char s[11];
  
  scanf("%s",s);
  
  for(i=0;i<strlen(s)-2;i++){
    tmp=(s[i]-'0')*100;
    tmp+=(s[i+1]-'0')*10;
    tmp+=s[i+2]-'0';
    tmp=753-tmp;
    if(tmp<0) tmp=0-tmp;
    if(tmp<result) result=tmp;
  }
  
  printf("%d",result);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%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
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$999, -48(%rbp)
	leaq	-35(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -44(%rbp)
	jmp	.L2
.L5:
	movl	-44(%rbp), %eax
	cltq
	movzbl	-35(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	imull	$100, %eax, %eax
	movl	%eax, -40(%rbp)
	movl	-44(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-35(%rbp,%rax), %eax
	movsbl	%al, %eax
	leal	-48(%rax), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	addl	%eax, -40(%rbp)
	movl	-44(%rbp), %eax
	addl	$2, %eax
	cltq
	movzbl	-35(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%eax, -40(%rbp)
	movl	$753, %eax
	subl	-40(%rbp), %eax
	movl	%eax, -40(%rbp)
	cmpl	$0, -40(%rbp)
	jns	.L3
	negl	-40(%rbp)
.L3:
	movl	-40(%rbp), %eax
	cmpl	-48(%rbp), %eax
	jge	.L4
	movl	-40(%rbp), %eax
	movl	%eax, -48(%rbp)
.L4:
	addl	$1, -44(%rbp)
.L2:
	movl	-44(%rbp), %eax
	movslq	%eax, %rbx
	leaq	-35(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	subq	$2, %rax
	cmpq	%rax, %rbx
	jb	.L5
	movl	-48(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	movq	-8(%rbp), %rbx
	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	"%s"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	13(%rsp), %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	movq	%rax, %r8
	subq	$2, %r8
	je	.L24
	leaq	-3(%rax), %rsi
	cmpq	$2, %r8
	jbe	.L25
	movsbl	13(%rsp), %eax
	movsbl	14(%rsp), %ecx
	movsbl	15(%rsp), %edi
	subl	$48, %eax
	subl	$48, %ecx
	imull	$100, %eax, %eax
	leal	(%rcx,%rcx,4), %edx
	subl	$48, %edi
	leal	(%rax,%rdx,2), %r9d
	movl	$753, %edx
	addl	%edi, %r9d
	movl	%edx, %eax
	leal	-753(%r9), %r10d
	subl	%r9d, %eax
	movl	$999, %r9d
	cmovs	%r10d, %eax
	movl	%edx, %r10d
	cmpl	%r9d, %eax
	cmovg	%r9d, %eax
	imull	$100, %ecx, %ecx
	leal	(%rdi,%rdi,4), %r9d
	leal	(%rcx,%r9,2), %r9d
	movsbl	16(%rsp), %ecx
	subl	$48, %ecx
	addl	%ecx, %r9d
	subl	%r9d, %r10d
	leal	-753(%r9), %r11d
	cmovs	%r11d, %r10d
	cmpl	%r10d, %eax
	cmovg	%r10d, %eax
	cmpq	$3, %rsi
	jbe	.L26
	imull	$100, %edi, %edi
	imull	$10, %ecx, %r9d
	addl	%edi, %r9d
	movsbl	17(%rsp), %edi
	subl	$48, %edi
	addl	%edi, %r9d
	subl	%r9d, %edx
	js	.L32
.L6:
	cmpl	%edx, %eax
	movsbl	18(%rsp), %r9d
	cmovle	%eax, %edx
	imull	$100, %ecx, %eax
	imull	$10, %edi, %ecx
	subl	$48, %r9d
	addl	%eax, %ecx
	movl	$753, %eax
	addl	%r9d, %ecx
	subl	%ecx, %eax
	js	.L33
.L7:
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	cmpq	$5, %rsi
	jbe	.L27
	imull	$100, %edi, %edx
	movsbl	19(%rsp), %ecx
	imull	$10, %r9d, %edi
	subl	$48, %ecx
	addl	%edx, %edi
	movl	$753, %edx
	addl	%ecx, %edi
	subl	%edi, %edx
	js	.L34
.L8:
	cmpl	%edx, %eax
	cmovle	%eax, %edx
	imull	$100, %r9d, %r9d
	movl	$753, %eax
	imull	$10, %ecx, %edi
	addl	%r9d, %edi
	movsbl	20(%rsp), %r9d
	subl	$48, %r9d
	addl	%r9d, %edi
	subl	%edi, %eax
	js	.L35
.L9:
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	cmpq	$7, %rsi
	jbe	.L28
	imull	$100, %ecx, %ecx
	movl	$753, %edx
	imull	$10, %r9d, %esi
	addl	%ecx, %esi
	movsbl	21(%rsp), %ecx
	subl	$48, %ecx
	addl	%ecx, %esi
	subl	%esi, %edx
	jns	.L10
	leal	-753(%rsi), %edx
.L10:
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	imull	$100, %r9d, %r9d
	movsbl	22(%rsp), %eax
	imull	$10, %ecx, %ecx
	addl	%r9d, %ecx
	leal	-48(%rcx,%rax), %ecx
	movl	$753, %eax
	subl	%ecx, %eax
	jns	.L11
	leal	-753(%rcx), %eax
.L11:
	cmpl	%eax, %edx
	movl	$8, %r9d
	cmovle	%edx, %eax
.L3:
	leal	1(%r9), %r11d
	leal	2(%r9), %r10d
	movslq	%r9d, %rdx
	movslq	%r11d, %r11
	movsbl	13(%rsp,%rdx), %edx
	movslq	%r10d, %r10
	movsbl	13(%rsp,%r11), %edi
	movsbl	13(%rsp,%r10), %esi
	subl	$48, %edx
	subl	$48, %edi
	imull	$100, %edx, %edx
	subl	$48, %esi
	imull	$10, %edi, %ecx
	addl	%edx, %ecx
	movl	$753, %edx
	addl	%esi, %ecx
	subl	%ecx, %edx
	js	.L36
.L12:
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	cmpq	%r11, %r8
	jbe	.L2
	imull	$100, %edi, %edi
	leal	3(%r9), %ecx
	imull	$10, %esi, %eax
	addl	%edi, %eax
	movslq	%ecx, %rdi
	movsbl	13(%rsp,%rdi), %edi
	leal	-48(%rax,%rdi), %edi
	movl	$753, %eax
	subl	%edi, %eax
	js	.L37
.L13:
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	cmpq	%r10, %r8
	jbe	.L2
	imull	$100, %esi, %esi
	movslq	%ecx, %rdi
	movsbl	13(%rsp,%rdi), %eax
	subl	$48, %eax
	imull	$10, %eax, %ecx
	addl	%esi, %ecx
	leal	4(%r9), %esi
	movslq	%esi, %r10
	movsbl	13(%rsp,%r10), %r10d
	leal	-48(%rcx,%r10), %r10d
	movl	$753, %ecx
	subl	%r10d, %ecx
	jns	.L14
	leal	-753(%r10), %ecx
.L14:
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	cmpq	%rdi, %r8
	jbe	.L2
	imull	$100, %eax, %eax
	movslq	%esi, %rsi
	movsbl	13(%rsp,%rsi), %ecx
	subl	$48, %ecx
	imull	$10, %ecx, %edi
	addl	%edi, %eax
	leal	5(%r9), %edi
	movslq	%edi, %r10
	movsbl	13(%rsp,%r10), %r10d
	leal	-48(%rax,%r10), %r10d
	movl	$753, %eax
	subl	%r10d, %eax
	jns	.L15
	leal	-753(%r10), %eax
.L15:
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	cmpq	%rsi, %r8
	jbe	.L2
	imull	$100, %ecx, %ecx
	movslq	%edi, %rdi
	movsbl	13(%rsp,%rdi), %eax
	subl	$48, %eax
	imull	$10, %eax, %esi
	addl	%esi, %ecx
	leal	6(%r9), %esi
	movslq	%esi, %r10
	movsbl	13(%rsp,%r10), %r10d
	leal	-48(%rcx,%r10), %r10d
	movl	$753, %ecx
	subl	%r10d, %ecx
	jns	.L16
	leal	-753(%r10), %ecx
.L16:
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	cmpq	%rdi, %r8
	jbe	.L2
	imull	$100, %eax, %eax
	movslq	%esi, %rsi
	movsbl	13(%rsp,%rsi), %ecx
	subl	$48, %ecx
	imull	$10, %ecx, %edi
	addl	%edi, %eax
	leal	7(%r9), %edi
	movslq	%edi, %r10
	movsbl	13(%rsp,%r10), %r10d
	leal	-48(%rax,%r10), %r10d
	movl	$753, %eax
	subl	%r10d, %eax
	jns	.L17
	leal	-753(%r10), %eax
.L17:
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	cmpq	%rsi, %r8
	jbe	.L2
	imull	$100, %ecx, %ecx
	movslq	%edi, %rdi
	movsbl	13(%rsp,%rdi), %eax
	subl	$48, %eax
	imull	$10, %eax, %esi
	addl	%esi, %ecx
	leal	8(%r9), %esi
	movslq	%esi, %r10
	movsbl	13(%rsp,%r10), %r10d
	leal	-48(%rcx,%r10), %r10d
	movl	$753, %ecx
	subl	%r10d, %ecx
	jns	.L18
	leal	-753(%r10), %ecx
.L18:
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	cmpq	%rdi, %r8
	jbe	.L2
	imull	$100, %eax, %eax
	movslq	%esi, %rsi
	movsbl	13(%rsp,%rsi), %ecx
	subl	$48, %ecx
	imull	$10, %ecx, %edi
	addl	%edi, %eax
	leal	9(%r9), %edi
	movslq	%edi, %r10
	movsbl	13(%rsp,%r10), %r10d
	leal	-48(%rax,%r10), %r10d
	movl	$753, %eax
	subl	%r10d, %eax
	jns	.L19
	leal	-753(%r10), %eax
.L19:
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	cmpq	%rsi, %r8
	jbe	.L2
	imull	$100, %ecx, %ecx
	movslq	%edi, %rdi
	movsbl	13(%rsp,%rdi), %esi
	movl	$753, %edi
	subl	$48, %esi
	imull	$10, %esi, %eax
	addl	%eax, %ecx
	leal	10(%r9), %eax
	cltq
	movsbl	13(%rsp,%rax), %eax
	subl	$48, %eax
	addl	%eax, %ecx
	subl	%ecx, %edi
	jns	.L20
	leal	-753(%rcx), %edi
.L20:
	cmpl	%edi, %edx
	movsbl	24(%rsp), %ecx
	cmovg	%edi, %edx
	imull	$100, %esi, %esi
	imull	$10, %eax, %eax
	addl	%esi, %eax
	leal	-48(%rax,%rcx), %ecx
	movl	$753, %eax
	subl	%ecx, %eax
	jns	.L22
	leal	-753(%rcx), %eax
.L22:
	cmpl	%edx, %eax
	cmovle	%eax, %edx
.L2:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L33:
	.cfi_restore_state
	leal	-753(%rcx), %eax
	jmp	.L7
.L32:
	leal	-753(%r9), %edx
	jmp	.L6
.L35:
	leal	-753(%rdi), %eax
	jmp	.L9
.L34:
	leal	-753(%rdi), %edx
	jmp	.L8
.L28:
	movl	$6, %r9d
	jmp	.L3
.L36:
	leal	-753(%rcx), %edx
	jmp	.L12
.L37:
	leal	-753(%rdi), %eax
	jmp	.L13
.L26:
	movl	$2, %r9d
	jmp	.L3
.L27:
	movl	$4, %r9d
	jmp	.L3
.L24:
	movl	$999, %edx
	jmp	.L2
.L25:
	xorl	%r9d, %r9d
	movl	$999, %eax
	jmp	.L3
.L38:
	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	"%s"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	13(%rsp), %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	movq	%rax, %r8
	subq	$2, %r8
	je	.L24
	leaq	-3(%rax), %rsi
	cmpq	$2, %r8
	jbe	.L25
	movsbl	13(%rsp), %eax
	movsbl	14(%rsp), %ecx
	movsbl	15(%rsp), %edi
	subl	$48, %eax
	subl	$48, %ecx
	imull	$100, %eax, %eax
	leal	(%rcx,%rcx,4), %edx
	subl	$48, %edi
	leal	(%rax,%rdx,2), %r9d
	movl	$753, %edx
	addl	%edi, %r9d
	movl	%edx, %eax
	leal	-753(%r9), %r10d
	subl	%r9d, %eax
	movl	$999, %r9d
	cmovs	%r10d, %eax
	movl	%edx, %r10d
	cmpl	%r9d, %eax
	cmovg	%r9d, %eax
	imull	$100, %ecx, %ecx
	leal	(%rdi,%rdi,4), %r9d
	leal	(%rcx,%r9,2), %r9d
	movsbl	16(%rsp), %ecx
	subl	$48, %ecx
	addl	%ecx, %r9d
	subl	%r9d, %r10d
	leal	-753(%r9), %r11d
	cmovs	%r11d, %r10d
	cmpl	%r10d, %eax
	cmovg	%r10d, %eax
	cmpq	$3, %rsi
	jbe	.L26
	imull	$100, %edi, %edi
	imull	$10, %ecx, %r9d
	addl	%edi, %r9d
	movsbl	17(%rsp), %edi
	subl	$48, %edi
	addl	%edi, %r9d
	subl	%r9d, %edx
	js	.L32
.L6:
	cmpl	%edx, %eax
	movsbl	18(%rsp), %r9d
	cmovle	%eax, %edx
	imull	$100, %ecx, %eax
	imull	$10, %edi, %ecx
	subl	$48, %r9d
	addl	%eax, %ecx
	movl	$753, %eax
	addl	%r9d, %ecx
	subl	%ecx, %eax
	js	.L33
.L7:
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	cmpq	$5, %rsi
	jbe	.L27
	imull	$100, %edi, %edx
	movsbl	19(%rsp), %ecx
	imull	$10, %r9d, %edi
	subl	$48, %ecx
	addl	%edx, %edi
	movl	$753, %edx
	addl	%ecx, %edi
	subl	%edi, %edx
	js	.L34
.L8:
	cmpl	%edx, %eax
	cmovle	%eax, %edx
	imull	$100, %r9d, %r9d
	movl	$753, %eax
	imull	$10, %ecx, %edi
	addl	%r9d, %edi
	movsbl	20(%rsp), %r9d
	subl	$48, %r9d
	addl	%r9d, %edi
	subl	%edi, %eax
	js	.L35
.L9:
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	cmpq	$7, %rsi
	jbe	.L28
	imull	$100, %ecx, %ecx
	movl	$753, %edx
	imull	$10, %r9d, %esi
	addl	%ecx, %esi
	movsbl	21(%rsp), %ecx
	subl	$48, %ecx
	addl	%ecx, %esi
	subl	%esi, %edx
	jns	.L10
	leal	-753(%rsi), %edx
.L10:
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	imull	$100, %r9d, %r9d
	movsbl	22(%rsp), %eax
	imull	$10, %ecx, %ecx
	addl	%r9d, %ecx
	leal	-48(%rcx,%rax), %ecx
	movl	$753, %eax
	subl	%ecx, %eax
	jns	.L11
	leal	-753(%rcx), %eax
.L11:
	cmpl	%eax, %edx
	movl	$8, %r9d
	cmovle	%edx, %eax
.L3:
	leal	1(%r9), %r11d
	leal	2(%r9), %r10d
	movslq	%r9d, %rdx
	movslq	%r11d, %r11
	movsbl	13(%rsp,%rdx), %edx
	movslq	%r10d, %r10
	movsbl	13(%rsp,%r11), %edi
	movsbl	13(%rsp,%r10), %esi
	subl	$48, %edx
	subl	$48, %edi
	imull	$100, %edx, %edx
	subl	$48, %esi
	imull	$10, %edi, %ecx
	addl	%edx, %ecx
	movl	$753, %edx
	addl	%esi, %ecx
	subl	%ecx, %edx
	js	.L36
.L12:
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	cmpq	%r11, %r8
	jbe	.L2
	imull	$100, %edi, %edi
	leal	3(%r9), %ecx
	imull	$10, %esi, %eax
	addl	%edi, %eax
	movslq	%ecx, %rdi
	movsbl	13(%rsp,%rdi), %edi
	leal	-48(%rax,%rdi), %edi
	movl	$753, %eax
	subl	%edi, %eax
	js	.L37
.L13:
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	cmpq	%r10, %r8
	jbe	.L2
	imull	$100, %esi, %esi
	movslq	%ecx, %rdi
	movsbl	13(%rsp,%rdi), %eax
	subl	$48, %eax
	imull	$10, %eax, %ecx
	addl	%esi, %ecx
	leal	4(%r9), %esi
	movslq	%esi, %r10
	movsbl	13(%rsp,%r10), %r10d
	leal	-48(%rcx,%r10), %r10d
	movl	$753, %ecx
	subl	%r10d, %ecx
	jns	.L14
	leal	-753(%r10), %ecx
.L14:
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	cmpq	%rdi, %r8
	jbe	.L2
	imull	$100, %eax, %eax
	movslq	%esi, %rsi
	movsbl	13(%rsp,%rsi), %ecx
	subl	$48, %ecx
	imull	$10, %ecx, %edi
	addl	%edi, %eax
	leal	5(%r9), %edi
	movslq	%edi, %r10
	movsbl	13(%rsp,%r10), %r10d
	leal	-48(%rax,%r10), %r10d
	movl	$753, %eax
	subl	%r10d, %eax
	jns	.L15
	leal	-753(%r10), %eax
.L15:
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	cmpq	%rsi, %r8
	jbe	.L2
	imull	$100, %ecx, %ecx
	movslq	%edi, %rdi
	movsbl	13(%rsp,%rdi), %eax
	subl	$48, %eax
	imull	$10, %eax, %esi
	addl	%esi, %ecx
	leal	6(%r9), %esi
	movslq	%esi, %r10
	movsbl	13(%rsp,%r10), %r10d
	leal	-48(%rcx,%r10), %r10d
	movl	$753, %ecx
	subl	%r10d, %ecx
	jns	.L16
	leal	-753(%r10), %ecx
.L16:
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	cmpq	%rdi, %r8
	jbe	.L2
	imull	$100, %eax, %eax
	movslq	%esi, %rsi
	movsbl	13(%rsp,%rsi), %ecx
	subl	$48, %ecx
	imull	$10, %ecx, %edi
	addl	%edi, %eax
	leal	7(%r9), %edi
	movslq	%edi, %r10
	movsbl	13(%rsp,%r10), %r10d
	leal	-48(%rax,%r10), %r10d
	movl	$753, %eax
	subl	%r10d, %eax
	jns	.L17
	leal	-753(%r10), %eax
.L17:
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	cmpq	%rsi, %r8
	jbe	.L2
	imull	$100, %ecx, %ecx
	movslq	%edi, %rdi
	movsbl	13(%rsp,%rdi), %eax
	subl	$48, %eax
	imull	$10, %eax, %esi
	addl	%esi, %ecx
	leal	8(%r9), %esi
	movslq	%esi, %r10
	movsbl	13(%rsp,%r10), %r10d
	leal	-48(%rcx,%r10), %r10d
	movl	$753, %ecx
	subl	%r10d, %ecx
	jns	.L18
	leal	-753(%r10), %ecx
.L18:
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	cmpq	%rdi, %r8
	jbe	.L2
	imull	$100, %eax, %eax
	movslq	%esi, %rsi
	movsbl	13(%rsp,%rsi), %ecx
	subl	$48, %ecx
	imull	$10, %ecx, %edi
	addl	%edi, %eax
	leal	9(%r9), %edi
	movslq	%edi, %r10
	movsbl	13(%rsp,%r10), %r10d
	leal	-48(%rax,%r10), %r10d
	movl	$753, %eax
	subl	%r10d, %eax
	jns	.L19
	leal	-753(%r10), %eax
.L19:
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	cmpq	%rsi, %r8
	jbe	.L2
	imull	$100, %ecx, %ecx
	movslq	%edi, %rdi
	movsbl	13(%rsp,%rdi), %esi
	movl	$753, %edi
	subl	$48, %esi
	imull	$10, %esi, %eax
	addl	%eax, %ecx
	leal	10(%r9), %eax
	cltq
	movsbl	13(%rsp,%rax), %eax
	subl	$48, %eax
	addl	%eax, %ecx
	subl	%ecx, %edi
	jns	.L20
	leal	-753(%rcx), %edi
.L20:
	cmpl	%edi, %edx
	movsbl	24(%rsp), %ecx
	cmovg	%edi, %edx
	imull	$100, %esi, %esi
	imull	$10, %eax, %eax
	addl	%esi, %eax
	leal	-48(%rax,%rcx), %ecx
	movl	$753, %eax
	subl	%ecx, %eax
	jns	.L22
	leal	-753(%rcx), %eax
.L22:
	cmpl	%edx, %eax
	cmovle	%eax, %edx
.L2:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L33:
	.cfi_restore_state
	leal	-753(%rcx), %eax
	jmp	.L7
.L32:
	leal	-753(%r9), %edx
	jmp	.L6
.L35:
	leal	-753(%rdi), %eax
	jmp	.L9
.L34:
	leal	-753(%rdi), %edx
	jmp	.L8
.L28:
	movl	$6, %r9d
	jmp	.L3
.L36:
	leal	-753(%rcx), %edx
	jmp	.L12
.L37:
	leal	-753(%rdi), %eax
	jmp	.L13
.L26:
	movl	$2, %r9d
	jmp	.L3
.L27:
	movl	$4, %r9d
	jmp	.L3
.L24:
	movl	$999, %edx
	jmp	.L2
.L25:
	xorl	%r9d, %r9d
	movl	$999, %eax
	jmp	.L3
.L38:
	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>
int main(){
  int result=999;
  int i,tmp;
  char s[11];
  
  scanf("%s",s);
  
  for(i=0;i<strlen(s)-2;i++){
    tmp=(s[i]-'0')*100;
    tmp+=(s[i+1]-'0')*10;
    tmp+=s[i+2]-'0';
    tmp=753-tmp;
    if(tmp<0) tmp=0-tmp;
    if(tmp<result) result=tmp;
  }
  
  printf("%d",result);
}
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 <string.h>
int main(){
  int result=999;
  int i,tmp;
  char s[11];
  
  scanf("%s",s);
  
  for(i=0;i<strlen(s)-2;i++){
    tmp=(s[i]-'0')*100;
    tmp+=(s[i+1]-'0')*10;
    tmp+=s[i+2]-'0';
    tmp=753-tmp;
    if(tmp<0) tmp=0-tmp;
    if(tmp<result) result=tmp;
  }
  
  printf("%d",result);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%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
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$999, -48(%rbp)
	leaq	-35(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -44(%rbp)
	jmp	.L2
.L5:
	movl	-44(%rbp), %eax
	cltq
	movzbl	-35(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	imull	$100, %eax, %eax
	movl	%eax, -40(%rbp)
	movl	-44(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-35(%rbp,%rax), %eax
	movsbl	%al, %eax
	leal	-48(%rax), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	addl	%eax, -40(%rbp)
	movl	-44(%rbp), %eax
	addl	$2, %eax
	cltq
	movzbl	-35(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%eax, -40(%rbp)
	movl	$753, %eax
	subl	-40(%rbp), %eax
	movl	%eax, -40(%rbp)
	cmpl	$0, -40(%rbp)
	jns	.L3
	negl	-40(%rbp)
.L3:
	movl	-40(%rbp), %eax
	cmpl	-48(%rbp), %eax
	jge	.L4
	movl	-40(%rbp), %eax
	movl	%eax, -48(%rbp)
.L4:
	addl	$1, -44(%rbp)
.L2:
	movl	-44(%rbp), %eax
	movslq	%eax, %rbx
	leaq	-35(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	subq	$2, %rax
	cmpq	%rax, %rbx
	jb	.L5
	movl	-48(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	movq	-8(%rbp), %rbx
	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	"%s"
.LC1:
	.string	"%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
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$999, -48(%rbp)
	leaq	-35(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -44(%rbp)
	jmp	.L2
.L5:
	movl	-44(%rbp), %eax
	cltq
	movzbl	-35(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	imull	$100, %eax, %eax
	movl	%eax, -40(%rbp)
	movl	-44(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-35(%rbp,%rax), %eax
	movsbl	%al, %eax
	leal	-48(%rax), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	addl	%eax, -40(%rbp)
	movl	-44(%rbp), %eax
	addl	$2, %eax
	cltq
	movzbl	-35(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%eax, -40(%rbp)
	movl	$753, %eax
	subl	-40(%rbp), %eax
	movl	%eax, -40(%rbp)
	cmpl	$0, -40(%rbp)
	jns	.L3
	negl	-40(%rbp)
.L3:
	movl	-40(%rbp), %eax
	cmpl	-48(%rbp), %eax
	jge	.L4
	movl	-40(%rbp), %eax
	movl	%eax, -48(%rbp)
.L4:
	addl	$1, -44(%rbp)
.L2:
	movl	-44(%rbp), %eax
	movslq	%eax, %rbx
	leaq	-35(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	subq	$2, %rax
	cmpq	%rax, %rbx
	jb	.L5
	movl	-48(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	movq	-8(%rbp), %rbx
	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:
