Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <string.h>

int main(void){
    char target[][4]={"JOI","IOI"},line[10001],*mv;
    int i,sum;
   for(;scanf("%s",line)!=EOF;){
       for(i=0;mv=line,sum=0,i<2;i++){
           while((mv=strstr(mv,target[i]))){
               sum++;
               mv++;
           }
           printf("%d\n",sum);
       }
   }
   return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4144
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8240
	orq	$0, (%rsp)
	subq	$1840, %rsp
	.cfi_def_cfa_offset 10080
	leaq	.LC2(%rip), %r14
	leaq	.LC1(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 10024(%rsp)
	xorl	%eax, %eax
	movq	.LC0(%rip), %rax
	leaq	16(%rsp), %rbp
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L4
	xorl	%r12d, %r12d
	movq	%rbp, %rdi
	leaq	8(%rsp), %rbx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L11:
	addl	$1, %r12d
	leaq	1(%rax), %rdi
.L6:
	movq	%rbx, %rsi
	call	strstr@PLT
	testq	%rax, %rax
	jne	.L11
	movl	%r12d, %edx
	movl	$1, %edi
	movq	%r13, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%r12d, %r12d
	movq	%rbp, %rdi
	leaq	12(%rsp), %rbx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %r12d
	leaq	1(%rax), %rdi
.L7:
	movq	%rbx, %rsi
	call	strstr@PLT
	testq	%rax, %rax
	jne	.L3
	movl	%r12d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L2
.L4:
	movq	10024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$10032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	4804426
	.long	4804425
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4144
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8240
	orq	$0, (%rsp)
	subq	$1840, %rsp
	.cfi_def_cfa_offset 10080
	leaq	.LC2(%rip), %r14
	leaq	.LC1(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 10024(%rsp)
	xorl	%eax, %eax
	movq	.LC0(%rip), %rax
	leaq	16(%rsp), %rbp
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L4
	xorl	%r12d, %r12d
	movq	%rbp, %rdi
	leaq	8(%rsp), %rbx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L11:
	addl	$1, %r12d
	leaq	1(%rax), %rdi
.L6:
	movq	%rbx, %rsi
	call	strstr@PLT
	testq	%rax, %rax
	jne	.L11
	movl	%r12d, %edx
	movl	$1, %edi
	movq	%r13, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%r12d, %r12d
	movq	%rbp, %rdi
	leaq	12(%rsp), %rbx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %r12d
	leaq	1(%rax), %rdi
.L7:
	movq	%rbx, %rsi
	call	strstr@PLT
	testq	%rax, %rax
	jne	.L3
	movl	%r12d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L2
.L4:
	movq	10024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$10032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	4804426
	.long	4804425
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4144
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8240
	orq	$0, (%rsp)
	subq	$1840, %rsp
	.cfi_def_cfa_offset 10080
	leaq	.LC2(%rip), %r14
	leaq	.LC1(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 10024(%rsp)
	xorl	%eax, %eax
	movq	.LC0(%rip), %rax
	leaq	16(%rsp), %rbp
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L4
	xorl	%r12d, %r12d
	movq	%rbp, %rdi
	leaq	8(%rsp), %rbx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L11:
	addl	$1, %r12d
	leaq	1(%rax), %rdi
.L6:
	movq	%rbx, %rsi
	call	strstr@PLT
	testq	%rax, %rax
	jne	.L11
	movl	%r12d, %edx
	movl	$1, %edi
	movq	%r13, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%r12d, %r12d
	movq	%rbp, %rdi
	leaq	12(%rsp), %rbx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %r12d
	leaq	1(%rax), %rdi
.L7:
	movq	%rbx, %rsi
	call	strstr@PLT
	testq	%rax, %rax
	jne	.L3
	movl	%r12d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L2
.L4:
	movq	10024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$10032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	4804426
	.long	4804425
	.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:
```
```c
#include <stdio.h>
#include <string.h>

int main(void){
    char target[][4]={"JOI","IOI"},line[10001],*mv;
    int i,sum;
   for(;scanf("%s",line)!=EOF;){
       for(i=0;mv=line,sum=0,i<2;i++){
           while((mv=strstr(mv,target[i]))){
               sum++;
               mv++;
           }
           printf("%d\n",sum);
       }
   }
   return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <string.h>

int main(void){
    char target[][4]={"JOI","IOI"},line[10001],*mv;
    int i,sum;
   for(;scanf("%s",line)!=EOF;){
       for(i=0;mv=line,sum=0,i<2;i++){
           while((mv=strstr(mv,target[i]))){
               sum++;
               mv++;
           }
           printf("%d\n",sum);
       }
   }
   return 0;
}```

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.
Optimized Assembly Code:

JOIJOI
JOIOIOIOI
JOIOIOIJXNXNIOJIOIOJ
 eonN
 JOIJOI
JOIOINIOI
JOIOIOIJXNXNIOJIOIOJ
 JOIJOI
JOIOINIOI
JOIOIJOINXNXJIOIOIOJ
 JOIJOI
JOIOINIOI
JOIPIJOINXNXJIOIOIOJ
 JOIJOH
JOIOINIOI
JOIPIJOINXNXJIOIOIOJ
 JOIJOG
JOIOINIOI
JOIPIJOINXOXJINIOIOJ
 GOJIOJ
JOIOINIOI
JOIPIJOINXOXJINIOIOJ
 GOJIOJ
JOIOINJOI
JOIPIJOINXOXJINIOIOJ
 GOJIOJ
JOIOINJOJ
JOIPIJOINXOXJINIOIOJ

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

Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <string.h>

int main(void){
    char target[][4]={"JOI","IOI"},line[10001],*mv;
    int i,sum;
   for(;scanf("%s",line)!=EOF;){
       for(i=0;mv=line,sum=0,i<2;i++){
           while((mv=strstr(mv,target[i]))){
               sum++;
               mv++;
           }
           printf("%d\n",sum);
       }
   }
   return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4144
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8240
	orq	$0, (%rsp)
	subq	$1840, %rsp
	.cfi_def_cfa_offset 10080
	leaq	.LC2(%rip), %r14
	leaq	.LC1(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 10024(%rsp)
	xorl	%eax, %eax
	movq	.LC0(%rip), %rax
	leaq	16(%rsp), %rbp
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L4
	xorl	%r12d, %r12d
	movq	%rbp, %rdi
	leaq	8(%rsp), %rbx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L11:
	addl	$1, %r12d
	leaq	1(%rax), %rdi
.L6:
	movq	%rbx, %rsi
	call	strstr@PLT
	testq	%rax, %rax
	jne	.L11
	movl	%r12d, %edx
	movl	$1, %edi
	movq	%r13, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%r12d, %r12d
	movq	%rbp, %rdi
	leaq	12(%rsp), %rbx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %r12d
	leaq	1(%rax), %rdi
.L7:
	movq	%rbx, %rsi
	call	strstr@PLT
	testq	%rax, %rax
	jne	.L3
	movl	%r12d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L2
.L4:
	movq	10024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$10032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	4804426
	.long	4804425
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4144
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8240
	orq	$0, (%rsp)
	subq	$1840, %rsp
	.cfi_def_cfa_offset 10080
	leaq	.LC2(%rip), %r14
	leaq	.LC1(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 10024(%rsp)
	xorl	%eax, %eax
	movq	.LC0(%rip), %rax
	leaq	16(%rsp), %rbp
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L4
	xorl	%r12d, %r12d
	movq	%rbp, %rdi
	leaq	8(%rsp), %rbx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L11:
	addl	$1, %r12d
	leaq	1(%rax), %rdi
.L6:
	movq	%rbx, %rsi
	call	strstr@PLT
	testq	%rax, %rax
	jne	.L11
	movl	%r12d, %edx
	movl	$1, %edi
	movq	%r13, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%r12d, %r12d
	movq	%rbp, %rdi
	leaq	12(%rsp), %rbx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %r12d
	leaq	1(%rax), %rdi
.L7:
	movq	%rbx, %rsi
	call	strstr@PLT
	testq	%rax, %rax
	jne	.L3
	movl	%r12d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L2
.L4:
	movq	10024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$10032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	4804426
	.long	4804425
	.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:
```