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

```c
// AOJ 0384: Dudeney Number
// 2019.2.20 bal4u
 
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int tbl[11] = { 0,0,10000,464,100,39,21,13,10,7,6 };

int sb(int a)
{
	int s = 0;
	while (a) {
		s += a % 10;
		a /= 10;
	}
	return s;
}

int main()
{
	int a, n, m;
	int x, y, lim, ans;

	scanf("%d%d%d", &a, &n, &m);
	lim = tbl[n] - a, ans = 0;
	for (y = 1; y <= lim; y++) {
		x = (int)pow(y + a, n);
		if (x > m) break;
		if (sb(x) == y) ans++;
	}
	printf("%d\n", ans);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	tbl
	.data
	.align 32
	.type	tbl, @object
	.size	tbl, 44
tbl:
	.long	0
	.long	0
	.long	10000
	.long	464
	.long	100
	.long	39
	.long	21
	.long	13
	.long	10
	.long	7
	.long	6
	.text
	.globl	sb
	.type	sb, @function
sb:
.LFB6:
	.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, -4(%rbp)
	jmp	.L2
.L3:
	movl	-20(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	addl	%edx, -4(%rbp)
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -20(%rbp)
.L2:
	cmpl	$0, -20(%rbp)
	jne	.L3
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sb, .-sb
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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	-28(%rbp), %rcx
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	tbl(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-36(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -16(%rbp)
	movl	$0, -20(%rbp)
	movl	$1, -24(%rbp)
	jmp	.L6
.L10:
	movl	-32(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	-36(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jg	.L13
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	sb
	cmpl	%eax, -24(%rbp)
	jne	.L9
	addl	$1, -20(%rbp)
.L9:
	addl	$1, -24(%rbp)
.L6:
	movl	-24(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jle	.L10
	jmp	.L8
.L13:
	nop
.L8:
	movl	-20(%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	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	sb
	.type	sb, @function
sb:
.LFB39:
	.cfi_startproc
	endbr64
	xorl	%r8d, %r8d
	testl	%edi, %edi
	je	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	%edi, %rax
	movl	%edi, %edx
	imulq	$1717986919, %rax, %rax
	sarl	$31, %edx
	sarq	$34, %rax
	subl	%edx, %eax
	leal	(%rax,%rax,4), %edx
	addl	%edx, %edx
	subl	%edx, %edi
	addl	%edi, %r8d
	movl	%eax, %edi
	testl	%eax, %eax
	jne	.L3
.L1:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	sb, .-sb
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$48, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rcx
	leaq	32(%rsp), %rdx
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	32(%rsp), %rcx
	leaq	tbl(%rip), %rdx
	movl	28(%rsp), %ebp
	movl	(%rdx,%rcx,4), %ebx
	subl	%ebp, %ebx
	testl	%ebx, %ebx
	jle	.L13
	pxor	%xmm1, %xmm1
	movl	36(%rsp), %r13d
	xorl	%r12d, %r12d
	movl	$1, %r14d
	cvtsi2sdl	%ecx, %xmm1
	.p2align 4,,10
	.p2align 3
.L11:
	leal	(%r14,%rbp), %eax
	pxor	%xmm0, %xmm0
	movsd	%xmm1, 8(%rsp)
	cvtsi2sdl	%eax, %xmm0
	call	pow@PLT
	cvttsd2sil	%xmm0, %edx
	cmpl	%r13d, %edx
	jg	.L8
	testl	%edx, %edx
	movsd	8(%rsp), %xmm1
	je	.L9
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%edx, %rax
	movl	%edx, %ecx
	imulq	$1717986919, %rax, %rax
	sarl	$31, %ecx
	sarq	$34, %rax
	subl	%ecx, %eax
	leal	(%rax,%rax,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %edx
	addl	%edx, %esi
	movl	%eax, %edx
	testl	%eax, %eax
	jne	.L10
	xorl	%eax, %eax
	cmpl	%r14d, %esi
	sete	%al
	addl	%eax, %r12d
.L9:
	addl	$1, %r14d
	cmpl	%r14d, %ebx
	jge	.L11
.L8:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	xorl	%r12d, %r12d
	jmp	.L8
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	tbl
	.data
	.align 32
	.type	tbl, @object
	.size	tbl, 44
tbl:
	.long	0
	.long	0
	.long	10000
	.long	464
	.long	100
	.long	39
	.long	21
	.long	13
	.long	10
	.long	7
	.long	6
	.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	sb
	.type	sb, @function
sb:
.LFB39:
	.cfi_startproc
	endbr64
	xorl	%r8d, %r8d
	testl	%edi, %edi
	je	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	%edi, %rax
	movl	%edi, %edx
	imulq	$1717986919, %rax, %rax
	sarl	$31, %edx
	sarq	$34, %rax
	subl	%edx, %eax
	leal	(%rax,%rax,4), %edx
	addl	%edx, %edx
	subl	%edx, %edi
	addl	%edi, %r8d
	movl	%eax, %edi
	testl	%eax, %eax
	jne	.L3
.L1:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	sb, .-sb
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$48, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rcx
	leaq	32(%rsp), %rdx
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	32(%rsp), %rcx
	leaq	tbl(%rip), %rdx
	movl	28(%rsp), %ebp
	movl	(%rdx,%rcx,4), %ebx
	subl	%ebp, %ebx
	testl	%ebx, %ebx
	jle	.L13
	pxor	%xmm1, %xmm1
	movl	36(%rsp), %r13d
	xorl	%r12d, %r12d
	movl	$1, %r14d
	cvtsi2sdl	%ecx, %xmm1
	.p2align 4,,10
	.p2align 3
.L11:
	leal	(%r14,%rbp), %eax
	pxor	%xmm0, %xmm0
	movsd	%xmm1, 8(%rsp)
	cvtsi2sdl	%eax, %xmm0
	call	pow@PLT
	cvttsd2sil	%xmm0, %edx
	cmpl	%r13d, %edx
	jg	.L8
	testl	%edx, %edx
	movsd	8(%rsp), %xmm1
	je	.L9
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%edx, %rax
	movl	%edx, %ecx
	imulq	$1717986919, %rax, %rax
	sarl	$31, %ecx
	sarq	$34, %rax
	subl	%ecx, %eax
	leal	(%rax,%rax,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %edx
	addl	%edx, %esi
	movl	%eax, %edx
	testl	%eax, %eax
	jne	.L10
	xorl	%eax, %eax
	cmpl	%r14d, %esi
	sete	%al
	addl	%eax, %r12d
.L9:
	addl	$1, %r14d
	cmpl	%r14d, %ebx
	jge	.L11
.L8:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	xorl	%r12d, %r12d
	jmp	.L8
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	tbl
	.data
	.align 32
	.type	tbl, @object
	.size	tbl, 44
tbl:
	.long	0
	.long	0
	.long	10000
	.long	464
	.long	100
	.long	39
	.long	21
	.long	13
	.long	10
	.long	7
	.long	6
	.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 0384: Dudeney Number
// 2019.2.20 bal4u
 
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int tbl[11] = { 0,0,10000,464,100,39,21,13,10,7,6 };

int sb(int a)
{
	int s = 0;
	while (a) {
		s += a % 10;
		a /= 10;
	}
	return s;
}

int main()
{
	int a, n, m;
	int x, y, lim, ans;

	scanf("%d%d%d", &a, &n, &m);
	lim = tbl[n] - a, ans = 0;
	for (y = 1; y <= lim; y++) {
		x = (int)pow(y + a, n);
		if (x > m) break;
		if (sb(x) == y) ans++;
	}
	printf("%d\n", ans);
	return 0;
}

16 2 1000

2

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

```c
// AOJ 0384: Dudeney Number
// 2019.2.20 bal4u
 
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int tbl[11] = { 0,0,10000,464,100,39,21,13,10,7,6 };

int sb(int a)
{
	int s = 0;
	while (a) {
		s += a % 10;
		a /= 10;
	}
	return s;
}

int main()
{
	int a, n, m;
	int x, y, lim, ans;

	scanf("%d%d%d", &a, &n, &m);
	lim = tbl[n] - a, ans = 0;
	for (y = 1; y <= lim; y++) {
		x = (int)pow(y + a, n);
		if (x > m) break;
		if (sb(x) == y) ans++;
	}
	printf("%d\n", ans);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	tbl
	.data
	.align 32
	.type	tbl, @object
	.size	tbl, 44
tbl:
	.long	0
	.long	0
	.long	10000
	.long	464
	.long	100
	.long	39
	.long	21
	.long	13
	.long	10
	.long	7
	.long	6
	.text
	.globl	sb
	.type	sb, @function
sb:
.LFB6:
	.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, -4(%rbp)
	jmp	.L2
.L3:
	movl	-20(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	addl	%edx, -4(%rbp)
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -20(%rbp)
.L2:
	cmpl	$0, -20(%rbp)
	jne	.L3
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sb, .-sb
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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	-28(%rbp), %rcx
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	tbl(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-36(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -16(%rbp)
	movl	$0, -20(%rbp)
	movl	$1, -24(%rbp)
	jmp	.L6
.L10:
	movl	-32(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	-36(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jg	.L13
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	sb
	cmpl	%eax, -24(%rbp)
	jne	.L9
	addl	$1, -20(%rbp)
.L9:
	addl	$1, -24(%rbp)
.L6:
	movl	-24(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jle	.L10
	jmp	.L8
.L13:
	nop
.L8:
	movl	-20(%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	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	tbl
	.data
	.align 32
	.type	tbl, @object
	.size	tbl, 44
tbl:
	.long	0
	.long	0
	.long	10000
	.long	464
	.long	100
	.long	39
	.long	21
	.long	13
	.long	10
	.long	7
	.long	6
	.text
	.globl	sb
	.type	sb, @function
sb:
.LFB6:
	.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, -4(%rbp)
	jmp	.L2
.L3:
	movl	-20(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	addl	%edx, -4(%rbp)
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -20(%rbp)
.L2:
	cmpl	$0, -20(%rbp)
	jne	.L3
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sb, .-sb
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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	-28(%rbp), %rcx
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	tbl(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-36(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -16(%rbp)
	movl	$0, -20(%rbp)
	movl	$1, -24(%rbp)
	jmp	.L6
.L10:
	movl	-32(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	-36(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jg	.L13
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	sb
	cmpl	%eax, -24(%rbp)
	jne	.L9
	addl	$1, -20(%rbp)
.L9:
	addl	$1, -24(%rbp)
.L6:
	movl	-24(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jle	.L10
	jmp	.L8
.L13:
	nop
.L8:
	movl	-20(%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	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
