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

```c
// AOJ Vol-3 0312: Net Cafe
// 2017.9.30

#include <stdio.h>

#define MAX 200005
#define N 16

int m;
int w[MAX], t[MAX];;
int sw[MAX], st[MAX];
int c[N], b[N];
int dp[N][32770];		// 32768 = 2^15

int bsch(int *a, int x)
{
	int h, l = 1, r = m;

    while (l < r) {
        h = (l + r) >> 1;
		if (a[h] == x) return h;
        if (a[h] < x) l = h + 1; else r = h;
    }
	return l-1;
}

int main()
{
	int n, i, j, k, x, y, lim, ans;

	scanf("%d%d", &m, &n); m++;
	for (sw[0] = st[0] = 0, i = 1; i < m; i++) {
		scanf("%d%d", w+i, t+i);
		sw[i] = sw[i-1] + w[i], st[i] = st[i-1] + t[i];
	}
	for (i = 0; i < n; i++) scanf("%d%d", c+i, b+i);

//	memset(dp, 0, sizeof(dp));
	for (i = 0; i < n; i++)	{
		x = bsch(sw, c[i]);
		y = bsch(st, b[i]);
		if (x > y) x = y;
		if (x == m-1) { ans = m-1; goto Done; }
		dp[0][1<<i] = x;
	}

	lim = 1 << n;
	for (k = 1; k < lim; k++) {
		for (i = 0; i < n; i++)	{			// this book shelf
			for (j = 0; j < n; j++) {		// last book shelf
				if (dp[j][k] && !(k & (1<<i))) {
					int ii = k | (1 << i);
					x = bsch(sw, sw[dp[j][k]] + c[i]);
					y = bsch(st, st[dp[j][k]] + b[i]);
					if (x > y) x = y;
					if (x == m-1) { ans = m-1; goto Done; }
					if (x > dp[i][ii]) dp[i][ii] = x;
				}
			}
		}
	}
	for (ans = 0, i = 0; i < n; i++) if (dp[i][lim-1] > ans) ans = dp[i][lim-1];
Done:
	printf("%d\n", ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	m
	.bss
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 800020
w:
	.zero	800020
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 800020
t:
	.zero	800020
	.globl	sw
	.align 32
	.type	sw, @object
	.size	sw, 800020
sw:
	.zero	800020
	.globl	st
	.align 32
	.type	st, @object
	.size	st, 800020
st:
	.zero	800020
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 64
c:
	.zero	64
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 64
b:
	.zero	64
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 2097280
dp:
	.zero	2097280
	.text
	.globl	bsch
	.type	bsch, @function
bsch:
.LFB0:
	.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	$1, -12(%rbp)
	movl	m(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L2
.L6:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jne	.L3
	movl	-4(%rbp), %eax
	jmp	.L4
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L5
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L2
.L5:
	movl	-4(%rbp), %eax
	movl	%eax, -8(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jl	.L6
	movl	-12(%rbp), %eax
	subl	$1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	bsch, .-bsch
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-44(%rbp), %rax
	movq	%rax, %rdx
	leaq	m(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %eax
	addl	$1, %eax
	movl	%eax, m(%rip)
	movl	$0, st(%rip)
	movl	st(%rip), %eax
	movl	%eax, sw(%rip)
	movl	$1, -40(%rbp)
	jmp	.L8
.L9:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	addq	%rax, %rdx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	w(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sw(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sw(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-40(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	st(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	st(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -40(%rbp)
.L8:
	movl	m(%rip), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L9
	movl	$0, -40(%rbp)
	jmp	.L10
.L11:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	addq	%rax, %rdx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -40(%rbp)
.L10:
	movl	-44(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L11
	movl	$0, -40(%rbp)
	jmp	.L12
.L16:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	sw(%rip), %rax
	movq	%rax, %rdi
	call	bsch
	movl	%eax, -28(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	st(%rip), %rax
	movq	%rax, %rdi
	call	bsch
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jle	.L13
	movl	-12(%rbp), %eax
	movl	%eax, -28(%rbp)
.L13:
	movl	m(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -28(%rbp)
	jne	.L14
	movl	m(%rip), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L15
.L14:
	movl	-40(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -40(%rbp)
.L12:
	movl	-44(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L16
	movl	-44(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	$1, -32(%rbp)
	jmp	.L17
.L25:
	movl	$0, -40(%rbp)
	jmp	.L18
.L24:
	movl	$0, -36(%rbp)
	jmp	.L19
.L23:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L20
	movl	-40(%rbp), %eax
	movl	-32(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L20
	movl	-40(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	orl	-32(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sw(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, %esi
	leaq	sw(%rip), %rax
	movq	%rax, %rdi
	call	bsch
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	st(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, %esi
	leaq	st(%rip), %rax
	movq	%rax, %rdi
	call	bsch
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jle	.L21
	movl	-12(%rbp), %eax
	movl	%eax, -28(%rbp)
.L21:
	movl	m(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -28(%rbp)
	jne	.L22
	movl	m(%rip), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L15
.L22:
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L20
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L20:
	addl	$1, -36(%rbp)
.L19:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L23
	addl	$1, -40(%rbp)
.L18:
	movl	-44(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L24
	addl	$1, -32(%rbp)
.L17:
	movl	-32(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L25
	movl	$0, -24(%rbp)
	movl	$0, -40(%rbp)
	jmp	.L26
.L28:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L27
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -24(%rbp)
.L27:
	addl	$1, -40(%rbp)
.L26:
	movl	-44(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L28
	nop
.L15:
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	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	bsch
	.type	bsch, @function
bsch:
.LFB23:
	.cfi_startproc
	endbr64
	movl	m(%rip), %edx
	movl	$1, %ecx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%rcx,%rdx), %eax
	sarl	%eax
	movslq	%eax, %r8
	cmpl	%esi, (%rdi,%r8,4)
	je	.L1
	jl	.L8
	movl	%eax, %edx
.L4:
	cmpl	%edx, %ecx
	jl	.L5
	leal	-1(%rcx), %eax
.L1:
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	leal	1(%rax), %ecx
	jmp	.L4
	.cfi_endproc
.LFE23:
	.size	bsch, .-bsch
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.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
	leaq	m(%rip), %rsi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	52(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	m(%rip), %eax
	movl	$0, st(%rip)
	movl	$0, sw(%rip)
	addl	$1, %eax
	movl	%eax, m(%rip)
	cmpl	$1, %eax
	jle	.L10
	leaq	sw(%rip), %r15
	leaq	4+w(%rip), %r12
	movl	$1, %ebx
	leaq	4+t(%rip), %rbp
	leaq	-4(%r15), %r14
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rbp, %rdx
	movq	%r12, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r12), %eax
	leaq	-4+st(%rip), %rcx
	addl	(%r14,%rbx,4), %eax
	movl	%eax, (%r15,%rbx,4)
	movl	0(%rbp), %eax
	addq	$4, %r12
	addq	$4, %rbp
	addl	(%rcx,%rbx,4), %eax
	addq	$4, %rcx
	movl	%eax, (%rcx,%rbx,4)
	addq	$1, %rbx
	cmpl	%ebx, m(%rip)
	jg	.L11
.L10:
	movl	52(%rsp), %eax
	movl	%eax, 40(%rsp)
	testl	%eax, %eax
	jle	.L12
	leaq	c(%rip), %rbx
	xorl	%r12d, %r12d
	leaq	b(%rip), %rbp
	movq	%rbx, %r14
	.p2align 4,,10
	.p2align 3
.L13:
	leaq	0(%rbp,%r12,4), %rdx
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	52(%rsp), %rax
	addq	$1, %r12
	addq	$4, %r14
	cmpl	%r12d, %eax
	jg	.L13
	movl	%eax, 40(%rsp)
	testl	%eax, %eax
	jle	.L12
	movl	m(%rip), %r13d
	movq	%rax, (%rsp)
	xorl	%r12d, %r12d
	leaq	sw(%rip), %r11
	leaq	st(%rip), %r10
	leaq	dp(%rip), %r15
	leal	-1(%r13), %r14d
	.p2align 4,,10
	.p2align 3
.L23:
	movl	(%rbx,%r12,4), %r8d
	movl	%r12d, %ecx
	movl	%r13d, %eax
	movl	$1, %esi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L17:
	leal	(%rax,%rsi), %edx
	sarl	%edx
	movslq	%edx, %rdi
	cmpl	(%r11,%rdi,4), %r8d
	je	.L15
	jg	.L63
	movl	%edx, %eax
.L16:
	cmpl	%esi, %eax
	jg	.L17
	leal	-1(%rsi), %edx
.L15:
	movl	0(%rbp,%r12,4), %r9d
	movl	%r13d, %esi
	movl	$1, %edi
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L21:
	leal	(%rsi,%rdi), %eax
	sarl	%eax
	movslq	%eax, %r8
	cmpl	(%r10,%r8,4), %r9d
	je	.L19
	jg	.L64
	movl	%eax, %esi
.L20:
	cmpl	%edi, %esi
	jg	.L21
	leal	-1(%rdi), %eax
.L19:
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	cmpl	%eax, %r14d
	je	.L60
	movl	$1, %edx
	addq	$1, %r12
	sall	%cl, %edx
	movslq	%edx, %rdx
	movl	%eax, (%r15,%rdx,4)
	cmpq	%r12, (%rsp)
	jne	.L23
.L12:
	movl	40(%rsp), %eax
	movl	$1, %ebx
	movl	%eax, %ecx
	sall	%cl, %ebx
	movl	%ebx, 44(%rsp)
	testl	%eax, %eax
	je	.L24
	subl	$1, %eax
	movl	m(%rip), %ebx
	movl	$1, 12(%rsp)
	leaq	131084+dp(%rip), %r11
	movq	%rax, 24(%rsp)
	imulq	$131080, %rax, %rax
	leaq	sw(%rip), %r10
	movl	%ebx, (%rsp)
	subl	$1, %ebx
	leaq	c(%rip), %rbp
	leaq	st(%rip), %r9
	movl	%ebx, 8(%rsp)
	leaq	b(%rip), %r12
	movq	%rax, 32(%rsp)
	addq	%rax, %r11
.L25:
	movl	40(%rsp), %eax
	testl	%eax, %eax
	jle	.L36
	movq	%r11, %rax
	subq	32(%rsp), %rax
	xorl	%ecx, %ecx
	subq	$131080, %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L37:
	movl	12(%rsp), %eax
	movslq	%ecx, %rsi
	movq	16(%rsp), %rdi
	movq	%rsi, %rdx
	movl	%eax, %ebx
	salq	$14, %rdx
	btsl	%ecx, %eax
	sarl	%cl, %ebx
	cltq
	addq	%rsi, %rdx
	andl	$1, %ebx
	leaq	(%rax,%rdx,2), %r13
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L26:
	addq	$131080, %rdi
	cmpq	%rdi, %r11
	je	.L65
.L35:
	movslq	(%rdi), %r14
	testl	%r14d, %r14d
	je	.L26
	testl	%ebx, %ebx
	jne	.L26
	movl	0(%rbp,%rcx,4), %r15d
	movl	(%rsp), %eax
	movl	$1, %esi
	addl	(%r10,%r14,4), %r15d
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L30:
	leal	(%rax,%rsi), %edx
	sarl	%edx
	movslq	%edx, %r8
	cmpl	(%r10,%r8,4), %r15d
	je	.L28
	jg	.L66
	movl	%edx, %eax
.L29:
	cmpl	%esi, %eax
	jg	.L30
	leal	-1(%rsi), %edx
.L28:
	movl	(%r12,%rcx,4), %r15d
	movl	(%rsp), %esi
	movl	$1, %r8d
	addl	(%r9,%r14,4), %r15d
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L34:
	leal	(%rsi,%r8), %eax
	sarl	%eax
	movslq	%eax, %r14
	cmpl	(%r9,%r14,4), %r15d
	je	.L32
	jg	.L67
	movl	%eax, %esi
.L33:
	cmpl	%r8d, %esi
	jg	.L34
	leal	-1(%r8), %eax
.L32:
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	cmpl	%eax, 8(%rsp)
	je	.L60
	leaq	dp(%rip), %rsi
	cmpl	%eax, (%rsi,%r13,4)
	jge	.L26
	addq	$131080, %rdi
	movl	%eax, (%rsi,%r13,4)
	cmpq	%rdi, %r11
	jne	.L35
	.p2align 4,,10
	.p2align 3
.L65:
	leaq	1(%rcx), %rax
	cmpq	%rcx, 24(%rsp)
	je	.L36
	movq	%rax, %rcx
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L63:
	leal	1(%rdx), %esi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L64:
	leal	1(%rax), %edi
	jmp	.L20
.L60:
	movl	%eax, %edx
.L22:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L68
	addq	$72, %rsp
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L66:
	.cfi_restore_state
	leal	1(%rdx), %esi
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L67:
	leal	1(%rax), %r8d
	jmp	.L33
.L36:
	addl	$1, 12(%rsp)
	addq	$4, %r11
	movl	12(%rsp), %eax
	cmpl	%eax, 44(%rsp)
	jne	.L25
.L24:
	movslq	44(%rsp), %rax
	leaq	dp(%rip), %rdx
	movl	40(%rsp), %edi
	xorl	%ecx, %ecx
	leaq	(%rdx,%rax,4), %rax
	xorl	%edx, %edx
	jmp	.L38
.L39:
	movl	-131084(%rax), %esi
	cmpl	%esi, %edx
	cmovl	%esi, %edx
	addl	$1, %ecx
.L38:
	addq	$131080, %rax
	cmpl	%ecx, %edi
	jg	.L39
	jmp	.L22
.L68:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 2097280
dp:
	.zero	2097280
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 64
b:
	.zero	64
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 64
c:
	.zero	64
	.globl	st
	.align 32
	.type	st, @object
	.size	st, 800020
st:
	.zero	800020
	.globl	sw
	.align 32
	.type	sw, @object
	.size	sw, 800020
sw:
	.zero	800020
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 800020
t:
	.zero	800020
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 800020
w:
	.zero	800020
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.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	bsch
	.type	bsch, @function
bsch:
.LFB23:
	.cfi_startproc
	endbr64
	movl	m(%rip), %edx
	movl	$1, %ecx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%rcx,%rdx), %eax
	sarl	%eax
	movslq	%eax, %r8
	cmpl	%esi, (%rdi,%r8,4)
	je	.L1
	jl	.L8
	movl	%eax, %edx
.L4:
	cmpl	%edx, %ecx
	jl	.L5
	leal	-1(%rcx), %eax
.L1:
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	leal	1(%rax), %ecx
	jmp	.L4
	.cfi_endproc
.LFE23:
	.size	bsch, .-bsch
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.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
	leaq	m(%rip), %rsi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	52(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	m(%rip), %eax
	movl	$0, st(%rip)
	movl	$0, sw(%rip)
	addl	$1, %eax
	movl	%eax, m(%rip)
	cmpl	$1, %eax
	jle	.L10
	leaq	sw(%rip), %r15
	leaq	4+w(%rip), %r12
	movl	$1, %ebx
	leaq	4+t(%rip), %rbp
	leaq	-4(%r15), %r14
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rbp, %rdx
	movq	%r12, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r12), %eax
	leaq	-4+st(%rip), %rcx
	addl	(%r14,%rbx,4), %eax
	movl	%eax, (%r15,%rbx,4)
	movl	0(%rbp), %eax
	addq	$4, %r12
	addq	$4, %rbp
	addl	(%rcx,%rbx,4), %eax
	addq	$4, %rcx
	movl	%eax, (%rcx,%rbx,4)
	addq	$1, %rbx
	cmpl	%ebx, m(%rip)
	jg	.L11
.L10:
	movl	52(%rsp), %eax
	movl	%eax, 40(%rsp)
	testl	%eax, %eax
	jle	.L12
	leaq	c(%rip), %rbx
	xorl	%r12d, %r12d
	leaq	b(%rip), %rbp
	movq	%rbx, %r14
	.p2align 4,,10
	.p2align 3
.L13:
	leaq	0(%rbp,%r12,4), %rdx
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	52(%rsp), %rax
	addq	$1, %r12
	addq	$4, %r14
	cmpl	%r12d, %eax
	jg	.L13
	movl	%eax, 40(%rsp)
	testl	%eax, %eax
	jle	.L12
	movl	m(%rip), %r13d
	movq	%rax, (%rsp)
	xorl	%r12d, %r12d
	leaq	sw(%rip), %r11
	leaq	st(%rip), %r10
	leaq	dp(%rip), %r15
	leal	-1(%r13), %r14d
	.p2align 4,,10
	.p2align 3
.L23:
	movl	(%rbx,%r12,4), %r8d
	movl	%r12d, %ecx
	movl	%r13d, %eax
	movl	$1, %esi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L17:
	leal	(%rax,%rsi), %edx
	sarl	%edx
	movslq	%edx, %rdi
	cmpl	(%r11,%rdi,4), %r8d
	je	.L15
	jg	.L63
	movl	%edx, %eax
.L16:
	cmpl	%esi, %eax
	jg	.L17
	leal	-1(%rsi), %edx
.L15:
	movl	0(%rbp,%r12,4), %r9d
	movl	%r13d, %esi
	movl	$1, %edi
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L21:
	leal	(%rsi,%rdi), %eax
	sarl	%eax
	movslq	%eax, %r8
	cmpl	(%r10,%r8,4), %r9d
	je	.L19
	jg	.L64
	movl	%eax, %esi
.L20:
	cmpl	%edi, %esi
	jg	.L21
	leal	-1(%rdi), %eax
.L19:
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	cmpl	%eax, %r14d
	je	.L60
	movl	$1, %edx
	addq	$1, %r12
	sall	%cl, %edx
	movslq	%edx, %rdx
	movl	%eax, (%r15,%rdx,4)
	cmpq	%r12, (%rsp)
	jne	.L23
.L12:
	movl	40(%rsp), %eax
	movl	$1, %ebx
	movl	%eax, %ecx
	sall	%cl, %ebx
	movl	%ebx, 44(%rsp)
	testl	%eax, %eax
	je	.L24
	subl	$1, %eax
	movl	m(%rip), %ebx
	movl	$1, 12(%rsp)
	leaq	131084+dp(%rip), %r11
	movq	%rax, 24(%rsp)
	imulq	$131080, %rax, %rax
	leaq	sw(%rip), %r10
	movl	%ebx, (%rsp)
	subl	$1, %ebx
	leaq	c(%rip), %rbp
	leaq	st(%rip), %r9
	movl	%ebx, 8(%rsp)
	leaq	b(%rip), %r12
	movq	%rax, 32(%rsp)
	addq	%rax, %r11
.L25:
	movl	40(%rsp), %eax
	testl	%eax, %eax
	jle	.L36
	movq	%r11, %rax
	subq	32(%rsp), %rax
	xorl	%ecx, %ecx
	subq	$131080, %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L37:
	movl	12(%rsp), %eax
	movslq	%ecx, %rsi
	movq	16(%rsp), %rdi
	movq	%rsi, %rdx
	movl	%eax, %ebx
	salq	$14, %rdx
	btsl	%ecx, %eax
	sarl	%cl, %ebx
	cltq
	addq	%rsi, %rdx
	andl	$1, %ebx
	leaq	(%rax,%rdx,2), %r13
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L26:
	addq	$131080, %rdi
	cmpq	%rdi, %r11
	je	.L65
.L35:
	movslq	(%rdi), %r14
	testl	%r14d, %r14d
	je	.L26
	testl	%ebx, %ebx
	jne	.L26
	movl	0(%rbp,%rcx,4), %r15d
	movl	(%rsp), %eax
	movl	$1, %esi
	addl	(%r10,%r14,4), %r15d
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L30:
	leal	(%rax,%rsi), %edx
	sarl	%edx
	movslq	%edx, %r8
	cmpl	(%r10,%r8,4), %r15d
	je	.L28
	jg	.L66
	movl	%edx, %eax
.L29:
	cmpl	%esi, %eax
	jg	.L30
	leal	-1(%rsi), %edx
.L28:
	movl	(%r12,%rcx,4), %r15d
	movl	(%rsp), %esi
	movl	$1, %r8d
	addl	(%r9,%r14,4), %r15d
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L34:
	leal	(%rsi,%r8), %eax
	sarl	%eax
	movslq	%eax, %r14
	cmpl	(%r9,%r14,4), %r15d
	je	.L32
	jg	.L67
	movl	%eax, %esi
.L33:
	cmpl	%r8d, %esi
	jg	.L34
	leal	-1(%r8), %eax
.L32:
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	cmpl	%eax, 8(%rsp)
	je	.L60
	leaq	dp(%rip), %rsi
	cmpl	%eax, (%rsi,%r13,4)
	jge	.L26
	addq	$131080, %rdi
	movl	%eax, (%rsi,%r13,4)
	cmpq	%rdi, %r11
	jne	.L35
	.p2align 4,,10
	.p2align 3
.L65:
	leaq	1(%rcx), %rax
	cmpq	%rcx, 24(%rsp)
	je	.L36
	movq	%rax, %rcx
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L63:
	leal	1(%rdx), %esi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L64:
	leal	1(%rax), %edi
	jmp	.L20
.L60:
	movl	%eax, %edx
.L22:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L68
	addq	$72, %rsp
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L66:
	.cfi_restore_state
	leal	1(%rdx), %esi
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L67:
	leal	1(%rax), %r8d
	jmp	.L33
.L36:
	addl	$1, 12(%rsp)
	addq	$4, %r11
	movl	12(%rsp), %eax
	cmpl	%eax, 44(%rsp)
	jne	.L25
.L24:
	movslq	44(%rsp), %rax
	leaq	dp(%rip), %rdx
	movl	40(%rsp), %edi
	xorl	%ecx, %ecx
	leaq	(%rdx,%rax,4), %rax
	xorl	%edx, %edx
	jmp	.L38
.L39:
	movl	-131084(%rax), %esi
	cmpl	%esi, %edx
	cmovl	%esi, %edx
	addl	$1, %ecx
.L38:
	addq	$131080, %rax
	cmpl	%ecx, %edi
	jg	.L39
	jmp	.L22
.L68:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 2097280
dp:
	.zero	2097280
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 64
b:
	.zero	64
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 64
c:
	.zero	64
	.globl	st
	.align 32
	.type	st, @object
	.size	st, 800020
st:
	.zero	800020
	.globl	sw
	.align 32
	.type	sw, @object
	.size	sw, 800020
sw:
	.zero	800020
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 800020
t:
	.zero	800020
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 800020
w:
	.zero	800020
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.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:

// AOJ Vol-3 0312: Net Cafe
// 2017.9.30

#include <stdio.h>

#define MAX 200005
#define N 16

int m;
int w[MAX], t[MAX];;
int sw[MAX], st[MAX];
int c[N], b[N];
int dp[N][32770];		// 32768 = 2^15

int bsch(int *a, int x)
{
	int h, l = 1, r = m;

    while (l < r) {
        h = (l + r) >> 1;
		if (a[h] == x) return h;
        if (a[h] < x) l = h + 1; else r = h;
    }
	return l-1;
}

int main()
{
	int n, i, j, k, x, y, lim, ans;

	scanf("%d%d", &m, &n); m++;
	for (sw[0] = st[0] = 0, i = 1; i < m; i++) {
		scanf("%d%d", w+i, t+i);
		sw[i] = sw[i-1] + w[i], st[i] = st[i-1] + t[i];
	}
	for (i = 0; i < n; i++) scanf("%d%d", c+i, b+i);

//	memset(dp, 0, sizeof(dp));
	for (i = 0; i < n; i++)	{
		x = bsch(sw, c[i]);
		y = bsch(st, b[i]);
		if (x > y) x = y;
		if (x == m-1) { ans = m-1; goto Done; }
		dp[0][1<<i] = x;
	}

	lim = 1 << n;
	for (k = 1; k < lim; k++) {
		for (i = 0; i < n; i++)	{			// this book shelf
			for (j = 0; j < n; j++) {		// last book shelf
				if (dp[j][k] && !(k & (1<<i))) {
					int ii = k | (1 << i);
					x = bsch(sw, sw[dp[j][k]] + c[i]);
					y = bsch(st, st[dp[j][k]] + b[i]);
					if (x > y) x = y;
					if (x == m-1) { ans = m-1; goto Done; }
					if (x > dp[i][ii]) dp[i][ii] = x;
				}
			}
		}
	}
	for (ans = 0, i = 0; i < n; i++) if (dp[i][lim-1] > ans) ans = dp[i][lim-1];
Done:
	printf("%d\n", ans);
	return 0;
}
3 4
2 2
3 3
4 4
3 3
4 4
1 1
2 2

3

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

```c
// AOJ Vol-3 0312: Net Cafe
// 2017.9.30

#include <stdio.h>

#define MAX 200005
#define N 16

int m;
int w[MAX], t[MAX];;
int sw[MAX], st[MAX];
int c[N], b[N];
int dp[N][32770];		// 32768 = 2^15

int bsch(int *a, int x)
{
	int h, l = 1, r = m;

    while (l < r) {
        h = (l + r) >> 1;
		if (a[h] == x) return h;
        if (a[h] < x) l = h + 1; else r = h;
    }
	return l-1;
}

int main()
{
	int n, i, j, k, x, y, lim, ans;

	scanf("%d%d", &m, &n); m++;
	for (sw[0] = st[0] = 0, i = 1; i < m; i++) {
		scanf("%d%d", w+i, t+i);
		sw[i] = sw[i-1] + w[i], st[i] = st[i-1] + t[i];
	}
	for (i = 0; i < n; i++) scanf("%d%d", c+i, b+i);

//	memset(dp, 0, sizeof(dp));
	for (i = 0; i < n; i++)	{
		x = bsch(sw, c[i]);
		y = bsch(st, b[i]);
		if (x > y) x = y;
		if (x == m-1) { ans = m-1; goto Done; }
		dp[0][1<<i] = x;
	}

	lim = 1 << n;
	for (k = 1; k < lim; k++) {
		for (i = 0; i < n; i++)	{			// this book shelf
			for (j = 0; j < n; j++) {		// last book shelf
				if (dp[j][k] && !(k & (1<<i))) {
					int ii = k | (1 << i);
					x = bsch(sw, sw[dp[j][k]] + c[i]);
					y = bsch(st, st[dp[j][k]] + b[i]);
					if (x > y) x = y;
					if (x == m-1) { ans = m-1; goto Done; }
					if (x > dp[i][ii]) dp[i][ii] = x;
				}
			}
		}
	}
	for (ans = 0, i = 0; i < n; i++) if (dp[i][lim-1] > ans) ans = dp[i][lim-1];
Done:
	printf("%d\n", ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	m
	.bss
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 800020
w:
	.zero	800020
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 800020
t:
	.zero	800020
	.globl	sw
	.align 32
	.type	sw, @object
	.size	sw, 800020
sw:
	.zero	800020
	.globl	st
	.align 32
	.type	st, @object
	.size	st, 800020
st:
	.zero	800020
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 64
c:
	.zero	64
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 64
b:
	.zero	64
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 2097280
dp:
	.zero	2097280
	.text
	.globl	bsch
	.type	bsch, @function
bsch:
.LFB0:
	.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	$1, -12(%rbp)
	movl	m(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L2
.L6:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jne	.L3
	movl	-4(%rbp), %eax
	jmp	.L4
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L5
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L2
.L5:
	movl	-4(%rbp), %eax
	movl	%eax, -8(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jl	.L6
	movl	-12(%rbp), %eax
	subl	$1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	bsch, .-bsch
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-44(%rbp), %rax
	movq	%rax, %rdx
	leaq	m(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %eax
	addl	$1, %eax
	movl	%eax, m(%rip)
	movl	$0, st(%rip)
	movl	st(%rip), %eax
	movl	%eax, sw(%rip)
	movl	$1, -40(%rbp)
	jmp	.L8
.L9:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	addq	%rax, %rdx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	w(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sw(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sw(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-40(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	st(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	st(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -40(%rbp)
.L8:
	movl	m(%rip), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L9
	movl	$0, -40(%rbp)
	jmp	.L10
.L11:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	addq	%rax, %rdx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -40(%rbp)
.L10:
	movl	-44(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L11
	movl	$0, -40(%rbp)
	jmp	.L12
.L16:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	sw(%rip), %rax
	movq	%rax, %rdi
	call	bsch
	movl	%eax, -28(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	st(%rip), %rax
	movq	%rax, %rdi
	call	bsch
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jle	.L13
	movl	-12(%rbp), %eax
	movl	%eax, -28(%rbp)
.L13:
	movl	m(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -28(%rbp)
	jne	.L14
	movl	m(%rip), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L15
.L14:
	movl	-40(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -40(%rbp)
.L12:
	movl	-44(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L16
	movl	-44(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	$1, -32(%rbp)
	jmp	.L17
.L25:
	movl	$0, -40(%rbp)
	jmp	.L18
.L24:
	movl	$0, -36(%rbp)
	jmp	.L19
.L23:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L20
	movl	-40(%rbp), %eax
	movl	-32(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L20
	movl	-40(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	orl	-32(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sw(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, %esi
	leaq	sw(%rip), %rax
	movq	%rax, %rdi
	call	bsch
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	st(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, %esi
	leaq	st(%rip), %rax
	movq	%rax, %rdi
	call	bsch
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jle	.L21
	movl	-12(%rbp), %eax
	movl	%eax, -28(%rbp)
.L21:
	movl	m(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -28(%rbp)
	jne	.L22
	movl	m(%rip), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L15
.L22:
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L20
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L20:
	addl	$1, -36(%rbp)
.L19:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L23
	addl	$1, -40(%rbp)
.L18:
	movl	-44(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L24
	addl	$1, -32(%rbp)
.L17:
	movl	-32(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L25
	movl	$0, -24(%rbp)
	movl	$0, -40(%rbp)
	jmp	.L26
.L28:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L27
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -24(%rbp)
.L27:
	addl	$1, -40(%rbp)
.L26:
	movl	-44(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L28
	nop
.L15:
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	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	m
	.bss
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 800020
w:
	.zero	800020
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 800020
t:
	.zero	800020
	.globl	sw
	.align 32
	.type	sw, @object
	.size	sw, 800020
sw:
	.zero	800020
	.globl	st
	.align 32
	.type	st, @object
	.size	st, 800020
st:
	.zero	800020
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 64
c:
	.zero	64
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 64
b:
	.zero	64
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 2097280
dp:
	.zero	2097280
	.text
	.globl	bsch
	.type	bsch, @function
bsch:
.LFB0:
	.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	$1, -12(%rbp)
	movl	m(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L2
.L6:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jne	.L3
	movl	-4(%rbp), %eax
	jmp	.L4
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L5
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L2
.L5:
	movl	-4(%rbp), %eax
	movl	%eax, -8(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jl	.L6
	movl	-12(%rbp), %eax
	subl	$1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	bsch, .-bsch
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-44(%rbp), %rax
	movq	%rax, %rdx
	leaq	m(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %eax
	addl	$1, %eax
	movl	%eax, m(%rip)
	movl	$0, st(%rip)
	movl	st(%rip), %eax
	movl	%eax, sw(%rip)
	movl	$1, -40(%rbp)
	jmp	.L8
.L9:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	addq	%rax, %rdx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	w(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sw(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sw(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-40(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	st(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	st(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -40(%rbp)
.L8:
	movl	m(%rip), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L9
	movl	$0, -40(%rbp)
	jmp	.L10
.L11:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	addq	%rax, %rdx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -40(%rbp)
.L10:
	movl	-44(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L11
	movl	$0, -40(%rbp)
	jmp	.L12
.L16:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	sw(%rip), %rax
	movq	%rax, %rdi
	call	bsch
	movl	%eax, -28(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	st(%rip), %rax
	movq	%rax, %rdi
	call	bsch
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jle	.L13
	movl	-12(%rbp), %eax
	movl	%eax, -28(%rbp)
.L13:
	movl	m(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -28(%rbp)
	jne	.L14
	movl	m(%rip), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L15
.L14:
	movl	-40(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -40(%rbp)
.L12:
	movl	-44(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L16
	movl	-44(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	$1, -32(%rbp)
	jmp	.L17
.L25:
	movl	$0, -40(%rbp)
	jmp	.L18
.L24:
	movl	$0, -36(%rbp)
	jmp	.L19
.L23:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L20
	movl	-40(%rbp), %eax
	movl	-32(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L20
	movl	-40(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	orl	-32(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sw(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, %esi
	leaq	sw(%rip), %rax
	movq	%rax, %rdi
	call	bsch
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	st(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, %esi
	leaq	st(%rip), %rax
	movq	%rax, %rdi
	call	bsch
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jle	.L21
	movl	-12(%rbp), %eax
	movl	%eax, -28(%rbp)
.L21:
	movl	m(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -28(%rbp)
	jne	.L22
	movl	m(%rip), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L15
.L22:
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L20
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L20:
	addl	$1, -36(%rbp)
.L19:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L23
	addl	$1, -40(%rbp)
.L18:
	movl	-44(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L24
	addl	$1, -32(%rbp)
.L17:
	movl	-32(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L25
	movl	$0, -24(%rbp)
	movl	$0, -40(%rbp)
	jmp	.L26
.L28:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L27
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -24(%rbp)
.L27:
	addl	$1, -40(%rbp)
.L26:
	movl	-44(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L28
	nop
.L15:
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	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:
