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

```c
// AOJ 2119: Finding the Top RPS Player
// 2017.10.7 bal4u@uu

#include <stdio.h>
#include <string.h>

int dp[25];

int main()
{
	int t, n, m, i, s, cnt;

	t = 0; while (scanf("%d%d", &n, &m) && n > 0) {
		memset(dp, 0, sizeof(dp));
		dp[0] = n, cnt = 0;
		while (1) {
			s = 0;
			for (i = m; i >= 0; i--) {
				if (dp[i] >= 2) {
					dp[i+1] += dp[i] >> 1;
					s += dp[i] >> 1;
					dp[i] &= 1;
				}
			}
			dp[0] += s, cnt++;
			if (dp[m]) break;
		}
		printf("Case %d: %d\n", ++t, cnt);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 100
dp:
	.zero	100
	.section	.rodata
.LC0:
	.string	"Case %d: %d\n"
.LC1:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -24(%rbp)
	jmp	.L2
.L10:
	movl	$100, %edx
	movl	$0, %esi
	leaq	dp(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	-32(%rbp), %eax
	movl	%eax, dp(%rip)
	movl	$0, -12(%rbp)
.L8:
	movl	$0, -16(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L3
.L5:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jle	.L4
	movl	-20(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	addl	$1, %eax
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	sarl	%eax
	addl	%eax, -16(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	andl	$1, %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L4:
	subl	$1, -20(%rbp)
.L3:
	cmpl	$0, -20(%rbp)
	jns	.L5
	movl	dp(%rip), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, dp(%rip)
	addl	$1, -12(%rbp)
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L14
	jmp	.L8
.L14:
	nop
	addl	$1, -24(%rbp)
	movl	-12(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L9
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	jg	.L10
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Case %d: %d\n"
.LC1:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	dp(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r13
	movq	%rsp, %r12
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L7
	movl	(%rsp), %esi
	testl	%esi, %esi
	jle	.L7
	movl	$12, %ecx
	movq	%r15, %rdi
	xorl	%eax, %eax
	movslq	4(%rsp), %r9
	rep stosq
	movl	%esi, (%r15)
	xorl	%r8d, %r8d
	leaq	(%r15,%r9,4), %r10
	movl	$0, (%rdi)
	movq	%r9, %rdi
	.p2align 4,,10
	.p2align 3
.L6:
	testl	%edi, %edi
	js	.L3
	leal	1(%rdi), %ecx
	movq	%r10, %rax
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rax), %edx
	cmpl	$1, %edx
	jle	.L4
	movslq	%ecx, %r11
	sarl	%edx
	addl	%edx, (%r15,%r11,4)
	movl	(%rax), %edx
	movl	%edx, %r11d
	andl	$1, %edx
	movl	%edx, (%rax)
	sarl	%r11d
	addl	%r11d, %esi
.L4:
	subq	$4, %rax
	subl	$1, %ecx
	jne	.L5
	addl	(%r15), %esi
.L3:
	movl	%esi, (%r15)
	movl	(%r15,%r9,4), %eax
	addl	$1, %r8d
	testl	%eax, %eax
	je	.L6
	addl	$1, %ebx
	movl	%r8d, %ecx
	movq	%r14, %rsi
	movl	$1, %edi
	movl	%ebx, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L7:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$24, %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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 100
dp:
	.zero	100
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Case %d: %d\n"
.LC1:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	dp(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r13
	movq	%rsp, %r12
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L7
	movl	(%rsp), %esi
	testl	%esi, %esi
	jle	.L7
	movl	$12, %ecx
	movq	%r15, %rdi
	xorl	%eax, %eax
	movslq	4(%rsp), %r9
	rep stosq
	movl	%esi, (%r15)
	xorl	%r8d, %r8d
	leaq	(%r15,%r9,4), %r10
	movl	$0, (%rdi)
	movq	%r9, %rdi
	.p2align 4,,10
	.p2align 3
.L6:
	testl	%edi, %edi
	js	.L3
	leal	1(%rdi), %ecx
	movq	%r10, %rax
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rax), %edx
	cmpl	$1, %edx
	jle	.L4
	movslq	%ecx, %r11
	sarl	%edx
	addl	%edx, (%r15,%r11,4)
	movl	(%rax), %edx
	movl	%edx, %r11d
	andl	$1, %edx
	movl	%edx, (%rax)
	sarl	%r11d
	addl	%r11d, %esi
.L4:
	subq	$4, %rax
	subl	$1, %ecx
	jne	.L5
	addl	(%r15), %esi
.L3:
	movl	%esi, (%r15)
	movl	(%r15,%r9,4), %eax
	addl	$1, %r8d
	testl	%eax, %eax
	je	.L6
	addl	$1, %ebx
	movl	%r8d, %ecx
	movq	%r14, %rsi
	movl	$1, %edi
	movl	%ebx, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L7:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$24, %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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 100
dp:
	.zero	100
	.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 2119: Finding the Top RPS Player
// 2017.10.7 bal4u@uu

#include <stdio.h>
#include <string.h>

int dp[25];

int main()
{
	int t, n, m, i, s, cnt;

	t = 0; while (scanf("%d%d", &n, &m) && n > 0) {
		memset(dp, 0, sizeof(dp));
		dp[0] = n, cnt = 0;
		while (1) {
			s = 0;
			for (i = m; i >= 0; i--) {
				if (dp[i] >= 2) {
					dp[i+1] += dp[i] >> 1;
					s += dp[i] >> 1;
					dp[i] &= 1;
				}
			}
			dp[0] += s, cnt++;
			if (dp[m]) break;
		}
		printf("Case %d: %d\n", ++t, cnt);
	}
	return 0;
}
2 1
10 5
15 6
0 0
 2 1
10 5
15 2
0 0
 2 1
14 5
15 10
0 0
 2 1
10 2
15 6
0 0
 2 1
16 5
15 10
0 0
 3 1
16 10
15 10
0 0
 2 1
10 5
28 10
0 0
 2 1
16 5
14 10
0 0
 3 1
16 10
15 5
0 0
 2 1
10 5
28 1
0 0

Case 1: 1
Case 2: 11
Case 3: 14
 Case 1: 1
Case 2: 11
Case 3: 2
 Case 1: 1
Case 2: 8
Case 3: 210
 Case 1: 1
Case 2: 2
Case 3: 14
 Case 1: 1
Case 2: 7
Case 3: 210
 Case 1: 1
Case 2: 189
Case 3: 210
 Case 1: 1
Case 2: 11
Case 3: 95
 Case 1: 1
Case 2: 7
Case 3: 234
 Case 1: 1
Case 2: 189
Case 3: 8
 Case 1: 1
Case 2: 11
Case 3: 1

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

```c
// AOJ 2119: Finding the Top RPS Player
// 2017.10.7 bal4u@uu

#include <stdio.h>
#include <string.h>

int dp[25];

int main()
{
	int t, n, m, i, s, cnt;

	t = 0; while (scanf("%d%d", &n, &m) && n > 0) {
		memset(dp, 0, sizeof(dp));
		dp[0] = n, cnt = 0;
		while (1) {
			s = 0;
			for (i = m; i >= 0; i--) {
				if (dp[i] >= 2) {
					dp[i+1] += dp[i] >> 1;
					s += dp[i] >> 1;
					dp[i] &= 1;
				}
			}
			dp[0] += s, cnt++;
			if (dp[m]) break;
		}
		printf("Case %d: %d\n", ++t, cnt);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 100
dp:
	.zero	100
	.section	.rodata
.LC0:
	.string	"Case %d: %d\n"
.LC1:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -24(%rbp)
	jmp	.L2
.L10:
	movl	$100, %edx
	movl	$0, %esi
	leaq	dp(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	-32(%rbp), %eax
	movl	%eax, dp(%rip)
	movl	$0, -12(%rbp)
.L8:
	movl	$0, -16(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L3
.L5:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jle	.L4
	movl	-20(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	addl	$1, %eax
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	sarl	%eax
	addl	%eax, -16(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	andl	$1, %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L4:
	subl	$1, -20(%rbp)
.L3:
	cmpl	$0, -20(%rbp)
	jns	.L5
	movl	dp(%rip), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, dp(%rip)
	addl	$1, -12(%rbp)
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L14
	jmp	.L8
.L14:
	nop
	addl	$1, -24(%rbp)
	movl	-12(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L9
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	jg	.L10
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 100
dp:
	.zero	100
	.section	.rodata
.LC0:
	.string	"Case %d: %d\n"
.LC1:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -24(%rbp)
	jmp	.L2
.L10:
	movl	$100, %edx
	movl	$0, %esi
	leaq	dp(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	-32(%rbp), %eax
	movl	%eax, dp(%rip)
	movl	$0, -12(%rbp)
.L8:
	movl	$0, -16(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L3
.L5:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jle	.L4
	movl	-20(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	addl	$1, %eax
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	sarl	%eax
	addl	%eax, -16(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	andl	$1, %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L4:
	subl	$1, -20(%rbp)
.L3:
	cmpl	$0, -20(%rbp)
	jns	.L5
	movl	dp(%rip), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, dp(%rip)
	addl	$1, -12(%rbp)
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L14
	jmp	.L8
.L14:
	nop
	addl	$1, -24(%rbp)
	movl	-12(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L9
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	jg	.L10
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
