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 *(int*)p - *(int*)q;
}

int main(void) {
	int n;
	int v_odd[100001] = { 0 }, v_even[100001] = { 0 };
	int cnt_odd = 1, cnt_even = 1, temp = 1;
	int cnt_odd2 = 1, cnt_even2 = 1;
	int a_odd=-1, a_even=-2, ans;

	scanf("%d", &n);
	for (int i = 1; i <= n; i++) {
		if (i % 2) scanf("%d", &v_odd[i / 2]);
		else scanf("%d", &v_even[i / 2 - 1]);
	}
	qsort(v_odd, n / 2, sizeof(int), cmp);
	for (int i = 0; i < n / 2 ; i++) {
		if (v_odd[i] == v_odd[i + 1])temp++;
		else {
			if (temp > cnt_odd)
				a_odd = v_odd[i], cnt_odd2 = cnt_odd, cnt_odd = temp;
			else if (cnt_odd2 <= temp && temp <= cnt_odd)
				cnt_odd2 = temp;
			temp = 1;
		}
	}
	temp = 1;
	qsort(v_even, n / 2, sizeof(int), cmp);
	for (int i = 0; i < n / 2 ; i++) {
		if (v_even[i] == v_even[i + 1])temp++;
		else {
			if (temp > cnt_even)
				a_even = v_even[i], cnt_even2 = cnt_even, cnt_even = temp;
			else if (cnt_even2 <= temp && temp <= cnt_even)
				cnt_even2 = temp;
			temp = 1;
		}
	}
	if (a_odd != a_even) printf("%d", n - cnt_odd - cnt_even);
	else {
		if (cnt_odd == n / 2 && cnt_even == n / 2) printf("%d", n / 2);
		else if (cnt_odd + cnt_even2 >= cnt_even + cnt_odd2) printf("%d", n - cnt_odd - cnt_even2);
		else printf("%d", n - cnt_odd2 - cnt_even);
	}	
	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	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %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"
	.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	$1360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800032(%rbp), %rax
	movl	$400004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-400016(%rbp), %rax
	movl	$400004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -800072(%rbp)
	movl	$1, -800068(%rbp)
	movl	$1, -800064(%rbp)
	movl	$1, -800060(%rbp)
	movl	$1, -800056(%rbp)
	movl	$-1, -800052(%rbp)
	movl	$-2, -800048(%rbp)
	leaq	-800076(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -800044(%rbp)
	jmp	.L4
.L7:
	movl	-800044(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L5
	movl	-800044(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	leaq	-800032(%rbp), %rdx
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L6
.L5:
	movl	-800044(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	subl	$1, %eax
	leaq	-400016(%rbp), %rdx
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L6:
	addl	$1, -800044(%rbp)
.L4:
	movl	-800076(%rbp), %eax
	cmpl	%eax, -800044(%rbp)
	jle	.L7
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rsi
	leaq	-800032(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -800040(%rbp)
	jmp	.L8
.L13:
	movl	-800040(%rbp), %eax
	cltq
	movl	-800032(%rbp,%rax,4), %edx
	movl	-800040(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-800032(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L9
	addl	$1, -800064(%rbp)
	jmp	.L10
.L9:
	movl	-800064(%rbp), %eax
	cmpl	-800072(%rbp), %eax
	jle	.L11
	movl	-800040(%rbp), %eax
	cltq
	movl	-800032(%rbp,%rax,4), %eax
	movl	%eax, -800052(%rbp)
	movl	-800072(%rbp), %eax
	movl	%eax, -800060(%rbp)
	movl	-800064(%rbp), %eax
	movl	%eax, -800072(%rbp)
	jmp	.L12
.L11:
	movl	-800060(%rbp), %eax
	cmpl	-800064(%rbp), %eax
	jg	.L12
	movl	-800064(%rbp), %eax
	cmpl	-800072(%rbp), %eax
	jg	.L12
	movl	-800064(%rbp), %eax
	movl	%eax, -800060(%rbp)
.L12:
	movl	$1, -800064(%rbp)
.L10:
	addl	$1, -800040(%rbp)
.L8:
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -800040(%rbp)
	jl	.L13
	movl	$1, -800064(%rbp)
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rsi
	leaq	-400016(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -800036(%rbp)
	jmp	.L14
.L19:
	movl	-800036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	-800036(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L15
	addl	$1, -800064(%rbp)
	jmp	.L16
.L15:
	movl	-800064(%rbp), %eax
	cmpl	-800068(%rbp), %eax
	jle	.L17
	movl	-800036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movl	%eax, -800048(%rbp)
	movl	-800068(%rbp), %eax
	movl	%eax, -800056(%rbp)
	movl	-800064(%rbp), %eax
	movl	%eax, -800068(%rbp)
	jmp	.L18
.L17:
	movl	-800056(%rbp), %eax
	cmpl	-800064(%rbp), %eax
	jg	.L18
	movl	-800064(%rbp), %eax
	cmpl	-800068(%rbp), %eax
	jg	.L18
	movl	-800064(%rbp), %eax
	movl	%eax, -800056(%rbp)
.L18:
	movl	$1, -800064(%rbp)
.L16:
	addl	$1, -800036(%rbp)
.L14:
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -800036(%rbp)
	jl	.L19
	movl	-800052(%rbp), %eax
	cmpl	-800048(%rbp), %eax
	je	.L20
	movl	-800076(%rbp), %eax
	subl	-800072(%rbp), %eax
	subl	-800068(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L21
.L20:
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -800072(%rbp)
	jne	.L22
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -800068(%rbp)
	jne	.L22
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L21
.L22:
	movl	-800072(%rbp), %edx
	movl	-800056(%rbp), %eax
	addl	%eax, %edx
	movl	-800068(%rbp), %ecx
	movl	-800060(%rbp), %eax
	addl	%ecx, %eax
	cmpl	%eax, %edx
	jl	.L23
	movl	-800076(%rbp), %eax
	subl	-800072(%rbp), %eax
	subl	-800056(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L21
.L23:
	movl	-800076(%rbp), %eax
	subl	-800060(%rbp), %eax
	subl	-800068(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L21:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	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
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800112
	movl	$400004, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	leaq	400032(%rsp), %r12
	movq	%rbp, %rdi
	call	memset@PLT
	movl	$400004, %edx
	xorl	%esi, %esi
	movq	%r12, %rdi
	call	memset@PLT
	leaq	12(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%ebx, %eax
	sarl	%eax
	testb	$1, %bl
	je	.L5
	cltq
	movq	%r13, %rdi
	addl	$1, %ebx
	leaq	0(%rbp,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	%eax, %ebx
	jle	.L7
.L4:
	movl	%eax, %esi
	leaq	cmp(%rip), %r8
	movl	$4, %edx
	movq	%rbp, %rdi
	shrl	$31, %esi
	movq	%r8, %rcx
	addl	%eax, %esi
	sarl	%esi
	movslq	%esi, %rsi
	call	qsort@PLT
	movl	12(%rsp), %eax
	leaq	cmp(%rip), %r8
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	cmpl	$1, %eax
	jle	.L8
	movl	16(%rsp), %edx
	xorl	%eax, %eax
	movl	$1, %ecx
	movl	$1, %ebx
	movl	$-1, %r15d
	movl	$1, %r14d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	%ecx, %ebx
	jl	.L23
	cmpl	%ecx, %r14d
	cmovl	%ecx, %r14d
	movl	$1, %ecx
.L10:
	addq	$1, %rax
	cmpl	%eax, %esi
	jle	.L38
.L11:
	movl	%edx, %edi
	movl	4(%rbp,%rax,4), %edx
	cmpl	%edx, %edi
	jne	.L9
	addq	$1, %rax
	addl	$1, %ecx
	cmpl	%eax, %esi
	jg	.L11
.L38:
	movslq	%esi, %rsi
	movq	%r8, %rcx
	movl	$4, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	12(%rsp), %r10d
	movl	%r10d, %eax
	shrl	$31, %eax
	addl	%r10d, %eax
	sarl	%eax
	cmpl	$1, %r10d
	jle	.L39
.L20:
	movl	400032(%rsp), %esi
	xorl	%ecx, %ecx
	movl	$-2, %r9d
	movl	$1, %ebp
	movl	$1, %edi
	movl	$1, %r11d
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	%r11d, %edi
	jg	.L25
	cmpl	%edi, %ebp
	cmovl	%edi, %ebp
	movl	$1, %edi
.L14:
	addq	$1, %rcx
	cmpl	%ecx, %eax
	jle	.L12
.L15:
	movl	%esi, %r8d
	movl	4(%r12,%rcx,4), %esi
	cmpl	%r8d, %esi
	jne	.L13
	addq	$1, %rcx
	addl	$1, %edi
	cmpl	%ecx, %eax
	jg	.L15
.L12:
	cmpl	%r15d, %r9d
	jne	.L21
	cmpl	%eax, %ebx
	jne	.L18
	cmpl	%r11d, %eax
	je	.L40
.L18:
	leal	(%rbx,%rbp), %edx
	leal	(%r11,%r14), %eax
	cmpl	%eax, %edx
	movl	%r10d, %edx
	jl	.L19
	subl	%ebx, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	subl	%ebp, %edx
	call	__printf_chk@PLT
.L17:
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$800056, %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
.L5:
	.cfi_restore_state
	subl	$1, %eax
	movq	%r13, %rdi
	addl	$1, %ebx
	cltq
	leaq	(%r12,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	%ebx, %eax
	jge	.L7
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L23:
	movl	%ebx, %r14d
	movl	%edi, %r15d
	movl	%ecx, %ebx
	movl	$1, %ecx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L25:
	movl	%r11d, %ebp
	movl	%r8d, %r9d
	movl	%edi, %r11d
	movl	$1, %edi
	jmp	.L14
.L21:
	movl	%r10d, %edx
	subl	%ebx, %edx
.L37:
	subl	%r11d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L17
.L19:
	subl	%r14d, %edx
	jmp	.L37
.L8:
	movq	%r8, %rcx
	movl	$4, %edx
	movslq	%esi, %rsi
	movq	%r12, %rdi
	call	qsort@PLT
	movl	12(%rsp), %r10d
	movl	$2, %ecx
	movl	$1, %r11d
	movl	$1, %ebx
	movl	%r10d, %eax
	cltd
	idivl	%ecx
	cmpl	$1, %r10d
	jle	.L21
	movl	$1, %r14d
	movl	$1, %ebx
	orl	$-1, %r15d
	jmp	.L20
.L39:
	movl	$-2, %r9d
	movl	$1, %ebp
	movl	$1, %r11d
	jmp	.L12
.L40:
	movl	%eax, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L17
.L41:
	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
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800112
	movl	$400004, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	leaq	400032(%rsp), %r12
	movq	%rbp, %rdi
	call	memset@PLT
	movl	$400004, %edx
	xorl	%esi, %esi
	movq	%r12, %rdi
	call	memset@PLT
	leaq	12(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%ebx, %eax
	sarl	%eax
	testb	$1, %bl
	je	.L5
	cltq
	movq	%r13, %rdi
	addl	$1, %ebx
	leaq	0(%rbp,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	%eax, %ebx
	jle	.L7
.L4:
	movl	%eax, %esi
	leaq	cmp(%rip), %r8
	movl	$4, %edx
	movq	%rbp, %rdi
	shrl	$31, %esi
	movq	%r8, %rcx
	addl	%eax, %esi
	sarl	%esi
	movslq	%esi, %rsi
	call	qsort@PLT
	movl	12(%rsp), %eax
	leaq	cmp(%rip), %r8
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	cmpl	$1, %eax
	jle	.L8
	movl	16(%rsp), %edx
	xorl	%eax, %eax
	movl	$1, %ecx
	movl	$1, %ebx
	movl	$-1, %r15d
	movl	$1, %r14d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	%ecx, %ebx
	jl	.L23
	cmpl	%ecx, %r14d
	cmovl	%ecx, %r14d
	movl	$1, %ecx
.L10:
	addq	$1, %rax
	cmpl	%eax, %esi
	jle	.L38
.L11:
	movl	%edx, %edi
	movl	4(%rbp,%rax,4), %edx
	cmpl	%edx, %edi
	jne	.L9
	addq	$1, %rax
	addl	$1, %ecx
	cmpl	%eax, %esi
	jg	.L11
.L38:
	movslq	%esi, %rsi
	movq	%r8, %rcx
	movl	$4, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	12(%rsp), %r10d
	movl	%r10d, %eax
	shrl	$31, %eax
	addl	%r10d, %eax
	sarl	%eax
	cmpl	$1, %r10d
	jle	.L39
.L20:
	movl	400032(%rsp), %esi
	xorl	%ecx, %ecx
	movl	$-2, %r9d
	movl	$1, %ebp
	movl	$1, %edi
	movl	$1, %r11d
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	%r11d, %edi
	jg	.L25
	cmpl	%edi, %ebp
	cmovl	%edi, %ebp
	movl	$1, %edi
.L14:
	addq	$1, %rcx
	cmpl	%ecx, %eax
	jle	.L12
.L15:
	movl	%esi, %r8d
	movl	4(%r12,%rcx,4), %esi
	cmpl	%r8d, %esi
	jne	.L13
	addq	$1, %rcx
	addl	$1, %edi
	cmpl	%ecx, %eax
	jg	.L15
.L12:
	cmpl	%r15d, %r9d
	jne	.L21
	cmpl	%eax, %ebx
	jne	.L18
	cmpl	%r11d, %eax
	je	.L40
.L18:
	leal	(%rbx,%rbp), %edx
	leal	(%r11,%r14), %eax
	cmpl	%eax, %edx
	movl	%r10d, %edx
	jl	.L19
	subl	%ebx, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	subl	%ebp, %edx
	call	__printf_chk@PLT
.L17:
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$800056, %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
.L5:
	.cfi_restore_state
	subl	$1, %eax
	movq	%r13, %rdi
	addl	$1, %ebx
	cltq
	leaq	(%r12,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	%ebx, %eax
	jge	.L7
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L23:
	movl	%ebx, %r14d
	movl	%edi, %r15d
	movl	%ecx, %ebx
	movl	$1, %ecx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L25:
	movl	%r11d, %ebp
	movl	%r8d, %r9d
	movl	%edi, %r11d
	movl	$1, %edi
	jmp	.L14
.L21:
	movl	%r10d, %edx
	subl	%ebx, %edx
.L37:
	subl	%r11d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L17
.L19:
	subl	%r14d, %edx
	jmp	.L37
.L8:
	movq	%r8, %rcx
	movl	$4, %edx
	movslq	%esi, %rsi
	movq	%r12, %rdi
	call	qsort@PLT
	movl	12(%rsp), %r10d
	movl	$2, %ecx
	movl	$1, %r11d
	movl	$1, %ebx
	movl	%r10d, %eax
	cltd
	idivl	%ecx
	cmpl	$1, %r10d
	jle	.L21
	movl	$1, %r14d
	movl	$1, %ebx
	orl	$-1, %r15d
	jmp	.L20
.L39:
	movl	$-2, %r9d
	movl	$1, %ebp
	movl	$1, %r11d
	jmp	.L12
.L40:
	movl	%eax, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L17
.L41:
	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 *(int*)p - *(int*)q;
}

int main(void) {
	int n;
	int v_odd[100001] = { 0 }, v_even[100001] = { 0 };
	int cnt_odd = 1, cnt_even = 1, temp = 1;
	int cnt_odd2 = 1, cnt_even2 = 1;
	int a_odd=-1, a_even=-2, ans;

	scanf("%d", &n);
	for (int i = 1; i <= n; i++) {
		if (i % 2) scanf("%d", &v_odd[i / 2]);
		else scanf("%d", &v_even[i / 2 - 1]);
	}
	qsort(v_odd, n / 2, sizeof(int), cmp);
	for (int i = 0; i < n / 2 ; i++) {
		if (v_odd[i] == v_odd[i + 1])temp++;
		else {
			if (temp > cnt_odd)
				a_odd = v_odd[i], cnt_odd2 = cnt_odd, cnt_odd = temp;
			else if (cnt_odd2 <= temp && temp <= cnt_odd)
				cnt_odd2 = temp;
			temp = 1;
		}
	}
	temp = 1;
	qsort(v_even, n / 2, sizeof(int), cmp);
	for (int i = 0; i < n / 2 ; i++) {
		if (v_even[i] == v_even[i + 1])temp++;
		else {
			if (temp > cnt_even)
				a_even = v_even[i], cnt_even2 = cnt_even, cnt_even = temp;
			else if (cnt_even2 <= temp && temp <= cnt_even)
				cnt_even2 = temp;
			temp = 1;
		}
	}
	if (a_odd != a_even) printf("%d", n - cnt_odd - cnt_even);
	else {
		if (cnt_odd == n / 2 && cnt_even == n / 2) printf("%d", n / 2);
		else if (cnt_odd + cnt_even2 >= cnt_even + cnt_odd2) printf("%d", n - cnt_odd - cnt_even2);
		else printf("%d", n - cnt_odd2 - cnt_even);
	}	
	return 0;
}

4
3 2 3 2
 6
105 119 204 119 105 119
 4
4 1 3 2
 6
105 120 54 119 105 78
 6
105 120 54 119 190 78
 6
105 119 204 119 105 78
 4
4 1 3 0
 6
105 119 54 119 105 78
 4
4 1 3 1
 4
4 1 6 1

0 1 2 3 4 2 2 2 1 1
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 *(int*)p - *(int*)q;
}

int main(void) {
	int n;
	int v_odd[100001] = { 0 }, v_even[100001] = { 0 };
	int cnt_odd = 1, cnt_even = 1, temp = 1;
	int cnt_odd2 = 1, cnt_even2 = 1;
	int a_odd=-1, a_even=-2, ans;

	scanf("%d", &n);
	for (int i = 1; i <= n; i++) {
		if (i % 2) scanf("%d", &v_odd[i / 2]);
		else scanf("%d", &v_even[i / 2 - 1]);
	}
	qsort(v_odd, n / 2, sizeof(int), cmp);
	for (int i = 0; i < n / 2 ; i++) {
		if (v_odd[i] == v_odd[i + 1])temp++;
		else {
			if (temp > cnt_odd)
				a_odd = v_odd[i], cnt_odd2 = cnt_odd, cnt_odd = temp;
			else if (cnt_odd2 <= temp && temp <= cnt_odd)
				cnt_odd2 = temp;
			temp = 1;
		}
	}
	temp = 1;
	qsort(v_even, n / 2, sizeof(int), cmp);
	for (int i = 0; i < n / 2 ; i++) {
		if (v_even[i] == v_even[i + 1])temp++;
		else {
			if (temp > cnt_even)
				a_even = v_even[i], cnt_even2 = cnt_even, cnt_even = temp;
			else if (cnt_even2 <= temp && temp <= cnt_even)
				cnt_even2 = temp;
			temp = 1;
		}
	}
	if (a_odd != a_even) printf("%d", n - cnt_odd - cnt_even);
	else {
		if (cnt_odd == n / 2 && cnt_even == n / 2) printf("%d", n / 2);
		else if (cnt_odd + cnt_even2 >= cnt_even + cnt_odd2) printf("%d", n - cnt_odd - cnt_even2);
		else printf("%d", n - cnt_odd2 - cnt_even);
	}	
	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	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %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"
	.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	$1360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800032(%rbp), %rax
	movl	$400004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-400016(%rbp), %rax
	movl	$400004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -800072(%rbp)
	movl	$1, -800068(%rbp)
	movl	$1, -800064(%rbp)
	movl	$1, -800060(%rbp)
	movl	$1, -800056(%rbp)
	movl	$-1, -800052(%rbp)
	movl	$-2, -800048(%rbp)
	leaq	-800076(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -800044(%rbp)
	jmp	.L4
.L7:
	movl	-800044(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L5
	movl	-800044(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	leaq	-800032(%rbp), %rdx
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L6
.L5:
	movl	-800044(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	subl	$1, %eax
	leaq	-400016(%rbp), %rdx
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L6:
	addl	$1, -800044(%rbp)
.L4:
	movl	-800076(%rbp), %eax
	cmpl	%eax, -800044(%rbp)
	jle	.L7
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rsi
	leaq	-800032(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -800040(%rbp)
	jmp	.L8
.L13:
	movl	-800040(%rbp), %eax
	cltq
	movl	-800032(%rbp,%rax,4), %edx
	movl	-800040(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-800032(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L9
	addl	$1, -800064(%rbp)
	jmp	.L10
.L9:
	movl	-800064(%rbp), %eax
	cmpl	-800072(%rbp), %eax
	jle	.L11
	movl	-800040(%rbp), %eax
	cltq
	movl	-800032(%rbp,%rax,4), %eax
	movl	%eax, -800052(%rbp)
	movl	-800072(%rbp), %eax
	movl	%eax, -800060(%rbp)
	movl	-800064(%rbp), %eax
	movl	%eax, -800072(%rbp)
	jmp	.L12
.L11:
	movl	-800060(%rbp), %eax
	cmpl	-800064(%rbp), %eax
	jg	.L12
	movl	-800064(%rbp), %eax
	cmpl	-800072(%rbp), %eax
	jg	.L12
	movl	-800064(%rbp), %eax
	movl	%eax, -800060(%rbp)
.L12:
	movl	$1, -800064(%rbp)
.L10:
	addl	$1, -800040(%rbp)
.L8:
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -800040(%rbp)
	jl	.L13
	movl	$1, -800064(%rbp)
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rsi
	leaq	-400016(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -800036(%rbp)
	jmp	.L14
.L19:
	movl	-800036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	-800036(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L15
	addl	$1, -800064(%rbp)
	jmp	.L16
.L15:
	movl	-800064(%rbp), %eax
	cmpl	-800068(%rbp), %eax
	jle	.L17
	movl	-800036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movl	%eax, -800048(%rbp)
	movl	-800068(%rbp), %eax
	movl	%eax, -800056(%rbp)
	movl	-800064(%rbp), %eax
	movl	%eax, -800068(%rbp)
	jmp	.L18
.L17:
	movl	-800056(%rbp), %eax
	cmpl	-800064(%rbp), %eax
	jg	.L18
	movl	-800064(%rbp), %eax
	cmpl	-800068(%rbp), %eax
	jg	.L18
	movl	-800064(%rbp), %eax
	movl	%eax, -800056(%rbp)
.L18:
	movl	$1, -800064(%rbp)
.L16:
	addl	$1, -800036(%rbp)
.L14:
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -800036(%rbp)
	jl	.L19
	movl	-800052(%rbp), %eax
	cmpl	-800048(%rbp), %eax
	je	.L20
	movl	-800076(%rbp), %eax
	subl	-800072(%rbp), %eax
	subl	-800068(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L21
.L20:
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -800072(%rbp)
	jne	.L22
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -800068(%rbp)
	jne	.L22
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L21
.L22:
	movl	-800072(%rbp), %edx
	movl	-800056(%rbp), %eax
	addl	%eax, %edx
	movl	-800068(%rbp), %ecx
	movl	-800060(%rbp), %eax
	addl	%ecx, %eax
	cmpl	%eax, %edx
	jl	.L23
	movl	-800076(%rbp), %eax
	subl	-800072(%rbp), %eax
	subl	-800056(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L21
.L23:
	movl	-800076(%rbp), %eax
	subl	-800060(%rbp), %eax
	subl	-800068(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L21:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	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	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %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"
	.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	$1360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800032(%rbp), %rax
	movl	$400004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-400016(%rbp), %rax
	movl	$400004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -800072(%rbp)
	movl	$1, -800068(%rbp)
	movl	$1, -800064(%rbp)
	movl	$1, -800060(%rbp)
	movl	$1, -800056(%rbp)
	movl	$-1, -800052(%rbp)
	movl	$-2, -800048(%rbp)
	leaq	-800076(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -800044(%rbp)
	jmp	.L4
.L7:
	movl	-800044(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L5
	movl	-800044(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	leaq	-800032(%rbp), %rdx
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L6
.L5:
	movl	-800044(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	subl	$1, %eax
	leaq	-400016(%rbp), %rdx
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L6:
	addl	$1, -800044(%rbp)
.L4:
	movl	-800076(%rbp), %eax
	cmpl	%eax, -800044(%rbp)
	jle	.L7
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rsi
	leaq	-800032(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -800040(%rbp)
	jmp	.L8
.L13:
	movl	-800040(%rbp), %eax
	cltq
	movl	-800032(%rbp,%rax,4), %edx
	movl	-800040(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-800032(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L9
	addl	$1, -800064(%rbp)
	jmp	.L10
.L9:
	movl	-800064(%rbp), %eax
	cmpl	-800072(%rbp), %eax
	jle	.L11
	movl	-800040(%rbp), %eax
	cltq
	movl	-800032(%rbp,%rax,4), %eax
	movl	%eax, -800052(%rbp)
	movl	-800072(%rbp), %eax
	movl	%eax, -800060(%rbp)
	movl	-800064(%rbp), %eax
	movl	%eax, -800072(%rbp)
	jmp	.L12
.L11:
	movl	-800060(%rbp), %eax
	cmpl	-800064(%rbp), %eax
	jg	.L12
	movl	-800064(%rbp), %eax
	cmpl	-800072(%rbp), %eax
	jg	.L12
	movl	-800064(%rbp), %eax
	movl	%eax, -800060(%rbp)
.L12:
	movl	$1, -800064(%rbp)
.L10:
	addl	$1, -800040(%rbp)
.L8:
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -800040(%rbp)
	jl	.L13
	movl	$1, -800064(%rbp)
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rsi
	leaq	-400016(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -800036(%rbp)
	jmp	.L14
.L19:
	movl	-800036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	-800036(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L15
	addl	$1, -800064(%rbp)
	jmp	.L16
.L15:
	movl	-800064(%rbp), %eax
	cmpl	-800068(%rbp), %eax
	jle	.L17
	movl	-800036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movl	%eax, -800048(%rbp)
	movl	-800068(%rbp), %eax
	movl	%eax, -800056(%rbp)
	movl	-800064(%rbp), %eax
	movl	%eax, -800068(%rbp)
	jmp	.L18
.L17:
	movl	-800056(%rbp), %eax
	cmpl	-800064(%rbp), %eax
	jg	.L18
	movl	-800064(%rbp), %eax
	cmpl	-800068(%rbp), %eax
	jg	.L18
	movl	-800064(%rbp), %eax
	movl	%eax, -800056(%rbp)
.L18:
	movl	$1, -800064(%rbp)
.L16:
	addl	$1, -800036(%rbp)
.L14:
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -800036(%rbp)
	jl	.L19
	movl	-800052(%rbp), %eax
	cmpl	-800048(%rbp), %eax
	je	.L20
	movl	-800076(%rbp), %eax
	subl	-800072(%rbp), %eax
	subl	-800068(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L21
.L20:
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -800072(%rbp)
	jne	.L22
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -800068(%rbp)
	jne	.L22
	movl	-800076(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L21
.L22:
	movl	-800072(%rbp), %edx
	movl	-800056(%rbp), %eax
	addl	%eax, %edx
	movl	-800068(%rbp), %ecx
	movl	-800060(%rbp), %eax
	addl	%ecx, %eax
	cmpl	%eax, %edx
	jl	.L23
	movl	-800076(%rbp), %eax
	subl	-800072(%rbp), %eax
	subl	-800056(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L21
.L23:
	movl	-800076(%rbp), %eax
	subl	-800060(%rbp), %eax
	subl	-800068(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L21:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	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:
