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

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

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	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	%ecx, 12(%rsp)
	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	$98, 12(%rsp)
	movl	%eax, j(%rip)
.L2:
	leaq	12(%rsp), %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	.L21
	movl	12(%rsp), %esi
	movl	s(%rip), %r8d
	leal	-1(%rsi), %edi
	movl	%edi, j(%rip)
	cmpl	$1, %edi
	jle	.L6
	leal	-3(%rsi), %eax
	leal	-2(%rsi), %r10d
	cmpl	$2, %eax
	jbe	.L7
	movslq	%esi, %rax
	movl	%r10d, %r9d
	leaq	8+a(%rip), %rdx
	shrl	$2, %r9d
	leaq	-16(%r13,%rax,4), %rcx
	pxor	%xmm1, %xmm1
	leal	-1(%r9), %r11d
	leaq	-16(%rcx), %rax
	salq	$4, %r11
	movq	%rax, %r9
	subq	%r11, %r9
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	subq	$16, %rax
.L8:
	movdqu	(%rcx), %xmm0
	movdqu	(%rdx), %xmm2
	pxor	%xmm3, %xmm3
	movq	%rax, %rcx
	addq	$16, %rdx
	pshufd	$27, %xmm0, %xmm0
	por	%xmm2, %xmm0
	pcmpeqd	%xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%r9, %rax
	jne	.L22
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	addl	%eax, %r8d
	movl	%r10d, %eax
	andl	$-4, %eax
	subl	%eax, %edi
	cmpl	%eax, %r10d
	je	.L9
.L7:
	movl	%esi, %eax
	movslq	%edi, %rdx
	subl	%edi, %eax
	addl	$1, %eax
	cltq
	movl	0(%r13,%rax,4), %eax
	orl	0(%r13,%rdx,4), %eax
	cmpl	$1, %eax
	leal	-1(%rdi), %eax
	adcl	$0, %r8d
	cmpl	$1, %eax
	jle	.L9
	movl	%esi, %edx
	subl	%eax, %edx
	cltq
	addl	$1, %edx
	movslq	%edx, %rdx
	movl	0(%r13,%rdx,4), %edx
	orl	0(%r13,%rax,4), %edx
	cmpl	$1, %edx
	leal	-2(%rdi), %edx
	adcl	$0, %r8d
	cmpl	$3, %edi
	je	.L9
	subl	%edx, %esi
	movslq	%edx, %rdx
	leal	1(%rsi), %eax
	cltq
	movl	0(%r13,%rax,4), %eax
	orl	0(%r13,%rdx,4), %eax
	cmpl	$1, %eax
	adcl	$0, %r8d
.L9:
	movl	%r8d, s(%rip)
	movl	$1, j(%rip)
.L6:
	xorl	%eax, %eax
	movl	%r8d, %esi
	movq	%r12, %rdi
	call	printf@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	%eax, s(%rip)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	addq	$24, %rsp
	.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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	s
	.bss
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.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	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	%ecx, 12(%rsp)
	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	$98, 12(%rsp)
	movl	%eax, j(%rip)
.L2:
	leaq	12(%rsp), %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	.L21
	movl	12(%rsp), %esi
	movl	s(%rip), %r8d
	leal	-1(%rsi), %edi
	movl	%edi, j(%rip)
	cmpl	$1, %edi
	jle	.L6
	leal	-3(%rsi), %eax
	leal	-2(%rsi), %r10d
	cmpl	$2, %eax
	jbe	.L7
	movslq	%esi, %rax
	movl	%r10d, %r9d
	leaq	8+a(%rip), %rdx
	shrl	$2, %r9d
	leaq	-16(%r13,%rax,4), %rcx
	pxor	%xmm1, %xmm1
	leal	-1(%r9), %r11d
	leaq	-16(%rcx), %rax
	salq	$4, %r11
	movq	%rax, %r9
	subq	%r11, %r9
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	subq	$16, %rax
.L8:
	movdqu	(%rcx), %xmm0
	movdqu	(%rdx), %xmm2
	pxor	%xmm3, %xmm3
	movq	%rax, %rcx
	addq	$16, %rdx
	pshufd	$27, %xmm0, %xmm0
	por	%xmm2, %xmm0
	pcmpeqd	%xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%r9, %rax
	jne	.L22
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	addl	%eax, %r8d
	movl	%r10d, %eax
	andl	$-4, %eax
	subl	%eax, %edi
	cmpl	%eax, %r10d
	je	.L9
.L7:
	movl	%esi, %eax
	movslq	%edi, %rdx
	subl	%edi, %eax
	addl	$1, %eax
	cltq
	movl	0(%r13,%rax,4), %eax
	orl	0(%r13,%rdx,4), %eax
	cmpl	$1, %eax
	leal	-1(%rdi), %eax
	adcl	$0, %r8d
	cmpl	$1, %eax
	jle	.L9
	movl	%esi, %edx
	subl	%eax, %edx
	cltq
	addl	$1, %edx
	movslq	%edx, %rdx
	movl	0(%r13,%rdx,4), %edx
	orl	0(%r13,%rax,4), %edx
	cmpl	$1, %edx
	leal	-2(%rdi), %edx
	adcl	$0, %r8d
	cmpl	$3, %edi
	je	.L9
	subl	%edx, %esi
	movslq	%edx, %rdx
	leal	1(%rsi), %eax
	cltq
	movl	0(%r13,%rax,4), %eax
	orl	0(%r13,%rdx,4), %eax
	cmpl	$1, %eax
	adcl	$0, %r8d
