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

```c
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef long long int ll;
void swap(ll *x, ll *y) {
    ll temp;
    temp = *x;
    *x = *y;
    *y = temp;
}
ll asc(const void *a, const void *b) { return *(ll *)a - *(ll *)b; }
ll desc(const void *a, const void *b) { return *(ll *)b - *(ll *)a; }
ll max(ll x, ll y) { return x > y ? x : y; }
ll min(ll x, ll y) { return x > y ? y : x; }
/*void
 * qsort(配列のアドレス,配列のサイズ,sizeof(配列の型のサイズ),比較関数(昇順or降順))
 */

int main(){
    int n,p[500],a,b;
    int cnt1,cnt2,cnt3;
    cnt1=cnt2=cnt3=0;

    scanf("%d",&n);
    scanf("%d %d",&a,&b);
    for(int i=0;i<n;i++)scanf("%d",&p[i]);

    for(int i=0;i<n;i++){
        if(p[i]<=a)cnt1++;
        if(a+1<=p[i]&&p[i]<=b)cnt2++;
        if(b+1<=p[i])cnt3++;
    }
    int min=999;
    if(min>cnt1)min=cnt1;
    if(min>cnt2)min=cnt2;
    if(min>cnt3)min=cnt3;
    printf("%d\n",min);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	swap
	.type	swap, @function
swap:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-32(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	swap, .-swap
	.globl	asc
	.type	asc, @function
asc:
.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	asc, .-asc
	.globl	desc
	.type	desc, @function
desc:
.LFB8:
	.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	-16(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	(%rax), %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	desc, .-desc
	.globl	max
	.type	max, @function
max:
.LFB9:
	.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	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.LFB10:
	.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), %rdx
	movq	-16(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	min, .-min
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$2064, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -2032(%rbp)
	movl	-2032(%rbp), %eax
	movl	%eax, -2036(%rbp)
	movl	-2036(%rbp), %eax
	movl	%eax, -2040(%rbp)
	leaq	-2052(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-2044(%rbp), %rdx
	leaq	-2048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -2028(%rbp)
	jmp	.L11
.L12:
	leaq	-2016(%rbp), %rdx
	movl	-2028(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -2028(%rbp)
.L11:
	movl	-2052(%rbp), %eax
	cmpl	%eax, -2028(%rbp)
	jl	.L12
	movl	$0, -2024(%rbp)
	jmp	.L13
.L17:
	movl	-2024(%rbp), %eax
	cltq
	movl	-2016(%rbp,%rax,4), %edx
	movl	-2048(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L14
	addl	$1, -2040(%rbp)
.L14:
	movl	-2024(%rbp), %eax
	cltq
	movl	-2016(%rbp,%rax,4), %edx
	movl	-2048(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L15
	movl	-2024(%rbp), %eax
	cltq
	movl	-2016(%rbp,%rax,4), %edx
	movl	-2044(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L15
	addl	$1, -2036(%rbp)
.L15:
	movl	-2024(%rbp), %eax
	cltq
	movl	-2016(%rbp,%rax,4), %edx
	movl	-2044(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L16
	addl	$1, -2032(%rbp)
.L16:
	addl	$1, -2024(%rbp)
.L13:
	movl	-2052(%rbp), %eax
	cmpl	%eax, -2024(%rbp)
	jl	.L17
	movl	$999, -2020(%rbp)
	movl	-2020(%rbp), %eax
	cmpl	-2040(%rbp), %eax
	jle	.L18
	movl	-2040(%rbp), %eax
	movl	%eax, -2020(%rbp)
.L18:
	movl	-2020(%rbp), %eax
	cmpl	-2036(%rbp), %eax
	jle	.L19
	movl	-2036(%rbp), %eax
	movl	%eax, -2020(%rbp)
.L19:
	movl	-2020(%rbp), %eax
	cmpl	-2032(%rbp), %eax
	jle	.L20
	movl	-2032(%rbp), %eax
	movl	%eax, -2020(%rbp)
.L20:
	movl	-2020(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	swap
	.type	swap, @function
swap:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	movq	(%rsi), %rdx
	movq	%rdx, (%rdi)
	movq	%rax, (%rsi)
	ret
	.cfi_endproc
.LFE51:
	.size	swap, .-swap
	.p2align 4
	.globl	asc
	.type	asc, @function
asc:
.LFB52:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subq	(%rsi), %rax
	ret
	.cfi_endproc
.LFE52:
	.size	asc, .-asc
	.p2align 4
	.globl	desc
	.type	desc, @function
desc:
.LFB53:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	subq	(%rdi), %rax
	ret
	.cfi_endproc
.LFE53:
	.size	desc, .-desc
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB54:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovge	%rsi, %rax
	ret
	.cfi_endproc
.LFE54:
	.size	max, .-max
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB55:
	.cfi_startproc
	endbr64
	cmpq	%rsi, %rdi
	movq	%rsi, %rax
	cmovle	%rdi, %rax
	ret
	.cfi_endproc
.LFE55:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	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
	subq	$2040, %rsp
	.cfi_def_cfa_offset 2080
	movq	%fs:40, %rax
	movq	%rax, 2024(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	leaq	16(%rsp), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L9
	testl	%eax, %eax
	jle	.L8
	leal	-1(%rax), %edx
	leaq	4(%r12), %rax
	movl	8(%rsp), %r10d
	xorl	%edi, %edi
	leaq	(%rax,%rdx,4), %r8
	movl	12(%rsp), %r9d
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L22:
	addl	$1, %esi
	cmpl	%ecx, %r9d
	jge	.L11
.L12:
	addl	$1, %edi
.L11:
	movq	%rax, %r12
	cmpq	%rax, %r8
	je	.L20
.L23:
	addq	$4, %rax
.L13:
	movl	(%r12), %ecx
	cmpl	%ecx, %r10d
	jge	.L22
	cmpl	%ecx, %r9d
	jl	.L12
	addl	$1, %edx
	movq	%rax, %r12
	cmpq	%rax, %r8
	jne	.L23
.L20:
	movl	$999, %eax
	cmpl	%eax, %esi
	cmovg	%eax, %esi
.L15:
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	leaq	.LC2(%rip), %rsi
	cmpl	%edi, %edx
	cmovg	%edi, %edx
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	2024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$2040, %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
.L8:
	.cfi_restore_state
	xorl	%edi, %edi
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	.L15
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE56:
	.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	swap
	.type	swap, @function
swap:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	movq	(%rsi), %rdx
	movq	%rdx, (%rdi)
	movq	%rax, (%rsi)
	ret
	.cfi_endproc
.LFE51:
	.size	swap, .-swap
	.p2align 4
	.globl	asc
	.type	asc, @function
asc:
.LFB52:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subq	(%rsi), %rax
	ret
	.cfi_endproc
.LFE52:
	.size	asc, .-asc
	.p2align 4
	.globl	desc
	.type	desc, @function
desc:
.LFB53:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	subq	(%rdi), %rax
	ret
	.cfi_endproc
.LFE53:
	.size	desc, .-desc
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB54:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovge	%rsi, %rax
	ret
	.cfi_endproc
.LFE54:
	.size	max, .-max
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB55:
	.cfi_startproc
	endbr64
	cmpq	%rsi, %rdi
	movq	%rsi, %rax
	cmovle	%rdi, %rax
	ret
	.cfi_endproc
.LFE55:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	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
	subq	$2040, %rsp
	.cfi_def_cfa_offset 2080
	movq	%fs:40, %rax
	movq	%rax, 2024(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	leaq	16(%rsp), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L9
	testl	%eax, %eax
	jle	.L8
	leal	-1(%rax), %edx
	leaq	4(%r12), %rax
	movl	8(%rsp), %r10d
	xorl	%edi, %edi
	leaq	(%rax,%rdx,4), %r8
	movl	12(%rsp), %r9d
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L22:
	addl	$1, %esi
	cmpl	%ecx, %r9d
	jge	.L11
.L12:
	addl	$1, %edi
.L11:
	movq	%rax, %r12
	cmpq	%rax, %r8
	je	.L20
.L23:
	addq	$4, %rax
.L13:
	movl	(%r12), %ecx
	cmpl	%ecx, %r10d
	jge	.L22
	cmpl	%ecx, %r9d
	jl	.L12
	addl	$1, %edx
	movq	%rax, %r12
	cmpq	%rax, %r8
	jne	.L23
.L20:
	movl	$999, %eax
	cmpl	%eax, %esi
	cmovg	%eax, %esi
.L15:
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	leaq	.LC2(%rip), %rsi
	cmpl	%edi, %edx
	cmovg	%edi, %edx
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	2024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$2040, %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
.L8:
	.cfi_restore_state
	xorl	%edi, %edi
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	.L15
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE56:
	.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 <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef long long int ll;
void swap(ll *x, ll *y) {
    ll temp;
    temp = *x;
    *x = *y;
    *y = temp;
}
ll asc(const void *a, const void *b) { return *(ll *)a - *(ll *)b; }
ll desc(const void *a, const void *b) { return *(ll *)b - *(ll *)a; }
ll max(ll x, ll y) { return x > y ? x : y; }
ll min(ll x, ll y) { return x > y ? y : x; }
/*void
 * qsort(配列のアドレス,配列のサイズ,sizeof(配列の型のサイズ),比較関数(昇順or降順))
 */

int main(){
    int n,p[500],a,b;
    int cnt1,cnt2,cnt3;
    cnt1=cnt2=cnt3=0;

    scanf("%d",&n);
    scanf("%d %d",&a,&b);
    for(int i=0;i<n;i++)scanf("%d",&p[i]);

    for(int i=0;i<n;i++){
        if(p[i]<=a)cnt1++;
        if(a+1<=p[i]&&p[i]<=b)cnt2++;
        if(b+1<=p[i])cnt3++;
    }
    int min=999;
    if(min>cnt1)min=cnt1;
    if(min>cnt2)min=cnt2;
    if(min>cnt3)min=cnt3;
    printf("%d\n",min);
    return 0;
}
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 unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef long long int ll;
void swap(ll *x, ll *y) {
    ll temp;
    temp = *x;
    *x = *y;
    *y = temp;
}
ll asc(const void *a, const void *b) { return *(ll *)a - *(ll *)b; }
ll desc(const void *a, const void *b) { return *(ll *)b - *(ll *)a; }
ll max(ll x, ll y) { return x > y ? x : y; }
ll min(ll x, ll y) { return x > y ? y : x; }
/*void
 * qsort(配列のアドレス,配列のサイズ,sizeof(配列の型のサイズ),比較関数(昇順or降順))
 */

int main(){
    int n,p[500],a,b;
    int cnt1,cnt2,cnt3;
    cnt1=cnt2=cnt3=0;

    scanf("%d",&n);
    scanf("%d %d",&a,&b);
    for(int i=0;i<n;i++)scanf("%d",&p[i]);

    for(int i=0;i<n;i++){
        if(p[i]<=a)cnt1++;
        if(a+1<=p[i]&&p[i]<=b)cnt2++;
        if(b+1<=p[i])cnt3++;
    }
    int min=999;
    if(min>cnt1)min=cnt1;
    if(min>cnt2)min=cnt2;
    if(min>cnt3)min=cnt3;
    printf("%d\n",min);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	swap
	.type	swap, @function
swap:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-32(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	swap, .-swap
	.globl	asc
	.type	asc, @function
asc:
.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	asc, .-asc
	.globl	desc
	.type	desc, @function
desc:
.LFB8:
	.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	-16(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	(%rax), %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	desc, .-desc
	.globl	max
	.type	max, @function
max:
.LFB9:
	.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	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.LFB10:
	.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), %rdx
	movq	-16(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	min, .-min
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$2064, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -2032(%rbp)
	movl	-2032(%rbp), %eax
	movl	%eax, -2036(%rbp)
	movl	-2036(%rbp), %eax
	movl	%eax, -2040(%rbp)
	leaq	-2052(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-2044(%rbp), %rdx
	leaq	-2048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -2028(%rbp)
	jmp	.L11
.L12:
	leaq	-2016(%rbp), %rdx
	movl	-2028(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -2028(%rbp)
.L11:
	movl	-2052(%rbp), %eax
	cmpl	%eax, -2028(%rbp)
	jl	.L12
	movl	$0, -2024(%rbp)
	jmp	.L13
.L17:
	movl	-2024(%rbp), %eax
	cltq
	movl	-2016(%rbp,%rax,4), %edx
	movl	-2048(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L14
	addl	$1, -2040(%rbp)
.L14:
	movl	-2024(%rbp), %eax
	cltq
	movl	-2016(%rbp,%rax,4), %edx
	movl	-2048(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L15
	movl	-2024(%rbp), %eax
	cltq
	movl	-2016(%rbp,%rax,4), %edx
	movl	-2044(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L15
	addl	$1, -2036(%rbp)
.L15:
	movl	-2024(%rbp), %eax
	cltq
	movl	-2016(%rbp,%rax,4), %edx
	movl	-2044(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L16
	addl	$1, -2032(%rbp)
.L16:
	addl	$1, -2024(%rbp)
.L13:
	movl	-2052(%rbp), %eax
	cmpl	%eax, -2024(%rbp)
	jl	.L17
	movl	$999, -2020(%rbp)
	movl	-2020(%rbp), %eax
	cmpl	-2040(%rbp), %eax
	jle	.L18
	movl	-2040(%rbp), %eax
	movl	%eax, -2020(%rbp)
.L18:
	movl	-2020(%rbp), %eax
	cmpl	-2036(%rbp), %eax
	jle	.L19
	movl	-2036(%rbp), %eax
	movl	%eax, -2020(%rbp)
.L19:
	movl	-2020(%rbp), %eax
	cmpl	-2032(%rbp), %eax
	jle	.L20
	movl	-2032(%rbp), %eax
	movl	%eax, -2020(%rbp)
.L20:
	movl	-2020(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	swap
	.type	swap, @function
swap:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-32(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	swap, .-swap
	.globl	asc
	.type	asc, @function
asc:
.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	asc, .-asc
	.globl	desc
	.type	desc, @function
desc:
.LFB8:
	.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	-16(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	(%rax), %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	desc, .-desc
	.globl	max
	.type	max, @function
max:
.LFB9:
	.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	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.LFB10:
	.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), %rdx
	movq	-16(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	min, .-min
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$2064, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -2032(%rbp)
	movl	-2032(%rbp), %eax
	movl	%eax, -2036(%rbp)
	movl	-2036(%rbp), %eax
	movl	%eax, -2040(%rbp)
	leaq	-2052(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-2044(%rbp), %rdx
	leaq	-2048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -2028(%rbp)
	jmp	.L11
.L12:
	leaq	-2016(%rbp), %rdx
	movl	-2028(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -2028(%rbp)
.L11:
	movl	-2052(%rbp), %eax
	cmpl	%eax, -2028(%rbp)
	jl	.L12
	movl	$0, -2024(%rbp)
	jmp	.L13
.L17:
	movl	-2024(%rbp), %eax
	cltq
	movl	-2016(%rbp,%rax,4), %edx
	movl	-2048(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L14
	addl	$1, -2040(%rbp)
.L14:
	movl	-2024(%rbp), %eax
	cltq
	movl	-2016(%rbp,%rax,4), %edx
	movl	-2048(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L15
	movl	-2024(%rbp), %eax
	cltq
	movl	-2016(%rbp,%rax,4), %edx
	movl	-2044(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L15
	addl	$1, -2036(%rbp)
.L15:
	movl	-2024(%rbp), %eax
	cltq
	movl	-2016(%rbp,%rax,4), %edx
	movl	-2044(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L16
	addl	$1, -2032(%rbp)
.L16:
	addl	$1, -2024(%rbp)
.L13:
	movl	-2052(%rbp), %eax
	cmpl	%eax, -2024(%rbp)
	jl	.L17
	movl	$999, -2020(%rbp)
	movl	-2020(%rbp), %eax
	cmpl	-2040(%rbp), %eax
	jle	.L18
	movl	-2040(%rbp), %eax
	movl	%eax, -2020(%rbp)
.L18:
	movl	-2020(%rbp), %eax
	cmpl	-2036(%rbp), %eax
	jle	.L19
	movl	-2036(%rbp), %eax
	movl	%eax, -2020(%rbp)
.L19:
	movl	-2020(%rbp), %eax
	cmpl	-2032(%rbp), %eax
	jle	.L20
	movl	-2032(%rbp), %eax
	movl	%eax, -2020(%rbp)
.L20:
	movl	-2020(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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:
