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>
#define ll long long
#define MAX 1000000000

ll n,k;
ll a[212345];

int main(){
  scanf("%lld%lld",&n,&k);
  for(int i=0;i<n;i++){
    scanf("%lld",&a[i]);}

  ll l=0,r=MAX+1;
  while(l<r){
    if(l+1==r) break;
    ll mid=(l+r)/2;
    ll count=0;
    for(int i=0;i<n;i++){
      count+=(a[i]-1)/mid;}
    if(count<=k) r=mid;
    else l=mid;}

  printf("%lld\n",r);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.globl	k
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1698760
a:
	.zero	1698760
	.section	.rodata
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	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, -40(%rbp)
	jmp	.L2
.L3:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -40(%rbp)
.L2:
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	n(%rip), %rax
	cmpq	%rax, %rdx
	jl	.L3
	movq	$0, -32(%rbp)
	movq	$1000000001, -24(%rbp)
	jmp	.L4
.L10:
	movq	-32(%rbp), %rax
	addq	$1, %rax
	cmpq	%rax, -24(%rbp)
	je	.L12
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	movq	$0, -16(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L7
.L8:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	subq	$1, %rax
	cqto
	idivq	-8(%rbp)
	addq	%rax, -16(%rbp)
	addl	$1, -36(%rbp)
.L7:
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	n(%rip), %rax
	cmpq	%rax, %rdx
	jl	.L8
	movq	k(%rip), %rax
	cmpq	%rax, -16(%rbp)
	jg	.L9
	movq	-8(%rbp), %rax
	movq	%rax, -24(%rbp)
	jmp	.L4
.L9:
	movq	-8(%rbp), %rax
	movq	%rax, -32(%rbp)
.L4:
	movq	-32(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jl	.L10
	jmp	.L6
.L12:
	nop
.L6:
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	k(%rip), %rdx
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	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
	leaq	a(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movq	n(%rip), %r9
	testq	%r9, %r9
	jle	.L2
	movq	%rbx, %r12
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movq	n(%rip), %r9
	addq	$8, %r12
	cmpq	%rbp, %r9
	jg	.L3
.L2:
	movq	k(%rip), %rbp
	leaq	(%rbx,%r9,8), %rdi
	movl	$1000000001, %r8d
	xorl	%r10d, %r10d
.L4:
	leaq	1(%r10), %r11
	cmpq	%r8, %r10
	jge	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	cmpq	%r8, %r11
	je	.L10
	leaq	(%r10,%r8), %rax
	movq	%rax, %rsi
	shrq	$63, %rsi
	addq	%rax, %rsi
	sarq	%rsi
	testq	%r9, %r9
	jle	.L11
	movq	%rbx, %rcx
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rcx), %rax
	addq	$8, %rcx
	subq	$1, %rax
	cqto
	idivq	%rsi
	addq	%rax, %r12
	cmpq	%rcx, %rdi
	jne	.L7
	cmpq	%r12, %rbp
	jl	.L19
.L12:
	movq	%rsi, %r8
	cmpq	%r8, %r10
	jl	.L9
.L10:
	movq	%r8, %rdx
	leaq	.LC2(%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
.L11:
	.cfi_restore_state
	xorl	%r12d, %r12d
	cmpq	%r12, %rbp
	jge	.L12
.L19:
	movq	%rsi, %r10
	jmp	.L4
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1698760
a:
	.zero	1698760
	.globl	k
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.globl	n
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	k(%rip), %rdx
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	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
	leaq	a(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movq	n(%rip), %r9
	testq	%r9, %r9
	jle	.L2
	movq	%rbx, %r12
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movq	n(%rip), %r9
	addq	$8, %r12
	cmpq	%rbp, %r9
	jg	.L3
.L2:
	movq	k(%rip), %rbp
	leaq	(%rbx,%r9,8), %rdi
	movl	$1000000001, %r8d
	xorl	%r10d, %r10d
.L4:
	leaq	1(%r10), %r11
	cmpq	%r8, %r10
	jge	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	cmpq	%r8, %r11
	je	.L10
	leaq	(%r10,%r8), %rax
	movq	%rax, %rsi
	shrq	$63, %rsi
	addq	%rax, %rsi
	sarq	%rsi
	testq	%r9, %r9
	jle	.L11
	movq	%rbx, %rcx
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rcx), %rax
	addq	$8, %rcx
	subq	$1, %rax
	cqto
	idivq	%rsi
	addq	%rax, %r12
	cmpq	%rcx, %rdi
	jne	.L7
	cmpq	%r12, %rbp
	jl	.L19
.L12:
	movq	%rsi, %r8
	cmpq	%r8, %r10
	jl	.L9
.L10:
	movq	%r8, %rdx
	leaq	.LC2(%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
.L11:
	.cfi_restore_state
	xorl	%r12d, %r12d
	cmpq	%r12, %rbp
	jge	.L12
.L19:
	movq	%rsi, %r10
	jmp	.L4
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1698760
a:
	.zero	1698760
	.globl	k
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.globl	n
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.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>
#define ll long long
#define MAX 1000000000

ll n,k;
ll a[212345];

int main(){
  scanf("%lld%lld",&n,&k);
  for(int i=0;i<n;i++){
    scanf("%lld",&a[i]);}

  ll l=0,r=MAX+1;
  while(l<r){
    if(l+1==r) break;
    ll mid=(l+r)/2;
    ll count=0;
    for(int i=0;i<n;i++){
      count+=(a[i]-1)/mid;}
    if(count<=k) r=mid;
    else l=mid;}

  printf("%lld\n",r);
  return 0;
}

2 6
7 9
 10 10
158260522 877914575 938084412 24979445 861648772 623690081 433933447 476190629 262703497 211047202
 2 6
1 9
 3 0
3 1 5
 10 10
158260522 877914575 602436426 24979445 861648772 623690081 433933447 476190629 262703497 180972685
 10 1
158260522 877914575 938084412 24979445 861648772 623690081 433933447 476190629 262703497 211047202
 3 2
1 11
 10 10
158260522 877914575 406320545 24979445 861648772 623690081 433933447 476190629 262703497 211047202
 2 6
1 6
 2 1
1 11

3
 311845041
 2
 5
 292638192
 877914575
 4
 287216258
 1
 6

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>
#define ll long long
#define MAX 1000000000

ll n,k;
ll a[212345];

int main(){
  scanf("%lld%lld",&n,&k);
  for(int i=0;i<n;i++){
    scanf("%lld",&a[i]);}

  ll l=0,r=MAX+1;
  while(l<r){
    if(l+1==r) break;
    ll mid=(l+r)/2;
    ll count=0;
    for(int i=0;i<n;i++){
      count+=(a[i]-1)/mid;}
    if(count<=k) r=mid;
    else l=mid;}

  printf("%lld\n",r);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.globl	k
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1698760
a:
	.zero	1698760
	.section	.rodata
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	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, -40(%rbp)
	jmp	.L2
.L3:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -40(%rbp)
.L2:
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	n(%rip), %rax
	cmpq	%rax, %rdx
	jl	.L3
	movq	$0, -32(%rbp)
	movq	$1000000001, -24(%rbp)
	jmp	.L4
.L10:
	movq	-32(%rbp), %rax
	addq	$1, %rax
	cmpq	%rax, -24(%rbp)
	je	.L12
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	movq	$0, -16(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L7
.L8:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	subq	$1, %rax
	cqto
	idivq	-8(%rbp)
	addq	%rax, -16(%rbp)
	addl	$1, -36(%rbp)
.L7:
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	n(%rip), %rax
	cmpq	%rax, %rdx
	jl	.L8
	movq	k(%rip), %rax
	cmpq	%rax, -16(%rbp)
	jg	.L9
	movq	-8(%rbp), %rax
	movq	%rax, -24(%rbp)
	jmp	.L4
.L9:
	movq	-8(%rbp), %rax
	movq	%rax, -32(%rbp)
.L4:
	movq	-32(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jl	.L10
	jmp	.L6
.L12:
	nop
.L6:
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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.
val
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.globl	k
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1698760
a:
	.zero	1698760
	.section	.rodata
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	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, -40(%rbp)
	jmp	.L2
.L3:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -40(%rbp)
.L2:
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	n(%rip), %rax
	cmpq	%rax, %rdx
	jl	.L3
	movq	$0, -32(%rbp)
	movq	$1000000001, -24(%rbp)
	jmp	.L4
.L10:
	movq	-32(%rbp), %rax
	addq	$1, %rax
	cmpq	%rax, -24(%rbp)
	je	.L12
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	movq	$0, -16(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L7
.L8:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	subq	$1, %rax
	cqto
	idivq	-8(%rbp)
	addq	%rax, -16(%rbp)
	addl	$1, -36(%rbp)
.L7:
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	n(%rip), %rax
	cmpq	%rax, %rdx
	jl	.L8
	movq	k(%rip), %rax
	cmpq	%rax, -16(%rbp)
	jg	.L9
	movq	-8(%rbp), %rax
	movq	%rax, -24(%rbp)
	jmp	.L4
.L9:
	movq	-8(%rbp), %rax
	movq	%rax, -32(%rbp)
.L4:
	movq	-32(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jl	.L10
	jmp	.L6
.L12:
	nop
.L6:
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
