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 dice[6],a,front,top;
    for(int i=0;i<6;i++){
        scanf("%d",&dice[i]);
    }
    scanf("%d",&a);
    int box,flg,cnt;
    for(int i=0;i<a;i++)
    {
        cnt = 0;
        flg = 0;
        scanf("%d %d",&front,&top);
        while(1)
        {
            if(dice[1]==front||4 < cnt){
                cnt = 0;
                box = dice[5];
                dice[5] = dice[2];
                dice[2] = dice[0];
                dice[0] = dice[3];
                dice[3] = box;
                if(dice[1]==front&&dice[0]==top) break;
            }else {
                cnt += 1;
                box = dice[5];
                dice[5] = dice[1];
                dice[1] = dice[0];
                dice[0] = dice[4];
                dice[4] = box;
            }
        }
        printf("%d\n",dice[3]);
    }
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -52(%rbp)
	jmp	.L2
.L3:
	leaq	-32(%rbp), %rdx
	movl	-52(%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, -52(%rbp)
.L2:
	cmpl	$5, -52(%rbp)
	jle	.L3
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -44(%rbp)
	jmp	.L4
.L11:
	movl	$0, -48(%rbp)
	movl	$0, -40(%rbp)
	leaq	-56(%rbp), %rdx
	leaq	-60(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L10:
	movl	-28(%rbp), %edx
	movl	-60(%rbp), %eax
	cmpl	%eax, %edx
	je	.L5
	cmpl	$4, -48(%rbp)
	jle	.L6
.L5:
	movl	$0, -48(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -36(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %edx
	movl	-60(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L15
	movl	-32(%rbp), %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L15
	jmp	.L14
.L6:
	addl	$1, -48(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -36(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L10
.L15:
	nop
	jmp	.L10
.L14:
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -44(%rbp)
.L4:
	movl	-64(%rbp), %eax
	cmpl	%eax, -44(%rbp)
	jl	.L11
	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 %d"
.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
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	40(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbx, %r12
	jne	.L2
	leaq	4(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L11
	xorl	%ebx, %ebx
	leaq	12(%rsp), %r14
	leaq	8(%rsp), %r13
	leaq	.LC1(%rip), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %ecx
	movl	36(%rsp), %edx
	xorl	%r9d, %r9d
	movl	8(%rsp), %r11d
	movl	24(%rsp), %r8d
	xorl	%r10d, %r10d
	movl	28(%rsp), %esi
	movl	16(%rsp), %eax
	movl	12(%rsp), %r15d
	movl	32(%rsp), %edi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L21:
	cmpl	$5, %r10d
	jne	.L4
	cmpl	%ecx, %r11d
	je	.L6
	movl	%edx, %r9d
	movl	$1, %r10d
	movl	%r8d, %edx
	movl	%eax, %r8d
	movl	%esi, %eax
	movl	%r9d, %esi
.L7:
	movl	%edx, %r9d
	movl	%ecx, %edx
	movl	%eax, %ecx
	movl	%edi, %eax
	movl	%r9d, %edi
	movl	$1, %r9d
.L9:
	cmpl	%ecx, %r11d
	jne	.L21
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L22:
	movl	%edx, %r10d
	movl	%r8d, %edx
	movl	%eax, %r8d
	movl	%esi, %eax
	movl	%r10d, %esi
.L6:
	cmpl	%esi, %r15d
	jne	.L22
	movl	%r8d, 36(%rsp)
	movl	%eax, 24(%rsp)
	movl	%r15d, 16(%rsp)
	movl	%edx, 28(%rsp)
	testb	%r9b, %r9b
	je	.L10
	movl	%edi, 32(%rsp)
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	%ecx, 20(%rsp)
	addl	$1, %ebx
	call	__printf_chk@PLT
	cmpl	4(%rsp), %ebx
	jl	.L3
.L11:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$56, %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
.L4:
	.cfi_restore_state
	addl	$1, %r10d
	jmp	.L7
.L10:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__printf_chk@PLT
	cmpl	%ebx, 4(%rsp)
	jg	.L3
	jmp	.L11
.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 %d"
.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
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	40(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbx, %r12
	jne	.L2
	leaq	4(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L11
	xorl	%ebx, %ebx
	leaq	12(%rsp), %r14
	leaq	8(%rsp), %r13
	leaq	.LC1(%rip), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %ecx
	movl	36(%rsp), %edx
	xorl	%r9d, %r9d
	movl	8(%rsp), %r11d
	movl	24(%rsp), %r8d
	xorl	%r10d, %r10d
	movl	28(%rsp), %esi
	movl	16(%rsp), %eax
	movl	12(%rsp), %r15d
	movl	32(%rsp), %edi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L21:
	cmpl	$5, %r10d
	jne	.L4
	cmpl	%ecx, %r11d
	je	.L6
	movl	%edx, %r9d
	movl	$1, %r10d
	movl	%r8d, %edx
	movl	%eax, %r8d
	movl	%esi, %eax
	movl	%r9d, %esi
.L7:
	movl	%edx, %r9d
	movl	%ecx, %edx
	movl	%eax, %ecx
	movl	%edi, %eax
	movl	%r9d, %edi
	movl	$1, %r9d
.L9:
	cmpl	%ecx, %r11d
	jne	.L21
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L22:
	movl	%edx, %r10d
	movl	%r8d, %edx
	movl	%eax, %r8d
	movl	%esi, %eax
	movl	%r10d, %esi
.L6:
	cmpl	%esi, %r15d
	jne	.L22
	movl	%r8d, 36(%rsp)
	movl	%eax, 24(%rsp)
	movl	%r15d, 16(%rsp)
	movl	%edx, 28(%rsp)
	testb	%r9b, %r9b
	je	.L10
	movl	%edi, 32(%rsp)
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	%ecx, 20(%rsp)
	addl	$1, %ebx
	call	__printf_chk@PLT
	cmpl	4(%rsp), %ebx
	jl	.L3
.L11:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$56, %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
.L4:
	.cfi_restore_state
	addl	$1, %r10d
	jmp	.L7
.L10:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__printf_chk@PLT
	cmpl	%ebx, 4(%rsp)
	jg	.L3
	jmp	.L11
.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()
{
    int dice[6],a,front,top;
    for(int i=0;i<6;i++){
        scanf("%d",&dice[i]);
    }
    scanf("%d",&a);
    int box,flg,cnt;
    for(int i=0;i<a;i++)
    {
        cnt = 0;
        flg = 0;
        scanf("%d %d",&front,&top);
        while(1)
        {
            if(dice[1]==front||4 < cnt){
                cnt = 0;
                box = dice[5];
                dice[5] = dice[2];
                dice[2] = dice[0];
                dice[0] = dice[3];
                dice[3] = box;
                if(dice[1]==front&&dice[0]==top) break;
            }else {
                cnt += 1;
                box = dice[5];
                dice[5] = dice[1];
                dice[1] = dice[0];
                dice[0] = dice[4];
                dice[4] = box;
            }
        }
        printf("%d\n",dice[3]);
    }
    return 0;
}

1 2 3 4 5 6
3
4 5
1 3
3 2
 1 2 3 4 5 6
3
4 5
1 3
6 2
 1 2 3 4 5 6
3
4 5
2 3
6 2
 1 2 3 4 5 6
3
6 5
2 3
6 2
 1 2 3 4 5 6
3
6 3
1 3
3 2
 1 2 3 4 5 6
3
4 2
1 3
3 2
 1 2 3 4 5 6
3
4 5
2 3
4 2
 1 2 3 4 5 6
3
6 5
2 6
6 2
 1 2 3 4 5 6
3
6 4
1 3
3 2
 1 2 3 4 5 6
3
4 5
1 4
6 2

6
5
6
 6
5
4
 6
1
4
 3
1
4
 2
5
6
 1
5
6
 6
1
1
 3
3
4
 5
5
6
 6
2
4

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 dice[6],a,front,top;
    for(int i=0;i<6;i++){
        scanf("%d",&dice[i]);
    }
    scanf("%d",&a);
    int box,flg,cnt;
    for(int i=0;i<a;i++)
    {
        cnt = 0;
        flg = 0;
        scanf("%d %d",&front,&top);
        while(1)
        {
            if(dice[1]==front||4 < cnt){
                cnt = 0;
                box = dice[5];
                dice[5] = dice[2];
                dice[2] = dice[0];
                dice[0] = dice[3];
                dice[3] = box;
                if(dice[1]==front&&dice[0]==top) break;
            }else {
                cnt += 1;
                box = dice[5];
                dice[5] = dice[1];
                dice[1] = dice[0];
                dice[0] = dice[4];
                dice[4] = box;
            }
        }
        printf("%d\n",dice[3]);
    }
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -52(%rbp)
	jmp	.L2
.L3:
	leaq	-32(%rbp), %rdx
	movl	-52(%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, -52(%rbp)
.L2:
	cmpl	$5, -52(%rbp)
	jle	.L3
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -44(%rbp)
	jmp	.L4
.L11:
	movl	$0, -48(%rbp)
	movl	$0, -40(%rbp)
	leaq	-56(%rbp), %rdx
	leaq	-60(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L10:
	movl	-28(%rbp), %edx
	movl	-60(%rbp), %eax
	cmpl	%eax, %edx
	je	.L5
	cmpl	$4, -48(%rbp)
	jle	.L6
.L5:
	movl	$0, -48(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -36(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %edx
	movl	-60(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L15
	movl	-32(%rbp), %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L15
	jmp	.L14
.L6:
	addl	$1, -48(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -36(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L10
.L15:
	nop
	jmp	.L10
.L14:
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -44(%rbp)
.L4:
	movl	-64(%rbp), %eax
	cmpl	%eax, -44(%rbp)
	jl	.L11
	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 %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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -52(%rbp)
	jmp	.L2
.L3:
	leaq	-32(%rbp), %rdx
	movl	-52(%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, -52(%rbp)
.L2:
	cmpl	$5, -52(%rbp)
	jle	.L3
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -44(%rbp)
	jmp	.L4
.L11:
	movl	$0, -48(%rbp)
	movl	$0, -40(%rbp)
	leaq	-56(%rbp), %rdx
	leaq	-60(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L10:
	movl	-28(%rbp), %edx
	movl	-60(%rbp), %eax
	cmpl	%eax, %edx
	je	.L5
	cmpl	$4, -48(%rbp)
	jle	.L6
.L5:
	movl	$0, -48(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -36(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %edx
	movl	-60(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L15
	movl	-32(%rbp), %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L15
	jmp	.L14
.L6:
	addl	$1, -48(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -36(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L10
.L15:
	nop
	jmp	.L10
.L14:
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -44(%rbp)
.L4:
	movl	-64(%rbp), %eax
	cmpl	%eax, -44(%rbp)
	jl	.L11
	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:
