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 *A = (int *)malloc(sizeof(int)*N);
	for (int i = 0; i < N; i++)
	{
		scanf("%d", &A[i]);
	}

	int ans = 0;
	for (int i = 0; i < N; i++)
	{
		ans++;
		while (A[i] == A[i + 1] && i + 1 < N)
		{
			i++;
		}
		if (A[i] - A[i + 1] > 0)
		{
			while (A[i] - A[i + 1] >= 0 && i + 1 < N)
			{
				i++;
			}
		}
		else
		{
			while (A[i] - A[i + 1] <= 0 && i + 1 < N)
			{
				i++;
			}
		}
	}
	printf("%d\n", ans);

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movl	$0, -28(%rbp)
	jmp	.L2
.L3:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -28(%rbp)
.L2:
	movl	-32(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L3
	movl	$0, -24(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L4
.L14:
	addl	$1, -24(%rbp)
	jmp	.L5
.L7:
	addl	$1, -20(%rbp)
.L5:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,4), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jne	.L6
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L7
.L6:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	addq	$1, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	subl	%edx, %eax
	testl	%eax, %eax
	jle	.L12
	jmp	.L9
.L11:
	addl	$1, -20(%rbp)
.L9:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	addq	$1, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	subl	%edx, %eax
	testl	%eax, %eax
	js	.L10
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L11
	jmp	.L10
.L13:
	addl	$1, -20(%rbp)
.L12:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	addq	$1, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	subl	%edx, %eax
	testl	%eax, %eax
	jg	.L10
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L13
.L10:
	addl	$1, -20(%rbp)
.L4:
	movl	-32(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L14
	movl	-24(%rbp), %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	.L16
	call	__stack_chk_fail@PLT
.L16:
	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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rdi
	movq	%rdi, %r14
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rax, %rbx
	movq	%rax, %r12
	testl	%r14d, %r14d
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ecx
	addq	$4, %r12
	cmpl	%ebp, %ecx
	jg	.L4
	testl	%ecx, %ecx
	jle	.L5
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L14:
	movslq	%edx, %rax
	addl	$1, %r8d
	movl	(%rbx,%rax,4), %edi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L24:
	addq	$1, %rax
	cmpl	%eax, %ecx
	jle	.L8
.L7:
	movl	4(%rbx,%rax,4), %esi
	movl	%eax, %edx
	cmpl	%edi, %esi
	je	.L24
	cmpl	%esi, %edi
	jle	.L8
	addl	$1, %edx
	movslq	%edx, %rax
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%eax, %edx
	cmpl	%eax, %ecx
	jle	.L3
	movl	(%rbx,%rax,4), %esi
	subl	4(%rbx,%rax,4), %esi
	addq	$1, %rax
	testl	%esi, %esi
	jns	.L9
	addl	$1, %edx
.L12:
	cmpl	%edx, %ecx
	jg	.L14
	.p2align 4,,10
	.p2align 3
.L3:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	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
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	movslq	%edx, %rax
	leaq	(%rbx,%rax,4), %rax
	movl	(%rax), %esi
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%esi, %edi
	movl	4(%rax), %esi
	addl	$1, %edx
	cmpl	%esi, %edi
	jg	.L12
	addq	$4, %rax
	cmpl	%edx, %ecx
	jg	.L13
	jmp	.L3
.L5:
	xorl	%r8d, %r8d
	jmp	.L3
.L25:
	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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rdi
	movq	%rdi, %r14
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rax, %rbx
	movq	%rax, %r12
	testl	%r14d, %r14d
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ecx
	addq	$4, %r12
	cmpl	%ebp, %ecx
	jg	.L4
	testl	%ecx, %ecx
	jle	.L5
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L14:
	movslq	%edx, %rax
	addl	$1, %r8d
	movl	(%rbx,%rax,4), %edi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L24:
	addq	$1, %rax
	cmpl	%eax, %ecx
	jle	.L8
.L7:
	movl	4(%rbx,%rax,4), %esi
	movl	%eax, %edx
	cmpl	%edi, %esi
	je	.L24
	cmpl	%esi, %edi
	jle	.L8
	addl	$1, %edx
	movslq	%edx, %rax
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%eax, %edx
	cmpl	%eax, %ecx
	jle	.L3
	movl	(%rbx,%rax,4), %esi
	subl	4(%rbx,%rax,4), %esi
	addq	$1, %rax
	testl	%esi, %esi
	jns	.L9
	addl	$1, %edx
.L12:
	cmpl	%edx, %ecx
	jg	.L14
	.p2align 4,,10
	.p2align 3
.L3:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	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
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	movslq	%edx, %rax
	leaq	(%rbx,%rax,4), %rax
	movl	(%rax), %esi
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%esi, %edi
	movl	4(%rax), %esi
	addl	$1, %edx
	cmpl	%esi, %edi
	jg	.L12
	addq	$4, %rax
	cmpl	%edx, %ecx
	jg	.L13
	jmp	.L3
.L5:
	xorl	%r8d, %r8d
	jmp	.L3
.L25:
	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 *A = (int *)malloc(sizeof(int)*N);
	for (int i = 0; i < N; i++)
	{
		scanf("%d", &A[i]);
	}

	int ans = 0;
	for (int i = 0; i < N; i++)
	{
		ans++;
		while (A[i] == A[i + 1] && i + 1 < N)
		{
			i++;
		}
		if (A[i] - A[i + 1] > 0)
		{
			while (A[i] - A[i + 1] >= 0 && i + 1 < N)
			{
				i++;
			}
		}
		else
		{
			while (A[i] - A[i + 1] <= 0 && i + 1 < N)
			{
				i++;
			}
		}
	}
	printf("%d\n", ans);

	return 0;
}
6
1 2 3 2 0 1
 9
1 2 1 2 2 2 1 2 1
 6
1 2 3 2 0 0
 9
0 1 0 -1 2 7 2 -1 0
 7
1 2 3 2 1 999999999 1000000100
 9
1 2 1 2 2 2 2 2 1
 7
1 4 3 2 1 999999999 1000000100
 6
0 2 3 2 0 0
 9
1 2 0 2 2 2 2 2 1
 7
1 4 3 4 1 999999999 1000000100

3
 4
 2
 5
 3
 3
 3
 2
 3
 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 *A = (int *)malloc(sizeof(int)*N);
	for (int i = 0; i < N; i++)
	{
		scanf("%d", &A[i]);
	}

	int ans = 0;
	for (int i = 0; i < N; i++)
	{
		ans++;
		while (A[i] == A[i + 1] && i + 1 < N)
		{
			i++;
		}
		if (A[i] - A[i + 1] > 0)
		{
			while (A[i] - A[i + 1] >= 0 && i + 1 < N)
			{
				i++;
			}
		}
		else
		{
			while (A[i] - A[i + 1] <= 0 && i + 1 < N)
			{
				i++;
			}
		}
	}
	printf("%d\n", ans);

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movl	$0, -28(%rbp)
	jmp	.L2
.L3:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -28(%rbp)
.L2:
	movl	-32(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L3
	movl	$0, -24(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L4
.L14:
	addl	$1, -24(%rbp)
	jmp	.L5
.L7:
	addl	$1, -20(%rbp)
.L5:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,4), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jne	.L6
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L7
.L6:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	addq	$1, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	subl	%edx, %eax
	testl	%eax, %eax
	jle	.L12
	jmp	.L9
.L11:
	addl	$1, -20(%rbp)
.L9:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	addq	$1, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	subl	%edx, %eax
	testl	%eax, %eax
	js	.L10
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L11
	jmp	.L10
.L13:
	addl	$1, -20(%rbp)
.L12:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	addq	$1, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	subl	%edx, %eax
	testl	%eax, %eax
	jg	.L10
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L13
.L10:
	addl	$1, -20(%rbp)
.L4:
	movl	-32(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L14
	movl	-24(%rbp), %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	.L16
	call	__stack_chk_fail@PLT
.L16:
	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"
	.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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movl	$0, -28(%rbp)
	jmp	.L2
.L3:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -28(%rbp)
.L2:
	movl	-32(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L3
	movl	$0, -24(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L4
.L14:
	addl	$1, -24(%rbp)
	jmp	.L5
.L7:
	addl	$1, -20(%rbp)
.L5:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,4), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jne	.L6
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L7
.L6:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	addq	$1, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	subl	%edx, %eax
	testl	%eax, %eax
	jle	.L12
	jmp	.L9
.L11:
	addl	$1, -20(%rbp)
.L9:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	addq	$1, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	subl	%edx, %eax
	testl	%eax, %eax
	js	.L10
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L11
	jmp	.L10
.L13:
	addl	$1, -20(%rbp)
.L12:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	addq	$1, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	subl	%edx, %eax
	testl	%eax, %eax
	jg	.L10
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L13
.L10:
	addl	$1, -20(%rbp)
.L4:
	movl	-32(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L14
	movl	-24(%rbp), %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	.L16
	call	__stack_chk_fail@PLT
.L16:
	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:
