Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
//d.c D-Islands War
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>

typedef struct{
    int a;
    int b;
}island;

int cmp(const void *b1,const void *b2){
    if(((island*)b1)->b > ((island*)b2)->b){
        return 1;
    }else if(((island*)b1)->b < ((island*)b2)->b){
        return -1;
    }else{
        return 0;
    }
}

int main(void){
    int n,m,x=-1,ans=0;
    scanf("%d %d",&n,&m);
    island war[m];
    for(int i=0;i<m;++i){
        scanf("%d %d",&(war[i].a),&(war[i].b));
    }

    qsort(war,m,sizeof(island),cmp);

    for(int i=0;i<m;++i){
        if(war[i].a<=x){
            //do nothing
        }else{
            x = war[i].b - 1;
            ans++;
        }
    }

    printf("%d\n",ans);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	4(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, 4(%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-44(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,8), %rdx
	movq	%rsi, %rax
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L7
.L22:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L22
.L7:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L23
.L8:
	movq	%rsp, %rbx
	testl	%eax, %eax
	jle	.L9
	movq	%rbx, %r12
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	4(%r12), %rdx
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	addl	$1, %r13d
	addq	$8, %r12
	cmpl	%r13d, %eax
	jg	.L10
	movslq	%eax, %rsi
.L9:
	movl	$8, %edx
	leaq	cmp(%rip), %rcx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	-44(%rbp), %edx
	testl	%edx, %edx
	jle	.L15
	leaq	(%rbx,%rdx,8), %rcx
	movq	%rbx, %rax
	xorl	%r8d, %r8d
	movl	$-1, %edx
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	%edx, (%rax)
	jle	.L12
	movl	4(%rax), %ebx
	addl	$1, %r8d
	leal	-1(%rbx), %edx
.L12:
	addq	$8, %rax
	cmpq	%rax, %rcx
	jne	.L13
.L11:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L24
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L23:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L8
.L15:
	xorl	%r8d, %r8d
	jmp	.L11
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	4(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, 4(%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-44(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,8), %rdx
	movq	%rsi, %rax
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L7
.L22:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L22
.L7:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L23
.L8:
	movq	%rsp, %rbx
	testl	%eax, %eax
	jle	.L9
	movq	%rbx, %r12
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	4(%r12), %rdx
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	addl	$1, %r13d
	addq	$8, %r12
	cmpl	%r13d, %eax
	jg	.L10
	movslq	%eax, %rsi
.L9:
	movl	$8, %edx
	leaq	cmp(%rip), %rcx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	-44(%rbp), %edx
	testl	%edx, %edx
	jle	.L15
	leaq	(%rbx,%rdx,8), %rcx
	movq	%rbx, %rax
	xorl	%r8d, %r8d
	movl	$-1, %edx
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	%edx, (%rax)
	jle	.L12
	movl	4(%rax), %ebx
	addl	$1, %r8d
	leal	-1(%rbx), %edx
.L12:
	addq	$8, %rax
	cmpq	%rax, %rcx
	jne	.L13
.L11:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L24
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L23:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L8
.L15:
	xorl	%r8d, %r8d
	jmp	.L11
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	4(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, 4(%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-44(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,8), %rdx
	movq	%rsi, %rax
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L7
.L22:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L22
.L7:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L23
.L8:
	movq	%rsp, %rbx
	testl	%eax, %eax
	jle	.L9
	movq	%rbx, %r12
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	4(%r12), %rdx
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	addl	$1, %r13d
	addq	$8, %r12
	cmpl	%r13d, %eax
	jg	.L10
	movslq	%eax, %rsi
.L9:
	movl	$8, %edx
	leaq	cmp(%rip), %rcx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	-44(%rbp), %edx
	testl	%edx, %edx
	jle	.L15
	leaq	(%rbx,%rdx,8), %rcx
	movq	%rbx, %rax
	xorl	%r8d, %r8d
	movl	$-1, %edx
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	%edx, (%rax)
	jle	.L12
	movl	4(%rax), %ebx
	addl	$1, %r8d
	leal	-1(%rbx), %edx
.L12:
	addq	$8, %rax
	cmpq	%rax, %rcx
	jne	.L13
.L11:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L24
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L23:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L8
.L15:
	xorl	%r8d, %r8d
	jmp	.L11
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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:
```
```c
//d.c D-Islands War
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>

typedef struct{
    int a;
    int b;
}island;

int cmp(const void *b1,const void *b2){
    if(((island*)b1)->b > ((island*)b2)->b){
        return 1;
    }else if(((island*)b1)->b < ((island*)b2)->b){
        return -1;
    }else{
        return 0;
    }
}

int main(void){
    int n,m,x=-1,ans=0;
    scanf("%d %d",&n,&m);
    island war[m];
    for(int i=0;i<m;++i){
        scanf("%d %d",&(war[i].a),&(war[i].b));
    }

    qsort(war,m,sizeof(island),cmp);

    for(int i=0;i<m;++i){
        if(war[i].a<=x){
            //do nothing
        }else{
            x = war[i].b - 1;
            ans++;
        }
    }

    printf("%d\n",ans);
    return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
//d.c D-Islands War
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>

typedef struct{
    int a;
    int b;
}island;

int cmp(const void *b1,const void *b2){
    if(((island*)b1)->b > ((island*)b2)->b){
        return 1;
    }else if(((island*)b1)->b < ((island*)b2)->b){
        return -1;
    }else{
        return 0;
    }
}

int main(void){
    int n,m,x=-1,ans=0;
    scanf("%d %d",&n,&m);
    island war[m];
    for(int i=0;i<m;++i){
        scanf("%d %d",&(war[i].a),&(war[i].b));
    }

    qsort(war,m,sizeof(island),cmp);

    for(int i=0;i<m;++i){
        if(war[i].a<=x){
            //do nothing
        }else{
            x = war[i].b - 1;
            ans++;
        }
    }

    printf("%d\n",ans);
    return 0;
}```

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.
Optimized Assembly Code:

5 2
2 4
2 5
 9 5
1 8
2 7
3 5
4 6
7 5
 5 10
1 2
1 4
1 4
1 5
2 3
2 4
2 5
3 4
3 5
4 5
 5 10
1 2
1 3
1 4
1 5
2 3
2 4
2 5
3 5
3 5
4 5
 5 2
1 5
2 5
 5 1
1 5
2 5
 5 1
0 5
2 5
 5 2
1 4
2 8
 9 5
2 8
2 7
3 5
4 6
7 5
 5 2
0 5
2 5

1
 2
 4
 3
 1
 1
 1
 1
 2
 1

Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
//d.c D-Islands War
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>

typedef struct{
    int a;
    int b;
}island;

int cmp(const void *b1,const void *b2){
    if(((island*)b1)->b > ((island*)b2)->b){
        return 1;
    }else if(((island*)b1)->b < ((island*)b2)->b){
        return -1;
    }else{
        return 0;
    }
}

int main(void){
    int n,m,x=-1,ans=0;
    scanf("%d %d",&n,&m);
    island war[m];
    for(int i=0;i<m;++i){
        scanf("%d %d",&(war[i].a),&(war[i].b));
    }

    qsort(war,m,sizeof(island),cmp);

    for(int i=0;i<m;++i){
        if(war[i].a<=x){
            //do nothing
        }else{
            x = war[i].b - 1;
            ans++;
        }
    }

    printf("%d\n",ans);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	4(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, 4(%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-44(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,8), %rdx
	movq	%rsi, %rax
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L7
.L22:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L22
.L7:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L23
.L8:
	movq	%rsp, %rbx
	testl	%eax, %eax
	jle	.L9
	movq	%rbx, %r12
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	4(%r12), %rdx
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	addl	$1, %r13d
	addq	$8, %r12
	cmpl	%r13d, %eax
	jg	.L10
	movslq	%eax, %rsi
.L9:
	movl	$8, %edx
	leaq	cmp(%rip), %rcx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	-44(%rbp), %edx
	testl	%edx, %edx
	jle	.L15
	leaq	(%rbx,%rdx,8), %rcx
	movq	%rbx, %rax
	xorl	%r8d, %r8d
	movl	$-1, %edx
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	%edx, (%rax)
	jle	.L12
	movl	4(%rax), %ebx
	addl	$1, %r8d
	leal	-1(%rbx), %edx
.L12:
	addq	$8, %rax
	cmpq	%rax, %rcx
	jne	.L13
.L11:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L24
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L23:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L8
.L15:
	xorl	%r8d, %r8d
	jmp	.L11
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	4(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, 4(%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-44(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,8), %rdx
	movq	%rsi, %rax
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L7
.L22:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L22
.L7:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L23
.L8:
	movq	%rsp, %rbx
	testl	%eax, %eax
	jle	.L9
	movq	%rbx, %r12
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	4(%r12), %rdx
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	addl	$1, %r13d
	addq	$8, %r12
	cmpl	%r13d, %eax
	jg	.L10
	movslq	%eax, %rsi
.L9:
	movl	$8, %edx
	leaq	cmp(%rip), %rcx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	-44(%rbp), %edx
	testl	%edx, %edx
	jle	.L15
	leaq	(%rbx,%rdx,8), %rcx
	movq	%rbx, %rax
	xorl	%r8d, %r8d
	movl	$-1, %edx
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	%edx, (%rax)
	jle	.L12
	movl	4(%rax), %ebx
	addl	$1, %r8d
	leal	-1(%rbx), %edx
.L12:
	addq	$8, %rax
	cmpq	%rax, %rcx
	jne	.L13
.L11:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L24
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L23:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L8
.L15:
	xorl	%r8d, %r8d
	jmp	.L11
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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:
```