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>
#include <string.h>
#include <stdlib.h>
int main(void){
  int n;
  int ans = 0;
  int same = 0;
  long int  x[51], y[51];
  int p, q;

  scanf("%d", &n);

  for(int i = 1; i <= n; i++){
    scanf("%ld%ld", &x[i], &y[i]);
  }
  
  ans = n;
  if(n > 1){
    for(int i = 1; i <= n; i++){
      for(int j = 1; j <= n; j++){
	// p,qの全パターンを出す
	// （p, qの値が同じパターンもあるかもだが気にしない）
	if(i != j){
	  p = x[i] - x[j];
	  q = y[i] - y[j];
	}
	same = 0;
	for(int k = 1; k <= n; k++){
	  for(int l = 1; l <= n; l++){
	    // p, qで取れるものがあるか確認
	    if(k != l){
	      if(p == (x[k] - x[l]) && q == (y[k] - y[l])){
		same++;
	      }
	    }
	  }
	}
	if(ans > (n - same)){
	  ans = (n - same);
	}
      }
    }
  }
  /*
 // 数値を降順にソート
  for (int i=0; i< n*2-1; i++) {
    for (int j=i+1; j<n*2; j++) {
      if (L[i] > L[j]) {
        tmp =  L[i];
        L[i] = L[j];
        L[j] = tmp;
      }
    }
  }
*/

  printf("%d\n", ans);

  return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld%ld"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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	$888, %rsp
	.cfi_def_cfa_offset 944
	movq	%fs:40, %rax
	movq	%rax, 872(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L2
	movl	$8, %r12d
	movl	$1, %r13d
	leaq	464(%rsp), %rbp
	leaq	48(%rsp), %rbx
	leaq	.LC1(%rip), %r14
.L3:
	leaq	0(%rbp,%r12), %rdx
	leaq	(%rbx,%r12), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	addl	$1, %r13d
	addq	$8, %r12
	cmpl	%r13d, %eax
	jge	.L3
	movl	%eax, 12(%rsp)
	cmpl	$1, %eax
	jle	.L2
	leal	1(%rax), %edi
	movl	%eax, %r14d
	leaq	472(%rsp), %rax
	movl	$1, %r15d
	movq	%rax, 16(%rsp)
	leaq	56(%rsp), %rax
	movq	%rdi, %r12
	movq	%rax, 24(%rsp)
.L4:
	movl	$1, %r13d
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%r13d, %r15d
	je	.L5
	movq	(%rbx,%r15,8), %rax
	subl	(%rbx,%r13,8), %eax
	movl	%eax, 4(%rsp)
	movq	0(%rbp,%r15,8), %rax
	subl	0(%rbp,%r13,8), %eax
	movl	%eax, 8(%rsp)
.L5:
	movq	16(%rsp), %r10
	movq	24(%rsp), %rsi
	movl	$1, %ecx
	xorl	%r9d, %r9d
	movslq	4(%rsp), %r8
	movslq	8(%rsp), %r11
	.p2align 4,,10
	.p2align 3
.L6:
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%eax, %ecx
	je	.L7
	movq	(%rsi), %rdx
	subq	(%rbx,%rax,8), %rdx
	cmpq	%rdx, %r8
	jne	.L7
	movq	(%r10), %rdx
	subq	0(%rbp,%rax,8), %rdx
	cmpq	%rdx, %r11
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r9d
.L7:
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L8
	addl	$1, %ecx
	addq	$8, %r10
	addq	$8, %rsi
	cmpl	%r12d, %ecx
	jne	.L6
	movl	12(%rsp), %eax
	subl	%r9d, %eax
	cmpl	%eax, %r14d
	cmovg	%eax, %r14d
	addq	$1, %r13
	cmpq	%rdi, %r13
	jne	.L10
	addq	$1, %r15
	cmpq	%r15, %rdi
	jne	.L4
.L11:
	xorl	%eax, %eax
	movl	%r14d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	872(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$888, %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
.L2:
	.cfi_restore_state
	movl	12(%rsp), %r14d
	jmp	.L11
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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	"%ld%ld"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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	$888, %rsp
	.cfi_def_cfa_offset 944
	movq	%fs:40, %rax
	movq	%rax, 872(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L2
	movl	$8, %r12d
	movl	$1, %r13d
	leaq	464(%rsp), %rbp
	leaq	48(%rsp), %rbx
	leaq	.LC1(%rip), %r14
.L3:
	leaq	0(%rbp,%r12), %rdx
	leaq	(%rbx,%r12), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	addl	$1, %r13d
	addq	$8, %r12
	cmpl	%r13d, %eax
	jge	.L3
	movl	%eax, 12(%rsp)
	cmpl	$1, %eax
	jle	.L2
	leal	1(%rax), %edi
	movl	%eax, %r14d
	leaq	472(%rsp), %rax
	movl	$1, %r15d
	movq	%rax, 16(%rsp)
	leaq	56(%rsp), %rax
	movq	%rdi, %r12
	movq	%rax, 24(%rsp)
.L4:
	movl	$1, %r13d
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%r13d, %r15d
	je	.L5
	movq	(%rbx,%r15,8), %rax
	subl	(%rbx,%r13,8), %eax
	movl	%eax, 4(%rsp)
	movq	0(%rbp,%r15,8), %rax
	subl	0(%rbp,%r13,8), %eax
	movl	%eax, 8(%rsp)
.L5:
	movq	16(%rsp), %r10
	movq	24(%rsp), %rsi
	movl	$1, %ecx
	xorl	%r9d, %r9d
	movslq	4(%rsp), %r8
	movslq	8(%rsp), %r11
	.p2align 4,,10
	.p2align 3
.L6:
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%eax, %ecx
	je	.L7
	movq	(%rsi), %rdx
	subq	(%rbx,%rax,8), %rdx
	cmpq	%rdx, %r8
	jne	.L7
	movq	(%r10), %rdx
	subq	0(%rbp,%rax,8), %rdx
	cmpq	%rdx, %r11
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r9d
.L7:
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L8
	addl	$1, %ecx
	addq	$8, %r10
	addq	$8, %rsi
	cmpl	%r12d, %ecx
	jne	.L6
	movl	12(%rsp), %eax
	subl	%r9d, %eax
	cmpl	%eax, %r14d
	cmovg	%eax, %r14d
	addq	$1, %r13
	cmpq	%rdi, %r13
	jne	.L10
	addq	$1, %r15
	cmpq	%r15, %rdi
	jne	.L4
.L11:
	xorl	%eax, %eax
	movl	%r14d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	872(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$888, %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
.L2:
	.cfi_restore_state
	movl	12(%rsp), %r14d
	jmp	.L11
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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	"%ld%ld"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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	$888, %rsp
	.cfi_def_cfa_offset 944
	movq	%fs:40, %rax
	movq	%rax, 872(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L2
	movl	$8, %r12d
	movl	$1, %r13d
	leaq	464(%rsp), %rbp
	leaq	48(%rsp), %rbx
	leaq	.LC1(%rip), %r14
.L3:
	leaq	0(%rbp,%r12), %rdx
	leaq	(%rbx,%r12), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	addl	$1, %r13d
	addq	$8, %r12
	cmpl	%r13d, %eax
	jge	.L3
	movl	%eax, 12(%rsp)
	cmpl	$1, %eax
	jle	.L2
	leal	1(%rax), %edi
	movl	%eax, %r14d
	leaq	472(%rsp), %rax
	movl	$1, %r15d
	movq	%rax, 16(%rsp)
	leaq	56(%rsp), %rax
	movq	%rdi, %r12
	movq	%rax, 24(%rsp)
.L4:
	movl	$1, %r13d
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%r13d, %r15d
	je	.L5
	movq	(%rbx,%r15,8), %rax
	subl	(%rbx,%r13,8), %eax
	movl	%eax, 4(%rsp)
	movq	0(%rbp,%r15,8), %rax
	subl	0(%rbp,%r13,8), %eax
	movl	%eax, 8(%rsp)
.L5:
	movq	16(%rsp), %r10
	movq	24(%rsp), %rsi
	movl	$1, %ecx
	xorl	%r9d, %r9d
	movslq	4(%rsp), %r8
	movslq	8(%rsp), %r11
	.p2align 4,,10
	.p2align 3
.L6:
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%eax, %ecx
	je	.L7
	movq	(%rsi), %rdx
	subq	(%rbx,%rax,8), %rdx
	cmpq	%rdx, %r8
	jne	.L7
	movq	(%r10), %rdx
	subq	0(%rbp,%rax,8), %rdx
	cmpq	%rdx, %r11
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r9d
.L7:
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L8
	addl	$1, %ecx
	addq	$8, %r10
	addq	$8, %rsi
	cmpl	%r12d, %ecx
	jne	.L6
	movl	12(%rsp), %eax
	subl	%r9d, %eax
	cmpl	%eax, %r14d
	cmovg	%eax, %r14d
	addq	$1, %r13
	cmpq	%rdi, %r13
	jne	.L10
	addq	$1, %r15
	cmpq	%r15, %rdi
	jne	.L4
.L11:
	xorl	%eax, %eax
	movl	%r14d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	872(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$888, %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
.L2:
	.cfi_restore_state
	movl	12(%rsp), %r14d
	jmp	.L11
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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>
#include <string.h>
#include <stdlib.h>
int main(void){
  int n;
  int ans = 0;
  int same = 0;
  long int  x[51], y[51];
  int p, q;

  scanf("%d", &n);

  for(int i = 1; i <= n; i++){
    scanf("%ld%ld", &x[i], &y[i]);
  }
  
  ans = n;
  if(n > 1){
    for(int i = 1; i <= n; i++){
      for(int j = 1; j <= n; j++){
	// p,qの全パターンを出す
	// （p, qの値が同じパターンもあるかもだが気にしない）
	if(i != j){
	  p = x[i] - x[j];
	  q = y[i] - y[j];
	}
	same = 0;
	for(int k = 1; k <= n; k++){
	  for(int l = 1; l <= n; l++){
	    // p, qで取れるものがあるか確認
	    if(k != l){
	      if(p == (x[k] - x[l]) && q == (y[k] - y[l])){
		same++;
	      }
	    }
	  }
	}
	if(ans > (n - same)){
	  ans = (n - same);
	}
      }
    }
  }
  /*
 // 数値を降順にソート
  for (int i=0; i< n*2-1; i++) {
    for (int j=i+1; j<n*2; j++) {
      if (L[i] > L[j]) {
        tmp =  L[i];
        L[i] = L[j];
        L[j] = tmp;
      }
    }
  }
*/

  printf("%d\n", ans);

  return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void){
  int n;
  int ans = 0;
  int same = 0;
  long int  x[51], y[51];
  int p, q;

  scanf("%d", &n);

  for(int i = 1; i <= n; i++){
    scanf("%ld%ld", &x[i], &y[i]);
  }
  
  ans = n;
  if(n > 1){
    for(int i = 1; i <= n; i++){
      for(int j = 1; j <= n; j++){
	// p,qの全パターンを出す
	// （p, qの値が同じパターンもあるかもだが気にしない）
	if(i != j){
	  p = x[i] - x[j];
	  q = y[i] - y[j];
	}
	same = 0;
	for(int k = 1; k <= n; k++){
	  for(int l = 1; l <= n; l++){
	    // p, qで取れるものがあるか確認
	    if(k != l){
	      if(p == (x[k] - x[l]) && q == (y[k] - y[l])){
		same++;
	      }
	    }
	  }
	}
	if(ans > (n - same)){
	  ans = (n - same);
	}
      }
    }
  }
  /*
 // 数値を降順にソート
  for (int i=0; i< n*2-1; i++) {
    for (int j=i+1; j<n*2; j++) {
      if (L[i] > L[j]) {
        tmp =  L[i];
        L[i] = L[j];
        L[j] = tmp;
      }
    }
  }
*/

  printf("%d\n", ans);

  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 4
4 6
11 8
 2
1 2
2 2
 4
1 1
1 4
2 1
2 2
 3
1 4
4 6
11 3
 3
0 4
4 6
11 3
 3
-1 4
4 6
11 3
 3
-2 4
4 6
11 3
 3
-2 4
5 6
11 3
 3
-2 4
5 6
11 4
 3
-1 4
5 6
11 4

2
 1
 3
 2
 2
 2
 2
 2
 2
 2

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>
#include <string.h>
#include <stdlib.h>
int main(void){
  int n;
  int ans = 0;
  int same = 0;
  long int  x[51], y[51];
  int p, q;

  scanf("%d", &n);

  for(int i = 1; i <= n; i++){
    scanf("%ld%ld", &x[i], &y[i]);
  }
  
  ans = n;
  if(n > 1){
    for(int i = 1; i <= n; i++){
      for(int j = 1; j <= n; j++){
	// p,qの全パターンを出す
	// （p, qの値が同じパターンもあるかもだが気にしない）
	if(i != j){
	  p = x[i] - x[j];
	  q = y[i] - y[j];
	}
	same = 0;
	for(int k = 1; k <= n; k++){
	  for(int l = 1; l <= n; l++){
	    // p, qで取れるものがあるか確認
	    if(k != l){
	      if(p == (x[k] - x[l]) && q == (y[k] - y[l])){
		same++;
	      }
	    }
	  }
	}
	if(ans > (n - same)){
	  ans = (n - same);
	}
      }
    }
  }
  /*
 // 数値を降順にソート
  for (int i=0; i< n*2-1; i++) {
    for (int j=i+1; j<n*2; j++) {
      if (L[i] > L[j]) {
        tmp =  L[i];
        L[i] = L[j];
        L[j] = tmp;
      }
    }
  }
*/

  printf("%d\n", ans);

  return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld%ld"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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	$888, %rsp
	.cfi_def_cfa_offset 944
	movq	%fs:40, %rax
	movq	%rax, 872(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L2
	movl	$8, %r12d
	movl	$1, %r13d
	leaq	464(%rsp), %rbp
	leaq	48(%rsp), %rbx
	leaq	.LC1(%rip), %r14
.L3:
	leaq	0(%rbp,%r12), %rdx
	leaq	(%rbx,%r12), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	addl	$1, %r13d
	addq	$8, %r12
	cmpl	%r13d, %eax
	jge	.L3
	movl	%eax, 12(%rsp)
	cmpl	$1, %eax
	jle	.L2
	leal	1(%rax), %edi
	movl	%eax, %r14d
	leaq	472(%rsp), %rax
	movl	$1, %r15d
	movq	%rax, 16(%rsp)
	leaq	56(%rsp), %rax
	movq	%rdi, %r12
	movq	%rax, 24(%rsp)
.L4:
	movl	$1, %r13d
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%r13d, %r15d
	je	.L5
	movq	(%rbx,%r15,8), %rax
	subl	(%rbx,%r13,8), %eax
	movl	%eax, 4(%rsp)
	movq	0(%rbp,%r15,8), %rax
	subl	0(%rbp,%r13,8), %eax
	movl	%eax, 8(%rsp)
.L5:
	movq	16(%rsp), %r10
	movq	24(%rsp), %rsi
	movl	$1, %ecx
	xorl	%r9d, %r9d
	movslq	4(%rsp), %r8
	movslq	8(%rsp), %r11
	.p2align 4,,10
	.p2align 3
.L6:
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%eax, %ecx
	je	.L7
	movq	(%rsi), %rdx
	subq	(%rbx,%rax,8), %rdx
	cmpq	%rdx, %r8
	jne	.L7
	movq	(%r10), %rdx
	subq	0(%rbp,%rax,8), %rdx
	cmpq	%rdx, %r11
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r9d
.L7:
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L8
	addl	$1, %ecx
	addq	$8, %r10
	addq	$8, %rsi
	cmpl	%r12d, %ecx
	jne	.L6
	movl	12(%rsp), %eax
	subl	%r9d, %eax
	cmpl	%eax, %r14d
	cmovg	%eax, %r14d
	addq	$1, %r13
	cmpq	%rdi, %r13
	jne	.L10
	addq	$1, %r15
	cmpq	%r15, %rdi
	jne	.L4
.L11:
	xorl	%eax, %eax
	movl	%r14d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	872(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$888, %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
.L2:
	.cfi_restore_state
	movl	12(%rsp), %r14d
	jmp	.L11
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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	"%ld%ld"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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	$888, %rsp
	.cfi_def_cfa_offset 944
	movq	%fs:40, %rax
	movq	%rax, 872(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L2
	movl	$8, %r12d
	movl	$1, %r13d
	leaq	464(%rsp), %rbp
	leaq	48(%rsp), %rbx
	leaq	.LC1(%rip), %r14
.L3:
	leaq	0(%rbp,%r12), %rdx
	leaq	(%rbx,%r12), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	addl	$1, %r13d
	addq	$8, %r12
	cmpl	%r13d, %eax
	jge	.L3
	movl	%eax, 12(%rsp)
	cmpl	$1, %eax
	jle	.L2
	leal	1(%rax), %edi
	movl	%eax, %r14d
	leaq	472(%rsp), %rax
	movl	$1, %r15d
	movq	%rax, 16(%rsp)
	leaq	56(%rsp), %rax
	movq	%rdi, %r12
	movq	%rax, 24(%rsp)
.L4:
	movl	$1, %r13d
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%r13d, %r15d
	je	.L5
	movq	(%rbx,%r15,8), %rax
	subl	(%rbx,%r13,8), %eax
	movl	%eax, 4(%rsp)
	movq	0(%rbp,%r15,8), %rax
	subl	0(%rbp,%r13,8), %eax
	movl	%eax, 8(%rsp)
.L5:
	movq	16(%rsp), %r10
	movq	24(%rsp), %rsi
	movl	$1, %ecx
	xorl	%r9d, %r9d
	movslq	4(%rsp), %r8
	movslq	8(%rsp), %r11
	.p2align 4,,10
	.p2align 3
.L6:
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%eax, %ecx
	je	.L7
	movq	(%rsi), %rdx
	subq	(%rbx,%rax,8), %rdx
	cmpq	%rdx, %r8
	jne	.L7
	movq	(%r10), %rdx
	subq	0(%rbp,%rax,8), %rdx
	cmpq	%rdx, %r11
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r9d
.L7:
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L8
	addl	$1, %ecx
	addq	$8, %r10
	addq	$8, %rsi
	cmpl	%r12d, %ecx
	jne	.L6
	movl	12(%rsp), %eax
	subl	%r9d, %eax
	cmpl	%eax, %r14d
	cmovg	%eax, %r14d
	addq	$1, %r13
	cmpq	%rdi, %r13
	jne	.L10
	addq	$1, %r15
	cmpq	%r15, %rdi
	jne	.L4
.L11:
	xorl	%eax, %eax
	movl	%r14d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	872(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$888, %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
.L2:
	.cfi_restore_state
	movl	12(%rsp), %r14d
	jmp	.L11
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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:
```