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>

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;
}```

Assembly Code:

```assembly
	.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:
```

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
	.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
```assembly
	.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:
```
```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;
}```
Given the following C 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;
}```

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:

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 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;
}```

Assembly Code:

```assembly
	.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:
```

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
	.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:
```