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>

#define SIZE 100000
#define ll long long

int comp(const void *c1, const void *c2);
void swap(ll *x, ll *y);
void array_reverse(ll array[], ll n);

int main()
{
  ll n, i, a[SIZE];
  ll height, width, x, y, j, cnt;
  
  scanf("%lld", &n);
  for (i=0; i<n; i++) scanf("%lld", &a[i]);
  qsort(a, n, sizeof(ll), comp);
  array_reverse(a, n);

  height = -1; width = -1;
  i = 0;
  while (i < n){
    x = a[i];
    cnt = 1;
    for (j=i+1; j<n; j++){
      if (cnt == 4) break;
      y = a[j];
      if (x != y) break;
      cnt++;
    }
    if (1 < cnt && cnt < 4 && height == -1){
      height = x;
    } else if (1 < cnt && cnt < 4 && width == -1){
      width = x;
      printf("%lld\n", height*width);
      break;
    } else if (cnt == 4 && height == -1){
      height = x;
      printf("%lld\n", height*height);
      break;
    } else if (cnt == 4){
      width = x;
      printf("%lld\n", height*width);
      break;
    }
    i = j;
  }
  if (height == -1) printf("%d\n", 0);
  
  return 0;
}

int comp(const void *c1, const void *c2)
{
  int tmp1 = *(ll *)c1;
  int tmp2 = *(ll *)c2;

  if (tmp1 < tmp2) return -1;
  if (tmp1 == tmp2) return 0;
  if (tmp1 > tmp2) return 1;
}

void swap(ll *x, ll *y)
{
  ll tmp = *x;
  *x = *y;
  *y = tmp;
}

void array_reverse(ll a[], ll n)
{
  ll i=0;
  while (i < n/2){
    swap(&a[i], &a[n-i-1]);
    i++;
  }
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"%d\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
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800080(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -800072(%rbp)
	jmp	.L2
.L3:
	leaq	-800016(%rbp), %rdx
	movq	-800072(%rbp), %rax
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -800072(%rbp)
.L2:
	movq	-800080(%rbp), %rax
	cmpq	%rax, -800072(%rbp)
	jl	.L3
	movq	-800080(%rbp), %rax
	movq	%rax, %rsi
	leaq	-800016(%rbp), %rax
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	-800080(%rbp), %rdx
	leaq	-800016(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	array_reverse
	movq	$-1, -800064(%rbp)
	movq	$-1, -800040(%rbp)
	movq	$0, -800072(%rbp)
	jmp	.L4
.L15:
	movq	-800072(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rax
	movq	%rax, -800032(%rbp)
	movq	$1, -800048(%rbp)
	movq	-800072(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -800056(%rbp)
	jmp	.L5
.L9:
	cmpq	$4, -800048(%rbp)
	je	.L19
	movq	-800056(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rax
	movq	%rax, -800024(%rbp)
	movq	-800032(%rbp), %rax
	cmpq	-800024(%rbp), %rax
	jne	.L20
	addq	$1, -800048(%rbp)
	addq	$1, -800056(%rbp)
.L5:
	movq	-800080(%rbp), %rax
	cmpq	%rax, -800056(%rbp)
	jl	.L9
	jmp	.L7
.L19:
	nop
	jmp	.L7
.L20:
	nop
.L7:
	cmpq	$1, -800048(%rbp)
	jle	.L10
	cmpq	$3, -800048(%rbp)
	jg	.L10
	cmpq	$-1, -800064(%rbp)
	jne	.L10
	movq	-800032(%rbp), %rax
	movq	%rax, -800064(%rbp)
	jmp	.L11
.L10:
	cmpq	$1, -800048(%rbp)
	jle	.L12
	cmpq	$3, -800048(%rbp)
	jg	.L12
	cmpq	$-1, -800040(%rbp)
	jne	.L12
	movq	-800032(%rbp), %rax
	movq	%rax, -800040(%rbp)
	movq	-800064(%rbp), %rax
	imulq	-800040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L12:
	cmpq	$4, -800048(%rbp)
	jne	.L14
	cmpq	$-1, -800064(%rbp)
	jne	.L14
	movq	-800032(%rbp), %rax
	movq	%rax, -800064(%rbp)
	movq	-800064(%rbp), %rax
	imulq	%rax, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L14:
	cmpq	$4, -800048(%rbp)
	jne	.L11
	movq	-800032(%rbp), %rax
	movq	%rax, -800040(%rbp)
	movq	-800064(%rbp), %rax
	imulq	-800040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L11:
	movq	-800056(%rbp), %rax
	movq	%rax, -800072(%rbp)
.L4:
	movq	-800080(%rbp), %rax
	cmpq	%rax, -800072(%rbp)
	jl	.L15
.L13:
	cmpq	$-1, -800064(%rbp)
	jne	.L16
	movl	$0, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L16:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	comp
	.type	comp, @function
comp:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jge	.L22
	movl	$-1, %eax
	jmp	.L21
.L22:
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jne	.L24
	movl	$0, %eax
	jmp	.L21
.L24:
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jle	.L25
	movl	$1, %eax
	jmp	.L21
.L25:
.L21:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	comp, .-comp
	.globl	swap
	.type	swap, @function
swap:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-32(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	swap, .-swap
	.globl	array_reverse
	.type	array_reverse, @function
array_reverse:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L28
.L29:
	movq	-32(%rbp), %rax
	subq	-8(%rbp), %rax
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	swap
	addq	$1, -8(%rbp)
.L28:
	movq	-32(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	cmpq	%rax, -8(%rbp)
	jl	.L29
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	array_reverse, .-array_reverse
	.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
	.p2align 4
	.globl	comp
	.type	comp, @function
comp:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movl	$-1, %eax
	cmpl	%edx, (%rdi)
	jl	.L1
	movl	$0, %eax
	je	.L1
	movl	$1, %eax
.L1:
	ret
	.cfi_endproc
.LFE40:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%lld\n"
	.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
	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
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1320, %rsp
	.cfi_def_cfa_offset 800080
	leaq	.LC0(%rip), %r13
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %r12
	movq	%r12, %rbp
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	testq	%rsi, %rsi
	jle	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	addq	$8, %rbp
	cmpq	%rbx, %rsi
	jg	.L9
.L8:
	leaq	comp(%rip), %rcx
	movl	$8, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movq	8(%rsp), %rcx
	movq	%rcx, %rsi
	shrq	$63, %rsi
	addq	%rcx, %rsi
	sarq	%rsi
	cmpq	$1, %rcx
	jle	.L10
	leaq	0(,%rcx,8), %rax
	leaq	0(,%rsi,8), %rdx
	movq	%rax, %rdi
	subq	%rdx, %rdi
	cmpq	%rdx, %rdi
	setge	%dl
	testq	%rax, %rax
	setle	%dil
	orb	%dil, %dl
	je	.L11
	cmpq	$5, %rcx
	jle	.L11
	movq	%rsi, %r8
	leaq	-16(%r12,%rax), %rax
	movq	%r12, %rdx
	shrq	%r8
	movq	%rax, %rdi
	salq	$4, %r8
	subq	%r8, %rdi
	.p2align 4,,10
	.p2align 3
.L12:
	movdqa	(%rdx), %xmm0
	movdqu	(%rax), %xmm1
	subq	$16, %rax
	addq	$16, %rdx
	shufpd	$1, %xmm1, %xmm1
	shufpd	$1, %xmm0, %xmm0
	movaps	%xmm1, -16(%rdx)
	movups	%xmm0, 16(%rax)
	cmpq	%rdi, %rax
	jne	.L12
	movq	%rsi, %rdx
	andq	$-2, %rdx
	andl	$1, %esi
	je	.L15
	movq	%rcx, %rax
	subq	%rdx, %rax
	leaq	(%r12,%rdx,8), %rdx
	leaq	-8(%r12,%rax,8), %rax
	movq	(%rdx), %rsi
	movq	(%rax), %rdi
	movq	%rdi, (%rdx)
	movq	%rsi, (%rax)
.L15:
	movq	$-1, %rdx
	xorl	%eax, %eax
.L16:
	leaq	1(%rax), %rsi
	movq	16(%rsp,%rax,8), %rbx
	cmpq	%rsi, %rcx
	jle	.L17
.L63:
	cmpq	%rbx, 16(%rsp,%rsi,8)
	jne	.L59
	leaq	2(%rax), %rsi
	cmpq	%rsi, %rcx
	jle	.L20
	cmpq	16(%rsp,%rsi,8), %rbx
	jne	.L21
	addq	$3, %rax
	cmpq	%rax, %rcx
	jle	.L20
	cmpq	16(%rsp,%rax,8), %rbx
	jne	.L23
	cmpq	$-1, %rdx
	je	.L61
.L56:
	imulq	%rbx, %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L18:
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L62
	addq	$800040, %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
.L21:
	.cfi_restore_state
	cmpq	$-1, %rdx
	jne	.L56
	movq	%rbx, %rdx
.L59:
	movq	%rsi, %rax
	leaq	1(%rax), %rsi
	movq	16(%rsp,%rax,8), %rbx
	cmpq	%rsi, %rcx
	jg	.L63
.L17:
	movq	%rdx, %rbx
.L27:
	addq	$1, %rbx
	jne	.L18
.L28:
	xorl	%edx, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L20:
	cmpq	$-1, %rdx
	jne	.L56
	jmp	.L27
.L23:
	cmpq	$-1, %rdx
	jne	.L56
	movq	%rbx, %rdx
	jmp	.L16
.L61:
	movq	%rbx, %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	imulq	%rbx, %rdx
	call	__printf_chk@PLT
	jmp	.L27
.L11:
	addq	%r12, %rax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	-8(%rax), %r8
	movq	(%r12,%rdx,8), %rdi
	subq	$8, %rax
	movq	%r8, (%r12,%rdx,8)
	addq	$1, %rdx
	movq	%rdi, (%rax)
	cmpq	%rdx, %rsi
	jg	.L14
	jmp	.L15
.L10:
	movq	$-1, %rdx
	je	.L17
	jmp	.L28
.L62:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.text
	.p2align 4
	.globl	swap
	.type	swap, @function
swap:
.LFB41:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	movq	(%rsi), %rdx
	movq	%rdx, (%rdi)
	movq	%rax, (%rsi)
	ret
	.cfi_endproc
.LFE41:
	.size	swap, .-swap
	.p2align 4
	.globl	array_reverse
	.type	array_reverse, @function
array_reverse:
.LFB42:
	.cfi_startproc
	endbr64
	movq	%rsi, %rdx
	shrq	$63, %rsi
	addq	%rdx, %rsi
	sarq	%rsi
	cmpq	$1, %rdx
	jle	.L65
	leaq	0(,%rdx,8), %rcx
	leaq	0(,%rsi,8), %r8
	movq	%rcx, %r9
	leaq	-8(%rcx), %rax
	subq	%r8, %r9
	cmpq	%r8, %r9
	setge	%r8b
	testq	%rcx, %rcx
	setle	%r9b
	orb	%r9b, %r8b
	je	.L67
	cmpq	$5, %rdx
	jle	.L67
	movq	%rsi, %r8
	movq	%rdi, %rax
	leaq	-16(%rdi,%rcx), %rcx
	shrq	%r8
	salq	$4, %r8
	addq	%rdi, %r8
	.p2align 4,,10
	.p2align 3
.L68:
	movdqu	(%rcx), %xmm1
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	subq	$16, %rcx
	shufpd	$1, %xmm1, %xmm1
	shufpd	$1, %xmm0, %xmm0
	movups	%xmm1, -16(%rax)
	movups	%xmm0, 16(%rcx)
	cmpq	%rax, %r8
	jne	.L68
	movq	%rsi, %rcx
	andq	$-2, %rcx
	andl	$1, %esi
	je	.L65
	subq	%rcx, %rdx
	leaq	-8(%rdi,%rdx,8), %rax
	leaq	(%rdi,%rcx,8), %rdx
	movq	(%rdx), %rcx
	movq	(%rax), %rsi
	movq	%rsi, (%rdx)
	movq	%rcx, (%rax)
	ret
	.p2align 4,,10
	.p2align 3
.L67:
	leaq	(%rdi,%rax), %rdx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L70:
	movq	(%rdx), %r8
	movq	(%rdi,%rax,8), %rcx
	subq	$8, %rdx
	movq	%r8, (%rdi,%rax,8)
	addq	$1, %rax
	movq	%rcx, 8(%rdx)
	cmpq	%rax, %rsi
	jg	.L70
.L65:
	ret
	.cfi_endproc
.LFE42:
	.size	array_reverse, .-array_reverse
	.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
	.p2align 4
	.globl	comp
	.type	comp, @function
comp:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movl	$-1, %eax
	cmpl	%edx, (%rdi)
	jl	.L1
	movl	$0, %eax
	je	.L1
	movl	$1, %eax
.L1:
	ret
	.cfi_endproc
.LFE40:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%lld\n"
	.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
	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
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1320, %rsp
	.cfi_def_cfa_offset 800080
	leaq	.LC0(%rip), %r13
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %r12
	movq	%r12, %rbp
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	testq	%rsi, %rsi
	jle	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	addq	$8, %rbp
	cmpq	%rbx, %rsi
	jg	.L9
.L8:
	leaq	comp(%rip), %rcx
	movl	$8, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movq	8(%rsp), %rcx
	movq	%rcx, %rsi
	shrq	$63, %rsi
	addq	%rcx, %rsi
	sarq	%rsi
	cmpq	$1, %rcx
	jle	.L10
	leaq	0(,%rcx,8), %rax
	leaq	0(,%rsi,8), %rdx
	movq	%rax, %rdi
	subq	%rdx, %rdi
	cmpq	%rdx, %rdi
	setge	%dl
	testq	%rax, %rax
	setle	%dil
	orb	%dil, %dl
	je	.L11
	cmpq	$5, %rcx
	jle	.L11
	movq	%rsi, %r8
	leaq	-16(%r12,%rax), %rax
	movq	%r12, %rdx
	shrq	%r8
	movq	%rax, %rdi
	salq	$4, %r8
	subq	%r8, %rdi
	.p2align 4,,10
	.p2align 3
.L12:
	movdqa	(%rdx), %xmm0
	movdqu	(%rax), %xmm1
	subq	$16, %rax
	addq	$16, %rdx
	shufpd	$1, %xmm1, %xmm1
	shufpd	$1, %xmm0, %xmm0
	movaps	%xmm1, -16(%rdx)
	movups	%xmm0, 16(%rax)
	cmpq	%rdi, %rax
	jne	.L12
	movq	%rsi, %rdx
	andq	$-2, %rdx
	andl	$1, %esi
	je	.L15
	movq	%rcx, %rax
	subq	%rdx, %rax
	leaq	(%r12,%rdx,8), %rdx
	leaq	-8(%r12,%rax,8), %rax
	movq	(%rdx), %rsi
	movq	(%rax), %rdi
	movq	%rdi, (%rdx)
	movq	%rsi, (%rax)
.L15:
	movq	$-1, %rdx
	xorl	%eax, %eax
.L16:
	leaq	1(%rax), %rsi
	movq	16(%rsp,%rax,8), %rbx
	cmpq	%rsi, %rcx
	jle	.L17
.L63:
	cmpq	%rbx, 16(%rsp,%rsi,8)
	jne	.L59
	leaq	2(%rax), %rsi
	cmpq	%rsi, %rcx
	jle	.L20
	cmpq	16(%rsp,%rsi,8), %rbx
	jne	.L21
	addq	$3, %rax
	cmpq	%rax, %rcx
	jle	.L20
	cmpq	16(%rsp,%rax,8), %rbx
	jne	.L23
	cmpq	$-1, %rdx
	je	.L61
.L56:
	imulq	%rbx, %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L18:
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L62
	addq	$800040, %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
.L21:
	.cfi_restore_state
	cmpq	$-1, %rdx
	jne	.L56
	movq	%rbx, %rdx
.L59:
	movq	%rsi, %rax
	leaq	1(%rax), %rsi
	movq	16(%rsp,%rax,8), %rbx
	cmpq	%rsi, %rcx
	jg	.L63
.L17:
	movq	%rdx, %rbx
.L27:
	addq	$1, %rbx
	jne	.L18
.L28:
	xorl	%edx, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L20:
	cmpq	$-1, %rdx
	jne	.L56
	jmp	.L27
.L23:
	cmpq	$-1, %rdx
	jne	.L56
	movq	%rbx, %rdx
	jmp	.L16
.L61:
	movq	%rbx, %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	imulq	%rbx, %rdx
	call	__printf_chk@PLT
	jmp	.L27
.L11:
	addq	%r12, %rax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	-8(%rax), %r8
	movq	(%r12,%rdx,8), %rdi
	subq	$8, %rax
	movq	%r8, (%r12,%rdx,8)
	addq	$1, %rdx
	movq	%rdi, (%rax)
	cmpq	%rdx, %rsi
	jg	.L14
	jmp	.L15
.L10:
	movq	$-1, %rdx
	je	.L17
	jmp	.L28
.L62:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.text
	.p2align 4
	.globl	swap
	.type	swap, @function
swap:
.LFB41:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	movq	(%rsi), %rdx
	movq	%rdx, (%rdi)
	movq	%rax, (%rsi)
	ret
	.cfi_endproc
.LFE41:
	.size	swap, .-swap
	.p2align 4
	.globl	array_reverse
	.type	array_reverse, @function
array_reverse:
.LFB42:
	.cfi_startproc
	endbr64
	movq	%rsi, %rdx
	shrq	$63, %rsi
	addq	%rdx, %rsi
	sarq	%rsi
	cmpq	$1, %rdx
	jle	.L65
	leaq	0(,%rdx,8), %rcx
	leaq	0(,%rsi,8), %r8
	movq	%rcx, %r9
	leaq	-8(%rcx), %rax
	subq	%r8, %r9
	cmpq	%r8, %r9
	setge	%r8b
	testq	%rcx, %rcx
	setle	%r9b
	orb	%r9b, %r8b
	je	.L67
	cmpq	$5, %rdx
	jle	.L67
	movq	%rsi, %r8
	movq	%rdi, %rax
	leaq	-16(%rdi,%rcx), %rcx
	shrq	%r8
	salq	$4, %r8
	addq	%rdi, %r8
	.p2align 4,,10
	.p2align 3
.L68:
	movdqu	(%rcx), %xmm1
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	subq	$16, %rcx
	shufpd	$1, %xmm1, %xmm1
	shufpd	$1, %xmm0, %xmm0
	movups	%xmm1, -16(%rax)
	movups	%xmm0, 16(%rcx)
	cmpq	%rax, %r8
	jne	.L68
	movq	%rsi, %rcx
	andq	$-2, %rcx
	andl	$1, %esi
	je	.L65
	subq	%rcx, %rdx
	leaq	-8(%rdi,%rdx,8), %rax
	leaq	(%rdi,%rcx,8), %rdx
	movq	(%rdx), %rcx
	movq	(%rax), %rsi
	movq	%rsi, (%rdx)
	movq	%rcx, (%rax)
	ret
	.p2align 4,,10
	.p2align 3
.L67:
	leaq	(%rdi,%rax), %rdx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L70:
	movq	(%rdx), %r8
	movq	(%rdi,%rax,8), %rcx
	subq	$8, %rdx
	movq	%r8, (%rdi,%rax,8)
	addq	$1, %rax
	movq	%rcx, 8(%rdx)
	cmpq	%rax, %rsi
	jg	.L70
.L65:
	ret
	.cfi_endproc
.LFE42:
	.size	array_reverse, .-array_reverse
	.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>

#define SIZE 100000
#define ll long long

int comp(const void *c1, const void *c2);
void swap(ll *x, ll *y);
void array_reverse(ll array[], ll n);

int main()
{
  ll n, i, a[SIZE];
  ll height, width, x, y, j, cnt;
  
  scanf("%lld", &n);
  for (i=0; i<n; i++) scanf("%lld", &a[i]);
  qsort(a, n, sizeof(ll), comp);
  array_reverse(a, n);

  height = -1; width = -1;
  i = 0;
  while (i < n){
    x = a[i];
    cnt = 1;
    for (j=i+1; j<n; j++){
      if (cnt == 4) break;
      y = a[j];
      if (x != y) break;
      cnt++;
    }
    if (1 < cnt && cnt < 4 && height == -1){
      height = x;
    } else if (1 < cnt && cnt < 4 && width == -1){
      width = x;
      printf("%lld\n", height*width);
      break;
    } else if (cnt == 4 && height == -1){
      height = x;
      printf("%lld\n", height*height);
      break;
    } else if (cnt == 4){
      width = x;
      printf("%lld\n", height*width);
      break;
    }
    i = j;
  }
  if (height == -1) printf("%d\n", 0);
  
  return 0;
}

int comp(const void *c1, const void *c2)
{
  int tmp1 = *(ll *)c1;
  int tmp2 = *(ll *)c2;

  if (tmp1 < tmp2) return -1;
  if (tmp1 == tmp2) return 0;
  if (tmp1 > tmp2) return 1;
}

void swap(ll *x, ll *y)
{
  ll tmp = *x;
  *x = *y;
  *y = tmp;
}

void array_reverse(ll a[], ll n)
{
  ll i=0;
  while (i < n/2){
    swap(&a[i], &a[n-i-1]);
    i++;
  }
}
10
3 3 3 3 4 4 2 5 5 5
 6
3 1 2 4 2 2
 6
3 2 2 4 2 2
 6
3 2 2 4 3 2
 10
3 3 6 3 4 4 1 6 5 5
 10
3 3 6 3 4 3 1 6 5 6
 6
3 4 2 3 4 3
 10
3 3 6 6 4 3 1 6 3 6
 10
3 2 8 6 4 0 1 8 3 10
 6
1 -1 1 7 8 7

20
 4
 6
 30
 18
 12
 36
 24
 7

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>

#define SIZE 100000
#define ll long long

int comp(const void *c1, const void *c2);
void swap(ll *x, ll *y);
void array_reverse(ll array[], ll n);

int main()
{
  ll n, i, a[SIZE];
  ll height, width, x, y, j, cnt;
  
  scanf("%lld", &n);
  for (i=0; i<n; i++) scanf("%lld", &a[i]);
  qsort(a, n, sizeof(ll), comp);
  array_reverse(a, n);

  height = -1; width = -1;
  i = 0;
  while (i < n){
    x = a[i];
    cnt = 1;
    for (j=i+1; j<n; j++){
      if (cnt == 4) break;
      y = a[j];
      if (x != y) break;
      cnt++;
    }
    if (1 < cnt && cnt < 4 && height == -1){
      height = x;
    } else if (1 < cnt && cnt < 4 && width == -1){
      width = x;
      printf("%lld\n", height*width);
      break;
    } else if (cnt == 4 && height == -1){
      height = x;
      printf("%lld\n", height*height);
      break;
    } else if (cnt == 4){
      width = x;
      printf("%lld\n", height*width);
      break;
    }
    i = j;
  }
  if (height == -1) printf("%d\n", 0);
  
  return 0;
}

int comp(const void *c1, const void *c2)
{
  int tmp1 = *(ll *)c1;
  int tmp2 = *(ll *)c2;

  if (tmp1 < tmp2) return -1;
  if (tmp1 == tmp2) return 0;
  if (tmp1 > tmp2) return 1;
}

void swap(ll *x, ll *y)
{
  ll tmp = *x;
  *x = *y;
  *y = tmp;
}

void array_reverse(ll a[], ll n)
{
  ll i=0;
  while (i < n/2){
    swap(&a[i], &a[n-i-1]);
    i++;
  }
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"%d\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
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800080(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -800072(%rbp)
	jmp	.L2
.L3:
	leaq	-800016(%rbp), %rdx
	movq	-800072(%rbp), %rax
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -800072(%rbp)
.L2:
	movq	-800080(%rbp), %rax
	cmpq	%rax, -800072(%rbp)
	jl	.L3
	movq	-800080(%rbp), %rax
	movq	%rax, %rsi
	leaq	-800016(%rbp), %rax
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	-800080(%rbp), %rdx
	leaq	-800016(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	array_reverse
	movq	$-1, -800064(%rbp)
	movq	$-1, -800040(%rbp)
	movq	$0, -800072(%rbp)
	jmp	.L4
.L15:
	movq	-800072(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rax
	movq	%rax, -800032(%rbp)
	movq	$1, -800048(%rbp)
	movq	-800072(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -800056(%rbp)
	jmp	.L5
.L9:
	cmpq	$4, -800048(%rbp)
	je	.L19
	movq	-800056(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rax
	movq	%rax, -800024(%rbp)
	movq	-800032(%rbp), %rax
	cmpq	-800024(%rbp), %rax
	jne	.L20
	addq	$1, -800048(%rbp)
	addq	$1, -800056(%rbp)
.L5:
	movq	-800080(%rbp), %rax
	cmpq	%rax, -800056(%rbp)
	jl	.L9
	jmp	.L7
.L19:
	nop
	jmp	.L7
.L20:
	nop
.L7:
	cmpq	$1, -800048(%rbp)
	jle	.L10
	cmpq	$3, -800048(%rbp)
	jg	.L10
	cmpq	$-1, -800064(%rbp)
	jne	.L10
	movq	-800032(%rbp), %rax
	movq	%rax, -800064(%rbp)
	jmp	.L11
.L10:
	cmpq	$1, -800048(%rbp)
	jle	.L12
	cmpq	$3, -800048(%rbp)
	jg	.L12
	cmpq	$-1, -800040(%rbp)
	jne	.L12
	movq	-800032(%rbp), %rax
	movq	%rax, -800040(%rbp)
	movq	-800064(%rbp), %rax
	imulq	-800040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L12:
	cmpq	$4, -800048(%rbp)
	jne	.L14
	cmpq	$-1, -800064(%rbp)
	jne	.L14
	movq	-800032(%rbp), %rax
	movq	%rax, -800064(%rbp)
	movq	-800064(%rbp), %rax
	imulq	%rax, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L14:
	cmpq	$4, -800048(%rbp)
	jne	.L11
	movq	-800032(%rbp), %rax
	movq	%rax, -800040(%rbp)
	movq	-800064(%rbp), %rax
	imulq	-800040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L11:
	movq	-800056(%rbp), %rax
	movq	%rax, -800072(%rbp)
.L4:
	movq	-800080(%rbp), %rax
	cmpq	%rax, -800072(%rbp)
	jl	.L15
.L13:
	cmpq	$-1, -800064(%rbp)
	jne	.L16
	movl	$0, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L16:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	comp
	.type	comp, @function
comp:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jge	.L22
	movl	$-1, %eax
	jmp	.L21
.L22:
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jne	.L24
	movl	$0, %eax
	jmp	.L21
.L24:
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jle	.L25
	movl	$1, %eax
	jmp	.L21
.L25:
.L21:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	comp, .-comp
	.globl	swap
	.type	swap, @function
swap:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-32(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	swap, .-swap
	.globl	array_reverse
	.type	array_reverse, @function
array_reverse:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L28
.L29:
	movq	-32(%rbp), %rax
	subq	-8(%rbp), %rax
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	swap
	addq	$1, -8(%rbp)
.L28:
	movq	-32(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	cmpq	%rax, -8(%rbp)
	jl	.L29
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	array_reverse, .-array_reverse
	.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"
.LC2:
	.string	"%d\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
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800080(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -800072(%rbp)
	jmp	.L2
.L3:
	leaq	-800016(%rbp), %rdx
	movq	-800072(%rbp), %rax
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -800072(%rbp)
.L2:
	movq	-800080(%rbp), %rax
	cmpq	%rax, -800072(%rbp)
	jl	.L3
	movq	-800080(%rbp), %rax
	movq	%rax, %rsi
	leaq	-800016(%rbp), %rax
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	-800080(%rbp), %rdx
	leaq	-800016(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	array_reverse
	movq	$-1, -800064(%rbp)
	movq	$-1, -800040(%rbp)
	movq	$0, -800072(%rbp)
	jmp	.L4
.L15:
	movq	-800072(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rax
	movq	%rax, -800032(%rbp)
	movq	$1, -800048(%rbp)
	movq	-800072(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -800056(%rbp)
	jmp	.L5
.L9:
	cmpq	$4, -800048(%rbp)
	je	.L19
	movq	-800056(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rax
	movq	%rax, -800024(%rbp)
	movq	-800032(%rbp), %rax
	cmpq	-800024(%rbp), %rax
	jne	.L20
	addq	$1, -800048(%rbp)
	addq	$1, -800056(%rbp)
.L5:
	movq	-800080(%rbp), %rax
	cmpq	%rax, -800056(%rbp)
	jl	.L9
	jmp	.L7
.L19:
	nop
	jmp	.L7
.L20:
	nop
.L7:
	cmpq	$1, -800048(%rbp)
	jle	.L10
	cmpq	$3, -800048(%rbp)
	jg	.L10
	cmpq	$-1, -800064(%rbp)
	jne	.L10
	movq	-800032(%rbp), %rax
	movq	%rax, -800064(%rbp)
	jmp	.L11
.L10:
	cmpq	$1, -800048(%rbp)
	jle	.L12
	cmpq	$3, -800048(%rbp)
	jg	.L12
	cmpq	$-1, -800040(%rbp)
	jne	.L12
	movq	-800032(%rbp), %rax
	movq	%rax, -800040(%rbp)
	movq	-800064(%rbp), %rax
	imulq	-800040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L12:
	cmpq	$4, -800048(%rbp)
	jne	.L14
	cmpq	$-1, -800064(%rbp)
	jne	.L14
	movq	-800032(%rbp), %rax
	movq	%rax, -800064(%rbp)
	movq	-800064(%rbp), %rax
	imulq	%rax, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L14:
	cmpq	$4, -800048(%rbp)
	jne	.L11
	movq	-800032(%rbp), %rax
	movq	%rax, -800040(%rbp)
	movq	-800064(%rbp), %rax
	imulq	-800040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L11:
	movq	-800056(%rbp), %rax
	movq	%rax, -800072(%rbp)
.L4:
	movq	-800080(%rbp), %rax
	cmpq	%rax, -800072(%rbp)
	jl	.L15
.L13:
	cmpq	$-1, -800064(%rbp)
	jne	.L16
	movl	$0, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L16:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	comp
	.type	comp, @function
comp:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jge	.L22
	movl	$-1, %eax
	jmp	.L21
.L22:
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jne	.L24
	movl	$0, %eax
	jmp	.L21
.L24:
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jle	.L25
	movl	$1, %eax
	jmp	.L21
.L25:
.L21:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	comp, .-comp
	.globl	swap
	.type	swap, @function
swap:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-32(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	swap, .-swap
	.globl	array_reverse
	.type	array_reverse, @function
array_reverse:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L28
.L29:
	movq	-32(%rbp), %rax
	subq	-8(%rbp), %rax
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	swap
	addq	$1, -8(%rbp)
.L28:
	movq	-32(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	cmpq	%rax, -8(%rbp)
	jl	.L29
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	array_reverse, .-array_reverse
	.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:
