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 find(char *a, char *b, int i, int bl){
  int j;

  for(j = 0; j < bl; j++){
    if(a[i+j] != b[j]){
      return 0;
    }
  }
  return -1;
}

int main(){
  char a[1000], b[1000];
  int i, bl, al;

  scanf("%s", a);
  scanf("%s", b);

  al = strlen(a);
  bl = strlen(b);

  for(i = 0; i <al; i++){
    if(find(a, b, i, bl)){
      printf("%d\n", i);
    }
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	find
	.type	find, @function
find:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movl	%ecx, -40(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L5:
	movl	-36(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	je	.L3
	movl	$0, %eax
	jmp	.L4
.L3:
	addl	$1, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cmpl	-40(%rbp), %eax
	jl	.L5
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	find, .-find
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$2032, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1008(%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, %rdi
	call	strlen@PLT
	movl	%eax, -2024(%rbp)
	leaq	-1008(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -2020(%rbp)
	movl	$0, -2028(%rbp)
	jmp	.L7
.L9:
	movl	-2020(%rbp), %ecx
	movl	-2028(%rbp), %edx
	leaq	-1008(%rbp), %rsi
	leaq	-2016(%rbp), %rax
	movq	%rax, %rdi
	call	find
	testl	%eax, %eax
	je	.L8
	movl	-2028(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	addl	$1, -2028(%rbp)
.L7:
	movl	-2028(%rbp), %eax
	cmpl	-2024(%rbp), %eax
	jl	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	find
	.type	find, @function
find:
.LFB35:
	.cfi_startproc
	endbr64
	testl	%ecx, %ecx
	jle	.L4
	movslq	%edx, %rdx
	movslq	%ecx, %rcx
	xorl	%eax, %eax
	addq	%rdx, %rdi
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$1, %rax
	cmpq	%rcx, %rax
	je	.L4
.L3:
	movzbl	(%rsi,%rax), %edx
	cmpb	%dl, (%rdi,%rax)
	je	.L8
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	movl	$-1, %eax
	ret
	.cfi_endproc
.LFE35:
	.size	find, .-find
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.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	$2024, %rsp
	.cfi_def_cfa_offset 2080
	movq	%fs:40, %rax
	movq	%rax, 2008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	leaq	1008(%rsp), %r12
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	movq	%r12, %rdi
	movq	%rax, %r13
	movl	%eax, %r15d
	call	strlen@PLT
	testq	%r13, %r13
	je	.L10
	movq	%rax, %rbp
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L11:
	xorl	%eax, %eax
	testq	%rbp, %rbp
	jne	.L13
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L24:
	addq	$1, %rax
	cmpq	%rax, %rbp
	je	.L14
.L13:
	movzbl	(%r12,%rax), %ecx
	cmpb	%cl, (%rbx,%rax)
	je	.L24
	addl	$1, %r13d
	addq	$1, %rbx
	cmpl	%r13d, %r15d
	jne	.L11
.L10:
	movq	2008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$2024, %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
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	movl	%r13d, %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addl	$1, %r13d
	addq	$1, %rbx
	cmpl	%r13d, %r15d
	jne	.L11
	jmp	.L10
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.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
	.p2align 4
	.globl	find
	.type	find, @function
find:
.LFB35:
	.cfi_startproc
	endbr64
	testl	%ecx, %ecx
	jle	.L4
	movslq	%edx, %rdx
	movslq	%ecx, %rcx
	xorl	%eax, %eax
	addq	%rdx, %rdi
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$1, %rax
	cmpq	%rcx, %rax
	je	.L4
.L3:
	movzbl	(%rsi,%rax), %edx
	cmpb	%dl, (%rdi,%rax)
	je	.L8
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	movl	$-1, %eax
	ret
	.cfi_endproc
.LFE35:
	.size	find, .-find
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.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	$2024, %rsp
	.cfi_def_cfa_offset 2080
	movq	%fs:40, %rax
	movq	%rax, 2008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	leaq	1008(%rsp), %r12
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	movq	%r12, %rdi
	movq	%rax, %r13
	movl	%eax, %r15d
	call	strlen@PLT
	testq	%r13, %r13
	je	.L10
	movq	%rax, %rbp
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L11:
	xorl	%eax, %eax
	testq	%rbp, %rbp
	jne	.L13
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L24:
	addq	$1, %rax
	cmpq	%rax, %rbp
	je	.L14
.L13:
	movzbl	(%r12,%rax), %ecx
	cmpb	%cl, (%rbx,%rax)
	je	.L24
	addl	$1, %r13d
	addq	$1, %rbx
	cmpl	%r13d, %r15d
	jne	.L11
.L10:
	movq	2008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$2024, %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
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	movl	%r13d, %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addl	$1, %r13d
	addq	$1, %rbx
	cmpl	%r13d, %r15d
	jne	.L11
	jmp	.L10
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.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 find(char *a, char *b, int i, int bl){
  int j;

  for(j = 0; j < bl; j++){
    if(a[i+j] != b[j]){
      return 0;
    }
  }
  return -1;
}

int main(){
  char a[1000], b[1000];
  int i, bl, al;

  scanf("%s", a);
  scanf("%s", b);

  al = strlen(a);
  bl = strlen(b);

  for(i = 0; i <al; i++){
    if(find(a, b, i, bl)){
      printf("%d\n", i);
    }
  }
  return 0;
}
aaabaa
aa
 aabaaa
ba
 aaabaa
ba
 aab`aa
aa
 xyzy
yz
 aaaaba
aa
 abaaaa
aa
 abaaaa
ab
 aaacab
aa
 aaaaba
ba

0
1
4
 2
 3
 0
4
 1
 0
1
2
 2
3
4
 0
 0
1
 4

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 find(char *a, char *b, int i, int bl){
  int j;

  for(j = 0; j < bl; j++){
    if(a[i+j] != b[j]){
      return 0;
    }
  }
  return -1;
}

int main(){
  char a[1000], b[1000];
  int i, bl, al;

  scanf("%s", a);
  scanf("%s", b);

  al = strlen(a);
  bl = strlen(b);

  for(i = 0; i <al; i++){
    if(find(a, b, i, bl)){
      printf("%d\n", i);
    }
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	find
	.type	find, @function
find:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movl	%ecx, -40(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L5:
	movl	-36(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	je	.L3
	movl	$0, %eax
	jmp	.L4
.L3:
	addl	$1, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cmpl	-40(%rbp), %eax
	jl	.L5
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	find, .-find
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$2032, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1008(%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, %rdi
	call	strlen@PLT
	movl	%eax, -2024(%rbp)
	leaq	-1008(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -2020(%rbp)
	movl	$0, -2028(%rbp)
	jmp	.L7
.L9:
	movl	-2020(%rbp), %ecx
	movl	-2028(%rbp), %edx
	leaq	-1008(%rbp), %rsi
	leaq	-2016(%rbp), %rax
	movq	%rax, %rdi
	call	find
	testl	%eax, %eax
	je	.L8
	movl	-2028(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	addl	$1, -2028(%rbp)
.L7:
	movl	-2028(%rbp), %eax
	cmpl	-2024(%rbp), %eax
	jl	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	find
	.type	find, @function
find:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movl	%ecx, -40(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L5:
	movl	-36(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	je	.L3
	movl	$0, %eax
	jmp	.L4
.L3:
	addl	$1, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cmpl	-40(%rbp), %eax
	jl	.L5
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	find, .-find
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$2032, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1008(%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, %rdi
	call	strlen@PLT
	movl	%eax, -2024(%rbp)
	leaq	-1008(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -2020(%rbp)
	movl	$0, -2028(%rbp)
	jmp	.L7
.L9:
	movl	-2020(%rbp), %ecx
	movl	-2028(%rbp), %edx
	leaq	-1008(%rbp), %rsi
	leaq	-2016(%rbp), %rax
	movq	%rax, %rdi
	call	find
	testl	%eax, %eax
	je	.L8
	movl	-2028(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	addl	$1, -2028(%rbp)
.L7:
	movl	-2028(%rbp), %eax
	cmpl	-2024(%rbp), %eax
	jl	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
