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

```c
// AOJ 2814: Energy Drink
// 2018.1.4 bal4u@uu

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define INF 0x50505050
#define MAX 200002

typedef struct { int a, b; char f; } T;
T t[MAX]; int n;
int dp[MAX];

//#define getchar_unlocked()  getchar()
int in()
{
	int n = 0;
	int c = getchar_unlocked();
	do n = (n<<3)+(n<<1) + (c & 0xf), c = getchar_unlocked();
	while (c >= '0');
	return n;
}

int cmp(T *a, T *b) { if (a->a - b->a) return a->a - b->a; return b->b - a->b; }

int bsch(int x)
{
	int m, l = 0, r = n;

    while (l < r) {
        m = (l + r) >> 1;
        if (dp[m] < x) l = m + 1; else r = m;
    }
	return l;
}

int main()
{
	int i, a, b, f, sz;

	n = in();
	sz = 0;
	for (i = 0; i < n; i++) {
		a = in(), b = in();
		t[sz].a = a, t[sz++].b = b;
		t[sz].a = b, t[sz].b = a, t[sz++].f = 1;
	}
	n <<= 1; qsort(t, n, sizeof(T), cmp);

	memset(dp, INF, sizeof(dp));
	for (i = 0; i < n; i++) {
		b = t[i].b, f = t[i].f;
		a = bsch(b);
		if ((a & 1) == f) dp[a] = b;
	}
	printf("%d\n", bsch(INF));
	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 2400024
t:
	.zero	2400024
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 800008
dp:
	.zero	800008
	.text
	.globl	in
	.type	in, @function
in:
.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)
	call	getchar_unlocked@PLT
	movl	%eax, -4(%rbp)
.L2:
	movl	-8(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-8(%rbp), %eax
	addl	%eax, %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	andl	$15, %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	call	getchar_unlocked@PLT
	movl	%eax, -4(%rbp)
	cmpl	$47, -4(%rbp)
	jg	.L2
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	in, .-in
	.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
	je	.L5
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	jmp	.L6
.L5:
	movq	-16(%rbp), %rax
	movl	4(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmp, .-cmp
	.globl	bsch
	.type	bsch, @function
bsch:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$0, -12(%rbp)
	movl	n(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L8
.L10:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L9
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L8
.L9:
	movl	-4(%rbp), %eax
	movl	%eax, -8(%rbp)
.L8:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jl	.L10
	movl	-12(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	bsch, .-bsch
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	$0, %eax
	call	in
	movl	%eax, n(%rip)
	movl	$0, -16(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L13
.L14:
	movl	$0, %eax
	call	in
	movl	%eax, -4(%rbp)
	movl	$0, %eax
	call	in
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	t(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -16(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+t(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	t(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+t(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -16(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movb	$1, (%rdx,%rax)
	addl	$1, -20(%rbp)
.L13:
	movl	n(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L14
	movl	n(%rip), %eax
	addl	%eax, %eax
	movl	%eax, n(%rip)
	movl	n(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rsi
	leaq	t(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$800008, %edx
	movl	$1347440720, %esi
	leaq	dp(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -20(%rbp)
	jmp	.L15
.L17:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+t(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movzbl	(%rdx,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, -8(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	bsch
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	andl	$1, %eax
	cmpl	%eax, -8(%rbp)
	jne	.L16
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L16:
	addl	$1, -20(%rbp)
.L15:
	movl	n(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L17
	movl	$1347440720, %edi
	call	bsch
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	cmp
	.type	cmp, @function
cmp:
.LFB52:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	movl	(%rsi), %edx
	cmpl	%edx, %eax
	je	.L2
	subl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	movl	4(%rsi), %eax
	subl	4(%rdi), %eax
	ret
	.cfi_endproc
.LFE52:
	.size	cmp, .-cmp
	.p2align 4
	.globl	in
	.type	in, @function
in:
.LFB51:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L14
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L7:
	xorl	%r12d, %r12d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L5
.L9:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L11:
	leal	(%r12,%r12,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r12d
	cmpq	%rcx, %rdx
	jb	.L8
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L5
	movq	stdin(%rip), %rdi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L7
	.cfi_endproc
.LFE51:
	.size	in, .-in
	.p2align 4
	.globl	bsch
	.type	bsch, @function
bsch:
.LFB53:
	.cfi_startproc
	endbr64
	movl	n(%rip), %edx
	xorl	%r8d, %r8d
	leaq	dp(%rip), %rsi
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L18:
	leal	(%rdx,%r8), %eax
	sarl	%eax
	movslq	%eax, %rcx
	cmpl	%edi, (%rsi,%rcx,4)
	jl	.L20
	movl	%eax, %edx
.L17:
	cmpl	%r8d, %edx
	jg	.L18
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	leal	1(%rax), %r8d
	jmp	.L17
	.cfi_endproc
.LFE53:
	.size	bsch, .-bsch
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB54:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	t(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	in
	movl	%eax, n(%rip)
	testl	%eax, %eax
	jle	.L22
	movq	%rbp, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L35:
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L53
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L24:
	xorl	%r13d, %r13d
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L25:
	leaq	1(%rdx), %rsi
	movq	%rsi, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L27
.L26:
	movq	%rsi, %rdx
.L28:
	leal	0(%r13,%r13,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r13d
	cmpq	%rcx, %rdx
	jb	.L25
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rsi
	movq	16(%rdi), %rcx
	cmpl	$47, %eax
	jg	.L26
	.p2align 4,,10
	.p2align 3
.L27:
	cmpq	%rcx, %rsi
	jnb	.L54
	leaq	1(%rsi), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rsi), %eax
.L30:
	xorl	%r14d, %r14d
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L31:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L33
.L32:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L34:
	leal	(%r14,%r14,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r14d
	cmpq	%rcx, %rdx
	jb	.L31
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L33
	movq	stdin(%rip), %rdi
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L33:
	movd	%r13d, %xmm0
	movd	%r14d, %xmm1
	addl	$1, %ebx
	addq	$24, %r12
	punpckldq	%xmm1, %xmm0
	movd	%r13d, %xmm2
	movb	$1, -4(%r12)
	movq	%xmm0, -24(%r12)
	movd	%r14d, %xmm0
	punpckldq	%xmm2, %xmm0
	movq	%xmm0, -12(%r12)
	movl	n(%rip), %eax
	cmpl	%ebx, %eax
	jg	.L35
.L22:
	addl	%eax, %eax
	leaq	cmp(%rip), %rcx
	movl	$12, %edx
	movq	%rbp, %rdi
	movslq	%eax, %rsi
	movl	%eax, n(%rip)
	call	qsort@PLT
	movl	$800008, %edx
	movl	$1347440720, %esi
	leaq	dp(%rip), %rdi
	call	memset@PLT
	movl	n(%rip), %r9d
	movq	%rax, %rdi
	testl	%r9d, %r9d
	jle	.L43
	leal	-1(%r9), %eax
	leaq	4+t(%rip), %r10
	leaq	(%rax,%rax,2), %rdx
	leaq	12(%r10), %rax
	leaq	(%rax,%rdx,4), %rbx
	.p2align 4,,10
	.p2align 3
.L42:
	movl	(%r10), %r8d
	movsbl	4(%r10), %r11d
	movl	%r9d, %edx
	xorl	%ecx, %ecx
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L40:
	leal	(%rdx,%rcx), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpl	(%rdi,%rsi,4), %r8d
	jg	.L55
	movl	%eax, %edx
.L39:
	cmpl	%ecx, %edx
	jg	.L40
	movl	%ecx, %eax
	andl	$1, %eax
	cmpl	%r11d, %eax
	jne	.L41
	movslq	%ecx, %rcx
	movl	%r8d, (%rdi,%rcx,4)
.L41:
	addq	$12, %r10
	cmpq	%r10, %rbx
	jne	.L42
.L43:
	xorl	%edx, %edx
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L45:
	leal	(%r9,%rdx), %eax
	sarl	%eax
	movslq	%eax, %rcx
	cmpl	$1347440719, (%rdi,%rcx,4)
	jle	.L56
	movl	%eax, %r9d
.L44:
	cmpl	%edx, %r9d
	jg	.L45
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L55:
	.cfi_restore_state
	leal	1(%rax), %ecx
	jmp	.L39
.L56:
	leal	1(%rax), %edx
	jmp	.L44
.L54:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L30
.L53:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L24
	.cfi_endproc
.LFE54:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 800008
dp:
	.zero	800008
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 2400024
t:
	.zero	2400024
	.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:
.LFB52:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	movl	(%rsi), %edx
	cmpl	%edx, %eax
	je	.L2
	subl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	movl	4(%rsi), %eax
	subl	4(%rdi), %eax
	ret
	.cfi_endproc
.LFE52:
	.size	cmp, .-cmp
	.p2align 4
	.globl	in
	.type	in, @function
in:
.LFB51:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L14
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L7:
	xorl	%r12d, %r12d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L5
.L9:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L11:
	leal	(%r12,%r12,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r12d
	cmpq	%rcx, %rdx
	jb	.L8
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L5
	movq	stdin(%rip), %rdi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L7
	.cfi_endproc
.LFE51:
	.size	in, .-in
	.p2align 4
	.globl	bsch
	.type	bsch, @function
bsch:
.LFB53:
	.cfi_startproc
	endbr64
	movl	n(%rip), %edx
	xorl	%r8d, %r8d
	leaq	dp(%rip), %rsi
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L18:
	leal	(%rdx,%r8), %eax
	sarl	%eax
	movslq	%eax, %rcx
	cmpl	%edi, (%rsi,%rcx,4)
	jl	.L20
	movl	%eax, %edx
.L17:
	cmpl	%r8d, %edx
	jg	.L18
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	leal	1(%rax), %r8d
	jmp	.L17
	.cfi_endproc
.LFE53:
	.size	bsch, .-bsch
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB54:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	t(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	in
	movl	%eax, n(%rip)
	testl	%eax, %eax
	jle	.L22
	movq	%rbp, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L35:
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L53
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L24:
	xorl	%r13d, %r13d
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L25:
	leaq	1(%rdx), %rsi
	movq	%rsi, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L27
.L26:
	movq	%rsi, %rdx
.L28:
	leal	0(%r13,%r13,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r13d
	cmpq	%rcx, %rdx
	jb	.L25
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rsi
	movq	16(%rdi), %rcx
	cmpl	$47, %eax
	jg	.L26
	.p2align 4,,10
	.p2align 3
.L27:
	cmpq	%rcx, %rsi
	jnb	.L54
	leaq	1(%rsi), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rsi), %eax
.L30:
	xorl	%r14d, %r14d
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L31:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L33
.L32:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L34:
	leal	(%r14,%r14,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r14d
	cmpq	%rcx, %rdx
	jb	.L31
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L33
	movq	stdin(%rip), %rdi
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L33:
	movd	%r13d, %xmm0
	movd	%r14d, %xmm1
	addl	$1, %ebx
	addq	$24, %r12
	punpckldq	%xmm1, %xmm0
	movd	%r13d, %xmm2
	movb	$1, -4(%r12)
	movq	%xmm0, -24(%r12)
	movd	%r14d, %xmm0
	punpckldq	%xmm2, %xmm0
	movq	%xmm0, -12(%r12)
	movl	n(%rip), %eax
	cmpl	%ebx, %eax
	jg	.L35
.L22:
	addl	%eax, %eax
	leaq	cmp(%rip), %rcx
	movl	$12, %edx
	movq	%rbp, %rdi
	movslq	%eax, %rsi
	movl	%eax, n(%rip)
	call	qsort@PLT
	movl	$800008, %edx
	movl	$1347440720, %esi
	leaq	dp(%rip), %rdi
	call	memset@PLT
	movl	n(%rip), %r9d
	movq	%rax, %rdi
	testl	%r9d, %r9d
	jle	.L43
	leal	-1(%r9), %eax
	leaq	4+t(%rip), %r10
	leaq	(%rax,%rax,2), %rdx
	leaq	12(%r10), %rax
	leaq	(%rax,%rdx,4), %rbx
	.p2align 4,,10
	.p2align 3
.L42:
	movl	(%r10), %r8d
	movsbl	4(%r10), %r11d
	movl	%r9d, %edx
	xorl	%ecx, %ecx
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L40:
	leal	(%rdx,%rcx), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpl	(%rdi,%rsi,4), %r8d
	jg	.L55
	movl	%eax, %edx
.L39:
	cmpl	%ecx, %edx
	jg	.L40
	movl	%ecx, %eax
	andl	$1, %eax
	cmpl	%r11d, %eax
	jne	.L41
	movslq	%ecx, %rcx
	movl	%r8d, (%rdi,%rcx,4)
.L41:
	addq	$12, %r10
	cmpq	%r10, %rbx
	jne	.L42
.L43:
	xorl	%edx, %edx
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L45:
	leal	(%r9,%rdx), %eax
	sarl	%eax
	movslq	%eax, %rcx
	cmpl	$1347440719, (%rdi,%rcx,4)
	jle	.L56
	movl	%eax, %r9d
.L44:
	cmpl	%edx, %r9d
	jg	.L45
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L55:
	.cfi_restore_state
	leal	1(%rax), %ecx
	jmp	.L39
.L56:
	leal	1(%rax), %edx
	jmp	.L44
.L54:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L30
.L53:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L24
	.cfi_endproc
.LFE54:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 800008
dp:
	.zero	800008
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 2400024
t:
	.zero	2400024
	.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:

// AOJ 2814: Energy Drink
// 2018.1.4 bal4u@uu

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define INF 0x50505050
#define MAX 200002

typedef struct { int a, b; char f; } T;
T t[MAX]; int n;
int dp[MAX];

//#define getchar_unlocked()  getchar()
int in()
{
	int n = 0;
	int c = getchar_unlocked();
	do n = (n<<3)+(n<<1) + (c & 0xf), c = getchar_unlocked();
	while (c >= '0');
	return n;
}

int cmp(T *a, T *b) { if (a->a - b->a) return a->a - b->a; return b->b - a->b; }

int bsch(int x)
{
	int m, l = 0, r = n;

    while (l < r) {
        m = (l + r) >> 1;
        if (dp[m] < x) l = m + 1; else r = m;
    }
	return l;
}

int main()
{
	int i, a, b, f, sz;

	n = in();
	sz = 0;
	for (i = 0; i < n; i++) {
		a = in(), b = in();
		t[sz].a = a, t[sz++].b = b;
		t[sz].a = b, t[sz].b = a, t[sz++].f = 1;
	}
	n <<= 1; qsort(t, n, sizeof(T), cmp);

	memset(dp, INF, sizeof(dp));
	for (i = 0; i < n; i++) {
		b = t[i].b, f = t[i].f;
		a = bsch(b);
		if ((a & 1) == f) dp[a] = b;
	}
	printf("%d\n", bsch(INF));
	return 0;
}


5
3 5
7 4
11 9
3 7
7 8

4

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

```c
// AOJ 2814: Energy Drink
// 2018.1.4 bal4u@uu

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define INF 0x50505050
#define MAX 200002

typedef struct { int a, b; char f; } T;
T t[MAX]; int n;
int dp[MAX];

//#define getchar_unlocked()  getchar()
int in()
{
	int n = 0;
	int c = getchar_unlocked();
	do n = (n<<3)+(n<<1) + (c & 0xf), c = getchar_unlocked();
	while (c >= '0');
	return n;
}

int cmp(T *a, T *b) { if (a->a - b->a) return a->a - b->a; return b->b - a->b; }

int bsch(int x)
{
	int m, l = 0, r = n;

    while (l < r) {
        m = (l + r) >> 1;
        if (dp[m] < x) l = m + 1; else r = m;
    }
	return l;
}

int main()
{
	int i, a, b, f, sz;

	n = in();
	sz = 0;
	for (i = 0; i < n; i++) {
		a = in(), b = in();
		t[sz].a = a, t[sz++].b = b;
		t[sz].a = b, t[sz].b = a, t[sz++].f = 1;
	}
	n <<= 1; qsort(t, n, sizeof(T), cmp);

	memset(dp, INF, sizeof(dp));
	for (i = 0; i < n; i++) {
		b = t[i].b, f = t[i].f;
		a = bsch(b);
		if ((a & 1) == f) dp[a] = b;
	}
	printf("%d\n", bsch(INF));
	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 2400024
t:
	.zero	2400024
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 800008
dp:
	.zero	800008
	.text
	.globl	in
	.type	in, @function
in:
.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)
	call	getchar_unlocked@PLT
	movl	%eax, -4(%rbp)
.L2:
	movl	-8(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-8(%rbp), %eax
	addl	%eax, %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	andl	$15, %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	call	getchar_unlocked@PLT
	movl	%eax, -4(%rbp)
	cmpl	$47, -4(%rbp)
	jg	.L2
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	in, .-in
	.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
	je	.L5
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	jmp	.L6
.L5:
	movq	-16(%rbp), %rax
	movl	4(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmp, .-cmp
	.globl	bsch
	.type	bsch, @function
bsch:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$0, -12(%rbp)
	movl	n(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L8
.L10:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L9
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L8
.L9:
	movl	-4(%rbp), %eax
	movl	%eax, -8(%rbp)
.L8:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jl	.L10
	movl	-12(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	bsch, .-bsch
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	$0, %eax
	call	in
	movl	%eax, n(%rip)
	movl	$0, -16(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L13
.L14:
	movl	$0, %eax
	call	in
	movl	%eax, -4(%rbp)
	movl	$0, %eax
	call	in
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	t(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -16(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+t(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	t(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+t(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -16(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movb	$1, (%rdx,%rax)
	addl	$1, -20(%rbp)
.L13:
	movl	n(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L14
	movl	n(%rip), %eax
	addl	%eax, %eax
	movl	%eax, n(%rip)
	movl	n(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rsi
	leaq	t(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$800008, %edx
	movl	$1347440720, %esi
	leaq	dp(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -20(%rbp)
	jmp	.L15
.L17:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+t(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movzbl	(%rdx,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, -8(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	bsch
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	andl	$1, %eax
	cmpl	%eax, -8(%rbp)
	jne	.L16
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L16:
	addl	$1, -20(%rbp)
.L15:
	movl	n(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L17
	movl	$1347440720, %edi
	call	bsch
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 2400024
t:
	.zero	2400024
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 800008
dp:
	.zero	800008
	.text
	.globl	in
	.type	in, @function
in:
.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)
	call	getchar_unlocked@PLT
	movl	%eax, -4(%rbp)
.L2:
	movl	-8(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-8(%rbp), %eax
	addl	%eax, %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	andl	$15, %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	call	getchar_unlocked@PLT
	movl	%eax, -4(%rbp)
	cmpl	$47, -4(%rbp)
	jg	.L2
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	in, .-in
	.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
	je	.L5
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	jmp	.L6
.L5:
	movq	-16(%rbp), %rax
	movl	4(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmp, .-cmp
	.globl	bsch
	.type	bsch, @function
bsch:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$0, -12(%rbp)
	movl	n(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L8
.L10:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L9
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L8
.L9:
	movl	-4(%rbp), %eax
	movl	%eax, -8(%rbp)
.L8:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jl	.L10
	movl	-12(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	bsch, .-bsch
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	$0, %eax
	call	in
	movl	%eax, n(%rip)
	movl	$0, -16(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L13
.L14:
	movl	$0, %eax
	call	in
	movl	%eax, -4(%rbp)
	movl	$0, %eax
	call	in
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	t(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -16(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+t(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	t(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+t(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -16(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movb	$1, (%rdx,%rax)
	addl	$1, -20(%rbp)
.L13:
	movl	n(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L14
	movl	n(%rip), %eax
	addl	%eax, %eax
	movl	%eax, n(%rip)
	movl	n(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rsi
	leaq	t(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$800008, %edx
	movl	$1347440720, %esi
	leaq	dp(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -20(%rbp)
	jmp	.L15
.L17:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+t(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movzbl	(%rdx,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, -8(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	bsch
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	andl	$1, %eax
	cmpl	%eax, -8(%rbp)
	jne	.L16
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L16:
	addl	$1, -20(%rbp)
.L15:
	movl	n(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L17
	movl	$1347440720, %edi
	call	bsch
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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:
