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>

int main(int argc, char** argv)
{
	int n, i;
	int a[100000] = {0}, max = 0;
	int k = 0;
	
	scanf("%d", &n);
	for(i=0;i<n;++i){
		scanf("%d", a+i);
		a[i] = a[i] * 2;
		if( a[i] > max ) max = a[i];
	}
	for(i=0; i<n; ++i){
		int d1, d2;
		d1 = (max/2) < k ? (k-max/2) : (max/2-k);
		d2 = (max/2) < a[i] ? (a[i] - max/2) : (max/2 - a[i]);
		if( d2 < d1 ) k = a[i];
	}
	
	printf("%d %d\n", max/2, k/2);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2752, %rsp
	movl	%edi, -400052(%rbp)
	movq	%rsi, -400064(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400016(%rbp), %rax
	movl	$400000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -400032(%rbp)
	movl	$0, -400028(%rbp)
	leaq	-400040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400036(%rbp)
	jmp	.L2
.L4:
	movl	-400036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-400016(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	leal	(%rax,%rax), %edx
	movl	-400036(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, -400032(%rbp)
	jge	.L3
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movl	%eax, -400032(%rbp)
.L3:
	addl	$1, -400036(%rbp)
.L2:
	movl	-400040(%rbp), %eax
	cmpl	%eax, -400036(%rbp)
	jl	.L4
	movl	$0, -400036(%rbp)
	jmp	.L5
.L11:
	movl	-400032(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -400028(%rbp)
	jle	.L6
	movl	-400032(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	negl	%eax
	movl	%eax, %edx
	movl	-400028(%rbp), %eax
	addl	%edx, %eax
	jmp	.L7
.L6:
	movl	-400032(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	subl	-400028(%rbp), %eax
.L7:
	movl	%eax, -400024(%rbp)
	movl	-400032(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L8
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	-400032(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	negl	%eax
	addl	%edx, %eax
	jmp	.L9
.L8:
	movl	-400032(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %ecx
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
.L9:
	movl	%eax, -400020(%rbp)
	movl	-400020(%rbp), %eax
	cmpl	-400024(%rbp), %eax
	jge	.L10
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movl	%eax, -400028(%rbp)
.L10:
	addl	$1, -400036(%rbp)
.L5:
	movl	-400040(%rbp), %eax
	cmpl	%eax, -400036(%rbp)
	jl	.L11
	movl	-400028(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-400032(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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 %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	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
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2728, %rsp
	.cfi_def_cfa_offset 400096
	movl	$400000, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r14
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r13
	movq	%r13, %rdi
	call	memset@PLT
	leaq	12(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L11
	movq	%r13, %r12
	movq	%r13, %rbx
	xorl	%ebp, %ebp
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	xorl	%eax, %eax
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	movl	(%rbx), %eax
	addl	%eax, %eax
	cmpl	%eax, %ebp
	movl	%eax, (%rbx)
	cmovl	%eax, %ebp
	movl	12(%rsp), %eax
	addl	$1, %r15d
	addq	$4, %rbx
	cmpl	%r15d, %eax
	jg	.L3
	movl	%ebp, %edx
	sarl	%edx
	testl	%eax, %eax
	jle	.L12
	subl	$1, %eax
	leaq	4(%r13,%rax,4), %r9
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%eax, %ecx
	movl	%edx, %edi
	movl	%edx, %esi
	subl	%edx, %ecx
	subl	%eax, %edi
	cmpl	%edx, %eax
	cmovg	%ecx, %edi
	movl	(%r12), %ecx
	movl	%ecx, %r8d
	subl	%ecx, %esi
	subl	%edx, %r8d
	cmpl	%edx, %ecx
	cmovg	%r8d, %esi
	cmpl	%esi, %edi
	cmovg	%ecx, %eax
	addq	$4, %r12
	cmpq	%r12, %r9
	jne	.L9
.L2:
	movl	%eax, %ecx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	shrl	$31, %ecx
	addl	%eax, %ecx
	xorl	%eax, %eax
	sarl	%ecx
	call	__printf_chk@PLT
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$400040, %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
.L11:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L2
.L12:
	xorl	%eax, %eax
	jmp	.L2
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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 %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	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
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2728, %rsp
	.cfi_def_cfa_offset 400096
	movl	$400000, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r14
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r13
	movq	%r13, %rdi
	call	memset@PLT
	leaq	12(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L11
	movq	%r13, %r12
	movq	%r13, %rbx
	xorl	%ebp, %ebp
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	xorl	%eax, %eax
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	movl	(%rbx), %eax
	addl	%eax, %eax
	cmpl	%eax, %ebp
	movl	%eax, (%rbx)
	cmovl	%eax, %ebp
	movl	12(%rsp), %eax
	addl	$1, %r15d
	addq	$4, %rbx
	cmpl	%r15d, %eax
	jg	.L3
	movl	%ebp, %edx
	sarl	%edx
	testl	%eax, %eax
	jle	.L12
	subl	$1, %eax
	leaq	4(%r13,%rax,4), %r9
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%eax, %ecx
	movl	%edx, %edi
	movl	%edx, %esi
	subl	%edx, %ecx
	subl	%eax, %edi
	cmpl	%edx, %eax
	cmovg	%ecx, %edi
	movl	(%r12), %ecx
	movl	%ecx, %r8d
	subl	%ecx, %esi
	subl	%edx, %r8d
	cmpl	%edx, %ecx
	cmovg	%r8d, %esi
	cmpl	%esi, %edi
	cmovg	%ecx, %eax
	addq	$4, %r12
	cmpq	%r12, %r9
	jne	.L9
.L2:
	movl	%eax, %ecx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	shrl	$31, %ecx
	addl	%eax, %ecx
	xorl	%eax, %eax
	sarl	%ecx
	call	__printf_chk@PLT
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$400040, %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
.L11:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L2
.L12:
	xorl	%eax, %eax
	jmp	.L2
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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>
#include <stdlib.h>

int main(int argc, char** argv)
{
	int n, i;
	int a[100000] = {0}, max = 0;
	int k = 0;
	
	scanf("%d", &n);
	for(i=0;i<n;++i){
		scanf("%d", a+i);
		a[i] = a[i] * 2;
		if( a[i] > max ) max = a[i];
	}
	for(i=0; i<n; ++i){
		int d1, d2;
		d1 = (max/2) < k ? (k-max/2) : (max/2-k);
		d2 = (max/2) < a[i] ? (a[i] - max/2) : (max/2 - a[i]);
		if( d2 < d1 ) k = a[i];
	}
	
	printf("%d %d\n", max/2, k/2);
	return 0;
}

5
6 9 4 2 11

11 6

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>

int main(int argc, char** argv)
{
	int n, i;
	int a[100000] = {0}, max = 0;
	int k = 0;
	
	scanf("%d", &n);
	for(i=0;i<n;++i){
		scanf("%d", a+i);
		a[i] = a[i] * 2;
		if( a[i] > max ) max = a[i];
	}
	for(i=0; i<n; ++i){
		int d1, d2;
		d1 = (max/2) < k ? (k-max/2) : (max/2-k);
		d2 = (max/2) < a[i] ? (a[i] - max/2) : (max/2 - a[i]);
		if( d2 < d1 ) k = a[i];
	}
	
	printf("%d %d\n", max/2, k/2);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2752, %rsp
	movl	%edi, -400052(%rbp)
	movq	%rsi, -400064(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400016(%rbp), %rax
	movl	$400000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -400032(%rbp)
	movl	$0, -400028(%rbp)
	leaq	-400040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400036(%rbp)
	jmp	.L2
.L4:
	movl	-400036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-400016(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	leal	(%rax,%rax), %edx
	movl	-400036(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, -400032(%rbp)
	jge	.L3
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movl	%eax, -400032(%rbp)
.L3:
	addl	$1, -400036(%rbp)
.L2:
	movl	-400040(%rbp), %eax
	cmpl	%eax, -400036(%rbp)
	jl	.L4
	movl	$0, -400036(%rbp)
	jmp	.L5
.L11:
	movl	-400032(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -400028(%rbp)
	jle	.L6
	movl	-400032(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	negl	%eax
	movl	%eax, %edx
	movl	-400028(%rbp), %eax
	addl	%edx, %eax
	jmp	.L7
.L6:
	movl	-400032(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	subl	-400028(%rbp), %eax
.L7:
	movl	%eax, -400024(%rbp)
	movl	-400032(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L8
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	-400032(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	negl	%eax
	addl	%edx, %eax
	jmp	.L9
.L8:
	movl	-400032(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %ecx
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
.L9:
	movl	%eax, -400020(%rbp)
	movl	-400020(%rbp), %eax
	cmpl	-400024(%rbp), %eax
	jge	.L10
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movl	%eax, -400028(%rbp)
.L10:
	addl	$1, -400036(%rbp)
.L5:
	movl	-400040(%rbp), %eax
	cmpl	%eax, -400036(%rbp)
	jl	.L11
	movl	-400028(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-400032(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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 %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2752, %rsp
	movl	%edi, -400052(%rbp)
	movq	%rsi, -400064(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400016(%rbp), %rax
	movl	$400000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -400032(%rbp)
	movl	$0, -400028(%rbp)
	leaq	-400040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400036(%rbp)
	jmp	.L2
.L4:
	movl	-400036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-400016(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	leal	(%rax,%rax), %edx
	movl	-400036(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, -400032(%rbp)
	jge	.L3
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movl	%eax, -400032(%rbp)
.L3:
	addl	$1, -400036(%rbp)
.L2:
	movl	-400040(%rbp), %eax
	cmpl	%eax, -400036(%rbp)
	jl	.L4
	movl	$0, -400036(%rbp)
	jmp	.L5
.L11:
	movl	-400032(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -400028(%rbp)
	jle	.L6
	movl	-400032(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	negl	%eax
	movl	%eax, %edx
	movl	-400028(%rbp), %eax
	addl	%edx, %eax
	jmp	.L7
.L6:
	movl	-400032(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	subl	-400028(%rbp), %eax
.L7:
	movl	%eax, -400024(%rbp)
	movl	-400032(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L8
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	-400032(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	negl	%eax
	addl	%edx, %eax
	jmp	.L9
.L8:
	movl	-400032(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %ecx
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
.L9:
	movl	%eax, -400020(%rbp)
	movl	-400020(%rbp), %eax
	cmpl	-400024(%rbp), %eax
	jge	.L10
	movl	-400036(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movl	%eax, -400028(%rbp)
.L10:
	addl	$1, -400036(%rbp)
.L5:
	movl	-400040(%rbp), %eax
	cmpl	%eax, -400036(%rbp)
	jl	.L11
	movl	-400028(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-400032(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
