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>

int nextInt();
void sort(int *a, int size);

int N, i;
int A, B, C[100000];
long long int a, b;

int main(){
	N=nextInt();
	for(i=N-1; i>=0; --i){
		A=nextInt();
		B=nextInt();
		C[i] = A + B;
		b += B;
	}
	sort(C, N);
	for(i=0; i<N; i+=2){
		a += C[i];
	}
	printf("%lld\n", a-b);
	return 0;
}

int nextInt(){
	int f=0; char c=getchar();
	while((c<'0')||('9'<c)){c=getchar();}
	while((c>='0')&&(c<='9')){f=f*10+(c-'0'); c=getchar();}
	return f;
}

char compare(int *x, int *y){
	return *x > *y;
}

void quickSort(int *left, int *right){
	if(left >= right){return;}
	int *pivot = left;
	int *l=left, *r=right;
	int t;
	while(1){
		while (compare(l, pivot)){l++;}
		while (compare(pivot, r)){r--;}
		if(l>=r){break;}
		t=*l; *l=*r; *r=t;
		if(pivot == l){
			pivot = r;
		}else if(pivot == r){
			pivot = l;
		}
		l++; r--;
	}
	quickSort(left, l-1);
	quickSort(r+1, right);
}

void sort(int *a, int size){
	quickSort(a, a+size-1);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	B
	.align 4
	.type	B, @object
	.size	B, 4
B:
	.zero	4
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 400000
C:
	.zero	400000
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	b
	.align 8
	.type	b, @object
	.size	b, 8
b:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, %eax
	call	nextInt
	movl	%eax, N(%rip)
	movl	N(%rip), %eax
	subl	$1, %eax
	movl	%eax, i(%rip)
	jmp	.L2
.L3:
	movl	$0, %eax
	call	nextInt
	movl	%eax, A(%rip)
	movl	$0, %eax
	call	nextInt
	movl	%eax, B(%rip)
	movl	A(%rip), %ecx
	movl	B(%rip), %edx
	movl	i(%rip), %eax
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	B(%rip), %eax
	movslq	%eax, %rdx
	movq	b(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, b(%rip)
	movl	i(%rip), %eax
	subl	$1, %eax
	movl	%eax, i(%rip)
.L2:
	movl	i(%rip), %eax
	testl	%eax, %eax
	jns	.L3
	movl	N(%rip), %eax
	movl	%eax, %esi
	leaq	C(%rip), %rax
	movq	%rax, %rdi
	call	sort
	movl	$0, i(%rip)
	jmp	.L4
.L5:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, a(%rip)
	movl	i(%rip), %eax
	addl	$2, %eax
	movl	%eax, i(%rip)
.L4:
	movl	i(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jl	.L5
	movq	a(%rip), %rax
	movq	b(%rip), %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	nextInt
	.type	nextInt, @function
nextInt:
.LFB1:
	.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, -4(%rbp)
	call	getchar@PLT
	movb	%al, -5(%rbp)
	jmp	.L8
.L9:
	call	getchar@PLT
	movb	%al, -5(%rbp)
.L8:
	cmpb	$47, -5(%rbp)
	jle	.L9
	cmpb	$57, -5(%rbp)
	jg	.L9
	jmp	.L10
.L12:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movsbl	-5(%rbp), %eax
	subl	$48, %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	call	getchar@PLT
	movb	%al, -5(%rbp)
.L10:
	cmpb	$47, -5(%rbp)
	jle	.L11
	cmpb	$57, -5(%rbp)
	jle	.L12
.L11:
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	nextInt, .-nextInt
	.globl	compare
	.type	compare, @function
compare:
.LFB2:
	.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
	setg	%al
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	compare, .-compare
	.globl	quickSort
	.type	quickSort, @function
quickSort:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	-40(%rbp), %rax
	cmpq	-48(%rbp), %rax
	jnb	.L29
	movq	-40(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-40(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, -8(%rbp)
	jmp	.L19
.L20:
	addq	$4, -16(%rbp)
.L19:
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	compare
	testb	%al, %al
	jne	.L20
	jmp	.L21
.L22:
	subq	$4, -8(%rbp)
.L21:
	movq	-8(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	compare
	testb	%al, %al
	jne	.L22
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jnb	.L30
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	%edx, (%rax)
	movq	-8(%rbp), %rax
	movl	-28(%rbp), %edx
	movl	%edx, (%rax)
	movq	-24(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jne	.L25
	movq	-8(%rbp), %rax
	movq	%rax, -24(%rbp)
	jmp	.L26
.L25:
	movq	-24(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jne	.L26
	movq	-16(%rbp), %rax
	movq	%rax, -24(%rbp)
.L26:
	addq	$4, -16(%rbp)
	subq	$4, -8(%rbp)
	jmp	.L19
.L30:
	nop
	movq	-16(%rbp), %rax
	leaq	-4(%rax), %rdx
	movq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	quickSort
	movq	-8(%rbp), %rax
	leaq	4(%rax), %rdx
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	quickSort
	jmp	.L16
.L29:
	nop
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	quickSort, .-quickSort
	.globl	sort
	.type	sort, @function
sort:
.LFB4:
	.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
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rdx
	movq	-8(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	quickSort
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	sort, .-sort
	.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	nextInt
	.type	nextInt, @function
nextInt:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	.p2align 4,,10
	.p2align 3
.L10:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	leal	-48(%rax), %edx
	cmpb	$9, %dl
	ja	.L10
	movl	%eax, %edx
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L5:
	movq	stdin(%rip), %rdi
	subl	$48, %edx
	leal	(%r12,%r12,4), %eax
	movsbl	%dl, %edx
	leal	(%rdx,%rax,2), %r12d
	call	getc@PLT
	movl	%eax, %edx
	subl	$48, %eax
	cmpb	$9, %al
	jbe	.L5
	movl	%r12d, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE24:
	.size	nextInt, .-nextInt
	.p2align 4
	.globl	compare
	.type	compare, @function
compare:
.LFB25:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	setg	%al
	ret
	.cfi_endproc
.LFE25:
	.size	compare, .-compare
	.p2align 4
	.globl	quickSort
	.type	quickSort, @function
quickSort:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%rsi, 40(%rsp)
	cmpq	%rdi, %rsi
	jbe	.L13
	movq	%rdi, %rcx
.L22:
	movq	40(%rsp), %rbx
	movl	(%rcx), %r9d
	movq	%rcx, %rax
	movq	%rcx, %rdx
	movl	(%rbx), %edi
	movq	%rbx, %rsi
	jmp	.L15
.L16:
	addq	$4, %rax
.L15:
	movl	(%rax), %r10d
	movl	%edi, %r8d
	cmpl	%r10d, %r9d
	jl	.L16
	cmpl	%r8d, %r9d
	jle	.L122
.L18:
	movl	-4(%rsi), %r8d
	subq	$4, %rsi
	cmpl	%r8d, %r9d
	jg	.L18
.L122:
	cmpq	%rsi, %rax
	jnb	.L19
	movl	%r8d, (%rax)
	movl	%r10d, (%rsi)
	cmpq	%rax, %rdx
	je	.L86
	cmpq	%rsi, %rdx
	cmove	%rax, %rdx
.L20:
	subq	$4, %rsi
	movl	(%rdx), %r9d
	movl	(%rsi), %edi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L83:
	movq	%r10, %rdi
	leaq	-4(%rax), %rsi
	movq	%rcx, 88(%rsp)
	movq	%r8, 80(%rsp)
	call	quickSort
	leaq	4(%rbp), %r10
	movq	80(%rsp), %r8
	movq	88(%rsp), %rcx
	cmpq	%r10, %rbx
	ja	.L77
.L85:
	leaq	4(%r14), %r10
	cmpq	%r10, %r12
	ja	.L69
	movq	%rcx, %r12
	movq	%r8, %rbp
.L78:
	leaq	4(%rbp), %r10
	cmpq	%r10, %r13
	ja	.L61
	movq	%r15, %rcx
.L70:
	leaq	4(%r12), %r10
	cmpq	%r10, 32(%rsp)
	ja	.L53
.L62:
	leaq	4(%rcx), %r10
	cmpq	%r10, 24(%rsp)
	ja	.L45
	movq	72(%rsp), %r11
.L54:
	leaq	4(%r11), %r10
	cmpq	%r10, 16(%rsp)
	ja	.L37
.L46:
	movq	64(%rsp), %r9
	addq	$4, %r9
	cmpq	%r9, 8(%rsp)
	ja	.L29
.L38:
	movq	56(%rsp), %r8
	addq	$4, %r8
	cmpq	%r8, (%rsp)
	ja	.L21
.L30:
	movq	48(%rsp), %rcx
	addq	$4, %rcx
	cmpq	40(%rsp), %rcx
	jb	.L22
.L13:
	addq	$104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L19:
	.cfi_restore_state
	subq	$4, %rax
	movq	%rsi, 48(%rsp)
	movq	%rcx, %r8
	movq	%rax, (%rsp)
	cmpq	%rcx, %rax
	jbe	.L30
.L21:
	movq	(%rsp), %rbx
	movl	(%r8), %ecx
	movq	%r8, %rax
	movq	%r8, %rdx
	movl	(%rbx), %edi
	movq	%rbx, %rsi
.L23:
	movl	(%rax), %r10d
	movl	%edi, %r9d
	cmpl	%ecx, %r10d
	jg	.L24
	cmpl	%ecx, %edi
	jge	.L25
.L26:
	movl	-4(%rsi), %r9d
	subq	$4, %rsi
	cmpl	%r9d, %ecx
	jg	.L26
.L25:
	cmpq	%rsi, %rax
	jnb	.L27
	movl	%r9d, (%rax)
	movl	%r10d, (%rsi)
	cmpq	%rdx, %rax
	je	.L87
	cmpq	%rsi, %rdx
	cmove	%rax, %rdx
.L28:
	movl	(%rdx), %ecx
	movl	-4(%rsi), %edi
	subq	$4, %rsi
.L24:
	addq	$4, %rax
	jmp	.L23
.L86:
	movq	%rsi, %rdx
	jmp	.L20
.L87:
	movq	%rsi, %rdx
	jmp	.L28
.L27:
	subq	$4, %rax
	movq	%rsi, 56(%rsp)
	movq	%r8, %r9
	movq	%rax, 8(%rsp)
	cmpq	%r8, %rax
	jbe	.L38
.L29:
	movq	8(%rsp), %rbx
	movl	(%r9), %ecx
	movq	%r9, %rax
	movq	%r9, %rdx
	movl	(%rbx), %edi
	movq	%rbx, %rsi
.L31:
	movl	(%rax), %r10d
	movl	%edi, %r8d
	cmpl	%ecx, %r10d
	jg	.L32
	cmpl	%ecx, %edi
	jge	.L33
.L34:
	movl	-4(%rsi), %r8d
	subq	$4, %rsi
	cmpl	%r8d, %ecx
	jg	.L34
.L33:
	cmpq	%rsi, %rax
	jnb	.L35
	movl	%r8d, (%rax)
	movl	%r10d, (%rsi)
	cmpq	%rdx, %rax
	je	.L88
	cmpq	%rsi, %rdx
	cmove	%rax, %rdx
.L36:
	movl	(%rdx), %ecx
	movl	-4(%rsi), %edi
	subq	$4, %rsi
.L32:
	addq	$4, %rax
	jmp	.L31
.L88:
	movq	%rsi, %rdx
	jmp	.L36
.L35:
	subq	$4, %rax
	movq	%rsi, 64(%rsp)
	movq	%r9, %r10
	movq	%rax, 16(%rsp)
	cmpq	%r9, %rax
	jbe	.L46
.L37:
	movq	16(%rsp), %rbx
	movl	(%r10), %ecx
	movq	%r10, %rax
	movq	%r10, %rdx
	movl	(%rbx), %edi
	movq	%rbx, %r11
.L39:
	movl	(%rax), %r8d
	movl	%edi, %esi
	cmpl	%ecx, %r8d
	jg	.L40
	cmpl	%ecx, %edi
	jge	.L41
.L42:
	movl	-4(%r11), %esi
	subq	$4, %r11
	cmpl	%esi, %ecx
	jg	.L42
.L41:
	cmpq	%r11, %rax
	jnb	.L43
	movl	%esi, (%rax)
	movl	%r8d, (%r11)
	cmpq	%rdx, %rax
	je	.L89
	cmpq	%r11, %rdx
	cmove	%rax, %rdx
.L44:
	movl	(%rdx), %ecx
	movl	-4(%r11), %edi
	subq	$4, %r11
.L40:
	addq	$4, %rax
	jmp	.L39
.L89:
	movq	%r11, %rdx
	jmp	.L44
.L43:
	subq	$4, %rax
	movq	%rax, 24(%rsp)
	cmpq	%r10, %rax
	jbe	.L54
	movq	%r11, 72(%rsp)
.L45:
	movq	24(%rsp), %rbx
	movl	(%r10), %esi
	movq	%r10, %rax
	movq	%r10, %rdx
	movl	(%rbx), %r8d
	movq	%rbx, %rcx
.L47:
	movl	(%rax), %r9d
	movl	%r8d, %edi
	cmpl	%esi, %r9d
	jg	.L48
	cmpl	%esi, %r8d
	jge	.L49
.L50:
	movl	-4(%rcx), %edi
	subq	$4, %rcx
	cmpl	%edi, %esi
	jg	.L50
.L49:
	cmpq	%rcx, %rax
	jnb	.L51
	movl	%edi, (%rax)
	movl	%r9d, (%rcx)
	cmpq	%rdx, %rax
	je	.L90
	cmpq	%rcx, %rdx
	cmove	%rax, %rdx
.L52:
	movl	(%rdx), %esi
	movl	-4(%rcx), %r8d
	subq	$4, %rcx
.L48:
	addq	$4, %rax
	jmp	.L47
.L90:
	movq	%rcx, %rdx
	jmp	.L52
.L51:
	subq	$4, %rax
	movq	%rax, 32(%rsp)
	cmpq	%r10, %rax
	jbe	.L62
.L53:
	movq	32(%rsp), %rax
	movl	(%r10), %edx
	movq	%r10, %r13
	movq	%r10, %rdi
	movl	(%rax), %r8d
	movq	%rax, %r12
.L55:
	movl	0(%r13), %esi
	movl	%r8d, %eax
	cmpl	%edx, %esi
	jg	.L56
	cmpl	%edx, %r8d
	jge	.L57
	.p2align 4,,10
	.p2align 3
.L58:
	movl	-4(%r12), %eax
	subq	$4, %r12
	cmpl	%eax, %edx
	jg	.L58
.L57:
	cmpq	%r12, %r13
	jnb	.L59
	movl	%eax, 0(%r13)
	movl	%esi, (%r12)
	cmpq	%rdi, %r13
	je	.L91
	cmpq	%r12, %rdi
	cmove	%r13, %rdi
.L60:
	movl	(%rdi), %edx
	movl	-4(%r12), %r8d
	subq	$4, %r12
.L56:
	addq	$4, %r13
	jmp	.L55
.L91:
	movq	%r12, %rdi
	jmp	.L60
.L59:
	subq	$4, %r13
	movq	%rcx, %r15
	cmpq	%r10, %r13
	jbe	.L70
.L61:
	movl	(%r10), %ecx
	movl	0(%r13), %r8d
	movq	%r10, %rdx
	movq	%r13, %rbp
	movq	%r10, %rsi
	.p2align 4,,10
	.p2align 3
.L63:
	movl	(%rdx), %edi
	movl	%r8d, %eax
	cmpl	%ecx, %edi
	jg	.L64
	cmpl	%ecx, %r8d
	jge	.L65
	.p2align 4,,10
	.p2align 3
.L66:
	movl	-4(%rbp), %eax
	subq	$4, %rbp
	cmpl	%eax, %ecx
	jg	.L66
.L65:
	cmpq	%rbp, %rdx
	jnb	.L67
	movl	%eax, (%rdx)
	movl	%edi, 0(%rbp)
	cmpq	%rsi, %rdx
	je	.L92
	cmpq	%rbp, %rsi
	cmove	%rdx, %rsi
.L68:
	movl	(%rsi), %ecx
	movl	-4(%rbp), %r8d
	subq	$4, %rbp
.L64:
	addq	$4, %rdx
	jmp	.L63
.L92:
	movq	%rbp, %rsi
	jmp	.L68
.L67:
	leaq	-4(%rdx), %rcx
	cmpq	%r10, %rcx
	jbe	.L78
	movq	%rcx, %rax
	movq	%rbp, %r8
	movq	%r12, %rcx
	movq	%rax, %r12
.L69:
	movl	(%r10), %esi
	movl	(%r12), %edi
	movq	%r10, %rdx
	movq	%r12, %r14
	movq	%r10, %rax
	.p2align 4,,10
	.p2align 3
.L71:
	movl	(%rdx), %r11d
	movl	%edi, %r9d
	cmpl	%esi, %r11d
	jg	.L72
	cmpl	%esi, %edi
	jge	.L73
	.p2align 4,,10
	.p2align 3
.L74:
	movl	-4(%r14), %r9d
	subq	$4, %r14
	cmpl	%r9d, %esi
	jg	.L74
.L73:
	cmpq	%r14, %rdx
	jnb	.L75
	movl	%r9d, (%rdx)
	movl	%r11d, (%r14)
	cmpq	%rax, %rdx
	je	.L93
	cmpq	%r14, %rax
	cmove	%rdx, %rax
.L76:
	movl	(%rax), %esi
	movl	-4(%r14), %edi
	subq	$4, %r14
.L72:
	addq	$4, %rdx
	jmp	.L71
.L75:
	leaq	-4(%rdx), %rbx
	cmpq	%r10, %rbx
	jbe	.L85
.L77:
	movl	(%r10), %edi
	movl	(%rbx), %r9d
	movq	%r10, %rax
	movq	%rbx, %rbp
	movq	%r10, %rdx
	.p2align 4,,10
	.p2align 3
.L79:
	movl	(%rax), %r11d
	movl	%r9d, %esi
	cmpl	%edi, %r11d
	jg	.L80
	cmpl	%edi, %r9d
	jge	.L81
	.p2align 4,,10
	.p2align 3
.L82:
	movl	-4(%rbp), %esi
	subq	$4, %rbp
	cmpl	%esi, %edi
	jg	.L82
.L81:
	cmpq	%rbp, %rax
	jnb	.L83
	movl	%esi, (%rax)
	movl	%r11d, 0(%rbp)
	cmpq	%rdx, %rax
	je	.L94
	cmpq	%rbp, %rdx
	cmove	%rax, %rdx
.L84:
	movl	(%rdx), %edi
	movl	-4(%rbp), %r9d
	subq	$4, %rbp
.L80:
	addq	$4, %rax
	jmp	.L79
	.p2align 4,,10
	.p2align 3
.L94:
	movq	%rbp, %rdx
	jmp	.L84
.L93:
	movq	%r14, %rax
	jmp	.L76
	.cfi_endproc
.LFE26:
	.size	quickSort, .-quickSort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xorl	%eax, %eax
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	call	nextInt
	movl	%eax, N(%rip)
	subl	$1, %eax
	movl	%eax, i(%rip)
	js	.L124
	leaq	C(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L133:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	leal	-48(%rax), %edx
	cmpb	$9, %dl
	ja	.L133
	movl	%eax, %edx
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L128:
	movq	stdin(%rip), %rdi
	subl	$48, %edx
	leal	0(%rbp,%rbp,4), %eax
	movsbl	%dl, %edx
	leal	(%rdx,%rax,2), %ebp
	call	getc@PLT
	movl	%eax, %edx
	subl	$48, %eax
	cmpb	$9, %al
	jbe	.L128
	movl	%ebp, A(%rip)
	.p2align 4,,10
	.p2align 3
.L148:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	leal	-48(%rax), %edx
	cmpb	$9, %dl
	ja	.L148
	movl	%eax, %edx
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L132:
	movq	stdin(%rip), %rdi
	subl	$48, %edx
	leal	0(%rbp,%rbp,4), %eax
	movsbl	%dl, %edx
	leal	(%rdx,%rax,2), %ebp
	call	getc@PLT
	movl	%eax, %edx
	subl	$48, %eax
	cmpb	$9, %al
	jbe	.L132
	movslq	i(%rip), %rdx
	movl	A(%rip), %ecx
	movl	%ebp, B(%rip)
	movq	%rdx, %rax
	addl	%ebp, %ecx
	movslq	%ebp, %rbp
	addq	b(%rip), %rbp
	subl	$1, %eax
	movl	%ecx, (%rbx,%rdx,4)
	movq	%rbp, b(%rip)
	movl	%eax, i(%rip)
	jns	.L133
.L134:
	movslq	N(%rip), %rax
	movq	%rbx, %rdi
	leaq	-4(%rbx,%rax,4), %rsi
	call	quickSort
	movl	N(%rip), %edi
	movl	$0, i(%rip)
	movq	a(%rip), %rdx
	testl	%edi, %edi
	jle	.L135
	leal	-1(%rdi), %eax
	movl	%eax, %esi
	shrl	%esi
	addl	$1, %esi
	cmpl	$5, %eax
	jbe	.L139
	movl	%esi, %ecx
	leaq	C(%rip), %rax
	pxor	%xmm1, %xmm1
	shrl	$2, %ecx
	leaq	32(%rax), %r8
	pxor	%xmm4, %xmm4
	subl	$1, %ecx
	salq	$5, %rcx
	addq	%r8, %rcx
	.p2align 4,,10
	.p2align 3
.L137:
	movdqa	%xmm4, %xmm2
	movdqa	(%rax), %xmm0
	shufps	$136, 16(%rax), %xmm0
	movdqa	%xmm0, %xmm3
	pcmpgtd	%xmm0, %xmm2
	addq	$32, %rax
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm0
	paddq	%xmm3, %xmm1
	paddq	%xmm0, %xmm1
	cmpq	%rcx, %rax
	jne	.L137
	movdqa	%xmm1, %xmm0
	movl	%esi, %ecx
	psrldq	$8, %xmm0
	andl	$-4, %ecx
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rax
	addq	%rax, %rdx
	leal	(%rcx,%rcx), %eax
	cmpl	%esi, %ecx
	je	.L138
.L136:
	movslq	%eax, %rcx
	movslq	(%rbx,%rcx,4), %rcx
	addq	%rcx, %rdx
	leal	2(%rax), %ecx
	cmpl	%edi, %ecx
	jge	.L138
	movslq	%ecx, %rcx
	addl	$4, %eax
	movslq	(%rbx,%rcx,4), %rcx
	addq	%rcx, %rdx
	cmpl	%eax, %edi
	jle	.L138
	cltq
	movslq	(%rbx,%rax,4), %rax
	addq	%rax, %rdx
.L138:
	addl	%esi, %esi
	movq	%rdx, a(%rip)
	movl	%esi, i(%rip)
.L135:
	subq	%rbp, %rdx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L124:
	.cfi_restore_state
	movq	b(%rip), %rbp
	leaq	C(%rip), %rbx
	jmp	.L134
.L139:
	xorl	%eax, %eax
	jmp	.L136
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	sort
	.type	sort, @function
sort:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movslq	%esi, %rax
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	-4(%rdi,%rax,4), %rbp
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	cmpq	%rdi, %rbp
	jbe	.L149
.L150:
	movl	(%rdi), %esi
	movl	0(%rbp), %r9d
	movq	%rdi, %rax
	movq	%rbp, %rbx
	movq	%rdi, %r8
	jmp	.L151
	.p2align 4,,10
	.p2align 3
.L152:
	addq	$4, %rax
.L151:
	movl	(%rax), %edx
	movl	%r9d, %ecx
	cmpl	%esi, %edx
	jg	.L152
	cmpl	%ecx, %esi
	jle	.L163
	.p2align 4,,10
	.p2align 3
.L154:
	movl	-4(%rbx), %ecx
	subq	$4, %rbx
	cmpl	%ecx, %esi
	jg	.L154
.L163:
	cmpq	%rbx, %rax
	jnb	.L155
	movl	%ecx, (%rax)
	movl	%edx, (%rbx)
	cmpq	%r8, %rax
	je	.L158
	cmpq	%rbx, %r8
	cmove	%rax, %r8
.L156:
	subq	$4, %rbx
	movl	(%r8), %esi
	movl	(%rbx), %r9d
	jmp	.L152
	.p2align 4,,10
	.p2align 3
.L158:
	movq	%rbx, %r8
	jmp	.L156
	.p2align 4,,10
	.p2align 3
.L155:
	leaq	-4(%rax), %rsi
	call	quickSort
	leaq	4(%rbx), %rdi
	cmpq	%rdi, %rbp
	ja	.L150
.L149:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE27:
	.size	sort, .-sort
	.globl	b
	.bss
	.align 8
	.type	b, @object
	.size	b, 8
b:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 400000
C:
	.zero	400000
	.globl	B
	.align 4
	.type	B, @object
	.size	B, 4
B:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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	nextInt
	.type	nextInt, @function
nextInt:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	.p2align 4,,10
	.p2align 3
.L10:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	leal	-48(%rax), %edx
	cmpb	$9, %dl
	ja	.L10
	movl	%eax, %edx
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L5:
	movq	stdin(%rip), %rdi
	subl	$48, %edx
	leal	(%r12,%r12,4), %eax
	movsbl	%dl, %edx
	leal	(%rdx,%rax,2), %r12d
	call	getc@PLT
	movl	%eax, %edx
	subl	$48, %eax
	cmpb	$9, %al
	jbe	.L5
	movl	%r12d, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE24:
	.size	nextInt, .-nextInt
	.p2align 4
	.globl	compare
	.type	compare, @function
compare:
.LFB25:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	setg	%al
	ret
	.cfi_endproc
.LFE25:
	.size	compare, .-compare
	.p2align 4
	.globl	quickSort
	.type	quickSort, @function
quickSort:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%rsi, 40(%rsp)
	cmpq	%rdi, %rsi
	jbe	.L13
	movq	%rdi, %rcx
.L22:
	movq	40(%rsp), %rbx
	movl	(%rcx), %r9d
	movq	%rcx, %rax
	movq	%rcx, %rdx
	movl	(%rbx), %edi
	movq	%rbx, %rsi
	jmp	.L15
.L16:
	addq	$4, %rax
.L15:
	movl	(%rax), %r10d
	movl	%edi, %r8d
	cmpl	%r10d, %r9d
	jl	.L16
	cmpl	%r8d, %r9d
	jle	.L122
.L18:
	movl	-4(%rsi), %r8d
	subq	$4, %rsi
	cmpl	%r8d, %r9d
	jg	.L18
.L122:
	cmpq	%rsi, %rax
	jnb	.L19
	movl	%r8d, (%rax)
	movl	%r10d, (%rsi)
	cmpq	%rax, %rdx
	je	.L86
	cmpq	%rsi, %rdx
	cmove	%rax, %rdx
.L20:
	subq	$4, %rsi
	movl	(%rdx), %r9d
	movl	(%rsi), %edi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L83:
	movq	%r10, %rdi
	leaq	-4(%rax), %rsi
	movq	%rcx, 88(%rsp)
	movq	%r8, 80(%rsp)
	call	quickSort
	leaq	4(%rbp), %r10
	movq	80(%rsp), %r8
	movq	88(%rsp), %rcx
	cmpq	%r10, %rbx
	ja	.L77
.L85:
	leaq	4(%r14), %r10
	cmpq	%r10, %r12
	ja	.L69
	movq	%rcx, %r12
	movq	%r8, %rbp
.L78:
	leaq	4(%rbp), %r10
	cmpq	%r10, %r13
	ja	.L61
	movq	%r15, %rcx
.L70:
	leaq	4(%r12), %r10
	cmpq	%r10, 32(%rsp)
	ja	.L53
.L62:
	leaq	4(%rcx), %r10
	cmpq	%r10, 24(%rsp)
	ja	.L45
	movq	72(%rsp), %r11
.L54:
	leaq	4(%r11), %r10
	cmpq	%r10, 16(%rsp)
	ja	.L37
.L46:
	movq	64(%rsp), %r9
	addq	$4, %r9
	cmpq	%r9, 8(%rsp)
	ja	.L29
.L38:
	movq	56(%rsp), %r8
	addq	$4, %r8
	cmpq	%r8, (%rsp)
	ja	.L21
.L30:
	movq	48(%rsp), %rcx
	addq	$4, %rcx
	cmpq	40(%rsp), %rcx
	jb	.L22
.L13:
	addq	$104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L19:
	.cfi_restore_state
	subq	$4, %rax
	movq	%rsi, 48(%rsp)
	movq	%rcx, %r8
	movq	%rax, (%rsp)
	cmpq	%rcx, %rax
	jbe	.L30
.L21:
	movq	(%rsp), %rbx
	movl	(%r8), %ecx
	movq	%r8, %rax
	movq	%r8, %rdx
	movl	(%rbx), %edi
	movq	%rbx, %rsi
.L23:
	movl	(%rax), %r10d
	movl	%edi, %r9d
	cmpl	%ecx, %r10d
	jg	.L24
	cmpl	%ecx, %edi
	jge	.L25
.L26:
	movl	-4(%rsi), %r9d
	subq	$4, %rsi
	cmpl	%r9d, %ecx
	jg	.L26
.L25:
	cmpq	%rsi, %rax
	jnb	.L27
	movl	%r9d, (%rax)
	movl	%r10d, (%rsi)
	cmpq	%rdx, %rax
	je	.L87
	cmpq	%rsi, %rdx
	cmove	%rax, %rdx
.L28:
	movl	(%rdx), %ecx
	movl	-4(%rsi), %edi
	subq	$4, %rsi
.L24:
	addq	$4, %rax
	jmp	.L23
.L86:
	movq	%rsi, %rdx
	jmp	.L20
.L87:
	movq	%rsi, %rdx
	jmp	.L28
.L27:
	subq	$4, %rax
	movq	%rsi, 56(%rsp)
	movq	%r8, %r9
	movq	%rax, 8(%rsp)
	cmpq	%r8, %rax
	jbe	.L38
.L29:
	movq	8(%rsp), %rbx
	movl	(%r9), %ecx
	movq	%r9, %rax
	movq	%r9, %rdx
	movl	(%rbx), %edi
	movq	%rbx, %rsi
.L31:
	movl	(%rax), %r10d
	movl	%edi, %r8d
	cmpl	%ecx, %r10d
	jg	.L32
	cmpl	%ecx, %edi
	jge	.L33
.L34:
	movl	-4(%rsi), %r8d
	subq	$4, %rsi
	cmpl	%r8d, %ecx
	jg	.L34
.L33:
	cmpq	%rsi, %rax
	jnb	.L35
	movl	%r8d, (%rax)
	movl	%r10d, (%rsi)
	cmpq	%rdx, %rax
	je	.L88
	cmpq	%rsi, %rdx
	cmove	%rax, %rdx
.L36:
	movl	(%rdx), %ecx
	movl	-4(%rsi), %edi
	subq	$4, %rsi
.L32:
	addq	$4, %rax
	jmp	.L31
.L88:
	movq	%rsi, %rdx
	jmp	.L36
.L35:
	subq	$4, %rax
	movq	%rsi, 64(%rsp)
	movq	%r9, %r10
	movq	%rax, 16(%rsp)
	cmpq	%r9, %rax
	jbe	.L46
.L37:
	movq	16(%rsp), %rbx
	movl	(%r10), %ecx
	movq	%r10, %rax
	movq	%r10, %rdx
	movl	(%rbx), %edi
	movq	%rbx, %r11
.L39:
	movl	(%rax), %r8d
	movl	%edi, %esi
	cmpl	%ecx, %r8d
	jg	.L40
	cmpl	%ecx, %edi
	jge	.L41
.L42:
	movl	-4(%r11), %esi
	subq	$4, %r11
	cmpl	%esi, %ecx
	jg	.L42
.L41:
	cmpq	%r11, %rax
	jnb	.L43
	movl	%esi, (%rax)
	movl	%r8d, (%r11)
	cmpq	%rdx, %rax
	je	.L89
	cmpq	%r11, %rdx
	cmove	%rax, %rdx
.L44:
	movl	(%rdx), %ecx
	movl	-4(%r11), %edi
	subq	$4, %r11
.L40:
	addq	$4, %rax
	jmp	.L39
.L89:
	movq	%r11, %rdx
	jmp	.L44
.L43:
	subq	$4, %rax
	movq	%rax, 24(%rsp)
	cmpq	%r10, %rax
	jbe	.L54
	movq	%r11, 72(%rsp)
.L45:
	movq	24(%rsp), %rbx
	movl	(%r10), %esi
	movq	%r10, %rax
	movq	%r10, %rdx
	movl	(%rbx), %r8d
	movq	%rbx, %rcx
.L47:
	movl	(%rax), %r9d
	movl	%r8d, %edi
	cmpl	%esi, %r9d
	jg	.L48
	cmpl	%esi, %r8d
	jge	.L49
.L50:
	movl	-4(%rcx), %edi
	subq	$4, %rcx
	cmpl	%edi, %esi
	jg	.L50
.L49:
	cmpq	%rcx, %rax
	jnb	.L51
	movl	%edi, (%rax)
	movl	%r9d, (%rcx)
	cmpq	%rdx, %rax
	je	.L90
	cmpq	%rcx, %rdx
	cmove	%rax, %rdx
.L52:
	movl	(%rdx), %esi
	movl	-4(%rcx), %r8d
	subq	$4, %rcx
.L48:
	addq	$4, %rax
	jmp	.L47
.L90:
	movq	%rcx, %rdx
	jmp	.L52
.L51:
	subq	$4, %rax
	movq	%rax, 32(%rsp)
	cmpq	%r10, %rax
	jbe	.L62
.L53:
	movq	32(%rsp), %rax
	movl	(%r10), %edx
	movq	%r10, %r13
	movq	%r10, %rdi
	movl	(%rax), %r8d
	movq	%rax, %r12
.L55:
	movl	0(%r13), %esi
	movl	%r8d, %eax
	cmpl	%edx, %esi
	jg	.L56
	cmpl	%edx, %r8d
	jge	.L57
	.p2align 4,,10
	.p2align 3
.L58:
	movl	-4(%r12), %eax
	subq	$4, %r12
	cmpl	%eax, %edx
	jg	.L58
.L57:
	cmpq	%r12, %r13
	jnb	.L59
	movl	%eax, 0(%r13)
	movl	%esi, (%r12)
	cmpq	%rdi, %r13
	je	.L91
	cmpq	%r12, %rdi
	cmove	%r13, %rdi
.L60:
	movl	(%rdi), %edx
	movl	-4(%r12), %r8d
	subq	$4, %r12
.L56:
	addq	$4, %r13
	jmp	.L55
.L91:
	movq	%r12, %rdi
	jmp	.L60
.L59:
	subq	$4, %r13
	movq	%rcx, %r15
	cmpq	%r10, %r13
	jbe	.L70
.L61:
	movl	(%r10), %ecx
	movl	0(%r13), %r8d
	movq	%r10, %rdx
	movq	%r13, %rbp
	movq	%r10, %rsi
	.p2align 4,,10
	.p2align 3
.L63:
	movl	(%rdx), %edi
	movl	%r8d, %eax
	cmpl	%ecx, %edi
	jg	.L64
	cmpl	%ecx, %r8d
	jge	.L65
	.p2align 4,,10
	.p2align 3
.L66:
	movl	-4(%rbp), %eax
	subq	$4, %rbp
	cmpl	%eax, %ecx
	jg	.L66
.L65:
	cmpq	%rbp, %rdx
	jnb	.L67
	movl	%eax, (%rdx)
	movl	%edi, 0(%rbp)
	cmpq	%rsi, %rdx
	je	.L92
	cmpq	%rbp, %rsi
	cmove	%rdx, %rsi
.L68:
	movl	(%rsi), %ecx
	movl	-4(%rbp), %r8d
	subq	$4, %rbp
.L64:
	addq	$4, %rdx
	jmp	.L63
.L92:
	movq	%rbp, %rsi
	jmp	.L68
.L67:
	leaq	-4(%rdx), %rcx
	cmpq	%r10, %rcx
	jbe	.L78
	movq	%rcx, %rax
	movq	%rbp, %r8
	movq	%r12, %rcx
	movq	%rax, %r12
.L69:
	movl	(%r10), %esi
	movl	(%r12), %edi
	movq	%r10, %rdx
	movq	%r12, %r14
	movq	%r10, %rax
	.p2align 4,,10
	.p2align 3
.L71:
	movl	(%rdx), %r11d
	movl	%edi, %r9d
	cmpl	%esi, %r11d
	jg	.L72
	cmpl	%esi, %edi
	jge	.L73
	.p2align 4,,10
	.p2align 3
.L74:
	movl	-4(%r14), %r9d
	subq	$4, %r14
	cmpl	%r9d, %esi
	jg	.L74
.L73:
	cmpq	%r14, %rdx
	jnb	.L75
	movl	%r9d, (%rdx)
	movl	%r11d, (%r14)
	cmpq	%rax, %rdx
	je	.L93
	cmpq	%r14, %rax
	cmove	%rdx, %rax
.L76:
	movl	(%rax), %esi
	movl	-4(%r14), %edi
	subq	$4, %r14
.L72:
	addq	$4, %rdx
	jmp	.L71
.L75:
	leaq	-4(%rdx), %rbx
	cmpq	%r10, %rbx
	jbe	.L85
.L77:
	movl	(%r10), %edi
	movl	(%rbx), %r9d
	movq	%r10, %rax
	movq	%rbx, %rbp
	movq	%r10, %rdx
	.p2align 4,,10
	.p2align 3
.L79:
	movl	(%rax), %r11d
	movl	%r9d, %esi
	cmpl	%edi, %r11d
	jg	.L80
	cmpl	%edi, %r9d
	jge	.L81
	.p2align 4,,10
	.p2align 3
.L82:
	movl	-4(%rbp), %esi
	subq	$4, %rbp
	cmpl	%esi, %edi
	jg	.L82
.L81:
	cmpq	%rbp, %rax
	jnb	.L83
	movl	%esi, (%rax)
	movl	%r11d, 0(%rbp)
	cmpq	%rdx, %rax
	je	.L94
	cmpq	%rbp, %rdx
	cmove	%rax, %rdx
.L84:
	movl	(%rdx), %edi
	movl	-4(%rbp), %r9d
	subq	$4, %rbp
.L80:
	addq	$4, %rax
	jmp	.L79
	.p2align 4,,10
	.p2align 3
.L94:
	movq	%rbp, %rdx
	jmp	.L84
.L93:
	movq	%r14, %rax
	jmp	.L76
	.cfi_endproc
.LFE26:
	.size	quickSort, .-quickSort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xorl	%eax, %eax
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	call	nextInt
	movl	%eax, N(%rip)
	subl	$1, %eax
	movl	%eax, i(%rip)
	js	.L124
	leaq	C(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L133:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	leal	-48(%rax), %edx
	cmpb	$9, %dl
	ja	.L133
	movl	%eax, %edx
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L128:
	movq	stdin(%rip), %rdi
	subl	$48, %edx
	leal	0(%rbp,%rbp,4), %eax
	movsbl	%dl, %edx
	leal	(%rdx,%rax,2), %ebp
	call	getc@PLT
	movl	%eax, %edx
	subl	$48, %eax
	cmpb	$9, %al
	jbe	.L128
	movl	%ebp, A(%rip)
	.p2align 4,,10
	.p2align 3
.L148:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	leal	-48(%rax), %edx
	cmpb	$9, %dl
	ja	.L148
	movl	%eax, %edx
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L132:
	movq	stdin(%rip), %rdi
	subl	$48, %edx
	leal	0(%rbp,%rbp,4), %eax
	movsbl	%dl, %edx
	leal	(%rdx,%rax,2), %ebp
	call	getc@PLT
	movl	%eax, %edx
	subl	$48, %eax
	cmpb	$9, %al
	jbe	.L132
	movslq	i(%rip), %rdx
	movl	A(%rip), %ecx
	movl	%ebp, B(%rip)
	movq	%rdx, %rax
	addl	%ebp, %ecx
	movslq	%ebp, %rbp
	addq	b(%rip), %rbp
	subl	$1, %eax
	movl	%ecx, (%rbx,%rdx,4)
	movq	%rbp, b(%rip)
	movl	%eax, i(%rip)
	jns	.L133
.L134:
	movslq	N(%rip), %rax
	movq	%rbx, %rdi
	leaq	-4(%rbx,%rax,4), %rsi
	call	quickSort
	movl	N(%rip), %edi
	movl	$0, i(%rip)
	movq	a(%rip), %rdx
	testl	%edi, %edi
	jle	.L135
	leal	-1(%rdi), %eax
	movl	%eax, %esi
	shrl	%esi
	addl	$1, %esi
	cmpl	$5, %eax
	jbe	.L139
	movl	%esi, %ecx
	leaq	C(%rip), %rax
	pxor	%xmm1, %xmm1
	shrl	$2, %ecx
	leaq	32(%rax), %r8
	pxor	%xmm4, %xmm4
	subl	$1, %ecx
	salq	$5, %rcx
	addq	%r8, %rcx
	.p2align 4,,10
	.p2align 3
.L137:
	movdqa	%xmm4, %xmm2
	movdqa	(%rax), %xmm0
	shufps	$136, 16(%rax), %xmm0
	movdqa	%xmm0, %xmm3
	pcmpgtd	%xmm0, %xmm2
	addq	$32, %rax
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm0
	paddq	%xmm3, %xmm1
	paddq	%xmm0, %xmm1
	cmpq	%rcx, %rax
	jne	.L137
	movdqa	%xmm1, %xmm0
	movl	%esi, %ecx
	psrldq	$8, %xmm0
	andl	$-4, %ecx
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rax
	addq	%rax, %rdx
	leal	(%rcx,%rcx), %eax
	cmpl	%esi, %ecx
	je	.L138
.L136:
	movslq	%eax, %rcx
	movslq	(%rbx,%rcx,4), %rcx
	addq	%rcx, %rdx
	leal	2(%rax), %ecx
	cmpl	%edi, %ecx
	jge	.L138
	movslq	%ecx, %rcx
	addl	$4, %eax
	movslq	(%rbx,%rcx,4), %rcx
	addq	%rcx, %rdx
	cmpl	%eax, %edi
	jle	.L138
	cltq
	movslq	(%rbx,%rax,4), %rax
	addq	%rax, %rdx
.L138:
	addl	%esi, %esi
	movq	%rdx, a(%rip)
	movl	%esi, i(%rip)
.L135:
	subq	%rbp, %rdx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L124:
	.cfi_restore_state
	movq	b(%rip), %rbp
	leaq	C(%rip), %rbx
	jmp	.L134
.L139:
	xorl	%eax, %eax
	jmp	.L136
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	sort
	.type	sort, @function
sort:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movslq	%esi, %rax
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	-4(%rdi,%rax,4), %rbp
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	cmpq	%rdi, %rbp
	jbe	.L149
.L150:
	movl	(%rdi), %esi
	movl	0(%rbp), %r9d
	movq	%rdi, %rax
	movq	%rbp, %rbx
	movq	%rdi, %r8
	jmp	.L151
	.p2align 4,,10
	.p2align 3
.L152:
	addq	$4, %rax
.L151:
	movl	(%rax), %edx
	movl	%r9d, %ecx
	cmpl	%esi, %edx
	jg	.L152
	cmpl	%ecx, %esi
	jle	.L163
	.p2align 4,,10
	.p2align 3
.L154:
	movl	-4(%rbx), %ecx
	subq	$4, %rbx
	cmpl	%ecx, %esi
	jg	.L154
.L163:
	cmpq	%rbx, %rax
	jnb	.L155
	movl	%ecx, (%rax)
	movl	%edx, (%rbx)
	cmpq	%r8, %rax
	je	.L158
	cmpq	%rbx, %r8
	cmove	%rax, %r8
.L156:
	subq	$4, %rbx
	movl	(%r8), %esi
	movl	(%rbx), %r9d
	jmp	.L152
	.p2align 4,,10
	.p2align 3
.L158:
	movq	%rbx, %r8
	jmp	.L156
	.p2align 4,,10
	.p2align 3
.L155:
	leaq	-4(%rax), %rsi
	call	quickSort
	leaq	4(%rbx), %rdi
	cmpq	%rdi, %rbp
	ja	.L150
.L149:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE27:
	.size	sort, .-sort
	.globl	b
	.bss
	.align 8
	.type	b, @object
	.size	b, 8
b:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 400000
C:
	.zero	400000
	.globl	B
	.align 4
	.type	B, @object
	.size	B, 4
B:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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>

int nextInt();
void sort(int *a, int size);

int N, i;
int A, B, C[100000];
long long int a, b;

int main(){
	N=nextInt();
	for(i=N-1; i>=0; --i){
		A=nextInt();
		B=nextInt();
		C[i] = A + B;
		b += B;
	}
	sort(C, N);
	for(i=0; i<N; i+=2){
		a += C[i];
	}
	printf("%lld\n", a-b);
	return 0;
}

int nextInt(){
	int f=0; char c=getchar();
	while((c<'0')||('9'<c)){c=getchar();}
	while((c>='0')&&(c<='9')){f=f*10+(c-'0'); c=getchar();}
	return f;
}

char compare(int *x, int *y){
	return *x > *y;
}

void quickSort(int *left, int *right){
	if(left >= right){return;}
	int *pivot = left;
	int *l=left, *r=right;
	int t;
	while(1){
		while (compare(l, pivot)){l++;}
		while (compare(pivot, r)){r--;}
		if(l>=r){break;}
		t=*l; *l=*r; *r=t;
		if(pivot == l){
			pivot = r;
		}else if(pivot == r){
			pivot = l;
		}
		l++; r--;
	}
	quickSort(left, l-1);
	quickSort(r+1, right);
}

void sort(int *a, int size){
	quickSort(a, a+size-1);
}

3
20 10
16 20
20 30
 3
10 10
20 34
30 30
 6
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000001
 3
20 10
16 20
20 7
 3
10 10
20 4
30 30
 6
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
2 1000000001
 3
20 2
16 20
20 7
 3
15 10
20 4
30 30
 6
1 1000000000
1 1000000000
1 1000000000
1 1010000000
1 1000000000
2 1000000001
 3
20 2
1 20
20 7

20
 6
 -2999999997
 26
 36
 -2999999996
 29
 40
 -2999999998
 19

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>

int nextInt();
void sort(int *a, int size);

int N, i;
int A, B, C[100000];
long long int a, b;

int main(){
	N=nextInt();
	for(i=N-1; i>=0; --i){
		A=nextInt();
		B=nextInt();
		C[i] = A + B;
		b += B;
	}
	sort(C, N);
	for(i=0; i<N; i+=2){
		a += C[i];
	}
	printf("%lld\n", a-b);
	return 0;
}

int nextInt(){
	int f=0; char c=getchar();
	while((c<'0')||('9'<c)){c=getchar();}
	while((c>='0')&&(c<='9')){f=f*10+(c-'0'); c=getchar();}
	return f;
}

char compare(int *x, int *y){
	return *x > *y;
}

void quickSort(int *left, int *right){
	if(left >= right){return;}
	int *pivot = left;
	int *l=left, *r=right;
	int t;
	while(1){
		while (compare(l, pivot)){l++;}
		while (compare(pivot, r)){r--;}
		if(l>=r){break;}
		t=*l; *l=*r; *r=t;
		if(pivot == l){
			pivot = r;
		}else if(pivot == r){
			pivot = l;
		}
		l++; r--;
	}
	quickSort(left, l-1);
	quickSort(r+1, right);
}

void sort(int *a, int size){
	quickSort(a, a+size-1);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	B
	.align 4
	.type	B, @object
	.size	B, 4
B:
	.zero	4
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 400000
C:
	.zero	400000
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	b
	.align 8
	.type	b, @object
	.size	b, 8
b:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, %eax
	call	nextInt
	movl	%eax, N(%rip)
	movl	N(%rip), %eax
	subl	$1, %eax
	movl	%eax, i(%rip)
	jmp	.L2
.L3:
	movl	$0, %eax
	call	nextInt
	movl	%eax, A(%rip)
	movl	$0, %eax
	call	nextInt
	movl	%eax, B(%rip)
	movl	A(%rip), %ecx
	movl	B(%rip), %edx
	movl	i(%rip), %eax
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	B(%rip), %eax
	movslq	%eax, %rdx
	movq	b(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, b(%rip)
	movl	i(%rip), %eax
	subl	$1, %eax
	movl	%eax, i(%rip)
.L2:
	movl	i(%rip), %eax
	testl	%eax, %eax
	jns	.L3
	movl	N(%rip), %eax
	movl	%eax, %esi
	leaq	C(%rip), %rax
	movq	%rax, %rdi
	call	sort
	movl	$0, i(%rip)
	jmp	.L4
.L5:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, a(%rip)
	movl	i(%rip), %eax
	addl	$2, %eax
	movl	%eax, i(%rip)
.L4:
	movl	i(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jl	.L5
	movq	a(%rip), %rax
	movq	b(%rip), %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	nextInt
	.type	nextInt, @function
nextInt:
.LFB1:
	.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, -4(%rbp)
	call	getchar@PLT
	movb	%al, -5(%rbp)
	jmp	.L8
.L9:
	call	getchar@PLT
	movb	%al, -5(%rbp)
.L8:
	cmpb	$47, -5(%rbp)
	jle	.L9
	cmpb	$57, -5(%rbp)
	jg	.L9
	jmp	.L10
.L12:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movsbl	-5(%rbp), %eax
	subl	$48, %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	call	getchar@PLT
	movb	%al, -5(%rbp)
.L10:
	cmpb	$47, -5(%rbp)
	jle	.L11
	cmpb	$57, -5(%rbp)
	jle	.L12
.L11:
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	nextInt, .-nextInt
	.globl	compare
	.type	compare, @function
compare:
.LFB2:
	.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
	setg	%al
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	compare, .-compare
	.globl	quickSort
	.type	quickSort, @function
quickSort:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	-40(%rbp), %rax
	cmpq	-48(%rbp), %rax
	jnb	.L29
	movq	-40(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-40(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, -8(%rbp)
	jmp	.L19
.L20:
	addq	$4, -16(%rbp)
.L19:
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	compare
	testb	%al, %al
	jne	.L20
	jmp	.L21
.L22:
	subq	$4, -8(%rbp)
.L21:
	movq	-8(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	compare
	testb	%al, %al
	jne	.L22
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jnb	.L30
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	%edx, (%rax)
	movq	-8(%rbp), %rax
	movl	-28(%rbp), %edx
	movl	%edx, (%rax)
	movq	-24(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jne	.L25
	movq	-8(%rbp), %rax
	movq	%rax, -24(%rbp)
	jmp	.L26
.L25:
	movq	-24(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jne	.L26
	movq	-16(%rbp), %rax
	movq	%rax, -24(%rbp)
.L26:
	addq	$4, -16(%rbp)
	subq	$4, -8(%rbp)
	jmp	.L19
.L30:
	nop
	movq	-16(%rbp), %rax
	leaq	-4(%rax), %rdx
	movq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	quickSort
	movq	-8(%rbp), %rax
	leaq	4(%rax), %rdx
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	quickSort
	jmp	.L16
.L29:
	nop
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	quickSort, .-quickSort
	.globl	sort
	.type	sort, @function
sort:
.LFB4:
	.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
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rdx
	movq	-8(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	quickSort
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	sort, .-sort
	.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	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	B
	.align 4
	.type	B, @object
	.size	B, 4
B:
	.zero	4
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 400000
C:
	.zero	400000
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	b
	.align 8
	.type	b, @object
	.size	b, 8
b:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, %eax
	call	nextInt
	movl	%eax, N(%rip)
	movl	N(%rip), %eax
	subl	$1, %eax
	movl	%eax, i(%rip)
	jmp	.L2
.L3:
	movl	$0, %eax
	call	nextInt
	movl	%eax, A(%rip)
	movl	$0, %eax
	call	nextInt
	movl	%eax, B(%rip)
	movl	A(%rip), %ecx
	movl	B(%rip), %edx
	movl	i(%rip), %eax
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	B(%rip), %eax
	movslq	%eax, %rdx
	movq	b(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, b(%rip)
	movl	i(%rip), %eax
	subl	$1, %eax
	movl	%eax, i(%rip)
.L2:
	movl	i(%rip), %eax
	testl	%eax, %eax
	jns	.L3
	movl	N(%rip), %eax
	movl	%eax, %esi
	leaq	C(%rip), %rax
	movq	%rax, %rdi
	call	sort
	movl	$0, i(%rip)
	jmp	.L4
.L5:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, a(%rip)
	movl	i(%rip), %eax
	addl	$2, %eax
	movl	%eax, i(%rip)
.L4:
	movl	i(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jl	.L5
	movq	a(%rip), %rax
	movq	b(%rip), %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	nextInt
	.type	nextInt, @function
nextInt:
.LFB1:
	.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, -4(%rbp)
	call	getchar@PLT
	movb	%al, -5(%rbp)
	jmp	.L8
.L9:
	call	getchar@PLT
	movb	%al, -5(%rbp)
.L8:
	cmpb	$47, -5(%rbp)
	jle	.L9
	cmpb	$57, -5(%rbp)
	jg	.L9
	jmp	.L10
.L12:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movsbl	-5(%rbp), %eax
	subl	$48, %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	call	getchar@PLT
	movb	%al, -5(%rbp)
.L10:
	cmpb	$47, -5(%rbp)
	jle	.L11
	cmpb	$57, -5(%rbp)
	jle	.L12
.L11:
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	nextInt, .-nextInt
	.globl	compare
	.type	compare, @function
compare:
.LFB2:
	.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
	setg	%al
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	compare, .-compare
	.globl	quickSort
	.type	quickSort, @function
quickSort:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	-40(%rbp), %rax
	cmpq	-48(%rbp), %rax
	jnb	.L29
	movq	-40(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-40(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, -8(%rbp)
	jmp	.L19
.L20:
	addq	$4, -16(%rbp)
.L19:
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	compare
	testb	%al, %al
	jne	.L20
	jmp	.L21
.L22:
	subq	$4, -8(%rbp)
.L21:
	movq	-8(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	compare
	testb	%al, %al
	jne	.L22
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jnb	.L30
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	%edx, (%rax)
	movq	-8(%rbp), %rax
	movl	-28(%rbp), %edx
	movl	%edx, (%rax)
	movq	-24(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jne	.L25
	movq	-8(%rbp), %rax
	movq	%rax, -24(%rbp)
	jmp	.L26
.L25:
	movq	-24(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jne	.L26
	movq	-16(%rbp), %rax
	movq	%rax, -24(%rbp)
.L26:
	addq	$4, -16(%rbp)
	subq	$4, -8(%rbp)
	jmp	.L19
.L30:
	nop
	movq	-16(%rbp), %rax
	leaq	-4(%rax), %rdx
	movq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	quickSort
	movq	-8(%rbp), %rax
	leaq	4(%rax), %rdx
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	quickSort
	jmp	.L16
.L29:
	nop
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	quickSort, .-quickSort
	.globl	sort
	.type	sort, @function
sort:
.LFB4:
	.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
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rdx
	movq	-8(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	quickSort
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	sort, .-sort
	.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:
