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 n;
  int i;
  int dx, dy;
  int nx, ny;
  int maxdist2;
  int tx, ty;
  int temp;

  scanf("%d", &n);
  for(i = 0; i < n; i++) {
    nx = ny = 0;
    maxdist2 = -1;
    while(1) {
      scanf("%d %d", &dx, &dy);
      if(dx == 0 && dy == 0) break;
      nx += dx;
      ny += dy;
      temp = nx*nx + ny*ny;
      if(temp > maxdist2) {
	maxdist2 = temp;
	tx = nx;
	ty = ny;
      } else if(temp == maxdist2) {
	if(nx > tx) {
	  maxdist2 = temp;
	  tx = nx;
	  ty = ny;
	}
      }
    }
    printf("%d %d\n", tx, ty);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d %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	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -36(%rbp)
	jmp	.L2
.L8:
	movl	$0, -28(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	$-1, -24(%rbp)
.L7:
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	jne	.L3
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	je	.L12
.L3:
	movl	-44(%rbp), %eax
	addl	%eax, -32(%rbp)
	movl	-40(%rbp), %eax
	addl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	imull	%eax, %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L5
	movl	-12(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L7
.L5:
	movl	-12(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jne	.L7
	movl	-32(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L7
	movl	-12(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L7
.L12:
	nop
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -36(%rbp)
.L2:
	movl	-48(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L8
	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"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d %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
	leaq	.LC0(%rip), %rdi
	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
	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	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L3
	movl	$0, 12(%rsp)
	leaq	36(%rsp), %r15
	leaq	32(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L2:
	movl	$-1, %ebx
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r15, %rdx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	movq	%r14, %rsi
	call	__isoc99_scanf@PLT
	movl	32(%rsp), %edx
	movl	36(%rsp), %eax
	movl	%edx, %ecx
	orl	%eax, %ecx
	je	.L4
	addl	%edx, %r12d
	addl	%eax, %r13d
	movl	%r13d, %edx
	movl	%r12d, %eax
	imull	%r12d, %eax
	imull	%r13d, %edx
	addl	%edx, %eax
	cmpl	%eax, %ebx
	jl	.L10
	cmpl	%r12d, %ebp
	jge	.L7
	cmpl	%eax, %ebx
	sete	%al
	testb	%al, %al
	movl	8(%rsp), %eax
	cmovne	%r12d, %ebp
	cmovne	%r13d, %eax
	movl	%eax, 8(%rsp)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L10:
	movl	%r13d, 8(%rsp)
	movl	%r12d, %ebp
	movl	%eax, %ebx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	movl	8(%rsp), %ecx
	movl	%ebp, %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	addl	$1, 12(%rsp)
	movl	12(%rsp), %eax
	cmpl	%eax, 28(%rsp)
	jg	.L2
.L3:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	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
.L17:
	.cfi_restore_state
	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 %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
	leaq	.LC0(%rip), %rdi
	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
	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	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L3
	movl	$0, 12(%rsp)
	leaq	36(%rsp), %r15
	leaq	32(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L2:
	movl	$-1, %ebx
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r15, %rdx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	movq	%r14, %rsi
	call	__isoc99_scanf@PLT
	movl	32(%rsp), %edx
	movl	36(%rsp), %eax
	movl	%edx, %ecx
	orl	%eax, %ecx
	je	.L4
	addl	%edx, %r12d
	addl	%eax, %r13d
	movl	%r13d, %edx
	movl	%r12d, %eax
	imull	%r12d, %eax
	imull	%r13d, %edx
	addl	%edx, %eax
	cmpl	%eax, %ebx
	jl	.L10
	cmpl	%r12d, %ebp
	jge	.L7
	cmpl	%eax, %ebx
	sete	%al
	testb	%al, %al
	movl	8(%rsp), %eax
	cmovne	%r12d, %ebp
	cmovne	%r13d, %eax
	movl	%eax, 8(%rsp)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L10:
	movl	%r13d, 8(%rsp)
	movl	%r12d, %ebp
	movl	%eax, %ebx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	movl	8(%rsp), %ecx
	movl	%ebp, %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	addl	$1, 12(%rsp)
	movl	12(%rsp), %eax
	cmpl	%eax, 28(%rsp)
	jg	.L2
.L3:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	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
.L17:
	.cfi_restore_state
	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 n;
  int i;
  int dx, dy;
  int nx, ny;
  int maxdist2;
  int tx, ty;
  int temp;

  scanf("%d", &n);
  for(i = 0; i < n; i++) {
    nx = ny = 0;
    maxdist2 = -1;
    while(1) {
      scanf("%d %d", &dx, &dy);
      if(dx == 0 && dy == 0) break;
      nx += dx;
      ny += dy;
      temp = nx*nx + ny*ny;
      if(temp > maxdist2) {
	maxdist2 = temp;
	tx = nx;
	ty = ny;
      } else if(temp == maxdist2) {
	if(nx > tx) {
	  maxdist2 = temp;
	  tx = nx;
	  ty = ny;
	}
      }
    }
    printf("%d %d\n", tx, ty);
  }
  return 0;
}
3
1 0
0 1
-1 0
1 0
0 5
-1 0
0 -1
5 0
0 1
0 -1
1 0
0 -4
-3 0
0 3
0 0
0 -2
-1 0
0 1
0 -1
1 0
0 2
-2 0
0 -3
3 0
0 4
-4 0
0 -5
-2 0
0 0
1 0
-1 0
0 0
2 0
0 1
-1 0
0 1
-1 0
0 -2
0 0
 3
1 0
0 1
-1 0
1 0
0 5
-1 0
0 -1
5 0
0 1
0 -1
1 0
0 -4
-3 0
0 3
0 0
0 -2
-1 0
0 1
0 -1
1 0
0 1
-2 0
0 -3
3 0
0 4
-4 0
0 -5
-2 0
0 0
1 0
-1 0
0 0
2 0
0 1
-1 0
0 1
-1 0
0 -2
0 0
 3
1 0
0 1
-1 0
1 0
0 5
-1 0
0 -1
5 0
0 1
0 -1
1 0
0 -4
-3 0
0 3
2 0
0 -2
-1 0
0 1
0 -1
1 0
0 2
-2 0
0 -3
3 0
0 4
-4 0
0 -5
-2 0
0 0
1 0
-2 0
0 0
2 0
0 1
-1 0
0 1
-1 0
0 -2
0 0
 3
1 0
0 1
0 0
1 0
0 5
-1 0
0 -1
5 0
0 1
0 -1
1 0
0 -4
-3 0
0 3
0 0
0 -2
-1 0
0 1
0 -1
1 0
0 1
-2 0
0 -3
3 0
0 4
-4 0
0 -5
-2 0
0 0
1 0
-1 0
0 0
2 0
0 1
-1 0
0 1
-1 0
0 -2
0 0
 3
1 0
0 1
-1 0
1 0
0 5
-1 0
0 -1
5 0
0 1
0 -1
1 0
0 -4
-3 0
0 3
2 0
0 -2
-1 0
0 1
0 -1
1 0
0 2
-2 0
0 -3
3 0
0 4
-4 0
0 -5
-2 0
0 0
1 0
-3 0
0 0
2 0
0 1
-1 0
0 1
-1 0
0 -2
0 0
 3
1 0
0 1
0 0
1 0
0 4
-1 0
0 -1
5 0
0 1
0 -1
1 0
0 -4
-3 0
0 4
0 0
0 -2
-1 0
0 1
0 -1
1 0
0 1
-2 0
0 -3
3 0
0 4
-4 0
0 -5
-2 0
0 0
1 0
-1 0
0 0
2 0
0 1
-1 0
0 1
-1 0
0 -2
0 0
 3
1 0
0 1
-1 0
1 0
0 5
-1 0
0 -1
5 0
0 1
0 -2
1 0
0 -5
-3 0
0 3
2 0
0 -2
-2 0
0 1
0 -1
1 0
0 2
-2 0
0 -3
3 0
-1 4
-4 0
0 -5
-2 0
0 0
1 0
-3 0
0 0
2 0
0 1
-1 0
0 1
-1 0
0 -2
0 0
 3
1 0
0 1
-1 0
1 0
0 5
0 0
0 -1
5 0
0 1
0 -1
1 0
0 -4
-3 0
0 3
0 0
0 -2
-1 0
0 1
0 -1
1 0
0 1
-2 0
0 -3
3 0
0 4
-4 0
0 -5
-2 0
0 0
1 0
-1 0
0 0
2 0
0 1
-1 0
0 1
-1 0
0 -2
0 0
 3
1 0
0 1
0 0
1 0
0 5
-1 0
0 -1
5 0
0 1
0 -1
1 0
0 -4
-3 0
0 3
0 0
0 -2
-1 0
0 1
0 -1
1 0
0 1
-2 0
0 -3
4 0
0 4
-4 0
0 -5
-2 0
0 0
1 0
-1 0
0 0
2 0
0 1
-1 0
0 1
-1 0
0 -2
0 0
 3
1 0
0 1
-1 0
1 0
0 5
-1 0
0 -1
5 0
0 1
0 -1
1 0
0 -4
-3 0
0 3
2 0
0 -2
-1 0
0 1
0 -1
1 0
0 2
-1 0
0 -3
3 0
0 4
-4 0
0 -3
-2 0
0 0
1 0
-1 0
0 0
2 0
0 1
-1 0
0 1
-1 0
0 -2
0 0

6 5
-5 -4
1 0
 6 5
-5 -5
1 0
 6 5
1 0
2 1
 1 1
6 4
-5 -5
 6 5
-2 0
2 1
 1 1
6 3
-5 -5
 5 6
-2 0
2 1
 1 6
6 -5
-5 -5
 1 1
6 4
-4 -5
 7 5
1 0
2 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 n;
  int i;
  int dx, dy;
  int nx, ny;
  int maxdist2;
  int tx, ty;
  int temp;

  scanf("%d", &n);
  for(i = 0; i < n; i++) {
    nx = ny = 0;
    maxdist2 = -1;
    while(1) {
      scanf("%d %d", &dx, &dy);
      if(dx == 0 && dy == 0) break;
      nx += dx;
      ny += dy;
      temp = nx*nx + ny*ny;
      if(temp > maxdist2) {
	maxdist2 = temp;
	tx = nx;
	ty = ny;
      } else if(temp == maxdist2) {
	if(nx > tx) {
	  maxdist2 = temp;
	  tx = nx;
	  ty = ny;
	}
      }
    }
    printf("%d %d\n", tx, ty);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d %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	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -36(%rbp)
	jmp	.L2
.L8:
	movl	$0, -28(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	$-1, -24(%rbp)
.L7:
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	jne	.L3
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	je	.L12
.L3:
	movl	-44(%rbp), %eax
	addl	%eax, -32(%rbp)
	movl	-40(%rbp), %eax
	addl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	imull	%eax, %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L5
	movl	-12(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L7
.L5:
	movl	-12(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jne	.L7
	movl	-32(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L7
	movl	-12(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L7
.L12:
	nop
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -36(%rbp)
.L2:
	movl	-48(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L8
	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"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d %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	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -36(%rbp)
	jmp	.L2
.L8:
	movl	$0, -28(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	$-1, -24(%rbp)
.L7:
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	jne	.L3
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	je	.L12
.L3:
	movl	-44(%rbp), %eax
	addl	%eax, -32(%rbp)
	movl	-40(%rbp), %eax
	addl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	imull	%eax, %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L5
	movl	-12(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L7
.L5:
	movl	-12(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jne	.L7
	movl	-32(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L7
	movl	-12(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L7
.L12:
	nop
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -36(%rbp)
.L2:
	movl	-48(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L8
	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:
