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

```c
a['~~'],j,n;main(i){for(;++i<98;)for(j=i;j<1e4;a[j+=i]=a[1]=1);for(;~scanf("%d",&n);printf("%d\n",j))for(i=j=n++;i;--i)j-=a[i]|a[n-i];}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leal	1(%rdi), %ecx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	cmpl	$97, %ecx
	jg	.L2
	movslq	%ecx, %rsi
	leaq	a(%rip), %rax
	leaq	(%rax,%rsi,8), %rdi
	salq	$2, %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rdi, %rdx
	movl	%ecx, %eax
	.p2align 4,,10
	.p2align 3
.L3:
	addl	%ecx, %eax
	movl	$1, (%rdx)
	addq	%rsi, %rdx
	cmpl	$9999, %eax
	jle	.L3
	addl	$1, %ecx
	addq	$8, %rdi
	addq	$4, %rsi
	cmpl	$98, %ecx
	jne	.L4
	movl	$1, 4+a(%rip)
	movl	%eax, j(%rip)
.L2:
	leaq	n(%rip), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	a(%rip), %r13
	leaq	.LC0(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L25
	movl	n(%rip), %edx
	leal	1(%rdx), %edi
	movl	%edx, j(%rip)
	movl	%edi, n(%rip)
	testl	%edx, %edx
	je	.L11
	leal	-1(%rdx), %eax
	movl	%edx, %r10d
	cmpl	$2, %eax
	jbe	.L12
	movslq	%edx, %rax
	movl	%edx, %r8d
	leaq	4+a(%rip), %rcx
	shrl	$2, %r8d
	leaq	-12(%r13,%rax,4), %rsi
	pxor	%xmm1, %xmm1
	leal	-1(%r8), %r9d
	leaq	-16(%rsi), %rax
	salq	$4, %r9
	movq	%rax, %r8
	subq	%r9, %r8
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L26:
	subq	$16, %rax
.L8:
	movdqu	(%rsi), %xmm0
	movdqu	(%rcx), %xmm2
	movq	%rax, %rsi
	addq	$16, %rcx
	pshufd	$27, %xmm0, %xmm0
	por	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %r8
	jne	.L26
	movdqa	%xmm1, %xmm0
	movl	%edx, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %esi
	addl	%edx, %esi
	subl	%eax, %edx
	cmpl	%eax, %r10d
	je	.L9
	leal	-1(%rdx), %eax
.L7:
	movl	%edi, %ecx
	movslq	%edx, %r8
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	0(%r13,%rcx,4), %ecx
	orl	0(%r13,%r8,4), %ecx
	subl	%ecx, %esi
	testl	%eax, %eax
	je	.L9
	movl	%edi, %ecx
	subl	%eax, %ecx
	cltq
	movslq	%ecx, %rcx
	movl	0(%r13,%rcx,4), %ecx
	orl	0(%r13,%rax,4), %ecx
	subl	%ecx, %esi
	subl	$2, %edx
	je	.L9
	subl	%edx, %edi
	movslq	%edx, %rdx
	movslq	%edi, %rdi
	movl	0(%r13,%rdi,4), %eax
	orl	0(%r13,%rdx,4), %eax
	subl	%eax, %esi
.L9:
	movl	%esi, j(%rip)
.L6:
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L25:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	xorl	%esi, %esi
	jmp	.L6
.L12:
	movl	%edx, %esi
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 129528
a:
	.zero	129528
	.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	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leal	1(%rdi), %ecx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	cmpl	$97, %ecx
	jg	.L2
	movslq	%ecx, %rsi
	leaq	a(%rip), %rax
	leaq	(%rax,%rsi,8), %rdi
	salq	$2, %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rdi, %rdx
	movl	%ecx, %eax
	.p2align 4,,10
	.p2align 3
.L3:
	addl	%ecx, %eax
	movl	$1, (%rdx)
	addq	%rsi, %rdx
	cmpl	$9999, %eax
	jle	.L3
	addl	$1, %ecx
	addq	$8, %rdi
	addq	$4, %rsi
	cmpl	$98, %ecx
	jne	.L4
	movl	$1, 4+a(%rip)
	movl	%eax, j(%rip)
.L2:
	leaq	n(%rip), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	a(%rip), %r13
	leaq	.LC0(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L25
	movl	n(%rip), %edx
	leal	1(%rdx), %edi
	movl	%edx, j(%rip)
	movl	%edi, n(%rip)
	testl	%edx, %edx
	je	.L11
	leal	-1(%rdx), %eax
	movl	%edx, %r10d
	cmpl	$2, %eax
	jbe	.L12
	movslq	%edx, %rax
	movl	%edx, %r8d
	leaq	4+a(%rip), %rcx
	shrl	$2, %r8d
	leaq	-12(%r13,%rax,4), %rsi
	pxor	%xmm1, %xmm1
	leal	-1(%r8), %r9d
	leaq	-16(%rsi), %rax
	salq	$4, %r9
	movq	%rax, %r8
	subq	%r9, %r8
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L26:
	subq	$16, %rax
.L8:
	movdqu	(%rsi), %xmm0
	movdqu	(%rcx), %xmm2
	movq	%rax, %rsi
	addq	$16, %rcx
	pshufd	$27, %xmm0, %xmm0
	por	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %r8
	jne	.L26
	movdqa	%xmm1, %xmm0
	movl	%edx, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %esi
	addl	%edx, %esi
	subl	%eax, %edx
	cmpl	%eax, %r10d
	je	.L9
	leal	-1(%rdx), %eax
.L7:
	movl	%edi, %ecx
	movslq	%edx, %r8
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	0(%r13,%rcx,4), %ecx
	orl	0(%r13,%r8,4), %ecx
	subl	%ecx, %esi
	testl	%eax, %eax
	je	.L9
	movl	%edi, %ecx
	subl	%eax, %ecx
	cltq
	movslq	%ecx, %rcx
	movl	0(%r13,%rcx,4), %ecx
	orl	0(%r13,%rax,4), %ecx
	subl	%ecx, %esi
	subl	$2, %edx
	je	.L9
	subl	%edx, %edi
	movslq	%edx, %rdx
	movslq	%edi, %rdi
	movl	0(%r13,%rdi,4), %eax
	orl	0(%r13,%rdx,4), %eax
	subl	%eax, %esi
.L9:
	movl	%esi, j(%rip)
.L6:
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L25:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	xorl	%esi, %esi
	jmp	.L6
.L12:
	movl	%edx, %esi
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 129528
a:
	.zero	129528
	.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	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leal	1(%rdi), %ecx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	cmpl	$97, %ecx
	jg	.L2
	movslq	%ecx, %rsi
	leaq	a(%rip), %rax
	leaq	(%rax,%rsi,8), %rdi
	salq	$2, %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rdi, %rdx
	movl	%ecx, %eax
	.p2align 4,,10
	.p2align 3
.L3:
	addl	%ecx, %eax
	movl	$1, (%rdx)
	addq	%rsi, %rdx
	cmpl	$9999, %eax
	jle	.L3
	addl	$1, %ecx
	addq	$8, %rdi
	addq	$4, %rsi
	cmpl	$98, %ecx
	jne	.L4
	movl	$1, 4+a(%rip)
	movl	%eax, j(%rip)
.L2:
	leaq	n(%rip), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	a(%rip), %r13
	leaq	.LC0(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L25
	movl	n(%rip), %edx
	leal	1(%rdx), %edi
	movl	%edx, j(%rip)
	movl	%edi, n(%rip)
	testl	%edx, %edx
	je	.L11
	leal	-1(%rdx), %eax
	movl	%edx, %r10d
	cmpl	$2, %eax
	jbe	.L12
	movslq	%edx, %rax
	movl	%edx, %r8d
	leaq	4+a(%rip), %rcx
	shrl	$2, %r8d
	leaq	-12(%r13,%rax,4), %rsi
	pxor	%xmm1, %xmm1
	leal	-1(%r8), %r9d
	leaq	-16(%rsi), %rax
	salq	$4, %r9
	movq	%rax, %r8
	subq	%r9, %r8
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L26:
	subq	$16, %rax
.L8:
	movdqu	(%rsi), %xmm0
	movdqu	(%rcx), %xmm2
	movq	%rax, %rsi
	addq	$16, %rcx
	pshufd	$27, %xmm0, %xmm0
	por	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %r8
	jne	.L26
	movdqa	%xmm1, %xmm0
	movl	%edx, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %esi
	addl	%edx, %esi
	subl	%eax, %edx
	cmpl	%eax, %r10d
	je	.L9
	leal	-1(%rdx), %eax
.L7:
	movl	%edi, %ecx
	movslq	%edx, %r8
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	0(%r13,%rcx,4), %ecx
	orl	0(%r13,%r8,4), %ecx
	subl	%ecx, %esi
	testl	%eax, %eax
	je	.L9
	movl	%edi, %ecx
	subl	%eax, %ecx
	cltq
	movslq	%ecx, %rcx
	movl	0(%r13,%rcx,4), %ecx
	orl	0(%r13,%rax,4), %ecx
	subl	%ecx, %esi
	subl	$2, %edx
	je	.L9
	subl	%edx, %edi
	movslq	%edx, %rdx
	movslq	%edi, %rdi
	movl	0(%r13,%rdi,4), %eax
	orl	0(%r13,%rdx,4), %eax
	subl	%eax, %esi
.L9:
	movl	%esi, j(%rip)
.L6:
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L25:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	xorl	%esi, %esi
	jmp	.L6
.L12:
	movl	%edx, %esi
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 129528
a:
	.zero	129528
	.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
a['~~'],j,n;main(i){for(;++i<98;)for(j=i;j<1e4;a[j+=i]=a[1]=1);for(;~scanf("%d",&n);printf("%d\n",j))for(i=j=n++;i;--i)j-=a[i]|a[n-i];}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
a['~~'],j,n;main(i){for(;++i<98;)for(j=i;j<1e4;a[j+=i]=a[1]=1);for(;~scanf("%d",&n);printf("%d\n",j))for(i=j=n++;i;--i)j-=a[i]|a[n-i];}```

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:

1
8
7
51
 1
10
7
51
 1
10
7
65
 1
12
7
115
 1
12
9
115
 1
12
9
15
 1
26
9
15
 1
26
11
15
 1
26
11
20
 1
27
11
20

0
2
2
6
 0
0
2
6
 0
0
2
12
 0
2
2
12
 0
2
3
12
 0
2
3
4
 0
0
3
4
 0
0
2
4
 0
0
2
2
 0
4
2
2

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

```c
a['~~'],j,n;main(i){for(;++i<98;)for(j=i;j<1e4;a[j+=i]=a[1]=1);for(;~scanf("%d",&n);printf("%d\n",j))for(i=j=n++;i;--i)j-=a[i]|a[n-i];}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leal	1(%rdi), %ecx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	cmpl	$97, %ecx
	jg	.L2
	movslq	%ecx, %rsi
	leaq	a(%rip), %rax
	leaq	(%rax,%rsi,8), %rdi
	salq	$2, %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rdi, %rdx
	movl	%ecx, %eax
	.p2align 4,,10
	.p2align 3
.L3:
	addl	%ecx, %eax
	movl	$1, (%rdx)
	addq	%rsi, %rdx
	cmpl	$9999, %eax
	jle	.L3
	addl	$1, %ecx
	addq	$8, %rdi
	addq	$4, %rsi
	cmpl	$98, %ecx
	jne	.L4
	movl	$1, 4+a(%rip)
	movl	%eax, j(%rip)
.L2:
	leaq	n(%rip), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	a(%rip), %r13
	leaq	.LC0(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L25
	movl	n(%rip), %edx
	leal	1(%rdx), %edi
	movl	%edx, j(%rip)
	movl	%edi, n(%rip)
	testl	%edx, %edx
	je	.L11
	leal	-1(%rdx), %eax
	movl	%edx, %r10d
	cmpl	$2, %eax
	jbe	.L12
	movslq	%edx, %rax
	movl	%edx, %r8d
	leaq	4+a(%rip), %rcx
	shrl	$2, %r8d
	leaq	-12(%r13,%rax,4), %rsi
	pxor	%xmm1, %xmm1
	leal	-1(%r8), %r9d
	leaq	-16(%rsi), %rax
	salq	$4, %r9
	movq	%rax, %r8
	subq	%r9, %r8
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L26:
	subq	$16, %rax
.L8:
	movdqu	(%rsi), %xmm0
	movdqu	(%rcx), %xmm2
	movq	%rax, %rsi
	addq	$16, %rcx
	pshufd	$27, %xmm0, %xmm0
	por	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %r8
	jne	.L26
	movdqa	%xmm1, %xmm0
	movl	%edx, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %esi
	addl	%edx, %esi
	subl	%eax, %edx
	cmpl	%eax, %r10d
	je	.L9
	leal	-1(%rdx), %eax
.L7:
	movl	%edi, %ecx
	movslq	%edx, %r8
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	0(%r13,%rcx,4), %ecx
	orl	0(%r13,%r8,4), %ecx
	subl	%ecx, %esi
	testl	%eax, %eax
	je	.L9
	movl	%edi, %ecx
	subl	%eax, %ecx
	cltq
	movslq	%ecx, %rcx
	movl	0(%r13,%rcx,4), %ecx
	orl	0(%r13,%rax,4), %ecx
	subl	%ecx, %esi
	subl	$2, %edx
	je	.L9
	subl	%edx, %edi
	movslq	%edx, %rdx
	movslq	%edi, %rdi
	movl	0(%r13,%rdi,4), %eax
	orl	0(%r13,%rdx,4), %eax
	subl	%eax, %esi
.L9:
	movl	%esi, j(%rip)
.L6:
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L25:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	xorl	%esi, %esi
	jmp	.L6
.L12:
	movl	%edx, %esi
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 129528
a:
	.zero	129528
	.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	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leal	1(%rdi), %ecx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	cmpl	$97, %ecx
	jg	.L2
	movslq	%ecx, %rsi
	leaq	a(%rip), %rax
	leaq	(%rax,%rsi,8), %rdi
	salq	$2, %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rdi, %rdx
	movl	%ecx, %eax
	.p2align 4,,10
	.p2align 3
.L3:
	addl	%ecx, %eax
	movl	$1, (%rdx)
	addq	%rsi, %rdx
	cmpl	$9999, %eax
	jle	.L3
	addl	$1, %ecx
	addq	$8, %rdi
	addq	$4, %rsi
	cmpl	$98, %ecx
	jne	.L4
	movl	$1, 4+a(%rip)
	movl	%eax, j(%rip)
.L2:
	leaq	n(%rip), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	a(%rip), %r13
	leaq	.LC0(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L25
	movl	n(%rip), %edx
	leal	1(%rdx), %edi
	movl	%edx, j(%rip)
	movl	%edi, n(%rip)
	testl	%edx, %edx
	je	.L11
	leal	-1(%rdx), %eax
	movl	%edx, %r10d
	cmpl	$2, %eax
	jbe	.L12
	movslq	%edx, %rax
	movl	%edx, %r8d
	leaq	4+a(%rip), %rcx
	shrl	$2, %r8d
	leaq	-12(%r13,%rax,4), %rsi
	pxor	%xmm1, %xmm1
	leal	-1(%r8), %r9d
	leaq	-16(%rsi), %rax
	salq	$4, %r9
	movq	%rax, %r8
	subq	%r9, %r8
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L26:
	subq	$16, %rax
.L8:
	movdqu	(%rsi), %xmm0
	movdqu	(%rcx), %xmm2
	movq	%rax, %rsi
	addq	$16, %rcx
	pshufd	$27, %xmm0, %xmm0
	por	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %r8
	jne	.L26
	movdqa	%xmm1, %xmm0
	movl	%edx, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %esi
	addl	%edx, %esi
	subl	%eax, %edx
	cmpl	%eax, %r10d
	je	.L9
	leal	-1(%rdx), %eax
.L7:
	movl	%edi, %ecx
	movslq	%edx, %r8
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	0(%r13,%rcx,4), %ecx
	orl	0(%r13,%r8,4), %ecx
	subl	%ecx, %esi
	testl	%eax, %eax
	je	.L9
	movl	%edi, %ecx
	subl	%eax, %ecx
	cltq
	movslq	%ecx, %rcx
	movl	0(%r13,%rcx,4), %ecx
	orl	0(%r13,%rax,4), %ecx
	subl	%ecx, %esi
	subl	$2, %edx
	je	.L9
	subl	%edx, %edi
	movslq	%edx, %rdx
	movslq	%edi, %rdi
	movl	0(%r13,%rdi,4), %eax
	orl	0(%r13,%rdx,4), %eax
	subl	%eax, %esi
.L9:
	movl	%esi, j(%rip)
.L6:
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L25:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	xorl	%esi, %esi
	jmp	.L6
.L12:
	movl	%edx, %esi
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 129528
a:
	.zero	129528
	.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:
```