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>
#include <math.h>
#include <string.h>

void chmin(int *a,int b){
  if(*a > b){
    *a =b;
  }

  return;
}

/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/

int main(void){
  char s[2000];
  scanf("%s",s);

  char t[2000];
  scanf("%s",t);

  //strlen()で文字列の長さを取得できる
  //それを忘れてもforでif(s[i]=='\0')みたいなことをすれば取得できる
  int n=strlen(s);
  int m=strlen(t);

  //どう頑張っても変更する数はmを超えないのでmで初期化
  int ans=m;

  /*
  連続するn個のボールから連続するm個(m<=n)取る方法は
  (n-m+1)通りあるからこういう範囲
  */
  for(int i=0;i<n-m+1;i++){
    //"sのここからここをtに一致させたらどうなるのか"を決める
    
    //異なっている場所がいくつあるか->変えるべき場所がいくつあるか
    int cnt=0;
    for(int j=0;j<m;j++){
      if(s[i+j]!=t[j]){
        cnt++;
      }
    }

    //答えの更新
    chmin(&ans,cnt);

    /*
    chmin自体が「もしcnt<ansならば値を更新する」という意味だから
    わざわざif(){chmin()}という書き方をしなくてもいい
    */
  }

  printf("%d\n",ans);

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	chmin
	.type	chmin, @function
chmin:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L4
	movq	-8(%rbp), %rax
	movl	-12(%rbp), %edx
	movl	%edx, (%rax)
	nop
.L4:
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	chmin, .-chmin
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4048, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-4016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-2016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-4016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -4024(%rbp)
	leaq	-2016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -4020(%rbp)
	movl	-4020(%rbp), %eax
	movl	%eax, -4040(%rbp)
	movl	$0, -4036(%rbp)
	jmp	.L6
.L10:
	movl	$0, -4032(%rbp)
	movl	$0, -4028(%rbp)
	jmp	.L7
.L9:
	movl	-4036(%rbp), %edx
	movl	-4028(%rbp), %eax
	addl	%edx, %eax
	cltq
	movzbl	-4016(%rbp,%rax), %edx
	movl	-4028(%rbp), %eax
	cltq
	movzbl	-2016(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L8
	addl	$1, -4032(%rbp)
.L8:
	addl	$1, -4028(%rbp)
.L7:
	movl	-4028(%rbp), %eax
	cmpl	-4020(%rbp), %eax
	jl	.L9
	movl	-4032(%rbp), %edx
	leaq	-4040(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	chmin
	addl	$1, -4036(%rbp)
.L6:
	movl	-4024(%rbp), %eax
	subl	-4020(%rbp), %eax
	cmpl	%eax, -4036(%rbp)
	jle	.L10
	movl	-4040(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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
	.p2align 4
	.globl	chmin
	.type	chmin, @function
chmin:
.LFB51:
	.cfi_startproc
	endbr64
	cmpl	%esi, (%rdi)
	jle	.L1
	movl	%esi, (%rdi)
.L1:
	ret
	.cfi_endproc
.LFE51:
	.size	chmin, .-chmin
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.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
	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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	subq	$4024, %rsp
	.cfi_def_cfa_offset 4080
	movq	%fs:40, %rax
	movq	%rax, 4008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r12
	leaq	2000(%rsp), %rbx
	movq	%r12, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r12, %rdi
	call	strlen@PLT
	movq	%rbx, %rdi
	movq	%rax, %rbp
	call	strlen@PLT
	movq	%rax, %r10
	subl	%eax, %ebp
	js	.L29
	movl	%eax, %edi
	movq	%r12, %rsi
	movl	%eax, %r13d
	movdqa	.LC1(%rip), %xmm5
	leal	-1(%rax), %r12d
	shrl	$4, %eax
	leal	1(%rbp), %r11d
	movl	%r10d, %ebp
	leal	-1(%rax), %r8d
	andl	$-16, %ebp
	movl	%r10d, %r9d
	xorl	%ecx, %ecx
	addq	$1, %r8
	pxor	%xmm4, %xmm4
	pxor	%xmm3, %xmm3
	salq	$4, %r8
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	testq	%r10, %r10
	je	.L27
	cmpl	$14, %r12d
	jbe	.L30
	xorl	%eax, %eax
	pxor	%xmm1, %xmm1
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rsi,%rax), %xmm0
	movdqa	%xmm4, %xmm6
	pcmpeqb	(%rbx,%rax), %xmm0
	addq	$16, %rax
	pandn	%xmm5, %xmm0
	pcmpgtb	%xmm0, %xmm6
	movdqa	%xmm0, %xmm2
	punpcklbw	%xmm6, %xmm2
	punpckhbw	%xmm6, %xmm0
	movdqa	%xmm3, %xmm6
	pcmpgtw	%xmm2, %xmm6
	movdqa	%xmm2, %xmm7
	punpcklwd	%xmm6, %xmm7
	punpckhwd	%xmm6, %xmm2
	movdqa	%xmm0, %xmm6
	paddd	%xmm7, %xmm1
	paddd	%xmm2, %xmm1
	movdqa	%xmm3, %xmm2
	pcmpgtw	%xmm0, %xmm2
	punpcklwd	%xmm2, %xmm6
	punpckhwd	%xmm2, %xmm0
	paddd	%xmm6, %xmm1
	paddd	%xmm0, %xmm1
	cmpq	%rax, %r8
	jne	.L8
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	cmpl	%ebp, %r13d
	je	.L27
	movl	%ebp, %edx
.L7:
	leal	(%rcx,%rdx), %r14d
	movslq	%edx, %r15
	movzbl	2000(%rsp,%r15), %r15d
	movslq	%r14d, %r14
	cmpb	%r15b, (%rsp,%r14)
	je	.L10
	addl	$1, %eax
.L10:
	leal	1(%rdx), %r14d
	cmpl	%edi, %r14d
	jge	.L27
	leal	(%r14,%rcx), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L11
	addl	$1, %eax
.L11:
	leal	2(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	movslq	%r14d, %r15
	addl	%ecx, %r14d
	movslq	%r14d, %r14
	movzbl	(%rsp,%r14), %r14d
	cmpb	%r14b, 2000(%rsp,%r15)
	je	.L12
	addl	$1, %eax
.L12:
	leal	3(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L13
	addl	$1, %eax
.L13:
	leal	4(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L14
	addl	$1, %eax
.L14:
	leal	5(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L15
	addl	$1, %eax
.L15:
	leal	6(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L16
	addl	$1, %eax
.L16:
	leal	7(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L17
	addl	$1, %eax
.L17:
	leal	8(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L18
	addl	$1, %eax
.L18:
	leal	9(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L19
	addl	$1, %eax
.L19:
	leal	10(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L20
	addl	$1, %eax
.L20:
	leal	11(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L21
	addl	$1, %eax
.L21:
	leal	12(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L22
	addl	$1, %eax
.L22:
	leal	13(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L23
	addl	$1, %eax
.L23:
	addl	$14, %edx
	cmpl	%edx, %edi
	jle	.L27
	leal	(%rcx,%rdx), %r14d
	movslq	%edx, %rdx
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%rdx), %edx
	cmpb	%dl, (%rsp,%r14)
	je	.L27
	addl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L27:
	cmpl	%eax, %r9d
	cmovg	%eax, %r9d
	addl	$1, %ecx
	addq	$1, %rsi
	cmpl	%r11d, %ecx
	jne	.L6
.L5:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	4008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L33
	addq	$4024, %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
.L30:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L7
.L29:
	movl	%eax, %r9d
	jmp	.L5
.L33:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.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
	.p2align 4
	.globl	chmin
	.type	chmin, @function
chmin:
.LFB51:
	.cfi_startproc
	endbr64
	cmpl	%esi, (%rdi)
	jle	.L1
	movl	%esi, (%rdi)
.L1:
	ret
	.cfi_endproc
.LFE51:
	.size	chmin, .-chmin
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.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
	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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	subq	$4024, %rsp
	.cfi_def_cfa_offset 4080
	movq	%fs:40, %rax
	movq	%rax, 4008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r12
	leaq	2000(%rsp), %rbx
	movq	%r12, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r12, %rdi
	call	strlen@PLT
	movq	%rbx, %rdi
	movq	%rax, %rbp
	call	strlen@PLT
	movq	%rax, %r10
	subl	%eax, %ebp
	js	.L29
	movl	%eax, %edi
	movq	%r12, %rsi
	movl	%eax, %r13d
	movdqa	.LC1(%rip), %xmm5
	leal	-1(%rax), %r12d
	shrl	$4, %eax
	leal	1(%rbp), %r11d
	movl	%r10d, %ebp
	leal	-1(%rax), %r8d
	andl	$-16, %ebp
	movl	%r10d, %r9d
	xorl	%ecx, %ecx
	addq	$1, %r8
	pxor	%xmm4, %xmm4
	pxor	%xmm3, %xmm3
	salq	$4, %r8
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	testq	%r10, %r10
	je	.L27
	cmpl	$14, %r12d
	jbe	.L30
	xorl	%eax, %eax
	pxor	%xmm1, %xmm1
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rsi,%rax), %xmm0
	movdqa	%xmm4, %xmm6
	pcmpeqb	(%rbx,%rax), %xmm0
	addq	$16, %rax
	pandn	%xmm5, %xmm0
	pcmpgtb	%xmm0, %xmm6
	movdqa	%xmm0, %xmm2
	punpcklbw	%xmm6, %xmm2
	punpckhbw	%xmm6, %xmm0
	movdqa	%xmm3, %xmm6
	pcmpgtw	%xmm2, %xmm6
	movdqa	%xmm2, %xmm7
	punpcklwd	%xmm6, %xmm7
	punpckhwd	%xmm6, %xmm2
	movdqa	%xmm0, %xmm6
	paddd	%xmm7, %xmm1
	paddd	%xmm2, %xmm1
	movdqa	%xmm3, %xmm2
	pcmpgtw	%xmm0, %xmm2
	punpcklwd	%xmm2, %xmm6
	punpckhwd	%xmm2, %xmm0
	paddd	%xmm6, %xmm1
	paddd	%xmm0, %xmm1
	cmpq	%rax, %r8
	jne	.L8
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	cmpl	%ebp, %r13d
	je	.L27
	movl	%ebp, %edx
.L7:
	leal	(%rcx,%rdx), %r14d
	movslq	%edx, %r15
	movzbl	2000(%rsp,%r15), %r15d
	movslq	%r14d, %r14
	cmpb	%r15b, (%rsp,%r14)
	je	.L10
	addl	$1, %eax
.L10:
	leal	1(%rdx), %r14d
	cmpl	%edi, %r14d
	jge	.L27
	leal	(%r14,%rcx), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L11
	addl	$1, %eax
.L11:
	leal	2(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	movslq	%r14d, %r15
	addl	%ecx, %r14d
	movslq	%r14d, %r14
	movzbl	(%rsp,%r14), %r14d
	cmpb	%r14b, 2000(%rsp,%r15)
	je	.L12
	addl	$1, %eax
.L12:
	leal	3(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L13
	addl	$1, %eax
.L13:
	leal	4(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L14
	addl	$1, %eax
.L14:
	leal	5(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L15
	addl	$1, %eax
.L15:
	leal	6(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L16
	addl	$1, %eax
.L16:
	leal	7(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L17
	addl	$1, %eax
.L17:
	leal	8(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L18
	addl	$1, %eax
.L18:
	leal	9(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L19
	addl	$1, %eax
.L19:
	leal	10(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L20
	addl	$1, %eax
.L20:
	leal	11(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L21
	addl	$1, %eax
.L21:
	leal	12(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L22
	addl	$1, %eax
.L22:
	leal	13(%rdx), %r14d
	cmpl	%r14d, %edi
	jle	.L27
	leal	(%rcx,%r14), %r15d
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%r14), %r14d
	movslq	%r15d, %r15
	cmpb	%r14b, (%rsp,%r15)
	je	.L23
	addl	$1, %eax
.L23:
	addl	$14, %edx
	cmpl	%edx, %edi
	jle	.L27
	leal	(%rcx,%rdx), %r14d
	movslq	%edx, %rdx
	movslq	%r14d, %r14
	movzbl	2000(%rsp,%rdx), %edx
	cmpb	%dl, (%rsp,%r14)
	je	.L27
	addl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L27:
	cmpl	%eax, %r9d
	cmovg	%eax, %r9d
	addl	$1, %ecx
	addq	$1, %rsi
	cmpl	%r11d, %ecx
	jne	.L6
.L5:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	4008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L33
	addq	$4024, %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
.L30:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L7
.L29:
	movl	%eax, %r9d
	jmp	.L5
.L33:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.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>
#include <math.h>
#include <string.h>

void chmin(int *a,int b){
  if(*a > b){
    *a =b;
  }

  return;
}

/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/

int main(void){
  char s[2000];
  scanf("%s",s);

  char t[2000];
  scanf("%s",t);

  //strlen()で文字列の長さを取得できる
  //それを忘れてもforでif(s[i]=='\0')みたいなことをすれば取得できる
  int n=strlen(s);
  int m=strlen(t);

  //どう頑張っても変更する数はmを超えないのでmで初期化
  int ans=m;

  /*
  連続するn個のボールから連続するm個(m<=n)取る方法は
  (n-m+1)通りあるからこういう範囲
  */
  for(int i=0;i<n-m+1;i++){
    //"sのここからここをtに一致させたらどうなるのか"を決める
    
    //異なっている場所がいくつあるか->変えるべき場所がいくつあるか
    int cnt=0;
    for(int j=0;j<m;j++){
      if(s[i+j]!=t[j]){
        cnt++;
      }
    }

    //答えの更新
    chmin(&ans,cnt);

    /*
    chmin自体が「もしcnt<ansならば値を更新する」という意味だから
    わざわざif(){chmin()}という書き方をしなくてもいい
    */
  }

  printf("%d\n",ans);

  return 0;
}
codefsrceo
atcoder
 cabacc
abb
 codefsrceo
atdocer
 codefsrceo
atdrceo
 codefsqceo
atdrceo
 ccbaac
aac
 caacbc
bba
 oeectfpcat
albs`tb
 ccabac
abb
 ccabac
bba

6
 1
 5
 3
 4
 0
 2
 7
 1
 1

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>
#include <math.h>
#include <string.h>

void chmin(int *a,int b){
  if(*a > b){
    *a =b;
  }

  return;
}

/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/

int main(void){
  char s[2000];
  scanf("%s",s);

  char t[2000];
  scanf("%s",t);

  //strlen()で文字列の長さを取得できる
  //それを忘れてもforでif(s[i]=='\0')みたいなことをすれば取得できる
  int n=strlen(s);
  int m=strlen(t);

  //どう頑張っても変更する数はmを超えないのでmで初期化
  int ans=m;

  /*
  連続するn個のボールから連続するm個(m<=n)取る方法は
  (n-m+1)通りあるからこういう範囲
  */
  for(int i=0;i<n-m+1;i++){
    //"sのここからここをtに一致させたらどうなるのか"を決める
    
    //異なっている場所がいくつあるか->変えるべき場所がいくつあるか
    int cnt=0;
    for(int j=0;j<m;j++){
      if(s[i+j]!=t[j]){
        cnt++;
      }
    }

    //答えの更新
    chmin(&ans,cnt);

    /*
    chmin自体が「もしcnt<ansならば値を更新する」という意味だから
    わざわざif(){chmin()}という書き方をしなくてもいい
    */
  }

  printf("%d\n",ans);

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	chmin
	.type	chmin, @function
chmin:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L4
	movq	-8(%rbp), %rax
	movl	-12(%rbp), %edx
	movl	%edx, (%rax)
	nop
.L4:
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	chmin, .-chmin
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4048, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-4016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-2016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-4016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -4024(%rbp)
	leaq	-2016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -4020(%rbp)
	movl	-4020(%rbp), %eax
	movl	%eax, -4040(%rbp)
	movl	$0, -4036(%rbp)
	jmp	.L6
.L10:
	movl	$0, -4032(%rbp)
	movl	$0, -4028(%rbp)
	jmp	.L7
.L9:
	movl	-4036(%rbp), %edx
	movl	-4028(%rbp), %eax
	addl	%edx, %eax
	cltq
	movzbl	-4016(%rbp,%rax), %edx
	movl	-4028(%rbp), %eax
	cltq
	movzbl	-2016(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L8
	addl	$1, -4032(%rbp)
.L8:
	addl	$1, -4028(%rbp)
.L7:
	movl	-4028(%rbp), %eax
	cmpl	-4020(%rbp), %eax
	jl	.L9
	movl	-4032(%rbp), %edx
	leaq	-4040(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	chmin
	addl	$1, -4036(%rbp)
.L6:
	movl	-4024(%rbp), %eax
	subl	-4020(%rbp), %eax
	cmpl	%eax, -4036(%rbp)
	jle	.L10
	movl	-4040(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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
	.globl	chmin
	.type	chmin, @function
chmin:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L4
	movq	-8(%rbp), %rax
	movl	-12(%rbp), %edx
	movl	%edx, (%rax)
	nop
.L4:
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	chmin, .-chmin
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4048, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-4016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-2016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-4016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -4024(%rbp)
	leaq	-2016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -4020(%rbp)
	movl	-4020(%rbp), %eax
	movl	%eax, -4040(%rbp)
	movl	$0, -4036(%rbp)
	jmp	.L6
.L10:
	movl	$0, -4032(%rbp)
	movl	$0, -4028(%rbp)
	jmp	.L7
.L9:
	movl	-4036(%rbp), %edx
	movl	-4028(%rbp), %eax
	addl	%edx, %eax
	cltq
	movzbl	-4016(%rbp,%rax), %edx
	movl	-4028(%rbp), %eax
	cltq
	movzbl	-2016(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L8
	addl	$1, -4032(%rbp)
.L8:
	addl	$1, -4028(%rbp)
.L7:
	movl	-4028(%rbp), %eax
	cmpl	-4020(%rbp), %eax
	jl	.L9
	movl	-4032(%rbp), %edx
	leaq	-4040(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	chmin
	addl	$1, -4036(%rbp)
.L6:
	movl	-4024(%rbp), %eax
	subl	-4020(%rbp), %eax
	cmpl	%eax, -4036(%rbp)
	jle	.L10
	movl	-4040(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
