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 i,j;
    int minj;
    int N;
    int count=0;
    int temp;
    int data[110];
    int flag = 0;

    scanf("%d",&N);

    for(i = 0; i < N; ++i){
        scanf("%d", &data[i]);
    }

    for(i = 0; i < N ; ++i){
        minj = i;
        flag = 0;
        for(j = i ; j < N ; ++j) {
            if (data[minj] > data[j]) {
                minj = j;
                flag = 1;
            }
        }
        if(flag == 1) {
            temp = data[i];
            data[i] = data[minj];
            data[minj] = temp;
            count++;
        }
    }
    for(i = 0; i < N-1; ++i){
        printf("%d ",data[i]);
    }
    printf("%d",data[N-1]);
    putchar('\n');
    printf("%d\n",count);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d "
.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	$480, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -460(%rbp)
	movl	$0, -456(%rbp)
	leaq	-476(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -472(%rbp)
	jmp	.L2
.L3:
	leaq	-448(%rbp), %rdx
	movl	-472(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -472(%rbp)
.L2:
	movl	-476(%rbp), %eax
	cmpl	%eax, -472(%rbp)
	jl	.L3
	movl	$0, -472(%rbp)
	jmp	.L4
.L9:
	movl	-472(%rbp), %eax
	movl	%eax, -464(%rbp)
	movl	$0, -456(%rbp)
	movl	-472(%rbp), %eax
	movl	%eax, -468(%rbp)
	jmp	.L5
.L7:
	movl	-464(%rbp), %eax
	cltq
	movl	-448(%rbp,%rax,4), %edx
	movl	-468(%rbp), %eax
	cltq
	movl	-448(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L6
	movl	-468(%rbp), %eax
	movl	%eax, -464(%rbp)
	movl	$1, -456(%rbp)
.L6:
	addl	$1, -468(%rbp)
.L5:
	movl	-476(%rbp), %eax
	cmpl	%eax, -468(%rbp)
	jl	.L7
	cmpl	$1, -456(%rbp)
	jne	.L8
	movl	-472(%rbp), %eax
	cltq
	movl	-448(%rbp,%rax,4), %eax
	movl	%eax, -452(%rbp)
	movl	-464(%rbp), %eax
	cltq
	movl	-448(%rbp,%rax,4), %edx
	movl	-472(%rbp), %eax
	cltq
	movl	%edx, -448(%rbp,%rax,4)
	movl	-464(%rbp), %eax
	cltq
	movl	-452(%rbp), %edx
	movl	%edx, -448(%rbp,%rax,4)
	addl	$1, -460(%rbp)
.L8:
	addl	$1, -472(%rbp)
.L4:
	movl	-476(%rbp), %eax
	cmpl	%eax, -472(%rbp)
	jl	.L9
	movl	$0, -472(%rbp)
	jmp	.L10
.L11:
	movl	-472(%rbp), %eax
	cltq
	movl	-448(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -472(%rbp)
.L10:
	movl	-476(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -472(%rbp)
	jl	.L11
	movl	-476(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-448(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$10, %edi
	call	putchar@PLT
	movl	-460(%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	.L13
	call	__stack_chk_fail@PLT
.L13:
	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 "
.LC2:
	.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
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rbp, %rdi
	subq	$464, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 456(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L12
	leaq	16(%rsp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$4, %r13
	cmpl	%r12d, %ecx
	jg	.L3
	testl	%ecx, %ecx
	jle	.L12
	movslq	%ecx, %r11
	xorl	%edi, %edi
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%rbx,%rdi,4), %r10d
	movslq	%edi, %r8
	movq	%rdi, %rax
	xorl	%r9d, %r9d
	movl	%r10d, %esi
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rbx,%rax,4), %edx
	cmpl	%esi, %edx
	jge	.L4
	movl	%edx, %esi
	movslq	%eax, %r8
	movl	$1, %r9d
.L4:
	addq	$1, %rax
	cmpl	%eax, %ecx
	jg	.L5
	cmpl	$1, %r9d
	jne	.L6
	movl	%esi, (%rbx,%rdi,4)
	addl	$1, %r12d
	movl	%r10d, 16(%rsp,%r8,4)
.L6:
	addq	$1, %rdi
	cmpq	%r11, %rdi
	jne	.L7
.L2:
	subl	$1, %ecx
	testl	%ecx, %ecx
	jle	.L8
	xorl	%r13d, %r13d
	leaq	16(%rsp), %rbx
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rbx,%r13,4), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %r13
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	leal	-1(%rax), %ecx
	cmpl	%r13d, %ecx
	jg	.L9
.L8:
	movslq	%ecx, %rcx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	16(%rsp,%rcx,4), %edx
	call	__printf_chk@PLT
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	456(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$464, %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
.L12:
	.cfi_restore_state
	xorl	%r12d, %r12d
	jmp	.L2
.L19:
	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 "
.LC2:
	.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
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rbp, %rdi
	subq	$464, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 456(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L12
	leaq	16(%rsp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$4, %r13
	cmpl	%r12d, %ecx
	jg	.L3
	testl	%ecx, %ecx
	jle	.L12
	movslq	%ecx, %r11
	xorl	%edi, %edi
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%rbx,%rdi,4), %r10d
	movslq	%edi, %r8
	movq	%rdi, %rax
	xorl	%r9d, %r9d
	movl	%r10d, %esi
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rbx,%rax,4), %edx
	cmpl	%esi, %edx
	jge	.L4
	movl	%edx, %esi
	movslq	%eax, %r8
	movl	$1, %r9d
.L4:
	addq	$1, %rax
	cmpl	%eax, %ecx
	jg	.L5
	cmpl	$1, %r9d
	jne	.L6
	movl	%esi, (%rbx,%rdi,4)
	addl	$1, %r12d
	movl	%r10d, 16(%rsp,%r8,4)
.L6:
	addq	$1, %rdi
	cmpq	%r11, %rdi
	jne	.L7
.L2:
	subl	$1, %ecx
	testl	%ecx, %ecx
	jle	.L8
	xorl	%r13d, %r13d
	leaq	16(%rsp), %rbx
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rbx,%r13,4), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %r13
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	leal	-1(%rax), %ecx
	cmpl	%r13d, %ecx
	jg	.L9
.L8:
	movslq	%ecx, %rcx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	16(%rsp,%rcx,4), %edx
	call	__printf_chk@PLT
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	456(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$464, %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
.L12:
	.cfi_restore_state
	xorl	%r12d, %r12d
	jmp	.L2
.L19:
	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 i,j;
    int minj;
    int N;
    int count=0;
    int temp;
    int data[110];
    int flag = 0;

    scanf("%d",&N);

    for(i = 0; i < N; ++i){
        scanf("%d", &data[i]);
    }

    for(i = 0; i < N ; ++i){
        minj = i;
        flag = 0;
        for(j = i ; j < N ; ++j) {
            if (data[minj] > data[j]) {
                minj = j;
                flag = 1;
            }
        }
        if(flag == 1) {
            temp = data[i];
            data[i] = data[minj];
            data[minj] = temp;
            count++;
        }
    }
    for(i = 0; i < N-1; ++i){
        printf("%d ",data[i]);
    }
    printf("%d",data[N-1]);
    putchar('\n');
    printf("%d\n",count);
    return 0;
}

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

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

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 i,j;
    int minj;
    int N;
    int count=0;
    int temp;
    int data[110];
    int flag = 0;

    scanf("%d",&N);

    for(i = 0; i < N; ++i){
        scanf("%d", &data[i]);
    }

    for(i = 0; i < N ; ++i){
        minj = i;
        flag = 0;
        for(j = i ; j < N ; ++j) {
            if (data[minj] > data[j]) {
                minj = j;
                flag = 1;
            }
        }
        if(flag == 1) {
            temp = data[i];
            data[i] = data[minj];
            data[minj] = temp;
            count++;
        }
    }
    for(i = 0; i < N-1; ++i){
        printf("%d ",data[i]);
    }
    printf("%d",data[N-1]);
    putchar('\n');
    printf("%d\n",count);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d "
.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	$480, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -460(%rbp)
	movl	$0, -456(%rbp)
	leaq	-476(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -472(%rbp)
	jmp	.L2
.L3:
	leaq	-448(%rbp), %rdx
	movl	-472(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -472(%rbp)
.L2:
	movl	-476(%rbp), %eax
	cmpl	%eax, -472(%rbp)
	jl	.L3
	movl	$0, -472(%rbp)
	jmp	.L4
.L9:
	movl	-472(%rbp), %eax
	movl	%eax, -464(%rbp)
	movl	$0, -456(%rbp)
	movl	-472(%rbp), %eax
	movl	%eax, -468(%rbp)
	jmp	.L5
.L7:
	movl	-464(%rbp), %eax
	cltq
	movl	-448(%rbp,%rax,4), %edx
	movl	-468(%rbp), %eax
	cltq
	movl	-448(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L6
	movl	-468(%rbp), %eax
	movl	%eax, -464(%rbp)
	movl	$1, -456(%rbp)
.L6:
	addl	$1, -468(%rbp)
.L5:
	movl	-476(%rbp), %eax
	cmpl	%eax, -468(%rbp)
	jl	.L7
	cmpl	$1, -456(%rbp)
	jne	.L8
	movl	-472(%rbp), %eax
	cltq
	movl	-448(%rbp,%rax,4), %eax
	movl	%eax, -452(%rbp)
	movl	-464(%rbp), %eax
	cltq
	movl	-448(%rbp,%rax,4), %edx
	movl	-472(%rbp), %eax
	cltq
	movl	%edx, -448(%rbp,%rax,4)
	movl	-464(%rbp), %eax
	cltq
	movl	-452(%rbp), %edx
	movl	%edx, -448(%rbp,%rax,4)
	addl	$1, -460(%rbp)
.L8:
	addl	$1, -472(%rbp)
.L4:
	movl	-476(%rbp), %eax
	cmpl	%eax, -472(%rbp)
	jl	.L9
	movl	$0, -472(%rbp)
	jmp	.L10
.L11:
	movl	-472(%rbp), %eax
	cltq
	movl	-448(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -472(%rbp)
.L10:
	movl	-476(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -472(%rbp)
	jl	.L11
	movl	-476(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-448(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$10, %edi
	call	putchar@PLT
	movl	-460(%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	.L13
	call	__stack_chk_fail@PLT
.L13:
	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 "
.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	$480, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -460(%rbp)
	movl	$0, -456(%rbp)
	leaq	-476(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -472(%rbp)
	jmp	.L2
.L3:
	leaq	-448(%rbp), %rdx
	movl	-472(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -472(%rbp)
.L2:
	movl	-476(%rbp), %eax
	cmpl	%eax, -472(%rbp)
	jl	.L3
	movl	$0, -472(%rbp)
	jmp	.L4
.L9:
	movl	-472(%rbp), %eax
	movl	%eax, -464(%rbp)
	movl	$0, -456(%rbp)
	movl	-472(%rbp), %eax
	movl	%eax, -468(%rbp)
	jmp	.L5
.L7:
	movl	-464(%rbp), %eax
	cltq
	movl	-448(%rbp,%rax,4), %edx
	movl	-468(%rbp), %eax
	cltq
	movl	-448(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L6
	movl	-468(%rbp), %eax
	movl	%eax, -464(%rbp)
	movl	$1, -456(%rbp)
.L6:
	addl	$1, -468(%rbp)
.L5:
	movl	-476(%rbp), %eax
	cmpl	%eax, -468(%rbp)
	jl	.L7
	cmpl	$1, -456(%rbp)
	jne	.L8
	movl	-472(%rbp), %eax
	cltq
	movl	-448(%rbp,%rax,4), %eax
	movl	%eax, -452(%rbp)
	movl	-464(%rbp), %eax
	cltq
	movl	-448(%rbp,%rax,4), %edx
	movl	-472(%rbp), %eax
	cltq
	movl	%edx, -448(%rbp,%rax,4)
	movl	-464(%rbp), %eax
	cltq
	movl	-452(%rbp), %edx
	movl	%edx, -448(%rbp,%rax,4)
	addl	$1, -460(%rbp)
.L8:
	addl	$1, -472(%rbp)
.L4:
	movl	-476(%rbp), %eax
	cmpl	%eax, -472(%rbp)
	jl	.L9
	movl	$0, -472(%rbp)
	jmp	.L10
.L11:
	movl	-472(%rbp), %eax
	cltq
	movl	-448(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -472(%rbp)
.L10:
	movl	-476(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -472(%rbp)
	jl	.L11
	movl	-476(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-448(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$10, %edi
	call	putchar@PLT
	movl	-460(%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	.L13
	call	__stack_chk_fail@PLT
.L13:
	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:
