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>
#define N_MAX 210000

int n;
long long a[N_MAX];
long long k;

int cmpfunc ( const void * a, const void * b ){
    
    if ( *(long long *)a < *(long long *)b ){
        return -1;
    } else if ( *(long long *)a == *(long long *)b ){
        return 0;
    } else if ( *(long long *)a > *(long long *)b ){
        return 1;
    }
}

long long count( long long x ){
    
    long long total = 0;
    
    for ( int i=0; i<n; i++ ){
        if ( a[i] < 0 ){
            int l = -1;
            int r = n;
            while ( l+1 < r ){
                int c = (l+r)/2;
                if ( a[c] * a[i] < x ) r = c;
                else                   l = c;
            }
            total += n-r;
        } else {
            int l = -1;
            int r = n;
            while ( l+1 < r ){
                int c = (l+r)/2;
                if ( a[c] * a[i] < x ) l=c;
                else                   r=c;
            }
            total += r;
        }
        if ( a[i] * a[i] < x ) total--;
    }
    total /= 2;
    return total;
}


int main(){
    
    if ( scanf("%d %lld",&n,&k) != 2 ){
        printf("N,K,読み込み失敗\n");
        exit (-1);
    }
    
    for ( int i=0; i<n; i++ ){
        int check = scanf("%lld",&a[i]);
        if ( check != 1 ){
            printf("a[%d]読み込み失敗\n",i);
            exit (-1);
        }
    }
    
    qsort( a, n, sizeof(long long), cmpfunc );
    
    long long l = -((long long)1.0e18)-1;
    long long r =  ((long long)1.0e18)+1;
    
    while ( l+1 < r ){
        
        long long x = (l+r)/2;
        //printf("count(x) : %lld\n",count(x));
        if ( count(x) < k ) l=x;
        else                r=x;
        //printf("x        : %lld\n",x);
        //printf("\n");
    }
    
    //printf("k : %lld\n",k);
    printf("%lld\n",l);
    
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1680000
a:
	.zero	1680000
	.globl	k
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.text
	.globl	cmpfunc
	.type	cmpfunc, @function
cmpfunc:
.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L2
	movl	$-1, %eax
	jmp	.L1
.L2:
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jne	.L4
	movl	$0, %eax
	jmp	.L1
.L4:
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L5
	movl	$1, %eax
	jmp	.L1
.L5:
.L1:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmpfunc, .-cmpfunc
	.globl	count
	.type	count, @function
count:
.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, -56(%rbp)
	movq	$0, -8(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L7
.L17:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	jns	.L8
	movl	$-1, -32(%rbp)
	movl	n(%rip), %eax
	movl	%eax, -28(%rbp)
	jmp	.L9
.L11:
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	a(%rip), %rax
	movq	(%rcx,%rax), %rax
	imulq	%rdx, %rax
	cmpq	%rax, -56(%rbp)
	jle	.L10
	movl	-12(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L9
.L10:
	movl	-12(%rbp), %eax
	movl	%eax, -32(%rbp)
.L9:
	movl	-32(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -28(%rbp)
	jg	.L11
	movl	n(%rip), %eax
	subl	-28(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
	jmp	.L12
.L8:
	movl	$-1, -24(%rbp)
	movl	n(%rip), %eax
	movl	%eax, -20(%rbp)
	jmp	.L13
.L15:
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	a(%rip), %rax
	movq	(%rcx,%rax), %rax
	imulq	%rdx, %rax
	cmpq	%rax, -56(%rbp)
	jle	.L14
	movl	-16(%rbp), %eax
	movl	%eax, -24(%rbp)
	jmp	.L13
.L14:
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
.L13:
	movl	-24(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -20(%rbp)
	jg	.L15
	movl	-20(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
.L12:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	a(%rip), %rax
	movq	(%rcx,%rax), %rax
	imulq	%rdx, %rax
	cmpq	%rax, -56(%rbp)
	jle	.L16
	subq	$1, -8(%rbp)
.L16:
	addl	$1, -36(%rbp)
.L7:
	movl	n(%rip), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L17
	movq	-8(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	count, .-count
	.section	.rodata
.LC0:
	.string	"%d %lld"
.LC1:
	.string	"N,K,\350\252\255\343\201\277\350\276\274\343\201\277\345\244\261\346\225\227"
.LC2:
	.string	"%lld"
.LC3:
	.string	"a[%d]\350\252\255\343\201\277\350\276\274\343\201\277\345\244\261\346\225\227\n"
.LC4:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %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
	cmpl	$2, %eax
	je	.L20
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$-1, %edi
	call	exit@PLT
.L20:
	movl	$0, -32(%rbp)
	jmp	.L21
.L23:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	%eax, -28(%rbp)
	cmpl	$1, -28(%rbp)
	je	.L22
	movl	-32(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$-1, %edi
	call	exit@PLT
.L22:
	addl	$1, -32(%rbp)
.L21:
	movl	n(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L23
	movl	n(%rip), %eax
	cltq
	leaq	cmpfunc(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movabsq	$-1000000000000000001, %rax
	movq	%rax, -24(%rbp)
	movabsq	$1000000000000000001, %rax
	movq	%rax, -16(%rbp)
	jmp	.L24
.L26:
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	count
	movq	k(%rip), %rdx
	cmpq	%rdx, %rax
	jge	.L25
	movq	-8(%rbp), %rax
	movq	%rax, -24(%rbp)
	jmp	.L24
.L25:
	movq	-8(%rbp), %rax
	movq	%rax, -16(%rbp)
.L24:
	movq	-24(%rbp), %rax
	addq	$1, %rax
	cmpq	%rax, -16(%rbp)
	jg	.L26
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	cmpfunc
	.type	cmpfunc, @function
cmpfunc:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$-1, %eax
	cmpq	%rdx, (%rdi)
	jl	.L1
	movl	$0, %eax
	je	.L1
	movl	$1, %eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmpfunc, .-cmpfunc
	.p2align 4
	.globl	count
	.type	count, @function
count:
.LFB40:
	.cfi_startproc
	endbr64
	movl	n(%rip), %r11d
	testl	%r11d, %r11d
	jle	.L18
	leaq	a(%rip), %r8
	leal	-1(%r11), %eax
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%r9d, %r9d
	leaq	8(%r8), %rdx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r8, %r10
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	(%rdx,%rax,8), %rbx
	.p2align 4,,10
	.p2align 3
.L17:
	movq	(%r10), %rsi
	testq	%rsi, %rsi
	js	.L19
	movslq	%r11d, %rcx
	movl	$-1, %edx
	xorl	%ebp, %ebp
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L15:
	leal	(%rcx,%rdx), %eax
	sarl	%eax
	movslq	%eax, %r12
	movq	(%r8,%r12,8), %r14
	imulq	%rsi, %r14
	cmpq	%rdi, %r14
	jge	.L27
	movl	%eax, %edx
	leal	1(%rax), %ebp
.L14:
	cmpl	%ebp, %ecx
	jg	.L15
	addq	%rcx, %r9
.L13:
	imulq	%rsi, %rsi
	xorl	%eax, %eax
	cmpq	%rdi, %rsi
	setl	%al
	addq	$8, %r10
	subq	%rax, %r9
	cmpq	%r10, %rbx
	jne	.L17
	movq	%r9, %rax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	shrq	$63, %rax
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	addq	%r9, %rax
	sarq	%rax
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	movslq	%eax, %rcx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%r11d, %edx
	movl	$-1, %ebp
.L9:
	leal	1(%rbp), %r12d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	leal	(%rdx,%rbp), %eax
	sarl	%eax
	movslq	%eax, %rcx
	movq	(%r8,%rcx,8), %r14
	imulq	%rsi, %r14
	cmpq	%rdi, %r14
	jge	.L28
	movl	%eax, %edx
.L11:
	cmpl	%r12d, %edx
	jg	.L12
	movl	%r11d, %eax
	subl	%edx, %eax
	cltq
	addq	%rax, %r9
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L28:
	movl	%eax, %ebp
	jmp	.L9
.L18:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 14
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	count, .-count
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %lld"
.LC1:
	.string	"N,K,\350\252\255\343\201\277\350\276\274\343\201\277\345\244\261\346\225\227"
.LC2:
	.string	"%lld"
.LC3:
	.string	"a[%d]\350\252\255\343\201\277\350\276\274\343\201\277\345\244\261\346\225\227\n"
.LC4:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xorl	%eax, %eax
	leaq	k(%rip), %rdx
	leaq	n(%rip), %rsi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %rdi
	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
	cmpl	$2, %eax
	jne	.L30
	movslq	n(%rip), %rsi
	leaq	a(%rip), %rbp
	xorl	%r12d, %r12d
	leaq	.LC2(%rip), %r13
	movq	%rbp, %rbx
	testl	%esi, %esi
	jle	.L32
	.p2align 4,,10
	.p2align 3
.L34:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L42
	movslq	n(%rip), %rsi
	addl	$1, %r12d
	addq	$8, %rbx
	cmpl	%r12d, %esi
	jg	.L34
.L32:
	movq	%rbp, %rdi
	movl	$8, %edx
	leaq	cmpfunc(%rip), %rcx
	movabsq	$1000000000000000001, %rbx
	call	qsort@PLT
	movabsq	$-1000000000000000001, %r13
	movq	k(%rip), %rbp
	movabsq	$-1000000000000000000, %r12
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L37:
	leaq	0(%r13,%rbx), %rax
	movq	%rax, %rdi
	shrq	$63, %rdi
	addq	%rax, %rdi
	sarq	%rdi
	call	count
	cmpq	%rbp, %rax
	jge	.L43
	movq	%rdi, %r13
	leaq	1(%rdi), %r12
.L36:
	cmpq	%rbx, %r12
	jl	.L37
	movq	%r13, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %rsp
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L43:
	.cfi_restore_state
	movq	%rdi, %rbx
	jmp	.L36
.L42:
	movl	$1, %edi
	movl	%r12d, %edx
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	orl	$-1, %edi
	call	exit@PLT
.L30:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	orl	$-1, %edi
	call	exit@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	k
	.bss
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1680000
a:
	.zero	1680000
	.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	cmpfunc
	.type	cmpfunc, @function
cmpfunc:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$-1, %eax
	cmpq	%rdx, (%rdi)
	jl	.L1
	movl	$0, %eax
	je	.L1
	movl	$1, %eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmpfunc, .-cmpfunc
	.p2align 4
	.globl	count
	.type	count, @function
count:
.LFB40:
	.cfi_startproc
	endbr64
	movl	n(%rip), %r11d
	testl	%r11d, %r11d
	jle	.L18
	leaq	a(%rip), %r8
	leal	-1(%r11), %eax
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%r9d, %r9d
	leaq	8(%r8), %rdx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r8, %r10
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	(%rdx,%rax,8), %rbx
	.p2align 4,,10
	.p2align 3
.L17:
	movq	(%r10), %rsi
	testq	%rsi, %rsi
	js	.L19
	movslq	%r11d, %rcx
	movl	$-1, %edx
	xorl	%ebp, %ebp
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L15:
	leal	(%rcx,%rdx), %eax
	sarl	%eax
	movslq	%eax, %r12
	movq	(%r8,%r12,8), %r14
	imulq	%rsi, %r14
	cmpq	%rdi, %r14
	jge	.L27
	movl	%eax, %edx
	leal	1(%rax), %ebp
.L14:
	cmpl	%ebp, %ecx
	jg	.L15
	addq	%rcx, %r9
.L13:
	imulq	%rsi, %rsi
	xorl	%eax, %eax
	cmpq	%rdi, %rsi
	setl	%al
	addq	$8, %r10
	subq	%rax, %r9
	cmpq	%r10, %rbx
	jne	.L17
	movq	%r9, %rax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	shrq	$63, %rax
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	addq	%r9, %rax
	sarq	%rax
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	movslq	%eax, %rcx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%r11d, %edx
	movl	$-1, %ebp
.L9:
	leal	1(%rbp), %r12d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	leal	(%rdx,%rbp), %eax
	sarl	%eax
	movslq	%eax, %rcx
	movq	(%r8,%rcx,8), %r14
	imulq	%rsi, %r14
	cmpq	%rdi, %r14
	jge	.L28
	movl	%eax, %edx
.L11:
	cmpl	%r12d, %edx
	jg	.L12
	movl	%r11d, %eax
	subl	%edx, %eax
	cltq
	addq	%rax, %r9
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L28:
	movl	%eax, %ebp
	jmp	.L9
.L18:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 14
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	count, .-count
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %lld"
.LC1:
	.string	"N,K,\350\252\255\343\201\277\350\276\274\343\201\277\345\244\261\346\225\227"
.LC2:
	.string	"%lld"
.LC3:
	.string	"a[%d]\350\252\255\343\201\277\350\276\274\343\201\277\345\244\261\346\225\227\n"
.LC4:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xorl	%eax, %eax
	leaq	k(%rip), %rdx
	leaq	n(%rip), %rsi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %rdi
	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
	cmpl	$2, %eax
	jne	.L30
	movslq	n(%rip), %rsi
	leaq	a(%rip), %rbp
	xorl	%r12d, %r12d
	leaq	.LC2(%rip), %r13
	movq	%rbp, %rbx
	testl	%esi, %esi
	jle	.L32
	.p2align 4,,10
	.p2align 3
.L34:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L42
	movslq	n(%rip), %rsi
	addl	$1, %r12d
	addq	$8, %rbx
	cmpl	%r12d, %esi
	jg	.L34
.L32:
	movq	%rbp, %rdi
	movl	$8, %edx
	leaq	cmpfunc(%rip), %rcx
	movabsq	$1000000000000000001, %rbx
	call	qsort@PLT
	movabsq	$-1000000000000000001, %r13
	movq	k(%rip), %rbp
	movabsq	$-1000000000000000000, %r12
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L37:
	leaq	0(%r13,%rbx), %rax
	movq	%rax, %rdi
	shrq	$63, %rdi
	addq	%rax, %rdi
	sarq	%rdi
	call	count
	cmpq	%rbp, %rax
	jge	.L43
	movq	%rdi, %r13
	leaq	1(%rdi), %r12
.L36:
	cmpq	%rbx, %r12
	jl	.L37
	movq	%r13, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %rsp
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L43:
	.cfi_restore_state
	movq	%rdi, %rbx
	jmp	.L36
.L42:
	movl	$1, %edi
	movl	%r12d, %edx
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	orl	$-1, %edi
	call	exit@PLT
.L30:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	orl	$-1, %edi
	call	exit@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	k
	.bss
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1680000
a:
	.zero	1680000
	.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>
#define N_MAX 210000

int n;
long long a[N_MAX];
long long k;

int cmpfunc ( const void * a, const void * b ){
    
    if ( *(long long *)a < *(long long *)b ){
        return -1;
    } else if ( *(long long *)a == *(long long *)b ){
        return 0;
    } else if ( *(long long *)a > *(long long *)b ){
        return 1;
    }
}

long long count( long long x ){
    
    long long total = 0;
    
    for ( int i=0; i<n; i++ ){
        if ( a[i] < 0 ){
            int l = -1;
            int r = n;
            while ( l+1 < r ){
                int c = (l+r)/2;
                if ( a[c] * a[i] < x ) r = c;
                else                   l = c;
            }
            total += n-r;
        } else {
            int l = -1;
            int r = n;
            while ( l+1 < r ){
                int c = (l+r)/2;
                if ( a[c] * a[i] < x ) l=c;
                else                   r=c;
            }
            total += r;
        }
        if ( a[i] * a[i] < x ) total--;
    }
    total /= 2;
    return total;
}


int main(){
    
    if ( scanf("%d %lld",&n,&k) != 2 ){
        printf("N,K,読み込み失敗\n");
        exit (-1);
    }
    
    for ( int i=0; i<n; i++ ){
        int check = scanf("%lld",&a[i]);
        if ( check != 1 ){
            printf("a[%d]読み込み失敗\n",i);
            exit (-1);
        }
    }
    
    qsort( a, n, sizeof(long long), cmpfunc );
    
    long long l = -((long long)1.0e18)-1;
    long long r =  ((long long)1.0e18)+1;
    
    while ( l+1 < r ){
        
        long long x = (l+r)/2;
        //printf("count(x) : %lld\n",count(x));
        if ( count(x) < k ) l=x;
        else                r=x;
        //printf("x        : %lld\n",x);
        //printf("\n");
    }
    
    //printf("k : %lld\n",k);
    printf("%lld\n",l);
    
}

10 40
5 4 3 2 -1 0 -1 0 0 0
 4 3
6 3 -4 -2
 30 413
-170202098 -268409015 537203564 983211703 21608710 -443999067 -937727165 -97596546 -372334013 398994917 -972141167 798607104 -1273635706 -959948616 37909651 0 886627544 -20098238 0 -948955241 0 -214720580 277222296 -18897162 834475626 0 -425610555 110117526 663621752 0
 10 27
5 4 3 2 -1 0 -1 0 0 0
 30 413
-170202098 -268409015 537203564 983211703 21608710 -443999067 -937727165 -97596546 -372334013 398994917 -972141167 798607104 -1273635706 -959948616 37909651 0 886627544 -20098238 0 -948955241 0 -214720580 277222296 -18897162 694477644 0 -425610555 110117526 663621752 0
 30 413
-170202098 -268409015 537203564 983211703 21608710 -443999067 -937727165 -159798510 -372334013 526800997 -972141167 798607104 -1273635706 -959948616 37909651 0 886627544 -20098238 0 -948955241 0 -214720580 277222296 -18897162 694477644 0 -425610555 110117526 663621752 0
 30 413
-170202098 -268409015 537203564 983211703 21608710 -443999067 -937727165 -159798510 -372334013 526800997 -972141167 648738515 -1273635706 -959948616 37909651 0 886627544 -20098238 0 -948955241 0 -214720580 277222296 -18897162 694477644 0 -425610555 110117526 663621752 0
 30 413
-170202098 -268409015 537203564 983211703 27025141 -443999067 -937727165 -159124657 -358352725 526800997 -972141167 648738515 -1273635706 -959948616 37909651 -1 886627544 -20098238 0 -948955241 0 -214720580 277222296 -18897162 694477644 0 -425610555 158912296 663621752 0
 10 40
5 1 3 2 -1 0 0 0 0 0
 30 413
-170202098 -268409015 256795389 983211703 21608710 -443999067 -937727165 -159798510 -372334013 526800997 -972141167 648738515 -1273635706 -959948616 37909651 -1 886627544 -20098238 0 -948955241 0 -214720580 277222296 -18897162 694477644 0 -425610555 158912296 663621752 0

6
 -12
 528184831018109492
 0
 476299476577366816
 517956905402467891
 474217893515068178
 467076274146861368
 2
 460870470836112288

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>
#define N_MAX 210000

int n;
long long a[N_MAX];
long long k;

int cmpfunc ( const void * a, const void * b ){
    
    if ( *(long long *)a < *(long long *)b ){
        return -1;
    } else if ( *(long long *)a == *(long long *)b ){
        return 0;
    } else if ( *(long long *)a > *(long long *)b ){
        return 1;
    }
}

long long count( long long x ){
    
    long long total = 0;
    
    for ( int i=0; i<n; i++ ){
        if ( a[i] < 0 ){
            int l = -1;
            int r = n;
            while ( l+1 < r ){
                int c = (l+r)/2;
                if ( a[c] * a[i] < x ) r = c;
                else                   l = c;
            }
            total += n-r;
        } else {
            int l = -1;
            int r = n;
            while ( l+1 < r ){
                int c = (l+r)/2;
                if ( a[c] * a[i] < x ) l=c;
                else                   r=c;
            }
            total += r;
        }
        if ( a[i] * a[i] < x ) total--;
    }
    total /= 2;
    return total;
}


int main(){
    
    if ( scanf("%d %lld",&n,&k) != 2 ){
        printf("N,K,読み込み失敗\n");
        exit (-1);
    }
    
    for ( int i=0; i<n; i++ ){
        int check = scanf("%lld",&a[i]);
        if ( check != 1 ){
            printf("a[%d]読み込み失敗\n",i);
            exit (-1);
        }
    }
    
    qsort( a, n, sizeof(long long), cmpfunc );
    
    long long l = -((long long)1.0e18)-1;
    long long r =  ((long long)1.0e18)+1;
    
    while ( l+1 < r ){
        
        long long x = (l+r)/2;
        //printf("count(x) : %lld\n",count(x));
        if ( count(x) < k ) l=x;
        else                r=x;
        //printf("x        : %lld\n",x);
        //printf("\n");
    }
    
    //printf("k : %lld\n",k);
    printf("%lld\n",l);
    
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1680000
a:
	.zero	1680000
	.globl	k
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.text
	.globl	cmpfunc
	.type	cmpfunc, @function
cmpfunc:
.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L2
	movl	$-1, %eax
	jmp	.L1
.L2:
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jne	.L4
	movl	$0, %eax
	jmp	.L1
.L4:
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L5
	movl	$1, %eax
	jmp	.L1
.L5:
.L1:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmpfunc, .-cmpfunc
	.globl	count
	.type	count, @function
count:
.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, -56(%rbp)
	movq	$0, -8(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L7
.L17:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	jns	.L8
	movl	$-1, -32(%rbp)
	movl	n(%rip), %eax
	movl	%eax, -28(%rbp)
	jmp	.L9
.L11:
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	a(%rip), %rax
	movq	(%rcx,%rax), %rax
	imulq	%rdx, %rax
	cmpq	%rax, -56(%rbp)
	jle	.L10
	movl	-12(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L9
.L10:
	movl	-12(%rbp), %eax
	movl	%eax, -32(%rbp)
.L9:
	movl	-32(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -28(%rbp)
	jg	.L11
	movl	n(%rip), %eax
	subl	-28(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
	jmp	.L12
.L8:
	movl	$-1, -24(%rbp)
	movl	n(%rip), %eax
	movl	%eax, -20(%rbp)
	jmp	.L13
.L15:
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	a(%rip), %rax
	movq	(%rcx,%rax), %rax
	imulq	%rdx, %rax
	cmpq	%rax, -56(%rbp)
	jle	.L14
	movl	-16(%rbp), %eax
	movl	%eax, -24(%rbp)
	jmp	.L13
.L14:
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
.L13:
	movl	-24(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -20(%rbp)
	jg	.L15
	movl	-20(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
.L12:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	a(%rip), %rax
	movq	(%rcx,%rax), %rax
	imulq	%rdx, %rax
	cmpq	%rax, -56(%rbp)
	jle	.L16
	subq	$1, -8(%rbp)
.L16:
	addl	$1, -36(%rbp)
.L7:
	movl	n(%rip), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L17
	movq	-8(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	count, .-count
	.section	.rodata
.LC0:
	.string	"%d %lld"
.LC1:
	.string	"N,K,\350\252\255\343\201\277\350\276\274\343\201\277\345\244\261\346\225\227"
.LC2:
	.string	"%lld"
.LC3:
	.string	"a[%d]\350\252\255\343\201\277\350\276\274\343\201\277\345\244\261\346\225\227\n"
.LC4:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %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
	cmpl	$2, %eax
	je	.L20
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$-1, %edi
	call	exit@PLT
.L20:
	movl	$0, -32(%rbp)
	jmp	.L21
.L23:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	%eax, -28(%rbp)
	cmpl	$1, -28(%rbp)
	je	.L22
	movl	-32(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$-1, %edi
	call	exit@PLT
.L22:
	addl	$1, -32(%rbp)
.L21:
	movl	n(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L23
	movl	n(%rip), %eax
	cltq
	leaq	cmpfunc(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movabsq	$-1000000000000000001, %rax
	movq	%rax, -24(%rbp)
	movabsq	$1000000000000000001, %rax
	movq	%rax, -16(%rbp)
	jmp	.L24
.L26:
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	count
	movq	k(%rip), %rdx
	cmpq	%rdx, %rax
	jge	.L25
	movq	-8(%rbp), %rax
	movq	%rax, -24(%rbp)
	jmp	.L24
.L25:
	movq	-8(%rbp), %rax
	movq	%rax, -16(%rbp)
.L24:
	movq	-24(%rbp), %rax
	addq	$1, %rax
	cmpq	%rax, -16(%rbp)
	jg	.L26
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	a
	.align 32
	.type	a, @object
	.size	a, 1680000
a:
	.zero	1680000
	.globl	k
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.text
	.globl	cmpfunc
	.type	cmpfunc, @function
cmpfunc:
.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L2
	movl	$-1, %eax
	jmp	.L1
.L2:
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jne	.L4
	movl	$0, %eax
	jmp	.L1
.L4:
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L5
	movl	$1, %eax
	jmp	.L1
.L5:
.L1:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmpfunc, .-cmpfunc
	.globl	count
	.type	count, @function
count:
.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, -56(%rbp)
	movq	$0, -8(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L7
.L17:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	jns	.L8
	movl	$-1, -32(%rbp)
	movl	n(%rip), %eax
	movl	%eax, -28(%rbp)
	jmp	.L9
.L11:
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	a(%rip), %rax
	movq	(%rcx,%rax), %rax
	imulq	%rdx, %rax
	cmpq	%rax, -56(%rbp)
	jle	.L10
	movl	-12(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L9
.L10:
	movl	-12(%rbp), %eax
	movl	%eax, -32(%rbp)
.L9:
	movl	-32(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -28(%rbp)
	jg	.L11
	movl	n(%rip), %eax
	subl	-28(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
	jmp	.L12
.L8:
	movl	$-1, -24(%rbp)
	movl	n(%rip), %eax
	movl	%eax, -20(%rbp)
	jmp	.L13
.L15:
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	a(%rip), %rax
	movq	(%rcx,%rax), %rax
	imulq	%rdx, %rax
	cmpq	%rax, -56(%rbp)
	jle	.L14
	movl	-16(%rbp), %eax
	movl	%eax, -24(%rbp)
	jmp	.L13
.L14:
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
.L13:
	movl	-24(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -20(%rbp)
	jg	.L15
	movl	-20(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
.L12:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	a(%rip), %rax
	movq	(%rcx,%rax), %rax
	imulq	%rdx, %rax
	cmpq	%rax, -56(%rbp)
	jle	.L16
	subq	$1, -8(%rbp)
.L16:
	addl	$1, -36(%rbp)
.L7:
	movl	n(%rip), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L17
	movq	-8(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	count, .-count
	.section	.rodata
.LC0:
	.string	"%d %lld"
.LC1:
	.string	"N,K,\350\252\255\343\201\277\350\276\274\343\201\277\345\244\261\346\225\227"
.LC2:
	.string	"%lld"
.LC3:
	.string	"a[%d]\350\252\255\343\201\277\350\276\274\343\201\277\345\244\261\346\225\227\n"
.LC4:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %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
	cmpl	$2, %eax
	je	.L20
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$-1, %edi
	call	exit@PLT
.L20:
	movl	$0, -32(%rbp)
	jmp	.L21
.L23:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	%eax, -28(%rbp)
	cmpl	$1, -28(%rbp)
	je	.L22
	movl	-32(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$-1, %edi
	call	exit@PLT
.L22:
	addl	$1, -32(%rbp)
.L21:
	movl	n(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L23
	movl	n(%rip), %eax
	cltq
	leaq	cmpfunc(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movabsq	$-1000000000000000001, %rax
	movq	%rax, -24(%rbp)
	movabsq	$1000000000000000001, %rax
	movq	%rax, -16(%rbp)
	jmp	.L24
.L26:
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	count
	movq	k(%rip), %rdx
	cmpq	%rdx, %rax
	jge	.L25
	movq	-8(%rbp), %rax
	movq	%rax, -24(%rbp)
	jmp	.L24
.L25:
	movq	-8(%rbp), %rax
	movq	%rax, -16(%rbp)
.L24:
	movq	-24(%rbp), %rax
	addq	$1, %rax
	cmpq	%rax, -16(%rbp)
	jg	.L26
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
