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

```c
// AOJ 2923: Ravage
// 2019.2.18 bal4u

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

#define gc() getchar()

int in()
{
	int n = 0, c = gc();
	do n = 10*n + (c & 0xf), c = gc(); while (c >= '0');
	return n;
}

typedef struct { int v; int f; } S;
S s[200002];

int cmp(const void *a, const void *b)
{
	int r = ((S *)a)->v - ((S *)b)->v;
	if (r == 0) return ((S *)b)->f - ((S *)a)->f;
	return r;
}

int main()
{
	int N, i, j, max, cnt;

	N = in();
	for (i = N, j = 0; i--; j++) {
		s[j].v = in(), s[j].f = 1;
		s[++j].v = in();
	}
	N <<= 1;
	qsort(s, N, sizeof(S), cmp);
	max = cnt = 0;
	for (i = 0; i < N; i++) {
		if (s[i].f) {
			if (++cnt > max) max = cnt;
		} else cnt--;
	}
	printf("%d\n", max);
	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	in
	.type	in, @function
in:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	call	getchar@PLT
	movl	%eax, -4(%rbp)
.L2:
	movl	-8(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	andl	$15, %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	call	getchar@PLT
	movl	%eax, -4(%rbp)
	cmpl	$47, -4(%rbp)
	jg	.L2
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	in, .-in
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 1600016
s:
	.zero	1600016
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %edx
	movq	-32(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	jne	.L5
	movq	-32(%rbp), %rax
	movl	4(%rax), %edx
	movq	-24(%rbp), %rax
	movl	4(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	jmp	.L6
.L5:
	movl	-4(%rbp), %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	$0, %eax
	call	in
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L8
.L9:
	movl	$0, %eax
	call	in
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -16(%rbp)
	movl	$0, %eax
	call	in
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L8:
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -20(%rbp)
	testl	%eax, %eax
	jne	.L9
	sall	-4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L10
.L13:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L11
	addl	$1, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jle	.L12
	movl	-8(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L12
.L11:
	subl	$1, -8(%rbp)
.L12:
	addl	$1, -20(%rbp)
.L10:
	movl	-20(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L13
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	je	.L4
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	movl	4(%rsi), %eax
	subl	4(%rdi), %eax
	ret
	.cfi_endproc
.LFE40:
	.size	cmp, .-cmp
	.p2align 4
	.globl	in
	.type	in, @function
in:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	stdin(%rip), %rdi
	xorl	%r12d, %r12d
	call	getc@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	movq	stdin(%rip), %rdi
	andl	$15, %eax
	leal	(%r12,%r12,4), %edx
	leal	(%rax,%rdx,2), %r12d
	call	getc@PLT
	cmpl	$47, %eax
	jg	.L6
	movl	%r12d, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE39:
	.size	in, .-in
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	in
	movl	%eax, %r12d
	testl	%eax, %eax
	je	.L10
	leal	-1(%rax), %ebp
	leaq	16+s(%rip), %rax
	salq	$4, %rbp
	leaq	-16(%rax), %r13
	addq	%rax, %rbp
	movq	%r13, %rbx
	.p2align 4,,10
	.p2align 3
.L13:
	movq	stdin(%rip), %rdi
	xorl	%r14d, %r14d
	call	getc@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	movq	stdin(%rip), %rdi
	andl	$15, %eax
	leal	(%r14,%r14,4), %edx
	leal	(%rax,%rdx,2), %r14d
	call	getc@PLT
	cmpl	$47, %eax
	jg	.L11
	movl	%r14d, (%rbx)
	movq	stdin(%rip), %rdi
	xorl	%r14d, %r14d
	movl	$1, 4(%rbx)
	call	getc@PLT
	.p2align 4,,10
	.p2align 3
.L12:
	movq	stdin(%rip), %rdi
	andl	$15, %eax
	leal	(%r14,%r14,4), %edx
	leal	(%rax,%rdx,2), %r14d
	call	getc@PLT
	cmpl	$47, %eax
	jg	.L12
	movl	%r14d, 8(%rbx)
	addq	$16, %rbx
	cmpq	%rbp, %rbx
	jne	.L13
	addl	%r12d, %r12d
	leaq	cmp(%rip), %rcx
	movl	$8, %edx
	movq	%r13, %rdi
	movslq	%r12d, %rsi
	call	qsort@PLT
	testl	%r12d, %r12d
	jle	.L18
	leaq	4+s(%rip), %rax
	leal	-1(%r12), %ecx
	xorl	%r12d, %r12d
	leaq	8(%rax), %rdx
	leaq	(%rdx,%rcx,8), %rcx
	xorl	%edx, %edx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L25:
	addl	$1, %edx
	cmpl	%edx, %r12d
	cmovl	%edx, %r12d
	addq	$8, %rax
	cmpq	%rcx, %rax
	je	.L14
.L17:
	movl	(%rax), %esi
	testl	%esi, %esi
	jne	.L25
	addq	$8, %rax
	subl	$1, %edx
	cmpq	%rcx, %rax
	jne	.L17
.L14:
	movl	%r12d, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	leaq	cmp(%rip), %rcx
	movl	$8, %edx
	xorl	%esi, %esi
	leaq	s(%rip), %rdi
	call	qsort@PLT
	jmp	.L14
.L18:
	xorl	%r12d, %r12d
	jmp	.L14
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 1600016
s:
	.zero	1600016
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	je	.L4
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	movl	4(%rsi), %eax
	subl	4(%rdi), %eax
	ret
	.cfi_endproc
.LFE40:
	.size	cmp, .-cmp
	.p2align 4
	.globl	in
	.type	in, @function
in:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	stdin(%rip), %rdi
	xorl	%r12d, %r12d
	call	getc@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	movq	stdin(%rip), %rdi
	andl	$15, %eax
	leal	(%r12,%r12,4), %edx
	leal	(%rax,%rdx,2), %r12d
	call	getc@PLT
	cmpl	$47, %eax
	jg	.L6
	movl	%r12d, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE39:
	.size	in, .-in
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	in
	movl	%eax, %r12d
	testl	%eax, %eax
	je	.L10
	leal	-1(%rax), %ebp
	leaq	16+s(%rip), %rax
	salq	$4, %rbp
	leaq	-16(%rax), %r13
	addq	%rax, %rbp
	movq	%r13, %rbx
	.p2align 4,,10
	.p2align 3
.L13:
	movq	stdin(%rip), %rdi
	xorl	%r14d, %r14d
	call	getc@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	movq	stdin(%rip), %rdi
	andl	$15, %eax
	leal	(%r14,%r14,4), %edx
	leal	(%rax,%rdx,2), %r14d
	call	getc@PLT
	cmpl	$47, %eax
	jg	.L11
	movl	%r14d, (%rbx)
	movq	stdin(%rip), %rdi
	xorl	%r14d, %r14d
	movl	$1, 4(%rbx)
	call	getc@PLT
	.p2align 4,,10
	.p2align 3
.L12:
	movq	stdin(%rip), %rdi
	andl	$15, %eax
	leal	(%r14,%r14,4), %edx
	leal	(%rax,%rdx,2), %r14d
	call	getc@PLT
	cmpl	$47, %eax
	jg	.L12
	movl	%r14d, 8(%rbx)
	addq	$16, %rbx
	cmpq	%rbp, %rbx
	jne	.L13
	addl	%r12d, %r12d
	leaq	cmp(%rip), %rcx
	movl	$8, %edx
	movq	%r13, %rdi
	movslq	%r12d, %rsi
	call	qsort@PLT
	testl	%r12d, %r12d
	jle	.L18
	leaq	4+s(%rip), %rax
	leal	-1(%r12), %ecx
	xorl	%r12d, %r12d
	leaq	8(%rax), %rdx
	leaq	(%rdx,%rcx,8), %rcx
	xorl	%edx, %edx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L25:
	addl	$1, %edx
	cmpl	%edx, %r12d
	cmovl	%edx, %r12d
	addq	$8, %rax
	cmpq	%rcx, %rax
	je	.L14
.L17:
	movl	(%rax), %esi
	testl	%esi, %esi
	jne	.L25
	addq	$8, %rax
	subl	$1, %edx
	cmpq	%rcx, %rax
	jne	.L17
.L14:
	movl	%r12d, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	leaq	cmp(%rip), %rcx
	movl	$8, %edx
	xorl	%esi, %esi
	leaq	s(%rip), %rdi
	call	qsort@PLT
	jmp	.L14
.L18:
	xorl	%r12d, %r12d
	jmp	.L14
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 1600016
s:
	.zero	1600016
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

// AOJ 2923: Ravage
// 2019.2.18 bal4u

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

#define gc() getchar()

int in()
{
	int n = 0, c = gc();
	do n = 10*n + (c & 0xf), c = gc(); while (c >= '0');
	return n;
}

typedef struct { int v; int f; } S;
S s[200002];

int cmp(const void *a, const void *b)
{
	int r = ((S *)a)->v - ((S *)b)->v;
	if (r == 0) return ((S *)b)->f - ((S *)a)->f;
	return r;
}

int main()
{
	int N, i, j, max, cnt;

	N = in();
	for (i = N, j = 0; i--; j++) {
		s[j].v = in(), s[j].f = 1;
		s[++j].v = in();
	}
	N <<= 1;
	qsort(s, N, sizeof(S), cmp);
	max = cnt = 0;
	for (i = 0; i < N; i++) {
		if (s[i].f) {
			if (++cnt > max) max = cnt;
		} else cnt--;
	}
	printf("%d\n", max);
	return 0;
}


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
 0
 0
 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
// AOJ 2923: Ravage
// 2019.2.18 bal4u

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

#define gc() getchar()

int in()
{
	int n = 0, c = gc();
	do n = 10*n + (c & 0xf), c = gc(); while (c >= '0');
	return n;
}

typedef struct { int v; int f; } S;
S s[200002];

int cmp(const void *a, const void *b)
{
	int r = ((S *)a)->v - ((S *)b)->v;
	if (r == 0) return ((S *)b)->f - ((S *)a)->f;
	return r;
}

int main()
{
	int N, i, j, max, cnt;

	N = in();
	for (i = N, j = 0; i--; j++) {
		s[j].v = in(), s[j].f = 1;
		s[++j].v = in();
	}
	N <<= 1;
	qsort(s, N, sizeof(S), cmp);
	max = cnt = 0;
	for (i = 0; i < N; i++) {
		if (s[i].f) {
			if (++cnt > max) max = cnt;
		} else cnt--;
	}
	printf("%d\n", max);
	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	in
	.type	in, @function
in:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	call	getchar@PLT
	movl	%eax, -4(%rbp)
.L2:
	movl	-8(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	andl	$15, %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	call	getchar@PLT
	movl	%eax, -4(%rbp)
	cmpl	$47, -4(%rbp)
	jg	.L2
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	in, .-in
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 1600016
s:
	.zero	1600016
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %edx
	movq	-32(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	jne	.L5
	movq	-32(%rbp), %rax
	movl	4(%rax), %edx
	movq	-24(%rbp), %rax
	movl	4(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	jmp	.L6
.L5:
	movl	-4(%rbp), %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	$0, %eax
	call	in
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L8
.L9:
	movl	$0, %eax
	call	in
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -16(%rbp)
	movl	$0, %eax
	call	in
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L8:
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -20(%rbp)
	testl	%eax, %eax
	jne	.L9
	sall	-4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L10
.L13:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L11
	addl	$1, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jle	.L12
	movl	-8(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L12
.L11:
	subl	$1, -8(%rbp)
.L12:
	addl	$1, -20(%rbp)
.L10:
	movl	-20(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L13
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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.
val
	.file	"temp.c"
	.text
	.globl	in
	.type	in, @function
in:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	call	getchar@PLT
	movl	%eax, -4(%rbp)
.L2:
	movl	-8(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	andl	$15, %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	call	getchar@PLT
	movl	%eax, -4(%rbp)
	cmpl	$47, -4(%rbp)
	jg	.L2
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	in, .-in
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 1600016
s:
	.zero	1600016
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %edx
	movq	-32(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	jne	.L5
	movq	-32(%rbp), %rax
	movl	4(%rax), %edx
	movq	-24(%rbp), %rax
	movl	4(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	jmp	.L6
.L5:
	movl	-4(%rbp), %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	$0, %eax
	call	in
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L8
.L9:
	movl	$0, %eax
	call	in
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -16(%rbp)
	movl	$0, %eax
	call	in
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L8:
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -20(%rbp)
	testl	%eax, %eax
	jne	.L9
	sall	-4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L10
.L13:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L11
	addl	$1, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jle	.L12
	movl	-8(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L12
.L11:
	subl	$1, -8(%rbp)
.L12:
	addl	$1, -20(%rbp)
.L10:
	movl	-20(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L13
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
