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

```c
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define max(p,q)((p)>(q)?(p):(q))
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}


//座圧(破壊的)
int cocomp(ll*a,int n){
	//0～cnt-1に圧縮
	ll*b=(ll*)malloc(sizeof(ll)*n);
	memcpy(b,a,sizeof(ll)*n);
	sortup(b,n);
	int cnt=1;
	rep(r,1,n)if(b[r]!=b[cnt-1])b[cnt++]=b[r];
	rep(i,0,n){
		int l=0,r=cnt;
		while(r-l>1){int m=(l+r)/2;if(b[m]>a[i])r=m;else l=m;}
		a[i]=l;
	}
	free(b);
	return cnt;
}

ll a[200010];
ll cum[200010];
int main(){
	int n;
	scanf("%d",&n);
	rep(i,0,n){
		int x,y;
		scanf("%d%d",&x,&y);
		a[2*i]=x;
		a[2*i+1]=y+1;
	}
	cocomp(a,2*n);
	rep(i,0,n){
		cum[a[2*i]]++;
		cum[a[2*i+1]]--;
	}
	ll ans=cum[0];
	rep(i,0,2*n+5){
		cum[i+1]+=cum[i];
		ans=max(ans,cum[i+1]);
	}
	printf("%lld\n",ans);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	upll
	.type	upll, @function
upll:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L2
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upll, .-upll
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB7:
	.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
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sortup, .-sortup
	.globl	cocomp
	.type	cocomp, @function
cocomp:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -56(%rbp)
	movl	%esi, -60(%rbp)
	movl	-60(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-56(%rbp), %rcx
	movq	-8(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	-60(%rbp), %edx
	movq	-8(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	sortup
	movl	$1, -40(%rbp)
	movq	$1, -24(%rbp)
	jmp	.L7
.L9:
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rcx
	movq	-8(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	je	.L8
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-8(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-40(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -40(%rbp)
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-8(%rbp), %rax
	addq	%rax, %rdx
	movq	(%rcx), %rax
	movq	%rax, (%rdx)
.L8:
	addq	$1, -24(%rbp)
.L7:
	movl	-60(%rbp), %eax
	cltq
	cmpq	%rax, -24(%rbp)
	jl	.L9
	movq	$0, -16(%rbp)
	jmp	.L10
.L14:
	movl	$0, -36(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L11
.L13:
	movl	-36(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-56(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L12
	movl	-28(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L11
.L12:
	movl	-28(%rbp), %eax
	movl	%eax, -36(%rbp)
.L11:
	movl	-32(%rbp), %eax
	subl	-36(%rbp), %eax
	cmpl	$1, %eax
	jg	.L13
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-56(%rbp), %rax
	addq	%rax, %rdx
	movl	-36(%rbp), %eax
	cltq
	movq	%rax, (%rdx)
	addq	$1, -16(%rbp)
.L10:
	movl	-60(%rbp), %eax
	cltq
	cmpq	%rax, -16(%rbp)
	jl	.L14
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	-40(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	cocomp, .-cocomp
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1600080
a:
	.zero	1600080
	.globl	cum
	.align 32
	.type	cum, @object
	.size	cum, 1600080
cum:
	.zero	1600080
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%lld\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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -40(%rbp)
	jmp	.L17
.L18:
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	movq	-40(%rbp), %rdx
	addq	%rdx, %rdx
	cltq
	leaq	0(,%rdx,8), %rcx
	leaq	a(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-44(%rbp), %eax
	leal	1(%rax), %ecx
	movq	-40(%rbp), %rax
	addq	%rax, %rax
	leaq	1(%rax), %rdx
	movslq	%ecx, %rax
	leaq	0(,%rdx,8), %rcx
	leaq	a(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addq	$1, -40(%rbp)
.L17:
	movl	-52(%rbp), %eax
	cltq
	cmpq	%rax, -40(%rbp)
	jl	.L18
	movl	-52(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, %esi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	cocomp
	movq	$0, -32(%rbp)
	jmp	.L19
.L20:
	movq	-32(%rbp), %rax
	addq	%rax, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rcx
	movq	(%rdx,%rcx), %rdx
	leaq	1(%rdx), %rcx
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movq	-32(%rbp), %rax
	addq	%rax, %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rcx
	movq	(%rdx,%rcx), %rdx
	leaq	-1(%rdx), %rcx
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addq	$1, -32(%rbp)
.L19:
	movl	-52(%rbp), %eax
	cltq
	cmpq	%rax, -32(%rbp)
	jl	.L20
	movq	cum(%rip), %rax
	movq	%rax, -24(%rbp)
	movq	$0, -16(%rbp)
	jmp	.L21
.L22:
	movq	-16(%rbp), %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-16(%rbp), %rax
	addq	$1, %rax
	addq	%rdx, %rcx
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movq	-16(%rbp), %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-24(%rbp), %rdx
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	movq	%rax, -24(%rbp)
	addq	$1, -16(%rbp)
.L21:
	movl	-52(%rbp), %eax
	addl	%eax, %eax
	addl	$5, %eax
	cltq
	cmpq	%rax, -16(%rbp)
	jl	.L22
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	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	.L24
	call	__stack_chk_fail@PLT
.L24:
	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	upll
	.type	upll, @function
upll:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	upll, .-upll
	.p2align 4
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB52:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE52:
	.size	sortup, .-sortup
	.p2align 4
	.globl	cocomp
	.type	cocomp, @function
cocomp:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movslq	%esi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	0(,%rbp,8), %r13
	movq	%rdi, %rbx
	movq	%r13, %rdi
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	malloc@PLT
	movq	%r13, %rdx
	movq	%rbx, %rsi
	movq	%rax, %r12
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	$8, %edx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	leaq	upll(%rip), %rcx
	call	qsort@PLT
	cmpq	$1, %rbp
	jle	.L7
	leaq	(%r12,%r13), %rsi
	leaq	8(%r12), %rax
	movl	$1, %r13d
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	%r13d, %rdx
	movq	(%rax), %rcx
	cmpq	-8(%r12,%rdx,8), %rcx
	je	.L8
	movq	%rcx, (%r12,%rdx,8)
	addl	$1, %r13d
.L8:
	addq	$8, %rax
	cmpq	%rax, %rsi
	jne	.L9
.L10:
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%r13d, %ecx
	xorl	%edx, %edx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L13:
	leal	(%rdx,%rcx), %esi
	movq	(%rdi), %rbx
	movl	%esi, %eax
	shrl	$31, %eax
	addl	%esi, %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpq	%rbx, (%r12,%rsi,8)
	cmovle	%eax, %edx
	cmovg	%eax, %ecx
.L12:
	movl	%ecx, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jg	.L13
	movslq	%edx, %rdx
	addq	$1, %r8
	addq	$8, %rdi
	movq	%rdx, -8(%rdi)
	cmpq	%rbp, %r8
	jl	.L14
.L11:
	movq	%r12, %rdi
	call	free@PLT
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movl	%r13d, %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
.L7:
	.cfi_restore_state
	movl	$1, %r13d
	jne	.L11
	jmp	.L10
	.cfi_endproc
.LFE53:
	.size	cocomp, .-cocomp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB54:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	a(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L22
	movq	%rbx, %r15
	leaq	20(%rsp), %r13
	leaq	16(%rsp), %r12
	xorl	%r14d, %r14d
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L23:
	movq	%r12, %rsi
	movq	%r13, %rdx
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rax
	addq	$1, %r14
	addq	$16, %r15
	movq	%rax, %xmm0
	movl	20(%rsp), %eax
	addl	$1, %eax
	cltq
	movq	%rax, %xmm1
	movslq	12(%rsp), %rax
	punpcklqdq	%xmm1, %xmm0
	movaps	%xmm0, -16(%r15)
	movq	%rax, %rsi
	cmpq	%r14, %rax
	jg	.L23
.L22:
	addl	%esi, %esi
	movq	%rbx, %rdi
	call	cocomp
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L24
	movslq	%esi, %rax
	leaq	a(%rip), %rdx
	salq	$4, %rax
	addq	%rax, %rbx
	leaq	cum(%rip), %rax
	.p2align 4,,10
	.p2align 3
.L25:
	movq	(%rdx), %rcx
	addq	$16, %rdx
	addq	$1, (%rax,%rcx,8)
	movq	-8(%rdx), %rcx
	subq	$1, (%rax,%rcx,8)
	cmpq	%rdx, %rbx
	jne	.L25
	leal	5(%rsi,%rsi), %esi
	movq	(%rax), %r8
	movslq	%esi, %rsi
.L29:
	movq	cum(%rip), %rcx
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L28:
	addq	$1, %rdx
	addq	(%rax,%rdx,8), %rcx
	cmpq	%rcx, %r8
	movq	%rcx, (%rax,%rdx,8)
	cmovl	%rcx, %r8
	cmpq	%rsi, %rdx
	jl	.L28
.L27:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L24:
	.cfi_restore_state
	leal	5(%rsi,%rsi), %eax
	movq	cum(%rip), %r8
	movslq	%eax, %rsi
	testl	%eax, %eax
	jle	.L27
	leaq	cum(%rip), %rax
	jmp	.L29
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE54:
	.size	main, .-main
	.globl	cum
	.bss
	.align 32
	.type	cum, @object
	.size	cum, 1600080
cum:
	.zero	1600080
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1600080
a:
	.zero	1600080
	.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	upll
	.type	upll, @function
upll:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	upll, .-upll
	.p2align 4
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB52:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE52:
	.size	sortup, .-sortup
	.p2align 4
	.globl	cocomp
	.type	cocomp, @function
cocomp:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movslq	%esi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	0(,%rbp,8), %r13
	movq	%rdi, %rbx
	movq	%r13, %rdi
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	malloc@PLT
	movq	%r13, %rdx
	movq	%rbx, %rsi
	movq	%rax, %r12
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	$8, %edx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	leaq	upll(%rip), %rcx
	call	qsort@PLT
	cmpq	$1, %rbp
	jle	.L7
	leaq	(%r12,%r13), %rsi
	leaq	8(%r12), %rax
	movl	$1, %r13d
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	%r13d, %rdx
	movq	(%rax), %rcx
	cmpq	-8(%r12,%rdx,8), %rcx
	je	.L8
	movq	%rcx, (%r12,%rdx,8)
	addl	$1, %r13d
.L8:
	addq	$8, %rax
	cmpq	%rax, %rsi
	jne	.L9
.L10:
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%r13d, %ecx
	xorl	%edx, %edx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L13:
	leal	(%rdx,%rcx), %esi
	movq	(%rdi), %rbx
	movl	%esi, %eax
	shrl	$31, %eax
	addl	%esi, %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpq	%rbx, (%r12,%rsi,8)
	cmovle	%eax, %edx
	cmovg	%eax, %ecx
.L12:
	movl	%ecx, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jg	.L13
	movslq	%edx, %rdx
	addq	$1, %r8
	addq	$8, %rdi
	movq	%rdx, -8(%rdi)
	cmpq	%rbp, %r8
	jl	.L14
.L11:
	movq	%r12, %rdi
	call	free@PLT
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movl	%r13d, %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
.L7:
	.cfi_restore_state
	movl	$1, %r13d
	jne	.L11
	jmp	.L10
	.cfi_endproc
.LFE53:
	.size	cocomp, .-cocomp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB54:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	a(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L22
	movq	%rbx, %r15
	leaq	20(%rsp), %r13
	leaq	16(%rsp), %r12
	xorl	%r14d, %r14d
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L23:
	movq	%r12, %rsi
	movq	%r13, %rdx
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rax
	addq	$1, %r14
	addq	$16, %r15
	movq	%rax, %xmm0
	movl	20(%rsp), %eax
	addl	$1, %eax
	cltq
	movq	%rax, %xmm1
	movslq	12(%rsp), %rax
	punpcklqdq	%xmm1, %xmm0
	movaps	%xmm0, -16(%r15)
	movq	%rax, %rsi
	cmpq	%r14, %rax
	jg	.L23
.L22:
	addl	%esi, %esi
	movq	%rbx, %rdi
	call	cocomp
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L24
	movslq	%esi, %rax
	leaq	a(%rip), %rdx
	salq	$4, %rax
	addq	%rax, %rbx
	leaq	cum(%rip), %rax
	.p2align 4,,10
	.p2align 3
.L25:
	movq	(%rdx), %rcx
	addq	$16, %rdx
	addq	$1, (%rax,%rcx,8)
	movq	-8(%rdx), %rcx
	subq	$1, (%rax,%rcx,8)
	cmpq	%rdx, %rbx
	jne	.L25
	leal	5(%rsi,%rsi), %esi
	movq	(%rax), %r8
	movslq	%esi, %rsi
.L29:
	movq	cum(%rip), %rcx
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L28:
	addq	$1, %rdx
	addq	(%rax,%rdx,8), %rcx
	cmpq	%rcx, %r8
	movq	%rcx, (%rax,%rdx,8)
	cmovl	%rcx, %r8
	cmpq	%rsi, %rdx
	jl	.L28
.L27:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L24:
	.cfi_restore_state
	leal	5(%rsi,%rsi), %eax
	movq	cum(%rip), %r8
	movslq	%eax, %rsi
	testl	%eax, %eax
	jle	.L27
	leaq	cum(%rip), %rax
	jmp	.L29
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE54:
	.size	main, .-main
	.globl	cum
	.bss
	.align 32
	.type	cum, @object
	.size	cum, 1600080
cum:
	.zero	1600080
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1600080
a:
	.zero	1600080
	.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<stdio.h>
#include<stdlib.h>
#include<string.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define max(p,q)((p)>(q)?(p):(q))
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}


//座圧(破壊的)
int cocomp(ll*a,int n){
	//0～cnt-1に圧縮
	ll*b=(ll*)malloc(sizeof(ll)*n);
	memcpy(b,a,sizeof(ll)*n);
	sortup(b,n);
	int cnt=1;
	rep(r,1,n)if(b[r]!=b[cnt-1])b[cnt++]=b[r];
	rep(i,0,n){
		int l=0,r=cnt;
		while(r-l>1){int m=(l+r)/2;if(b[m]>a[i])r=m;else l=m;}
		a[i]=l;
	}
	free(b);
	return cnt;
}

ll a[200010];
ll cum[200010];
int main(){
	int n;
	scanf("%d",&n);
	rep(i,0,n){
		int x,y;
		scanf("%d%d",&x,&y);
		a[2*i]=x;
		a[2*i+1]=y+1;
	}
	cocomp(a,2*n);
	rep(i,0,n){
		cum[a[2*i]]++;
		cum[a[2*i+1]]--;
	}
	ll ans=cum[0];
	rep(i,0,2*n+5){
		cum[i+1]+=cum[i];
		ans=max(ans,cum[i+1]);
	}
	printf("%lld\n",ans);
}

4
0 4
3 6
2 7
5 8
 4
0 4
3 6
2 9
0 8
 4
-1 2
3 2
3 7
-1 8
 4
-1 0
1 2
3 0
1 12
 4
0 4
3 6
2 9
5 8
 4
0 4
3 6
2 9
1 8
 4
0 4
3 6
2 7
1 8
 4
0 4
3 6
3 7
1 8
 4
0 4
3 6
3 7
0 8
 4
0 2
3 6
3 7
0 8

3
 4
 2
 1
 3
 4
 4
 4
 4
 3

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

```c
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define max(p,q)((p)>(q)?(p):(q))
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}


//座圧(破壊的)
int cocomp(ll*a,int n){
	//0～cnt-1に圧縮
	ll*b=(ll*)malloc(sizeof(ll)*n);
	memcpy(b,a,sizeof(ll)*n);
	sortup(b,n);
	int cnt=1;
	rep(r,1,n)if(b[r]!=b[cnt-1])b[cnt++]=b[r];
	rep(i,0,n){
		int l=0,r=cnt;
		while(r-l>1){int m=(l+r)/2;if(b[m]>a[i])r=m;else l=m;}
		a[i]=l;
	}
	free(b);
	return cnt;
}

ll a[200010];
ll cum[200010];
int main(){
	int n;
	scanf("%d",&n);
	rep(i,0,n){
		int x,y;
		scanf("%d%d",&x,&y);
		a[2*i]=x;
		a[2*i+1]=y+1;
	}
	cocomp(a,2*n);
	rep(i,0,n){
		cum[a[2*i]]++;
		cum[a[2*i+1]]--;
	}
	ll ans=cum[0];
	rep(i,0,2*n+5){
		cum[i+1]+=cum[i];
		ans=max(ans,cum[i+1]);
	}
	printf("%lld\n",ans);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	upll
	.type	upll, @function
upll:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L2
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upll, .-upll
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB7:
	.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
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sortup, .-sortup
	.globl	cocomp
	.type	cocomp, @function
cocomp:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -56(%rbp)
	movl	%esi, -60(%rbp)
	movl	-60(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-56(%rbp), %rcx
	movq	-8(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	-60(%rbp), %edx
	movq	-8(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	sortup
	movl	$1, -40(%rbp)
	movq	$1, -24(%rbp)
	jmp	.L7
.L9:
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rcx
	movq	-8(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	je	.L8
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-8(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-40(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -40(%rbp)
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-8(%rbp), %rax
	addq	%rax, %rdx
	movq	(%rcx), %rax
	movq	%rax, (%rdx)
.L8:
	addq	$1, -24(%rbp)
.L7:
	movl	-60(%rbp), %eax
	cltq
	cmpq	%rax, -24(%rbp)
	jl	.L9
	movq	$0, -16(%rbp)
	jmp	.L10
.L14:
	movl	$0, -36(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L11
.L13:
	movl	-36(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-56(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L12
	movl	-28(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L11
.L12:
	movl	-28(%rbp), %eax
	movl	%eax, -36(%rbp)
.L11:
	movl	-32(%rbp), %eax
	subl	-36(%rbp), %eax
	cmpl	$1, %eax
	jg	.L13
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-56(%rbp), %rax
	addq	%rax, %rdx
	movl	-36(%rbp), %eax
	cltq
	movq	%rax, (%rdx)
	addq	$1, -16(%rbp)
.L10:
	movl	-60(%rbp), %eax
	cltq
	cmpq	%rax, -16(%rbp)
	jl	.L14
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	-40(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	cocomp, .-cocomp
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1600080
a:
	.zero	1600080
	.globl	cum
	.align 32
	.type	cum, @object
	.size	cum, 1600080
cum:
	.zero	1600080
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%lld\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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -40(%rbp)
	jmp	.L17
.L18:
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	movq	-40(%rbp), %rdx
	addq	%rdx, %rdx
	cltq
	leaq	0(,%rdx,8), %rcx
	leaq	a(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-44(%rbp), %eax
	leal	1(%rax), %ecx
	movq	-40(%rbp), %rax
	addq	%rax, %rax
	leaq	1(%rax), %rdx
	movslq	%ecx, %rax
	leaq	0(,%rdx,8), %rcx
	leaq	a(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addq	$1, -40(%rbp)
.L17:
	movl	-52(%rbp), %eax
	cltq
	cmpq	%rax, -40(%rbp)
	jl	.L18
	movl	-52(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, %esi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	cocomp
	movq	$0, -32(%rbp)
	jmp	.L19
.L20:
	movq	-32(%rbp), %rax
	addq	%rax, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rcx
	movq	(%rdx,%rcx), %rdx
	leaq	1(%rdx), %rcx
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movq	-32(%rbp), %rax
	addq	%rax, %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rcx
	movq	(%rdx,%rcx), %rdx
	leaq	-1(%rdx), %rcx
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addq	$1, -32(%rbp)
.L19:
	movl	-52(%rbp), %eax
	cltq
	cmpq	%rax, -32(%rbp)
	jl	.L20
	movq	cum(%rip), %rax
	movq	%rax, -24(%rbp)
	movq	$0, -16(%rbp)
	jmp	.L21
.L22:
	movq	-16(%rbp), %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-16(%rbp), %rax
	addq	$1, %rax
	addq	%rdx, %rcx
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movq	-16(%rbp), %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-24(%rbp), %rdx
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	movq	%rax, -24(%rbp)
	addq	$1, -16(%rbp)
.L21:
	movl	-52(%rbp), %eax
	addl	%eax, %eax
	addl	$5, %eax
	cltq
	cmpq	%rax, -16(%rbp)
	jl	.L22
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	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	.L24
	call	__stack_chk_fail@PLT
.L24:
	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	upll
	.type	upll, @function
upll:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L2
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upll, .-upll
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB7:
	.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
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sortup, .-sortup
	.globl	cocomp
	.type	cocomp, @function
cocomp:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -56(%rbp)
	movl	%esi, -60(%rbp)
	movl	-60(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-56(%rbp), %rcx
	movq	-8(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	-60(%rbp), %edx
	movq	-8(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	sortup
	movl	$1, -40(%rbp)
	movq	$1, -24(%rbp)
	jmp	.L7
.L9:
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rcx
	movq	-8(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	je	.L8
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-8(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-40(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -40(%rbp)
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-8(%rbp), %rax
	addq	%rax, %rdx
	movq	(%rcx), %rax
	movq	%rax, (%rdx)
.L8:
	addq	$1, -24(%rbp)
.L7:
	movl	-60(%rbp), %eax
	cltq
	cmpq	%rax, -24(%rbp)
	jl	.L9
	movq	$0, -16(%rbp)
	jmp	.L10
.L14:
	movl	$0, -36(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L11
.L13:
	movl	-36(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-56(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L12
	movl	-28(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L11
.L12:
	movl	-28(%rbp), %eax
	movl	%eax, -36(%rbp)
.L11:
	movl	-32(%rbp), %eax
	subl	-36(%rbp), %eax
	cmpl	$1, %eax
	jg	.L13
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-56(%rbp), %rax
	addq	%rax, %rdx
	movl	-36(%rbp), %eax
	cltq
	movq	%rax, (%rdx)
	addq	$1, -16(%rbp)
.L10:
	movl	-60(%rbp), %eax
	cltq
	cmpq	%rax, -16(%rbp)
	jl	.L14
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	-40(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	cocomp, .-cocomp
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1600080
a:
	.zero	1600080
	.globl	cum
	.align 32
	.type	cum, @object
	.size	cum, 1600080
cum:
	.zero	1600080
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%lld\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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -40(%rbp)
	jmp	.L17
.L18:
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	movq	-40(%rbp), %rdx
	addq	%rdx, %rdx
	cltq
	leaq	0(,%rdx,8), %rcx
	leaq	a(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-44(%rbp), %eax
	leal	1(%rax), %ecx
	movq	-40(%rbp), %rax
	addq	%rax, %rax
	leaq	1(%rax), %rdx
	movslq	%ecx, %rax
	leaq	0(,%rdx,8), %rcx
	leaq	a(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addq	$1, -40(%rbp)
.L17:
	movl	-52(%rbp), %eax
	cltq
	cmpq	%rax, -40(%rbp)
	jl	.L18
	movl	-52(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, %esi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	cocomp
	movq	$0, -32(%rbp)
	jmp	.L19
.L20:
	movq	-32(%rbp), %rax
	addq	%rax, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rcx
	movq	(%rdx,%rcx), %rdx
	leaq	1(%rdx), %rcx
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movq	-32(%rbp), %rax
	addq	%rax, %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rcx
	movq	(%rdx,%rcx), %rdx
	leaq	-1(%rdx), %rcx
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addq	$1, -32(%rbp)
.L19:
	movl	-52(%rbp), %eax
	cltq
	cmpq	%rax, -32(%rbp)
	jl	.L20
	movq	cum(%rip), %rax
	movq	%rax, -24(%rbp)
	movq	$0, -16(%rbp)
	jmp	.L21
.L22:
	movq	-16(%rbp), %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-16(%rbp), %rax
	addq	$1, %rax
	addq	%rdx, %rcx
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movq	-16(%rbp), %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	cum(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-24(%rbp), %rdx
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	movq	%rax, -24(%rbp)
	addq	$1, -16(%rbp)
.L21:
	movl	-52(%rbp), %eax
	addl	%eax, %eax
	addl	$5, %eax
	cltq
	cmpq	%rax, -16(%rbp)
	jl	.L22
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	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	.L24
	call	__stack_chk_fail@PLT
.L24:
	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:
