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(void) {
  int i, j, k, a[100], n, l, flag = 1, temp, count = 0;
  char buf[2];
  scanf("%d", &l);
  for (n = 0; n < l && (j = scanf("%d%1[\n]", a+n, buf)) == 1; n++) ;
  if (j == 2)
  n++;

  while (flag) {
    flag = 0;
    for (j = l - 1; j > 0; j--) {
      if (a[j] < a[j - 1]) {
        temp = a[j];
        a[j] = a[j - 1];
        a[j - 1] = temp;
        flag = 1;
        count++;
      }
    }
  }

    for (k = 0; k < l; k++) {
      printf("%d", a[k]);
      if (k < n - 1) {
        printf(" ");
      }
    }
    printf("\n");
    printf("%d\n", count);
    return 0;
  }

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%1[\n]"
.LC2:
	.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	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -428(%rbp)
	movl	$0, -424(%rbp)
	leaq	-444(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -432(%rbp)
	jmp	.L2
.L4:
	addl	$1, -432(%rbp)
.L2:
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jge	.L3
	movl	-432(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-416(%rbp), %rax
	leaq	(%rax,%rdx), %rcx
	leaq	-10(%rbp), %rax
	movq	%rax, %rdx
	movq	%rcx, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	%eax, -440(%rbp)
	cmpl	$1, -440(%rbp)
	je	.L4
.L3:
	cmpl	$2, -440(%rbp)
	jne	.L6
	addl	$1, -432(%rbp)
	jmp	.L6
.L10:
	movl	$0, -428(%rbp)
	movl	-444(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -440(%rbp)
	jmp	.L7
.L9:
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-440(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L8
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, -420(%rbp)
	movl	-440(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-440(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	movl	-440(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-420(%rbp), %edx
	movl	%edx, -416(%rbp,%rax,4)
	movl	$1, -428(%rbp)
	addl	$1, -424(%rbp)
.L8:
	subl	$1, -440(%rbp)
.L7:
	cmpl	$0, -440(%rbp)
	jg	.L9
.L6:
	cmpl	$0, -428(%rbp)
	jne	.L10
	movl	$0, -436(%rbp)
	jmp	.L11
.L13:
	movl	-436(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-432(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -436(%rbp)
	jge	.L12
	movl	$32, %edi
	call	putchar@PLT
.L12:
	addl	$1, -436(%rbp)
.L11:
	movl	-444(%rbp), %eax
	cmpl	%eax, -436(%rbp)
	jl	.L13
	movl	$10, %edi
	call	putchar@PLT
	movl	-424(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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%1[\n]"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	subq	$456, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movq	%rax, 8(%rsp)
	movq	%rax, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L15
	leaq	32(%rsp), %rbx
	xorl	%r13d, %r13d
	leaq	438(%rsp), %r15
	movq	%rbx, %r12
	leaq	.LC1(%rip), %r14
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	addl	$1, %r13d
	addq	$4, %r12
	cmpl	%r13d, 28(%rsp)
	jle	.L2
.L3:
	xorl	%eax, %eax
	movq	%r15, %rdx
	movq	%r12, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L4
	cmpl	$2, %eax
	jne	.L2
	addl	$1, %r13d
.L2:
	movslq	28(%rsp), %rax
	movq	8(%rsp), %rsi
	xorl	%r12d, %r12d
	movq	%rax, %r8
	salq	$2, %rax
	addq	%rax, %rsi
	leaq	(%rbx,%rax), %r9
	leal	-2(%r8), %eax
	salq	$2, %rax
	subq	%rax, %rsi
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	$1, %r8d
	jle	.L5
	movq	%r9, %rdx
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L7:
	movq	-8(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %ecx
	movd	%xmm2, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jle	.L6
	movq	%xmm1, -8(%rdx)
	addl	$1, %r12d
	movl	$1, %edi
.L6:
	subq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L7
	testl	%edi, %edi
	jne	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	leal	-1(%r13), %r14d
	xorl	%r13d, %r13d
	testl	%r8d, %r8d
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%rbx,%r13,4), %edx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	%r13d, %r14d
	jg	.L22
	addq	$1, %r13
	cmpl	%r13d, 28(%rsp)
	jg	.L13
.L12:
	movl	$10, %edi
	call	putchar@PLT
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$456, %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
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	movl	$32, %edi
	addq	$1, %r13
	call	putchar@PLT
	cmpl	%r13d, 28(%rsp)
	jg	.L13
	jmp	.L12
.L15:
	xorl	%r13d, %r13d
	leaq	32(%rsp), %rbx
	jmp	.L2
.L23:
	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%1[\n]"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	subq	$456, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movq	%rax, 8(%rsp)
	movq	%rax, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L15
	leaq	32(%rsp), %rbx
	xorl	%r13d, %r13d
	leaq	438(%rsp), %r15
	movq	%rbx, %r12
	leaq	.LC1(%rip), %r14
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	addl	$1, %r13d
	addq	$4, %r12
	cmpl	%r13d, 28(%rsp)
	jle	.L2
.L3:
	xorl	%eax, %eax
	movq	%r15, %rdx
	movq	%r12, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L4
	cmpl	$2, %eax
	jne	.L2
	addl	$1, %r13d
.L2:
	movslq	28(%rsp), %rax
	movq	8(%rsp), %rsi
	xorl	%r12d, %r12d
	movq	%rax, %r8
	salq	$2, %rax
	addq	%rax, %rsi
	leaq	(%rbx,%rax), %r9
	leal	-2(%r8), %eax
	salq	$2, %rax
	subq	%rax, %rsi
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	$1, %r8d
	jle	.L5
	movq	%r9, %rdx
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L7:
	movq	-8(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %ecx
	movd	%xmm2, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jle	.L6
	movq	%xmm1, -8(%rdx)
	addl	$1, %r12d
	movl	$1, %edi
.L6:
	subq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L7
	testl	%edi, %edi
	jne	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	leal	-1(%r13), %r14d
	xorl	%r13d, %r13d
	testl	%r8d, %r8d
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%rbx,%r13,4), %edx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	%r13d, %r14d
	jg	.L22
	addq	$1, %r13
	cmpl	%r13d, 28(%rsp)
	jg	.L13
.L12:
	movl	$10, %edi
	call	putchar@PLT
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$456, %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
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	movl	$32, %edi
	addq	$1, %r13
	call	putchar@PLT
	cmpl	%r13d, 28(%rsp)
	jg	.L13
	jmp	.L12
.L15:
	xorl	%r13d, %r13d
	leaq	32(%rsp), %rbx
	jmp	.L2
.L23:
	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(void) {
  int i, j, k, a[100], n, l, flag = 1, temp, count = 0;
  char buf[2];
  scanf("%d", &l);
  for (n = 0; n < l && (j = scanf("%d%1[\n]", a+n, buf)) == 1; n++) ;
  if (j == 2)
  n++;

  while (flag) {
    flag = 0;
    for (j = l - 1; j > 0; j--) {
      if (a[j] < a[j - 1]) {
        temp = a[j];
        a[j] = a[j - 1];
        a[j - 1] = temp;
        flag = 1;
        count++;
      }
    }
  }

    for (k = 0; k < l; k++) {
      printf("%d", a[k]);
      if (k < n - 1) {
        printf(" ");
      }
    }
    printf("\n");
    printf("%d\n", count);
    return 0;
  }


5
7 3 2 4 1
 6
5 1 4 6 1 3
 5
7 3 2 3 1
 6
6 1 4 6 1 3
 5
7 3 2 3 0
 6
6 1 3 6 1 3
 5
7 3 4 3 0
 6
8 1 3 6 1 3
 5
7 1 4 3 0
 6
8 1 3 6 2 3

1 2 3 4 7
8
 1 1 3 4 5 6
8
 1 2 3 3 7
8
 1 1 3 4 6 6
8
 0 2 3 3 7
8
 1 1 3 3 6 6
7
 0 3 3 4 7
8
 1 1 3 3 6 8
8
 0 1 3 4 7
8
 1 2 3 3 6 8
8

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(void) {
  int i, j, k, a[100], n, l, flag = 1, temp, count = 0;
  char buf[2];
  scanf("%d", &l);
  for (n = 0; n < l && (j = scanf("%d%1[\n]", a+n, buf)) == 1; n++) ;
  if (j == 2)
  n++;

  while (flag) {
    flag = 0;
    for (j = l - 1; j > 0; j--) {
      if (a[j] < a[j - 1]) {
        temp = a[j];
        a[j] = a[j - 1];
        a[j - 1] = temp;
        flag = 1;
        count++;
      }
    }
  }

    for (k = 0; k < l; k++) {
      printf("%d", a[k]);
      if (k < n - 1) {
        printf(" ");
      }
    }
    printf("\n");
    printf("%d\n", count);
    return 0;
  }

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%1[\n]"
.LC2:
	.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	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -428(%rbp)
	movl	$0, -424(%rbp)
	leaq	-444(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -432(%rbp)
	jmp	.L2
.L4:
	addl	$1, -432(%rbp)
.L2:
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jge	.L3
	movl	-432(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-416(%rbp), %rax
	leaq	(%rax,%rdx), %rcx
	leaq	-10(%rbp), %rax
	movq	%rax, %rdx
	movq	%rcx, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	%eax, -440(%rbp)
	cmpl	$1, -440(%rbp)
	je	.L4
.L3:
	cmpl	$2, -440(%rbp)
	jne	.L6
	addl	$1, -432(%rbp)
	jmp	.L6
.L10:
	movl	$0, -428(%rbp)
	movl	-444(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -440(%rbp)
	jmp	.L7
.L9:
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-440(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L8
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, -420(%rbp)
	movl	-440(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-440(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	movl	-440(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-420(%rbp), %edx
	movl	%edx, -416(%rbp,%rax,4)
	movl	$1, -428(%rbp)
	addl	$1, -424(%rbp)
.L8:
	subl	$1, -440(%rbp)
.L7:
	cmpl	$0, -440(%rbp)
	jg	.L9
.L6:
	cmpl	$0, -428(%rbp)
	jne	.L10
	movl	$0, -436(%rbp)
	jmp	.L11
.L13:
	movl	-436(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-432(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -436(%rbp)
	jge	.L12
	movl	$32, %edi
	call	putchar@PLT
.L12:
	addl	$1, -436(%rbp)
.L11:
	movl	-444(%rbp), %eax
	cmpl	%eax, -436(%rbp)
	jl	.L13
	movl	$10, %edi
	call	putchar@PLT
	movl	-424(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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%1[\n]"
.LC2:
	.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	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -428(%rbp)
	movl	$0, -424(%rbp)
	leaq	-444(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -432(%rbp)
	jmp	.L2
.L4:
	addl	$1, -432(%rbp)
.L2:
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jge	.L3
	movl	-432(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-416(%rbp), %rax
	leaq	(%rax,%rdx), %rcx
	leaq	-10(%rbp), %rax
	movq	%rax, %rdx
	movq	%rcx, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	%eax, -440(%rbp)
	cmpl	$1, -440(%rbp)
	je	.L4
.L3:
	cmpl	$2, -440(%rbp)
	jne	.L6
	addl	$1, -432(%rbp)
	jmp	.L6
.L10:
	movl	$0, -428(%rbp)
	movl	-444(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -440(%rbp)
	jmp	.L7
.L9:
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-440(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L8
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, -420(%rbp)
	movl	-440(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-440(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	movl	-440(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-420(%rbp), %edx
	movl	%edx, -416(%rbp,%rax,4)
	movl	$1, -428(%rbp)
	addl	$1, -424(%rbp)
.L8:
	subl	$1, -440(%rbp)
.L7:
	cmpl	$0, -440(%rbp)
	jg	.L9
.L6:
	cmpl	$0, -428(%rbp)
	jne	.L10
	movl	$0, -436(%rbp)
	jmp	.L11
.L13:
	movl	-436(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-432(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -436(%rbp)
	jge	.L12
	movl	$32, %edi
	call	putchar@PLT
.L12:
	addl	$1, -436(%rbp)
.L11:
	movl	-444(%rbp), %eax
	cmpl	%eax, -436(%rbp)
	jl	.L13
	movl	$10, %edi
	call	putchar@PLT
	movl	-424(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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:
