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>
#include <stdlib.h>
#include <stddef.h>

int main(void)
{
	long long int n;
	long long int *a;
	scanf("%lld", &n);
	a = (long long int *)malloc(sizeof(long long int)*(n+1));
	long long int i = 0;
	while (i < n)
	{
		scanf("%lld", &(a[i]));
		i++;
	}

	long long int money = 1000;
	long long int stock = 0;
	long long int tmp_m = 0;
	long long int tmp_s = 0;
	i = 0;
	while (i < n - 1)
	{
		//if (a[i] == a[i+1])
		if (a[i] > a[i+1])
		{
			money = money + stock * a[i];
			stock = 0;
		}
		if (a[i] < a[i+1])
		{
			stock = stock + (money / a[i]);
			money = money % a[i];
		}
		i++;
	}
	money = money + stock * a[i];
	printf("%lld\n",money);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	addq	$1, %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -32(%rbp)
	movq	$0, -56(%rbp)
	jmp	.L2
.L3:
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -56(%rbp)
.L2:
	movq	-64(%rbp), %rax
	cmpq	%rax, -56(%rbp)
	jl	.L3
	movq	$1000, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -24(%rbp)
	movq	$0, -16(%rbp)
	movq	$0, -56(%rbp)
	jmp	.L4
.L7:
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-56(%rbp), %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L5
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	imulq	-40(%rbp), %rax
	addq	%rax, -48(%rbp)
	movq	$0, -40(%rbp)
.L5:
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-56(%rbp), %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L6
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rsi
	movq	-48(%rbp), %rax
	cqto
	idivq	%rsi
	addq	%rax, -40(%rbp)
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rcx
	movq	-48(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rdx, -48(%rbp)
.L6:
	addq	$1, -56(%rbp)
.L4:
	movq	-64(%rbp), %rax
	subq	$1, %rax
	cmpq	%rax, -56(%rbp)
	jl	.L7
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	imulq	-40(%rbp), %rax
	addq	%rax, -48(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%r14, %rdi
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r13
	leaq	8(,%r13,8), %rdi
	call	malloc@PLT
	movq	%rax, %rbx
	testq	%r13, %r13
	jle	.L2
	movq	%rax, %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r13
	addq	$8, %r12
	cmpq	%rbp, %r13
	jg	.L3
.L2:
	leaq	-1(%r13), %r10
	testq	%r10, %r10
	jle	.L9
	movq	(%rbx), %r8
	leaq	8(%rbx), %rcx
	leaq	(%rbx,%r13,8), %r9
	xorl	%esi, %esi
	movl	$1000, %eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L14:
	imulq	%rdi, %rsi
	addq	%rsi, %rax
	xorl	%esi, %esi
.L6:
	addq	$8, %rcx
	cmpq	%rcx, %r9
	je	.L4
.L7:
	movq	%r8, %rdi
	movq	(%rcx), %r8
	cmpq	%rdi, %r8
	jl	.L14
	jle	.L6
	cqto
	addq	$8, %rcx
	idivq	%rdi
	addq	%rax, %rsi
	movq	%rdx, %rax
	cmpq	%rcx, %r9
	jne	.L7
.L4:
	imulq	(%rbx,%r10,8), %rsi
	movl	$1, %edi
	leaq	(%rsi,%rax), %rdx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	xorl	%esi, %esi
	movl	$1000, %eax
	xorl	%r10d, %r10d
	jmp	.L4
.L15:
	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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%r14, %rdi
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r13
	leaq	8(,%r13,8), %rdi
	call	malloc@PLT
	movq	%rax, %rbx
	testq	%r13, %r13
	jle	.L2
	movq	%rax, %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r13
	addq	$8, %r12
	cmpq	%rbp, %r13
	jg	.L3
.L2:
	leaq	-1(%r13), %r10
	testq	%r10, %r10
	jle	.L9
	movq	(%rbx), %r8
	leaq	8(%rbx), %rcx
	leaq	(%rbx,%r13,8), %r9
	xorl	%esi, %esi
	movl	$1000, %eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L14:
	imulq	%rdi, %rsi
	addq	%rsi, %rax
	xorl	%esi, %esi
.L6:
	addq	$8, %rcx
	cmpq	%rcx, %r9
	je	.L4
.L7:
	movq	%r8, %rdi
	movq	(%rcx), %r8
	cmpq	%rdi, %r8
	jl	.L14
	jle	.L6
	cqto
	addq	$8, %rcx
	idivq	%rdi
	addq	%rax, %rsi
	movq	%rdx, %rax
	cmpq	%rcx, %r9
	jne	.L7
.L4:
	imulq	(%rbx,%r10,8), %rsi
	movl	$1, %edi
	leaq	(%rsi,%rax), %rdx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	xorl	%esi, %esi
	movl	$1000, %eax
	xorl	%r10d, %r10d
	jmp	.L4
.L15:
	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:

#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>

int main(void)
{
	long long int n;
	long long int *a;
	scanf("%lld", &n);
	a = (long long int *)malloc(sizeof(long long int)*(n+1));
	long long int i = 0;
	while (i < n)
	{
		scanf("%lld", &(a[i]));
		i++;
	}

	long long int money = 1000;
	long long int stock = 0;
	long long int tmp_m = 0;
	long long int tmp_s = 0;
	i = 0;
	while (i < n - 1)
	{
		//if (a[i] == a[i+1])
		if (a[i] > a[i+1])
		{
			money = money + stock * a[i];
			stock = 0;
		}
		if (a[i] < a[i+1])
		{
			stock = stock + (money / a[i]);
			money = money % a[i];
		}
		i++;
	}
	money = money + stock * a[i];
	printf("%lld\n",money);
}

2
157 145
 7
100 130 243 130 115 115 150
 6
200 237 160 140 120 100
 2
157 218
 7
100 130 243 130 115 115 271
 6
200 237 160 233 120 100
 2
103 218
 7
110 130 243 130 115 115 271
 7
110 130 136 130 115 115 271
 6
200 237 119 233 121 100

1000
 3165
 1185
 1366
 5706
 1696
 2035
 5161
 2794
 2211

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>
#include <stdlib.h>
#include <stddef.h>

int main(void)
{
	long long int n;
	long long int *a;
	scanf("%lld", &n);
	a = (long long int *)malloc(sizeof(long long int)*(n+1));
	long long int i = 0;
	while (i < n)
	{
		scanf("%lld", &(a[i]));
		i++;
	}

	long long int money = 1000;
	long long int stock = 0;
	long long int tmp_m = 0;
	long long int tmp_s = 0;
	i = 0;
	while (i < n - 1)
	{
		//if (a[i] == a[i+1])
		if (a[i] > a[i+1])
		{
			money = money + stock * a[i];
			stock = 0;
		}
		if (a[i] < a[i+1])
		{
			stock = stock + (money / a[i]);
			money = money % a[i];
		}
		i++;
	}
	money = money + stock * a[i];
	printf("%lld\n",money);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	addq	$1, %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -32(%rbp)
	movq	$0, -56(%rbp)
	jmp	.L2
.L3:
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -56(%rbp)
.L2:
	movq	-64(%rbp), %rax
	cmpq	%rax, -56(%rbp)
	jl	.L3
	movq	$1000, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -24(%rbp)
	movq	$0, -16(%rbp)
	movq	$0, -56(%rbp)
	jmp	.L4
.L7:
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-56(%rbp), %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L5
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	imulq	-40(%rbp), %rax
	addq	%rax, -48(%rbp)
	movq	$0, -40(%rbp)
.L5:
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-56(%rbp), %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L6
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rsi
	movq	-48(%rbp), %rax
	cqto
	idivq	%rsi
	addq	%rax, -40(%rbp)
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rcx
	movq	-48(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rdx, -48(%rbp)
.L6:
	addq	$1, -56(%rbp)
.L4:
	movq	-64(%rbp), %rax
	subq	$1, %rax
	cmpq	%rax, -56(%rbp)
	jl	.L7
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	imulq	-40(%rbp), %rax
	addq	%rax, -48(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"%lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	addq	$1, %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -32(%rbp)
	movq	$0, -56(%rbp)
	jmp	.L2
.L3:
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -56(%rbp)
.L2:
	movq	-64(%rbp), %rax
	cmpq	%rax, -56(%rbp)
	jl	.L3
	movq	$1000, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -24(%rbp)
	movq	$0, -16(%rbp)
	movq	$0, -56(%rbp)
	jmp	.L4
.L7:
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-56(%rbp), %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L5
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	imulq	-40(%rbp), %rax
	addq	%rax, -48(%rbp)
	movq	$0, -40(%rbp)
.L5:
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-56(%rbp), %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L6
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rsi
	movq	-48(%rbp), %rax
	cqto
	idivq	%rsi
	addq	%rax, -40(%rbp)
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rcx
	movq	-48(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rdx, -48(%rbp)
.L6:
	addq	$1, -56(%rbp)
.L4:
	movq	-64(%rbp), %rax
	subq	$1, %rax
	cmpq	%rax, -56(%rbp)
	jl	.L7
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	imulq	-40(%rbp), %rax
	addq	%rax, -48(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
