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

#define N_MAX 3000

typedef struct
{
    int x;
    int y;
}Point;

int N;
int K;

Point P[N_MAX];
Point T[N_MAX];

int compX(const void *a, const void *b)
{
    if(((Point *)a)->x == ((Point *)b)->x)
    {
        return ((Point *)a)->y - ((Point *)b)->y;
    }
    return ((Point *)a)->x - ((Point *)b)->x;
}

int compA(const void *a, const void *b)
{
    return ((Point *)b)->x * ((Point *)a)->y - ((Point *)a)->x * ((Point *)b)->y;
}

bool eq(const Point a, const Point b)
{
  return b.x * a.y == a.x * b.y;
}

int check(int p, int M)
{
    int maxl = 1;
    int l = 1;
    Point pre;
    int i;
    
    qsort(T, M, sizeof(Point), compA);
    pre = T[0];
    
    for(i = 1; i < M; i++)
    {
        if(eq(pre, T[i]))
        {
            l++;
            if(maxl > l)
            {
                maxl = maxl;
            }
            else
            {
                maxl = l;
            }
        }
        else
        {
            l = 1;
        }
        pre = T[i];
    }
    return maxl;
}


int solve()
{
    int k = 0;
    int v = 0;
    int i;
    int j;
    
    for (i = 0; i < N; i++)
    {
        k = 0;
        v = 0;
        for (j = i + 1; j < N; j++)
        {
            if ( P[i].x == P[j].x )
            {
                v++;
            }
            else
            {
                T[k] = P[j];
                T[k].x -= P[i].x;
                T[k].y -= P[i].y;
                k++;
            }
        }
        if ( 1 + v >= K ) return 1;
        if ( 1 + check(i, k) >= K ) return 1;
    }
    return 0;
}

int main()
{
    int i;

    scanf("%d%d", &N, &K);

    for(i = 0; i < N; i++)
    {
        scanf("%d%d", &P[i].x, &P[i].y);
    }
    qsort(P, N, sizeof(Point), compX);
    
    printf("%d\n", solve());
    
    return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.zero	4
	.globl	P
	.align 32
	.type	P, @object
	.size	P, 24000
P:
	.zero	24000
	.globl	T
	.align 32
	.type	T, @object
	.size	T, 24000
T:
	.zero	24000
	.text
	.globl	compX
	.type	compX, @function
compX:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jne	.L2
	movq	-8(%rbp), %rax
	movl	4(%rax), %edx
	movq	-16(%rbp), %rax
	movl	4(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compX, .-compX
	.globl	compA
	.type	compA, @function
compA:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	imull	%eax, %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	imull	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	compA, .-compA
	.globl	eq
	.type	eq, @function
eq:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movl	-16(%rbp), %edx
	movl	-4(%rbp), %eax
	imull	%eax, %edx
	movl	-8(%rbp), %ecx
	movl	-12(%rbp), %eax
	imull	%ecx, %eax
	cmpl	%eax, %edx
	sete	%al
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	eq, .-eq
	.globl	check
	.type	check, @function
check:
.LFB9:
	.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
	movl	%edi, -36(%rbp)
	movl	%esi, -40(%rbp)
	movl	$1, -20(%rbp)
	movl	$1, -16(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	compA(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	T(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movq	T(%rip), %rax
	movq	%rax, -8(%rbp)
	movl	$1, -12(%rbp)
	jmp	.L9
.L13:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	T(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	eq
	testb	%al, %al
	je	.L10
	addl	$1, -16(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jg	.L12
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L12
.L10:
	movl	$1, -16(%rbp)
.L12:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	T(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, -8(%rbp)
	addl	$1, -12(%rbp)
.L9:
	movl	-12(%rbp), %eax
	cmpl	-40(%rbp), %eax
	jl	.L13
	movl	-20(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	check, .-check
	.globl	solve
	.type	solve, @function
solve:
.LFB10:
	.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	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L16
.L24:
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L17
.L20:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	P(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L18
	addl	$1, -12(%rbp)
	jmp	.L19
.L18:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	T(%rip), %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rsi
	leaq	P(%rip), %rax
	movq	(%rsi,%rax), %rax
	movq	%rax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	T(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	P(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	T(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+P(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+T(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L19:
	addl	$1, -4(%rbp)
.L17:
	movl	N(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L20
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	K(%rip), %eax
	cmpl	%eax, %edx
	jl	.L21
	movl	$1, %eax
	jmp	.L22
.L21:
	movl	-16(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	check
	leal	1(%rax), %edx
	movl	K(%rip), %eax
	cmpl	%eax, %edx
	jl	.L23
	movl	$1, %eax
	jmp	.L22
.L23:
	addl	$1, -8(%rbp)
.L16:
	movl	N(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L24
	movl	$0, %eax
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.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
	leaq	K(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4(%rbp)
	jmp	.L26
.L27:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	P(%rip), %rax
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	P(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L26:
	movl	N(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L27
	movl	N(%rip), %eax
	cltq
	leaq	compX(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	P(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, %eax
	call	solve
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	compX
	.type	compX, @function
compX:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %ecx
	movl	(%rsi), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	cmpl	%edx, %ecx
	je	.L5
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	movl	4(%rdi), %eax
	subl	4(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compX, .-compX
	.p2align 4
	.globl	compA
	.type	compA, @function
compA:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	movl	(%rdi), %edx
	imull	4(%rdi), %eax
	imull	4(%rsi), %edx
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	compA, .-compA
	.p2align 4
	.globl	eq
	.type	eq, @function
eq:
.LFB41:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	sarq	$32, %rax
	imull	%esi, %eax
	sarq	$32, %rsi
	imull	%esi, %edi
	cmpl	%edi, %eax
	sete	%al
	ret
	.cfi_endproc
.LFE41:
	.size	eq, .-eq
	.p2align 4
	.globl	check
	.type	check, @function
check:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movslq	%esi, %rsi
	leaq	T(%rip), %rdi
	movl	$8, %edx
	movq	%rsi, %rbx
	leaq	compA(%rip), %rcx
	call	qsort@PLT
	movl	T(%rip), %edi
	movl	4+T(%rip), %esi
	cmpl	$1, %ebx
	jle	.L12
	leaq	8+T(%rip), %rax
	leal	-2(%rbx), %ecx
	movl	$1, %r8d
	movl	$1, %r9d
	leaq	8(%rax), %rdx
	leaq	(%rdx,%rcx,8), %r10
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L13:
	addq	$8, %rax
	movl	$1, %r8d
	cmpq	%rax, %r10
	je	.L8
.L11:
	movl	%edi, %edx
	movl	%esi, %ecx
	movl	(%rax), %edi
	movl	4(%rax), %esi
	imull	%edi, %ecx
	imull	%esi, %edx
	cmpl	%edx, %ecx
	jne	.L13
	addl	$1, %r8d
	cmpl	%r8d, %r9d
	cmovl	%r8d, %r9d
	addq	$8, %rax
	cmpq	%rax, %r10
	jne	.L11
.L8:
	movl	%r9d, %eax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	movl	$1, %r9d
	popq	%rbx
	.cfi_def_cfa_offset 8
	movl	%r9d, %eax
	ret
	.cfi_endproc
.LFE42:
	.size	check, .-check
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB43:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	T(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	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
	leaq	compA(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	P(%rip), %rbx
	movq	%rbx, %r13
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L17:
	movl	N(%rip), %eax
	cmpl	%r14d, %eax
	jle	.L36
	leal	1(%r14), %edx
	movl	K(%rip), %esi
	cmpl	%edx, %eax
	jle	.L18
	subl	$2, %eax
	movl	0(%r13), %edx
	xorl	%edi, %edi
	xorl	%r12d, %r12d
	subl	%r14d, %eax
	addq	%r14, %rax
	leaq	8(%rbx,%rax,8), %r9
	movq	%r13, %rax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L19:
	movd	4(%r13), %xmm2
	movq	8(%rax), %xmm0
	movd	%edx, %xmm1
	movslq	%r12d, %rcx
	addq	$8, %rax
	addl	$1, %r12d
	punpckldq	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	movq	%xmm0, (%r15,%rcx,8)
	cmpq	%r9, %rax
	je	.L37
.L21:
	cmpl	%edx, 8(%rax)
	jne	.L19
	addq	$8, %rax
	addl	$1, %edi
	cmpq	%r9, %rax
	jne	.L21
.L37:
	addl	$1, %edi
	cmpl	%esi, %edi
	jge	.L27
	movslq	%r12d, %rsi
	movq	%r15, %rdi
	movq	%rbp, %rcx
	movl	$8, %edx
	call	qsort@PLT
	movl	(%r15), %edi
	movl	4+T(%rip), %esi
	cmpl	$1, %r12d
	jle	.L30
	leaq	8+T(%rip), %rax
	leal	-2(%r12), %edx
	movl	$1, %r9d
	movl	$1, %r8d
	leaq	8(%rax), %rcx
	leaq	(%rcx,%rdx,8), %r10
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L31:
	addq	$8, %rax
	movl	$1, %r8d
	cmpq	%rax, %r10
	je	.L38
.L26:
	movl	%edi, %ecx
	movl	%esi, %edx
	movl	(%rax), %edi
	movl	4(%rax), %esi
	imull	%edi, %edx
	imull	%esi, %ecx
	cmpl	%edx, %ecx
	jne	.L31
	addl	$1, %r8d
	cmpl	%r8d, %r9d
	cmovl	%r8d, %r9d
	addq	$8, %rax
	cmpq	%rax, %r10
	jne	.L26
.L38:
	addl	$1, %r9d
.L24:
	addq	$1, %r14
	addq	$8, %r13
	cmpl	%r9d, K(%rip)
	jg	.L17
.L27:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	$1, %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
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	cmpl	$1, %esi
	jle	.L27
	movq	%rbp, %rcx
	movl	$8, %edx
	xorl	%esi, %esi
	movq	%r15, %rdi
	call	qsort@PLT
	movl	$2, %r9d
	jmp	.L24
.L36:
	addq	$8, %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
.L30:
	.cfi_restore_state
	movl	$2, %r9d
	jmp	.L24
	.cfi_endproc
.LFE43:
	.size	solve, .-solve
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB44:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	K(%rip), %rdx
	movq	%r13, %rdi
	leaq	P(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movslq	N(%rip), %rsi
	testl	%esi, %esi
	jle	.L40
	movq	%r12, %rbx
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L41:
	movq	%rbx, %rsi
	leaq	4(%rbx), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	N(%rip), %rsi
	addl	$1, %ebp
	addq	$8, %rbx
	cmpl	%ebp, %esi
	jg	.L41
.L40:
	movq	%r12, %rdi
	leaq	compX(%rip), %rcx
	movl	$8, %edx
	call	qsort@PLT
	xorl	%eax, %eax
	call	solve
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	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
.LFE44:
	.size	main, .-main
	.globl	T
	.bss
	.align 32
	.type	T, @object
	.size	T, 24000
T:
	.zero	24000
	.globl	P
	.align 32
	.type	P, @object
	.size	P, 24000
P:
	.zero	24000
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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	compX
	.type	compX, @function
compX:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %ecx
	movl	(%rsi), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	cmpl	%edx, %ecx
	je	.L5
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	movl	4(%rdi), %eax
	subl	4(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compX, .-compX
	.p2align 4
	.globl	compA
	.type	compA, @function
compA:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	movl	(%rdi), %edx
	imull	4(%rdi), %eax
	imull	4(%rsi), %edx
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	compA, .-compA
	.p2align 4
	.globl	eq
	.type	eq, @function
eq:
.LFB41:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	sarq	$32, %rax
	imull	%esi, %eax
	sarq	$32, %rsi
	imull	%esi, %edi
	cmpl	%edi, %eax
	sete	%al
	ret
	.cfi_endproc
.LFE41:
	.size	eq, .-eq
	.p2align 4
	.globl	check
	.type	check, @function
check:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movslq	%esi, %rsi
	leaq	T(%rip), %rdi
	movl	$8, %edx
	movq	%rsi, %rbx
	leaq	compA(%rip), %rcx
	call	qsort@PLT
	movl	T(%rip), %edi
	movl	4+T(%rip), %esi
	cmpl	$1, %ebx
	jle	.L12
	leaq	8+T(%rip), %rax
	leal	-2(%rbx), %ecx
	movl	$1, %r8d
	movl	$1, %r9d
	leaq	8(%rax), %rdx
	leaq	(%rdx,%rcx,8), %r10
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L13:
	addq	$8, %rax
	movl	$1, %r8d
	cmpq	%rax, %r10
	je	.L8
.L11:
	movl	%edi, %edx
	movl	%esi, %ecx
	movl	(%rax), %edi
	movl	4(%rax), %esi
	imull	%edi, %ecx
	imull	%esi, %edx
	cmpl	%edx, %ecx
	jne	.L13
	addl	$1, %r8d
	cmpl	%r8d, %r9d
	cmovl	%r8d, %r9d
	addq	$8, %rax
	cmpq	%rax, %r10
	jne	.L11
.L8:
	movl	%r9d, %eax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	movl	$1, %r9d
	popq	%rbx
	.cfi_def_cfa_offset 8
	movl	%r9d, %eax
	ret
	.cfi_endproc
.LFE42:
	.size	check, .-check
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB43:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	T(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	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
	leaq	compA(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	P(%rip), %rbx
	movq	%rbx, %r13
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L17:
	movl	N(%rip), %eax
	cmpl	%r14d, %eax
	jle	.L36
	leal	1(%r14), %edx
	movl	K(%rip), %esi
	cmpl	%edx, %eax
	jle	.L18
	subl	$2, %eax
	movl	0(%r13), %edx
	xorl	%edi, %edi
	xorl	%r12d, %r12d
	subl	%r14d, %eax
	addq	%r14, %rax
	leaq	8(%rbx,%rax,8), %r9
	movq	%r13, %rax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L19:
	movd	4(%r13), %xmm2
	movq	8(%rax), %xmm0
	movd	%edx, %xmm1
	movslq	%r12d, %rcx
	addq	$8, %rax
	addl	$1, %r12d
	punpckldq	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	movq	%xmm0, (%r15,%rcx,8)
	cmpq	%r9, %rax
	je	.L37
.L21:
	cmpl	%edx, 8(%rax)
	jne	.L19
	addq	$8, %rax
	addl	$1, %edi
	cmpq	%r9, %rax
	jne	.L21
.L37:
	addl	$1, %edi
	cmpl	%esi, %edi
	jge	.L27
	movslq	%r12d, %rsi
	movq	%r15, %rdi
	movq	%rbp, %rcx
	movl	$8, %edx
	call	qsort@PLT
	movl	(%r15), %edi
	movl	4+T(%rip), %esi
	cmpl	$1, %r12d
	jle	.L30
	leaq	8+T(%rip), %rax
	leal	-2(%r12), %edx
	movl	$1, %r9d
	movl	$1, %r8d
	leaq	8(%rax), %rcx
	leaq	(%rcx,%rdx,8), %r10
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L31:
	addq	$8, %rax
	movl	$1, %r8d
	cmpq	%rax, %r10
	je	.L38
.L26:
	movl	%edi, %ecx
	movl	%esi, %edx
	movl	(%rax), %edi
	movl	4(%rax), %esi
	imull	%edi, %edx
	imull	%esi, %ecx
	cmpl	%edx, %ecx
	jne	.L31
	addl	$1, %r8d
	cmpl	%r8d, %r9d
	cmovl	%r8d, %r9d
	addq	$8, %rax
	cmpq	%rax, %r10
	jne	.L26
.L38:
	addl	$1, %r9d
.L24:
	addq	$1, %r14
	addq	$8, %r13
	cmpl	%r9d, K(%rip)
	jg	.L17
.L27:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	$1, %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
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	cmpl	$1, %esi
	jle	.L27
	movq	%rbp, %rcx
	movl	$8, %edx
	xorl	%esi, %esi
	movq	%r15, %rdi
	call	qsort@PLT
	movl	$2, %r9d
	jmp	.L24
.L36:
	addq	$8, %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
.L30:
	.cfi_restore_state
	movl	$2, %r9d
	jmp	.L24
	.cfi_endproc
.LFE43:
	.size	solve, .-solve
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB44:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	K(%rip), %rdx
	movq	%r13, %rdi
	leaq	P(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movslq	N(%rip), %rsi
	testl	%esi, %esi
	jle	.L40
	movq	%r12, %rbx
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L41:
	movq	%rbx, %rsi
	leaq	4(%rbx), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	N(%rip), %rsi
	addl	$1, %ebp
	addq	$8, %rbx
	cmpl	%ebp, %esi
	jg	.L41
.L40:
	movq	%r12, %rdi
	leaq	compX(%rip), %rcx
	movl	$8, %edx
	call	qsort@PLT
	xorl	%eax, %eax
	call	solve
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	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
.LFE44:
	.size	main, .-main
	.globl	T
	.bss
	.align 32
	.type	T, @object
	.size	T, 24000
T:
	.zero	24000
	.globl	P
	.align 32
	.type	P, @object
	.size	P, 24000
P:
	.zero	24000
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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>
#include<stdbool.h>

#define N_MAX 3000

typedef struct
{
    int x;
    int y;
}Point;

int N;
int K;

Point P[N_MAX];
Point T[N_MAX];

int compX(const void *a, const void *b)
{
    if(((Point *)a)->x == ((Point *)b)->x)
    {
        return ((Point *)a)->y - ((Point *)b)->y;
    }
    return ((Point *)a)->x - ((Point *)b)->x;
}

int compA(const void *a, const void *b)
{
    return ((Point *)b)->x * ((Point *)a)->y - ((Point *)a)->x * ((Point *)b)->y;
}

bool eq(const Point a, const Point b)
{
  return b.x * a.y == a.x * b.y;
}

int check(int p, int M)
{
    int maxl = 1;
    int l = 1;
    Point pre;
    int i;
    
    qsort(T, M, sizeof(Point), compA);
    pre = T[0];
    
    for(i = 1; i < M; i++)
    {
        if(eq(pre, T[i]))
        {
            l++;
            if(maxl > l)
            {
                maxl = maxl;
            }
            else
            {
                maxl = l;
            }
        }
        else
        {
            l = 1;
        }
        pre = T[i];
    }
    return maxl;
}


int solve()
{
    int k = 0;
    int v = 0;
    int i;
    int j;
    
    for (i = 0; i < N; i++)
    {
        k = 0;
        v = 0;
        for (j = i + 1; j < N; j++)
        {
            if ( P[i].x == P[j].x )
            {
                v++;
            }
            else
            {
                T[k] = P[j];
                T[k].x -= P[i].x;
                T[k].y -= P[i].y;
                k++;
            }
        }
        if ( 1 + v >= K ) return 1;
        if ( 1 + check(i, k) >= K ) return 1;
    }
    return 0;
}

int main()
{
    int i;

    scanf("%d%d", &N, &K);

    for(i = 0; i < N; i++)
    {
        scanf("%d%d", &P[i].x, &P[i].y);
    }
    qsort(P, N, sizeof(Point), compX);
    
    printf("%d\n", solve());
    
    return 0;
}


7 7
0 0
1 0
1 1
0 1
2 0
3 0
4 0
 5 4
1 -1
1 0
1 2
1 1
3 2
 7 7
0 0
1 0
1 1
-1 1
2 0
3 0
4 0
 5 4
0 0
1 0
1 2
0 1
2 2
 7 5
0 0
1 0
1 1
0 1
2 0
3 1
4 0
 7 9
0 0
1 0
1 1
0 1
2 0
3 0
4 0
 7 7
0 0
1 0
1 1
-1 1
2 0
3 0
6 0
 5 4
0 -1
1 0
1 2
0 1
2 2
 7 9
-1 0
1 0
1 1
0 1
2 0
3 0
4 0
 7 7
0 0
1 0
1 1
-2 1
2 0
3 0
6 0

0
 1
 0
 0
 0
 0
 0
 0
 0
 0

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

#define N_MAX 3000

typedef struct
{
    int x;
    int y;
}Point;

int N;
int K;

Point P[N_MAX];
Point T[N_MAX];

int compX(const void *a, const void *b)
{
    if(((Point *)a)->x == ((Point *)b)->x)
    {
        return ((Point *)a)->y - ((Point *)b)->y;
    }
    return ((Point *)a)->x - ((Point *)b)->x;
}

int compA(const void *a, const void *b)
{
    return ((Point *)b)->x * ((Point *)a)->y - ((Point *)a)->x * ((Point *)b)->y;
}

bool eq(const Point a, const Point b)
{
  return b.x * a.y == a.x * b.y;
}

int check(int p, int M)
{
    int maxl = 1;
    int l = 1;
    Point pre;
    int i;
    
    qsort(T, M, sizeof(Point), compA);
    pre = T[0];
    
    for(i = 1; i < M; i++)
    {
        if(eq(pre, T[i]))
        {
            l++;
            if(maxl > l)
            {
                maxl = maxl;
            }
            else
            {
                maxl = l;
            }
        }
        else
        {
            l = 1;
        }
        pre = T[i];
    }
    return maxl;
}


int solve()
{
    int k = 0;
    int v = 0;
    int i;
    int j;
    
    for (i = 0; i < N; i++)
    {
        k = 0;
        v = 0;
        for (j = i + 1; j < N; j++)
        {
            if ( P[i].x == P[j].x )
            {
                v++;
            }
            else
            {
                T[k] = P[j];
                T[k].x -= P[i].x;
                T[k].y -= P[i].y;
                k++;
            }
        }
        if ( 1 + v >= K ) return 1;
        if ( 1 + check(i, k) >= K ) return 1;
    }
    return 0;
}

int main()
{
    int i;

    scanf("%d%d", &N, &K);

    for(i = 0; i < N; i++)
    {
        scanf("%d%d", &P[i].x, &P[i].y);
    }
    qsort(P, N, sizeof(Point), compX);
    
    printf("%d\n", solve());
    
    return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.zero	4
	.globl	P
	.align 32
	.type	P, @object
	.size	P, 24000
P:
	.zero	24000
	.globl	T
	.align 32
	.type	T, @object
	.size	T, 24000
T:
	.zero	24000
	.text
	.globl	compX
	.type	compX, @function
compX:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jne	.L2
	movq	-8(%rbp), %rax
	movl	4(%rax), %edx
	movq	-16(%rbp), %rax
	movl	4(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compX, .-compX
	.globl	compA
	.type	compA, @function
compA:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	imull	%eax, %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	imull	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	compA, .-compA
	.globl	eq
	.type	eq, @function
eq:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movl	-16(%rbp), %edx
	movl	-4(%rbp), %eax
	imull	%eax, %edx
	movl	-8(%rbp), %ecx
	movl	-12(%rbp), %eax
	imull	%ecx, %eax
	cmpl	%eax, %edx
	sete	%al
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	eq, .-eq
	.globl	check
	.type	check, @function
check:
.LFB9:
	.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
	movl	%edi, -36(%rbp)
	movl	%esi, -40(%rbp)
	movl	$1, -20(%rbp)
	movl	$1, -16(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	compA(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	T(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movq	T(%rip), %rax
	movq	%rax, -8(%rbp)
	movl	$1, -12(%rbp)
	jmp	.L9
.L13:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	T(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	eq
	testb	%al, %al
	je	.L10
	addl	$1, -16(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jg	.L12
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L12
.L10:
	movl	$1, -16(%rbp)
.L12:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	T(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, -8(%rbp)
	addl	$1, -12(%rbp)
.L9:
	movl	-12(%rbp), %eax
	cmpl	-40(%rbp), %eax
	jl	.L13
	movl	-20(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	check, .-check
	.globl	solve
	.type	solve, @function
solve:
.LFB10:
	.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	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L16
.L24:
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L17
.L20:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	P(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L18
	addl	$1, -12(%rbp)
	jmp	.L19
.L18:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	T(%rip), %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rsi
	leaq	P(%rip), %rax
	movq	(%rsi,%rax), %rax
	movq	%rax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	T(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	P(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	T(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+P(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+T(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L19:
	addl	$1, -4(%rbp)
.L17:
	movl	N(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L20
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	K(%rip), %eax
	cmpl	%eax, %edx
	jl	.L21
	movl	$1, %eax
	jmp	.L22
.L21:
	movl	-16(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	check
	leal	1(%rax), %edx
	movl	K(%rip), %eax
	cmpl	%eax, %edx
	jl	.L23
	movl	$1, %eax
	jmp	.L22
.L23:
	addl	$1, -8(%rbp)
.L16:
	movl	N(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L24
	movl	$0, %eax
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.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
	leaq	K(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4(%rbp)
	jmp	.L26
.L27:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	P(%rip), %rax
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	P(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L26:
	movl	N(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L27
	movl	N(%rip), %eax
	cltq
	leaq	compX(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	P(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, %eax
	call	solve
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.zero	4
	.globl	P
	.align 32
	.type	P, @object
	.size	P, 24000
P:
	.zero	24000
	.globl	T
	.align 32
	.type	T, @object
	.size	T, 24000
T:
	.zero	24000
	.text
	.globl	compX
	.type	compX, @function
compX:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jne	.L2
	movq	-8(%rbp), %rax
	movl	4(%rax), %edx
	movq	-16(%rbp), %rax
	movl	4(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compX, .-compX
	.globl	compA
	.type	compA, @function
compA:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	imull	%eax, %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	imull	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	compA, .-compA
	.globl	eq
	.type	eq, @function
eq:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movl	-16(%rbp), %edx
	movl	-4(%rbp), %eax
	imull	%eax, %edx
	movl	-8(%rbp), %ecx
	movl	-12(%rbp), %eax
	imull	%ecx, %eax
	cmpl	%eax, %edx
	sete	%al
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	eq, .-eq
	.globl	check
	.type	check, @function
check:
.LFB9:
	.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
	movl	%edi, -36(%rbp)
	movl	%esi, -40(%rbp)
	movl	$1, -20(%rbp)
	movl	$1, -16(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	compA(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	T(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movq	T(%rip), %rax
	movq	%rax, -8(%rbp)
	movl	$1, -12(%rbp)
	jmp	.L9
.L13:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	T(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	eq
	testb	%al, %al
	je	.L10
	addl	$1, -16(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jg	.L12
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L12
.L10:
	movl	$1, -16(%rbp)
.L12:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	T(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, -8(%rbp)
	addl	$1, -12(%rbp)
.L9:
	movl	-12(%rbp), %eax
	cmpl	-40(%rbp), %eax
	jl	.L13
	movl	-20(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	check, .-check
	.globl	solve
	.type	solve, @function
solve:
.LFB10:
	.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	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L16
.L24:
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L17
.L20:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	P(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L18
	addl	$1, -12(%rbp)
	jmp	.L19
.L18:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	T(%rip), %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rsi
	leaq	P(%rip), %rax
	movq	(%rsi,%rax), %rax
	movq	%rax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	T(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	P(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	T(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+P(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+T(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L19:
	addl	$1, -4(%rbp)
.L17:
	movl	N(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L20
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	K(%rip), %eax
	cmpl	%eax, %edx
	jl	.L21
	movl	$1, %eax
	jmp	.L22
.L21:
	movl	-16(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	check
	leal	1(%rax), %edx
	movl	K(%rip), %eax
	cmpl	%eax, %edx
	jl	.L23
	movl	$1, %eax
	jmp	.L22
.L23:
	addl	$1, -8(%rbp)
.L16:
	movl	N(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L24
	movl	$0, %eax
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.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
	leaq	K(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4(%rbp)
	jmp	.L26
.L27:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	P(%rip), %rax
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	P(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L26:
	movl	N(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L27
	movl	N(%rip), %eax
	cltq
	leaq	compX(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	P(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, %eax
	call	solve
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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:
