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

```c
#include <stdio.h>
#include <stdlib.h>

int cmp(const void *a, const void *b) {
    return *(int*)a - *(int*)b;
}

int main() {
    int i, N, A, B, *P;
    int size[3] = {0};
    if (scanf("%d%*c%d%*c%d%*c", &N, &A, &B) == -1) return -1;
    P = (int *)malloc(sizeof(int) * N);
    if (!P) return -1;
    for (i = 0; i < N; i++) {
        if (scanf("%d%*c", &P[i]) == -1) return -1;
        if (P[i] <= A) size[0]++;
        else if (P[i] >= A + 1 && P[i] <= B) size[1]++;
        else if (P[i] >= B + 1) size[2]++;
    }
    qsort(size, 3, sizeof(int), cmp);
    if (size[0] == 0) {
        printf("0\n");
        return 0;
    }
    else printf("%d\n", size[0]);
    free(P);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%*c%d%*c%d%*c"
.LC1:
	.string	"%d%*c"
.LC2:
	.string	"0"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	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
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rcx
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	movq	$0, 12(%rsp)
	movl	$0, 20(%rsp)
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L6
	movslq	(%rsp), %rdi
	movq	%rdi, %rbx
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rax, %r13
	testq	%rax, %rax
	je	.L6
	testl	%ebx, %ebx
	jle	.L7
	movq	%rax, %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r12
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L22:
	addl	$1, 12(%rsp)
.L9:
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, (%rsp)
	jle	.L7
.L11:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L6
	movl	(%rbx), %eax
	cmpl	4(%rsp), %eax
	jle	.L22
	cmpl	8(%rsp), %eax
	jle	.L23
	addl	$1, 20(%rsp)
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, (%rsp)
	jg	.L11
.L7:
	leaq	12(%rsp), %rdi
	movl	$4, %edx
	movl	$3, %esi
	leaq	cmp(%rip), %rcx
	call	qsort@PLT
	movl	12(%rsp), %r12d
	testl	%r12d, %r12d
	je	.L24
	movl	%r12d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%r13, %rdi
	xorl	%r12d, %r12d
	call	free@PLT
.L3:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movl	%r12d, %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
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	addl	$1, 16(%rsp)
	jmp	.L9
.L6:
	orl	$-1, %r12d
	jmp	.L3
.L24:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L3
.L25:
	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	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%*c%d%*c%d%*c"
.LC1:
	.string	"%d%*c"
.LC2:
	.string	"0"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	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
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rcx
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	movq	$0, 12(%rsp)
	movl	$0, 20(%rsp)
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L6
	movslq	(%rsp), %rdi
	movq	%rdi, %rbx
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rax, %r13
	testq	%rax, %rax
	je	.L6
	testl	%ebx, %ebx
	jle	.L7
	movq	%rax, %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r12
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L22:
	addl	$1, 12(%rsp)
.L9:
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, (%rsp)
	jle	.L7
.L11:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L6
	movl	(%rbx), %eax
	cmpl	4(%rsp), %eax
	jle	.L22
	cmpl	8(%rsp), %eax
	jle	.L23
	addl	$1, 20(%rsp)
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, (%rsp)
	jg	.L11
.L7:
	leaq	12(%rsp), %rdi
	movl	$4, %edx
	movl	$3, %esi
	leaq	cmp(%rip), %rcx
	call	qsort@PLT
	movl	12(%rsp), %r12d
	testl	%r12d, %r12d
	je	.L24
	movl	%r12d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%r13, %rdi
	xorl	%r12d, %r12d
	call	free@PLT
.L3:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movl	%r12d, %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
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	addl	$1, 16(%rsp)
	jmp	.L9
.L6:
	orl	$-1, %r12d
	jmp	.L3
.L24:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L3
.L25:
	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	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%*c%d%*c%d%*c"
.LC1:
	.string	"%d%*c"
.LC2:
	.string	"0"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	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
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rcx
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	movq	$0, 12(%rsp)
	movl	$0, 20(%rsp)
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L6
	movslq	(%rsp), %rdi
	movq	%rdi, %rbx
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rax, %r13
	testq	%rax, %rax
	je	.L6
	testl	%ebx, %ebx
	jle	.L7
	movq	%rax, %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r12
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L22:
	addl	$1, 12(%rsp)
.L9:
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, (%rsp)
	jle	.L7
.L11:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L6
	movl	(%rbx), %eax
	cmpl	4(%rsp), %eax
	jle	.L22
	cmpl	8(%rsp), %eax
	jle	.L23
	addl	$1, 20(%rsp)
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, (%rsp)
	jg	.L11
.L7:
	leaq	12(%rsp), %rdi
	movl	$4, %edx
	movl	$3, %esi
	leaq	cmp(%rip), %rcx
	call	qsort@PLT
	movl	12(%rsp), %r12d
	testl	%r12d, %r12d
	je	.L24
	movl	%r12d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%r13, %rdi
	xorl	%r12d, %r12d
	call	free@PLT
.L3:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movl	%r12d, %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
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	addl	$1, 16(%rsp)
	jmp	.L9
.L6:
	orl	$-1, %r12d
	jmp	.L3
.L24:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L3
.L25:
	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
#include <stdio.h>
#include <stdlib.h>

int cmp(const void *a, const void *b) {
    return *(int*)a - *(int*)b;
}

int main() {
    int i, N, A, B, *P;
    int size[3] = {0};
    if (scanf("%d%*c%d%*c%d%*c", &N, &A, &B) == -1) return -1;
    P = (int *)malloc(sizeof(int) * N);
    if (!P) return -1;
    for (i = 0; i < N; i++) {
        if (scanf("%d%*c", &P[i]) == -1) return -1;
        if (P[i] <= A) size[0]++;
        else if (P[i] >= A + 1 && P[i] <= B) size[1]++;
        else if (P[i] >= B + 1) size[2]++;
    }
    qsort(size, 3, sizeof(int), cmp);
    if (size[0] == 0) {
        printf("0\n");
        return 0;
    }
    else printf("%d\n", size[0]);
    free(P);
    return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>

int cmp(const void *a, const void *b) {
    return *(int*)a - *(int*)b;
}

int main() {
    int i, N, A, B, *P;
    int size[3] = {0};
    if (scanf("%d%*c%d%*c%d%*c", &N, &A, &B) == -1) return -1;
    P = (int *)malloc(sizeof(int) * N);
    if (!P) return -1;
    for (i = 0; i < N; i++) {
        if (scanf("%d%*c", &P[i]) == -1) return -1;
        if (P[i] <= A) size[0]++;
        else if (P[i] >= A + 1 && P[i] <= B) size[1]++;
        else if (P[i] >= B + 1) size[2]++;
    }
    qsort(size, 3, sizeof(int), cmp);
    if (size[0] == 0) {
        printf("0\n");
        return 0;
    }
    else printf("%d\n", size[0]);
    free(P);
    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:

3
5 11
5 6 10
 7
5 15
1 10 28 2 7 20 12
 8
3 8
5 5 5 2 10 10 15 20
 3
5 11
5 6 4
 7
5 15
1 13 28 2 7 20 12
 8
3 8
5 5 5 2 10 12 15 20
 3
5 11
5 6 3
 7
5 21
1 13 28 2 7 20 12
 8
3 8
5 5 5 2 9 12 15 20
 3
6 11
5 6 3

0
 2
 1
 0
 2
 1
 0
 1
 1
 0

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

```c
#include <stdio.h>
#include <stdlib.h>

int cmp(const void *a, const void *b) {
    return *(int*)a - *(int*)b;
}

int main() {
    int i, N, A, B, *P;
    int size[3] = {0};
    if (scanf("%d%*c%d%*c%d%*c", &N, &A, &B) == -1) return -1;
    P = (int *)malloc(sizeof(int) * N);
    if (!P) return -1;
    for (i = 0; i < N; i++) {
        if (scanf("%d%*c", &P[i]) == -1) return -1;
        if (P[i] <= A) size[0]++;
        else if (P[i] >= A + 1 && P[i] <= B) size[1]++;
        else if (P[i] >= B + 1) size[2]++;
    }
    qsort(size, 3, sizeof(int), cmp);
    if (size[0] == 0) {
        printf("0\n");
        return 0;
    }
    else printf("%d\n", size[0]);
    free(P);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%*c%d%*c%d%*c"
.LC1:
	.string	"%d%*c"
.LC2:
	.string	"0"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	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
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rcx
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	movq	$0, 12(%rsp)
	movl	$0, 20(%rsp)
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L6
	movslq	(%rsp), %rdi
	movq	%rdi, %rbx
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rax, %r13
	testq	%rax, %rax
	je	.L6
	testl	%ebx, %ebx
	jle	.L7
	movq	%rax, %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r12
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L22:
	addl	$1, 12(%rsp)
.L9:
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, (%rsp)
	jle	.L7
.L11:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L6
	movl	(%rbx), %eax
	cmpl	4(%rsp), %eax
	jle	.L22
	cmpl	8(%rsp), %eax
	jle	.L23
	addl	$1, 20(%rsp)
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, (%rsp)
	jg	.L11
.L7:
	leaq	12(%rsp), %rdi
	movl	$4, %edx
	movl	$3, %esi
	leaq	cmp(%rip), %rcx
	call	qsort@PLT
	movl	12(%rsp), %r12d
	testl	%r12d, %r12d
	je	.L24
	movl	%r12d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%r13, %rdi
	xorl	%r12d, %r12d
	call	free@PLT
.L3:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movl	%r12d, %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
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	addl	$1, 16(%rsp)
	jmp	.L9
.L6:
	orl	$-1, %r12d
	jmp	.L3
.L24:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L3
.L25:
	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	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%*c%d%*c%d%*c"
.LC1:
	.string	"%d%*c"
.LC2:
	.string	"0"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	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
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rcx
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	movq	$0, 12(%rsp)
	movl	$0, 20(%rsp)
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L6
	movslq	(%rsp), %rdi
	movq	%rdi, %rbx
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rax, %r13
	testq	%rax, %rax
	je	.L6
	testl	%ebx, %ebx
	jle	.L7
	movq	%rax, %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r12
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L22:
	addl	$1, 12(%rsp)
.L9:
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, (%rsp)
	jle	.L7
.L11:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L6
	movl	(%rbx), %eax
	cmpl	4(%rsp), %eax
	jle	.L22
	cmpl	8(%rsp), %eax
	jle	.L23
	addl	$1, 20(%rsp)
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, (%rsp)
	jg	.L11
.L7:
	leaq	12(%rsp), %rdi
	movl	$4, %edx
	movl	$3, %esi
	leaq	cmp(%rip), %rcx
	call	qsort@PLT
	movl	12(%rsp), %r12d
	testl	%r12d, %r12d
	je	.L24
	movl	%r12d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%r13, %rdi
	xorl	%r12d, %r12d
	call	free@PLT
.L3:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movl	%r12d, %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
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	addl	$1, 16(%rsp)
	jmp	.L9
.L6:
	orl	$-1, %r12d
	jmp	.L3
.L24:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L3
.L25:
	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:
```