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

#define min(a, b) ((a>b)?(b):(a))

int qsort_compare_int(const void *a, const void *b)
{
    return *(int *) a - *(int *) b; //昇順
}

int main(int argc, char *argv[])
{
    int n, a, b;
    int p[100];
    int ans;
    int i;
    int a_n, b_n, c_n;

    scanf("%d %d %d", &n, &a, &b);

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

    //qsort(p, n, sizeof(int), qsort_compare_int);

    a_n = 0;
    b_n = 0;
    c_n = 0;
    for (i = 0; i < n; i++) {
        if (p[i] <= a) {
            a_n++;
        } else if (p[i] <= b) {
            b_n++;
        } else {
            c_n++;
        }
    }


    c_n = n - a_n - b_n;
    ans = min(a_n, b_n);
    ans = min(ans, c_n);

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

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	qsort_compare_int
	.type	qsort_compare_int, @function
qsort_compare_int:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	qsort_compare_int, .-qsort_compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.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	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	12(%rsp), %rcx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L19
	leaq	16(%rsp), %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edx
	addq	$4, %rbp
	cmpl	%ebx, %edx
	jg	.L5
	testl	%edx, %edx
	jle	.L19
	leal	-1(%rdx), %eax
	movl	8(%rsp), %edi
	movl	12(%rsp), %r9d
	cmpl	$2, %eax
	jbe	.L20
	movl	%edx, %eax
	movd	%edi, %xmm6
	pxor	%xmm3, %xmm3
	pshufd	$0, %xmm6, %xmm7
	shrl	$2, %eax
	movdqa	%xmm3, %xmm2
	movdqa	%xmm3, %xmm4
	leal	-1(%rax), %ecx
	movd	%r9d, %xmm6
	leaq	16(%r12), %rax
	salq	$4, %rcx
	pshufd	$0, %xmm6, %xmm6
	addq	%rax, %rcx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L25:
	addq	$16, %rax
.L7:
	movdqa	(%r12), %xmm0
	movq	%rax, %r12
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm6, %xmm0
	pcmpgtd	%xmm7, %xmm1
	pcmpeqd	%xmm4, %xmm0
	movdqa	%xmm1, %xmm5
	pcmpeqd	%xmm4, %xmm5
	pand	%xmm0, %xmm1
	psubd	%xmm1, %xmm3
	psubd	%xmm5, %xmm2
	cmpq	%rax, %rcx
	jne	.L25
	movdqa	%xmm3, %xmm0
	movl	%edx, %esi
	psrldq	$8, %xmm0
	andl	$-4, %esi
	paddd	%xmm0, %xmm3
	movdqa	%xmm3, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm3
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	movd	%xmm3, %ecx
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	testb	$3, %dl
	je	.L4
.L6:
	movslq	%esi, %r8
	movl	16(%rsp,%r8,4), %r8d
	cmpl	%r8d, %edi
	jl	.L10
	addl	$1, %eax
.L11:
	leal	1(%rsi), %r8d
	cmpl	%r8d, %edx
	jle	.L4
	movslq	%r8d, %r8
	movl	16(%rsp,%r8,4), %r8d
	cmpl	%r8d, %edi
	jl	.L12
	addl	$1, %eax
.L13:
	addl	$2, %esi
	cmpl	%esi, %edx
	jle	.L4
	movslq	%esi, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %edi
	jge	.L14
	cmpl	%esi, %r9d
	jge	.L26
	.p2align 4,,10
	.p2align 3
.L4:
	cmpl	%ecx, %eax
	movl	%ecx, %esi
	movl	$1, %edi
	cmovle	%eax, %esi
	subl	%eax, %edx
	subl	%ecx, %edx
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$440, %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
.L10:
	.cfi_restore_state
	cmpl	%r8d, %r9d
	jl	.L11
	addl	$1, %ecx
	jmp	.L11
.L12:
	cmpl	%r8d, %r9d
	jl	.L13
	addl	$1, %ecx
	jmp	.L13
.L14:
	addl	$1, %eax
	jmp	.L4
.L26:
	addl	$1, %ecx
	jmp	.L4
.L19:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	.L4
.L20:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	xorl	%esi, %esi
	jmp	.L6
.L27:
	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	qsort_compare_int
	.type	qsort_compare_int, @function
qsort_compare_int:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	qsort_compare_int, .-qsort_compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.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	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	12(%rsp), %rcx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L19
	leaq	16(%rsp), %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edx
	addq	$4, %rbp
	cmpl	%ebx, %edx
	jg	.L5
	testl	%edx, %edx
	jle	.L19
	leal	-1(%rdx), %eax
	movl	8(%rsp), %edi
	movl	12(%rsp), %r9d
	cmpl	$2, %eax
	jbe	.L20
	movl	%edx, %eax
	movd	%edi, %xmm6
	pxor	%xmm3, %xmm3
	pshufd	$0, %xmm6, %xmm7
	shrl	$2, %eax
	movdqa	%xmm3, %xmm2
	movdqa	%xmm3, %xmm4
	leal	-1(%rax), %ecx
	movd	%r9d, %xmm6
	leaq	16(%r12), %rax
	salq	$4, %rcx
	pshufd	$0, %xmm6, %xmm6
	addq	%rax, %rcx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L25:
	addq	$16, %rax
.L7:
	movdqa	(%r12), %xmm0
	movq	%rax, %r12
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm6, %xmm0
	pcmpgtd	%xmm7, %xmm1
	pcmpeqd	%xmm4, %xmm0
	movdqa	%xmm1, %xmm5
	pcmpeqd	%xmm4, %xmm5
	pand	%xmm0, %xmm1
	psubd	%xmm1, %xmm3
	psubd	%xmm5, %xmm2
	cmpq	%rax, %rcx
	jne	.L25
	movdqa	%xmm3, %xmm0
	movl	%edx, %esi
	psrldq	$8, %xmm0
	andl	$-4, %esi
	paddd	%xmm0, %xmm3
	movdqa	%xmm3, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm3
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	movd	%xmm3, %ecx
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	testb	$3, %dl
	je	.L4
.L6:
	movslq	%esi, %r8
	movl	16(%rsp,%r8,4), %r8d
	cmpl	%r8d, %edi
	jl	.L10
	addl	$1, %eax
.L11:
	leal	1(%rsi), %r8d
	cmpl	%r8d, %edx
	jle	.L4
	movslq	%r8d, %r8
	movl	16(%rsp,%r8,4), %r8d
	cmpl	%r8d, %edi
	jl	.L12
	addl	$1, %eax
.L13:
	addl	$2, %esi
	cmpl	%esi, %edx
	jle	.L4
	movslq	%esi, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %edi
	jge	.L14
	cmpl	%esi, %r9d
	jge	.L26
	.p2align 4,,10
	.p2align 3
.L4:
	cmpl	%ecx, %eax
	movl	%ecx, %esi
	movl	$1, %edi
	cmovle	%eax, %esi
	subl	%eax, %edx
	subl	%ecx, %edx
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$440, %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
.L10:
	.cfi_restore_state
	cmpl	%r8d, %r9d
	jl	.L11
	addl	$1, %ecx
	jmp	.L11
.L12:
	cmpl	%r8d, %r9d
	jl	.L13
	addl	$1, %ecx
	jmp	.L13
.L14:
	addl	$1, %eax
	jmp	.L4
.L26:
	addl	$1, %ecx
	jmp	.L4
.L19:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	.L4
.L20:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	xorl	%esi, %esi
	jmp	.L6
.L27:
	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	qsort_compare_int
	.type	qsort_compare_int, @function
qsort_compare_int:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	qsort_compare_int, .-qsort_compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.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	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	12(%rsp), %rcx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L19
	leaq	16(%rsp), %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edx
	addq	$4, %rbp
	cmpl	%ebx, %edx
	jg	.L5
	testl	%edx, %edx
	jle	.L19
	leal	-1(%rdx), %eax
	movl	8(%rsp), %edi
	movl	12(%rsp), %r9d
	cmpl	$2, %eax
	jbe	.L20
	movl	%edx, %eax
	movd	%edi, %xmm6
	pxor	%xmm3, %xmm3
	pshufd	$0, %xmm6, %xmm7
	shrl	$2, %eax
	movdqa	%xmm3, %xmm2
	movdqa	%xmm3, %xmm4
	leal	-1(%rax), %ecx
	movd	%r9d, %xmm6
	leaq	16(%r12), %rax
	salq	$4, %rcx
	pshufd	$0, %xmm6, %xmm6
	addq	%rax, %rcx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L25:
	addq	$16, %rax
.L7:
	movdqa	(%r12), %xmm0
	movq	%rax, %r12
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm6, %xmm0
	pcmpgtd	%xmm7, %xmm1
	pcmpeqd	%xmm4, %xmm0
	movdqa	%xmm1, %xmm5
	pcmpeqd	%xmm4, %xmm5
	pand	%xmm0, %xmm1
	psubd	%xmm1, %xmm3
	psubd	%xmm5, %xmm2
	cmpq	%rax, %rcx
	jne	.L25
	movdqa	%xmm3, %xmm0
	movl	%edx, %esi
	psrldq	$8, %xmm0
	andl	$-4, %esi
	paddd	%xmm0, %xmm3
	movdqa	%xmm3, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm3
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	movd	%xmm3, %ecx
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	testb	$3, %dl
	je	.L4
.L6:
	movslq	%esi, %r8
	movl	16(%rsp,%r8,4), %r8d
	cmpl	%r8d, %edi
	jl	.L10
	addl	$1, %eax
.L11:
	leal	1(%rsi), %r8d
	cmpl	%r8d, %edx
	jle	.L4
	movslq	%r8d, %r8
	movl	16(%rsp,%r8,4), %r8d
	cmpl	%r8d, %edi
	jl	.L12
	addl	$1, %eax
.L13:
	addl	$2, %esi
	cmpl	%esi, %edx
	jle	.L4
	movslq	%esi, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %edi
	jge	.L14
	cmpl	%esi, %r9d
	jge	.L26
	.p2align 4,,10
	.p2align 3
.L4:
	cmpl	%ecx, %eax
	movl	%ecx, %esi
	movl	$1, %edi
	cmovle	%eax, %esi
	subl	%eax, %edx
	subl	%ecx, %edx
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$440, %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
.L10:
	.cfi_restore_state
	cmpl	%r8d, %r9d
	jl	.L11
	addl	$1, %ecx
	jmp	.L11
.L12:
	cmpl	%r8d, %r9d
	jl	.L13
	addl	$1, %ecx
	jmp	.L13
.L14:
	addl	$1, %eax
	jmp	.L4
.L26:
	addl	$1, %ecx
	jmp	.L4
.L19:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	.L4
.L20:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	xorl	%esi, %esi
	jmp	.L6
.L27:
	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>
#include <math.h>

#define min(a, b) ((a>b)?(b):(a))

int qsort_compare_int(const void *a, const void *b)
{
    return *(int *) a - *(int *) b; //昇順
}

int main(int argc, char *argv[])
{
    int n, a, b;
    int p[100];
    int ans;
    int i;
    int a_n, b_n, c_n;

    scanf("%d %d %d", &n, &a, &b);

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

    //qsort(p, n, sizeof(int), qsort_compare_int);

    a_n = 0;
    b_n = 0;
    c_n = 0;
    for (i = 0; i < n; i++) {
        if (p[i] <= a) {
            a_n++;
        } else if (p[i] <= b) {
            b_n++;
        } else {
            c_n++;
        }
    }


    c_n = n - a_n - b_n;
    ans = min(a_n, b_n);
    ans = min(ans, c_n);

    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
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#define min(a, b) ((a>b)?(b):(a))

int qsort_compare_int(const void *a, const void *b)
{
    return *(int *) a - *(int *) b; //昇順
}

int main(int argc, char *argv[])
{
    int n, a, b;
    int p[100];
    int ans;
    int i;
    int a_n, b_n, c_n;

    scanf("%d %d %d", &n, &a, &b);

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

    //qsort(p, n, sizeof(int), qsort_compare_int);

    a_n = 0;
    b_n = 0;
    c_n = 0;
    for (i = 0; i < n; i++) {
        if (p[i] <= a) {
            a_n++;
        } else if (p[i] <= b) {
            b_n++;
        } else {
            c_n++;
        }
    }


    c_n = n - a_n - b_n;
    ans = min(a_n, b_n);
    ans = min(ans, c_n);

    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:

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

#define min(a, b) ((a>b)?(b):(a))

int qsort_compare_int(const void *a, const void *b)
{
    return *(int *) a - *(int *) b; //昇順
}

int main(int argc, char *argv[])
{
    int n, a, b;
    int p[100];
    int ans;
    int i;
    int a_n, b_n, c_n;

    scanf("%d %d %d", &n, &a, &b);

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

    //qsort(p, n, sizeof(int), qsort_compare_int);

    a_n = 0;
    b_n = 0;
    c_n = 0;
    for (i = 0; i < n; i++) {
        if (p[i] <= a) {
            a_n++;
        } else if (p[i] <= b) {
            b_n++;
        } else {
            c_n++;
        }
    }


    c_n = n - a_n - b_n;
    ans = min(a_n, b_n);
    ans = min(ans, c_n);

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

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	qsort_compare_int
	.type	qsort_compare_int, @function
qsort_compare_int:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	qsort_compare_int, .-qsort_compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.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	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	12(%rsp), %rcx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L19
	leaq	16(%rsp), %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edx
	addq	$4, %rbp
	cmpl	%ebx, %edx
	jg	.L5
	testl	%edx, %edx
	jle	.L19
	leal	-1(%rdx), %eax
	movl	8(%rsp), %edi
	movl	12(%rsp), %r9d
	cmpl	$2, %eax
	jbe	.L20
	movl	%edx, %eax
	movd	%edi, %xmm6
	pxor	%xmm3, %xmm3
	pshufd	$0, %xmm6, %xmm7
	shrl	$2, %eax
	movdqa	%xmm3, %xmm2
	movdqa	%xmm3, %xmm4
	leal	-1(%rax), %ecx
	movd	%r9d, %xmm6
	leaq	16(%r12), %rax
	salq	$4, %rcx
	pshufd	$0, %xmm6, %xmm6
	addq	%rax, %rcx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L25:
	addq	$16, %rax
.L7:
	movdqa	(%r12), %xmm0
	movq	%rax, %r12
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm6, %xmm0
	pcmpgtd	%xmm7, %xmm1
	pcmpeqd	%xmm4, %xmm0
	movdqa	%xmm1, %xmm5
	pcmpeqd	%xmm4, %xmm5
	pand	%xmm0, %xmm1
	psubd	%xmm1, %xmm3
	psubd	%xmm5, %xmm2
	cmpq	%rax, %rcx
	jne	.L25
	movdqa	%xmm3, %xmm0
	movl	%edx, %esi
	psrldq	$8, %xmm0
	andl	$-4, %esi
	paddd	%xmm0, %xmm3
	movdqa	%xmm3, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm3
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	movd	%xmm3, %ecx
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	testb	$3, %dl
	je	.L4
.L6:
	movslq	%esi, %r8
	movl	16(%rsp,%r8,4), %r8d
	cmpl	%r8d, %edi
	jl	.L10
	addl	$1, %eax
.L11:
	leal	1(%rsi), %r8d
	cmpl	%r8d, %edx
	jle	.L4
	movslq	%r8d, %r8
	movl	16(%rsp,%r8,4), %r8d
	cmpl	%r8d, %edi
	jl	.L12
	addl	$1, %eax
.L13:
	addl	$2, %esi
	cmpl	%esi, %edx
	jle	.L4
	movslq	%esi, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %edi
	jge	.L14
	cmpl	%esi, %r9d
	jge	.L26
	.p2align 4,,10
	.p2align 3
.L4:
	cmpl	%ecx, %eax
	movl	%ecx, %esi
	movl	$1, %edi
	cmovle	%eax, %esi
	subl	%eax, %edx
	subl	%ecx, %edx
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$440, %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
.L10:
	.cfi_restore_state
	cmpl	%r8d, %r9d
	jl	.L11
	addl	$1, %ecx
	jmp	.L11
.L12:
	cmpl	%r8d, %r9d
	jl	.L13
	addl	$1, %ecx
	jmp	.L13
.L14:
	addl	$1, %eax
	jmp	.L4
.L26:
	addl	$1, %ecx
	jmp	.L4
.L19:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	.L4
.L20:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	xorl	%esi, %esi
	jmp	.L6
.L27:
	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	qsort_compare_int
	.type	qsort_compare_int, @function
qsort_compare_int:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	qsort_compare_int, .-qsort_compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.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	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	12(%rsp), %rcx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L19
	leaq	16(%rsp), %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edx
	addq	$4, %rbp
	cmpl	%ebx, %edx
	jg	.L5
	testl	%edx, %edx
	jle	.L19
	leal	-1(%rdx), %eax
	movl	8(%rsp), %edi
	movl	12(%rsp), %r9d
	cmpl	$2, %eax
	jbe	.L20
	movl	%edx, %eax
	movd	%edi, %xmm6
	pxor	%xmm3, %xmm3
	pshufd	$0, %xmm6, %xmm7
	shrl	$2, %eax
	movdqa	%xmm3, %xmm2
	movdqa	%xmm3, %xmm4
	leal	-1(%rax), %ecx
	movd	%r9d, %xmm6
	leaq	16(%r12), %rax
	salq	$4, %rcx
	pshufd	$0, %xmm6, %xmm6
	addq	%rax, %rcx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L25:
	addq	$16, %rax
.L7:
	movdqa	(%r12), %xmm0
	movq	%rax, %r12
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm6, %xmm0
	pcmpgtd	%xmm7, %xmm1
	pcmpeqd	%xmm4, %xmm0
	movdqa	%xmm1, %xmm5
	pcmpeqd	%xmm4, %xmm5
	pand	%xmm0, %xmm1
	psubd	%xmm1, %xmm3
	psubd	%xmm5, %xmm2
	cmpq	%rax, %rcx
	jne	.L25
	movdqa	%xmm3, %xmm0
	movl	%edx, %esi
	psrldq	$8, %xmm0
	andl	$-4, %esi
	paddd	%xmm0, %xmm3
	movdqa	%xmm3, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm3
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	movd	%xmm3, %ecx
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	testb	$3, %dl
	je	.L4
.L6:
	movslq	%esi, %r8
	movl	16(%rsp,%r8,4), %r8d
	cmpl	%r8d, %edi
	jl	.L10
	addl	$1, %eax
.L11:
	leal	1(%rsi), %r8d
	cmpl	%r8d, %edx
	jle	.L4
	movslq	%r8d, %r8
	movl	16(%rsp,%r8,4), %r8d
	cmpl	%r8d, %edi
	jl	.L12
	addl	$1, %eax
.L13:
	addl	$2, %esi
	cmpl	%esi, %edx
	jle	.L4
	movslq	%esi, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %edi
	jge	.L14
	cmpl	%esi, %r9d
	jge	.L26
	.p2align 4,,10
	.p2align 3
.L4:
	cmpl	%ecx, %eax
	movl	%ecx, %esi
	movl	$1, %edi
	cmovle	%eax, %esi
	subl	%eax, %edx
	subl	%ecx, %edx
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$440, %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
.L10:
	.cfi_restore_state
	cmpl	%r8d, %r9d
	jl	.L11
	addl	$1, %ecx
	jmp	.L11
.L12:
	cmpl	%r8d, %r9d
	jl	.L13
	addl	$1, %ecx
	jmp	.L13
.L14:
	addl	$1, %eax
	jmp	.L4
.L26:
	addl	$1, %ecx
	jmp	.L4
.L19:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	.L4
.L20:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	xorl	%esi, %esi
	jmp	.L6
.L27:
	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:
```