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 max(X, Y) ((X) > (Y) ? (X) : (Y))

typedef struct {
	int value;
	int indx;
} Pair;

int cmp(const Pair *x, const Pair *y);

int n;
Pair p[200005];

int main()
{
	int s, e;
	int m_len = 0;

	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%d", &p[i].value);
		p[i].indx = i;
	}

	qsort(p, n, sizeof(Pair), (int (*)(const void *, const void *))cmp);

	s = e = 0;
	while (e < n) {

		while (p[e + 1].indx > p[e].indx) {
			e++;
		}

		m_len = max(m_len, e - s + 1);
		s = e = e + 1;
	}

	printf("%d\n", n - m_len);

	return 0;
}

int cmp(const Pair *x, const Pair *y)
{
	if (x->value > y->value) {
		return 1;
	} else if (x->value == y->value) {
		if (x->indx > y->indx) {
			return 1;
		} else if (x->indx == y->indx) {
			return 0;
		} else {
			return -1;
		}
	} else {
		return -1;
	}
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 1600040
p:
	.zero	1600040
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.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
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	p(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+p(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L3
	movl	n(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	p(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L4
.L6:
	addl	$1, -12(%rbp)
.L5:
	movl	-12(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+p(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L6
	movl	-12(%rbp), %eax
	subl	-16(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8(%rbp), %eax
	cmpl	%edx, %eax
	cmovl	%edx, %eax
	movl	%eax, -8(%rbp)
	addl	$1, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
.L4:
	movl	n(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L5
	movl	n(%rip), %eax
	subl	-8(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	cmp
	.type	cmp, @function
cmp:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L10
	movl	$1, %eax
	jmp	.L11
.L10:
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jne	.L12
	movq	-8(%rbp), %rax
	movl	4(%rax), %edx
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jle	.L13
	movl	$1, %eax
	jmp	.L11
.L13:
	movq	-8(%rbp), %rax
	movl	4(%rax), %edx
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jne	.L14
	movl	$0, %eax
	jmp	.L11
.L14:
	movl	$-1, %eax
	jmp	.L11
.L12:
	movl	$-1, %eax
.L11:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmp, .-cmp
	.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:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, (%rdi)
	jg	.L1
	movl	$-1, %eax
	jne	.L1
	movl	4(%rsi), %ecx
	movl	$1, %eax
	cmpl	%ecx, 4(%rdi)
	jg	.L1
	setne	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE40:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\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
	leaq	.LC0(%rip), %r13
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	p(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L8
	movq	%rbx, %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$8, %r12
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	movl	%ebp, -4(%r12)
	addl	$1, %ebp
	cmpl	%ebp, %eax
	jg	.L9
.L8:
	movl	$8, %edx
	movslq	%eax, %rsi
	leaq	cmp(%rip), %rcx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	n(%rip), %edx
	xorl	%r10d, %r10d
	testl	%edx, %edx
	jle	.L10
	xorl	%r9d, %r9d
	leaq	4+p(%rip), %r11
	.p2align 4,,10
	.p2align 3
.L12:
	movslq	%r9d, %rax
	movl	(%r11,%rax,8), %esi
	leaq	(%rbx,%rax,8), %rcx
	movl	%r9d, %eax
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%esi, %edi
	movl	12(%rcx), %esi
	movl	%eax, %r8d
	addq	$8, %rcx
	addl	$1, %eax
	cmpl	%edi, %esi
	jg	.L11
	subl	%r9d, %r8d
	addl	$1, %r8d
	cmpl	%r8d, %r10d
	cmovl	%r8d, %r10d
	cmpl	%edx, %eax
	jge	.L10
	movl	%eax, %r9d
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	subl	%r10d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	p
	.bss
	.align 32
	.type	p, @object
	.size	p, 1600040
p:
	.zero	1600040
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, (%rdi)
	jg	.L1
	movl	$-1, %eax
	jne	.L1
	movl	4(%rsi), %ecx
	movl	$1, %eax
	cmpl	%ecx, 4(%rdi)
	jg	.L1
	setne	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE40:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\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
	leaq	.LC0(%rip), %r13
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	p(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L8
	movq	%rbx, %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$8, %r12
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	movl	%ebp, -4(%r12)
	addl	$1, %ebp
	cmpl	%ebp, %eax
	jg	.L9
.L8:
	movl	$8, %edx
	movslq	%eax, %rsi
	leaq	cmp(%rip), %rcx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	n(%rip), %edx
	xorl	%r10d, %r10d
	testl	%edx, %edx
	jle	.L10
	xorl	%r9d, %r9d
	leaq	4+p(%rip), %r11
	.p2align 4,,10
	.p2align 3
.L12:
	movslq	%r9d, %rax
	movl	(%r11,%rax,8), %esi
	leaq	(%rbx,%rax,8), %rcx
	movl	%r9d, %eax
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%esi, %edi
	movl	12(%rcx), %esi
	movl	%eax, %r8d
	addq	$8, %rcx
	addl	$1, %eax
	cmpl	%edi, %esi
	jg	.L11
	subl	%r9d, %r8d
	addl	$1, %r8d
	cmpl	%r8d, %r10d
	cmovl	%r8d, %r10d
	cmpl	%edx, %eax
	jge	.L10
	movl	%eax, %r9d
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	subl	%r10d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	p
	.bss
	.align 32
	.type	p, @object
	.size	p, 1600040
p:
	.zero	1600040
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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 max(X, Y) ((X) > (Y) ? (X) : (Y))

typedef struct {
	int value;
	int indx;
} Pair;

int cmp(const Pair *x, const Pair *y);

int n;
Pair p[200005];

int main()
{
	int s, e;
	int m_len = 0;

	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%d", &p[i].value);
		p[i].indx = i;
	}

	qsort(p, n, sizeof(Pair), (int (*)(const void *, const void *))cmp);

	s = e = 0;
	while (e < n) {

		while (p[e + 1].indx > p[e].indx) {
			e++;
		}

		m_len = max(m_len, e - s + 1);
		s = e = e + 1;
	}

	printf("%d\n", n - m_len);

	return 0;
}

int cmp(const Pair *x, const Pair *y)
{
	if (x->value > y->value) {
		return 1;
	} else if (x->value == y->value) {
		if (x->indx > y->indx) {
			return 1;
		} else if (x->indx == y->indx) {
			return 0;
		} else {
			return -1;
		}
	} else {
		return -1;
	}
}

6
2
3
5
1
4
6
 8
6
3
2
1
7
4
8
5
 4
1
4
2
3
 6
3
1
5
2
4
6
 4
3
1
2
4
 8
6
3
1
2
5
4
8
7
 4
2
4
1
3
 8
6
3
2
1
4
7
8
5
 6
2
5
3
1
4
6
 8
6
3
2
1
7
4
5
8

3
 5
 1
 4
 2
 6
 2
 5
 3
 5

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 max(X, Y) ((X) > (Y) ? (X) : (Y))

typedef struct {
	int value;
	int indx;
} Pair;

int cmp(const Pair *x, const Pair *y);

int n;
Pair p[200005];

int main()
{
	int s, e;
	int m_len = 0;

	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%d", &p[i].value);
		p[i].indx = i;
	}

	qsort(p, n, sizeof(Pair), (int (*)(const void *, const void *))cmp);

	s = e = 0;
	while (e < n) {

		while (p[e + 1].indx > p[e].indx) {
			e++;
		}

		m_len = max(m_len, e - s + 1);
		s = e = e + 1;
	}

	printf("%d\n", n - m_len);

	return 0;
}

int cmp(const Pair *x, const Pair *y)
{
	if (x->value > y->value) {
		return 1;
	} else if (x->value == y->value) {
		if (x->indx > y->indx) {
			return 1;
		} else if (x->indx == y->indx) {
			return 0;
		} else {
			return -1;
		}
	} else {
		return -1;
	}
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 1600040
p:
	.zero	1600040
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.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
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	p(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+p(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L3
	movl	n(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	p(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L4
.L6:
	addl	$1, -12(%rbp)
.L5:
	movl	-12(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+p(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L6
	movl	-12(%rbp), %eax
	subl	-16(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8(%rbp), %eax
	cmpl	%edx, %eax
	cmovl	%edx, %eax
	movl	%eax, -8(%rbp)
	addl	$1, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
.L4:
	movl	n(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L5
	movl	n(%rip), %eax
	subl	-8(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	cmp
	.type	cmp, @function
cmp:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L10
	movl	$1, %eax
	jmp	.L11
.L10:
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jne	.L12
	movq	-8(%rbp), %rax
	movl	4(%rax), %edx
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jle	.L13
	movl	$1, %eax
	jmp	.L11
.L13:
	movq	-8(%rbp), %rax
	movl	4(%rax), %edx
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jne	.L14
	movl	$0, %eax
	jmp	.L11
.L14:
	movl	$-1, %eax
	jmp	.L11
.L12:
	movl	$-1, %eax
.L11:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmp, .-cmp
	.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	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 1600040
p:
	.zero	1600040
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.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
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	p(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+p(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L3
	movl	n(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	p(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L4
.L6:
	addl	$1, -12(%rbp)
.L5:
	movl	-12(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+p(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L6
	movl	-12(%rbp), %eax
	subl	-16(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8(%rbp), %eax
	cmpl	%edx, %eax
	cmovl	%edx, %eax
	movl	%eax, -8(%rbp)
	addl	$1, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
.L4:
	movl	n(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L5
	movl	n(%rip), %eax
	subl	-8(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	cmp
	.type	cmp, @function
cmp:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L10
	movl	$1, %eax
	jmp	.L11
.L10:
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jne	.L12
	movq	-8(%rbp), %rax
	movl	4(%rax), %edx
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jle	.L13
	movl	$1, %eax
	jmp	.L11
.L13:
	movq	-8(%rbp), %rax
	movl	4(%rax), %edx
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jne	.L14
	movl	$0, %eax
	jmp	.L11
.L14:
	movl	$-1, %eax
	jmp	.L11
.L12:
	movl	$-1, %eax
.L11:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmp, .-cmp
	.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:
