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>
#include <stdlib.h>
int main(void) {
    long long num,day,move,town=1,temp,road[100000]={0},sum=0,i,j;
    scanf("%lld %lld",&num,&day);
    sum=0;
    for (i=0; i<num-1; i++) {
        scanf("%lld",&temp);
        road[i+1]=road[i]+temp;
    }
    for (i=0; i<day; i++) {
        scanf("%lld",&move);
        if (move>0) {
            sum+=road[town+move-1]-road[town-1];
        } else {
            sum+=road[town-1]-road[town+move-1];
        }
        sum%=100000;
        town+=move;
    }
    printf("%lld\n",sum);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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
	xorl	%esi, %esi
	movl	$800000, %edx
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r13
	leaq	24(%rsp), %rbx
	movq	%r13, %rdi
	call	memset@PLT
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpq	$1, (%rsp)
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	0(%r13,%r12,8), %rax
	addq	$1, %r12
	addq	24(%rsp), %rax
	movq	%rax, 0(%r13,%r12,8)
	movq	(%rsp), %rax
	subq	$1, %rax
	cmpq	%rax, %r12
	jl	.L2
.L5:
	xorl	%r12d, %r12d
	cmpq	$0, 8(%rsp)
	jle	.L4
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	movl	$1, %ebx
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %rbp
	leaq	16(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rax
	movq	%r13, %rdx
	movq	%r12, %rcx
	addq	%rax, %rbx
	leaq	-1(%rbx), %r13
	testq	%rax, %rax
	jle	.L6
	movabsq	$3022314549036572937, %rax
	addq	24(%rsp,%rbx,8), %rcx
	subq	32(%rsp,%rdx,8), %rcx
	addq	$1, %r15
	imulq	%rcx
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$14, %rdx
	subq	%rax, %rdx
	imulq	$100000, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %r12
	cmpq	8(%rsp), %r15
	jl	.L3
.L4:
	xorl	%eax, %eax
	movq	%r12, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	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
.L6:
	.cfi_restore_state
	addq	32(%rsp,%rdx,8), %rcx
	subq	24(%rsp,%rbx,8), %rcx
	addq	$1, %r15
	movabsq	$3022314549036572937, %rax
	imulq	%rcx
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$14, %rdx
	subq	%rax, %rdx
	imulq	$100000, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %r12
	cmpq	%r15, 8(%rsp)
	jg	.L3
	jmp	.L4
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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
	xorl	%esi, %esi
	movl	$800000, %edx
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r13
	leaq	24(%rsp), %rbx
	movq	%r13, %rdi
	call	memset@PLT
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpq	$1, (%rsp)
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	0(%r13,%r12,8), %rax
	addq	$1, %r12
	addq	24(%rsp), %rax
	movq	%rax, 0(%r13,%r12,8)
	movq	(%rsp), %rax
	subq	$1, %rax
	cmpq	%rax, %r12
	jl	.L2
.L5:
	xorl	%r12d, %r12d
	cmpq	$0, 8(%rsp)
	jle	.L4
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	movl	$1, %ebx
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %rbp
	leaq	16(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rax
	movq	%r13, %rdx
	movq	%r12, %rcx
	addq	%rax, %rbx
	leaq	-1(%rbx), %r13
	testq	%rax, %rax
	jle	.L6
	movabsq	$3022314549036572937, %rax
	addq	24(%rsp,%rbx,8), %rcx
	subq	32(%rsp,%rdx,8), %rcx
	addq	$1, %r15
	imulq	%rcx
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$14, %rdx
	subq	%rax, %rdx
	imulq	$100000, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %r12
	cmpq	8(%rsp), %r15
	jl	.L3
.L4:
	xorl	%eax, %eax
	movq	%r12, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	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
.L6:
	.cfi_restore_state
	addq	32(%rsp,%rdx,8), %rcx
	subq	24(%rsp,%rbx,8), %rcx
	addq	$1, %r15
	movabsq	$3022314549036572937, %rax
	imulq	%rcx
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$14, %rdx
	subq	%rax, %rdx
	imulq	$100000, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %r12
	cmpq	%r15, 8(%rsp)
	jg	.L3
	jmp	.L4
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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
	xorl	%esi, %esi
	movl	$800000, %edx
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r13
	leaq	24(%rsp), %rbx
	movq	%r13, %rdi
	call	memset@PLT
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpq	$1, (%rsp)
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	0(%r13,%r12,8), %rax
	addq	$1, %r12
	addq	24(%rsp), %rax
	movq	%rax, 0(%r13,%r12,8)
	movq	(%rsp), %rax
	subq	$1, %rax
	cmpq	%rax, %r12
	jl	.L2
.L5:
	xorl	%r12d, %r12d
	cmpq	$0, 8(%rsp)
	jle	.L4
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	movl	$1, %ebx
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %rbp
	leaq	16(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rax
	movq	%r13, %rdx
	movq	%r12, %rcx
	addq	%rax, %rbx
	leaq	-1(%rbx), %r13
	testq	%rax, %rax
	jle	.L6
	movabsq	$3022314549036572937, %rax
	addq	24(%rsp,%rbx,8), %rcx
	subq	32(%rsp,%rdx,8), %rcx
	addq	$1, %r15
	imulq	%rcx
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$14, %rdx
	subq	%rax, %rdx
	imulq	$100000, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %r12
	cmpq	8(%rsp), %r15
	jl	.L3
.L4:
	xorl	%eax, %eax
	movq	%r12, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	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
.L6:
	.cfi_restore_state
	addq	32(%rsp,%rdx,8), %rcx
	subq	24(%rsp,%rbx,8), %rcx
	addq	$1, %r15
	movabsq	$3022314549036572937, %rax
	imulq	%rcx
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$14, %rdx
	subq	%rax, %rdx
	imulq	$100000, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %r12
	cmpq	%r15, 8(%rsp)
	jg	.L3
	jmp	.L4
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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:
```
```c
#include <stdio.h>
#include <stdlib.h>
int main(void) {
    long long num,day,move,town=1,temp,road[100000]={0},sum=0,i,j;
    scanf("%lld %lld",&num,&day);
    sum=0;
    for (i=0; i<num-1; i++) {
        scanf("%lld",&temp);
        road[i+1]=road[i]+temp;
    }
    for (i=0; i<day; i++) {
        scanf("%lld",&move);
        if (move>0) {
            sum+=road[town+move-1]-road[town-1];
        } else {
            sum+=road[town-1]-road[town+move-1];
        }
        sum%=100000;
        town+=move;
    }
    printf("%lld\n",sum);
    return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>
int main(void) {
    long long num,day,move,town=1,temp,road[100000]={0},sum=0,i,j;
    scanf("%lld %lld",&num,&day);
    sum=0;
    for (i=0; i<num-1; i++) {
        scanf("%lld",&temp);
        road[i+1]=road[i]+temp;
    }
    for (i=0; i<day; i++) {
        scanf("%lld",&move);
        if (move>0) {
            sum+=road[town+move-1]-road[town-1];
        } else {
            sum+=road[town-1]-road[town+move-1];
        }
        sum%=100000;
        town+=move;
    }
    printf("%lld\n",sum);
    return 0;
}```

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 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 assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>
int main(void) {
    long long num,day,move,town=1,temp,road[100000]={0},sum=0,i,j;
    scanf("%lld %lld",&num,&day);
    sum=0;
    for (i=0; i<num-1; i++) {
        scanf("%lld",&temp);
        road[i+1]=road[i]+temp;
    }
    for (i=0; i<day; i++) {
        scanf("%lld",&move);
        if (move>0) {
            sum+=road[town+move-1]-road[town-1];
        } else {
            sum+=road[town-1]-road[town+move-1];
        }
        sum%=100000;
        town+=move;
    }
    printf("%lld\n",sum);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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
	xorl	%esi, %esi
	movl	$800000, %edx
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r13
	leaq	24(%rsp), %rbx
	movq	%r13, %rdi
	call	memset@PLT
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpq	$1, (%rsp)
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	0(%r13,%r12,8), %rax
	addq	$1, %r12
	addq	24(%rsp), %rax
	movq	%rax, 0(%r13,%r12,8)
	movq	(%rsp), %rax
	subq	$1, %rax
	cmpq	%rax, %r12
	jl	.L2
.L5:
	xorl	%r12d, %r12d
	cmpq	$0, 8(%rsp)
	jle	.L4
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	movl	$1, %ebx
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %rbp
	leaq	16(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rax
	movq	%r13, %rdx
	movq	%r12, %rcx
	addq	%rax, %rbx
	leaq	-1(%rbx), %r13
	testq	%rax, %rax
	jle	.L6
	movabsq	$3022314549036572937, %rax
	addq	24(%rsp,%rbx,8), %rcx
	subq	32(%rsp,%rdx,8), %rcx
	addq	$1, %r15
	imulq	%rcx
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$14, %rdx
	subq	%rax, %rdx
	imulq	$100000, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %r12
	cmpq	8(%rsp), %r15
	jl	.L3
.L4:
	xorl	%eax, %eax
	movq	%r12, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	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
.L6:
	.cfi_restore_state
	addq	32(%rsp,%rdx,8), %rcx
	subq	24(%rsp,%rbx,8), %rcx
	addq	$1, %r15
	movabsq	$3022314549036572937, %rax
	imulq	%rcx
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$14, %rdx
	subq	%rax, %rdx
	imulq	$100000, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %r12
	cmpq	%r15, 8(%rsp)
	jg	.L3
	jmp	.L4
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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
	xorl	%esi, %esi
	movl	$800000, %edx
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r13
	leaq	24(%rsp), %rbx
	movq	%r13, %rdi
	call	memset@PLT
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpq	$1, (%rsp)
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	0(%r13,%r12,8), %rax
	addq	$1, %r12
	addq	24(%rsp), %rax
	movq	%rax, 0(%r13,%r12,8)
	movq	(%rsp), %rax
	subq	$1, %rax
	cmpq	%rax, %r12
	jl	.L2
.L5:
	xorl	%r12d, %r12d
	cmpq	$0, 8(%rsp)
	jle	.L4
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	movl	$1, %ebx
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %rbp
	leaq	16(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rax
	movq	%r13, %rdx
	movq	%r12, %rcx
	addq	%rax, %rbx
	leaq	-1(%rbx), %r13
	testq	%rax, %rax
	jle	.L6
	movabsq	$3022314549036572937, %rax
	addq	24(%rsp,%rbx,8), %rcx
	subq	32(%rsp,%rdx,8), %rcx
	addq	$1, %r15
	imulq	%rcx
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$14, %rdx
	subq	%rax, %rdx
	imulq	$100000, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %r12
	cmpq	8(%rsp), %r15
	jl	.L3
.L4:
	xorl	%eax, %eax
	movq	%r12, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	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
.L6:
	.cfi_restore_state
	addq	32(%rsp,%rdx,8), %rcx
	subq	24(%rsp,%rbx,8), %rcx
	addq	$1, %r15
	movabsq	$3022314549036572937, %rax
	imulq	%rcx
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$14, %rdx
	subq	%rax, %rdx
	imulq	$100000, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %r12
	cmpq	%r15, 8(%rsp)
	jg	.L3
	jmp	.L4
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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:
```