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>

int hondana_dansuu;
int book_num;
int book_atusa[100];

int is_possible(int width) {
	int now_dansuu;
	int now_width;
	int i;
	now_width=0;now_dansuu=1;
	for(i=0;i<book_num;i++) {
		now_width+=book_atusa[i];
		if(now_width>width) {
			now_width=book_atusa[i];
			if(now_width>width)return 0;
			now_dansuu++;
		}
	}
	return (now_dansuu<=hondana_dansuu)?1:0;
}

int main(void) {
	int i;
	int left,right,mid;
	while(1) {
		scanf("%d%d",&hondana_dansuu,&book_num);
		if(hondana_dansuu==0 && book_num==0)break;
		for(i=0;i<book_num;i++) {
			scanf("%d",&book_atusa[i]);
		}
		left=1;right=1500000;
		while(left<=right) {
			mid=(left+right)/2;
			if(is_possible(mid)) {
				right=mid-1;
			} else {
				left=mid+1;
			}
		}
		printf("%d\n",right+1);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	hondana_dansuu
	.bss
	.align 4
	.type	hondana_dansuu, @object
	.size	hondana_dansuu, 4
hondana_dansuu:
	.zero	4
	.globl	book_num
	.align 4
	.type	book_num, @object
	.size	book_num, 4
book_num:
	.zero	4
	.globl	book_atusa
	.align 32
	.type	book_atusa, @object
	.size	book_atusa, 400
book_atusa:
	.zero	400
	.text
	.globl	is_possible
	.type	is_possible, @function
is_possible:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$0, -8(%rbp)
	movl	$1, -12(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L6:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	book_atusa(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L3
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	book_atusa(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L4
	movl	$0, %eax
	jmp	.L5
.L4:
	addl	$1, -12(%rbp)
.L3:
	addl	$1, -4(%rbp)
.L2:
	movl	book_num(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L6
	movl	hondana_dansuu(%rip), %eax
	cmpl	%eax, -12(%rbp)
	setle	%al
	movzbl	%al, %eax
.L5:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	is_possible, .-is_possible
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
.L15:
	leaq	book_num(%rip), %rax
	movq	%rax, %rdx
	leaq	hondana_dansuu(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	hondana_dansuu(%rip), %eax
	testl	%eax, %eax
	jne	.L8
	movl	book_num(%rip), %eax
	testl	%eax, %eax
	je	.L18
.L8:
	movl	$0, -16(%rbp)
	jmp	.L10
.L11:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	book_atusa(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16(%rbp)
.L10:
	movl	book_num(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L11
	movl	$1, -12(%rbp)
	movl	$1500000, -8(%rbp)
	jmp	.L12
.L14:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	is_possible
	testl	%eax, %eax
	je	.L13
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L12
.L13:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
.L12:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L14
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L15
.L18:
	nop
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	is_possible
	.type	is_possible, @function
is_possible:
.LFB23:
	.cfi_startproc
	endbr64
	movl	book_num(%rip), %edx
	testl	%edx, %edx
	jle	.L6
	leaq	book_atusa(%rip), %rax
	leal	-1(%rdx), %ecx
	movl	$1, %esi
	leaq	4(%rax), %rdx
	leaq	(%rdx,%rcx,4), %r8
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rax), %ecx
	addl	%ecx, %edx
	cmpl	%edi, %edx
	jle	.L3
	cmpl	%edi, %ecx
	jg	.L7
	addl	$1, %esi
	movl	%ecx, %edx
.L3:
	addq	$4, %rax
	cmpq	%r8, %rax
	jne	.L5
.L2:
	xorl	%eax, %eax
	cmpl	%esi, hondana_dansuu(%rip)
	setge	%al
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	xorl	%eax, %eax
	ret
.L6:
	movl	$1, %esi
	jmp	.L2
	.cfi_endproc
.LFE23:
	.size	is_possible, .-is_possible
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	book_num(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	hondana_dansuu(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	book_atusa(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L20:
	xorl	%eax, %eax
	movq	%r14, %rdx
	leaq	.LC0(%rip), %rdi
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	movl	hondana_dansuu(%rip), %r12d
	movl	book_num(%rip), %r9d
	movl	%r12d, %eax
	orl	%r9d, %eax
	je	.L11
	testl	%r9d, %r9d
	jle	.L12
	leaq	book_atusa(%rip), %r15
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	book_num(%rip), %r9d
	addq	$4, %r15
	cmpl	%r12d, %r9d
	jg	.L13
	movl	hondana_dansuu(%rip), %r12d
.L12:
	leal	-1(%r9), %eax
	leaq	4+book_atusa(%rip), %rdi
	movl	$1500000, %r10d
	movl	$1, %r11d
	leaq	(%rdi,%rax,4), %r8
	.p2align 4,,10
	.p2align 3
.L19:
	leal	(%r11,%r10), %esi
	sarl	%esi
	testl	%r9d, %r9d
	jle	.L21
	movq	%rbp, %rax
	movl	$1, %edi
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%rax), %ecx
	addl	%ecx, %edx
	cmpl	%edx, %esi
	jge	.L15
	cmpl	%ecx, %esi
	jl	.L16
	addl	$1, %edi
	movl	%ecx, %edx
.L15:
	addq	$4, %rax
	cmpq	%rax, %r8
	jne	.L17
.L14:
	cmpl	%edi, %r12d
	jl	.L16
	leal	-1(%rsi), %r10d
.L18:
	cmpl	%r11d, %r10d
	jge	.L19
	leal	1(%r10), %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L16:
	leal	1(%rsi), %r11d
	jmp	.L18
.L21:
	movl	$1, %edi
	jmp	.L14
.L11:
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	book_atusa
	.bss
	.align 32
	.type	book_atusa, @object
	.size	book_atusa, 400
book_atusa:
	.zero	400
	.globl	book_num
	.align 4
	.type	book_num, @object
	.size	book_num, 4
book_num:
	.zero	4
	.globl	hondana_dansuu
	.align 4
	.type	hondana_dansuu, @object
	.size	hondana_dansuu, 4
hondana_dansuu:
	.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	is_possible
	.type	is_possible, @function
is_possible:
.LFB23:
	.cfi_startproc
	endbr64
	movl	book_num(%rip), %edx
	testl	%edx, %edx
	jle	.L6
	leaq	book_atusa(%rip), %rax
	leal	-1(%rdx), %ecx
	movl	$1, %esi
	leaq	4(%rax), %rdx
	leaq	(%rdx,%rcx,4), %r8
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rax), %ecx
	addl	%ecx, %edx
	cmpl	%edi, %edx
	jle	.L3
	cmpl	%edi, %ecx
	jg	.L7
	addl	$1, %esi
	movl	%ecx, %edx
.L3:
	addq	$4, %rax
	cmpq	%r8, %rax
	jne	.L5
.L2:
	xorl	%eax, %eax
	cmpl	%esi, hondana_dansuu(%rip)
	setge	%al
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	xorl	%eax, %eax
	ret
.L6:
	movl	$1, %esi
	jmp	.L2
	.cfi_endproc
.LFE23:
	.size	is_possible, .-is_possible
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	book_num(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	hondana_dansuu(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	book_atusa(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L20:
	xorl	%eax, %eax
	movq	%r14, %rdx
	leaq	.LC0(%rip), %rdi
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	movl	hondana_dansuu(%rip), %r12d
	movl	book_num(%rip), %r9d
	movl	%r12d, %eax
	orl	%r9d, %eax
	je	.L11
	testl	%r9d, %r9d
	jle	.L12
	leaq	book_atusa(%rip), %r15
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	book_num(%rip), %r9d
	addq	$4, %r15
	cmpl	%r12d, %r9d
	jg	.L13
	movl	hondana_dansuu(%rip), %r12d
.L12:
	leal	-1(%r9), %eax
	leaq	4+book_atusa(%rip), %rdi
	movl	$1500000, %r10d
	movl	$1, %r11d
	leaq	(%rdi,%rax,4), %r8
	.p2align 4,,10
	.p2align 3
.L19:
	leal	(%r11,%r10), %esi
	sarl	%esi
	testl	%r9d, %r9d
	jle	.L21
	movq	%rbp, %rax
	movl	$1, %edi
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%rax), %ecx
	addl	%ecx, %edx
	cmpl	%edx, %esi
	jge	.L15
	cmpl	%ecx, %esi
	jl	.L16
	addl	$1, %edi
	movl	%ecx, %edx
.L15:
	addq	$4, %rax
	cmpq	%rax, %r8
	jne	.L17
.L14:
	cmpl	%edi, %r12d
	jl	.L16
	leal	-1(%rsi), %r10d
.L18:
	cmpl	%r11d, %r10d
	jge	.L19
	leal	1(%r10), %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L16:
	leal	1(%rsi), %r11d
	jmp	.L18
.L21:
	movl	$1, %edi
	jmp	.L14
.L11:
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	book_atusa
	.bss
	.align 32
	.type	book_atusa, @object
	.size	book_atusa, 400
book_atusa:
	.zero	400
	.globl	book_num
	.align 4
	.type	book_num, @object
	.size	book_num, 4
book_num:
	.zero	4
	.globl	hondana_dansuu
	.align 4
	.type	hondana_dansuu, @object
	.size	hondana_dansuu, 4
hondana_dansuu:
	.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>

int hondana_dansuu;
int book_num;
int book_atusa[100];

int is_possible(int width) {
	int now_dansuu;
	int now_width;
	int i;
	now_width=0;now_dansuu=1;
	for(i=0;i<book_num;i++) {
		now_width+=book_atusa[i];
		if(now_width>width) {
			now_width=book_atusa[i];
			if(now_width>width)return 0;
			now_dansuu++;
		}
	}
	return (now_dansuu<=hondana_dansuu)?1:0;
}

int main(void) {
	int i;
	int left,right,mid;
	while(1) {
		scanf("%d%d",&hondana_dansuu,&book_num);
		if(hondana_dansuu==0 && book_num==0)break;
		for(i=0;i<book_num;i++) {
			scanf("%d",&book_atusa[i]);
		}
		left=1;right=1500000;
		while(left<=right) {
			mid=(left+right)/2;
			if(is_possible(mid)) {
				right=mid-1;
			} else {
				left=mid+1;
			}
		}
		printf("%d\n",right+1);
	}
	return 0;
}
3 9
500
300
800
200
100
600
900
700
400
4 3
1000
1000
1010
0 0
 3 9
500
311
800
335
100
600
900
700
400
4 3
1000
1000
1010
0 0
 3 9
559
311
800
335
100
563
900
700
400
4 3
1000
1000
1010
0 0
 3 9
500
300
800
200
100
600
900
1032
400
4 3
1000
1000
1000
0 0
 3 9
500
300
800
200
000
600
900
700
400
4 3
1000
1000
1010
0 0
 3 9
500
253
800
335
100
600
900
700
400
4 3
1000
1000
1010
0 0
 3 9
559
311
800
335
110
600
900
700
400
4 3
1000
1000
1010
0 0
 3 9
559
311
656
335
100
563
900
700
400
4 3
1000
1000
1010
0 0
 3 9
500
300
800
200
100
871
900
1032
400
4 3
1000
1000
1000
0 0
 3 9
500
300
800
200
001
600
900
700
400
4 3
1000
1000
1010
0 0

1800
1010
 1935
1010
 1898
1010
 1800
1000
 1700
1010
 1888
1010
 1945
1010
 1861
1010
 1871
1000
 1701
1010

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>

int hondana_dansuu;
int book_num;
int book_atusa[100];

int is_possible(int width) {
	int now_dansuu;
	int now_width;
	int i;
	now_width=0;now_dansuu=1;
	for(i=0;i<book_num;i++) {
		now_width+=book_atusa[i];
		if(now_width>width) {
			now_width=book_atusa[i];
			if(now_width>width)return 0;
			now_dansuu++;
		}
	}
	return (now_dansuu<=hondana_dansuu)?1:0;
}

int main(void) {
	int i;
	int left,right,mid;
	while(1) {
		scanf("%d%d",&hondana_dansuu,&book_num);
		if(hondana_dansuu==0 && book_num==0)break;
		for(i=0;i<book_num;i++) {
			scanf("%d",&book_atusa[i]);
		}
		left=1;right=1500000;
		while(left<=right) {
			mid=(left+right)/2;
			if(is_possible(mid)) {
				right=mid-1;
			} else {
				left=mid+1;
			}
		}
		printf("%d\n",right+1);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	hondana_dansuu
	.bss
	.align 4
	.type	hondana_dansuu, @object
	.size	hondana_dansuu, 4
hondana_dansuu:
	.zero	4
	.globl	book_num
	.align 4
	.type	book_num, @object
	.size	book_num, 4
book_num:
	.zero	4
	.globl	book_atusa
	.align 32
	.type	book_atusa, @object
	.size	book_atusa, 400
book_atusa:
	.zero	400
	.text
	.globl	is_possible
	.type	is_possible, @function
is_possible:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$0, -8(%rbp)
	movl	$1, -12(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L6:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	book_atusa(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L3
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	book_atusa(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L4
	movl	$0, %eax
	jmp	.L5
.L4:
	addl	$1, -12(%rbp)
.L3:
	addl	$1, -4(%rbp)
.L2:
	movl	book_num(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L6
	movl	hondana_dansuu(%rip), %eax
	cmpl	%eax, -12(%rbp)
	setle	%al
	movzbl	%al, %eax
.L5:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	is_possible, .-is_possible
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
.L15:
	leaq	book_num(%rip), %rax
	movq	%rax, %rdx
	leaq	hondana_dansuu(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	hondana_dansuu(%rip), %eax
	testl	%eax, %eax
	jne	.L8
	movl	book_num(%rip), %eax
	testl	%eax, %eax
	je	.L18
.L8:
	movl	$0, -16(%rbp)
	jmp	.L10
.L11:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	book_atusa(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16(%rbp)
.L10:
	movl	book_num(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L11
	movl	$1, -12(%rbp)
	movl	$1500000, -8(%rbp)
	jmp	.L12
.L14:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	is_possible
	testl	%eax, %eax
	je	.L13
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L12
.L13:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
.L12:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L14
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L15
.L18:
	nop
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	hondana_dansuu
	.bss
	.align 4
	.type	hondana_dansuu, @object
	.size	hondana_dansuu, 4
hondana_dansuu:
	.zero	4
	.globl	book_num
	.align 4
	.type	book_num, @object
	.size	book_num, 4
book_num:
	.zero	4
	.globl	book_atusa
	.align 32
	.type	book_atusa, @object
	.size	book_atusa, 400
book_atusa:
	.zero	400
	.text
	.globl	is_possible
	.type	is_possible, @function
is_possible:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$0, -8(%rbp)
	movl	$1, -12(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L6:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	book_atusa(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L3
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	book_atusa(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L4
	movl	$0, %eax
	jmp	.L5
.L4:
	addl	$1, -12(%rbp)
.L3:
	addl	$1, -4(%rbp)
.L2:
	movl	book_num(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L6
	movl	hondana_dansuu(%rip), %eax
	cmpl	%eax, -12(%rbp)
	setle	%al
	movzbl	%al, %eax
.L5:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	is_possible, .-is_possible
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
.L15:
	leaq	book_num(%rip), %rax
	movq	%rax, %rdx
	leaq	hondana_dansuu(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	hondana_dansuu(%rip), %eax
	testl	%eax, %eax
	jne	.L8
	movl	book_num(%rip), %eax
	testl	%eax, %eax
	je	.L18
.L8:
	movl	$0, -16(%rbp)
	jmp	.L10
.L11:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	book_atusa(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16(%rbp)
.L10:
	movl	book_num(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L11
	movl	$1, -12(%rbp)
	movl	$1500000, -8(%rbp)
	jmp	.L12
.L14:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	is_possible
	testl	%eax, %eax
	je	.L13
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L12
.L13:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
.L12:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L14
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L15
.L18:
	nop
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
