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>
#include <stdlib.h>

int getCost(int N, int *x, int *y, int p, int q) {
  int c = 1;
  if (N == 1) return c;
  if (N == 2) {
    return c;
  }else {
    for (int i = 0; i < N; i++) {
      for (int j = 0; j < N; j++) {
	if ((x[i]-x[j] == p) && (y[i]-y[j] == q) && i != j) {
	  c++;
	}
      }
    }
    c--; // c = 0;
    return N-c;
  }
}

int main() {
  int N,p,q;
  scanf("%d", &N);
  int x[N];
  int y[N];
  for (int i = 0; i < N; i++) {
    int px,py;
    scanf("%d %d", &px, &py);
    x[i] = px;
    y[i] = py;
  }
  int c;
  if (N == 1) {
    c = 1;
  }else {
    c = N-1;
  }
  for( int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      if (i != j) {
	p = x[i]-x[j];
	q = y[i]-y[j];
	int pc = getCost(N, x, y, p, q);
	if ( c > pc) c = pc;
      }
    }
  }
  printf("%d", c);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	getCost
	.type	getCost, @function
getCost:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movl	%ecx, -24(%rbp)
	movl	%r8d, -44(%rbp)
	movl	$1, -12(%rbp)
	cmpl	$1, -20(%rbp)
	jne	.L2
	movl	-12(%rbp), %eax
	jmp	.L3
.L2:
	cmpl	$2, -20(%rbp)
	jne	.L4
	movl	-12(%rbp), %eax
	jmp	.L3
.L4:
	movl	$0, -8(%rbp)
	jmp	.L5
.L9:
	movl	$0, -4(%rbp)
	jmp	.L6
.L8:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	subl	%edx, %eax
	cmpl	%eax, -24(%rbp)
	jne	.L7
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	subl	%edx, %eax
	cmpl	%eax, -44(%rbp)
	jne	.L7
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	je	.L7
	addl	$1, -12(%rbp)
.L7:
	addl	$1, -4(%rbp)
.L6:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L8
	addl	$1, -8(%rbp)
.L5:
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L9
	subl	$1, -12(%rbp)
	movl	-20(%rbp), %eax
	subl	-12(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	getCost, .-getCost
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-128(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L11:
	cmpq	%rdx, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L13
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L13:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-128(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L14:
	cmpq	%rdx, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L16
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L16:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L17
.L18:
	leaq	-120(%rbp), %rdx
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-124(%rbp), %ecx
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movl	-120(%rbp), %ecx
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -116(%rbp)
.L17:
	movl	-128(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L18
	movl	-128(%rbp), %eax
	cmpl	$1, %eax
	jne	.L19
	movl	$1, -112(%rbp)
	jmp	.L20
.L19:
	movl	-128(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -112(%rbp)
.L20:
	movl	$0, -108(%rbp)
	jmp	.L21
.L25:
	movl	$0, -104(%rbp)
	jmp	.L22
.L24:
	movl	-108(%rbp), %eax
	cmpl	-104(%rbp), %eax
	je	.L23
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-80(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, -100(%rbp)
	movq	-64(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, -96(%rbp)
	movl	-128(%rbp), %eax
	movl	-96(%rbp), %edi
	movl	-100(%rbp), %ecx
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rsi
	movl	%edi, %r8d
	movl	%eax, %edi
	call	getCost
	movl	%eax, -92(%rbp)
	movl	-112(%rbp), %eax
	cmpl	-92(%rbp), %eax
	jle	.L23
	movl	-92(%rbp), %eax
	movl	%eax, -112(%rbp)
.L23:
	addl	$1, -104(%rbp)
.L22:
	movl	-128(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L24
	addl	$1, -108(%rbp)
.L21:
	movl	-128(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L25
	movl	-112(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	getCost
	.type	getCost, @function
getCost:
.LFB39:
	.cfi_startproc
	endbr64
	movl	%ecx, %r9d
	leal	-1(%rdi), %ecx
	movl	$1, %eax
	cmpl	$1, %ecx
	jbe	.L18
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%edi, %r11d
	xorl	%r10d, %r10d
	movl	$1, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%edi, %eax
	movq	%rdx, %rbx
	testl	%edi, %edi
	jle	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%rsi,%r10,4), %edi
	xorl	%eax, %eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	1(%rax), %rdx
	cmpq	%rax, %rcx
	je	.L22
.L9:
	movq	%rdx, %rax
.L6:
	movl	%edi, %edx
	subl	(%rsi,%rax,4), %edx
	cmpl	%edx, %r9d
	jne	.L5
	movl	(%rbx,%r10,4), %edx
	subl	(%rbx,%rax,4), %edx
	cmpl	%r8d, %edx
	jne	.L5
	cmpl	%eax, %r10d
	setne	%dl
	cmpb	$1, %dl
	leaq	1(%rax), %rdx
	sbbl	$-1, %ebp
	cmpq	%rax, %rcx
	jne	.L9
.L22:
	leaq	1(%r10), %rax
	cmpq	%r10, %rcx
	je	.L23
	movq	%rax, %r10
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L23:
	subl	$1, %ebp
	movl	%r11d, %eax
	subl	%ebp, %eax
.L1:
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE39:
	.size	getCost, .-getCost
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-68(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-68(%rbp), %rax
	movq	%rsp, %rcx
	movq	%rax, %r12
	leaq	15(,%rax,4), %rax
	movq	%rax, %rsi
	movq	%rax, %rdx
	andq	$-4096, %rsi
	andq	$-16, %rdx
	subq	%rsi, %rcx
	cmpq	%rcx, %rsp
	je	.L26
.L63:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L63
.L26:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L64
.L27:
	movq	%rax, %rdx
	movq	%rsp, %rcx
	andq	$-4096, %rax
	movq	%rsp, %rbx
	andq	$-16, %rdx
	subq	%rax, %rcx
.L28:
	cmpq	%rcx, %rsp
	je	.L29
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L28
.L64:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L27
.L29:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L65
.L30:
	movq	%rsp, %r15
	testl	%r12d, %r12d
	jle	.L31
	xorl	%r12d, %r12d
	leaq	-60(%rbp), %r14
	leaq	-64(%rbp), %r13
.L32:
	movq	%r14, %rdx
	movq	%r13, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-64(%rbp), %eax
	movl	-68(%rbp), %ecx
	movl	%eax, (%rbx,%r12,4)
	movl	-60(%rbp), %eax
	movl	%eax, (%r15,%r12,4)
	addq	$1, %r12
	cmpl	%r12d, %ecx
	jg	.L32
	cmpl	$1, %ecx
	je	.L44
	leal	-1(%rcx), %r14d
	movl	%r14d, %r12d
	testl	%ecx, %ecx
	jle	.L34
.L33:
	xorl	%r13d, %r13d
.L42:
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L41:
	cmpl	%r11d, %r13d
	je	.L35
	movl	$1, %eax
	cmpl	$1, %r14d
	jbe	.L36
	movl	(%rbx,%r13,4), %r8d
	movl	(%r15,%r13,4), %r10d
	xorl	%edi, %edi
	movl	$1, %r9d
	subl	(%rbx,%r11,4), %r8d
	subl	(%r15,%r11,4), %r10d
	.p2align 4,,10
	.p2align 3
.L37:
	movl	(%rbx,%rdi,4), %esi
	xorl	%eax, %eax
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L38:
	addq	$1, %rax
	cmpl	%eax, %ecx
	jle	.L66
.L39:
	movl	%esi, %edx
	subl	(%rbx,%rax,4), %edx
	cmpl	%edx, %r8d
	jne	.L38
	movl	(%r15,%rdi,4), %edx
	subl	(%r15,%rax,4), %edx
	cmpl	%r10d, %edx
	jne	.L38
	cmpl	%eax, %edi
	setne	%dl
	cmpb	$1, %dl
	sbbl	$-1, %r9d
	addq	$1, %rax
	cmpl	%eax, %ecx
	jg	.L39
.L66:
	addq	$1, %rdi
	cmpl	%edi, %ecx
	jg	.L37
	subl	$1, %r9d
	movl	%ecx, %eax
	subl	%r9d, %eax
.L36:
	cmpl	%eax, %r12d
	cmovg	%eax, %r12d
.L35:
	addq	$1, %r11
	cmpl	%r11d, %ecx
	jg	.L41
	addq	$1, %r13
	cmpl	%r13d, %ecx
	jg	.L42
.L34:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC0(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L67
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L44:
	.cfi_restore_state
	movl	$1, %r12d
	xorl	%r14d, %r14d
	jmp	.L33
.L31:
	subl	$1, %r12d
	jmp	.L34
.L65:
	orq	$0, -8(%rsp,%rax)
	jmp	.L30
.L67:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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
	.p2align 4
	.globl	getCost
	.type	getCost, @function
getCost:
.LFB39:
	.cfi_startproc
	endbr64
	movl	%ecx, %r9d
	leal	-1(%rdi), %ecx
	movl	$1, %eax
	cmpl	$1, %ecx
	jbe	.L18
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%edi, %r11d
	xorl	%r10d, %r10d
	movl	$1, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%edi, %eax
	movq	%rdx, %rbx
	testl	%edi, %edi
	jle	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%rsi,%r10,4), %edi
	xorl	%eax, %eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	1(%rax), %rdx
	cmpq	%rax, %rcx
	je	.L22
.L9:
	movq	%rdx, %rax
.L6:
	movl	%edi, %edx
	subl	(%rsi,%rax,4), %edx
	cmpl	%edx, %r9d
	jne	.L5
	movl	(%rbx,%r10,4), %edx
	subl	(%rbx,%rax,4), %edx
	cmpl	%r8d, %edx
	jne	.L5
	cmpl	%eax, %r10d
	setne	%dl
	cmpb	$1, %dl
	leaq	1(%rax), %rdx
	sbbl	$-1, %ebp
	cmpq	%rax, %rcx
	jne	.L9
.L22:
	leaq	1(%r10), %rax
	cmpq	%r10, %rcx
	je	.L23
	movq	%rax, %r10
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L23:
	subl	$1, %ebp
	movl	%r11d, %eax
	subl	%ebp, %eax
.L1:
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE39:
	.size	getCost, .-getCost
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-68(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-68(%rbp), %rax
	movq	%rsp, %rcx
	movq	%rax, %r12
	leaq	15(,%rax,4), %rax
	movq	%rax, %rsi
	movq	%rax, %rdx
	andq	$-4096, %rsi
	andq	$-16, %rdx
	subq	%rsi, %rcx
	cmpq	%rcx, %rsp
	je	.L26
.L63:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L63
.L26:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L64
.L27:
	movq	%rax, %rdx
	movq	%rsp, %rcx
	andq	$-4096, %rax
	movq	%rsp, %rbx
	andq	$-16, %rdx
	subq	%rax, %rcx
.L28:
	cmpq	%rcx, %rsp
	je	.L29
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L28
.L64:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L27
.L29:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L65
.L30:
	movq	%rsp, %r15
	testl	%r12d, %r12d
	jle	.L31
	xorl	%r12d, %r12d
	leaq	-60(%rbp), %r14
	leaq	-64(%rbp), %r13
.L32:
	movq	%r14, %rdx
	movq	%r13, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-64(%rbp), %eax
	movl	-68(%rbp), %ecx
	movl	%eax, (%rbx,%r12,4)
	movl	-60(%rbp), %eax
	movl	%eax, (%r15,%r12,4)
	addq	$1, %r12
	cmpl	%r12d, %ecx
	jg	.L32
	cmpl	$1, %ecx
	je	.L44
	leal	-1(%rcx), %r14d
	movl	%r14d, %r12d
	testl	%ecx, %ecx
	jle	.L34
.L33:
	xorl	%r13d, %r13d
.L42:
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L41:
	cmpl	%r11d, %r13d
	je	.L35
	movl	$1, %eax
	cmpl	$1, %r14d
	jbe	.L36
	movl	(%rbx,%r13,4), %r8d
	movl	(%r15,%r13,4), %r10d
	xorl	%edi, %edi
	movl	$1, %r9d
	subl	(%rbx,%r11,4), %r8d
	subl	(%r15,%r11,4), %r10d
	.p2align 4,,10
	.p2align 3
.L37:
	movl	(%rbx,%rdi,4), %esi
	xorl	%eax, %eax
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L38:
	addq	$1, %rax
	cmpl	%eax, %ecx
	jle	.L66
.L39:
	movl	%esi, %edx
	subl	(%rbx,%rax,4), %edx
	cmpl	%edx, %r8d
	jne	.L38
	movl	(%r15,%rdi,4), %edx
	subl	(%r15,%rax,4), %edx
	cmpl	%r10d, %edx
	jne	.L38
	cmpl	%eax, %edi
	setne	%dl
	cmpb	$1, %dl
	sbbl	$-1, %r9d
	addq	$1, %rax
	cmpl	%eax, %ecx
	jg	.L39
.L66:
	addq	$1, %rdi
	cmpl	%edi, %ecx
	jg	.L37
	subl	$1, %r9d
	movl	%ecx, %eax
	subl	%r9d, %eax
.L36:
	cmpl	%eax, %r12d
	cmovg	%eax, %r12d
.L35:
	addq	$1, %r11
	cmpl	%r11d, %ecx
	jg	.L41
	addq	$1, %r13
	cmpl	%r13d, %ecx
	jg	.L42
.L34:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC0(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L67
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L44:
	.cfi_restore_state
	movl	$1, %r12d
	xorl	%r14d, %r14d
	jmp	.L33
.L31:
	subl	$1, %r12d
	jmp	.L34
.L65:
	orq	$0, -8(%rsp,%rax)
	jmp	.L30
.L67:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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>
#include <stdlib.h>

int getCost(int N, int *x, int *y, int p, int q) {
  int c = 1;
  if (N == 1) return c;
  if (N == 2) {
    return c;
  }else {
    for (int i = 0; i < N; i++) {
      for (int j = 0; j < N; j++) {
	if ((x[i]-x[j] == p) && (y[i]-y[j] == q) && i != j) {
	  c++;
	}
      }
    }
    c--; // c = 0;
    return N-c;
  }
}

int main() {
  int N,p,q;
  scanf("%d", &N);
  int x[N];
  int y[N];
  for (int i = 0; i < N; i++) {
    int px,py;
    scanf("%d %d", &px, &py);
    x[i] = px;
    y[i] = py;
  }
  int c;
  if (N == 1) {
    c = 1;
  }else {
    c = N-1;
  }
  for( int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      if (i != j) {
	p = x[i]-x[j];
	q = y[i]-y[j];
	int pc = getCost(N, x, y, p, q);
	if ( c > pc) c = pc;
      }
    }
  }
  printf("%d", c);
  return 0;
}

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 unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>

int getCost(int N, int *x, int *y, int p, int q) {
  int c = 1;
  if (N == 1) return c;
  if (N == 2) {
    return c;
  }else {
    for (int i = 0; i < N; i++) {
      for (int j = 0; j < N; j++) {
	if ((x[i]-x[j] == p) && (y[i]-y[j] == q) && i != j) {
	  c++;
	}
      }
    }
    c--; // c = 0;
    return N-c;
  }
}

int main() {
  int N,p,q;
  scanf("%d", &N);
  int x[N];
  int y[N];
  for (int i = 0; i < N; i++) {
    int px,py;
    scanf("%d %d", &px, &py);
    x[i] = px;
    y[i] = py;
  }
  int c;
  if (N == 1) {
    c = 1;
  }else {
    c = N-1;
  }
  for( int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      if (i != j) {
	p = x[i]-x[j];
	q = y[i]-y[j];
	int pc = getCost(N, x, y, p, q);
	if ( c > pc) c = pc;
      }
    }
  }
  printf("%d", c);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	getCost
	.type	getCost, @function
getCost:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movl	%ecx, -24(%rbp)
	movl	%r8d, -44(%rbp)
	movl	$1, -12(%rbp)
	cmpl	$1, -20(%rbp)
	jne	.L2
	movl	-12(%rbp), %eax
	jmp	.L3
.L2:
	cmpl	$2, -20(%rbp)
	jne	.L4
	movl	-12(%rbp), %eax
	jmp	.L3
.L4:
	movl	$0, -8(%rbp)
	jmp	.L5
.L9:
	movl	$0, -4(%rbp)
	jmp	.L6
.L8:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	subl	%edx, %eax
	cmpl	%eax, -24(%rbp)
	jne	.L7
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	subl	%edx, %eax
	cmpl	%eax, -44(%rbp)
	jne	.L7
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	je	.L7
	addl	$1, -12(%rbp)
.L7:
	addl	$1, -4(%rbp)
.L6:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L8
	addl	$1, -8(%rbp)
.L5:
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L9
	subl	$1, -12(%rbp)
	movl	-20(%rbp), %eax
	subl	-12(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	getCost, .-getCost
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-128(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L11:
	cmpq	%rdx, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L13
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L13:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-128(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L14:
	cmpq	%rdx, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L16
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L16:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L17
.L18:
	leaq	-120(%rbp), %rdx
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-124(%rbp), %ecx
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movl	-120(%rbp), %ecx
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -116(%rbp)
.L17:
	movl	-128(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L18
	movl	-128(%rbp), %eax
	cmpl	$1, %eax
	jne	.L19
	movl	$1, -112(%rbp)
	jmp	.L20
.L19:
	movl	-128(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -112(%rbp)
.L20:
	movl	$0, -108(%rbp)
	jmp	.L21
.L25:
	movl	$0, -104(%rbp)
	jmp	.L22
.L24:
	movl	-108(%rbp), %eax
	cmpl	-104(%rbp), %eax
	je	.L23
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-80(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, -100(%rbp)
	movq	-64(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, -96(%rbp)
	movl	-128(%rbp), %eax
	movl	-96(%rbp), %edi
	movl	-100(%rbp), %ecx
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rsi
	movl	%edi, %r8d
	movl	%eax, %edi
	call	getCost
	movl	%eax, -92(%rbp)
	movl	-112(%rbp), %eax
	cmpl	-92(%rbp), %eax
	jle	.L23
	movl	-92(%rbp), %eax
	movl	%eax, -112(%rbp)
.L23:
	addl	$1, -104(%rbp)
.L22:
	movl	-128(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L24
	addl	$1, -108(%rbp)
.L21:
	movl	-128(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L25
	movl	-112(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	getCost
	.type	getCost, @function
getCost:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movl	%ecx, -24(%rbp)
	movl	%r8d, -44(%rbp)
	movl	$1, -12(%rbp)
	cmpl	$1, -20(%rbp)
	jne	.L2
	movl	-12(%rbp), %eax
	jmp	.L3
.L2:
	cmpl	$2, -20(%rbp)
	jne	.L4
	movl	-12(%rbp), %eax
	jmp	.L3
.L4:
	movl	$0, -8(%rbp)
	jmp	.L5
.L9:
	movl	$0, -4(%rbp)
	jmp	.L6
.L8:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	subl	%edx, %eax
	cmpl	%eax, -24(%rbp)
	jne	.L7
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	subl	%edx, %eax
	cmpl	%eax, -44(%rbp)
	jne	.L7
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	je	.L7
	addl	$1, -12(%rbp)
.L7:
	addl	$1, -4(%rbp)
.L6:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L8
	addl	$1, -8(%rbp)
.L5:
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L9
	subl	$1, -12(%rbp)
	movl	-20(%rbp), %eax
	subl	-12(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	getCost, .-getCost
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-128(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L11:
	cmpq	%rdx, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L13
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L13:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-128(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L14:
	cmpq	%rdx, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L16
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L16:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L17
.L18:
	leaq	-120(%rbp), %rdx
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-124(%rbp), %ecx
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movl	-120(%rbp), %ecx
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -116(%rbp)
.L17:
	movl	-128(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L18
	movl	-128(%rbp), %eax
	cmpl	$1, %eax
	jne	.L19
	movl	$1, -112(%rbp)
	jmp	.L20
.L19:
	movl	-128(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -112(%rbp)
.L20:
	movl	$0, -108(%rbp)
	jmp	.L21
.L25:
	movl	$0, -104(%rbp)
	jmp	.L22
.L24:
	movl	-108(%rbp), %eax
	cmpl	-104(%rbp), %eax
	je	.L23
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-80(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, -100(%rbp)
	movq	-64(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, -96(%rbp)
	movl	-128(%rbp), %eax
	movl	-96(%rbp), %edi
	movl	-100(%rbp), %ecx
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rsi
	movl	%edi, %r8d
	movl	%eax, %edi
	call	getCost
	movl	%eax, -92(%rbp)
	movl	-112(%rbp), %eax
	cmpl	-92(%rbp), %eax
	jle	.L23
	movl	-92(%rbp), %eax
	movl	%eax, -112(%rbp)
.L23:
	addl	$1, -104(%rbp)
.L22:
	movl	-128(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L24
	addl	$1, -108(%rbp)
.L21:
	movl	-128(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L25
	movl	-112(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
