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 cmp_int(const void* p, const void* q) {
    return *(int*)p - *(int*)q;
}

int main(void)
{
    const int N;
    long long K;
    scanf("%d %lld", &N, &K);
    int A[N];
    for(int i = 0; i < N; i++){
        scanf("%d", &A[i]);
    }
    int F[N];
    for(int i = 0; i < N; i++){
        scanf("%d", &F[i]);
    }
    qsort(A, N, sizeof(int), cmp_int);
    qsort(F, N, sizeof(int), cmp_int);

    long long l = 0;
    long long r = 1000000000000L;
    while(l < r){
        long long m = (l+r)/2;
        long c = 0;
        for(int i = 0; i < N; i++){
            long long t = A[N-1-i] - m/F[i];
            if(t > 0){
                c += t;
            }
        }
        if(K < c){
            l = m+1;
        } else {
            r = m;
        }
    }
    printf("%lld\n", r);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmp_int
	.type	cmp_int, @function
cmp_int:
.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), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp_int, .-cmp_int
	.section	.rodata
.LC0:
	.string	"%d %lld"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.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	$152, %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	-136(%rbp), %rdx
	leaq	-152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-152(%rbp), %eax
	cltq
	subq	$1, %rax
	movq	%rax, -104(%rbp)
	movl	-152(%rbp), %eax
	cltq
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movl	-152(%rbp), %eax
	cltq
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movl	-152(%rbp), %eax
	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
.L4:
	cmpq	%rdx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L6
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -96(%rbp)
	movl	$0, -148(%rbp)
	jmp	.L7
.L8:
	movl	-148(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-96(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -148(%rbp)
.L7:
	movl	-152(%rbp), %eax
	cmpl	%eax, -148(%rbp)
	jl	.L8
	movl	-152(%rbp), %eax
	cltq
	subq	$1, %rax
	movq	%rax, -88(%rbp)
	movl	-152(%rbp), %eax
	cltq
	movq	%rax, %r14
	movl	$0, %r15d
	movl	-152(%rbp), %eax
	cltq
	movq	%rax, %r12
	movl	$0, %r13d
	movl	-152(%rbp), %eax
	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
.L9:
	cmpq	%rdx, %rsp
	je	.L10
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L9
.L10:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L11
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L11:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	$0, -144(%rbp)
	jmp	.L12
.L13:
	movl	-144(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -144(%rbp)
.L12:
	movl	-152(%rbp), %eax
	cmpl	%eax, -144(%rbp)
	jl	.L13
	movl	-152(%rbp), %eax
	movslq	%eax, %rsi
	movq	-96(%rbp), %rax
	leaq	cmp_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-152(%rbp), %eax
	movslq	%eax, %rsi
	movq	-80(%rbp), %rax
	leaq	cmp_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -128(%rbp)
	movabsq	$1000000000000, %rax
	movq	%rax, -120(%rbp)
	jmp	.L14
.L19:
	movq	-128(%rbp), %rdx
	movq	-120(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -72(%rbp)
	movq	$0, -112(%rbp)
	movl	$0, -140(%rbp)
	jmp	.L15
.L17:
	movl	-152(%rbp), %eax
	subl	$1, %eax
	subl	-140(%rbp), %eax
	movl	%eax, %edx
	movq	-96(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movslq	%eax, %rcx
	movq	-80(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movslq	%eax, %rdi
	movq	-72(%rbp), %rax
	cqto
	idivq	%rdi
	movq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -64(%rbp)
	cmpq	$0, -64(%rbp)
	jle	.L16
	movq	-64(%rbp), %rax
	addq	%rax, -112(%rbp)
.L16:
	addl	$1, -140(%rbp)
.L15:
	movl	-152(%rbp), %eax
	cmpl	%eax, -140(%rbp)
	jl	.L17
	movq	-136(%rbp), %rax
	cmpq	%rax, -112(%rbp)
	jle	.L18
	movq	-72(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -128(%rbp)
	jmp	.L14
.L18:
	movq	-72(%rbp), %rax
	movq	%rax, -120(%rbp)
.L14:
	movq	-128(%rbp), %rax
	cmpq	-120(%rbp), %rax
	jl	.L19
	movq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%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	.L21
	call	__stack_chk_fail@PLT
.L21:
	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	cmp_int
	.type	cmp_int, @function
cmp_int:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp_int, .-cmp_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %lld"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.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	-64(%rbp), %rdx
	leaq	-68(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %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), %rsi
	movq	%rsp, %rcx
	leaq	15(,%rsi,4), %rdx
	movq	%rsi, %rax
	movq	%rdx, %rdi
	andq	$-4096, %rdx
	subq	%rdx, %rcx
	andq	$-16, %rdi
	cmpq	%rcx, %rsp
	je	.L5
.L40:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L40
.L5:
	andl	$4095, %edi
	subq	%rdi, %rsp
	testq	%rdi, %rdi
	jne	.L41
.L6:
	movq	%rsp, %r12
	testl	%eax, %eax
	jle	.L7
	movq	%r12, %r13
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-68(%rbp), %eax
	addq	$4, %r13
	cmpl	%ebx, %eax
	jg	.L8
	movslq	%eax, %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,4), %rdx
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	andq	$-16, %rcx
	subq	%rdx, %rdi
.L9:
	cmpq	%rdi, %rsp
	je	.L10
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L9
.L10:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L42
.L11:
	movq	%rsp, %rbx
	testl	%eax, %eax
	jle	.L12
	movq	%rbx, %r15
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	-68(%rbp), %eax
	addq	$4, %r15
	cmpl	%r13d, %eax
	jg	.L13
	movslq	%eax, %rsi
.L12:
	leaq	cmp_int(%rip), %r13
	movq	%r12, %rdi
	movl	$4, %edx
	movq	%r13, %rcx
	call	qsort@PLT
	movslq	-68(%rbp), %rsi
	movq	%r13, %rcx
	movq	%rbx, %rdi
	movl	$4, %edx
	xorl	%r13d, %r13d
	call	qsort@PLT
	movslq	-68(%rbp), %rax
	movq	-64(%rbp), %r15
	movq	%rax, %r14
	leaq	-4(%r12,%rax,4), %rax
	movabsq	$1000000000000, %r12
	movq	%rax, -88(%rbp)
	leal	-1(%r14), %eax
	leaq	4(%rbx,%rax,4), %r11
.L18:
	cmpq	%r12, %r13
	jge	.L43
	.p2align 4,,10
	.p2align 3
.L19:
	leaq	0(%r13,%r12), %r10
	sarq	%r10
	testl	%r14d, %r14d
	jle	.L24
	movq	-88(%rbp), %r8
	movq	%rbx, %rsi
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L17:
	movslq	(%rsi), %r9
	movq	%r10, %rax
	movslq	(%r8), %rcx
	cqto
	idivq	%r9
	subq	%rax, %rcx
	testq	%rcx, %rcx
	leaq	(%rdi,%rcx), %rax
	cmovg	%rax, %rdi
	addq	$4, %rsi
	subq	$4, %r8
	cmpq	%rsi, %r11
	jne	.L17
	cmpq	%rdi, %r15
	jl	.L44
.L25:
	movq	%r10, %r12
	cmpq	%r12, %r13
	jl	.L19
.L43:
	xorl	%eax, %eax
	movq	%r12, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L45
	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
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	xorl	%edi, %edi
	cmpq	%rdi, %r15
	jge	.L25
.L44:
	leaq	1(%r10), %r13
	jmp	.L18
.L41:
	orq	$0, -8(%rsp,%rdi)
	jmp	.L6
.L42:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L11
.L7:
	leaq	15(,%rsi,4), %rdx
	movq	%rsp, %rcx
	movq	%rdx, %rax
	andq	$-4096, %rdx
	andq	$-16, %rax
	subq	%rdx, %rcx
.L20:
	cmpq	%rcx, %rsp
	je	.L21
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L20
.L21:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	je	.L22
	orq	$0, -8(%rsp,%rax)
.L22:
	movq	%rsp, %rbx
	jmp	.L12
.L45:
	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	cmp_int
	.type	cmp_int, @function
cmp_int:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp_int, .-cmp_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %lld"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.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	-64(%rbp), %rdx
	leaq	-68(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %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), %rsi
	movq	%rsp, %rcx
	leaq	15(,%rsi,4), %rdx
	movq	%rsi, %rax
	movq	%rdx, %rdi
	andq	$-4096, %rdx
	subq	%rdx, %rcx
	andq	$-16, %rdi
	cmpq	%rcx, %rsp
	je	.L5
.L40:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L40
.L5:
	andl	$4095, %edi
	subq	%rdi, %rsp
	testq	%rdi, %rdi
	jne	.L41
.L6:
	movq	%rsp, %r12
	testl	%eax, %eax
	jle	.L7
	movq	%r12, %r13
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-68(%rbp), %eax
	addq	$4, %r13
	cmpl	%ebx, %eax
	jg	.L8
	movslq	%eax, %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,4), %rdx
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	andq	$-16, %rcx
	subq	%rdx, %rdi
.L9:
	cmpq	%rdi, %rsp
	je	.L10
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L9
.L10:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L42
.L11:
	movq	%rsp, %rbx
	testl	%eax, %eax
	jle	.L12
	movq	%rbx, %r15
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	-68(%rbp), %eax
	addq	$4, %r15
	cmpl	%r13d, %eax
	jg	.L13
	movslq	%eax, %rsi
.L12:
	leaq	cmp_int(%rip), %r13
	movq	%r12, %rdi
	movl	$4, %edx
	movq	%r13, %rcx
	call	qsort@PLT
	movslq	-68(%rbp), %rsi
	movq	%r13, %rcx
	movq	%rbx, %rdi
	movl	$4, %edx
	xorl	%r13d, %r13d
	call	qsort@PLT
	movslq	-68(%rbp), %rax
	movq	-64(%rbp), %r15
	movq	%rax, %r14
	leaq	-4(%r12,%rax,4), %rax
	movabsq	$1000000000000, %r12
	movq	%rax, -88(%rbp)
	leal	-1(%r14), %eax
	leaq	4(%rbx,%rax,4), %r11
.L18:
	cmpq	%r12, %r13
	jge	.L43
	.p2align 4,,10
	.p2align 3
.L19:
	leaq	0(%r13,%r12), %r10
	sarq	%r10
	testl	%r14d, %r14d
	jle	.L24
	movq	-88(%rbp), %r8
	movq	%rbx, %rsi
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L17:
	movslq	(%rsi), %r9
	movq	%r10, %rax
	movslq	(%r8), %rcx
	cqto
	idivq	%r9
	subq	%rax, %rcx
	testq	%rcx, %rcx
	leaq	(%rdi,%rcx), %rax
	cmovg	%rax, %rdi
	addq	$4, %rsi
	subq	$4, %r8
	cmpq	%rsi, %r11
	jne	.L17
	cmpq	%rdi, %r15
	jl	.L44
.L25:
	movq	%r10, %r12
	cmpq	%r12, %r13
	jl	.L19
.L43:
	xorl	%eax, %eax
	movq	%r12, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L45
	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
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	xorl	%edi, %edi
	cmpq	%rdi, %r15
	jge	.L25
.L44:
	leaq	1(%r10), %r13
	jmp	.L18
.L41:
	orq	$0, -8(%rsp,%rdi)
	jmp	.L6
.L42:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L11
.L7:
	leaq	15(,%rsi,4), %rdx
	movq	%rsp, %rcx
	movq	%rdx, %rax
	andq	$-4096, %rdx
	andq	$-16, %rax
	subq	%rdx, %rcx
.L20:
	cmpq	%rcx, %rsp
	je	.L21
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L20
.L21:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	je	.L22
	orq	$0, -8(%rsp,%rax)
.L22:
	movq	%rsp, %rbx
	jmp	.L12
.L45:
	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 cmp_int(const void* p, const void* q) {
    return *(int*)p - *(int*)q;
}

int main(void)
{
    const int N;
    long long K;
    scanf("%d %lld", &N, &K);
    int A[N];
    for(int i = 0; i < N; i++){
        scanf("%d", &A[i]);
    }
    int F[N];
    for(int i = 0; i < N; i++){
        scanf("%d", &F[i]);
    }
    qsort(A, N, sizeof(int), cmp_int);
    qsort(F, N, sizeof(int), cmp_int);

    long long l = 0;
    long long r = 1000000000000L;
    while(l < r){
        long long m = (l+r)/2;
        long c = 0;
        for(int i = 0; i < N; i++){
            long long t = A[N-1-i] - m/F[i];
            if(t > 0){
                c += t;
            }
        }
        if(K < c){
            l = m+1;
        } else {
            r = m;
        }
    }
    printf("%lld\n", r);
    return 0;
}

3 1
4 2 1
2 3 1
 3 6
4 2 1
2 3 1
 11 14
3 1 4 1 5 9 2 6 5 3 5
8 9 7 9 3 1 3 8 4 6 2
 3 1
8 2 1
2 3 1
 11 14
3 1 4 1 2 9 2 6 5 3 5
8 9 7 26 3 1 3 8 4 6 2
 11 14
3 1 4 1 2 9 2 11 5 3 10
8 9 7 26 3 1 3 8 4 6 2
 11 14
3 1 4 1 2 9 2 11 5 3 10
8 9 7 26 3 2 3 8 4 6 2
 11 14
3 1 4 1 2 9 2 11 1 3 10
8 9 7 12 3 2 3 8 4 6 2
 3 8
4 1 1
2 3 1
 3 1
2 2 1
2 3 1

4
 1
 12
 7
 10
 15
 16
 14
 0
 3

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 cmp_int(const void* p, const void* q) {
    return *(int*)p - *(int*)q;
}

int main(void)
{
    const int N;
    long long K;
    scanf("%d %lld", &N, &K);
    int A[N];
    for(int i = 0; i < N; i++){
        scanf("%d", &A[i]);
    }
    int F[N];
    for(int i = 0; i < N; i++){
        scanf("%d", &F[i]);
    }
    qsort(A, N, sizeof(int), cmp_int);
    qsort(F, N, sizeof(int), cmp_int);

    long long l = 0;
    long long r = 1000000000000L;
    while(l < r){
        long long m = (l+r)/2;
        long c = 0;
        for(int i = 0; i < N; i++){
            long long t = A[N-1-i] - m/F[i];
            if(t > 0){
                c += t;
            }
        }
        if(K < c){
            l = m+1;
        } else {
            r = m;
        }
    }
    printf("%lld\n", r);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmp_int
	.type	cmp_int, @function
cmp_int:
.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), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp_int, .-cmp_int
	.section	.rodata
.LC0:
	.string	"%d %lld"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.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	$152, %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	-136(%rbp), %rdx
	leaq	-152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-152(%rbp), %eax
	cltq
	subq	$1, %rax
	movq	%rax, -104(%rbp)
	movl	-152(%rbp), %eax
	cltq
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movl	-152(%rbp), %eax
	cltq
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movl	-152(%rbp), %eax
	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
.L4:
	cmpq	%rdx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L6
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -96(%rbp)
	movl	$0, -148(%rbp)
	jmp	.L7
.L8:
	movl	-148(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-96(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -148(%rbp)
.L7:
	movl	-152(%rbp), %eax
	cmpl	%eax, -148(%rbp)
	jl	.L8
	movl	-152(%rbp), %eax
	cltq
	subq	$1, %rax
	movq	%rax, -88(%rbp)
	movl	-152(%rbp), %eax
	cltq
	movq	%rax, %r14
	movl	$0, %r15d
	movl	-152(%rbp), %eax
	cltq
	movq	%rax, %r12
	movl	$0, %r13d
	movl	-152(%rbp), %eax
	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
.L9:
	cmpq	%rdx, %rsp
	je	.L10
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L9
.L10:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L11
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L11:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	$0, -144(%rbp)
	jmp	.L12
.L13:
	movl	-144(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -144(%rbp)
.L12:
	movl	-152(%rbp), %eax
	cmpl	%eax, -144(%rbp)
	jl	.L13
	movl	-152(%rbp), %eax
	movslq	%eax, %rsi
	movq	-96(%rbp), %rax
	leaq	cmp_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-152(%rbp), %eax
	movslq	%eax, %rsi
	movq	-80(%rbp), %rax
	leaq	cmp_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -128(%rbp)
	movabsq	$1000000000000, %rax
	movq	%rax, -120(%rbp)
	jmp	.L14
.L19:
	movq	-128(%rbp), %rdx
	movq	-120(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -72(%rbp)
	movq	$0, -112(%rbp)
	movl	$0, -140(%rbp)
	jmp	.L15
.L17:
	movl	-152(%rbp), %eax
	subl	$1, %eax
	subl	-140(%rbp), %eax
	movl	%eax, %edx
	movq	-96(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movslq	%eax, %rcx
	movq	-80(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movslq	%eax, %rdi
	movq	-72(%rbp), %rax
	cqto
	idivq	%rdi
	movq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -64(%rbp)
	cmpq	$0, -64(%rbp)
	jle	.L16
	movq	-64(%rbp), %rax
	addq	%rax, -112(%rbp)
.L16:
	addl	$1, -140(%rbp)
.L15:
	movl	-152(%rbp), %eax
	cmpl	%eax, -140(%rbp)
	jl	.L17
	movq	-136(%rbp), %rax
	cmpq	%rax, -112(%rbp)
	jle	.L18
	movq	-72(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -128(%rbp)
	jmp	.L14
.L18:
	movq	-72(%rbp), %rax
	movq	%rax, -120(%rbp)
.L14:
	movq	-128(%rbp), %rax
	cmpq	-120(%rbp), %rax
	jl	.L19
	movq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%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	.L21
	call	__stack_chk_fail@PLT
.L21:
	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	cmp_int
	.type	cmp_int, @function
cmp_int:
.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), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp_int, .-cmp_int
	.section	.rodata
.LC0:
	.string	"%d %lld"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.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	$152, %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	-136(%rbp), %rdx
	leaq	-152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-152(%rbp), %eax
	cltq
	subq	$1, %rax
	movq	%rax, -104(%rbp)
	movl	-152(%rbp), %eax
	cltq
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movl	-152(%rbp), %eax
	cltq
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movl	-152(%rbp), %eax
	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
.L4:
	cmpq	%rdx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L6
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -96(%rbp)
	movl	$0, -148(%rbp)
	jmp	.L7
.L8:
	movl	-148(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-96(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -148(%rbp)
.L7:
	movl	-152(%rbp), %eax
	cmpl	%eax, -148(%rbp)
	jl	.L8
	movl	-152(%rbp), %eax
	cltq
	subq	$1, %rax
	movq	%rax, -88(%rbp)
	movl	-152(%rbp), %eax
	cltq
	movq	%rax, %r14
	movl	$0, %r15d
	movl	-152(%rbp), %eax
	cltq
	movq	%rax, %r12
	movl	$0, %r13d
	movl	-152(%rbp), %eax
	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
.L9:
	cmpq	%rdx, %rsp
	je	.L10
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L9
.L10:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L11
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L11:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	$0, -144(%rbp)
	jmp	.L12
.L13:
	movl	-144(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -144(%rbp)
.L12:
	movl	-152(%rbp), %eax
	cmpl	%eax, -144(%rbp)
	jl	.L13
	movl	-152(%rbp), %eax
	movslq	%eax, %rsi
	movq	-96(%rbp), %rax
	leaq	cmp_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-152(%rbp), %eax
	movslq	%eax, %rsi
	movq	-80(%rbp), %rax
	leaq	cmp_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -128(%rbp)
	movabsq	$1000000000000, %rax
	movq	%rax, -120(%rbp)
	jmp	.L14
.L19:
	movq	-128(%rbp), %rdx
	movq	-120(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -72(%rbp)
	movq	$0, -112(%rbp)
	movl	$0, -140(%rbp)
	jmp	.L15
.L17:
	movl	-152(%rbp), %eax
	subl	$1, %eax
	subl	-140(%rbp), %eax
	movl	%eax, %edx
	movq	-96(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movslq	%eax, %rcx
	movq	-80(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movslq	%eax, %rdi
	movq	-72(%rbp), %rax
	cqto
	idivq	%rdi
	movq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -64(%rbp)
	cmpq	$0, -64(%rbp)
	jle	.L16
	movq	-64(%rbp), %rax
	addq	%rax, -112(%rbp)
.L16:
	addl	$1, -140(%rbp)
.L15:
	movl	-152(%rbp), %eax
	cmpl	%eax, -140(%rbp)
	jl	.L17
	movq	-136(%rbp), %rax
	cmpq	%rax, -112(%rbp)
	jle	.L18
	movq	-72(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -128(%rbp)
	jmp	.L14
.L18:
	movq	-72(%rbp), %rax
	movq	%rax, -120(%rbp)
.L14:
	movq	-128(%rbp), %rax
	cmpq	-120(%rbp), %rax
	jl	.L19
	movq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%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	.L21
	call	__stack_chk_fail@PLT
.L21:
	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:
