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

```c
#include<stdio.h>
#include<stdlib.h>
#define INF 1001001001
int main(void){
	int n,a,b;
	int h[100100]={0};
	int i,j;
	long need;
	long ok,ng,mid;
	scanf("%d%d%d",&n,&a,&b);
	for(i=0;i<n;i++){
		scanf("%d",&h[i]);
	}
	ok=INF;ng=0;
	while(ok-ng>1){
		mid=(ok+ng)>>1;
		need=0;
		for(j=0;j<n;j++){
			if(h[j]-mid*b>=0){
				need+=(int)ceil(((double)(h[j]-mid*b)/(a-b)));
			}
		}
		if(need<=mid){
			ok=mid;
		}else{
			ng=mid;
		}
	}
	printf("%ld\n",ok);
	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d"
.LC5:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	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	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397360
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3120, %rsp
	.cfi_def_cfa_offset 400480
	movl	$400400, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 400424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	12(%rsp), %rcx
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebp
	testl	%ebp, %ebp
	jle	.L2
	movq	%rbx, %r13
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebp
	addq	$4, %r13
	cmpl	%r12d, %ebp
	jg	.L3
.L2:
	leal	-1(%rbp), %eax
	movslq	12(%rsp), %r12
	movl	8(%rsp), %r9d
	xorl	%r11d, %r11d
	movl	$1001001001, %r10d
	leaq	20(%rsp,%rax,4), %r8
	movsd	.LC2(%rip), %xmm4
	movsd	.LC3(%rip), %xmm3
	movq	%r10, %rax
	movsd	.LC4(%rip), %xmm5
	subl	%r12d, %r9d
	subq	%r11, %rax
	cmpq	$1, %rax
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	(%r11,%r10), %rdi
	sarq	%rdi
	testl	%ebp, %ebp
	jle	.L12
	movq	%r12, %rcx
	movq	%rbx, %rdx
	xorl	%esi, %esi
	imulq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L8:
	movslq	(%rdx), %rax
	subq	%rcx, %rax
	js	.L6
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r9d, %xmm1
	cvtsi2sdq	%rax, %xmm0
	divsd	%xmm1, %xmm0
	movapd	%xmm0, %xmm1
	andpd	%xmm3, %xmm1
	ucomisd	%xmm1, %xmm4
	jbe	.L7
	cvttsd2siq	%xmm0, %rax
	pxor	%xmm1, %xmm1
	movapd	%xmm0, %xmm2
	cvtsi2sdq	%rax, %xmm1
	cmpnlesd	%xmm1, %xmm2
	andpd	%xmm5, %xmm2
	addsd	%xmm2, %xmm1
	movapd	%xmm3, %xmm2
	andnpd	%xmm0, %xmm2
	movapd	%xmm1, %xmm0
	orpd	%xmm2, %xmm0
.L7:
	cvttsd2sil	%xmm0, %eax
	cltq
	addq	%rax, %rsi
.L6:
	addq	$4, %rdx
	cmpq	%rdx, %r8
	jne	.L8
	cmpq	%rsi, %rdi
	cmovl	%rdi, %r11
	cmovge	%rdi, %r10
.L20:
	movq	%r10, %rax
	subq	%r11, %rax
	cmpq	$1, %rax
	jg	.L10
.L18:
	xorl	%eax, %eax
	movq	%r10, %rdx
	movl	$1, %edi
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	movq	400424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$400432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	xorl	%esi, %esi
	cmpq	%rsi, %rdi
	cmovl	%rdi, %r11
	cmovge	%rdi, %r10
	jmp	.L20
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1127219200
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.section	.rodata.cst8
	.align 8
.LC4:
	.long	0
	.long	1072693248
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d"
.LC5:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	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	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397360
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3120, %rsp
	.cfi_def_cfa_offset 400480
	movl	$400400, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 400424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	12(%rsp), %rcx
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebp
	testl	%ebp, %ebp
	jle	.L2
	movq	%rbx, %r13
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebp
	addq	$4, %r13
	cmpl	%r12d, %ebp
	jg	.L3
.L2:
	leal	-1(%rbp), %eax
	movslq	12(%rsp), %r12
	movl	8(%rsp), %r9d
	xorl	%r11d, %r11d
	movl	$1001001001, %r10d
	leaq	20(%rsp,%rax,4), %r8
	movsd	.LC2(%rip), %xmm4
	movsd	.LC3(%rip), %xmm3
	movq	%r10, %rax
	movsd	.LC4(%rip), %xmm5
	subl	%r12d, %r9d
	subq	%r11, %rax
	cmpq	$1, %rax
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	(%r11,%r10), %rdi
	sarq	%rdi
	testl	%ebp, %ebp
	jle	.L12
	movq	%r12, %rcx
	movq	%rbx, %rdx
	xorl	%esi, %esi
	imulq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L8:
	movslq	(%rdx), %rax
	subq	%rcx, %rax
	js	.L6
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r9d, %xmm1
	cvtsi2sdq	%rax, %xmm0
	divsd	%xmm1, %xmm0
	movapd	%xmm0, %xmm1
	andpd	%xmm3, %xmm1
	ucomisd	%xmm1, %xmm4
	jbe	.L7
	cvttsd2siq	%xmm0, %rax
	pxor	%xmm1, %xmm1
	movapd	%xmm0, %xmm2
	cvtsi2sdq	%rax, %xmm1
	cmpnlesd	%xmm1, %xmm2
	andpd	%xmm5, %xmm2
	addsd	%xmm2, %xmm1
	movapd	%xmm3, %xmm2
	andnpd	%xmm0, %xmm2
	movapd	%xmm1, %xmm0
	orpd	%xmm2, %xmm0
.L7:
	cvttsd2sil	%xmm0, %eax
	cltq
	addq	%rax, %rsi
.L6:
	addq	$4, %rdx
	cmpq	%rdx, %r8
	jne	.L8
	cmpq	%rsi, %rdi
	cmovl	%rdi, %r11
	cmovge	%rdi, %r10
.L20:
	movq	%r10, %rax
	subq	%r11, %rax
	cmpq	$1, %rax
	jg	.L10
.L18:
	xorl	%eax, %eax
	movq	%r10, %rdx
	movl	$1, %edi
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	movq	400424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$400432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	xorl	%esi, %esi
	cmpq	%rsi, %rdi
	cmovl	%rdi, %r11
	cmovge	%rdi, %r10
	jmp	.L20
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1127219200
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.section	.rodata.cst8
	.align 8
.LC4:
	.long	0
	.long	1072693248
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d"
.LC5:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	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	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397360
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3120, %rsp
	.cfi_def_cfa_offset 400480
	movl	$400400, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 400424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	12(%rsp), %rcx
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebp
	testl	%ebp, %ebp
	jle	.L2
	movq	%rbx, %r13
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebp
	addq	$4, %r13
	cmpl	%r12d, %ebp
	jg	.L3
.L2:
	leal	-1(%rbp), %eax
	movslq	12(%rsp), %r12
	movl	8(%rsp), %r9d
	xorl	%r11d, %r11d
	movl	$1001001001, %r10d
	leaq	20(%rsp,%rax,4), %r8
	movsd	.LC2(%rip), %xmm4
	movsd	.LC3(%rip), %xmm3
	movq	%r10, %rax
	movsd	.LC4(%rip), %xmm5
	subl	%r12d, %r9d
	subq	%r11, %rax
	cmpq	$1, %rax
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	(%r11,%r10), %rdi
	sarq	%rdi
	testl	%ebp, %ebp
	jle	.L12
	movq	%r12, %rcx
	movq	%rbx, %rdx
	xorl	%esi, %esi
	imulq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L8:
	movslq	(%rdx), %rax
	subq	%rcx, %rax
	js	.L6
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r9d, %xmm1
	cvtsi2sdq	%rax, %xmm0
	divsd	%xmm1, %xmm0
	movapd	%xmm0, %xmm1
	andpd	%xmm3, %xmm1
	ucomisd	%xmm1, %xmm4
	jbe	.L7
	cvttsd2siq	%xmm0, %rax
	pxor	%xmm1, %xmm1
	movapd	%xmm0, %xmm2
	cvtsi2sdq	%rax, %xmm1
	cmpnlesd	%xmm1, %xmm2
	andpd	%xmm5, %xmm2
	addsd	%xmm2, %xmm1
	movapd	%xmm3, %xmm2
	andnpd	%xmm0, %xmm2
	movapd	%xmm1, %xmm0
	orpd	%xmm2, %xmm0
.L7:
	cvttsd2sil	%xmm0, %eax
	cltq
	addq	%rax, %rsi
.L6:
	addq	$4, %rdx
	cmpq	%rdx, %r8
	jne	.L8
	cmpq	%rsi, %rdi
	cmovl	%rdi, %r11
	cmovge	%rdi, %r10
.L20:
	movq	%r10, %rax
	subq	%r11, %rax
	cmpq	$1, %rax
	jg	.L10
.L18:
	xorl	%eax, %eax
	movq	%r10, %rdx
	movl	$1, %edi
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	movq	400424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$400432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	xorl	%esi, %esi
	cmpq	%rsi, %rdi
	cmovl	%rdi, %r11
	cmovge	%rdi, %r10
	jmp	.L20
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1127219200
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.section	.rodata.cst8
	.align 8
.LC4:
	.long	0
	.long	1072693248
	.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:
```
```c
#include<stdio.h>
#include<stdlib.h>
#define INF 1001001001
int main(void){
	int n,a,b;
	int h[100100]={0};
	int i,j;
	long need;
	long ok,ng,mid;
	scanf("%d%d%d",&n,&a,&b);
	for(i=0;i<n;i++){
		scanf("%d",&h[i]);
	}
	ok=INF;ng=0;
	while(ok-ng>1){
		mid=(ok+ng)>>1;
		need=0;
		for(j=0;j<n;j++){
			if(h[j]-mid*b>=0){
				need+=(int)ceil(((double)(h[j]-mid*b)/(a-b)));
			}
		}
		if(need<=mid){
			ok=mid;
		}else{
			ng=mid;
		}
	}
	printf("%ld\n",ok);
	return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<stdlib.h>
#define INF 1001001001
int main(void){
	int n,a,b;
	int h[100100]={0};
	int i,j;
	long need;
	long ok,ng,mid;
	scanf("%d%d%d",&n,&a,&b);
	for(i=0;i<n;i++){
		scanf("%d",&h[i]);
	}
	ok=INF;ng=0;
	while(ok-ng>1){
		mid=(ok+ng)>>1;
		need=0;
		for(j=0;j<n;j++){
			if(h[j]-mid*b>=0){
				need+=(int)ceil(((double)(h[j]-mid*b)/(a-b)));
			}
		}
		if(need<=mid){
			ok=mid;
		}else{
			ng=mid;
		}
	}
	printf("%ld\n",ok);
	return 0;
}
```

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.
Optimized Assembly Code:

5 2 1
187174154
900000000
1000000000
1000000000
1000000000
 4 5 3
8
7
6
2
 2 10 4
20
37
 5 2 1
187174154
900000000
1000000000
1000000000
1100000000
 2 17 4
20
37
 5 2 1
187174154
900000000
1000000000
1000000001
1100000000
 5 2 1
187174154
900000000
1000000000
1000000101
1100000000
 2 11 7
20
37
 5 2 1
105611412
900000000
1010000000
1000000101
1100000000
 5 3 1
105611412
900000000
1010000000
1000000101
1100000000

780000000
 2
 5
 800000000
 3
 800000001
 800000021
 4
 802000021
 668333351

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

```c
#include<stdio.h>
#include<stdlib.h>
#define INF 1001001001
int main(void){
	int n,a,b;
	int h[100100]={0};
	int i,j;
	long need;
	long ok,ng,mid;
	scanf("%d%d%d",&n,&a,&b);
	for(i=0;i<n;i++){
		scanf("%d",&h[i]);
	}
	ok=INF;ng=0;
	while(ok-ng>1){
		mid=(ok+ng)>>1;
		need=0;
		for(j=0;j<n;j++){
			if(h[j]-mid*b>=0){
				need+=(int)ceil(((double)(h[j]-mid*b)/(a-b)));
			}
		}
		if(need<=mid){
			ok=mid;
		}else{
			ng=mid;
		}
	}
	printf("%ld\n",ok);
	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d"
.LC5:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	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	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397360
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3120, %rsp
	.cfi_def_cfa_offset 400480
	movl	$400400, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 400424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	12(%rsp), %rcx
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebp
	testl	%ebp, %ebp
	jle	.L2
	movq	%rbx, %r13
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebp
	addq	$4, %r13
	cmpl	%r12d, %ebp
	jg	.L3
.L2:
	leal	-1(%rbp), %eax
	movslq	12(%rsp), %r12
	movl	8(%rsp), %r9d
	xorl	%r11d, %r11d
	movl	$1001001001, %r10d
	leaq	20(%rsp,%rax,4), %r8
	movsd	.LC2(%rip), %xmm4
	movsd	.LC3(%rip), %xmm3
	movq	%r10, %rax
	movsd	.LC4(%rip), %xmm5
	subl	%r12d, %r9d
	subq	%r11, %rax
	cmpq	$1, %rax
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	(%r11,%r10), %rdi
	sarq	%rdi
	testl	%ebp, %ebp
	jle	.L12
	movq	%r12, %rcx
	movq	%rbx, %rdx
	xorl	%esi, %esi
	imulq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L8:
	movslq	(%rdx), %rax
	subq	%rcx, %rax
	js	.L6
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r9d, %xmm1
	cvtsi2sdq	%rax, %xmm0
	divsd	%xmm1, %xmm0
	movapd	%xmm0, %xmm1
	andpd	%xmm3, %xmm1
	ucomisd	%xmm1, %xmm4
	jbe	.L7
	cvttsd2siq	%xmm0, %rax
	pxor	%xmm1, %xmm1
	movapd	%xmm0, %xmm2
	cvtsi2sdq	%rax, %xmm1
	cmpnlesd	%xmm1, %xmm2
	andpd	%xmm5, %xmm2
	addsd	%xmm2, %xmm1
	movapd	%xmm3, %xmm2
	andnpd	%xmm0, %xmm2
	movapd	%xmm1, %xmm0
	orpd	%xmm2, %xmm0
.L7:
	cvttsd2sil	%xmm0, %eax
	cltq
	addq	%rax, %rsi
.L6:
	addq	$4, %rdx
	cmpq	%rdx, %r8
	jne	.L8
	cmpq	%rsi, %rdi
	cmovl	%rdi, %r11
	cmovge	%rdi, %r10
.L20:
	movq	%r10, %rax
	subq	%r11, %rax
	cmpq	$1, %rax
	jg	.L10
.L18:
	xorl	%eax, %eax
	movq	%r10, %rdx
	movl	$1, %edi
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	movq	400424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$400432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	xorl	%esi, %esi
	cmpq	%rsi, %rdi
	cmovl	%rdi, %r11
	cmovge	%rdi, %r10
	jmp	.L20
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1127219200
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.section	.rodata.cst8
	.align 8
.LC4:
	.long	0
	.long	1072693248
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d"
.LC5:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	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	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397360
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3120, %rsp
	.cfi_def_cfa_offset 400480
	movl	$400400, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 400424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	12(%rsp), %rcx
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebp
	testl	%ebp, %ebp
	jle	.L2
	movq	%rbx, %r13
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebp
	addq	$4, %r13
	cmpl	%r12d, %ebp
	jg	.L3
.L2:
	leal	-1(%rbp), %eax
	movslq	12(%rsp), %r12
	movl	8(%rsp), %r9d
	xorl	%r11d, %r11d
	movl	$1001001001, %r10d
	leaq	20(%rsp,%rax,4), %r8
	movsd	.LC2(%rip), %xmm4
	movsd	.LC3(%rip), %xmm3
	movq	%r10, %rax
	movsd	.LC4(%rip), %xmm5
	subl	%r12d, %r9d
	subq	%r11, %rax
	cmpq	$1, %rax
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	(%r11,%r10), %rdi
	sarq	%rdi
	testl	%ebp, %ebp
	jle	.L12
	movq	%r12, %rcx
	movq	%rbx, %rdx
	xorl	%esi, %esi
	imulq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L8:
	movslq	(%rdx), %rax
	subq	%rcx, %rax
	js	.L6
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r9d, %xmm1
	cvtsi2sdq	%rax, %xmm0
	divsd	%xmm1, %xmm0
	movapd	%xmm0, %xmm1
	andpd	%xmm3, %xmm1
	ucomisd	%xmm1, %xmm4
	jbe	.L7
	cvttsd2siq	%xmm0, %rax
	pxor	%xmm1, %xmm1
	movapd	%xmm0, %xmm2
	cvtsi2sdq	%rax, %xmm1
	cmpnlesd	%xmm1, %xmm2
	andpd	%xmm5, %xmm2
	addsd	%xmm2, %xmm1
	movapd	%xmm3, %xmm2
	andnpd	%xmm0, %xmm2
	movapd	%xmm1, %xmm0
	orpd	%xmm2, %xmm0
.L7:
	cvttsd2sil	%xmm0, %eax
	cltq
	addq	%rax, %rsi
.L6:
	addq	$4, %rdx
	cmpq	%rdx, %r8
	jne	.L8
	cmpq	%rsi, %rdi
	cmovl	%rdi, %r11
	cmovge	%rdi, %r10
.L20:
	movq	%r10, %rax
	subq	%r11, %rax
	cmpq	$1, %rax
	jg	.L10
.L18:
	xorl	%eax, %eax
	movq	%r10, %rdx
	movl	$1, %edi
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	movq	400424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$400432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	xorl	%esi, %esi
	cmpq	%rsi, %rdi
	cmovl	%rdi, %r11
	cmovge	%rdi, %r10
	jmp	.L20
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1127219200
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.section	.rodata.cst8
	.align 8
.LC4:
	.long	0
	.long	1072693248
	.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:
```