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>
//21:30
int main(){
  long n = 0;
  long a[100000] = {};
  long i = 0;
  long division = 0;
  int mode = 0;
  scanf("%lu",&n);
  for(i=0;i<n;i++){
    scanf("%lu",&a[i]);
  }
  
  for(i=0;i<n-1;i++){
    if(mode == 0 && a[i] < a[i+1]){
      mode = 1;
    }else if(mode == 0 && a[i] > a[i+1]){
      mode = -1;
    }else if(mode == 1 && a[i] > a[i+1]){
      division++;
      mode = 0;
    }else if(mode == -1 && a[i] < a[i+1]){
      division++;
      mode = 0;
    }
  }
  printf("%lu",division+1);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lu"
	.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
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1328, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -800040(%rbp)
	leaq	-800016(%rbp), %rax
	movl	$800000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$0, -800032(%rbp)
	movq	$0, -800024(%rbp)
	movl	$0, -800044(%rbp)
	leaq	-800040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -800032(%rbp)
	jmp	.L2
.L3:
	leaq	-800016(%rbp), %rdx
	movq	-800032(%rbp), %rax
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -800032(%rbp)
.L2:
	movq	-800040(%rbp), %rax
	cmpq	%rax, -800032(%rbp)
	jl	.L3
	movq	$0, -800032(%rbp)
	jmp	.L4
.L9:
	cmpl	$0, -800044(%rbp)
	jne	.L5
	movq	-800032(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800032(%rbp), %rax
	addq	$1, %rax
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jge	.L5
	movl	$1, -800044(%rbp)
	jmp	.L6
.L5:
	cmpl	$0, -800044(%rbp)
	jne	.L7
	movq	-800032(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800032(%rbp), %rax
	addq	$1, %rax
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L7
	movl	$-1, -800044(%rbp)
	jmp	.L6
.L7:
	cmpl	$1, -800044(%rbp)
	jne	.L8
	movq	-800032(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800032(%rbp), %rax
	addq	$1, %rax
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L8
	addq	$1, -800024(%rbp)
	movl	$0, -800044(%rbp)
	jmp	.L6
.L8:
	cmpl	$-1, -800044(%rbp)
	jne	.L6
	movq	-800032(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800032(%rbp), %rax
	addq	$1, %rax
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jge	.L6
	addq	$1, -800024(%rbp)
	movl	$0, -800044(%rbp)
.L6:
	addq	$1, -800032(%rbp)
.L4:
	movq	-800040(%rbp), %rax
	subq	$1, %rax
	cmpq	%rax, -800032(%rbp)
	jl	.L9
	movq	-800024(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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	"%lu"
	.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
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1320, %rsp
	.cfi_def_cfa_offset 800080
	movl	$800000, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	movq	$0, 8(%rsp)
	movq	%r12, %rdi
	call	memset@PLT
	leaq	8(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rax
	testq	%rax, %rax
	jle	.L2
	movq	%r12, %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rax
	addq	$8, %rbp
	cmpq	%rbx, %rax
	jg	.L3
.L2:
	subq	$1, %rax
	testq	%rax, %rax
	jle	.L17
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	16(%rsp,%rcx,8), %rdi
	testl	%esi, %esi
	jne	.L18
	.p2align 4,,10
	.p2align 3
.L9:
	leaq	1(%rcx), %rsi
	movq	16(%rsp,%rsi,8), %r8
	cmpq	%rdi, %r8
	jle	.L6
	cmpq	%rax, %rsi
	jge	.L4
.L5:
	leaq	1(%rsi), %rcx
	movl	$1, %esi
	movq	16(%rsp,%rcx,8), %rdi
	cmpq	%r8, %rdi
	jge	.L14
	addq	$1, %rdx
	cmpq	%rax, %rcx
	jl	.L9
	.p2align 4,,10
	.p2align 3
.L4:
	addq	$1, %rdx
	xorl	%eax, %eax
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$800040, %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
.L6:
	.cfi_restore_state
	jl	.L15
	movq	%rsi, %rcx
	xorl	%esi, %esi
.L14:
	cmpq	%rcx, %rax
	jle	.L4
	movq	16(%rsp,%rcx,8), %rdi
	testl	%esi, %esi
	je	.L9
.L18:
	movq	%rdi, %r8
	movq	%rcx, %rsi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L15:
	cmpq	%rax, %rsi
	jge	.L4
	addq	$2, %rcx
.L10:
	movq	(%r12,%rcx,8), %rdi
	cmpq	%rdi, -8(%r12,%rcx,8)
	jge	.L8
	addq	$1, %rdx
	cmpq	%rcx, %rax
	jg	.L9
	jmp	.L4
.L8:
	cmpq	%rcx, %rax
	jle	.L4
	addq	$1, %rcx
	jmp	.L10
.L17:
	xorl	%edx, %edx
	jmp	.L4
.L26:
	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	"%lu"
	.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
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1320, %rsp
	.cfi_def_cfa_offset 800080
	movl	$800000, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	movq	$0, 8(%rsp)
	movq	%r12, %rdi
	call	memset@PLT
	leaq	8(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rax
	testq	%rax, %rax
	jle	.L2
	movq	%r12, %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rax
	addq	$8, %rbp
	cmpq	%rbx, %rax
	jg	.L3
.L2:
	subq	$1, %rax
	testq	%rax, %rax
	jle	.L17
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	16(%rsp,%rcx,8), %rdi
	testl	%esi, %esi
	jne	.L18
	.p2align 4,,10
	.p2align 3
.L9:
	leaq	1(%rcx), %rsi
	movq	16(%rsp,%rsi,8), %r8
	cmpq	%rdi, %r8
	jle	.L6
	cmpq	%rax, %rsi
	jge	.L4
.L5:
	leaq	1(%rsi), %rcx
	movl	$1, %esi
	movq	16(%rsp,%rcx,8), %rdi
	cmpq	%r8, %rdi
	jge	.L14
	addq	$1, %rdx
	cmpq	%rax, %rcx
	jl	.L9
	.p2align 4,,10
	.p2align 3
.L4:
	addq	$1, %rdx
	xorl	%eax, %eax
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$800040, %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
.L6:
	.cfi_restore_state
	jl	.L15
	movq	%rsi, %rcx
	xorl	%esi, %esi
.L14:
	cmpq	%rcx, %rax
	jle	.L4
	movq	16(%rsp,%rcx,8), %rdi
	testl	%esi, %esi
	je	.L9
.L18:
	movq	%rdi, %r8
	movq	%rcx, %rsi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L15:
	cmpq	%rax, %rsi
	jge	.L4
	addq	$2, %rcx
.L10:
	movq	(%r12,%rcx,8), %rdi
	cmpq	%rdi, -8(%r12,%rcx,8)
	jge	.L8
	addq	$1, %rdx
	cmpq	%rcx, %rax
	jg	.L9
	jmp	.L4
.L8:
	cmpq	%rcx, %rax
	jle	.L4
	addq	$1, %rcx
	jmp	.L10
.L17:
	xorl	%edx, %edx
	jmp	.L4
.L26:
	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>
//21:30
int main(){
  long n = 0;
  long a[100000] = {};
  long i = 0;
  long division = 0;
  int mode = 0;
  scanf("%lu",&n);
  for(i=0;i<n;i++){
    scanf("%lu",&a[i]);
  }
  
  for(i=0;i<n-1;i++){
    if(mode == 0 && a[i] < a[i+1]){
      mode = 1;
    }else if(mode == 0 && a[i] > a[i+1]){
      mode = -1;
    }else if(mode == 1 && a[i] > a[i+1]){
      division++;
      mode = 0;
    }else if(mode == -1 && a[i] < a[i+1]){
      division++;
      mode = 0;
    }
  }
  printf("%lu",division+1);
  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>
//21:30
int main(){
  long n = 0;
  long a[100000] = {};
  long i = 0;
  long division = 0;
  int mode = 0;
  scanf("%lu",&n);
  for(i=0;i<n;i++){
    scanf("%lu",&a[i]);
  }
  
  for(i=0;i<n-1;i++){
    if(mode == 0 && a[i] < a[i+1]){
      mode = 1;
    }else if(mode == 0 && a[i] > a[i+1]){
      mode = -1;
    }else if(mode == 1 && a[i] > a[i+1]){
      division++;
      mode = 0;
    }else if(mode == -1 && a[i] < a[i+1]){
      division++;
      mode = 0;
    }
  }
  printf("%lu",division+1);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lu"
	.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
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1328, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -800040(%rbp)
	leaq	-800016(%rbp), %rax
	movl	$800000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$0, -800032(%rbp)
	movq	$0, -800024(%rbp)
	movl	$0, -800044(%rbp)
	leaq	-800040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -800032(%rbp)
	jmp	.L2
.L3:
	leaq	-800016(%rbp), %rdx
	movq	-800032(%rbp), %rax
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -800032(%rbp)
.L2:
	movq	-800040(%rbp), %rax
	cmpq	%rax, -800032(%rbp)
	jl	.L3
	movq	$0, -800032(%rbp)
	jmp	.L4
.L9:
	cmpl	$0, -800044(%rbp)
	jne	.L5
	movq	-800032(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800032(%rbp), %rax
	addq	$1, %rax
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jge	.L5
	movl	$1, -800044(%rbp)
	jmp	.L6
.L5:
	cmpl	$0, -800044(%rbp)
	jne	.L7
	movq	-800032(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800032(%rbp), %rax
	addq	$1, %rax
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L7
	movl	$-1, -800044(%rbp)
	jmp	.L6
.L7:
	cmpl	$1, -800044(%rbp)
	jne	.L8
	movq	-800032(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800032(%rbp), %rax
	addq	$1, %rax
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L8
	addq	$1, -800024(%rbp)
	movl	$0, -800044(%rbp)
	jmp	.L6
.L8:
	cmpl	$-1, -800044(%rbp)
	jne	.L6
	movq	-800032(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800032(%rbp), %rax
	addq	$1, %rax
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jge	.L6
	addq	$1, -800024(%rbp)
	movl	$0, -800044(%rbp)
.L6:
	addq	$1, -800032(%rbp)
.L4:
	movq	-800040(%rbp), %rax
	subq	$1, %rax
	cmpq	%rax, -800032(%rbp)
	jl	.L9
	movq	-800024(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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	"%lu"
	.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
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1328, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -800040(%rbp)
	leaq	-800016(%rbp), %rax
	movl	$800000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$0, -800032(%rbp)
	movq	$0, -800024(%rbp)
	movl	$0, -800044(%rbp)
	leaq	-800040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -800032(%rbp)
	jmp	.L2
.L3:
	leaq	-800016(%rbp), %rdx
	movq	-800032(%rbp), %rax
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -800032(%rbp)
.L2:
	movq	-800040(%rbp), %rax
	cmpq	%rax, -800032(%rbp)
	jl	.L3
	movq	$0, -800032(%rbp)
	jmp	.L4
.L9:
	cmpl	$0, -800044(%rbp)
	jne	.L5
	movq	-800032(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800032(%rbp), %rax
	addq	$1, %rax
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jge	.L5
	movl	$1, -800044(%rbp)
	jmp	.L6
.L5:
	cmpl	$0, -800044(%rbp)
	jne	.L7
	movq	-800032(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800032(%rbp), %rax
	addq	$1, %rax
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L7
	movl	$-1, -800044(%rbp)
	jmp	.L6
.L7:
	cmpl	$1, -800044(%rbp)
	jne	.L8
	movq	-800032(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800032(%rbp), %rax
	addq	$1, %rax
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L8
	addq	$1, -800024(%rbp)
	movl	$0, -800044(%rbp)
	jmp	.L6
.L8:
	cmpl	$-1, -800044(%rbp)
	jne	.L6
	movq	-800032(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800032(%rbp), %rax
	addq	$1, %rax
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jge	.L6
	addq	$1, -800024(%rbp)
	movl	$0, -800044(%rbp)
.L6:
	addq	$1, -800032(%rbp)
.L4:
	movq	-800040(%rbp), %rax
	subq	$1, %rax
	cmpq	%rax, -800032(%rbp)
	jl	.L9
	movq	-800024(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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:
