Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
/*
  AOJ 1186
  Title:Integral Rectangles
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
int table[20000];
int x,y,retx,rety;
void init()
{
  int i,j,t2;
  memset(table,0,sizeof(int)*20000);
  for(i=1;i<=150;i++)
    for(j=1;j<=150;j++)
      {
	t2=i*i+j*j;
	if(t2>20000)
	  break;
	table[t2]=-1;
      }
}
solve()
{
  int i,j,t,t2=x*x+y*y;

  //printf("x y t=%d %d %d\n",x,y,t2);

  if(table[t2])
    {
      for(i=x+1;i<=150;i++)
	for(j=i+1;j<=150;j++)
	  if(i*i+j*j==t2)
	    {
	      retx=i;
	      rety=j;
	      return;
	    }
    }
  for(t=t2+1;t<=20000;t++)
  if(table[t])
    {
      for(i=1;i<=150;i++)
	for(j=i+1;j<=150;j++)
	  if(i*i+j*j==t)
	    {
	      retx=i;
	      rety=j;
	      return;
	    }
    }
  //never reach    
}

main()
{
  init();
  while(scanf("%d %d",&x,&y) && (x || y))
    {
      solve();
      printf("%d %d\n",retx,rety);
    }
  return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	table
	.bss
	.align 32
	.type	table, @object
	.size	table, 80000
table:
	.zero	80000
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	y
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.globl	retx
	.align 4
	.type	retx, @object
	.size	retx, 4
retx:
	.zero	4
	.globl	rety
	.align 4
	.type	rety, @object
	.size	rety, 4
rety:
	.zero	4
	.text
	.globl	init
	.type	init, @function
init:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$80000, %edx
	movl	$0, %esi
	leaq	table(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -12(%rbp)
	jmp	.L2
.L7:
	movl	$1, -8(%rbp)
	jmp	.L3
.L6:
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$20000, -4(%rbp)
	jg	.L8
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	table(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L3:
	cmpl	$150, -8(%rbp)
	jle	.L6
	jmp	.L5
.L8:
	nop
.L5:
	addl	$1, -12(%rbp)
.L2:
	cmpl	$150, -12(%rbp)
	jle	.L7
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	init, .-init
	.globl	solve
	.type	solve, @function
solve:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	x(%rip), %edx
	movl	x(%rip), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	y(%rip), %edx
	movl	y(%rip), %eax
	imull	%edx, %eax
	addl	%ecx, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	table(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L10
	movl	x(%rip), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L11
.L16:
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L12
.L15:
	movl	-16(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	addl	%edx, %eax
	cmpl	%eax, -4(%rbp)
	jne	.L13
	movl	-16(%rbp), %eax
	movl	%eax, retx(%rip)
	movl	-12(%rbp), %eax
	movl	%eax, rety(%rip)
	jmp	.L14
.L13:
	addl	$1, -12(%rbp)
.L12:
	cmpl	$150, -12(%rbp)
	jle	.L15
	addl	$1, -16(%rbp)
.L11:
	cmpl	$150, -16(%rbp)
	jle	.L16
.L10:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L17
.L24:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	table(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L18
	movl	$1, -16(%rbp)
	jmp	.L19
.L23:
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L20
.L22:
	movl	-16(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	addl	%edx, %eax
	cmpl	%eax, -8(%rbp)
	jne	.L21
	movl	-16(%rbp), %eax
	movl	%eax, retx(%rip)
	movl	-12(%rbp), %eax
	movl	%eax, rety(%rip)
	jmp	.L14
.L21:
	addl	$1, -12(%rbp)
.L20:
	cmpl	$150, -12(%rbp)
	jle	.L22
	addl	$1, -16(%rbp)
.L19:
	cmpl	$150, -16(%rbp)
	jle	.L23
.L18:
	addl	$1, -8(%rbp)
.L17:
	cmpl	$20000, -8(%rbp)
	jle	.L24
.L14:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d %d\n"
.LC1:
	.string	"%d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, %eax
	call	init
	jmp	.L26
.L28:
	movl	$0, %eax
	call	solve
	movl	rety(%rip), %edx
	movl	retx(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L26:
	leaq	y(%rip), %rax
	movq	%rax, %rdx
	leaq	x(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L27
	movl	x(%rip), %eax
	testl	%eax, %eax
	jne	.L28
	movl	y(%rip), %eax
	testl	%eax, %eax
	jne	.L28
.L27:
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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
	.p2align 4
	.globl	init
	.type	init, @function
init:
.LFB35:
	.cfi_startproc
	endbr64
	leaq	table(%rip), %rdi
	xorl	%esi, %esi
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	movl	$80000, %edx
	call	memset@PLT
	movl	$1, %esi
	movq	%rax, %rdi
	.p2align 4,,10
	.p2align 3
.L2:
	movl	%esi, %ecx
	movl	$1, %edx
	imull	%esi, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	cltq
	addl	$1, %edx
	movl	$-1, (%rdi,%rax,4)
	cmpl	$151, %edx
	je	.L6
.L5:
	movl	%edx, %eax
	imull	%edx, %eax
	addl	%ecx, %eax
	cmpl	$20000, %eax
	jle	.L3
.L6:
	addl	$1, %esi
	cmpl	$151, %esi
	jne	.L2
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE35:
	.size	init, .-init
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB36:
	.cfi_startproc
	endbr64
	movl	x(%rip), %edi
	movl	y(%rip), %eax
	leaq	table(%rip), %r8
	movl	%edi, %ecx
	imull	%eax, %eax
	imull	%edi, %ecx
	addl	%eax, %ecx
	movslq	%ecx, %rax
	movl	(%r8,%rax,4), %edx
	testl	%edx, %edx
	je	.L13
	addl	$1, %edi
	cmpl	$150, %edi
	jg	.L13
.L18:
	leal	1(%rdi), %r9d
	cmpl	$150, %edi
	je	.L13
	movl	%edi, %esi
	movl	%r9d, %eax
	imull	%edi, %esi
	imull	%r9d, %eax
	addl	%esi, %eax
	cmpl	%eax, %ecx
	movl	%r9d, %eax
	jne	.L15
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L17:
	movl	%eax, %edx
	imull	%eax, %edx
	addl	%esi, %edx
	cmpl	%ecx, %edx
	je	.L14
.L15:
	addl	$1, %eax
	cmpl	$151, %eax
	jne	.L17
	movl	%r9d, %edi
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L13:
	addl	$1, %ecx
	cmpl	$20000, %ecx
	jg	.L16
	movslq	%ecx, %rcx
.L25:
	movl	(%r8,%rcx,4), %eax
	testl	%eax, %eax
	jne	.L39
.L20:
	addq	$1, %rcx
	cmpl	$20000, %ecx
	jle	.L25
.L16:
	ret
	.p2align 4,,10
	.p2align 3
.L39:
	movl	$2, %r9d
	movl	%ecx, %edi
.L19:
	leal	-1(%r9), %r10d
	movl	%r9d, %eax
	movl	%r10d, %esi
	imull	%r9d, %eax
	imull	%r10d, %esi
	addl	%esi, %eax
	cmpl	%ecx, %eax
	movl	%r9d, %eax
	jne	.L22
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L23:
	movl	%eax, %edx
	imull	%eax, %edx
	addl	%esi, %edx
	cmpl	%edi, %edx
	je	.L21
.L22:
	addl	$1, %eax
	cmpl	$151, %eax
	jne	.L23
	addl	$1, %r9d
	cmpl	$151, %r9d
	jne	.L19
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L21:
	movl	%r10d, retx(%rip)
	movl	%eax, rety(%rip)
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%edi, retx(%rip)
	movl	%eax, rety(%rip)
	ret
	.cfi_endproc
.LFE36:
	.size	solve, .-solve
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d\n"
.LC1:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xorl	%eax, %eax
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	y(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	x(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC1(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	init
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L48:
	movl	x(%rip), %eax
	orl	y(%rip), %eax
	je	.L42
	xorl	%eax, %eax
	call	solve
	movl	rety(%rip), %ecx
	movq	%r13, %rsi
	xorl	%eax, %eax
	movl	retx(%rip), %edx
	movl	$1, %edi
	call	__printf_chk@PLT
.L41:
	xorl	%eax, %eax
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	jne	.L48
.L42:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE37:
	.size	main, .-main
	.globl	rety
	.bss
	.align 4
	.type	rety, @object
	.size	rety, 4
rety:
	.zero	4
	.globl	retx
	.align 4
	.type	retx, @object
	.size	retx, 4
retx:
	.zero	4
	.globl	y
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	table
	.align 32
	.type	table, @object
	.size	table, 80000
table:
	.zero	80000
	.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
	.p2align 4
	.globl	init
	.type	init, @function
init:
.LFB35:
	.cfi_startproc
	endbr64
	leaq	table(%rip), %rdi
	xorl	%esi, %esi
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	movl	$80000, %edx
	call	memset@PLT
	movl	$1, %esi
	movq	%rax, %rdi
	.p2align 4,,10
	.p2align 3
.L2:
	movl	%esi, %ecx
	movl	$1, %edx
	imull	%esi, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	cltq
	addl	$1, %edx
	movl	$-1, (%rdi,%rax,4)
	cmpl	$151, %edx
	je	.L6
.L5:
	movl	%edx, %eax
	imull	%edx, %eax
	addl	%ecx, %eax
	cmpl	$20000, %eax
	jle	.L3
.L6:
	addl	$1, %esi
	cmpl	$151, %esi
	jne	.L2
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE35:
	.size	init, .-init
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB36:
	.cfi_startproc
	endbr64
	movl	x(%rip), %edi
	movl	y(%rip), %eax
	leaq	table(%rip), %r8
	movl	%edi, %ecx
	imull	%eax, %eax
	imull	%edi, %ecx
	addl	%eax, %ecx
	movslq	%ecx, %rax
	movl	(%r8,%rax,4), %edx
	testl	%edx, %edx
	je	.L13
	addl	$1, %edi
	cmpl	$150, %edi
	jg	.L13
.L18:
	leal	1(%rdi), %r9d
	cmpl	$150, %edi
	je	.L13
	movl	%edi, %esi
	movl	%r9d, %eax
	imull	%edi, %esi
	imull	%r9d, %eax
	addl	%esi, %eax
	cmpl	%eax, %ecx
	movl	%r9d, %eax
	jne	.L15
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L17:
	movl	%eax, %edx
	imull	%eax, %edx
	addl	%esi, %edx
	cmpl	%ecx, %edx
	je	.L14
.L15:
	addl	$1, %eax
	cmpl	$151, %eax
	jne	.L17
	movl	%r9d, %edi
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L13:
	addl	$1, %ecx
	cmpl	$20000, %ecx
	jg	.L16
	movslq	%ecx, %rcx
.L25:
	movl	(%r8,%rcx,4), %eax
	testl	%eax, %eax
	jne	.L39
.L20:
	addq	$1, %rcx
	cmpl	$20000, %ecx
	jle	.L25
.L16:
	ret
	.p2align 4,,10
	.p2align 3
.L39:
	movl	$2, %r9d
	movl	%ecx, %edi
.L19:
	leal	-1(%r9), %r10d
	movl	%r9d, %eax
	movl	%r10d, %esi
	imull	%r9d, %eax
	imull	%r10d, %esi
	addl	%esi, %eax
	cmpl	%ecx, %eax
	movl	%r9d, %eax
	jne	.L22
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L23:
	movl	%eax, %edx
	imull	%eax, %edx
	addl	%esi, %edx
	cmpl	%edi, %edx
	je	.L21
.L22:
	addl	$1, %eax
	cmpl	$151, %eax
	jne	.L23
	addl	$1, %r9d
	cmpl	$151, %r9d
	jne	.L19
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L21:
	movl	%r10d, retx(%rip)
	movl	%eax, rety(%rip)
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%edi, retx(%rip)
	movl	%eax, rety(%rip)
	ret
	.cfi_endproc
.LFE36:
	.size	solve, .-solve
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d\n"
.LC1:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xorl	%eax, %eax
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	y(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	x(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC1(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	init
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L48:
	movl	x(%rip), %eax
	orl	y(%rip), %eax
	je	.L42
	xorl	%eax, %eax
	call	solve
	movl	rety(%rip), %ecx
	movq	%r13, %rsi
	xorl	%eax, %eax
	movl	retx(%rip), %edx
	movl	$1, %edi
	call	__printf_chk@PLT
.L41:
	xorl	%eax, %eax
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	jne	.L48
.L42:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE37:
	.size	main, .-main
	.globl	rety
	.bss
	.align 4
	.type	rety, @object
	.size	rety, 4
rety:
	.zero	4
	.globl	retx
	.align 4
	.type	retx, @object
	.size	retx, 4
retx:
	.zero	4
	.globl	y
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	table
	.align 32
	.type	table, @object
	.size	table, 80000
table:
	.zero	80000
	.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:

/*
  AOJ 1186
  Title:Integral Rectangles
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
int table[20000];
int x,y,retx,rety;
void init()
{
  int i,j,t2;
  memset(table,0,sizeof(int)*20000);
  for(i=1;i<=150;i++)
    for(j=1;j<=150;j++)
      {
	t2=i*i+j*j;
	if(t2>20000)
	  break;
	table[t2]=-1;
      }
}
solve()
{
  int i,j,t,t2=x*x+y*y;

  //printf("x y t=%d %d %d\n",x,y,t2);

  if(table[t2])
    {
      for(i=x+1;i<=150;i++)
	for(j=i+1;j<=150;j++)
	  if(i*i+j*j==t2)
	    {
	      retx=i;
	      rety=j;
	      return;
	    }
    }
  for(t=t2+1;t<=20000;t++)
  if(table[t])
    {
      for(i=1;i<=150;i++)
	for(j=i+1;j<=150;j++)
	  if(i*i+j*j==t)
	    {
	      retx=i;
	      rety=j;
	      return;
	    }
    }
  //never reach    
}

main()
{
  init();
  while(scanf("%d %d",&x,&y) && (x || y))
    {
      solve();
      printf("%d %d\n",retx,rety);
    }
  return(0);
}
1 2
1 3
2 3
1 4
2 4
5 6
1 8
4 7
98 100
99 100
0 0

1 3
2 3
1 4
2 4
3 4
1 8
4 7
2 8
3 140
89 109

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
/*
  AOJ 1186
  Title:Integral Rectangles
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
int table[20000];
int x,y,retx,rety;
void init()
{
  int i,j,t2;
  memset(table,0,sizeof(int)*20000);
  for(i=1;i<=150;i++)
    for(j=1;j<=150;j++)
      {
	t2=i*i+j*j;
	if(t2>20000)
	  break;
	table[t2]=-1;
      }
}
solve()
{
  int i,j,t,t2=x*x+y*y;

  //printf("x y t=%d %d %d\n",x,y,t2);

  if(table[t2])
    {
      for(i=x+1;i<=150;i++)
	for(j=i+1;j<=150;j++)
	  if(i*i+j*j==t2)
	    {
	      retx=i;
	      rety=j;
	      return;
	    }
    }
  for(t=t2+1;t<=20000;t++)
  if(table[t])
    {
      for(i=1;i<=150;i++)
	for(j=i+1;j<=150;j++)
	  if(i*i+j*j==t)
	    {
	      retx=i;
	      rety=j;
	      return;
	    }
    }
  //never reach    
}

main()
{
  init();
  while(scanf("%d %d",&x,&y) && (x || y))
    {
      solve();
      printf("%d %d\n",retx,rety);
    }
  return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	table
	.bss
	.align 32
	.type	table, @object
	.size	table, 80000
table:
	.zero	80000
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	y
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.globl	retx
	.align 4
	.type	retx, @object
	.size	retx, 4
retx:
	.zero	4
	.globl	rety
	.align 4
	.type	rety, @object
	.size	rety, 4
rety:
	.zero	4
	.text
	.globl	init
	.type	init, @function
init:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$80000, %edx
	movl	$0, %esi
	leaq	table(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -12(%rbp)
	jmp	.L2
.L7:
	movl	$1, -8(%rbp)
	jmp	.L3
.L6:
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$20000, -4(%rbp)
	jg	.L8
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	table(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L3:
	cmpl	$150, -8(%rbp)
	jle	.L6
	jmp	.L5
.L8:
	nop
.L5:
	addl	$1, -12(%rbp)
.L2:
	cmpl	$150, -12(%rbp)
	jle	.L7
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	init, .-init
	.globl	solve
	.type	solve, @function
solve:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	x(%rip), %edx
	movl	x(%rip), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	y(%rip), %edx
	movl	y(%rip), %eax
	imull	%edx, %eax
	addl	%ecx, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	table(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L10
	movl	x(%rip), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L11
.L16:
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L12
.L15:
	movl	-16(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	addl	%edx, %eax
	cmpl	%eax, -4(%rbp)
	jne	.L13
	movl	-16(%rbp), %eax
	movl	%eax, retx(%rip)
	movl	-12(%rbp), %eax
	movl	%eax, rety(%rip)
	jmp	.L14
.L13:
	addl	$1, -12(%rbp)
.L12:
	cmpl	$150, -12(%rbp)
	jle	.L15
	addl	$1, -16(%rbp)
.L11:
	cmpl	$150, -16(%rbp)
	jle	.L16
.L10:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L17
.L24:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	table(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L18
	movl	$1, -16(%rbp)
	jmp	.L19
.L23:
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L20
.L22:
	movl	-16(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	addl	%edx, %eax
	cmpl	%eax, -8(%rbp)
	jne	.L21
	movl	-16(%rbp), %eax
	movl	%eax, retx(%rip)
	movl	-12(%rbp), %eax
	movl	%eax, rety(%rip)
	jmp	.L14
.L21:
	addl	$1, -12(%rbp)
.L20:
	cmpl	$150, -12(%rbp)
	jle	.L22
	addl	$1, -16(%rbp)
.L19:
	cmpl	$150, -16(%rbp)
	jle	.L23
.L18:
	addl	$1, -8(%rbp)
.L17:
	cmpl	$20000, -8(%rbp)
	jle	.L24
.L14:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d %d\n"
.LC1:
	.string	"%d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, %eax
	call	init
	jmp	.L26
.L28:
	movl	$0, %eax
	call	solve
	movl	rety(%rip), %edx
	movl	retx(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L26:
	leaq	y(%rip), %rax
	movq	%rax, %rdx
	leaq	x(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L27
	movl	x(%rip), %eax
	testl	%eax, %eax
	jne	.L28
	movl	y(%rip), %eax
	testl	%eax, %eax
	jne	.L28
.L27:
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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
	.globl	table
	.bss
	.align 32
	.type	table, @object
	.size	table, 80000
table:
	.zero	80000
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	y
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.globl	retx
	.align 4
	.type	retx, @object
	.size	retx, 4
retx:
	.zero	4
	.globl	rety
	.align 4
	.type	rety, @object
	.size	rety, 4
rety:
	.zero	4
	.text
	.globl	init
	.type	init, @function
init:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$80000, %edx
	movl	$0, %esi
	leaq	table(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -12(%rbp)
	jmp	.L2
.L7:
	movl	$1, -8(%rbp)
	jmp	.L3
.L6:
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$20000, -4(%rbp)
	jg	.L8
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	table(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L3:
	cmpl	$150, -8(%rbp)
	jle	.L6
	jmp	.L5
.L8:
	nop
.L5:
	addl	$1, -12(%rbp)
.L2:
	cmpl	$150, -12(%rbp)
	jle	.L7
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	init, .-init
	.globl	solve
	.type	solve, @function
solve:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	x(%rip), %edx
	movl	x(%rip), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	y(%rip), %edx
	movl	y(%rip), %eax
	imull	%edx, %eax
	addl	%ecx, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	table(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L10
	movl	x(%rip), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L11
.L16:
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L12
.L15:
	movl	-16(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	addl	%edx, %eax
	cmpl	%eax, -4(%rbp)
	jne	.L13
	movl	-16(%rbp), %eax
	movl	%eax, retx(%rip)
	movl	-12(%rbp), %eax
	movl	%eax, rety(%rip)
	jmp	.L14
.L13:
	addl	$1, -12(%rbp)
.L12:
	cmpl	$150, -12(%rbp)
	jle	.L15
	addl	$1, -16(%rbp)
.L11:
	cmpl	$150, -16(%rbp)
	jle	.L16
.L10:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L17
.L24:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	table(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L18
	movl	$1, -16(%rbp)
	jmp	.L19
.L23:
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L20
.L22:
	movl	-16(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	addl	%edx, %eax
	cmpl	%eax, -8(%rbp)
	jne	.L21
	movl	-16(%rbp), %eax
	movl	%eax, retx(%rip)
	movl	-12(%rbp), %eax
	movl	%eax, rety(%rip)
	jmp	.L14
.L21:
	addl	$1, -12(%rbp)
.L20:
	cmpl	$150, -12(%rbp)
	jle	.L22
	addl	$1, -16(%rbp)
.L19:
	cmpl	$150, -16(%rbp)
	jle	.L23
.L18:
	addl	$1, -8(%rbp)
.L17:
	cmpl	$20000, -8(%rbp)
	jle	.L24
.L14:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d %d\n"
.LC1:
	.string	"%d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, %eax
	call	init
	jmp	.L26
.L28:
	movl	$0, %eax
	call	solve
	movl	rety(%rip), %edx
	movl	retx(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L26:
	leaq	y(%rip), %rax
	movq	%rax, %rdx
	leaq	x(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L27
	movl	x(%rip), %eax
	testl	%eax, %eax
	jne	.L28
	movl	y(%rip), %eax
	testl	%eax, %eax
	jne	.L28
.L27:
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
