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>

int go[100000];

int main(void)
{
	int n;
	
	while (scanf("%d", &n), n != 0){
		int i, j;
		int cnt;
		
		for (i = 0; i < n; i++) scanf("%d", go + i);
		for (i = 1; i < n; i += 2){
			if (go[i - 1] != go[i]){
				for (j = i - 1; j >= 0 && go[j] != go[i]; j--){
					go[j] = go[i];
				}
			}
		}
		for (i = cnt = 0; i < n; i++) cnt += !go[i];
		printf("%d\n", cnt);
	}
	
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	go
	.bss
	.align 32
	.type	go, @object
	.size	go, 400000
go:
	.zero	400000
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L12:
	movl	$0, -20(%rbp)
	jmp	.L3
.L4:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	go(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L3:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L4
	movl	$1, -20(%rbp)
	jmp	.L5
.L9:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	go(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	go(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L6
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L7
.L8:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	go(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	go(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	subl	$1, -16(%rbp)
.L7:
	cmpl	$0, -16(%rbp)
	js	.L6
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	go(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	go(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L8
.L6:
	addl	$2, -20(%rbp)
.L5:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L9
	movl	$0, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L10
.L11:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	go(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, -12(%rbp)
	addl	$1, -20(%rbp)
.L10:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L11
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L12
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.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
	leaq	4+go(%rip), %r15
	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
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	testl	%r8d, %r8d
	je	.L15
	leaq	go(%rip), %r14
	movl	$0, %r13d
	jle	.L17
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	addq	$4, %r14
	cmpl	%r13d, %r8d
	jg	.L3
.L17:
	cmpl	$1, %r8d
	jle	.L4
	leal	-2(%r8), %eax
	leaq	4+go(%rip), %rcx
	xorl	%edi, %edi
	shrl	%eax
	leal	1(%rax), %r9d
	addq	%r9, %r9
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$2, %rdi
	addq	$8, %rcx
	cmpq	%r9, %rdi
	je	.L34
.L6:
	movl	(%rcx), %edx
	cmpl	%edx, -4(%rcx)
	je	.L8
	movq	%rcx, %rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L35:
	movl	(%rcx), %edx
	subq	$4, %rax
	cmpl	%edx, -8(%rsi)
	je	.L8
.L9:
	movl	%edx, -4(%rax)
	movq	%rax, %rsi
	cmpq	%r15, %rax
	jne	.L35
	addq	$2, %rdi
	addq	$8, %rcx
	cmpq	%r9, %rdi
	jne	.L6
.L34:
	testl	%r8d, %r8d
	movl	$1, %esi
	cmovg	%r8d, %esi
	cmpl	$3, %r8d
	jle	.L36
	leaq	go(%rip), %rcx
	pxor	%xmm0, %xmm0
	movl	%esi, %edx
	shrl	$2, %edx
	leaq	16(%rcx), %rdi
	movdqa	%xmm0, %xmm2
	movq	%rcx, %rax
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rdi, %rdx
	.p2align 4,,10
	.p2align 3
.L10:
	movdqa	%xmm2, %xmm1
	addq	$16, %rax
	pcmpeqd	-16(%rax), %xmm1
	psubd	%xmm1, %xmm0
	cmpq	%rdx, %rax
	jne	.L10
	movdqa	%xmm0, %xmm1
	movl	%esi, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	andl	$3, %esi
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	je	.L12
	movslq	%eax, %rsi
	cmpl	$1, (%rcx,%rsi,4)
	adcl	$0, %edx
	addl	$1, %eax
	cmpl	%r8d, %eax
	jge	.L12
.L18:
	movslq	%eax, %rsi
	cmpl	$1, (%rcx,%rsi,4)
	adcl	$0, %edx
	addl	$1, %eax
	cmpl	%eax, %r8d
	jle	.L12
	cltq
	cmpl	$1, (%rcx,%rax,4)
	adcl	$0, %edx
.L12:
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L15:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L37
	addq	$24, %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
.L4:
	.cfi_restore_state
	je	.L11
	xorl	%edx, %edx
	jmp	.L12
.L36:
	movl	go(%rip), %eax
	xorl	%edx, %edx
	leaq	go(%rip), %rcx
	testl	%eax, %eax
	movl	$1, %eax
	sete	%dl
	jmp	.L18
.L37:
	call	__stack_chk_fail@PLT
.L11:
	xorl	%edx, %edx
	cmpl	$0, go(%rip)
	sete	%dl
	jmp	.L12
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	go
	.bss
	.align 32
	.type	go, @object
	.size	go, 400000
go:
	.zero	400000
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.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
	leaq	4+go(%rip), %r15
	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
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	testl	%r8d, %r8d
	je	.L15
	leaq	go(%rip), %r14
	movl	$0, %r13d
	jle	.L17
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	addq	$4, %r14
	cmpl	%r13d, %r8d
	jg	.L3
.L17:
	cmpl	$1, %r8d
	jle	.L4
	leal	-2(%r8), %eax
	leaq	4+go(%rip), %rcx
	xorl	%edi, %edi
	shrl	%eax
	leal	1(%rax), %r9d
	addq	%r9, %r9
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$2, %rdi
	addq	$8, %rcx
	cmpq	%r9, %rdi
	je	.L34
.L6:
	movl	(%rcx), %edx
	cmpl	%edx, -4(%rcx)
	je	.L8
	movq	%rcx, %rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L35:
	movl	(%rcx), %edx
	subq	$4, %rax
	cmpl	%edx, -8(%rsi)
	je	.L8
.L9:
	movl	%edx, -4(%rax)
	movq	%rax, %rsi
	cmpq	%r15, %rax
	jne	.L35
	addq	$2, %rdi
	addq	$8, %rcx
	cmpq	%r9, %rdi
	jne	.L6
.L34:
	testl	%r8d, %r8d
	movl	$1, %esi
	cmovg	%r8d, %esi
	cmpl	$3, %r8d
	jle	.L36
	leaq	go(%rip), %rcx
	pxor	%xmm0, %xmm0
	movl	%esi, %edx
	shrl	$2, %edx
	leaq	16(%rcx), %rdi
	movdqa	%xmm0, %xmm2
	movq	%rcx, %rax
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rdi, %rdx
	.p2align 4,,10
	.p2align 3
.L10:
	movdqa	%xmm2, %xmm1
	addq	$16, %rax
	pcmpeqd	-16(%rax), %xmm1
	psubd	%xmm1, %xmm0
	cmpq	%rdx, %rax
	jne	.L10
	movdqa	%xmm0, %xmm1
	movl	%esi, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	andl	$3, %esi
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	je	.L12
	movslq	%eax, %rsi
	cmpl	$1, (%rcx,%rsi,4)
	adcl	$0, %edx
	addl	$1, %eax
	cmpl	%r8d, %eax
	jge	.L12
.L18:
	movslq	%eax, %rsi
	cmpl	$1, (%rcx,%rsi,4)
	adcl	$0, %edx
	addl	$1, %eax
	cmpl	%eax, %r8d
	jle	.L12
	cltq
	cmpl	$1, (%rcx,%rax,4)
	adcl	$0, %edx
.L12:
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L15:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L37
	addq	$24, %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
.L4:
	.cfi_restore_state
	je	.L11
	xorl	%edx, %edx
	jmp	.L12
.L36:
	movl	go(%rip), %eax
	xorl	%edx, %edx
	leaq	go(%rip), %rcx
	testl	%eax, %eax
	movl	$1, %eax
	sete	%dl
	jmp	.L18
.L37:
	call	__stack_chk_fail@PLT
.L11:
	xorl	%edx, %edx
	cmpl	$0, go(%rip)
	sete	%dl
	jmp	.L12
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	go
	.bss
	.align 32
	.type	go, @object
	.size	go, 400000
go:
	.zero	400000
	.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>

int go[100000];

int main(void)
{
	int n;
	
	while (scanf("%d", &n), n != 0){
		int i, j;
		int cnt;
		
		for (i = 0; i < n; i++) scanf("%d", go + i);
		for (i = 1; i < n; i += 2){
			if (go[i - 1] != go[i]){
				for (j = i - 1; j >= 0 && go[j] != go[i]; j--){
					go[j] = go[i];
				}
			}
		}
		for (i = cnt = 0; i < n; i++) cnt += !go[i];
		printf("%d\n", cnt);
	}
	
	return 0;
}
8
1
1
1
1
0
0
0
0
8
1
0
1
1
0
0
0
1
0
 8
1
1
1
1
0
0
0
0
8
1
0
0
1
0
0
0
1
0
 8
1
0
1
1
0
0
0
0
4
1
0
1
1
0
0
0
1
0
 8
1
0
1
1
0
0
0
0
2
1
0
1
1
0
0
-1
1
0
 8
0
0
1
1
0
0
0
0
2
1
0
2
1
0
0
-1
1
0
 8
1
1
1
1
0
0
0
0
8
1
0
1
1
0
0
1
1
0
 8
1
0
1
1
0
0
-1
0
8
1
0
0
1
0
0
0
1
0
 8
1
1
2
1
0
0
0
0
1
0
0
1
1
0
0
0
1
0
 8
0
0
1
1
0
0
0
0
3
1
0
1
1
0
0
-1
1
0
 8
1
1
1
1
1
0
0
0
8
1
0
1
1
0
0
1
1
0

4
2
 4
0
 6
2
 6
2
0
 6
2
2
 4
4
 6
0
 4
1
 6
2
1
 8
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>

int go[100000];

int main(void)
{
	int n;
	
	while (scanf("%d", &n), n != 0){
		int i, j;
		int cnt;
		
		for (i = 0; i < n; i++) scanf("%d", go + i);
		for (i = 1; i < n; i += 2){
			if (go[i - 1] != go[i]){
				for (j = i - 1; j >= 0 && go[j] != go[i]; j--){
					go[j] = go[i];
				}
			}
		}
		for (i = cnt = 0; i < n; i++) cnt += !go[i];
		printf("%d\n", cnt);
	}
	
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	go
	.bss
	.align 32
	.type	go, @object
	.size	go, 400000
go:
	.zero	400000
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L12:
	movl	$0, -20(%rbp)
	jmp	.L3
.L4:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	go(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L3:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L4
	movl	$1, -20(%rbp)
	jmp	.L5
.L9:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	go(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	go(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L6
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L7
.L8:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	go(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	go(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	subl	$1, -16(%rbp)
.L7:
	cmpl	$0, -16(%rbp)
	js	.L6
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	go(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	go(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L8
.L6:
	addl	$2, -20(%rbp)
.L5:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L9
	movl	$0, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L10
.L11:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	go(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, -12(%rbp)
	addl	$1, -20(%rbp)
.L10:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L11
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L12
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	go
	.bss
	.align 32
	.type	go, @object
	.size	go, 400000
go:
	.zero	400000
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L12:
	movl	$0, -20(%rbp)
	jmp	.L3
.L4:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	go(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L3:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L4
	movl	$1, -20(%rbp)
	jmp	.L5
.L9:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	go(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	go(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L6
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L7
.L8:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	go(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	go(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	subl	$1, -16(%rbp)
.L7:
	cmpl	$0, -16(%rbp)
	js	.L6
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	go(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	go(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L8
.L6:
	addl	$2, -20(%rbp)
.L5:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L9
	movl	$0, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L10
.L11:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	go(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, -12(%rbp)
	addl	$1, -20(%rbp)
.L10:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L11
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L12
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