.L9:
	movl	%r8d, s(%rip)
	movl	$1, j(%rip)
.L6:
	xorl	%eax, %eax
	movl	%r8d, %esi
	movq	%r12, %rdi
	call	printf@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	%eax, s(%rip)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	addq	$24, %rsp
	.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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	s
	.bss
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.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	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	%ecx, 12(%rsp)
	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	$98, 12(%rsp)
	movl	%eax, j(%rip)
.L2:
	leaq	12(%rsp), %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	.L21
	movl	12(%rsp), %esi
	movl	s(%rip), %r8d
	leal	-1(%rsi), %edi
	movl	%edi, j(%rip)
	cmpl	$1, %edi
	jle	.L6
	leal	-3(%rsi), %eax
	leal	-2(%rsi), %r10d
	cmpl	$2, %eax
	jbe	.L7
	movslq	%esi, %rax
	movl	%r10d, %r9d
	leaq	8+a(%rip), %rdx
	shrl	$2, %r9d
	leaq	-16(%r13,%rax,4), %rcx
	pxor	%xmm1, %xmm1
	leal	-1(%r9), %r11d
	leaq	-16(%rcx), %rax
	salq	$4, %r11
	movq	%rax, %r9
	subq	%r11, %r9
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	subq	$16, %rax
.L8:
	movdqu	(%rcx), %xmm0
	movdqu	(%rdx), %xmm2
	pxor	%xmm3, %xmm3
	movq	%rax, %rcx
	addq	$16, %rdx
	pshufd	$27, %xmm0, %xmm0
	por	%xmm2, %xmm0
	pcmpeqd	%xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%r9, %rax
	jne	.L22
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	addl	%eax, %r8d
	movl	%r10d, %eax
	andl	$-4, %eax
	subl	%eax, %edi
	cmpl	%eax, %r10d
	je	.L9
.L7:
	movl	%esi, %eax
	movslq	%edi, %rdx
	subl	%edi, %eax
	addl	$1, %eax
	cltq
	movl	0(%r13,%rax,4), %eax
	orl	0(%r13,%rdx,4), %eax
	cmpl	$1, %eax
	leal	-1(%rdi), %eax
	adcl	$0, %r8d
	cmpl	$1, %eax
	jle	.L9
	movl	%esi, %edx
	subl	%eax, %edx
	cltq
	addl	$1, %edx
	movslq	%edx, %rdx
	movl	0(%r13,%rdx,4), %edx
	orl	0(%r13,%rax,4), %edx
	cmpl	$1, %edx
	leal	-2(%rdi), %edx
	adcl	$0, %r8d
	cmpl	$3, %edi
	je	.L9
	subl	%edx, %esi
	movslq	%edx, %rdx
	leal	1(%rsi), %eax
	cltq
	movl	0(%r13,%rax,4), %eax
	orl	0(%r13,%rdx,4), %eax
	cmpl	$1, %eax
	adcl	$0, %r8d
.L9:
	movl	%r8d, s(%rip)
	movl	$1, j(%rip)
.L6:
	xorl	%eax, %eax
	movl	%r8d, %esi
	movq	%r12, %rdi
	call	printf@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	%eax, s(%rip)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	addq	$24, %rsp
	.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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	s
	.bss
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.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,s;main(i){for(;++i<98;)for(j=i;j<1e4;a[j+=i]=1);for(;~scanf("%d",&i);s=!printf("%d\n",s))for(j=i;--j>1;)s+=!a[j]&!a[i-j+1];}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

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

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,s;main(i){for(;++i<98;)for(j=i;j<1e4;a[j+=i]=1);for(;~scanf("%d",&i);s=!printf("%d\n",s))for(j=i;--j>1;)s+=!a[j]&!a[i-j+1];}```

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	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	%ecx, 12(%rsp)
	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	$98, 12(%rsp)
	movl	%eax, j(%rip)
.L2:
	leaq	12(%rsp), %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	.L21
	movl	12(%rsp), %esi
	movl	s(%rip), %r8d
	leal	-1(%rsi), %edi
	movl	%edi, j(%rip)
	cmpl	$1, %edi
	jle	.L6
	leal	-3(%rsi), %eax
	leal	-2(%rsi), %r10d
	cmpl	$2, %eax
	jbe	.L7
	movslq	%esi, %rax
	movl	%r10d, %r9d
	leaq	8+a(%rip), %rdx
	shrl	$2, %r9d
	leaq	-16(%r13,%rax,4), %rcx
	pxor	%xmm1, %xmm1
	leal	-1(%r9), %r11d
	leaq	-16(%rcx), %rax
	salq	$4, %r11
	movq	%rax, %r9
	subq	%r11, %r9
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	subq	$16, %rax
.L8:
	movdqu	(%rcx), %xmm0
	movdqu	(%rdx), %xmm2
	pxor	%xmm3, %xmm3
	movq	%rax, %rcx
	addq	$16, %rdx
	pshufd	$27, %xmm0, %xmm0
	por	%xmm2, %xmm0
	pcmpeqd	%xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%r9, %rax
	jne	.L22
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	addl	%eax, %r8d
	movl	%r10d, %eax
	andl	$-4, %eax
	subl	%eax, %edi
	cmpl	%eax, %r10d
	je	.L9
.L7:
	movl	%esi, %eax
	movslq	%edi, %rdx
	subl	%edi, %eax
	addl	$1, %eax
	cltq
	movl	0(%r13,%rax,4), %eax
	orl	0(%r13,%rdx,4), %eax
	cmpl	$1, %eax
	leal	-1(%rdi), %eax
	adcl	$0, %r8d
	cmpl	$1, %eax
	jle	.L9
	movl	%esi, %edx
	subl	%eax, %edx
	cltq
	addl	$1, %edx
	movslq	%edx, %rdx
	movl	0(%r13,%rdx,4), %edx
	orl	0(%r13,%rax,4), %edx
	cmpl	$1, %edx
	leal	-2(%rdi), %edx
	adcl	$0, %r8d
	cmpl	$3, %edi
	je	.L9
	subl	%edx, %esi
	movslq	%edx, %rdx
	leal	1(%rsi), %eax
	cltq
	movl	0(%r13,%rax,4), %eax
	orl	0(%r13,%rdx,4), %eax
	cmpl	$1, %eax
	adcl	$0, %r8d
.L9:
	movl	%r8d, s(%rip)
	movl	$1, j(%rip)
.L6:
	xorl	%eax, %eax
	movl	%r8d, %esi
	movq	%r12, %rdi
	call	printf@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	%eax, s(%rip)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	addq	$24, %rsp
	.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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	s
	.bss
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.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	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	%ecx, 12(%rsp)
	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	$98, 12(%rsp)
	movl	%eax, j(%rip)
.L2:
	leaq	12(%rsp), %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	.L21
	movl	12(%rsp), %esi
	movl	s(%rip), %r8d
	leal	-1(%rsi), %edi
	movl	%edi, j(%rip)
	cmpl	$1, %edi
	jle	.L6
	leal	-3(%rsi), %eax
	leal	-2(%rsi), %r10d
	cmpl	$2, %eax
	jbe	.L7
	movslq	%esi, %rax
	movl	%r10d, %r9d
	leaq	8+a(%rip), %rdx
	shrl	$2, %r9d
	leaq	-16(%r13,%rax,4), %rcx
	pxor	%xmm1, %xmm1
	leal	-1(%r9), %r11d
	leaq	-16(%rcx), %rax
	salq	$4, %r11
	movq	%rax, %r9
	subq	%r11, %r9
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	subq	$16, %rax
.L8:
	movdqu	(%rcx), %xmm0
	movdqu	(%rdx), %xmm2
	pxor	%xmm3, %xmm3
	movq	%rax, %rcx
	addq	$16, %rdx
	pshufd	$27, %xmm0, %xmm0
	por	%xmm2, %xmm0
	pcmpeqd	%xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%r9, %rax
	jne	.L22
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	addl	%eax, %r8d
	movl	%r10d, %eax
	andl	$-4, %eax
	subl	%eax, %edi
	cmpl	%eax, %r10d
	je	.L9
.L7:
	movl	%esi, %eax
	movslq	%edi, %rdx
	subl	%edi, %eax
	addl	$1, %eax
	cltq
	movl	0(%r13,%rax,4), %eax
	orl	0(%r13,%rdx,4), %eax
	cmpl	$1, %eax
	leal	-1(%rdi), %eax
	adcl	$0, %r8d
	cmpl	$1, %eax
	jle	.L9
	movl	%esi, %edx
	subl	%eax, %edx
	cltq
	addl	$1, %edx
	movslq	%edx, %rdx
	movl	0(%r13,%rdx,4), %edx
	orl	0(%r13,%rax,4), %edx
	cmpl	$1, %edx
	leal	-2(%rdi), %edx
	adcl	$0, %r8d
	cmpl	$3, %edi
	je	.L9
	subl	%edx, %esi
	movslq	%edx, %rdx
	leal	1(%rsi), %eax
	cltq
	movl	0(%r13,%rax,4), %eax
	orl	0(%r13,%rdx,4), %eax
	cmpl	$1, %eax
	adcl	$0, %r8d
.L9:
	movl	%r8d, s(%rip)
	movl	$1, j(%rip)
.L6:
	xorl	%eax, %eax
	movl	%r8d, %esi
	movq	%r12, %rdi
	call	printf@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	%eax, s(%rip)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	addq	$24, %rsp
	.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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	s
	.bss
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.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:
```