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>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <math.h>
#include <time.h>
#define ll long long
#define min(a, b) ((a) > (b) ? (b) : (a))
#define max(a, b) ((a) > (b) ? (a) : (b))
#define miin(a, b, c) min((a), min((b), (c)))
#define maax(a, b, c) max((a), max((b), (c)))
#define mod 1000000007

int n, m, a[333333], i = 2;

int nyaa(int x)
{
    int res = 1;
    while (x--)
        res *= 2;
    return res;
}

main()
{
    scanf("%d", &n);
    m = nyaa(n);
    for (int i = 0; i < m; i++)
    {
        scanf("%d", &a[i]);
    }
    while (n--)
    {
        for (int j = 0; j < m; j += i)
        {
            a[j] = (a[j] - a[i / 2 + j] ? abs(a[j] - a[i / 2 + j]) : a[j]);
        }
        i *= 2;
    }
    printf("%d\n", a[0]);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1333332
a:
	.zero	1333332
	.globl	i
	.data
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.long	2
	.text
	.globl	nyaa
	.type	nyaa, @function
nyaa:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$1, -4(%rbp)
	jmp	.L2
.L3:
	sall	-4(%rbp)
.L2:
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -20(%rbp)
	testl	%eax, %eax
	jne	.L3
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	nyaa, .-nyaa
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.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	$16, %rsp
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	movl	%eax, %edi
	call	nyaa
	movl	%eax, m(%rip)
	movl	$0, -8(%rbp)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8(%rbp)
.L6:
	movl	m(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L7
	jmp	.L8
.L13:
	movl	$0, -4(%rbp)
	jmp	.L9
.L12:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	i(%rip), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L10
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	i(%rip), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	jmp	.L11
.L10:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
.L11:
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	i(%rip), %eax
	addl	%eax, -4(%rbp)
.L9:
	movl	m(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L12
	movl	i(%rip), %eax
	addl	%eax, %eax
	movl	%eax, i(%rip)
.L8:
	movl	n(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, n(%rip)
	testl	%eax, %eax
	jne	.L13
	movl	a(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	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	nyaa
	.type	nyaa, @function
nyaa:
.LFB51:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	je	.L7
	cmpl	$1, %edi
	je	.L8
	movq	.LC0(%rip), %xmm0
	movl	%edi, %edx
	xorl	%eax, %eax
	shrl	%edx
	.p2align 4,,10
	.p2align 3
.L4:
	addl	$1, %eax
	pslld	$1, %xmm0
	cmpl	%eax, %edx
	jne	.L4
	movd	%xmm0, %eax
	pshufd	$0xe5, %xmm0, %xmm1
	movd	%xmm1, %edx
	imull	%edx, %eax
	andl	$1, %edi
	je	.L11
.L3:
	addl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$1, %eax
	ret
.L8:
	movl	$1, %eax
	jmp	.L3
	.cfi_endproc
.LFE51:
	.size	nyaa, .-nyaa
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC1(%rip), %r13
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	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	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L27
	movl	%eax, %ecx
	cmpl	$1, %eax
	je	.L14
	movq	.LC0(%rip), %xmm0
	movl	%eax, %edx
	xorl	%eax, %eax
	shrl	%edx
	.p2align 4,,10
	.p2align 3
.L15:
	addl	$1, %eax
	pslld	$1, %xmm0
	cmpl	%edx, %eax
	jne	.L15
	movd	%xmm0, %eax
	pshufd	$0xe5, %xmm0, %xmm1
	movd	%xmm1, %edx
	imull	%edx, %eax
	andl	$1, %ecx
	je	.L13
.L14:
	addl	%eax, %eax
.L13:
	movl	%eax, m(%rip)
	leaq	a(%rip), %rbx
	xorl	%ebp, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L18:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	m(%rip), %r9d
	addq	$4, %r12
	cmpl	%ebp, %r9d
	jg	.L18
	movl	n(%rip), %eax
	leal	-1(%rax), %r10d
	movl	%r10d, n(%rip)
	testl	%eax, %eax
	je	.L19
	movl	i(%rip), %r8d
	.p2align 4,,10
	.p2align 3
.L20:
	testl	%r9d, %r9d
	jle	.L23
	movl	%r8d, %edi
	movslq	%r8d, %r11
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	shrl	$31, %edi
	salq	$2, %r11
	addl	%r8d, %edi
	sarl	%edi
	movslq	%edi, %rdi
	.p2align 4,,10
	.p2align 3
.L24:
	movl	(%rdx), %eax
	movl	(%rdx,%rdi,4), %esi
	cmpl	%eax, %esi
	je	.L21
	subl	%esi, %eax
	movl	%eax, %esi
	negl	%esi
	cmovns	%esi, %eax
	addl	%r8d, %ecx
	movl	%eax, (%rdx)
	addq	%r11, %rdx
	cmpl	%ecx, %r9d
	jg	.L24
.L23:
	addl	%r8d, %r8d
	subl	$1, %r10d
	jnb	.L20
.L25:
	movl	%r8d, i(%rip)
	movl	$-1, n(%rip)
.L19:
	movl	a(%rip), %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %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
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	addl	%r8d, %ecx
	addq	%r11, %rdx
	cmpl	%ecx, %r9d
	jg	.L24
	addl	%r8d, %r8d
	subl	$1, %r10d
	jb	.L25
	jmp	.L20
.L27:
	movl	$1, %eax
	jmp	.L13
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.globl	i
	.data
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.long	2
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1333332
a:
	.zero	1333332
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	1
	.long	1
	.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	nyaa
	.type	nyaa, @function
nyaa:
.LFB51:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	je	.L7
	cmpl	$1, %edi
	je	.L8
	movq	.LC0(%rip), %xmm0
	movl	%edi, %edx
	xorl	%eax, %eax
	shrl	%edx
	.p2align 4,,10
	.p2align 3
.L4:
	addl	$1, %eax
	pslld	$1, %xmm0
	cmpl	%eax, %edx
	jne	.L4
	movd	%xmm0, %eax
	pshufd	$0xe5, %xmm0, %xmm1
	movd	%xmm1, %edx
	imull	%edx, %eax
	andl	$1, %edi
	je	.L11
.L3:
	addl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$1, %eax
	ret
.L8:
	movl	$1, %eax
	jmp	.L3
	.cfi_endproc
.LFE51:
	.size	nyaa, .-nyaa
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC1(%rip), %r13
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	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	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L27
	movl	%eax, %ecx
	cmpl	$1, %eax
	je	.L14
	movq	.LC0(%rip), %xmm0
	movl	%eax, %edx
	xorl	%eax, %eax
	shrl	%edx
	.p2align 4,,10
	.p2align 3
.L15:
	addl	$1, %eax
	pslld	$1, %xmm0
	cmpl	%edx, %eax
	jne	.L15
	movd	%xmm0, %eax
	pshufd	$0xe5, %xmm0, %xmm1
	movd	%xmm1, %edx
	imull	%edx, %eax
	andl	$1, %ecx
	je	.L13
.L14:
	addl	%eax, %eax
.L13:
	movl	%eax, m(%rip)
	leaq	a(%rip), %rbx
	xorl	%ebp, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L18:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	m(%rip), %r9d
	addq	$4, %r12
	cmpl	%ebp, %r9d
	jg	.L18
	movl	n(%rip), %eax
	leal	-1(%rax), %r10d
	movl	%r10d, n(%rip)
	testl	%eax, %eax
	je	.L19
	movl	i(%rip), %r8d
	.p2align 4,,10
	.p2align 3
.L20:
	testl	%r9d, %r9d
	jle	.L23
	movl	%r8d, %edi
	movslq	%r8d, %r11
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	shrl	$31, %edi
	salq	$2, %r11
	addl	%r8d, %edi
	sarl	%edi
	movslq	%edi, %rdi
	.p2align 4,,10
	.p2align 3
.L24:
	movl	(%rdx), %eax
	movl	(%rdx,%rdi,4), %esi
	cmpl	%eax, %esi
	je	.L21
	subl	%esi, %eax
	movl	%eax, %esi
	negl	%esi
	cmovns	%esi, %eax
	addl	%r8d, %ecx
	movl	%eax, (%rdx)
	addq	%r11, %rdx
	cmpl	%ecx, %r9d
	jg	.L24
.L23:
	addl	%r8d, %r8d
	subl	$1, %r10d
	jnb	.L20
.L25:
	movl	%r8d, i(%rip)
	movl	$-1, n(%rip)
.L19:
	movl	a(%rip), %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %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
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	addl	%r8d, %ecx
	addq	%r11, %rdx
	cmpl	%ecx, %r9d
	jg	.L24
	addl	%r8d, %r8d
	subl	$1, %r10d
	jb	.L25
	jmp	.L20
.L27:
	movl	$1, %eax
	jmp	.L13
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.globl	i
	.data
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.long	2
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1333332
a:
	.zero	1333332
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	1
	.long	1
	.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>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <math.h>
#include <time.h>
#define ll long long
#define min(a, b) ((a) > (b) ? (b) : (a))
#define max(a, b) ((a) > (b) ? (a) : (b))
#define miin(a, b, c) min((a), min((b), (c)))
#define maax(a, b, c) max((a), max((b), (c)))
#define mod 1000000007

int n, m, a[333333], i = 2;

int nyaa(int x)
{
    int res = 1;
    while (x--)
        res *= 2;
    return res;
}

main()
{
    scanf("%d", &n);
    m = nyaa(n);
    for (int i = 0; i < m; i++)
    {
        scanf("%d", &a[i]);
    }
    while (n--)
    {
        for (int j = 0; j < m; j += i)
        {
            a[j] = (a[j] - a[i / 2 + j] ? abs(a[j] - a[i / 2 + j]) : a[j]);
        }
        i *= 2;
    }
    printf("%d\n", a[0]);
    return 0;
}
3
1
5
2
4
6
8
100
104
 2
1
5
10
19
 3
1
5
2
4
6
8
100
130
 2
1
5
4
19
 3
1
5
2
4
8
8
100
130
 2
1
5
8
19
 3
1
6
2
4
8
8
100
130
 2
1
5
8
0
 3
1
6
2
4
8
10
100
130
 3
1
6
2
4
0
10
100
130

2
 5
 26
 11
 20
 7
 19
 4
 25
 17

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>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <math.h>
#include <time.h>
#define ll long long
#define min(a, b) ((a) > (b) ? (b) : (a))
#define max(a, b) ((a) > (b) ? (a) : (b))
#define miin(a, b, c) min((a), min((b), (c)))
#define maax(a, b, c) max((a), max((b), (c)))
#define mod 1000000007

int n, m, a[333333], i = 2;

int nyaa(int x)
{
    int res = 1;
    while (x--)
        res *= 2;
    return res;
}

main()
{
    scanf("%d", &n);
    m = nyaa(n);
    for (int i = 0; i < m; i++)
    {
        scanf("%d", &a[i]);
    }
    while (n--)
    {
        for (int j = 0; j < m; j += i)
        {
            a[j] = (a[j] - a[i / 2 + j] ? abs(a[j] - a[i / 2 + j]) : a[j]);
        }
        i *= 2;
    }
    printf("%d\n", a[0]);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1333332
a:
	.zero	1333332
	.globl	i
	.data
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.long	2
	.text
	.globl	nyaa
	.type	nyaa, @function
nyaa:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$1, -4(%rbp)
	jmp	.L2
.L3:
	sall	-4(%rbp)
.L2:
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -20(%rbp)
	testl	%eax, %eax
	jne	.L3
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	nyaa, .-nyaa
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.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	$16, %rsp
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	movl	%eax, %edi
	call	nyaa
	movl	%eax, m(%rip)
	movl	$0, -8(%rbp)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8(%rbp)
.L6:
	movl	m(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L7
	jmp	.L8
.L13:
	movl	$0, -4(%rbp)
	jmp	.L9
.L12:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	i(%rip), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L10
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	i(%rip), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	jmp	.L11
.L10:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
.L11:
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	i(%rip), %eax
	addl	%eax, -4(%rbp)
.L9:
	movl	m(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L12
	movl	i(%rip), %eax
	addl	%eax, %eax
	movl	%eax, i(%rip)
.L8:
	movl	n(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, n(%rip)
	testl	%eax, %eax
	jne	.L13
	movl	a(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	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	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1333332
a:
	.zero	1333332
	.globl	i
	.data
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.long	2
	.text
	.globl	nyaa
	.type	nyaa, @function
nyaa:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$1, -4(%rbp)
	jmp	.L2
.L3:
	sall	-4(%rbp)
.L2:
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -20(%rbp)
	testl	%eax, %eax
	jne	.L3
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	nyaa, .-nyaa
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.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	$16, %rsp
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	movl	%eax, %edi
	call	nyaa
	movl	%eax, m(%rip)
	movl	$0, -8(%rbp)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8(%rbp)
.L6:
	movl	m(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L7
	jmp	.L8
.L13:
	movl	$0, -4(%rbp)
	jmp	.L9
.L12:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	i(%rip), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L10
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	i(%rip), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	jmp	.L11
.L10:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
.L11:
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	i(%rip), %eax
	addl	%eax, -4(%rbp)
.L9:
	movl	m(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L12
	movl	i(%rip), %eax
	addl	%eax, %eax
	movl	%eax, i(%rip)
.L8:
	movl	n(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, n(%rip)
	testl	%eax, %eax
	jne	.L13
	movl	a(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	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:
