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>

int main()
{
	int N,s,i;
	int a[100005]={0};
	while(scanf("%d",&N)!=EOF)
	{
		for(i=0;i<N;i++)
		{
			scanf("%d",&s);
			if(s==0)
			{
				a[s]++;
				a[s+1]++;
			}
			else
			{
				a[s]++;
				a[s+1]++;
				a[s-1]++;
			}
		}
		int max=0;
		for(i=0;i<=100000;i++)
			if(max<a[i]) max=a[i];
		printf("%d\n",max);
	}
	
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2744, %rsp
	.cfi_def_cfa_offset 400112
	movl	$400020, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %rbp
	leaq	.LC2(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r14
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	leaq	12(%rsp), %r12
	call	memset@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L8
	movl	8(%rsp), %eax
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jne	.L3
	movq	16(%rsp), %xmm0
	addl	$1, %r15d
	movq	.LC1(%rip), %xmm3
	paddd	%xmm3, %xmm0
	movq	%xmm0, 16(%rsp)
	cmpl	8(%rsp), %r15d
	jl	.L6
.L5:
	movq	%r14, %rax
	leaq	400016(%rsp), %rdx
	pxor	%xmm2, %xmm2
	.p2align 4,,10
	.p2align 3
.L7:
	movdqa	%xmm2, %xmm0
	addq	$16, %rax
	pcmpgtd	-16(%rax), %xmm0
	pand	%xmm0, %xmm2
	pandn	-16(%rax), %xmm0
	por	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L7
	movdqa	%xmm2, %xmm0
	movl	400016(%rsp), %eax
	movq	%rbx, %rsi
	movl	$1, %edi
	psrldq	$8, %xmm0
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %edx
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	%eax, %rdx
	addl	$1, %r15d
	addl	$1, 16(%rsp,%rdx,4)
	leal	1(%rax), %edx
	subl	$1, %eax
	movslq	%edx, %rdx
	cltq
	addl	$1, 16(%rsp,%rdx,4)
	addl	$1, 16(%rsp,%rax,4)
	cmpl	%r15d, 8(%rsp)
	jg	.L6
	jmp	.L5
.L8:
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$400056, %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
.L15:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	1
	.long	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:
```

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"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2744, %rsp
	.cfi_def_cfa_offset 400112
	movl	$400020, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %rbp
	leaq	.LC2(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r14
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	leaq	12(%rsp), %r12
	call	memset@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L8
	movl	8(%rsp), %eax
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jne	.L3
	movq	16(%rsp), %xmm0
	addl	$1, %r15d
	movq	.LC1(%rip), %xmm3
	paddd	%xmm3, %xmm0
	movq	%xmm0, 16(%rsp)
	cmpl	8(%rsp), %r15d
	jl	.L6
.L5:
	movq	%r14, %rax
	leaq	400016(%rsp), %rdx
	pxor	%xmm2, %xmm2
	.p2align 4,,10
	.p2align 3
.L7:
	movdqa	%xmm2, %xmm0
	addq	$16, %rax
	pcmpgtd	-16(%rax), %xmm0
	pand	%xmm0, %xmm2
	pandn	-16(%rax), %xmm0
	por	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L7
	movdqa	%xmm2, %xmm0
	movl	400016(%rsp), %eax
	movq	%rbx, %rsi
	movl	$1, %edi
	psrldq	$8, %xmm0
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %edx
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	%eax, %rdx
	addl	$1, %r15d
	addl	$1, 16(%rsp,%rdx,4)
	leal	1(%rax), %edx
	subl	$1, %eax
	movslq	%edx, %rdx
	cltq
	addl	$1, 16(%rsp,%rdx,4)
	addl	$1, 16(%rsp,%rax,4)
	cmpl	%r15d, 8(%rsp)
	jg	.L6
	jmp	.L5
.L8:
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$400056, %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
.L15:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	1
	.long	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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2744, %rsp
	.cfi_def_cfa_offset 400112
	movl	$400020, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %rbp
	leaq	.LC2(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r14
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	leaq	12(%rsp), %r12
	call	memset@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L8
	movl	8(%rsp), %eax
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jne	.L3
	movq	16(%rsp), %xmm0
	addl	$1, %r15d
	movq	.LC1(%rip), %xmm3
	paddd	%xmm3, %xmm0
	movq	%xmm0, 16(%rsp)
	cmpl	8(%rsp), %r15d
	jl	.L6
.L5:
	movq	%r14, %rax
	leaq	400016(%rsp), %rdx
	pxor	%xmm2, %xmm2
	.p2align 4,,10
	.p2align 3
.L7:
	movdqa	%xmm2, %xmm0
	addq	$16, %rax
	pcmpgtd	-16(%rax), %xmm0
	pand	%xmm0, %xmm2
	pandn	-16(%rax), %xmm0
	por	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L7
	movdqa	%xmm2, %xmm0
	movl	400016(%rsp), %eax
	movq	%rbx, %rsi
	movl	$1, %edi
	psrldq	$8, %xmm0
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %edx
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	%eax, %rdx
	addl	$1, %r15d
	addl	$1, 16(%rsp,%rdx,4)
	leal	1(%rax), %edx
	subl	$1, %eax
	movslq	%edx, %rdx
	cltq
	addl	$1, 16(%rsp,%rdx,4)
	addl	$1, 16(%rsp,%rax,4)
	cmpl	%r15d, 8(%rsp)
	jg	.L6
	jmp	.L5
.L8:
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$400056, %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
.L15:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	1
	.long	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:
```
```c
#include<stdio.h>

int main()
{
	int N,s,i;
	int a[100005]={0};
	while(scanf("%d",&N)!=EOF)
	{
		for(i=0;i<N;i++)
		{
			scanf("%d",&s);
			if(s==0)
			{
				a[s]++;
				a[s+1]++;
			}
			else
			{
				a[s]++;
				a[s+1]++;
				a[s-1]++;
			}
		}
		int max=0;
		for(i=0;i<=100000;i++)
			if(max<a[i]) max=a[i];
		printf("%d\n",max);
	}
	
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

int main()
{
	int N,s,i;
	int a[100005]={0};
	while(scanf("%d",&N)!=EOF)
	{
		for(i=0;i<N;i++)
		{
			scanf("%d",&s);
			if(s==0)
			{
				a[s]++;
				a[s+1]++;
			}
			else
			{
				a[s]++;
				a[s+1]++;
				a[s-1]++;
			}
		}
		int max=0;
		for(i=0;i<=100000;i++)
			if(max<a[i]) max=a[i];
		printf("%d\n",max);
	}
	
}```

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:

7
3 1 7 1 5 9 2
 7
3 1 7 1 5 9 0
 7
3 1 2 1 5 9 1
 7
3 2 2 -2 1 3 1
 7
1 2 2 0 1 2 1
 10
0 1 1 0 2 1 4 2 2 10
 10
0 1 1 0 2 1 2 2 1 10
 1
68972
 10
0 1 2 3 4 5 6 7 8 4
 10
-1 1 2 3 4 5 6 7 8 4

4
 3
 5
 5
6
 7
 8
 9
 1
 4
 3
7

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>

int main()
{
	int N,s,i;
	int a[100005]={0};
	while(scanf("%d",&N)!=EOF)
	{
		for(i=0;i<N;i++)
		{
			scanf("%d",&s);
			if(s==0)
			{
				a[s]++;
				a[s+1]++;
			}
			else
			{
				a[s]++;
				a[s+1]++;
				a[s-1]++;
			}
		}
		int max=0;
		for(i=0;i<=100000;i++)
			if(max<a[i]) max=a[i];
		printf("%d\n",max);
	}
	
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2744, %rsp
	.cfi_def_cfa_offset 400112
	movl	$400020, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %rbp
	leaq	.LC2(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r14
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	leaq	12(%rsp), %r12
	call	memset@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L8
	movl	8(%rsp), %eax
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jne	.L3
	movq	16(%rsp), %xmm0
	addl	$1, %r15d
	movq	.LC1(%rip), %xmm3
	paddd	%xmm3, %xmm0
	movq	%xmm0, 16(%rsp)
	cmpl	8(%rsp), %r15d
	jl	.L6
.L5:
	movq	%r14, %rax
	leaq	400016(%rsp), %rdx
	pxor	%xmm2, %xmm2
	.p2align 4,,10
	.p2align 3
.L7:
	movdqa	%xmm2, %xmm0
	addq	$16, %rax
	pcmpgtd	-16(%rax), %xmm0
	pand	%xmm0, %xmm2
	pandn	-16(%rax), %xmm0
	por	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L7
	movdqa	%xmm2, %xmm0
	movl	400016(%rsp), %eax
	movq	%rbx, %rsi
	movl	$1, %edi
	psrldq	$8, %xmm0
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %edx
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	%eax, %rdx
	addl	$1, %r15d
	addl	$1, 16(%rsp,%rdx,4)
	leal	1(%rax), %edx
	subl	$1, %eax
	movslq	%edx, %rdx
	cltq
	addl	$1, 16(%rsp,%rdx,4)
	addl	$1, 16(%rsp,%rax,4)
	cmpl	%r15d, 8(%rsp)
	jg	.L6
	jmp	.L5
.L8:
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$400056, %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
.L15:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	1
	.long	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:
```

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"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2744, %rsp
	.cfi_def_cfa_offset 400112
	movl	$400020, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %rbp
	leaq	.LC2(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r14
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	leaq	12(%rsp), %r12
	call	memset@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L8
	movl	8(%rsp), %eax
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jne	.L3
	movq	16(%rsp), %xmm0
	addl	$1, %r15d
	movq	.LC1(%rip), %xmm3
	paddd	%xmm3, %xmm0
	movq	%xmm0, 16(%rsp)
	cmpl	8(%rsp), %r15d
	jl	.L6
.L5:
	movq	%r14, %rax
	leaq	400016(%rsp), %rdx
	pxor	%xmm2, %xmm2
	.p2align 4,,10
	.p2align 3
.L7:
	movdqa	%xmm2, %xmm0
	addq	$16, %rax
	pcmpgtd	-16(%rax), %xmm0
	pand	%xmm0, %xmm2
	pandn	-16(%rax), %xmm0
	por	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L7
	movdqa	%xmm2, %xmm0
	movl	400016(%rsp), %eax
	movq	%rbx, %rsi
	movl	$1, %edi
	psrldq	$8, %xmm0
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %edx
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	%eax, %rdx
	addl	$1, %r15d
	addl	$1, 16(%rsp,%rdx,4)
	leal	1(%rax), %edx
	subl	$1, %eax
	movslq	%edx, %rdx
	cltq
	addl	$1, 16(%rsp,%rdx,4)
	addl	$1, 16(%rsp,%rax,4)
	cmpl	%r15d, 8(%rsp)
	jg	.L6
	jmp	.L5
.L8:
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$400056, %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
.L15:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	1
	.long	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:
```