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>
int main(){
	int N, C[500], S[500], F[500], i, j, t;
	scanf("%d",&N);
	for (i=0;i<N-1;i++) {scanf("%d %d %d",&C[i],&S[i],&F[i]);}
	for (i=0;i<N;i++){
		t = 0;
		for (j=i;j<N-1;j++){
			if (t<S[j]) t=S[j];
			else if (t%F[j] == 0);
			else t=t+F[j]-t%F[j];
			t+=C[j];
		}
		printf("%d\n",t);
	}
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %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
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$1944, %rsp
	.cfi_def_cfa_offset 6096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 6024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	cmpl	$1, %edi
	jle	.L2
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	leaq	4016(%rsp), %r14
	leaq	2016(%rsp), %r12
	leaq	16(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%r14,%rbx), %rcx
	leaq	(%r12,%rbx), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	leaq	0(%rbp,%rbx), %rsi
	addl	$1, %r15d
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	leal	-1(%rdi), %eax
	cmpl	%r15d, %eax
	jg	.L3
.L2:
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %rbx
	testl	%edi, %edi
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	subl	$1, %edi
	xorl	%r8d, %r8d
	cmpl	%r13d, %edi
	jle	.L8
	movq	%r13, %rsi
	xorl	%r8d, %r8d
	leaq	16(%rsp), %rbp
	leaq	2016(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%r12,%rsi,4), %eax
	cmpl	%r8d, %eax
	jg	.L6
	movl	4016(%rsp,%rsi,4), %ecx
	movl	%r8d, %eax
	cltd
	idivl	%ecx
	addl	%r8d, %ecx
	movl	%r8d, %eax
	subl	%edx, %ecx
	testl	%edx, %edx
	cmovne	%ecx, %eax
.L6:
	addl	0(%rbp,%rsi,4), %eax
	addq	$1, %rsi
	movl	%eax, %r8d
	cmpl	%esi, %edi
	jg	.L7
.L8:
	movl	$1, %edi
	movl	%r8d, %edx
	movq	%rbx, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %edi
	addq	$1, %r13
	cmpl	%r13d, %edi
	jg	.L4
.L5:
	movq	6024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$6040, %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
.L18:
	.cfi_restore_state
	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:
```

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"
.LC1:
	.string	"%d %d %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
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$1944, %rsp
	.cfi_def_cfa_offset 6096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 6024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	cmpl	$1, %edi
	jle	.L2
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	leaq	4016(%rsp), %r14
	leaq	2016(%rsp), %r12
	leaq	16(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%r14,%rbx), %rcx
	leaq	(%r12,%rbx), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	leaq	0(%rbp,%rbx), %rsi
	addl	$1, %r15d
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	leal	-1(%rdi), %eax
	cmpl	%r15d, %eax
	jg	.L3
.L2:
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %rbx
	testl	%edi, %edi
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	subl	$1, %edi
	xorl	%r8d, %r8d
	cmpl	%r13d, %edi
	jle	.L8
	movq	%r13, %rsi
	xorl	%r8d, %r8d
	leaq	16(%rsp), %rbp
	leaq	2016(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%r12,%rsi,4), %eax
	cmpl	%r8d, %eax
	jg	.L6
	movl	4016(%rsp,%rsi,4), %ecx
	movl	%r8d, %eax
	cltd
	idivl	%ecx
	addl	%r8d, %ecx
	movl	%r8d, %eax
	subl	%edx, %ecx
	testl	%edx, %edx
	cmovne	%ecx, %eax
.L6:
	addl	0(%rbp,%rsi,4), %eax
	addq	$1, %rsi
	movl	%eax, %r8d
	cmpl	%esi, %edi
	jg	.L7
.L8:
	movl	$1, %edi
	movl	%r8d, %edx
	movq	%rbx, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %edi
	addq	$1, %r13
	cmpl	%r13d, %edi
	jg	.L4
.L5:
	movq	6024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$6040, %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
.L18:
	.cfi_restore_state
	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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %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
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$1944, %rsp
	.cfi_def_cfa_offset 6096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 6024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	cmpl	$1, %edi
	jle	.L2
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	leaq	4016(%rsp), %r14
	leaq	2016(%rsp), %r12
	leaq	16(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%r14,%rbx), %rcx
	leaq	(%r12,%rbx), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	leaq	0(%rbp,%rbx), %rsi
	addl	$1, %r15d
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	leal	-1(%rdi), %eax
	cmpl	%r15d, %eax
	jg	.L3
.L2:
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %rbx
	testl	%edi, %edi
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	subl	$1, %edi
	xorl	%r8d, %r8d
	cmpl	%r13d, %edi
	jle	.L8
	movq	%r13, %rsi
	xorl	%r8d, %r8d
	leaq	16(%rsp), %rbp
	leaq	2016(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%r12,%rsi,4), %eax
	cmpl	%r8d, %eax
	jg	.L6
	movl	4016(%rsp,%rsi,4), %ecx
	movl	%r8d, %eax
	cltd
	idivl	%ecx
	addl	%r8d, %ecx
	movl	%r8d, %eax
	subl	%edx, %ecx
	testl	%edx, %edx
	cmovne	%ecx, %eax
.L6:
	addl	0(%rbp,%rsi,4), %eax
	addq	$1, %rsi
	movl	%eax, %r8d
	cmpl	%esi, %edi
	jg	.L7
.L8:
	movl	$1, %edi
	movl	%r8d, %edx
	movq	%rbx, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %edi
	addq	$1, %r13
	cmpl	%r13d, %edi
	jg	.L4
.L5:
	movq	6024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$6040, %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
.L18:
	.cfi_restore_state
	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:
```
```c
#include <stdio.h>
int main(){
	int N, C[500], S[500], F[500], i, j, t;
	scanf("%d",&N);
	for (i=0;i<N-1;i++) {scanf("%d %d %d",&C[i],&S[i],&F[i]);}
	for (i=0;i<N;i++){
		t = 0;
		for (j=i;j<N-1;j++){
			if (t<S[j]) t=S[j];
			else if (t%F[j] == 0);
			else t=t+F[j]-t%F[j];
			t+=C[j];
		}
		printf("%d\n",t);
	}
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
int main(){
	int N, C[500], S[500], F[500], i, j, t;
	scanf("%d",&N);
	for (i=0;i<N-1;i++) {scanf("%d %d %d",&C[i],&S[i],&F[i]);}
	for (i=0;i<N;i++){
		t = 0;
		for (j=i;j<N-1;j++){
			if (t<S[j]) t=S[j];
			else if (t%F[j] == 0);
			else t=t+F[j]-t%F[j];
			t+=C[j];
		}
		printf("%d\n",t);
	}
}```

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:

3
6 6 1
1 10 1
 4
1 13 1
44 17 17
66 4096 64
 4
11 24 6
52 16 4
99 2 2
 3
6 1 1
1 10 2
 3
6 10 1
1 10 1
 4
15 24 6
52 16 4
99 2 2
 3
6 6 1
2 10 1
 4
11 23 6
31 16 4
99 2 2
 3
4 1 2
2 10 2
 4
1 13 1
44 17 22
101 4096 64

13
11
0
 4162
4162
4162
0
 187
167
101
0
 11
11
0
 17
11
0
 191
167
101
0
 14
12
0
 167
147
101
0
 12
12
0
 4197
4197
4197
0

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>
int main(){
	int N, C[500], S[500], F[500], i, j, t;
	scanf("%d",&N);
	for (i=0;i<N-1;i++) {scanf("%d %d %d",&C[i],&S[i],&F[i]);}
	for (i=0;i<N;i++){
		t = 0;
		for (j=i;j<N-1;j++){
			if (t<S[j]) t=S[j];
			else if (t%F[j] == 0);
			else t=t+F[j]-t%F[j];
			t+=C[j];
		}
		printf("%d\n",t);
	}
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %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
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$1944, %rsp
	.cfi_def_cfa_offset 6096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 6024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	cmpl	$1, %edi
	jle	.L2
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	leaq	4016(%rsp), %r14
	leaq	2016(%rsp), %r12
	leaq	16(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%r14,%rbx), %rcx
	leaq	(%r12,%rbx), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	leaq	0(%rbp,%rbx), %rsi
	addl	$1, %r15d
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	leal	-1(%rdi), %eax
	cmpl	%r15d, %eax
	jg	.L3
.L2:
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %rbx
	testl	%edi, %edi
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	subl	$1, %edi
	xorl	%r8d, %r8d
	cmpl	%r13d, %edi
	jle	.L8
	movq	%r13, %rsi
	xorl	%r8d, %r8d
	leaq	16(%rsp), %rbp
	leaq	2016(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%r12,%rsi,4), %eax
	cmpl	%r8d, %eax
	jg	.L6
	movl	4016(%rsp,%rsi,4), %ecx
	movl	%r8d, %eax
	cltd
	idivl	%ecx
	addl	%r8d, %ecx
	movl	%r8d, %eax
	subl	%edx, %ecx
	testl	%edx, %edx
	cmovne	%ecx, %eax
.L6:
	addl	0(%rbp,%rsi,4), %eax
	addq	$1, %rsi
	movl	%eax, %r8d
	cmpl	%esi, %edi
	jg	.L7
.L8:
	movl	$1, %edi
	movl	%r8d, %edx
	movq	%rbx, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %edi
	addq	$1, %r13
	cmpl	%r13d, %edi
	jg	.L4
.L5:
	movq	6024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$6040, %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
.L18:
	.cfi_restore_state
	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:
```

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"
.LC1:
	.string	"%d %d %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
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$1944, %rsp
	.cfi_def_cfa_offset 6096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 6024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	cmpl	$1, %edi
	jle	.L2
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	leaq	4016(%rsp), %r14
	leaq	2016(%rsp), %r12
	leaq	16(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%r14,%rbx), %rcx
	leaq	(%r12,%rbx), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	leaq	0(%rbp,%rbx), %rsi
	addl	$1, %r15d
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	leal	-1(%rdi), %eax
	cmpl	%r15d, %eax
	jg	.L3
.L2:
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %rbx
	testl	%edi, %edi
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	subl	$1, %edi
	xorl	%r8d, %r8d
	cmpl	%r13d, %edi
	jle	.L8
	movq	%r13, %rsi
	xorl	%r8d, %r8d
	leaq	16(%rsp), %rbp
	leaq	2016(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%r12,%rsi,4), %eax
	cmpl	%r8d, %eax
	jg	.L6
	movl	4016(%rsp,%rsi,4), %ecx
	movl	%r8d, %eax
	cltd
	idivl	%ecx
	addl	%r8d, %ecx
	movl	%r8d, %eax
	subl	%edx, %ecx
	testl	%edx, %edx
	cmovne	%ecx, %eax
.L6:
	addl	0(%rbp,%rsi,4), %eax
	addq	$1, %rsi
	movl	%eax, %r8d
	cmpl	%esi, %edi
	jg	.L7
.L8:
	movl	$1, %edi
	movl	%r8d, %edx
	movq	%rbx, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %edi
	addq	$1, %r13
	cmpl	%r13d, %edi
	jg	.L4
.L5:
	movq	6024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$6040, %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
.L18:
	.cfi_restore_state
	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:
```