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

int main(){
	int i,j,k;
	int count,counter;
	int hairetsu[2][10];
	int memo1,memo2;
	char d[]=" ";
	char c[30];
	char *tok;
	int now;
	
	scanf("%d\n",&counter);
	count=0;
	while(count<counter){
		for(i=0;i<2;i++){
			for(j=0;j<10;j++){
				hairetsu[i][j]=0;
			}
		}
		memo1=0;
		memo2=0;
		gets(c);
		tok=strtok(c,d);
		int flag=1;
		while(tok!=NULL){
			now=atoi(tok);
			if(hairetsu[0][memo1]<now){
				memo1++;
				hairetsu[0][memo1]=now;
			}else{
				if(hairetsu[1][memo2]<now){
					memo2++;
					hairetsu[1][memo2]=now;
				}else{
					flag=0;
					break;
				}
			}
			tok=strtok(NULL,d);
		}
		if(flag){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
		count++;
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$32, %edx
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$168, %rsp
	.cfi_def_cfa_offset 224
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	movw	%dx, 110(%rsp)
	leaq	110(%rsp), %r13
	leaq	112(%rsp), %r15
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	pxor	%xmm0, %xmm0
	movq	%r15, %rdi
	xorl	%eax, %eax
	xorl	%ebp, %ebp
	movaps	%xmm0, 16(%rsp)
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	call	gets@PLT
	movq	%r15, %rdi
	movq	%r13, %rsi
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	jne	.L7
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L20:
	addl	$1, %r12d
	movslq	%r12d, %rbx
	movl	%eax, 16(%rsp,%rbx,4)
.L5:
	xorl	%edi, %edi
	movq	%r13, %rsi
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L8
.L7:
	xorl	%esi, %esi
	movl	$10, %edx
	call	strtol@PLT
	cmpl	%eax, 16(%rsp,%rbx,4)
	jl	.L20
	movslq	%ebp, %rdx
	cmpl	%eax, 56(%rsp,%rdx,4)
	jge	.L6
	addl	$1, %ebp
	movslq	%ebp, %rdx
	movl	%eax, 56(%rsp,%rdx,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L9:
	addl	$1, %r14d
	cmpl	%r14d, 12(%rsp)
	jg	.L2
.L3:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$168, %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
.L6:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L9
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$32, %edx
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$168, %rsp
	.cfi_def_cfa_offset 224
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	movw	%dx, 110(%rsp)
	leaq	110(%rsp), %r13
	leaq	112(%rsp), %r15
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	pxor	%xmm0, %xmm0
	movq	%r15, %rdi
	xorl	%eax, %eax
	xorl	%ebp, %ebp
	movaps	%xmm0, 16(%rsp)
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	call	gets@PLT
	movq	%r15, %rdi
	movq	%r13, %rsi
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	jne	.L7
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L20:
	addl	$1, %r12d
	movslq	%r12d, %rbx
	movl	%eax, 16(%rsp,%rbx,4)
.L5:
	xorl	%edi, %edi
	movq	%r13, %rsi
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L8
.L7:
	xorl	%esi, %esi
	movl	$10, %edx
	call	strtol@PLT
	cmpl	%eax, 16(%rsp,%rbx,4)
	jl	.L20
	movslq	%ebp, %rdx
	cmpl	%eax, 56(%rsp,%rdx,4)
	jge	.L6
	addl	$1, %ebp
	movslq	%ebp, %rdx
	movl	%eax, 56(%rsp,%rdx,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L9:
	addl	$1, %r14d
	cmpl	%r14d, 12(%rsp)
	jg	.L2
.L3:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$168, %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
.L6:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L9
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$32, %edx
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$168, %rsp
	.cfi_def_cfa_offset 224
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	movw	%dx, 110(%rsp)
	leaq	110(%rsp), %r13
	leaq	112(%rsp), %r15
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	pxor	%xmm0, %xmm0
	movq	%r15, %rdi
	xorl	%eax, %eax
	xorl	%ebp, %ebp
	movaps	%xmm0, 16(%rsp)
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	call	gets@PLT
	movq	%r15, %rdi
	movq	%r13, %rsi
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	jne	.L7
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L20:
	addl	$1, %r12d
	movslq	%r12d, %rbx
	movl	%eax, 16(%rsp,%rbx,4)
.L5:
	xorl	%edi, %edi
	movq	%r13, %rsi
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L8
.L7:
	xorl	%esi, %esi
	movl	$10, %edx
	call	strtol@PLT
	cmpl	%eax, 16(%rsp,%rbx,4)
	jl	.L20
	movslq	%ebp, %rdx
	cmpl	%eax, 56(%rsp,%rdx,4)
	jge	.L6
	addl	$1, %ebp
	movslq	%ebp, %rdx
	movl	%eax, 56(%rsp,%rdx,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L9:
	addl	$1, %r14d
	cmpl	%r14d, 12(%rsp)
	jg	.L2
.L3:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$168, %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
.L6:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L9
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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:
```
```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(){
	int i,j,k;
	int count,counter;
	int hairetsu[2][10];
	int memo1,memo2;
	char d[]=" ";
	char c[30];
	char *tok;
	int now;
	
	scanf("%d\n",&counter);
	count=0;
	while(count<counter){
		for(i=0;i<2;i++){
			for(j=0;j<10;j++){
				hairetsu[i][j]=0;
			}
		}
		memo1=0;
		memo2=0;
		gets(c);
		tok=strtok(c,d);
		int flag=1;
		while(tok!=NULL){
			now=atoi(tok);
			if(hairetsu[0][memo1]<now){
				memo1++;
				hairetsu[0][memo1]=now;
			}else{
				if(hairetsu[1][memo2]<now){
					memo2++;
					hairetsu[1][memo2]=now;
				}else{
					flag=0;
					break;
				}
			}
			tok=strtok(NULL,d);
		}
		if(flag){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
		count++;
	}
	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 <stdlib.h>
#include <string.h>

int main(){
	int i,j,k;
	int count,counter;
	int hairetsu[2][10];
	int memo1,memo2;
	char d[]=" ";
	char c[30];
	char *tok;
	int now;
	
	scanf("%d\n",&counter);
	count=0;
	while(count<counter){
		for(i=0;i<2;i++){
			for(j=0;j<10;j++){
				hairetsu[i][j]=0;
			}
		}
		memo1=0;
		memo2=0;
		gets(c);
		tok=strtok(c,d);
		int flag=1;
		while(tok!=NULL){
			now=atoi(tok);
			if(hairetsu[0][memo1]<now){
				memo1++;
				hairetsu[0][memo1]=now;
			}else{
				if(hairetsu[1][memo2]<now){
					memo2++;
					hairetsu[1][memo2]=now;
				}else{
					flag=0;
					break;
				}
			}
			tok=strtok(NULL,d);
		}
		if(flag){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
		count++;
	}
	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:

2
3 1 4 2 5 6 7 8 9 10
11 9 8 7 6 5 4 3 2 1
 2
3 1 4 2 5 6 7 8 1 10
11 9 8 7 6 5 4 3 2 1
 2
3 1 4 2 5 6 7 8 1 10
11 7 8 7 6 5 4 3 2 1
 2
3 1 4 2 5 6 7 5 1 10
11 7 8 7 6 5 4 3 2 1
 2
3 1 4 2 5 6 7 5 1 10
11 10 8 7 6 5 4 3 2 1
 2
3 1 4 2 5 12 7 5 1 10
11 10 8 7 6 5 4 3 2 1
 2
3 1 4 2 5 12 5 5 1 10
11 10 8 7 6 5 4 3 2 1
 2
3 1 4 2 5 12 5 5 1 10
11 10 10 7 6 5 4 3 2 1
 2
3 1 4 2 5 12 5 5 1 10
11 10 10 7 6 5 3 3 2 1
 2
3 1 4 2 5 12 5 5 1 10
18 10 10 7 6 5 3 3 2 1

YES
NO
 NO
NO
 NO
NO
 NO
NO
 NO
NO
 NO
NO
 NO
NO
 NO
NO
 NO
NO
 NO
NO

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

int main(){
	int i,j,k;
	int count,counter;
	int hairetsu[2][10];
	int memo1,memo2;
	char d[]=" ";
	char c[30];
	char *tok;
	int now;
	
	scanf("%d\n",&counter);
	count=0;
	while(count<counter){
		for(i=0;i<2;i++){
			for(j=0;j<10;j++){
				hairetsu[i][j]=0;
			}
		}
		memo1=0;
		memo2=0;
		gets(c);
		tok=strtok(c,d);
		int flag=1;
		while(tok!=NULL){
			now=atoi(tok);
			if(hairetsu[0][memo1]<now){
				memo1++;
				hairetsu[0][memo1]=now;
			}else{
				if(hairetsu[1][memo2]<now){
					memo2++;
					hairetsu[1][memo2]=now;
				}else{
					flag=0;
					break;
				}
			}
			tok=strtok(NULL,d);
		}
		if(flag){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
		count++;
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$32, %edx
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$168, %rsp
	.cfi_def_cfa_offset 224
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	movw	%dx, 110(%rsp)
	leaq	110(%rsp), %r13
	leaq	112(%rsp), %r15
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	pxor	%xmm0, %xmm0
	movq	%r15, %rdi
	xorl	%eax, %eax
	xorl	%ebp, %ebp
	movaps	%xmm0, 16(%rsp)
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	call	gets@PLT
	movq	%r15, %rdi
	movq	%r13, %rsi
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	jne	.L7
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L20:
	addl	$1, %r12d
	movslq	%r12d, %rbx
	movl	%eax, 16(%rsp,%rbx,4)
.L5:
	xorl	%edi, %edi
	movq	%r13, %rsi
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L8
.L7:
	xorl	%esi, %esi
	movl	$10, %edx
	call	strtol@PLT
	cmpl	%eax, 16(%rsp,%rbx,4)
	jl	.L20
	movslq	%ebp, %rdx
	cmpl	%eax, 56(%rsp,%rdx,4)
	jge	.L6
	addl	$1, %ebp
	movslq	%ebp, %rdx
	movl	%eax, 56(%rsp,%rdx,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L9:
	addl	$1, %r14d
	cmpl	%r14d, 12(%rsp)
	jg	.L2
.L3:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$168, %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
.L6:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L9
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$32, %edx
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$168, %rsp
	.cfi_def_cfa_offset 224
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	movw	%dx, 110(%rsp)
	leaq	110(%rsp), %r13
	leaq	112(%rsp), %r15
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	pxor	%xmm0, %xmm0
	movq	%r15, %rdi
	xorl	%eax, %eax
	xorl	%ebp, %ebp
	movaps	%xmm0, 16(%rsp)
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	call	gets@PLT
	movq	%r15, %rdi
	movq	%r13, %rsi
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	jne	.L7
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L20:
	addl	$1, %r12d
	movslq	%r12d, %rbx
	movl	%eax, 16(%rsp,%rbx,4)
.L5:
	xorl	%edi, %edi
	movq	%r13, %rsi
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L8
.L7:
	xorl	%esi, %esi
	movl	$10, %edx
	call	strtol@PLT
	cmpl	%eax, 16(%rsp,%rbx,4)
	jl	.L20
	movslq	%ebp, %rdx
	cmpl	%eax, 56(%rsp,%rdx,4)
	jge	.L6
	addl	$1, %ebp
	movslq	%ebp, %rdx
	movl	%eax, 56(%rsp,%rdx,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L9:
	addl	$1, %r14d
	cmpl	%r14d, 12(%rsp)
	jg	.L2
.L3:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$168, %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
.L6:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L9
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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:
```