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 (void){
    int n,p,q,i,j,k,a,b,aa,bb,ans[101]={0},juni[101]={0},c=1,d=0;
    scanf("%d",&n);
    p=n*(n-1)/2;
    q=(n-1)*3;
    for(i=0;i<p;i++){
        scanf(" %d %d %d %d",&a,&b,&aa,&bb);
        if(aa>bb)ans[a]=ans[a]+3;
        else if(bb>aa)ans[b]=ans[b]+3;
        else if(aa==bb){
            ans[a]=ans[a]+1;
            ans[b]=ans[b]+1;
        }
    }
    for(j=q;j>0;j--){
        for(k=1;k<=n;k++){
            if(ans[k]==j){
                juni[k]=c;
                d++;
            }
        }
        for(k=0;k<d;k++){
            c++;
        }
        d=0;
    }
    for(j=1;j<=n;j++){
        printf("%d\n",juni[j]);
    }
return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	" %d %d %d %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
	subq	$880, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-832(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	-416(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	movl	$1, -848(%rbp)
	movl	$0, -844(%rbp)
	leaq	-880(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-880(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-880(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -840(%rbp)
	movl	-880(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	movl	%eax, -836(%rbp)
	movl	$0, -860(%rbp)
	jmp	.L2
.L6:
	leaq	-864(%rbp), %rsi
	leaq	-868(%rbp), %rcx
	leaq	-872(%rbp), %rdx
	leaq	-876(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-868(%rbp), %edx
	movl	-864(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L3
	movl	-876(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %edx
	movl	-876(%rbp), %eax
	addl	$3, %edx
	cltq
	movl	%edx, -832(%rbp,%rax,4)
	jmp	.L4
.L3:
	movl	-864(%rbp), %edx
	movl	-868(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	-872(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %edx
	movl	-872(%rbp), %eax
	addl	$3, %edx
	cltq
	movl	%edx, -832(%rbp,%rax,4)
	jmp	.L4
.L5:
	movl	-868(%rbp), %edx
	movl	-864(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L4
	movl	-876(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %edx
	movl	-876(%rbp), %eax
	addl	$1, %edx
	cltq
	movl	%edx, -832(%rbp,%rax,4)
	movl	-872(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %edx
	movl	-872(%rbp), %eax
	addl	$1, %edx
	cltq
	movl	%edx, -832(%rbp,%rax,4)
.L4:
	addl	$1, -860(%rbp)
.L2:
	movl	-860(%rbp), %eax
	cmpl	-840(%rbp), %eax
	jl	.L6
	movl	-836(%rbp), %eax
	movl	%eax, -856(%rbp)
	jmp	.L7
.L13:
	movl	$1, -852(%rbp)
	jmp	.L8
.L10:
	movl	-852(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %eax
	cmpl	%eax, -856(%rbp)
	jne	.L9
	movl	-852(%rbp), %eax
	cltq
	movl	-848(%rbp), %edx
	movl	%edx, -416(%rbp,%rax,4)
	addl	$1, -844(%rbp)
.L9:
	addl	$1, -852(%rbp)
.L8:
	movl	-880(%rbp), %eax
	cmpl	%eax, -852(%rbp)
	jle	.L10
	movl	$0, -852(%rbp)
	jmp	.L11
.L12:
	addl	$1, -848(%rbp)
	addl	$1, -852(%rbp)
.L11:
	movl	-852(%rbp), %eax
	cmpl	-844(%rbp), %eax
	jl	.L12
	movl	$0, -844(%rbp)
	subl	$1, -856(%rbp)
.L7:
	cmpl	$0, -856(%rbp)
	jg	.L13
	movl	$1, -856(%rbp)
	jmp	.L14
.L15:
	movl	-856(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -856(%rbp)
.L14:
	movl	-880(%rbp), %eax
	cmpl	%eax, -856(%rbp)
	jle	.L15
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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"
.LC1:
	.string	" %d %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
	movl	$50, %ecx
	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	$904, %rsp
	.cfi_def_cfa_offset 960
	movq	%fs:40, %rax
	movq	%rax, 888(%rsp)
	xorl	%eax, %eax
	leaq	64(%rsp), %rbp
	leaq	44(%rsp), %rsi
	movq	%rbp, %rdi
	leaq	480(%rsp), %r12
	rep stosq
	movl	$50, %ecx
	movl	$0, (%rdi)
	movq	%r12, %rdi
	rep stosq
	movl	$0, (%rdi)
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %edi
	leal	-1(%rdi), %edx
	movl	%edi, %eax
	imull	%edx, %eax
	leal	(%rdx,%rdx,2), %esi
	movl	%esi, 8(%rsp)
	movl	%esi, %ebx
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	$1, %eax
	jle	.L8
	xorl	%r13d, %r13d
	leaq	60(%rsp), %r8
	leaq	48(%rsp), %rax
	movl	%ecx, %ebx
	movq	%rbp, 16(%rsp)
	leaq	56(%rsp), %r15
	movl	%r13d, %ebp
	leaq	52(%rsp), %r14
	movq	%r12, 24(%rsp)
	movq	%rax, %r13
	movq	%r8, %r12
	movl	%esi, 12(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L36:
	movslq	48(%rsp), %rax
	addl	$3, 64(%rsp,%rax,4)
.L6:
	addl	$1, %ebp
	cmpl	%ebp, %ebx
	jle	.L35
.L2:
	movq	%r12, %r8
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %eax
	cmpl	%eax, 56(%rsp)
	jg	.L36
	jge	.L7
	movslq	52(%rsp), %rax
	addl	$1, %ebp
	addl	$3, 64(%rsp,%rax,4)
	cmpl	%ebp, %ebx
	jg	.L2
.L35:
	movl	12(%rsp), %ebx
	movq	16(%rsp), %rbp
	movq	24(%rsp), %r12
	movl	44(%rsp), %edi
.L8:
	movl	8(%rsp), %eax
	movl	$1, %esi
	leal	1(%rdi), %ecx
	testl	%eax, %eax
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movl	$1, %eax
	xorl	%edx, %edx
	testl	%edi, %edi
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%ebx, 0(%rbp,%rax,4)
	jne	.L9
	movl	%esi, (%r12,%rax,4)
	addl	$1, %edx
.L9:
	addq	$1, %rax
	cmpq	%rcx, %rax
	jne	.L10
	leal	(%rdx,%rsi), %eax
	testl	%edx, %edx
	cmovne	%eax, %esi
.L11:
	subl	$1, %ebx
	jne	.L3
.L4:
	movl	$1, %ebx
	leaq	.LC2(%rip), %rbp
	testl	%edi, %edi
	jle	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 44(%rsp)
	jge	.L13
.L14:
	movq	888(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L37
	addq	$904, %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
.L7:
	.cfi_restore_state
	jne	.L6
	movslq	48(%rsp), %rax
	addl	$1, 64(%rsp,%rax,4)
	movslq	52(%rsp), %rax
	addl	$1, 64(%rsp,%rax,4)
	jmp	.L6
.L37:
	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"
.LC1:
	.string	" %d %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
	movl	$50, %ecx
	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	$904, %rsp
	.cfi_def_cfa_offset 960
	movq	%fs:40, %rax
	movq	%rax, 888(%rsp)
	xorl	%eax, %eax
	leaq	64(%rsp), %rbp
	leaq	44(%rsp), %rsi
	movq	%rbp, %rdi
	leaq	480(%rsp), %r12
	rep stosq
	movl	$50, %ecx
	movl	$0, (%rdi)
	movq	%r12, %rdi
	rep stosq
	movl	$0, (%rdi)
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %edi
	leal	-1(%rdi), %edx
	movl	%edi, %eax
	imull	%edx, %eax
	leal	(%rdx,%rdx,2), %esi
	movl	%esi, 8(%rsp)
	movl	%esi, %ebx
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	$1, %eax
	jle	.L8
	xorl	%r13d, %r13d
	leaq	60(%rsp), %r8
	leaq	48(%rsp), %rax
	movl	%ecx, %ebx
	movq	%rbp, 16(%rsp)
	leaq	56(%rsp), %r15
	movl	%r13d, %ebp
	leaq	52(%rsp), %r14
	movq	%r12, 24(%rsp)
	movq	%rax, %r13
	movq	%r8, %r12
	movl	%esi, 12(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L36:
	movslq	48(%rsp), %rax
	addl	$3, 64(%rsp,%rax,4)
.L6:
	addl	$1, %ebp
	cmpl	%ebp, %ebx
	jle	.L35
.L2:
	movq	%r12, %r8
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %eax
	cmpl	%eax, 56(%rsp)
	jg	.L36
	jge	.L7
	movslq	52(%rsp), %rax
	addl	$1, %ebp
	addl	$3, 64(%rsp,%rax,4)
	cmpl	%ebp, %ebx
	jg	.L2
.L35:
	movl	12(%rsp), %ebx
	movq	16(%rsp), %rbp
	movq	24(%rsp), %r12
	movl	44(%rsp), %edi
.L8:
	movl	8(%rsp), %eax
	movl	$1, %esi
	leal	1(%rdi), %ecx
	testl	%eax, %eax
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movl	$1, %eax
	xorl	%edx, %edx
	testl	%edi, %edi
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%ebx, 0(%rbp,%rax,4)
	jne	.L9
	movl	%esi, (%r12,%rax,4)
	addl	$1, %edx
.L9:
	addq	$1, %rax
	cmpq	%rcx, %rax
	jne	.L10
	leal	(%rdx,%rsi), %eax
	testl	%edx, %edx
	cmovne	%eax, %esi
.L11:
	subl	$1, %ebx
	jne	.L3
.L4:
	movl	$1, %ebx
	leaq	.LC2(%rip), %rbp
	testl	%edi, %edi
	jle	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 44(%rsp)
	jge	.L13
.L14:
	movq	888(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L37
	addq	$904, %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
.L7:
	.cfi_restore_state
	jne	.L6
	movslq	48(%rsp), %rax
	addl	$1, 64(%rsp,%rax,4)
	movslq	52(%rsp), %rax
	addl	$1, 64(%rsp,%rax,4)
	jmp	.L6
.L37:
	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 (void){
    int n,p,q,i,j,k,a,b,aa,bb,ans[101]={0},juni[101]={0},c=1,d=0;
    scanf("%d",&n);
    p=n*(n-1)/2;
    q=(n-1)*3;
    for(i=0;i<p;i++){
        scanf(" %d %d %d %d",&a,&b,&aa,&bb);
        if(aa>bb)ans[a]=ans[a]+3;
        else if(bb>aa)ans[b]=ans[b]+3;
        else if(aa==bb){
            ans[a]=ans[a]+1;
            ans[b]=ans[b]+1;
        }
    }
    for(j=q;j>0;j--){
        for(k=1;k<=n;k++){
            if(ans[k]==j){
                juni[k]=c;
                d++;
            }
        }
        for(k=0;k<d;k++){
            c++;
        }
        d=0;
    }
    for(j=1;j<=n;j++){
        printf("%d\n",juni[j]);
    }
return 0;
}
4
1 2 0 1
1 3 2 1
1 4 2 2
2 3 2 1
2 4 3 0
3 4 1 3
 4
1 2 0 1
1 3 2 1
1 4 2 2
4 3 2 1
2 4 3 0
3 4 1 3
 4
1 2 1 1
1 3 2 1
1 4 2 2
4 0 3 1
2 4 3 0
0 4 1 4
 4
1 1 1 1
1 3 2 1
1 4 2 0
4 0 3 1
2 4 3 0
0 4 1 4
 4
1 2 0 1
2 3 2 1
1 4 2 2
2 3 2 1
2 4 3 0
3 4 1 3
 4
1 2 0 1
1 3 2 1
1 4 2 2
4 0 2 1
3 4 3 0
0 4 1 4
 4
1 1 1 1
1 3 2 1
1 3 2 2
4 0 3 2
2 4 3 0
0 4 1 4
 4
1 4 0 1
1 3 2 1
1 4 2 2
4 0 2 1
3 4 3 0
-1 4 1 4
 4
1 1 1 1
1 3 2 1
2 4 2 0
4 0 3 1
2 4 3 0
0 4 2 8
 4
1 2 0 1
1 3 2 1
1 4 2 2
2 3 1 0
2 4 3 0
3 4 1 0

2
1
0
2
 3
2
0
1
 2
3
0
1
 1
3
0
2
 2
0
0
1
 2
3
3
1
 1
3
4
1
 1
0
2
0
 3
1
0
1
 2
1
3
4

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 (void){
    int n,p,q,i,j,k,a,b,aa,bb,ans[101]={0},juni[101]={0},c=1,d=0;
    scanf("%d",&n);
    p=n*(n-1)/2;
    q=(n-1)*3;
    for(i=0;i<p;i++){
        scanf(" %d %d %d %d",&a,&b,&aa,&bb);
        if(aa>bb)ans[a]=ans[a]+3;
        else if(bb>aa)ans[b]=ans[b]+3;
        else if(aa==bb){
            ans[a]=ans[a]+1;
            ans[b]=ans[b]+1;
        }
    }
    for(j=q;j>0;j--){
        for(k=1;k<=n;k++){
            if(ans[k]==j){
                juni[k]=c;
                d++;
            }
        }
        for(k=0;k<d;k++){
            c++;
        }
        d=0;
    }
    for(j=1;j<=n;j++){
        printf("%d\n",juni[j]);
    }
return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	" %d %d %d %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
	subq	$880, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-832(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	-416(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	movl	$1, -848(%rbp)
	movl	$0, -844(%rbp)
	leaq	-880(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-880(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-880(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -840(%rbp)
	movl	-880(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	movl	%eax, -836(%rbp)
	movl	$0, -860(%rbp)
	jmp	.L2
.L6:
	leaq	-864(%rbp), %rsi
	leaq	-868(%rbp), %rcx
	leaq	-872(%rbp), %rdx
	leaq	-876(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-868(%rbp), %edx
	movl	-864(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L3
	movl	-876(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %edx
	movl	-876(%rbp), %eax
	addl	$3, %edx
	cltq
	movl	%edx, -832(%rbp,%rax,4)
	jmp	.L4
.L3:
	movl	-864(%rbp), %edx
	movl	-868(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	-872(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %edx
	movl	-872(%rbp), %eax
	addl	$3, %edx
	cltq
	movl	%edx, -832(%rbp,%rax,4)
	jmp	.L4
.L5:
	movl	-868(%rbp), %edx
	movl	-864(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L4
	movl	-876(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %edx
	movl	-876(%rbp), %eax
	addl	$1, %edx
	cltq
	movl	%edx, -832(%rbp,%rax,4)
	movl	-872(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %edx
	movl	-872(%rbp), %eax
	addl	$1, %edx
	cltq
	movl	%edx, -832(%rbp,%rax,4)
.L4:
	addl	$1, -860(%rbp)
.L2:
	movl	-860(%rbp), %eax
	cmpl	-840(%rbp), %eax
	jl	.L6
	movl	-836(%rbp), %eax
	movl	%eax, -856(%rbp)
	jmp	.L7
.L13:
	movl	$1, -852(%rbp)
	jmp	.L8
.L10:
	movl	-852(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %eax
	cmpl	%eax, -856(%rbp)
	jne	.L9
	movl	-852(%rbp), %eax
	cltq
	movl	-848(%rbp), %edx
	movl	%edx, -416(%rbp,%rax,4)
	addl	$1, -844(%rbp)
.L9:
	addl	$1, -852(%rbp)
.L8:
	movl	-880(%rbp), %eax
	cmpl	%eax, -852(%rbp)
	jle	.L10
	movl	$0, -852(%rbp)
	jmp	.L11
.L12:
	addl	$1, -848(%rbp)
	addl	$1, -852(%rbp)
.L11:
	movl	-852(%rbp), %eax
	cmpl	-844(%rbp), %eax
	jl	.L12
	movl	$0, -844(%rbp)
	subl	$1, -856(%rbp)
.L7:
	cmpl	$0, -856(%rbp)
	jg	.L13
	movl	$1, -856(%rbp)
	jmp	.L14
.L15:
	movl	-856(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -856(%rbp)
.L14:
	movl	-880(%rbp), %eax
	cmpl	%eax, -856(%rbp)
	jle	.L15
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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"
.LC1:
	.string	" %d %d %d %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
	subq	$880, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-832(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	-416(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	movl	$1, -848(%rbp)
	movl	$0, -844(%rbp)
	leaq	-880(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-880(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-880(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -840(%rbp)
	movl	-880(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	movl	%eax, -836(%rbp)
	movl	$0, -860(%rbp)
	jmp	.L2
.L6:
	leaq	-864(%rbp), %rsi
	leaq	-868(%rbp), %rcx
	leaq	-872(%rbp), %rdx
	leaq	-876(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-868(%rbp), %edx
	movl	-864(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L3
	movl	-876(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %edx
	movl	-876(%rbp), %eax
	addl	$3, %edx
	cltq
	movl	%edx, -832(%rbp,%rax,4)
	jmp	.L4
.L3:
	movl	-864(%rbp), %edx
	movl	-868(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	-872(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %edx
	movl	-872(%rbp), %eax
	addl	$3, %edx
	cltq
	movl	%edx, -832(%rbp,%rax,4)
	jmp	.L4
.L5:
	movl	-868(%rbp), %edx
	movl	-864(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L4
	movl	-876(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %edx
	movl	-876(%rbp), %eax
	addl	$1, %edx
	cltq
	movl	%edx, -832(%rbp,%rax,4)
	movl	-872(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %edx
	movl	-872(%rbp), %eax
	addl	$1, %edx
	cltq
	movl	%edx, -832(%rbp,%rax,4)
.L4:
	addl	$1, -860(%rbp)
.L2:
	movl	-860(%rbp), %eax
	cmpl	-840(%rbp), %eax
	jl	.L6
	movl	-836(%rbp), %eax
	movl	%eax, -856(%rbp)
	jmp	.L7
.L13:
	movl	$1, -852(%rbp)
	jmp	.L8
.L10:
	movl	-852(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %eax
	cmpl	%eax, -856(%rbp)
	jne	.L9
	movl	-852(%rbp), %eax
	cltq
	movl	-848(%rbp), %edx
	movl	%edx, -416(%rbp,%rax,4)
	addl	$1, -844(%rbp)
.L9:
	addl	$1, -852(%rbp)
.L8:
	movl	-880(%rbp), %eax
	cmpl	%eax, -852(%rbp)
	jle	.L10
	movl	$0, -852(%rbp)
	jmp	.L11
.L12:
	addl	$1, -848(%rbp)
	addl	$1, -852(%rbp)
.L11:
	movl	-852(%rbp), %eax
	cmpl	-844(%rbp), %eax
	jl	.L12
	movl	$0, -844(%rbp)
	subl	$1, -856(%rbp)
.L7:
	cmpl	$0, -856(%rbp)
	jg	.L13
	movl	$1, -856(%rbp)
	jmp	.L14
.L15:
	movl	-856(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -856(%rbp)
.L14:
	movl	-880(%rbp), %eax
	cmpl	%eax, -856(%rbp)
	jle	.L15
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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:
