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(){
    int i = 0;
    int n;
    int *A = malloc(sizeof(int) *100);
    scanf("%d", &n);
    for (i = 0; i < n;i++){
        scanf("%d", &A[i]);
    }

    long long int kane = 1000;
    long long int kabu = 0;

    int selled = 1;

    long long int num;

    for (i = 0; i < n-1;i++){
        num = 0;
        if(selled==1){
            if(A[i]<A[i+1]){
                num = kane / A[i];
                kabu = num;
                kane -= A[i] * num;
                selled = 0;
            }
        }else{
            if(A[i]>A[i+1]){
                kane += kabu * A[i];
                kabu = 0;
                selled = 1;
            }
        }
    }
    kane += kabu * A[n - 1];
    int kanekane = 1000;
    if(kane>kanekane){
        printf("%lld", kane);
    }else{
        printf("%d", kanekane);
    }
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$400, %edi
	leaq	.LC0(%rip), %r13
	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
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	malloc@PLT
	leaq	4(%rsp), %rsi
	movq	%r13, %rdi
	movq	%rax, %rbx
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	movq	%rbx, %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rdi
	addq	$4, %r12
	cmpl	%ebp, %edi
	jg	.L3
	cmpl	$1, %edi
	jle	.L2
	leal	-2(%rdi), %eax
	movq	%rbx, %rcx
	movl	$1, %r8d
	movl	$1000, %r9d
	leaq	4(%rbx,%rax,4), %r10
	xorl	%eax, %eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	cmpl	%esi, 4(%rcx)
	jge	.L5
	imulq	%rax, %rsi
	movl	$1, %r8d
	xorl	%eax, %eax
	addq	%rsi, %r9
.L5:
	addq	$4, %rcx
	cmpq	%r10, %rcx
	je	.L13
.L6:
	movslq	(%rcx), %rsi
	cmpl	$1, %r8d
	jne	.L4
	cmpl	%esi, 4(%rcx)
	jle	.L5
	movq	%r9, %rax
	addq	$4, %rcx
	xorl	%r8d, %r8d
	cqto
	idivq	%rsi
	movq	%rdx, %r9
	cmpq	%r10, %rcx
	jne	.L6
	.p2align 4,,10
	.p2align 3
.L13:
	movslq	-4(%rbx,%rdi,4), %rdx
	imulq	%rax, %rdx
	addq	%r9, %rdx
	cmpq	$1000, %rdx
	jle	.L2
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L7:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$24, %rsp
	.cfi_remember_state
	.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
.L2:
	.cfi_restore_state
	movl	$1000, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
.L14:
	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	"%d"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$400, %edi
	leaq	.LC0(%rip), %r13
	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
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	malloc@PLT
	leaq	4(%rsp), %rsi
	movq	%r13, %rdi
	movq	%rax, %rbx
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	movq	%rbx, %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rdi
	addq	$4, %r12
	cmpl	%ebp, %edi
	jg	.L3
	cmpl	$1, %edi
	jle	.L2
	leal	-2(%rdi), %eax
	movq	%rbx, %rcx
	movl	$1, %r8d
	movl	$1000, %r9d
	leaq	4(%rbx,%rax,4), %r10
	xorl	%eax, %eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	cmpl	%esi, 4(%rcx)
	jge	.L5
	imulq	%rax, %rsi
	movl	$1, %r8d
	xorl	%eax, %eax
	addq	%rsi, %r9
.L5:
	addq	$4, %rcx
	cmpq	%r10, %rcx
	je	.L13
.L6:
	movslq	(%rcx), %rsi
	cmpl	$1, %r8d
	jne	.L4
	cmpl	%esi, 4(%rcx)
	jle	.L5
	movq	%r9, %rax
	addq	$4, %rcx
	xorl	%r8d, %r8d
	cqto
	idivq	%rsi
	movq	%rdx, %r9
	cmpq	%r10, %rcx
	jne	.L6
	.p2align 4,,10
	.p2align 3
.L13:
	movslq	-4(%rbx,%rdi,4), %rdx
	imulq	%rax, %rdx
	addq	%r9, %rdx
	cmpq	$1000, %rdx
	jle	.L2
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L7:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$24, %rsp
	.cfi_remember_state
	.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
.L2:
	.cfi_restore_state
	movl	$1000, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
.L14:
	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	"%d"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$400, %edi
	leaq	.LC0(%rip), %r13
	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
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	malloc@PLT
	leaq	4(%rsp), %rsi
	movq	%r13, %rdi
	movq	%rax, %rbx
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	movq	%rbx, %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rdi
	addq	$4, %r12
	cmpl	%ebp, %edi
	jg	.L3
	cmpl	$1, %edi
	jle	.L2
	leal	-2(%rdi), %eax
	movq	%rbx, %rcx
	movl	$1, %r8d
	movl	$1000, %r9d
	leaq	4(%rbx,%rax,4), %r10
	xorl	%eax, %eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	cmpl	%esi, 4(%rcx)
	jge	.L5
	imulq	%rax, %rsi
	movl	$1, %r8d
	xorl	%eax, %eax
	addq	%rsi, %r9
.L5:
	addq	$4, %rcx
	cmpq	%r10, %rcx
	je	.L13
.L6:
	movslq	(%rcx), %rsi
	cmpl	$1, %r8d
	jne	.L4
	cmpl	%esi, 4(%rcx)
	jle	.L5
	movq	%r9, %rax
	addq	$4, %rcx
	xorl	%r8d, %r8d
	cqto
	idivq	%rsi
	movq	%rdx, %r9
	cmpq	%r10, %rcx
	jne	.L6
	.p2align 4,,10
	.p2align 3
.L13:
	movslq	-4(%rbx,%rdi,4), %rdx
	imulq	%rax, %rdx
	addq	%r9, %rdx
	cmpq	$1000, %rdx
	jle	.L2
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L7:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$24, %rsp
	.cfi_remember_state
	.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
.L2:
	.cfi_restore_state
	movl	$1000, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
.L14:
	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(){
    int i = 0;
    int n;
    int *A = malloc(sizeof(int) *100);
    scanf("%d", &n);
    for (i = 0; i < n;i++){
        scanf("%d", &A[i]);
    }

    long long int kane = 1000;
    long long int kabu = 0;

    int selled = 1;

    long long int num;

    for (i = 0; i < n-1;i++){
        num = 0;
        if(selled==1){
            if(A[i]<A[i+1]){
                num = kane / A[i];
                kabu = num;
                kane -= A[i] * num;
                selled = 0;
            }
        }else{
            if(A[i]>A[i+1]){
                kane += kabu * A[i];
                kabu = 0;
                selled = 1;
            }
        }
    }
    kane += kabu * A[n - 1];
    int kanekane = 1000;
    if(kane>kanekane){
        printf("%lld", kane);
    }else{
        printf("%d", kanekane);
    }
    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(){
    int i = 0;
    int n;
    int *A = malloc(sizeof(int) *100);
    scanf("%d", &n);
    for (i = 0; i < n;i++){
        scanf("%d", &A[i]);
    }

    long long int kane = 1000;
    long long int kabu = 0;

    int selled = 1;

    long long int num;

    for (i = 0; i < n-1;i++){
        num = 0;
        if(selled==1){
            if(A[i]<A[i+1]){
                num = kane / A[i];
                kabu = num;
                kane -= A[i] * num;
                selled = 0;
            }
        }else{
            if(A[i]>A[i+1]){
                kane += kabu * A[i];
                kabu = 0;
                selled = 1;
            }
        }
    }
    kane += kabu * A[n - 1];
    int kanekane = 1000;
    if(kane>kanekane){
        printf("%lld", kane);
    }else{
        printf("%d", kanekane);
    }
    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:

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

```c
#include <stdio.h>
#include <stdlib.h>

int main(){
    int i = 0;
    int n;
    int *A = malloc(sizeof(int) *100);
    scanf("%d", &n);
    for (i = 0; i < n;i++){
        scanf("%d", &A[i]);
    }

    long long int kane = 1000;
    long long int kabu = 0;

    int selled = 1;

    long long int num;

    for (i = 0; i < n-1;i++){
        num = 0;
        if(selled==1){
            if(A[i]<A[i+1]){
                num = kane / A[i];
                kabu = num;
                kane -= A[i] * num;
                selled = 0;
            }
        }else{
            if(A[i]>A[i+1]){
                kane += kabu * A[i];
                kabu = 0;
                selled = 1;
            }
        }
    }
    kane += kabu * A[n - 1];
    int kanekane = 1000;
    if(kane>kanekane){
        printf("%lld", kane);
    }else{
        printf("%d", kanekane);
    }
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$400, %edi
	leaq	.LC0(%rip), %r13
	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
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	malloc@PLT
	leaq	4(%rsp), %rsi
	movq	%r13, %rdi
	movq	%rax, %rbx
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	movq	%rbx, %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rdi
	addq	$4, %r12
	cmpl	%ebp, %edi
	jg	.L3
	cmpl	$1, %edi
	jle	.L2
	leal	-2(%rdi), %eax
	movq	%rbx, %rcx
	movl	$1, %r8d
	movl	$1000, %r9d
	leaq	4(%rbx,%rax,4), %r10
	xorl	%eax, %eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	cmpl	%esi, 4(%rcx)
	jge	.L5
	imulq	%rax, %rsi
	movl	$1, %r8d
	xorl	%eax, %eax
	addq	%rsi, %r9
.L5:
	addq	$4, %rcx
	cmpq	%r10, %rcx
	je	.L13
.L6:
	movslq	(%rcx), %rsi
	cmpl	$1, %r8d
	jne	.L4
	cmpl	%esi, 4(%rcx)
	jle	.L5
	movq	%r9, %rax
	addq	$4, %rcx
	xorl	%r8d, %r8d
	cqto
	idivq	%rsi
	movq	%rdx, %r9
	cmpq	%r10, %rcx
	jne	.L6
	.p2align 4,,10
	.p2align 3
.L13:
	movslq	-4(%rbx,%rdi,4), %rdx
	imulq	%rax, %rdx
	addq	%r9, %rdx
	cmpq	$1000, %rdx
	jle	.L2
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L7:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$24, %rsp
	.cfi_remember_state
	.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
.L2:
	.cfi_restore_state
	movl	$1000, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
.L14:
	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	"%d"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$400, %edi
	leaq	.LC0(%rip), %r13
	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
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	malloc@PLT
	leaq	4(%rsp), %rsi
	movq	%r13, %rdi
	movq	%rax, %rbx
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	movq	%rbx, %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rdi
	addq	$4, %r12
	cmpl	%ebp, %edi
	jg	.L3
	cmpl	$1, %edi
	jle	.L2
	leal	-2(%rdi), %eax
	movq	%rbx, %rcx
	movl	$1, %r8d
	movl	$1000, %r9d
	leaq	4(%rbx,%rax,4), %r10
	xorl	%eax, %eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	cmpl	%esi, 4(%rcx)
	jge	.L5
	imulq	%rax, %rsi
	movl	$1, %r8d
	xorl	%eax, %eax
	addq	%rsi, %r9
.L5:
	addq	$4, %rcx
	cmpq	%r10, %rcx
	je	.L13
.L6:
	movslq	(%rcx), %rsi
	cmpl	$1, %r8d
	jne	.L4
	cmpl	%esi, 4(%rcx)
	jle	.L5
	movq	%r9, %rax
	addq	$4, %rcx
	xorl	%r8d, %r8d
	cqto
	idivq	%rsi
	movq	%rdx, %r9
	cmpq	%r10, %rcx
	jne	.L6
	.p2align 4,,10
	.p2align 3
.L13:
	movslq	-4(%rbx,%rdi,4), %rdx
	imulq	%rax, %rdx
	addq	%r9, %rdx
	cmpq	$1000, %rdx
	jle	.L2
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L7:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$24, %rsp
	.cfi_remember_state
	.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
.L2:
	.cfi_restore_state
	movl	$1000, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
.L14:
	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:
```