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>

#define N 200000

int aa[N], bb[N];

int compare(const void *a, const void *b) {
	int i = *(int *) a;
	int j = *(int *) b;

	return bb[i] - bb[j];
}

int main() {
	static int ii[N];
	int n, i, time;

	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%d%d", &aa[i], &bb[i]);
		ii[i] = i;
	}
	qsort(ii, n, sizeof *ii, compare);
	time = 0;
	for (i = 0; i < n; i++) {
		time += aa[ii[i]];
		if (time > bb[ii[i]]) {
			printf("No\n");
			return 0;
		}
	}
	printf("Yes\n");
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	aa
	.bss
	.align 32
	.type	aa, @object
	.size	aa, 800000
aa:
	.zero	800000
	.globl	bb
	.align 32
	.type	bb, @object
	.size	bb, 800000
bb:
	.zero	800000
	.text
	.globl	compare
	.type	compare, @function
compare:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	bb(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	bb(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L4
.L5:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	bb(%rip), %rax
	addq	%rax, %rdx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	aa(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	ii.0(%rip), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L4:
	movl	-20(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L5
	movl	-20(%rbp), %eax
	cltq
	leaq	compare(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	ii.0(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -12(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L6
.L9:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.0(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	aa(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.0(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	bb(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L7
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L10
.L7:
	addl	$1, -16(%rbp)
.L6:
	movl	-20(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L9
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L10:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.local	ii.0
	.comm	ii.0,800000,32
	.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	compare
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movslq	(%rdi), %rax
	movslq	(%rsi), %rcx
	leaq	bb(%rip), %rdx
	movl	(%rdx,%rax,4), %eax
	subl	(%rdx,%rcx,4), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	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	ii.0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	testl	%esi, %esi
	jle	.L4
	xorl	%ebx, %ebx
	leaq	bb(%rip), %r14
	leaq	aa(%rip), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	0(,%rbx,4), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	leaq	(%r14,%rsi), %rdx
	addq	%r13, %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	movl	%ebx, 0(%rbp,%rbx,4)
	addq	$1, %rbx
	cmpl	%ebx, %esi
	jg	.L5
.L4:
	movl	$4, %edx
	leaq	compare(%rip), %rcx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L6
	leaq	ii.0(%rip), %rax
	leal	-1(%rdx), %ecx
	leaq	4(%rax), %rdx
	leaq	bb(%rip), %r14
	leaq	(%rdx,%rcx,4), %rsi
	leaq	aa(%rip), %r13
	xorl	%edx, %edx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	addq	$4, %rax
	cmpq	%rsi, %rax
	je	.L6
.L9:
	movslq	(%rax), %rcx
	addl	0(%r13,%rcx,4), %edx
	cmpl	%edx, (%r14,%rcx,4)
	jge	.L7
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L8
.L6:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L8:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	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
.L15:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.local	ii.0
	.comm	ii.0,800000,32
	.globl	bb
	.bss
	.align 32
	.type	bb, @object
	.size	bb, 800000
bb:
	.zero	800000
	.globl	aa
	.align 32
	.type	aa, @object
	.size	aa, 800000
aa:
	.zero	800000
	.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	compare
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movslq	(%rdi), %rax
	movslq	(%rsi), %rcx
	leaq	bb(%rip), %rdx
	movl	(%rdx,%rax,4), %eax
	subl	(%rdx,%rcx,4), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	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	ii.0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	testl	%esi, %esi
	jle	.L4
	xorl	%ebx, %ebx
	leaq	bb(%rip), %r14
	leaq	aa(%rip), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	0(,%rbx,4), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	leaq	(%r14,%rsi), %rdx
	addq	%r13, %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	movl	%ebx, 0(%rbp,%rbx,4)
	addq	$1, %rbx
	cmpl	%ebx, %esi
	jg	.L5
.L4:
	movl	$4, %edx
	leaq	compare(%rip), %rcx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L6
	leaq	ii.0(%rip), %rax
	leal	-1(%rdx), %ecx
	leaq	4(%rax), %rdx
	leaq	bb(%rip), %r14
	leaq	(%rdx,%rcx,4), %rsi
	leaq	aa(%rip), %r13
	xorl	%edx, %edx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	addq	$4, %rax
	cmpq	%rsi, %rax
	je	.L6
.L9:
	movslq	(%rax), %rcx
	addl	0(%r13,%rcx,4), %edx
	cmpl	%edx, (%r14,%rcx,4)
	jge	.L7
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L8
.L6:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L8:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	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
.L15:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.local	ii.0
	.comm	ii.0,800000,32
	.globl	bb
	.bss
	.align 32
	.type	bb, @object
	.size	bb, 800000
bb:
	.zero	800000
	.globl	aa
	.align 32
	.type	aa, @object
	.size	aa, 800000
aa:
	.zero	800000
	.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>

#define N 200000

int aa[N], bb[N];

int compare(const void *a, const void *b) {
	int i = *(int *) a;
	int j = *(int *) b;

	return bb[i] - bb[j];
}

int main() {
	static int ii[N];
	int n, i, time;

	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%d%d", &aa[i], &bb[i]);
		ii[i] = i;
	}
	qsort(ii, n, sizeof *ii, compare);
	time = 0;
	for (i = 0; i < n; i++) {
		time += aa[ii[i]];
		if (time > bb[ii[i]]) {
			printf("No\n");
			return 0;
		}
	}
	printf("Yes\n");
	return 0;
}

3
334 1000
334 1000
334 1100
 30
384 8895
1725 9791
170 1024
4 11105
2 6
578 1815
702 3352
143 5141
1420 6980
24 1602
849 999
76 7586
85 5570
444 4991
719 11090
470 10708
1137 4547
455 9003
110 9901
15 8578
718 3692
104 1286
3 4
366 12143
7 6649
610 2374
152 7324
4 7042
292 11386
334 5720
 5
2 4
1 8
1 8
4 9
3 12
 3
334 1000
334 1100
334 1100
 5
2 4
1 8
0 8
4 9
3 12
 30
384 8895
1725 9791
170 1024
4 11105
2 6
578 1815
702 3352
143 5141
1420 11731
24 1602
849 999
76 7586
85 5570
444 4991
719 11090
470 10708
1137 4547
455 9003
110 9901
15 8578
718 3692
104 1286
3 4
366 12143
7 6649
610 2374
152 7324
4 7042
292 11386
334 5720
 3
334 1000
146 1100
334 1100
 5
2 4
1 8
0 8
4 9
3 4
 30
384 8895
1725 9791
170 1024
4 11105
2 6
578 1815
702 3352
143 5141
1420 11731
24 1602
849 999
76 7586
85 5570
444 4991
719 11090
470 10708
1137 4547
455 9003
110 9901
15 8578
718 3692
4 1286
3 4
366 12143
7 6649
610 2374
152 7324
4 7042
292 11386
334 5720
 3
334 1000
146 1100
334 1000

Yes
 No
 Yes
 Yes
 Yes
 No
 Yes
 No
 No
 Yes

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>

#define N 200000

int aa[N], bb[N];

int compare(const void *a, const void *b) {
	int i = *(int *) a;
	int j = *(int *) b;

	return bb[i] - bb[j];
}

int main() {
	static int ii[N];
	int n, i, time;

	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%d%d", &aa[i], &bb[i]);
		ii[i] = i;
	}
	qsort(ii, n, sizeof *ii, compare);
	time = 0;
	for (i = 0; i < n; i++) {
		time += aa[ii[i]];
		if (time > bb[ii[i]]) {
			printf("No\n");
			return 0;
		}
	}
	printf("Yes\n");
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	aa
	.bss
	.align 32
	.type	aa, @object
	.size	aa, 800000
aa:
	.zero	800000
	.globl	bb
	.align 32
	.type	bb, @object
	.size	bb, 800000
bb:
	.zero	800000
	.text
	.globl	compare
	.type	compare, @function
compare:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	bb(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	bb(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L4
.L5:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	bb(%rip), %rax
	addq	%rax, %rdx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	aa(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	ii.0(%rip), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L4:
	movl	-20(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L5
	movl	-20(%rbp), %eax
	cltq
	leaq	compare(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	ii.0(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -12(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L6
.L9:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.0(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	aa(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.0(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	bb(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L7
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L10
.L7:
	addl	$1, -16(%rbp)
.L6:
	movl	-20(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L9
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L10:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.local	ii.0
	.comm	ii.0,800000,32
	.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	aa
	.bss
	.align 32
	.type	aa, @object
	.size	aa, 800000
aa:
	.zero	800000
	.globl	bb
	.align 32
	.type	bb, @object
	.size	bb, 800000
bb:
	.zero	800000
	.text
	.globl	compare
	.type	compare, @function
compare:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	bb(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	bb(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L4
.L5:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	bb(%rip), %rax
	addq	%rax, %rdx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	aa(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	ii.0(%rip), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L4:
	movl	-20(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L5
	movl	-20(%rbp), %eax
	cltq
	leaq	compare(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	ii.0(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -12(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L6
.L9:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.0(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	aa(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.0(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	bb(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L7
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L10
.L7:
	addl	$1, -16(%rbp)
.L6:
	movl	-20(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L9
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L10:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.local	ii.0
	.comm	ii.0,800000,32
	.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:
