Given the following C code and 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;
}

```

Assembly Code:

```assembly
	.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:
```

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.
Optimized Assembly Code:

user
```assembly
	.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
```assembly
	.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:
```
```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;
}

```
Given the following C 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;
}

```

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.
Optimized Assembly Code:

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 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;
}

```

Assembly Code:

```assembly
	.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:
```

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.
Optimized Assembly Code:

train
```assembly
	.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:
```