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 main(){
    int n,m,s[99999],a[100000],ans=0,p=0,i,j;
    scanf("%d%d",&n,&m);
    for (i=0; i<n-1; i++) {
        scanf("%d",&s[i]);
    }
    for (i=0; i<m; i++) {
        scanf("%d",&a[i]);
        if (a[i]>0) {
            for (j=0; j<a[i]; j++) {
                ans+=s[p];
                p++;
                if (ans>100000) {
                    ans%=100000;
                }
            }
        }else{
            for (j=0; j>a[i]; j--) {
                ans+=s[p-1];
                p--;
                if (ans>100000) {
                    ans%=100000;
                }
            }
        }
    }
    printf("%d\n",ans);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.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
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1328, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -800032(%rbp)
	movl	$0, -800028(%rbp)
	leaq	-800036(%rbp), %rdx
	leaq	-800040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800024(%rbp)
	jmp	.L2
.L3:
	leaq	-800016(%rbp), %rdx
	movl	-800024(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800024(%rbp)
.L2:
	movl	-800040(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -800024(%rbp)
	jl	.L3
	movl	$0, -800024(%rbp)
	jmp	.L4
.L13:
	leaq	-400016(%rbp), %rdx
	movl	-800024(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-800024(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L5
	movl	$0, -800020(%rbp)
	jmp	.L6
.L8:
	movl	-800028(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %eax
	addl	%eax, -800032(%rbp)
	addl	$1, -800028(%rbp)
	cmpl	$100000, -800032(%rbp)
	jle	.L7
	movl	-800032(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$351843721, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$13, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$100000, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -800032(%rbp)
.L7:
	addl	$1, -800020(%rbp)
.L6:
	movl	-800024(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, -800020(%rbp)
	jl	.L8
	jmp	.L9
.L5:
	movl	$0, -800020(%rbp)
	jmp	.L10
.L12:
	movl	-800028(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-800016(%rbp,%rax,4), %eax
	addl	%eax, -800032(%rbp)
	subl	$1, -800028(%rbp)
	cmpl	$100000, -800032(%rbp)
	jle	.L11
	movl	-800032(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$351843721, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$13, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$100000, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -800032(%rbp)
.L11:
	subl	$1, -800020(%rbp)
.L10:
	movl	-800024(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, -800020(%rbp)
	jg	.L12
.L9:
	addl	$1, -800024(%rbp)
.L4:
	movl	-800036(%rbp), %eax
	cmpl	%eax, -800024(%rbp)
	jl	.L13
	movl	-800032(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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%d"
.LC1:
	.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	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800112
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	leaq	24(%rsp), %rsi
	movq	%rax, 8(%rsp)
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, 24(%rsp)
	jle	.L2
	leaq	32(%rsp), %r12
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	addq	$4, %r12
	subl	$1, %eax
	cmpl	%ebp, %eax
	jg	.L3
.L2:
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L16
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	leaq	.LC1(%rip), %rbx
	xorl	%r12d, %r12d
	leaq	400032(%rsp), %r13
	leaq	32(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	0(%r13), %esi
	testl	%esi, %esi
	jle	.L25
	movslq	%r15d, %rdi
	leal	-1(%rsi), %eax
	addq	%rdi, %rax
	leaq	0(%rbp,%rdi,4), %rdx
	leaq	36(%rsp,%rax,4), %rdi
	.p2align 4,,10
	.p2align 3
.L9:
	addl	(%rdx), %r12d
	cmpl	$100000, %r12d
	jle	.L8
	movslq	%r12d, %rax
	movl	%r12d, %r8d
	imulq	$351843721, %rax, %rax
	sarl	$31, %r8d
	sarq	$45, %rax
	subl	%r8d, %eax
	imull	$100000, %eax, %eax
	subl	%eax, %r12d
.L8:
	addq	$4, %rdx
	cmpq	%rdi, %rdx
	jne	.L9
	addl	%esi, %r15d
.L7:
	addl	$1, %r14d
	addq	$4, %r13
	cmpl	%r14d, 28(%rsp)
	jg	.L14
.L4:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$800056, %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
.L25:
	.cfi_restore_state
	je	.L7
	movslq	%r15d, %rdi
	movl	%esi, %eax
	salq	$2, %rdi
	notl	%eax
	leaq	0(%rbp,%rdi), %rdx
	salq	$2, %rax
	addq	8(%rsp), %rdi
	subq	%rax, %rdi
	.p2align 4,,10
	.p2align 3
.L11:
	addl	-4(%rdx), %r12d
	cmpl	$100000, %r12d
	jle	.L12
	movslq	%r12d, %rax
	movl	%r12d, %r8d
	imulq	$351843721, %rax, %rax
	sarl	$31, %r8d
	sarq	$45, %rax
	subl	%r8d, %eax
	imull	$100000, %eax, %eax
	subl	%eax, %r12d
.L12:
	subq	$4, %rdx
	cmpq	%rdi, %rdx
	jne	.L11
	addl	%esi, %r15d
	jmp	.L7
.L16:
	xorl	%r12d, %r12d
	jmp	.L4
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.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	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800112
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	leaq	24(%rsp), %rsi
	movq	%rax, 8(%rsp)
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, 24(%rsp)
	jle	.L2
	leaq	32(%rsp), %r12
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	addq	$4, %r12
	subl	$1, %eax
	cmpl	%ebp, %eax
	jg	.L3
.L2:
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L16
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	leaq	.LC1(%rip), %rbx
	xorl	%r12d, %r12d
	leaq	400032(%rsp), %r13
	leaq	32(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	0(%r13), %esi
	testl	%esi, %esi
	jle	.L25
	movslq	%r15d, %rdi
	leal	-1(%rsi), %eax
	addq	%rdi, %rax
	leaq	0(%rbp,%rdi,4), %rdx
	leaq	36(%rsp,%rax,4), %rdi
	.p2align 4,,10
	.p2align 3
.L9:
	addl	(%rdx), %r12d
	cmpl	$100000, %r12d
	jle	.L8
	movslq	%r12d, %rax
	movl	%r12d, %r8d
	imulq	$351843721, %rax, %rax
	sarl	$31, %r8d
	sarq	$45, %rax
	subl	%r8d, %eax
	imull	$100000, %eax, %eax
	subl	%eax, %r12d
.L8:
	addq	$4, %rdx
	cmpq	%rdi, %rdx
	jne	.L9
	addl	%esi, %r15d
.L7:
	addl	$1, %r14d
	addq	$4, %r13
	cmpl	%r14d, 28(%rsp)
	jg	.L14
.L4:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$800056, %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
.L25:
	.cfi_restore_state
	je	.L7
	movslq	%r15d, %rdi
	movl	%esi, %eax
	salq	$2, %rdi
	notl	%eax
	leaq	0(%rbp,%rdi), %rdx
	salq	$2, %rax
	addq	8(%rsp), %rdi
	subq	%rax, %rdi
	.p2align 4,,10
	.p2align 3
.L11:
	addl	-4(%rdx), %r12d
	cmpl	$100000, %r12d
	jle	.L12
	movslq	%r12d, %rax
	movl	%r12d, %r8d
	imulq	$351843721, %rax, %rax
	sarl	$31, %r8d
	sarq	$45, %rax
	subl	%r8d, %eax
	imull	$100000, %eax, %eax
	subl	%eax, %r12d
.L12:
	subq	$4, %rdx
	cmpq	%rdi, %rdx
	jne	.L11
	addl	%esi, %r15d
	jmp	.L7
.L16:
	xorl	%r12d, %r12d
	jmp	.L4
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

#include <stdio.h>
int main(){
    int n,m,s[99999],a[100000],ans=0,p=0,i,j;
    scanf("%d%d",&n,&m);
    for (i=0; i<n-1; i++) {
        scanf("%d",&s[i]);
    }
    for (i=0; i<m; i++) {
        scanf("%d",&a[i]);
        if (a[i]>0) {
            for (j=0; j<a[i]; j++) {
                ans+=s[p];
                p++;
                if (ans>100000) {
                    ans%=100000;
                }
            }
        }else{
            for (j=0; j>a[i]; j--) {
                ans+=s[p-1];
                p--;
                if (ans>100000) {
                    ans%=100000;
                }
            }
        }
    }
    printf("%d\n",ans);
    return 0;
}
7 5
2
1
2
3
2
1
2
-1
3
2
-3
 7 5
2
0
2
3
2
1
2
-1
3
2
-3
 7 5
2
1
1
3
2
1
2
-1
1
2
-3
 7 5
2
1
1
0
2
1
2
-1
1
2
-3
 7 5
2
1
2
3
0
1
2
-1
3
2
-1
 7 5
1
0
2
3
2
1
2
-1
3
1
-3
 7 5
2
0
1
0
2
1
2
-1
1
2
-3
 7 5
4
1
2
3
0
1
2
-1
3
2
0
 7 5
4
1
2
3
0
1
2
-1
0
2
0
 7 5
2
1
1
3
2
1
2
-1
0
2
-3

19
 16
 14
 8
 12
 15
 4
 13
 9
 10

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 main(){
    int n,m,s[99999],a[100000],ans=0,p=0,i,j;
    scanf("%d%d",&n,&m);
    for (i=0; i<n-1; i++) {
        scanf("%d",&s[i]);
    }
    for (i=0; i<m; i++) {
        scanf("%d",&a[i]);
        if (a[i]>0) {
            for (j=0; j<a[i]; j++) {
                ans+=s[p];
                p++;
                if (ans>100000) {
                    ans%=100000;
                }
            }
        }else{
            for (j=0; j>a[i]; j--) {
                ans+=s[p-1];
                p--;
                if (ans>100000) {
                    ans%=100000;
                }
            }
        }
    }
    printf("%d\n",ans);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.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
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1328, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -800032(%rbp)
	movl	$0, -800028(%rbp)
	leaq	-800036(%rbp), %rdx
	leaq	-800040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800024(%rbp)
	jmp	.L2
.L3:
	leaq	-800016(%rbp), %rdx
	movl	-800024(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800024(%rbp)
.L2:
	movl	-800040(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -800024(%rbp)
	jl	.L3
	movl	$0, -800024(%rbp)
	jmp	.L4
.L13:
	leaq	-400016(%rbp), %rdx
	movl	-800024(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-800024(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L5
	movl	$0, -800020(%rbp)
	jmp	.L6
.L8:
	movl	-800028(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %eax
	addl	%eax, -800032(%rbp)
	addl	$1, -800028(%rbp)
	cmpl	$100000, -800032(%rbp)
	jle	.L7
	movl	-800032(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$351843721, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$13, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$100000, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -800032(%rbp)
.L7:
	addl	$1, -800020(%rbp)
.L6:
	movl	-800024(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, -800020(%rbp)
	jl	.L8
	jmp	.L9
.L5:
	movl	$0, -800020(%rbp)
	jmp	.L10
.L12:
	movl	-800028(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-800016(%rbp,%rax,4), %eax
	addl	%eax, -800032(%rbp)
	subl	$1, -800028(%rbp)
	cmpl	$100000, -800032(%rbp)
	jle	.L11
	movl	-800032(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$351843721, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$13, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$100000, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -800032(%rbp)
.L11:
	subl	$1, -800020(%rbp)
.L10:
	movl	-800024(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, -800020(%rbp)
	jg	.L12
.L9:
	addl	$1, -800024(%rbp)
.L4:
	movl	-800036(%rbp), %eax
	cmpl	%eax, -800024(%rbp)
	jl	.L13
	movl	-800032(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.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
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1328, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -800032(%rbp)
	movl	$0, -800028(%rbp)
	leaq	-800036(%rbp), %rdx
	leaq	-800040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800024(%rbp)
	jmp	.L2
.L3:
	leaq	-800016(%rbp), %rdx
	movl	-800024(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800024(%rbp)
.L2:
	movl	-800040(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -800024(%rbp)
	jl	.L3
	movl	$0, -800024(%rbp)
	jmp	.L4
.L13:
	leaq	-400016(%rbp), %rdx
	movl	-800024(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-800024(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L5
	movl	$0, -800020(%rbp)
	jmp	.L6
.L8:
	movl	-800028(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %eax
	addl	%eax, -800032(%rbp)
	addl	$1, -800028(%rbp)
	cmpl	$100000, -800032(%rbp)
	jle	.L7
	movl	-800032(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$351843721, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$13, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$100000, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -800032(%rbp)
.L7:
	addl	$1, -800020(%rbp)
.L6:
	movl	-800024(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, -800020(%rbp)
	jl	.L8
	jmp	.L9
.L5:
	movl	$0, -800020(%rbp)
	jmp	.L10
.L12:
	movl	-800028(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-800016(%rbp,%rax,4), %eax
	addl	%eax, -800032(%rbp)
	subl	$1, -800028(%rbp)
	cmpl	$100000, -800032(%rbp)
	jle	.L11
	movl	-800032(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$351843721, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$13, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$100000, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -800032(%rbp)
.L11:
	subl	$1, -800020(%rbp)
.L10:
	movl	-800024(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, -800020(%rbp)
	jg	.L12
.L9:
	addl	$1, -800024(%rbp)
.L4:
	movl	-800036(%rbp), %eax
	cmpl	%eax, -800024(%rbp)
	jl	.L13
	movl	-800032(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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:
