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 x, y;
        scanf("%d %d", &x, &y);

        int tx=0, ty=0, a=1, b=1, ans=0;
        while(1){
                if(tx==x && ty==y) break;

                b += a;
                tx += b-1;
                ans++;
                if(tx-a<x && x<=tx && ty<=y && y<ty+a) break;

                a += b;
                ty += a-1;
                ans++;
                if(tx-b<x && x<=tx && ty-b<y && y<=ty) break;

                b += a;
                tx -= b-1;
                ans++;
                if(tx<=x && x<tx+a && ty-a<y && y<=ty) break;

                a += b;
                ty -= a-1;
                ans++;
                if(tx<=x && x<tx+b && ty<=y && y<ty+b) break;
        }

        printf("%d\n", ans%3+1);
        return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -28(%rbp)
	movl	$0, -24(%rbp)
	movl	$1, -20(%rbp)
	movl	$1, -16(%rbp)
	movl	$0, -12(%rbp)
.L8:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jne	.L2
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	je	.L11
.L2:
	movl	-20(%rbp), %eax
	addl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	subl	$1, %eax
	addl	%eax, -28(%rbp)
	addl	$1, -12(%rbp)
	movl	-28(%rbp), %eax
	subl	-20(%rbp), %eax
	movl	%eax, %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L4
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jg	.L4
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L12
.L4:
	movl	-16(%rbp), %eax
	addl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	subl	$1, %eax
	addl	%eax, -24(%rbp)
	addl	$1, -12(%rbp)
	movl	-28(%rbp), %eax
	subl	-16(%rbp), %eax
	movl	%eax, %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L5
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L5
	movl	-24(%rbp), %eax
	subl	-16(%rbp), %eax
	movl	%eax, %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L5
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L13
.L5:
	movl	-20(%rbp), %eax
	addl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	subl	$1, %eax
	subl	%eax, -28(%rbp)
	addl	$1, -12(%rbp)
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jg	.L6
	movl	-28(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L6
	movl	-24(%rbp), %eax
	subl	-20(%rbp), %eax
	movl	%eax, %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L6
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L14
.L6:
	movl	-16(%rbp), %eax
	addl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	subl	$1, %eax
	subl	%eax, -24(%rbp)
	addl	$1, -12(%rbp)
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jg	.L8
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L8
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jg	.L8
	movl	-24(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L15
	jmp	.L8
.L11:
	nop
	jmp	.L3
.L12:
	nop
	jmp	.L3
.L13:
	nop
	jmp	.L3
.L14:
	nop
	jmp	.L3
.L15:
	nop
.L3:
	movl	-12(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %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	.L10
	call	__stack_chk_fail@PLT
.L10:
	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 %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %esi
	movl	4(%rsp), %r11d
	xorl	%edi, %edi
	movl	$4, %r8d
	movl	$1, %edx
	movl	$1, %ecx
	xorl	%eax, %eax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L43:
	leal	(%rcx,%rax), %r9d
	cmpl	%r9d, %esi
	jge	.L8
	movl	%edi, %r9d
	subl	%ecx, %r9d
	cmpl	%r9d, %r11d
	jle	.L8
	cmpl	%edi, %r11d
	jle	.L39
.L8:
	addl	%edx, %ecx
	leal	(%rdx,%rax), %r10d
	leal	-1(%rcx), %r9d
	subl	%r9d, %edi
	movl	%r8d, %r9d
	cmpl	%r10d, %esi
	jge	.L9
	cmpl	%edi, %r11d
	jl	.L9
	leal	(%rdx,%rdi), %r10d
	cmpl	%r10d, %r11d
	jl	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$4, %r8d
.L2:
	leal	-4(%r8), %r9d
	cmpl	%eax, %esi
	je	.L40
.L3:
	addl	%ecx, %edx
	leal	-1(%rax,%rdx), %eax
	cmpl	%eax, %esi
	movl	%eax, %r10d
	setle	%r9b
	subl	%ecx, %r10d
	cmpl	%r10d, %esi
	jle	.L5
	testb	%r9b, %r9b
	jne	.L41
.L5:
	movl	%eax, %r10d
	addl	%edx, %ecx
	subl	%edx, %r10d
	leal	-1(%rdi,%rcx), %edi
	cmpl	%r10d, %esi
	jle	.L6
	testb	%r9b, %r9b
	jne	.L42
.L6:
	addl	%ecx, %edx
	leal	-1(%rdx), %r9d
	subl	%r9d, %eax
	cmpl	%eax, %esi
	jge	.L43
	addl	%edx, %ecx
	leal	-1(%rcx), %r9d
	subl	%r9d, %edi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L40:
	cmpl	%edi, %r11d
	jne	.L3
.L4:
	movl	%r9d, %eax
	movl	$2863311531, %edx
	movl	$1, %edi
	imulq	%rdx, %rax
	leaq	.LC1(%rip), %rsi
	shrq	$33, %rax
	leal	(%rax,%rax,2), %eax
	subl	%eax, %r9d
	xorl	%eax, %eax
	leal	1(%r9), %edx
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L41:
	.cfi_restore_state
	cmpl	%edi, %r11d
	jl	.L5
	leal	(%rdi,%rcx), %r10d
	cmpl	%r10d, %r11d
	jge	.L5
	leal	-3(%r8), %r9d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L42:
	movl	%edi, %r9d
	subl	%edx, %r9d
	cmpl	%r9d, %r11d
	jle	.L6
	cmpl	%edi, %r11d
	jg	.L6
	leal	-2(%r8), %r9d
	jmp	.L4
.L39:
	leal	-1(%r8), %r9d
	jmp	.L4
.L44:
	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 %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %esi
	movl	4(%rsp), %r11d
	xorl	%edi, %edi
	movl	$4, %r8d
	movl	$1, %edx
	movl	$1, %ecx
	xorl	%eax, %eax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L43:
	leal	(%rcx,%rax), %r9d
	cmpl	%r9d, %esi
	jge	.L8
	movl	%edi, %r9d
	subl	%ecx, %r9d
	cmpl	%r9d, %r11d
	jle	.L8
	cmpl	%edi, %r11d
	jle	.L39
.L8:
	addl	%edx, %ecx
	leal	(%rdx,%rax), %r10d
	leal	-1(%rcx), %r9d
	subl	%r9d, %edi
	movl	%r8d, %r9d
	cmpl	%r10d, %esi
	jge	.L9
	cmpl	%edi, %r11d
	jl	.L9
	leal	(%rdx,%rdi), %r10d
	cmpl	%r10d, %r11d
	jl	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$4, %r8d
.L2:
	leal	-4(%r8), %r9d
	cmpl	%eax, %esi
	je	.L40
.L3:
	addl	%ecx, %edx
	leal	-1(%rax,%rdx), %eax
	cmpl	%eax, %esi
	movl	%eax, %r10d
	setle	%r9b
	subl	%ecx, %r10d
	cmpl	%r10d, %esi
	jle	.L5
	testb	%r9b, %r9b
	jne	.L41
.L5:
	movl	%eax, %r10d
	addl	%edx, %ecx
	subl	%edx, %r10d
	leal	-1(%rdi,%rcx), %edi
	cmpl	%r10d, %esi
	jle	.L6
	testb	%r9b, %r9b
	jne	.L42
.L6:
	addl	%ecx, %edx
	leal	-1(%rdx), %r9d
	subl	%r9d, %eax
	cmpl	%eax, %esi
	jge	.L43
	addl	%edx, %ecx
	leal	-1(%rcx), %r9d
	subl	%r9d, %edi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L40:
	cmpl	%edi, %r11d
	jne	.L3
.L4:
	movl	%r9d, %eax
	movl	$2863311531, %edx
	movl	$1, %edi
	imulq	%rdx, %rax
	leaq	.LC1(%rip), %rsi
	shrq	$33, %rax
	leal	(%rax,%rax,2), %eax
	subl	%eax, %r9d
	xorl	%eax, %eax
	leal	1(%r9), %edx
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L41:
	.cfi_restore_state
	cmpl	%edi, %r11d
	jl	.L5
	leal	(%rdi,%rcx), %r10d
	cmpl	%r10d, %r11d
	jge	.L5
	leal	-3(%r8), %r9d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L42:
	movl	%edi, %r9d
	subl	%edx, %r9d
	cmpl	%r9d, %r11d
	jle	.L6
	cmpl	%edi, %r11d
	jg	.L6
	leal	-2(%r8), %r9d
	jmp	.L4
.L39:
	leal	-1(%r8), %r9d
	jmp	.L4
.L44:
	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 x, y;
        scanf("%d %d", &x, &y);

        int tx=0, ty=0, a=1, b=1, ans=0;
        while(1){
                if(tx==x && ty==y) break;

                b += a;
                tx += b-1;
                ans++;
                if(tx-a<x && x<=tx && ty<=y && y<ty+a) break;

                a += b;
                ty += a-1;
                ans++;
                if(tx-b<x && x<=tx && ty-b<y && y<=ty) break;

                b += a;
                tx -= b-1;
                ans++;
                if(tx<=x && x<tx+a && ty-a<y && y<=ty) break;

                a += b;
                ty -= a-1;
                ans++;
                if(tx<=x && x<tx+b && ty<=y && y<ty+b) break;
        }

        printf("%d\n", ans%3+1);
        return 0;
}

0 0

1

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 x, y;
        scanf("%d %d", &x, &y);

        int tx=0, ty=0, a=1, b=1, ans=0;
        while(1){
                if(tx==x && ty==y) break;

                b += a;
                tx += b-1;
                ans++;
                if(tx-a<x && x<=tx && ty<=y && y<ty+a) break;

                a += b;
                ty += a-1;
                ans++;
                if(tx-b<x && x<=tx && ty-b<y && y<=ty) break;

                b += a;
                tx -= b-1;
                ans++;
                if(tx<=x && x<tx+a && ty-a<y && y<=ty) break;

                a += b;
                ty -= a-1;
                ans++;
                if(tx<=x && x<tx+b && ty<=y && y<ty+b) break;
        }

        printf("%d\n", ans%3+1);
        return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -28(%rbp)
	movl	$0, -24(%rbp)
	movl	$1, -20(%rbp)
	movl	$1, -16(%rbp)
	movl	$0, -12(%rbp)
.L8:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jne	.L2
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	je	.L11
.L2:
	movl	-20(%rbp), %eax
	addl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	subl	$1, %eax
	addl	%eax, -28(%rbp)
	addl	$1, -12(%rbp)
	movl	-28(%rbp), %eax
	subl	-20(%rbp), %eax
	movl	%eax, %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L4
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jg	.L4
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L12
.L4:
	movl	-16(%rbp), %eax
	addl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	subl	$1, %eax
	addl	%eax, -24(%rbp)
	addl	$1, -12(%rbp)
	movl	-28(%rbp), %eax
	subl	-16(%rbp), %eax
	movl	%eax, %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L5
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L5
	movl	-24(%rbp), %eax
	subl	-16(%rbp), %eax
	movl	%eax, %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L5
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L13
.L5:
	movl	-20(%rbp), %eax
	addl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	subl	$1, %eax
	subl	%eax, -28(%rbp)
	addl	$1, -12(%rbp)
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jg	.L6
	movl	-28(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L6
	movl	-24(%rbp), %eax
	subl	-20(%rbp), %eax
	movl	%eax, %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L6
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L14
.L6:
	movl	-16(%rbp), %eax
	addl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	subl	$1, %eax
	subl	%eax, -24(%rbp)
	addl	$1, -12(%rbp)
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jg	.L8
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L8
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jg	.L8
	movl	-24(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L15
	jmp	.L8
.L11:
	nop
	jmp	.L3
.L12:
	nop
	jmp	.L3
.L13:
	nop
	jmp	.L3
.L14:
	nop
	jmp	.L3
.L15:
	nop
.L3:
	movl	-12(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %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	.L10
	call	__stack_chk_fail@PLT
.L10:
	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 %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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -28(%rbp)
	movl	$0, -24(%rbp)
	movl	$1, -20(%rbp)
	movl	$1, -16(%rbp)
	movl	$0, -12(%rbp)
.L8:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jne	.L2
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	je	.L11
.L2:
	movl	-20(%rbp), %eax
	addl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	subl	$1, %eax
	addl	%eax, -28(%rbp)
	addl	$1, -12(%rbp)
	movl	-28(%rbp), %eax
	subl	-20(%rbp), %eax
	movl	%eax, %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L4
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jg	.L4
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L12
.L4:
	movl	-16(%rbp), %eax
	addl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	subl	$1, %eax
	addl	%eax, -24(%rbp)
	addl	$1, -12(%rbp)
	movl	-28(%rbp), %eax
	subl	-16(%rbp), %eax
	movl	%eax, %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L5
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L5
	movl	-24(%rbp), %eax
	subl	-16(%rbp), %eax
	movl	%eax, %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L5
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L13
.L5:
	movl	-20(%rbp), %eax
	addl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	subl	$1, %eax
	subl	%eax, -28(%rbp)
	addl	$1, -12(%rbp)
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jg	.L6
	movl	-28(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L6
	movl	-24(%rbp), %eax
	subl	-20(%rbp), %eax
	movl	%eax, %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L6
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L14
.L6:
	movl	-16(%rbp), %eax
	addl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	subl	$1, %eax
	subl	%eax, -24(%rbp)
	addl	$1, -12(%rbp)
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jg	.L8
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L8
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jg	.L8
	movl	-24(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L15
	jmp	.L8
.L11:
	nop
	jmp	.L3
.L12:
	nop
	jmp	.L3
.L13:
	nop
	jmp	.L3
.L14:
	nop
	jmp	.L3
.L15:
	nop
.L3:
	movl	-12(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %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	.L10
	call	__stack_chk_fail@PLT
.L10:
	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:
