Given the following C code and 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;
}```

Assembly Code:

```assembly
	.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:
```

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.
Optimized Assembly Code:

user
```assembly
	.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
```assembly
	.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:
```
```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;
}```
Given the following C 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;
}```

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.
Optimized Assembly Code:

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 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;
}```

Assembly Code:

```assembly
	.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:
```

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.
Optimized Assembly Code:

train
```assembly
	.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:
```