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 <math.h>
#include <string.h>
#include <limits.h>

int cmp(const void* p, const void* q) {
	return *(long long*)q - *(long long*)p;
}

int main(void) {
	int n;
	long long a[100001];
	long long edge1 = 0, edge2 = 0;

	scanf("%d", &n);
	for (int i = 0; i < n; i++) scanf("%lld", &a[i]);
	qsort(a, n, sizeof(long long), cmp);

	int flag = 0;
	for (int i = 0; i < n; i++) {
		if (flag == 0 && a[i] == a[i + 1])
			edge1 = a[i], flag = 1, i++;
		else if (flag == 1 && a[i] == a[i + 1]) {
			edge2 = a[i], flag = 2;
			break;
		}

		if (flag == 2) break;
	}
	printf("%lld", edge1*edge2);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %edx
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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	$1328, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -800032(%rbp)
	movq	$0, -800024(%rbp)
	leaq	-800048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800044(%rbp)
	jmp	.L4
.L5:
	leaq	-800016(%rbp), %rdx
	movl	-800044(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800044(%rbp)
.L4:
	movl	-800048(%rbp), %eax
	cmpl	%eax, -800044(%rbp)
	jl	.L5
	movl	-800048(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-800016(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -800040(%rbp)
	movl	$0, -800036(%rbp)
	jmp	.L6
.L11:
	cmpl	$0, -800040(%rbp)
	jne	.L7
	movl	-800036(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rdx
	movl	-800036(%rbp), %eax
	addl	$1, %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jne	.L7
	movl	-800036(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	movq	%rax, -800032(%rbp)
	movl	$1, -800040(%rbp)
	addl	$1, -800036(%rbp)
	jmp	.L8
.L7:
	cmpl	$1, -800040(%rbp)
	jne	.L8
	movl	-800036(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rdx
	movl	-800036(%rbp), %eax
	addl	$1, %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jne	.L8
	movl	-800036(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	movq	%rax, -800024(%rbp)
	movl	$2, -800040(%rbp)
	jmp	.L9
.L8:
	cmpl	$2, -800040(%rbp)
	je	.L14
	addl	$1, -800036(%rbp)
.L6:
	movl	-800048(%rbp), %eax
	cmpl	%eax, -800036(%rbp)
	jl	.L11
	jmp	.L9
.L14:
	nop
.L9:
	movq	-800032(%rbp), %rax
	imulq	-800024(%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	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.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:
.LFB52:
	.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), %rdi
	leaq	.LC1(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %rbx
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	testl	%esi, %esi
	jle	.L4
	movq	%rbx, %r12
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	addq	$8, %r12
	cmpl	%ebp, %esi
	jg	.L5
.L4:
	leaq	cmp(%rip), %rcx
	movl	$8, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L11
	movq	16(%rsp), %rdx
	movslq	%ecx, %rsi
	xorl	%eax, %eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	addq	$1, %rax
	cmpq	%rsi, %rax
	je	.L11
.L9:
	movq	%rdx, %rdi
	movq	8(%rbx,%rax,8), %rdx
	movl	%eax, %r8d
	cmpq	%rdi, %rdx
	jne	.L7
	leal	2(%rax), %eax
	cmpl	%eax, %ecx
	jle	.L12
	subl	$3, %ecx
	movslq	%r8d, %rdx
	subl	%r8d, %ecx
	leaq	0(,%rdx,8), %rax
	addq	%rdx, %rcx
	movq	32(%rsp,%rax), %rsi
	addq	%rbx, %rax
	leaq	24(%rsp,%rcx,8), %rcx
.L8:
	movq	%rsi, %rdx
	movq	24(%rax), %rsi
	cmpq	%rdx, %rsi
	je	.L6
	addq	$8, %rax
	cmpq	%rax, %rcx
	jne	.L8
.L12:
	xorl	%edx, %edx
.L6:
	imulq	%rdi, %rdx
	xorl	%eax, %eax
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	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
.L11:
	.cfi_restore_state
	xorl	%edi, %edi
	xorl	%edx, %edx
	jmp	.L6
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.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:
.LFB52:
	.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), %rdi
	leaq	.LC1(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %rbx
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	testl	%esi, %esi
	jle	.L4
	movq	%rbx, %r12
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	addq	$8, %r12
	cmpl	%ebp, %esi
	jg	.L5
.L4:
	leaq	cmp(%rip), %rcx
	movl	$8, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L11
	movq	16(%rsp), %rdx
	movslq	%ecx, %rsi
	xorl	%eax, %eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	addq	$1, %rax
	cmpq	%rsi, %rax
	je	.L11
.L9:
	movq	%rdx, %rdi
	movq	8(%rbx,%rax,8), %rdx
	movl	%eax, %r8d
	cmpq	%rdi, %rdx
	jne	.L7
	leal	2(%rax), %eax
	cmpl	%eax, %ecx
	jle	.L12
	subl	$3, %ecx
	movslq	%r8d, %rdx
	subl	%r8d, %ecx
	leaq	0(,%rdx,8), %rax
	addq	%rdx, %rcx
	movq	32(%rsp,%rax), %rsi
	addq	%rbx, %rax
	leaq	24(%rsp,%rcx,8), %rcx
.L8:
	movq	%rsi, %rdx
	movq	24(%rax), %rsi
	cmpq	%rdx, %rsi
	je	.L6
	addq	$8, %rax
	cmpq	%rax, %rcx
	jne	.L8
.L12:
	xorl	%edx, %edx
.L6:
	imulq	%rdi, %rdx
	xorl	%eax, %eax
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	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
.L11:
	.cfi_restore_state
	xorl	%edi, %edi
	xorl	%edx, %edx
	jmp	.L6
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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 <math.h>
#include <string.h>
#include <limits.h>

int cmp(const void* p, const void* q) {
	return *(long long*)q - *(long long*)p;
}

int main(void) {
	int n;
	long long a[100001];
	long long edge1 = 0, edge2 = 0;

	scanf("%d", &n);
	for (int i = 0; i < n; i++) scanf("%lld", &a[i]);
	qsort(a, n, sizeof(long long), cmp);

	int flag = 0;
	for (int i = 0; i < n; i++) {
		if (flag == 0 && a[i] == a[i + 1])
			edge1 = a[i], flag = 1, i++;
		else if (flag == 1 && a[i] == a[i + 1]) {
			edge2 = a[i], flag = 2;
			break;
		}

		if (flag == 2) break;
	}
	printf("%lld", edge1*edge2);
	return 0;
}

6
3 1 2 4 2 1

2
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 <math.h>
#include <string.h>
#include <limits.h>

int cmp(const void* p, const void* q) {
	return *(long long*)q - *(long long*)p;
}

int main(void) {
	int n;
	long long a[100001];
	long long edge1 = 0, edge2 = 0;

	scanf("%d", &n);
	for (int i = 0; i < n; i++) scanf("%lld", &a[i]);
	qsort(a, n, sizeof(long long), cmp);

	int flag = 0;
	for (int i = 0; i < n; i++) {
		if (flag == 0 && a[i] == a[i + 1])
			edge1 = a[i], flag = 1, i++;
		else if (flag == 1 && a[i] == a[i + 1]) {
			edge2 = a[i], flag = 2;
			break;
		}

		if (flag == 2) break;
	}
	printf("%lld", edge1*edge2);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %edx
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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	$1328, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -800032(%rbp)
	movq	$0, -800024(%rbp)
	leaq	-800048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800044(%rbp)
	jmp	.L4
.L5:
	leaq	-800016(%rbp), %rdx
	movl	-800044(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800044(%rbp)
.L4:
	movl	-800048(%rbp), %eax
	cmpl	%eax, -800044(%rbp)
	jl	.L5
	movl	-800048(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-800016(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -800040(%rbp)
	movl	$0, -800036(%rbp)
	jmp	.L6
.L11:
	cmpl	$0, -800040(%rbp)
	jne	.L7
	movl	-800036(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rdx
	movl	-800036(%rbp), %eax
	addl	$1, %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jne	.L7
	movl	-800036(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	movq	%rax, -800032(%rbp)
	movl	$1, -800040(%rbp)
	addl	$1, -800036(%rbp)
	jmp	.L8
.L7:
	cmpl	$1, -800040(%rbp)
	jne	.L8
	movl	-800036(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rdx
	movl	-800036(%rbp), %eax
	addl	$1, %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jne	.L8
	movl	-800036(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	movq	%rax, -800024(%rbp)
	movl	$2, -800040(%rbp)
	jmp	.L9
.L8:
	cmpl	$2, -800040(%rbp)
	je	.L14
	addl	$1, -800036(%rbp)
.L6:
	movl	-800048(%rbp), %eax
	cmpl	%eax, -800036(%rbp)
	jl	.L11
	jmp	.L9
.L14:
	nop
.L9:
	movq	-800032(%rbp), %rax
	imulq	-800024(%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	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %edx
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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	$1328, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -800032(%rbp)
	movq	$0, -800024(%rbp)
	leaq	-800048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800044(%rbp)
	jmp	.L4
.L5:
	leaq	-800016(%rbp), %rdx
	movl	-800044(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800044(%rbp)
.L4:
	movl	-800048(%rbp), %eax
	cmpl	%eax, -800044(%rbp)
	jl	.L5
	movl	-800048(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-800016(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -800040(%rbp)
	movl	$0, -800036(%rbp)
	jmp	.L6
.L11:
	cmpl	$0, -800040(%rbp)
	jne	.L7
	movl	-800036(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rdx
	movl	-800036(%rbp), %eax
	addl	$1, %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jne	.L7
	movl	-800036(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	movq	%rax, -800032(%rbp)
	movl	$1, -800040(%rbp)
	addl	$1, -800036(%rbp)
	jmp	.L8
.L7:
	cmpl	$1, -800040(%rbp)
	jne	.L8
	movl	-800036(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rdx
	movl	-800036(%rbp), %eax
	addl	$1, %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jne	.L8
	movl	-800036(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	movq	%rax, -800024(%rbp)
	movl	$2, -800040(%rbp)
	jmp	.L9
.L8:
	cmpl	$2, -800040(%rbp)
	je	.L14
	addl	$1, -800036(%rbp)
.L6:
	movl	-800048(%rbp), %eax
	cmpl	%eax, -800036(%rbp)
	jl	.L11
	jmp	.L9
.L14:
	nop
.L9:
	movq	-800032(%rbp), %rax
	imulq	-800024(%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	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
