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>          // printf(), scanf()
#include <stdlib.h>         // qsort()
#include <stdbool.h>

#define MAX_N 100

const int INF = 100000000;
typedef struct rank_tbl
{
	int id;
	int score;
	int rank;
} rank_t;

int
cmp_func(const void *l_, const void *r_)
{
	const rank_t *l = (const rank_t*) l_;
	const rank_t *r = (const rank_t*) r_;

	if (l->score < r->score)
		return 1;

	if (l->score > r->score)
		return -1;

	return 0;
}

int
main(int argc, char **argv)
{
	rank_t data[MAX_N + 1];
	int id, score;
	int i;

	int n = 0;
	while (true)
	{
		scanf("%d,%d", &id, &score);
		if (id == 0 && score == 0)
			break;

		data[n].id = id;
		data[n].score = score;
		data[n].rank = 0;
		n++;
	}

	qsort(data, n, sizeof(rank_t), cmp_func);

	int rank = 0;
	score = INF;
	for (i = 0; i < n; ++i)
	{
		if (data[i].score != score)
		{
			score = data[i].score;
			rank++;
		}

		data[i].rank = rank;
	}

	while (scanf("%d", &id) != EOF)
	{
		for (i = 0; i < n; ++i)
		{
			if (data[i].id == id)
			{
				printf("%d\n", data[i].rank);
				break;
			}
		}
	}

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	INF
	.section	.rodata
	.align 4
	.type	INF, @object
	.size	INF, 4
INF:
	.long	100000000
	.text
	.globl	cmp_func
	.type	cmp_func, @function
cmp_func:
.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
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	movl	4(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
	movl	4(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp_func, .-cmp_func
	.section	.rodata
.LC0:
	.string	"%d,%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.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	$1280, %rsp
	movl	%edi, -1268(%rbp)
	movq	%rsi, -1280(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1240(%rbp)
.L8:
	leaq	-1248(%rbp), %rdx
	leaq	-1252(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1252(%rbp), %eax
	testl	%eax, %eax
	jne	.L6
	movl	-1248(%rbp), %eax
	testl	%eax, %eax
	je	.L20
.L6:
	movl	-1252(%rbp), %edx
	movl	-1240(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1232, %rax
	movl	%edx, (%rax)
	movl	-1248(%rbp), %edx
	movl	-1240(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1228, %rax
	movl	%edx, (%rax)
	movl	-1240(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1224, %rax
	movl	$0, (%rax)
	addl	$1, -1240(%rbp)
	jmp	.L8
.L20:
	nop
	movl	-1240(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-1232(%rbp), %rax
	leaq	cmp_func(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -1236(%rbp)
	movl	$100000000, %eax
	movl	%eax, -1248(%rbp)
	movl	$0, -1244(%rbp)
	jmp	.L9
.L11:
	movl	-1244(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1228, %rax
	movl	(%rax), %edx
	movl	-1248(%rbp), %eax
	cmpl	%eax, %edx
	je	.L10
	movl	-1244(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1228, %rax
	movl	(%rax), %eax
	movl	%eax, -1248(%rbp)
	addl	$1, -1236(%rbp)
.L10:
	movl	-1244(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	leaq	-1224(%rax), %rdx
	movl	-1236(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -1244(%rbp)
.L9:
	movl	-1244(%rbp), %eax
	cmpl	-1240(%rbp), %eax
	jl	.L11
	jmp	.L12
.L16:
	movl	$0, -1244(%rbp)
	jmp	.L13
.L15:
	movl	-1244(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1232, %rax
	movl	(%rax), %edx
	movl	-1252(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L14
	movl	-1244(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1224, %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L12
.L14:
	addl	$1, -1244(%rbp)
.L13:
	movl	-1244(%rbp), %eax
	cmpl	-1240(%rbp), %eax
	jl	.L15
.L12:
	leaq	-1252(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L16
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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_func
	.type	cmp_func, @function
cmp_func:
.LFB39:
	.cfi_startproc
	endbr64
	movl	4(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, 4(%rdi)
	jl	.L1
	setg	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmp_func, .-cmp_func
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d,%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.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
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	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	$1256, %rsp
	.cfi_def_cfa_offset 1312
	movq	%fs:40, %rax
	movq	%rax, 1240(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	leaq	12(%rsp), %r15
	movq	%rbp, %r12
	leaq	8(%rsp), %rbx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L28:
	movq	%xmm0, (%r12)
	addl	$1, %r14d
	addq	$12, %r12
	movl	$0, -4(%r12)
.L7:
	xorl	%eax, %eax
	movq	%r15, %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movd	8(%rsp), %xmm0
	movd	12(%rsp), %xmm1
	movl	8(%rsp), %eax
	orl	12(%rsp), %eax
	punpckldq	%xmm1, %xmm0
	jne	.L28
	movslq	%r14d, %rsi
	leaq	cmp_func(%rip), %rcx
	movl	$12, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	$100000000, 12(%rsp)
	testl	%r14d, %r14d
	je	.L9
	leal	-1(%r14), %edx
	leaq	20(%rsp), %rax
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	leaq	(%rdx,%rdx,2), %rdx
	movl	$100000000, %esi
	leaq	16(%rbp,%rdx,4), %rdi
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%rax), %edx
	cmpl	%edx, %esi
	je	.L10
	addl	$1, %ecx
	movl	%edx, %esi
	movl	$1, %r8d
.L10:
	movl	%ecx, 4(%rax)
	addq	$12, %rax
	cmpq	%rax, %rdi
	jne	.L11
	testb	%r8b, %r8b
	je	.L9
	movl	%esi, 12(%rsp)
.L9:
	leaq	.LC2(%rip), %r12
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L26:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L17
	testl	%r14d, %r14d
	je	.L26
	movl	8(%rsp), %ecx
	movq	%rbp, %rdx
	xorl	%eax, %eax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L14:
	addl	$1, %eax
	addq	$12, %rdx
	cmpl	%eax, %r14d
	je	.L26
.L15:
	cmpl	%ecx, (%rdx)
	jne	.L14
	cltq
	movq	%r13, %rsi
	movl	$1, %edi
	leaq	(%rax,%rax,2), %rax
	movl	24(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L26
.L17:
	movq	1240(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1256, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L29:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	INF
	.section	.rodata
	.align 4
	.type	INF, @object
	.size	INF, 4
INF:
	.long	100000000
	.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_func
	.type	cmp_func, @function
cmp_func:
.LFB39:
	.cfi_startproc
	endbr64
	movl	4(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, 4(%rdi)
	jl	.L1
	setg	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmp_func, .-cmp_func
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d,%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.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
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	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	$1256, %rsp
	.cfi_def_cfa_offset 1312
	movq	%fs:40, %rax
	movq	%rax, 1240(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	leaq	12(%rsp), %r15
	movq	%rbp, %r12
	leaq	8(%rsp), %rbx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L28:
	movq	%xmm0, (%r12)
	addl	$1, %r14d
	addq	$12, %r12
	movl	$0, -4(%r12)
.L7:
	xorl	%eax, %eax
	movq	%r15, %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movd	8(%rsp), %xmm0
	movd	12(%rsp), %xmm1
	movl	8(%rsp), %eax
	orl	12(%rsp), %eax
	punpckldq	%xmm1, %xmm0
	jne	.L28
	movslq	%r14d, %rsi
	leaq	cmp_func(%rip), %rcx
	movl	$12, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	$100000000, 12(%rsp)
	testl	%r14d, %r14d
	je	.L9
	leal	-1(%r14), %edx
	leaq	20(%rsp), %rax
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	leaq	(%rdx,%rdx,2), %rdx
	movl	$100000000, %esi
	leaq	16(%rbp,%rdx,4), %rdi
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%rax), %edx
	cmpl	%edx, %esi
	je	.L10
	addl	$1, %ecx
	movl	%edx, %esi
	movl	$1, %r8d
.L10:
	movl	%ecx, 4(%rax)
	addq	$12, %rax
	cmpq	%rax, %rdi
	jne	.L11
	testb	%r8b, %r8b
	je	.L9
	movl	%esi, 12(%rsp)
.L9:
	leaq	.LC2(%rip), %r12
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L26:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L17
	testl	%r14d, %r14d
	je	.L26
	movl	8(%rsp), %ecx
	movq	%rbp, %rdx
	xorl	%eax, %eax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L14:
	addl	$1, %eax
	addq	$12, %rdx
	cmpl	%eax, %r14d
	je	.L26
.L15:
	cmpl	%ecx, (%rdx)
	jne	.L14
	cltq
	movq	%r13, %rsi
	movl	$1, %edi
	leaq	(%rax,%rax,2), %rax
	movl	24(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L26
.L17:
	movq	1240(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1256, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L29:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	INF
	.section	.rodata
	.align 4
	.type	INF, @object
	.size	INF, 4
INF:
	.long	100000000
	.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>          // printf(), scanf()
#include <stdlib.h>         // qsort()
#include <stdbool.h>

#define MAX_N 100

const int INF = 100000000;
typedef struct rank_tbl
{
	int id;
	int score;
	int rank;
} rank_t;

int
cmp_func(const void *l_, const void *r_)
{
	const rank_t *l = (const rank_t*) l_;
	const rank_t *r = (const rank_t*) r_;

	if (l->score < r->score)
		return 1;

	if (l->score > r->score)
		return -1;

	return 0;
}

int
main(int argc, char **argv)
{
	rank_t data[MAX_N + 1];
	int id, score;
	int i;

	int n = 0;
	while (true)
	{
		scanf("%d,%d", &id, &score);
		if (id == 0 && score == 0)
			break;

		data[n].id = id;
		data[n].score = score;
		data[n].rank = 0;
		n++;
	}

	qsort(data, n, sizeof(rank_t), cmp_func);

	int rank = 0;
	score = INF;
	for (i = 0; i < n; ++i)
	{
		if (data[i].score != score)
		{
			score = data[i].score;
			rank++;
		}

		data[i].rank = rank;
	}

	while (scanf("%d", &id) != EOF)
	{
		for (i = 0; i < n; ++i)
		{
			if (data[i].id == id)
			{
				printf("%d\n", data[i].rank);
				break;
			}
		}
	}

	return 0;
}
1,20
2,20
3,30
4,10
5,10
6,20
0,0
1
2
4
1
 1,20
2,20
3,30
4,10
5,10
0,26
0,0
1
2
4
1
 1,20
2,20
3,30
4,10
5,10
0,26
0,0
0
2
4
1
 1,20
2,20
3,30
4,10
5,10
0,26
0,0
1
2
4
0
 1,20
2,20
3,30
4,10
5,10
0,26
0,0
1
3
4
0
 1,20
2,20
3,30
4,10
5,10
0,26
0,0
1
3
3
0
 1,20
2,20
3,30
4,10
6,11
0,26
0,0
0
2
4
2
 1,20
2,20
3,30
4,10
5,10
6,10
0,0
1
2
4
5
 1,20
2,20
3,30
4,10
5,10
6,20
0,0
1
4
4
1
 1,20
2,20
3,30
4,10
6,10
0,26
0,0
0
2
0
1

2
2
3
2
 3
3
4
3
 2
3
4
3
 3
3
4
2
 3
1
4
2
 3
1
1
2
 2
3
5
3
 2
2
3
3
 2
3
3
2
 2
3
2
3

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

```c
#include <stdio.h>          // printf(), scanf()
#include <stdlib.h>         // qsort()
#include <stdbool.h>

#define MAX_N 100

const int INF = 100000000;
typedef struct rank_tbl
{
	int id;
	int score;
	int rank;
} rank_t;

int
cmp_func(const void *l_, const void *r_)
{
	const rank_t *l = (const rank_t*) l_;
	const rank_t *r = (const rank_t*) r_;

	if (l->score < r->score)
		return 1;

	if (l->score > r->score)
		return -1;

	return 0;
}

int
main(int argc, char **argv)
{
	rank_t data[MAX_N + 1];
	int id, score;
	int i;

	int n = 0;
	while (true)
	{
		scanf("%d,%d", &id, &score);
		if (id == 0 && score == 0)
			break;

		data[n].id = id;
		data[n].score = score;
		data[n].rank = 0;
		n++;
	}

	qsort(data, n, sizeof(rank_t), cmp_func);

	int rank = 0;
	score = INF;
	for (i = 0; i < n; ++i)
	{
		if (data[i].score != score)
		{
			score = data[i].score;
			rank++;
		}

		data[i].rank = rank;
	}

	while (scanf("%d", &id) != EOF)
	{
		for (i = 0; i < n; ++i)
		{
			if (data[i].id == id)
			{
				printf("%d\n", data[i].rank);
				break;
			}
		}
	}

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	INF
	.section	.rodata
	.align 4
	.type	INF, @object
	.size	INF, 4
INF:
	.long	100000000
	.text
	.globl	cmp_func
	.type	cmp_func, @function
cmp_func:
.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
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	movl	4(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
	movl	4(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp_func, .-cmp_func
	.section	.rodata
.LC0:
	.string	"%d,%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.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	$1280, %rsp
	movl	%edi, -1268(%rbp)
	movq	%rsi, -1280(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1240(%rbp)
.L8:
	leaq	-1248(%rbp), %rdx
	leaq	-1252(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1252(%rbp), %eax
	testl	%eax, %eax
	jne	.L6
	movl	-1248(%rbp), %eax
	testl	%eax, %eax
	je	.L20
.L6:
	movl	-1252(%rbp), %edx
	movl	-1240(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1232, %rax
	movl	%edx, (%rax)
	movl	-1248(%rbp), %edx
	movl	-1240(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1228, %rax
	movl	%edx, (%rax)
	movl	-1240(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1224, %rax
	movl	$0, (%rax)
	addl	$1, -1240(%rbp)
	jmp	.L8
.L20:
	nop
	movl	-1240(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-1232(%rbp), %rax
	leaq	cmp_func(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -1236(%rbp)
	movl	$100000000, %eax
	movl	%eax, -1248(%rbp)
	movl	$0, -1244(%rbp)
	jmp	.L9
.L11:
	movl	-1244(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1228, %rax
	movl	(%rax), %edx
	movl	-1248(%rbp), %eax
	cmpl	%eax, %edx
	je	.L10
	movl	-1244(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1228, %rax
	movl	(%rax), %eax
	movl	%eax, -1248(%rbp)
	addl	$1, -1236(%rbp)
.L10:
	movl	-1244(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	leaq	-1224(%rax), %rdx
	movl	-1236(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -1244(%rbp)
.L9:
	movl	-1244(%rbp), %eax
	cmpl	-1240(%rbp), %eax
	jl	.L11
	jmp	.L12
.L16:
	movl	$0, -1244(%rbp)
	jmp	.L13
.L15:
	movl	-1244(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1232, %rax
	movl	(%rax), %edx
	movl	-1252(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L14
	movl	-1244(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1224, %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L12
.L14:
	addl	$1, -1244(%rbp)
.L13:
	movl	-1244(%rbp), %eax
	cmpl	-1240(%rbp), %eax
	jl	.L15
.L12:
	leaq	-1252(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L16
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	INF
	.section	.rodata
	.align 4
	.type	INF, @object
	.size	INF, 4
INF:
	.long	100000000
	.text
	.globl	cmp_func
	.type	cmp_func, @function
cmp_func:
.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
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	movl	4(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
	movl	4(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp_func, .-cmp_func
	.section	.rodata
.LC0:
	.string	"%d,%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.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	$1280, %rsp
	movl	%edi, -1268(%rbp)
	movq	%rsi, -1280(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1240(%rbp)
.L8:
	leaq	-1248(%rbp), %rdx
	leaq	-1252(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1252(%rbp), %eax
	testl	%eax, %eax
	jne	.L6
	movl	-1248(%rbp), %eax
	testl	%eax, %eax
	je	.L20
.L6:
	movl	-1252(%rbp), %edx
	movl	-1240(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1232, %rax
	movl	%edx, (%rax)
	movl	-1248(%rbp), %edx
	movl	-1240(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1228, %rax
	movl	%edx, (%rax)
	movl	-1240(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1224, %rax
	movl	$0, (%rax)
	addl	$1, -1240(%rbp)
	jmp	.L8
.L20:
	nop
	movl	-1240(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-1232(%rbp), %rax
	leaq	cmp_func(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -1236(%rbp)
	movl	$100000000, %eax
	movl	%eax, -1248(%rbp)
	movl	$0, -1244(%rbp)
	jmp	.L9
.L11:
	movl	-1244(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1228, %rax
	movl	(%rax), %edx
	movl	-1248(%rbp), %eax
	cmpl	%eax, %edx
	je	.L10
	movl	-1244(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1228, %rax
	movl	(%rax), %eax
	movl	%eax, -1248(%rbp)
	addl	$1, -1236(%rbp)
.L10:
	movl	-1244(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	leaq	-1224(%rax), %rdx
	movl	-1236(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -1244(%rbp)
.L9:
	movl	-1244(%rbp), %eax
	cmpl	-1240(%rbp), %eax
	jl	.L11
	jmp	.L12
.L16:
	movl	$0, -1244(%rbp)
	jmp	.L13
.L15:
	movl	-1244(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1232, %rax
	movl	(%rax), %edx
	movl	-1252(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L14
	movl	-1244(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1224, %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L12
.L14:
	addl	$1, -1244(%rbp)
.L13:
	movl	-1244(%rbp), %eax
	cmpl	-1240(%rbp), %eax
	jl	.L15
.L12:
	leaq	-1252(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L16
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
