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 <string.h>
#include <math.h>
#define swap(type,a,b) do{type t=a;a=b;b=t;}while(0);
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ll long long
#define INF 2000000000
#define FOR(i,a,n) for(i=a;i<n;i++)
int comp(const void* a,const void* b){
	return *(int*)a-*(int*)b;
}
void fill(int a[],int b,int c){
	int i;
	FOR(i,0,b) a[i]=c;
	return;
}
int n,a,b;
int h[100000];
int check(ll t){
	int i,d=a-b;
	ll k=b*t;
	FOR(i,0,n){
		if(h[i]>k){
			t-=((h[i]-k+d-1)/d);
		}
	}
	return t>=0;
}
int main(void)
{
	int i;
	ll l=0,r=INF,mid;
	scanf("%d%d%d",&n,&a,&b);
	FOR(i,0,n) scanf("%d",&h[i]);
	while(r>l){
		mid=(l+r)/2;
		if(check(mid)) r=mid;
		else l=mid+1;
	}
	printf("%lld\n",r);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.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	comp, .-comp
	.globl	fill
	.type	fill, @function
fill:
.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, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L4
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-32(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L5
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fill, .-fill
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	h
	.align 32
	.type	h, @object
	.size	h, 400000
h:
	.zero	400000
	.text
	.globl	check
	.type	check, @function
check:
.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, -24(%rbp)
	movl	a(%rip), %eax
	movl	b(%rip), %edx
	subl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	b(%rip), %eax
	cltq
	movq	-24(%rbp), %rdx
	imulq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L8
.L10:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	cmpq	%rax, -8(%rbp)
	jge	.L9
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	subq	-8(%rbp), %rax
	movq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	addq	%rdx, %rax
	subq	$1, %rax
	movl	-12(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	subq	%rax, -24(%rbp)
.L9:
	addl	$1, -16(%rbp)
.L8:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L10
	movq	-24(%rbp), %rax
	notq	%rax
	shrq	$63, %rax
	movzbl	%al, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	check, .-check
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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
	movq	$0, -24(%rbp)
	movq	$2000000000, -16(%rbp)
	leaq	b(%rip), %rax
	movq	%rax, %rcx
	leaq	a(%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, -28(%rbp)
	jmp	.L13
.L14:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -28(%rbp)
.L13:
	movl	n(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L14
	jmp	.L15
.L17:
	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	check
	testl	%eax, %eax
	je	.L16
	movq	-8(%rbp), %rax
	movq	%rax, -16(%rbp)
	jmp	.L15
.L16:
	movq	-8(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -24(%rbp)
.L15:
	movq	-16(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jg	.L17
	movq	-16(%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
.LFE9:
	.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	comp
	.type	comp, @function
comp:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	comp, .-comp
	.p2align 4
	.globl	fill
	.type	fill, @function
fill:
.LFB52:
	.cfi_startproc
	endbr64
	movl	%esi, %ecx
	testl	%esi, %esi
	jle	.L3
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L8
	shrl	$2, %esi
	movd	%edx, %xmm1
	movq	%rdi, %rax
	subl	$1, %esi
	pshufd	$0, %xmm1, %xmm0
	salq	$4, %rsi
	leaq	16(%rdi,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rsi, %rax
	jne	.L6
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L10
.L5:
	movslq	%eax, %rsi
	movl	%edx, (%rdi,%rsi,4)
	leaq	0(,%rsi,4), %r8
	leal	1(%rax), %esi
	cmpl	%esi, %ecx
	jle	.L3
	addl	$2, %eax
	movl	%edx, 4(%rdi,%r8)
	cmpl	%eax, %ecx
	jle	.L3
	movl	%edx, 8(%rdi,%r8)
.L3:
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	ret
.L8:
	xorl	%eax, %eax
	jmp	.L5
	.cfi_endproc
.LFE52:
	.size	fill, .-fill
	.p2align 4
	.globl	check
	.type	check, @function
check:
.LFB53:
	.cfi_startproc
	endbr64
	movslq	b(%rip), %rsi
	movq	%rdi, %r9
	movl	n(%rip), %eax
	movl	a(%rip), %edi
	subl	%esi, %edi
	imulq	%r9, %rsi
	testl	%eax, %eax
	jle	.L12
	leaq	h(%rip), %rcx
	leal	-1(%rax), %edx
	movslq	%edi, %rdi
	leaq	4(%rcx), %rax
	leaq	(%rax,%rdx,4), %r8
	.p2align 4,,10
	.p2align 3
.L14:
	movslq	(%rcx), %rdx
	cmpq	%rsi, %rdx
	jle	.L13
	subq	%rsi, %rdx
	leaq	-1(%rdx,%rdi), %rax
	cqto
	idivq	%rdi
	subq	%rax, %r9
.L13:
	addq	$4, %rcx
	cmpq	%rcx, %r8
	jne	.L14
.L12:
	movq	%r9, %rax
	notq	%rax
	shrq	$63, %rax
	ret
	.cfi_endproc
.LFE53:
	.size	check, .-check
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB54:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	b(%rip), %rcx
	xorl	%eax, %eax
	leaq	a(%rip), %rdx
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	h(%rip), %rbx
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r12d
	testl	%r12d, %r12d
	jle	.L17
	movq	%rbx, %r13
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L18:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r12d
	addq	$4, %r13
	cmpl	%ebp, %r12d
	jg	.L18
.L17:
	movslq	b(%rip), %r13
	movl	a(%rip), %edi
	xorl	%ebp, %ebp
	leal	-1(%r12), %eax
	leaq	4+h(%rip), %rdx
	movl	$2000000000, %r11d
	subl	%r13d, %edi
	leaq	(%rdx,%rax,4), %r9
	movslq	%edi, %rdi
.L29:
	cmpq	%rbp, %r11
	jle	.L31
	.p2align 4,,10
	.p2align 3
.L23:
	leaq	(%r11,%rbp), %r10
	sarq	%r10
	movq	%r10, %rsi
	imulq	%r13, %rsi
	testl	%r12d, %r12d
	jle	.L25
	movq	%rbx, %rcx
	movq	%r10, %r8
	.p2align 4,,10
	.p2align 3
.L22:
	movslq	(%rcx), %rax
	cmpq	%rax, %rsi
	jge	.L21
	subq	%rsi, %rax
	leaq	-1(%rax,%rdi), %rax
	cqto
	idivq	%rdi
	subq	%rax, %r8
.L21:
	addq	$4, %rcx
	cmpq	%rcx, %r9
	jne	.L22
	testq	%r8, %r8
	js	.L32
.L25:
	movq	%r10, %r11
	cmpq	%rbp, %r11
	jg	.L23
.L31:
	movq	%r11, %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L32:
	.cfi_restore_state
	leaq	1(%r10), %rbp
	jmp	.L29
	.cfi_endproc
.LFE54:
	.size	main, .-main
	.globl	h
	.bss
	.align 32
	.type	h, @object
	.size	h, 400000
h:
	.zero	400000
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.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	comp
	.type	comp, @function
comp:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	comp, .-comp
	.p2align 4
	.globl	fill
	.type	fill, @function
fill:
.LFB52:
	.cfi_startproc
	endbr64
	movl	%esi, %ecx
	testl	%esi, %esi
	jle	.L3
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L8
	shrl	$2, %esi
	movd	%edx, %xmm1
	movq	%rdi, %rax
	subl	$1, %esi
	pshufd	$0, %xmm1, %xmm0
	salq	$4, %rsi
	leaq	16(%rdi,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rsi, %rax
	jne	.L6
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L10
.L5:
	movslq	%eax, %rsi
	movl	%edx, (%rdi,%rsi,4)
	leaq	0(,%rsi,4), %r8
	leal	1(%rax), %esi
	cmpl	%esi, %ecx
	jle	.L3
	addl	$2, %eax
	movl	%edx, 4(%rdi,%r8)
	cmpl	%eax, %ecx
	jle	.L3
	movl	%edx, 8(%rdi,%r8)
.L3:
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	ret
.L8:
	xorl	%eax, %eax
	jmp	.L5
	.cfi_endproc
.LFE52:
	.size	fill, .-fill
	.p2align 4
	.globl	check
	.type	check, @function
check:
.LFB53:
	.cfi_startproc
	endbr64
	movslq	b(%rip), %rsi
	movq	%rdi, %r9
	movl	n(%rip), %eax
	movl	a(%rip), %edi
	subl	%esi, %edi
	imulq	%r9, %rsi
	testl	%eax, %eax
	jle	.L12
	leaq	h(%rip), %rcx
	leal	-1(%rax), %edx
	movslq	%edi, %rdi
	leaq	4(%rcx), %rax
	leaq	(%rax,%rdx,4), %r8
	.p2align 4,,10
	.p2align 3
.L14:
	movslq	(%rcx), %rdx
	cmpq	%rsi, %rdx
	jle	.L13
	subq	%rsi, %rdx
	leaq	-1(%rdx,%rdi), %rax
	cqto
	idivq	%rdi
	subq	%rax, %r9
.L13:
	addq	$4, %rcx
	cmpq	%rcx, %r8
	jne	.L14
.L12:
	movq	%r9, %rax
	notq	%rax
	shrq	$63, %rax
	ret
	.cfi_endproc
.LFE53:
	.size	check, .-check
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB54:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	b(%rip), %rcx
	xorl	%eax, %eax
	leaq	a(%rip), %rdx
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	h(%rip), %rbx
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r12d
	testl	%r12d, %r12d
	jle	.L17
	movq	%rbx, %r13
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L18:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r12d
	addq	$4, %r13
	cmpl	%ebp, %r12d
	jg	.L18
.L17:
	movslq	b(%rip), %r13
	movl	a(%rip), %edi
	xorl	%ebp, %ebp
	leal	-1(%r12), %eax
	leaq	4+h(%rip), %rdx
	movl	$2000000000, %r11d
	subl	%r13d, %edi
	leaq	(%rdx,%rax,4), %r9
	movslq	%edi, %rdi
.L29:
	cmpq	%rbp, %r11
	jle	.L31
	.p2align 4,,10
	.p2align 3
.L23:
	leaq	(%r11,%rbp), %r10
	sarq	%r10
	movq	%r10, %rsi
	imulq	%r13, %rsi
	testl	%r12d, %r12d
	jle	.L25
	movq	%rbx, %rcx
	movq	%r10, %r8
	.p2align 4,,10
	.p2align 3
.L22:
	movslq	(%rcx), %rax
	cmpq	%rax, %rsi
	jge	.L21
	subq	%rsi, %rax
	leaq	-1(%rax,%rdi), %rax
	cqto
	idivq	%rdi
	subq	%rax, %r8
.L21:
	addq	$4, %rcx
	cmpq	%rcx, %r9
	jne	.L22
	testq	%r8, %r8
	js	.L32
.L25:
	movq	%r10, %r11
	cmpq	%rbp, %r11
	jg	.L23
.L31:
	movq	%r11, %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L32:
	.cfi_restore_state
	leaq	1(%r10), %rbp
	jmp	.L29
	.cfi_endproc
.LFE54:
	.size	main, .-main
	.globl	h
	.bss
	.align 32
	.type	h, @object
	.size	h, 400000
h:
	.zero	400000
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.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 <string.h>
#include <math.h>
#define swap(type,a,b) do{type t=a;a=b;b=t;}while(0);
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ll long long
#define INF 2000000000
#define FOR(i,a,n) for(i=a;i<n;i++)
int comp(const void* a,const void* b){
	return *(int*)a-*(int*)b;
}
void fill(int a[],int b,int c){
	int i;
	FOR(i,0,b) a[i]=c;
	return;
}
int n,a,b;
int h[100000];
int check(ll t){
	int i,d=a-b;
	ll k=b*t;
	FOR(i,0,n){
		if(h[i]>k){
			t-=((h[i]-k+d-1)/d);
		}
	}
	return t>=0;
}
int main(void)
{
	int i;
	ll l=0,r=INF,mid;
	scanf("%d%d%d",&n,&a,&b);
	FOR(i,0,n) scanf("%d",&h[i]);
	while(r>l){
		mid=(l+r)/2;
		if(check(mid)) r=mid;
		else l=mid+1;
	}
	printf("%lld\n",r);
	return 0;
}
4 5 3
8
7
4
2

2

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define swap(type,a,b) do{type t=a;a=b;b=t;}while(0);
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ll long long
#define INF 2000000000
#define FOR(i,a,n) for(i=a;i<n;i++)
int comp(const void* a,const void* b){
	return *(int*)a-*(int*)b;
}
void fill(int a[],int b,int c){
	int i;
	FOR(i,0,b) a[i]=c;
	return;
}
int n,a,b;
int h[100000];
int check(ll t){
	int i,d=a-b;
	ll k=b*t;
	FOR(i,0,n){
		if(h[i]>k){
			t-=((h[i]-k+d-1)/d);
		}
	}
	return t>=0;
}
int main(void)
{
	int i;
	ll l=0,r=INF,mid;
	scanf("%d%d%d",&n,&a,&b);
	FOR(i,0,n) scanf("%d",&h[i]);
	while(r>l){
		mid=(l+r)/2;
		if(check(mid)) r=mid;
		else l=mid+1;
	}
	printf("%lld\n",r);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.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	comp, .-comp
	.globl	fill
	.type	fill, @function
fill:
.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, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L4
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-32(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L5
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fill, .-fill
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	h
	.align 32
	.type	h, @object
	.size	h, 400000
h:
	.zero	400000
	.text
	.globl	check
	.type	check, @function
check:
.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, -24(%rbp)
	movl	a(%rip), %eax
	movl	b(%rip), %edx
	subl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	b(%rip), %eax
	cltq
	movq	-24(%rbp), %rdx
	imulq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L8
.L10:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	cmpq	%rax, -8(%rbp)
	jge	.L9
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	subq	-8(%rbp), %rax
	movq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	addq	%rdx, %rax
	subq	$1, %rax
	movl	-12(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	subq	%rax, -24(%rbp)
.L9:
	addl	$1, -16(%rbp)
.L8:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L10
	movq	-24(%rbp), %rax
	notq	%rax
	shrq	$63, %rax
	movzbl	%al, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	check, .-check
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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
	movq	$0, -24(%rbp)
	movq	$2000000000, -16(%rbp)
	leaq	b(%rip), %rax
	movq	%rax, %rcx
	leaq	a(%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, -28(%rbp)
	jmp	.L13
.L14:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -28(%rbp)
.L13:
	movl	n(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L14
	jmp	.L15
.L17:
	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	check
	testl	%eax, %eax
	je	.L16
	movq	-8(%rbp), %rax
	movq	%rax, -16(%rbp)
	jmp	.L15
.L16:
	movq	-8(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -24(%rbp)
.L15:
	movq	-16(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jg	.L17
	movq	-16(%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
.LFE9:
	.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	comp
	.type	comp, @function
comp:
.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	comp, .-comp
	.globl	fill
	.type	fill, @function
fill:
.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, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L4
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-32(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L5
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fill, .-fill
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	h
	.align 32
	.type	h, @object
	.size	h, 400000
h:
	.zero	400000
	.text
	.globl	check
	.type	check, @function
check:
.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, -24(%rbp)
	movl	a(%rip), %eax
	movl	b(%rip), %edx
	subl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	b(%rip), %eax
	cltq
	movq	-24(%rbp), %rdx
	imulq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L8
.L10:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	cmpq	%rax, -8(%rbp)
	jge	.L9
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	subq	-8(%rbp), %rax
	movq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	addq	%rdx, %rax
	subq	$1, %rax
	movl	-12(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	subq	%rax, -24(%rbp)
.L9:
	addl	$1, -16(%rbp)
.L8:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L10
	movq	-24(%rbp), %rax
	notq	%rax
	shrq	$63, %rax
	movzbl	%al, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	check, .-check
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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
	movq	$0, -24(%rbp)
	movq	$2000000000, -16(%rbp)
	leaq	b(%rip), %rax
	movq	%rax, %rcx
	leaq	a(%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, -28(%rbp)
	jmp	.L13
.L14:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -28(%rbp)
.L13:
	movl	n(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L14
	jmp	.L15
.L17:
	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	check
	testl	%eax, %eax
	je	.L16
	movq	-8(%rbp), %rax
	movq	%rax, -16(%rbp)
	jmp	.L15
.L16:
	movq	-8(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -24(%rbp)
.L15:
	movq	-16(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jg	.L17
	movq	-16(%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
.LFE9:
	.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:
