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 main()
{
	int n;
	scanf("%d", &n);
	int i;
	int a[55];
	for (i = 0; i < n; i++)
		scanf("%d", &a[i]);
	int max, min;
	max = min = 0;
	for (i = 0; i < n; i++)
	{
		if (a[i] > a[max])
			max = i;
		if (a[i] < a[min])
			min = i;
	}
	printf("%d\n", 2 * n - 2);
	if (a[max] + a[min] >= 0)
	{
		for (i = 0; i < n; i++)
			if (i != max)
				printf("%d %d\n", max + 1, i + 1);
		for (i = 0; i < n - 1; i++)
			printf("%d %d\n", i + 1, i + 2);
	}
	else
	{
		for (i = 0; i < n; i++)
			if (i != min)
				printf("%d %d\n", min + 1, i + 1);
		for (i = n - 1; i > 0; i--)
			printf("%d %d\n", i + 1, i);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d %d\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
	subq	$256, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-256(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -252(%rbp)
	jmp	.L2
.L3:
	leaq	-240(%rbp), %rdx
	movl	-252(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -252(%rbp)
.L2:
	movl	-256(%rbp), %eax
	cmpl	%eax, -252(%rbp)
	jl	.L3
	movl	$0, -244(%rbp)
	movl	-244(%rbp), %eax
	movl	%eax, -248(%rbp)
	movl	$0, -252(%rbp)
	jmp	.L4
.L7:
	movl	-252(%rbp), %eax
	cltq
	movl	-240(%rbp,%rax,4), %edx
	movl	-248(%rbp), %eax
	cltq
	movl	-240(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	-252(%rbp), %eax
	movl	%eax, -248(%rbp)
.L5:
	movl	-252(%rbp), %eax
	cltq
	movl	-240(%rbp,%rax,4), %edx
	movl	-244(%rbp), %eax
	cltq
	movl	-240(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L6
	movl	-252(%rbp), %eax
	movl	%eax, -244(%rbp)
.L6:
	addl	$1, -252(%rbp)
.L4:
	movl	-256(%rbp), %eax
	cmpl	%eax, -252(%rbp)
	jl	.L7
	movl	-256(%rbp), %eax
	subl	$1, %eax
	addl	%eax, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-248(%rbp), %eax
	cltq
	movl	-240(%rbp,%rax,4), %edx
	movl	-244(%rbp), %eax
	cltq
	movl	-240(%rbp,%rax,4), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	js	.L8
	movl	$0, -252(%rbp)
	jmp	.L9
.L11:
	movl	-252(%rbp), %eax
	cmpl	-248(%rbp), %eax
	je	.L10
	movl	-252(%rbp), %eax
	leal	1(%rax), %edx
	movl	-248(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L10:
	addl	$1, -252(%rbp)
.L9:
	movl	-256(%rbp), %eax
	cmpl	%eax, -252(%rbp)
	jl	.L11
	movl	$0, -252(%rbp)
	jmp	.L12
.L13:
	movl	-252(%rbp), %eax
	leal	2(%rax), %edx
	movl	-252(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -252(%rbp)
.L12:
	movl	-256(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -252(%rbp)
	jl	.L13
	jmp	.L14
.L8:
	movl	$0, -252(%rbp)
	jmp	.L15
.L17:
	movl	-252(%rbp), %eax
	cmpl	-244(%rbp), %eax
	je	.L16
	movl	-252(%rbp), %eax
	leal	1(%rax), %edx
	movl	-244(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L16:
	addl	$1, -252(%rbp)
.L15:
	movl	-256(%rbp), %eax
	cmpl	%eax, -252(%rbp)
	jl	.L17
	movl	-256(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -252(%rbp)
	jmp	.L18
.L19:
	movl	-252(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-252(%rbp), %eax
	movl	%eax, %edx
	movl	%ecx, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	subl	$1, -252(%rbp)
.L18:
	cmpl	$0, -252(%rbp)
	jg	.L19
.L14:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$264, %rsp
	.cfi_def_cfa_offset 304
	movq	%fs:40, %rax
	movq	%rax, 248(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L21
	leaq	16(%rsp), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$4, %rbp
	cmpl	%ebx, %ecx
	jg	.L3
	testl	%ecx, %ecx
	jle	.L21
	movl	16(%rsp), %edi
	movslq	%ecx, %r8
	xorl	%eax, %eax
	xorl	%ebp, %ebp
	xorl	%ebx, %ebx
	movl	%edi, %esi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L35:
	movslq	%ebx, %rdx
	movl	16(%rsp,%rdx,4), %esi
.L6:
	movl	(%r12,%rax,4), %edx
	cmpl	%esi, %edx
	cmovg	%eax, %ebx
	cmpl	%edi, %edx
	jge	.L5
	movl	%edx, %edi
	movl	%eax, %ebp
.L5:
	addq	$1, %rax
	cmpq	%rax, %r8
	jne	.L35
.L2:
	leal	-2(%rcx,%rcx), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movslq	%ebx, %rax
	movslq	%ebp, %rdx
	movl	16(%rsp,%rdx,4), %edx
	addl	16(%rsp,%rax,4), %edx
	js	.L36
	movl	12(%rsp), %edx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %r12
	testl	%edx, %edx
	jle	.L15
	leal	1(%rax), %ebp
	cmpl	%ebx, %eax
	je	.L13
	.p2align 4,,10
	.p2align 3
.L37:
	leal	1(%rbx), %edx
	movl	%ebp, %ecx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %edx
	cmpl	%ebp, %edx
	jle	.L15
.L14:
	movl	%ebp, %eax
	leal	1(%rax), %ebp
	cmpl	%ebx, %eax
	jne	.L37
.L13:
	cmpl	%ebp, %edx
	jg	.L14
.L15:
	xorl	%ebx, %ebx
	cmpl	$1, 12(%rsp)
	leaq	.LC2(%rip), %rbp
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	leal	2(%rbx), %ecx
	addl	$1, %ebx
	movq	%rbp, %rsi
	movl	$1, %edi
	movl	%ebx, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	subl	$1, %eax
	cmpl	%eax, %ebx
	jl	.L11
.L12:
	movq	248(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$264, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L36:
	.cfi_restore_state
	movl	12(%rsp), %ebx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %r13
	testl	%ebx, %ebx
	jg	.L8
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L39:
	leal	1(%rbp), %edx
	movl	%r12d, %ecx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %ebx
	cmpl	%r12d, %ebx
	jle	.L9
.L17:
	movl	%r12d, %eax
.L8:
	leal	1(%rax), %r12d
	cmpl	%ebp, %eax
	jne	.L39
	cmpl	%r12d, %ebx
	jg	.L17
.L9:
	subl	$1, %ebx
	testl	%ebx, %ebx
	jle	.L12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L18:
	leal	1(%rbx), %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	subl	$1, %ebx
	jne	.L18
	jmp	.L12
.L21:
	xorl	%ebp, %ebp
	xorl	%ebx, %ebx
	jmp	.L2
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$264, %rsp
	.cfi_def_cfa_offset 304
	movq	%fs:40, %rax
	movq	%rax, 248(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L21
	leaq	16(%rsp), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$4, %rbp
	cmpl	%ebx, %ecx
	jg	.L3
	testl	%ecx, %ecx
	jle	.L21
	movl	16(%rsp), %edi
	movslq	%ecx, %r8
	xorl	%eax, %eax
	xorl	%ebp, %ebp
	xorl	%ebx, %ebx
	movl	%edi, %esi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L35:
	movslq	%ebx, %rdx
	movl	16(%rsp,%rdx,4), %esi
.L6:
	movl	(%r12,%rax,4), %edx
	cmpl	%esi, %edx
	cmovg	%eax, %ebx
	cmpl	%edi, %edx
	jge	.L5
	movl	%edx, %edi
	movl	%eax, %ebp
.L5:
	addq	$1, %rax
	cmpq	%rax, %r8
	jne	.L35
.L2:
	leal	-2(%rcx,%rcx), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movslq	%ebx, %rax
	movslq	%ebp, %rdx
	movl	16(%rsp,%rdx,4), %edx
	addl	16(%rsp,%rax,4), %edx
	js	.L36
	movl	12(%rsp), %edx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %r12
	testl	%edx, %edx
	jle	.L15
	leal	1(%rax), %ebp
	cmpl	%ebx, %eax
	je	.L13
	.p2align 4,,10
	.p2align 3
.L37:
	leal	1(%rbx), %edx
	movl	%ebp, %ecx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %edx
	cmpl	%ebp, %edx
	jle	.L15
.L14:
	movl	%ebp, %eax
	leal	1(%rax), %ebp
	cmpl	%ebx, %eax
	jne	.L37
.L13:
	cmpl	%ebp, %edx
	jg	.L14
.L15:
	xorl	%ebx, %ebx
	cmpl	$1, 12(%rsp)
	leaq	.LC2(%rip), %rbp
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	leal	2(%rbx), %ecx
	addl	$1, %ebx
	movq	%rbp, %rsi
	movl	$1, %edi
	movl	%ebx, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	subl	$1, %eax
	cmpl	%eax, %ebx
	jl	.L11
.L12:
	movq	248(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$264, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L36:
	.cfi_restore_state
	movl	12(%rsp), %ebx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %r13
	testl	%ebx, %ebx
	jg	.L8
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L39:
	leal	1(%rbp), %edx
	movl	%r12d, %ecx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %ebx
	cmpl	%r12d, %ebx
	jle	.L9
.L17:
	movl	%r12d, %eax
.L8:
	leal	1(%rax), %r12d
	cmpl	%ebp, %eax
	jne	.L39
	cmpl	%r12d, %ebx
	jg	.L17
.L9:
	subl	$1, %ebx
	testl	%ebx, %ebx
	jle	.L12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L18:
	leal	1(%rbx), %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	subl	$1, %ebx
	jne	.L18
	jmp	.L12
.L21:
	xorl	%ebp, %ebp
	xorl	%ebx, %ebx
	jmp	.L2
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

#include<stdio.h>
int main()
{
	int n;
	scanf("%d", &n);
	int i;
	int a[55];
	for (i = 0; i < n; i++)
		scanf("%d", &a[i]);
	int max, min;
	max = min = 0;
	for (i = 0; i < n; i++)
	{
		if (a[i] > a[max])
			max = i;
		if (a[i] < a[min])
			min = i;
	}
	printf("%d\n", 2 * n - 2);
	if (a[max] + a[min] >= 0)
	{
		for (i = 0; i < n; i++)
			if (i != max)
				printf("%d %d\n", max + 1, i + 1);
		for (i = 0; i < n - 1; i++)
			printf("%d %d\n", i + 1, i + 2);
	}
	else
	{
		for (i = 0; i < n; i++)
			if (i != min)
				printf("%d %d\n", min + 1, i + 1);
		for (i = n - 1; i > 0; i--)
			printf("%d %d\n", i + 1, i);
	}
	return 0;
}
3
-2 5 -1

4
2 1
2 3
1 2
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>
int main()
{
	int n;
	scanf("%d", &n);
	int i;
	int a[55];
	for (i = 0; i < n; i++)
		scanf("%d", &a[i]);
	int max, min;
	max = min = 0;
	for (i = 0; i < n; i++)
	{
		if (a[i] > a[max])
			max = i;
		if (a[i] < a[min])
			min = i;
	}
	printf("%d\n", 2 * n - 2);
	if (a[max] + a[min] >= 0)
	{
		for (i = 0; i < n; i++)
			if (i != max)
				printf("%d %d\n", max + 1, i + 1);
		for (i = 0; i < n - 1; i++)
			printf("%d %d\n", i + 1, i + 2);
	}
	else
	{
		for (i = 0; i < n; i++)
			if (i != min)
				printf("%d %d\n", min + 1, i + 1);
		for (i = n - 1; i > 0; i--)
			printf("%d %d\n", i + 1, i);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d %d\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
	subq	$256, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-256(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -252(%rbp)
	jmp	.L2
.L3:
	leaq	-240(%rbp), %rdx
	movl	-252(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -252(%rbp)
.L2:
	movl	-256(%rbp), %eax
	cmpl	%eax, -252(%rbp)
	jl	.L3
	movl	$0, -244(%rbp)
	movl	-244(%rbp), %eax
	movl	%eax, -248(%rbp)
	movl	$0, -252(%rbp)
	jmp	.L4
.L7:
	movl	-252(%rbp), %eax
	cltq
	movl	-240(%rbp,%rax,4), %edx
	movl	-248(%rbp), %eax
	cltq
	movl	-240(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	-252(%rbp), %eax
	movl	%eax, -248(%rbp)
.L5:
	movl	-252(%rbp), %eax
	cltq
	movl	-240(%rbp,%rax,4), %edx
	movl	-244(%rbp), %eax
	cltq
	movl	-240(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L6
	movl	-252(%rbp), %eax
	movl	%eax, -244(%rbp)
.L6:
	addl	$1, -252(%rbp)
.L4:
	movl	-256(%rbp), %eax
	cmpl	%eax, -252(%rbp)
	jl	.L7
	movl	-256(%rbp), %eax
	subl	$1, %eax
	addl	%eax, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-248(%rbp), %eax
	cltq
	movl	-240(%rbp,%rax,4), %edx
	movl	-244(%rbp), %eax
	cltq
	movl	-240(%rbp,%rax,4), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	js	.L8
	movl	$0, -252(%rbp)
	jmp	.L9
.L11:
	movl	-252(%rbp), %eax
	cmpl	-248(%rbp), %eax
	je	.L10
	movl	-252(%rbp), %eax
	leal	1(%rax), %edx
	movl	-248(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L10:
	addl	$1, -252(%rbp)
.L9:
	movl	-256(%rbp), %eax
	cmpl	%eax, -252(%rbp)
	jl	.L11
	movl	$0, -252(%rbp)
	jmp	.L12
.L13:
	movl	-252(%rbp), %eax
	leal	2(%rax), %edx
	movl	-252(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -252(%rbp)
.L12:
	movl	-256(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -252(%rbp)
	jl	.L13
	jmp	.L14
.L8:
	movl	$0, -252(%rbp)
	jmp	.L15
.L17:
	movl	-252(%rbp), %eax
	cmpl	-244(%rbp), %eax
	je	.L16
	movl	-252(%rbp), %eax
	leal	1(%rax), %edx
	movl	-244(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L16:
	addl	$1, -252(%rbp)
.L15:
	movl	-256(%rbp), %eax
	cmpl	%eax, -252(%rbp)
	jl	.L17
	movl	-256(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -252(%rbp)
	jmp	.L18
.L19:
	movl	-252(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-252(%rbp), %eax
	movl	%eax, %edx
	movl	%ecx, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	subl	$1, -252(%rbp)
.L18:
	cmpl	$0, -252(%rbp)
	jg	.L19
.L14:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d %d\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
	subq	$256, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-256(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -252(%rbp)
	jmp	.L2
.L3:
	leaq	-240(%rbp), %rdx
	movl	-252(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -252(%rbp)
.L2:
	movl	-256(%rbp), %eax
	cmpl	%eax, -252(%rbp)
	jl	.L3
	movl	$0, -244(%rbp)
	movl	-244(%rbp), %eax
	movl	%eax, -248(%rbp)
	movl	$0, -252(%rbp)
	jmp	.L4
.L7:
	movl	-252(%rbp), %eax
	cltq
	movl	-240(%rbp,%rax,4), %edx
	movl	-248(%rbp), %eax
	cltq
	movl	-240(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	-252(%rbp), %eax
	movl	%eax, -248(%rbp)
.L5:
	movl	-252(%rbp), %eax
	cltq
	movl	-240(%rbp,%rax,4), %edx
	movl	-244(%rbp), %eax
	cltq
	movl	-240(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L6
	movl	-252(%rbp), %eax
	movl	%eax, -244(%rbp)
.L6:
	addl	$1, -252(%rbp)
.L4:
	movl	-256(%rbp), %eax
	cmpl	%eax, -252(%rbp)
	jl	.L7
	movl	-256(%rbp), %eax
	subl	$1, %eax
	addl	%eax, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-248(%rbp), %eax
	cltq
	movl	-240(%rbp,%rax,4), %edx
	movl	-244(%rbp), %eax
	cltq
	movl	-240(%rbp,%rax,4), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	js	.L8
	movl	$0, -252(%rbp)
	jmp	.L9
.L11:
	movl	-252(%rbp), %eax
	cmpl	-248(%rbp), %eax
	je	.L10
	movl	-252(%rbp), %eax
	leal	1(%rax), %edx
	movl	-248(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L10:
	addl	$1, -252(%rbp)
.L9:
	movl	-256(%rbp), %eax
	cmpl	%eax, -252(%rbp)
	jl	.L11
	movl	$0, -252(%rbp)
	jmp	.L12
.L13:
	movl	-252(%rbp), %eax
	leal	2(%rax), %edx
	movl	-252(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -252(%rbp)
.L12:
	movl	-256(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -252(%rbp)
	jl	.L13
	jmp	.L14
.L8:
	movl	$0, -252(%rbp)
	jmp	.L15
.L17:
	movl	-252(%rbp), %eax
	cmpl	-244(%rbp), %eax
	je	.L16
	movl	-252(%rbp), %eax
	leal	1(%rax), %edx
	movl	-244(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L16:
	addl	$1, -252(%rbp)
.L15:
	movl	-256(%rbp), %eax
	cmpl	%eax, -252(%rbp)
	jl	.L17
	movl	-256(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -252(%rbp)
	jmp	.L18
.L19:
	movl	-252(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-252(%rbp), %eax
	movl	%eax, %edx
	movl	%ecx, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	subl	$1, -252(%rbp)
.L18:
	cmpl	$0, -252(%rbp)
	jg	.L19
.L14:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
