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

```c
/* Coached by Dukkha */
#include <stdio.h>

int first(int n) {
	return n < 10 ? n : first(n / 10);
}

int main() {
	static int kk[10][10];
	int n, x, y, ans;

	scanf("%d", &n);
	while (n) {
		x = first(n);
		y = n % 10;
		kk[x][y]++;
		n--;
	}
	ans = 0;
	for (x = 1; x <= 9; x++)
		for (y = 1; y <= 9; y++)
			ans += kk[x][y] * kk[y][x];
	printf("%d\n", ans);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	first
	.type	first, @function
first:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	cmpl	$9, -4(%rbp)
	jle	.L2
	movl	-4(%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, %edi
	call	first
	jmp	.L4
.L2:
	movl	-4(%rbp), %eax
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	first, .-first
	.section	.rodata
.LC0:
	.string	"%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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L6
.L7:
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	first
	movl	%eax, -20(%rbp)
	movl	-24(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	addl	%eax, %eax
	subl	%eax, %edx
	movl	%edx, -16(%rbp)
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	kk.0(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-16(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	kk.0(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
.L6:
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L7
	movl	$0, -12(%rbp)
	movl	$1, -20(%rbp)
	jmp	.L8
.L11:
	movl	$1, -16(%rbp)
	jmp	.L9
.L10:
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	kk.0(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	movslq	%eax, %rsi
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	kk.0(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	%ecx, %eax
	addl	%eax, -12(%rbp)
	addl	$1, -16(%rbp)
.L9:
	cmpl	$9, -16(%rbp)
	jle	.L10
	addl	$1, -20(%rbp)
.L8:
	cmpl	$9, -20(%rbp)
	jle	.L11
	movl	-12(%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	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.local	kk.0
	.comm	kk.0,400,32
	.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	first
	.type	first, @function
first:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	cmpl	$9, %edi
	jle	.L2
	movl	$3435973837, %ecx
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%eax, %eax
	movq	%rax, %rdx
	imulq	%rcx, %rax
	shrq	$35, %rax
	cmpl	$99, %edx
	jg	.L3
.L2:
	ret
	.cfi_endproc
.LFE23:
	.size	first, .-first
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %esi
	movl	$3435973837, %ecx
	leaq	kk.0(%rip), %r8
	testl	%esi, %esi
	je	.L8
.L7:
	movl	%esi, %eax
	cmpl	$9, %esi
	jle	.L26
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%eax, %eax
	movq	%rax, %rdx
	imulq	%rcx, %rax
	shrq	$35, %rax
	cmpl	$99, %edx
	jg	.L9
	movslq	%esi, %rdx
	movl	%esi, %edi
	cltq
	imulq	$1717986919, %rdx, %rdx
	sarl	$31, %edi
	leaq	(%rax,%rax,4), %rax
	sarq	$34, %rdx
	subl	%edi, %edx
	leal	(%rdx,%rdx,4), %edi
	movl	%esi, %edx
	subl	$1, %esi
	addl	%edi, %edi
	subl	%edi, %edx
	movslq	%edx, %rdx
	leaq	(%rdx,%rax,2), %rax
	addl	$1, (%r8,%rax,4)
	movl	%esi, %eax
	cmpl	$9, %esi
	jg	.L9
.L26:
	movslq	%esi, %rdx
	movl	%esi, %edi
	imulq	$1717986919, %rdx, %rax
	sarl	$31, %edi
	leaq	(%rdx,%rdx,4), %rdx
	sarq	$34, %rax
	subl	%edi, %eax
	leal	(%rax,%rax,4), %edi
	movl	%esi, %eax
	addl	%edi, %edi
	subl	%edi, %eax
	cltq
	leaq	(%rax,%rdx,2), %rax
	addl	$1, (%r8,%rax,4)
	subl	$1, %esi
	jne	.L7
	movl	$0, 4(%rsp)
.L8:
	leaq	44+kk.0(%rip), %rax
	xorl	%edx, %edx
	leaq	360(%rax), %rdi
	movq	%rax, %rcx
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%rax), %esi
	imull	(%rcx), %esi
	addq	$40, %rax
	addq	$4, %rcx
	addl	%esi, %edx
	movl	-36(%rax), %esi
	imull	36(%rcx), %esi
	addl	%edx, %esi
	movl	-32(%rax), %edx
	imull	76(%rcx), %edx
	addl	%esi, %edx
	movl	-28(%rax), %esi
	imull	116(%rcx), %esi
	addl	%edx, %esi
	movl	-24(%rax), %edx
	imull	156(%rcx), %edx
	addl	%esi, %edx
	movl	-20(%rax), %esi
	imull	196(%rcx), %esi
	addl	%edx, %esi
	movl	-16(%rax), %edx
	imull	236(%rcx), %edx
	addl	%esi, %edx
	movl	-12(%rax), %esi
	imull	276(%rcx), %esi
	addl	%edx, %esi
	movl	-8(%rax), %edx
	imull	316(%rcx), %edx
	addl	%esi, %edx
	cmpq	%rax, %rdi
	jne	.L13
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.local	kk.0
	.comm	kk.0,400,32
	.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	first
	.type	first, @function
first:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	cmpl	$9, %edi
	jle	.L2
	movl	$3435973837, %ecx
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%eax, %eax
	movq	%rax, %rdx
	imulq	%rcx, %rax
	shrq	$35, %rax
	cmpl	$99, %edx
	jg	.L3
.L2:
	ret
	.cfi_endproc
.LFE23:
	.size	first, .-first
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %esi
	movl	$3435973837, %ecx
	leaq	kk.0(%rip), %r8
	testl	%esi, %esi
	je	.L8
.L7:
	movl	%esi, %eax
	cmpl	$9, %esi
	jle	.L26
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%eax, %eax
	movq	%rax, %rdx
	imulq	%rcx, %rax
	shrq	$35, %rax
	cmpl	$99, %edx
	jg	.L9
	movslq	%esi, %rdx
	movl	%esi, %edi
	cltq
	imulq	$1717986919, %rdx, %rdx
	sarl	$31, %edi
	leaq	(%rax,%rax,4), %rax
	sarq	$34, %rdx
	subl	%edi, %edx
	leal	(%rdx,%rdx,4), %edi
	movl	%esi, %edx
	subl	$1, %esi
	addl	%edi, %edi
	subl	%edi, %edx
	movslq	%edx, %rdx
	leaq	(%rdx,%rax,2), %rax
	addl	$1, (%r8,%rax,4)
	movl	%esi, %eax
	cmpl	$9, %esi
	jg	.L9
.L26:
	movslq	%esi, %rdx
	movl	%esi, %edi
	imulq	$1717986919, %rdx, %rax
	sarl	$31, %edi
	leaq	(%rdx,%rdx,4), %rdx
	sarq	$34, %rax
	subl	%edi, %eax
	leal	(%rax,%rax,4), %edi
	movl	%esi, %eax
	addl	%edi, %edi
	subl	%edi, %eax
	cltq
	leaq	(%rax,%rdx,2), %rax
	addl	$1, (%r8,%rax,4)
	subl	$1, %esi
	jne	.L7
	movl	$0, 4(%rsp)
.L8:
	leaq	44+kk.0(%rip), %rax
	xorl	%edx, %edx
	leaq	360(%rax), %rdi
	movq	%rax, %rcx
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%rax), %esi
	imull	(%rcx), %esi
	addq	$40, %rax
	addq	$4, %rcx
	addl	%esi, %edx
	movl	-36(%rax), %esi
	imull	36(%rcx), %esi
	addl	%edx, %esi
	movl	-32(%rax), %edx
	imull	76(%rcx), %edx
	addl	%esi, %edx
	movl	-28(%rax), %esi
	imull	116(%rcx), %esi
	addl	%edx, %esi
	movl	-24(%rax), %edx
	imull	156(%rcx), %edx
	addl	%esi, %edx
	movl	-20(%rax), %esi
	imull	196(%rcx), %esi
	addl	%edx, %esi
	movl	-16(%rax), %edx
	imull	236(%rcx), %edx
	addl	%esi, %edx
	movl	-12(%rax), %esi
	imull	276(%rcx), %esi
	addl	%edx, %esi
	movl	-8(%rax), %edx
	imull	316(%rcx), %edx
	addl	%esi, %edx
	cmpq	%rax, %rdi
	jne	.L13
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.local	kk.0
	.comm	kk.0,400,32
	.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:

/* Coached by Dukkha */
#include <stdio.h>

int first(int n) {
	return n < 10 ? n : first(n / 10);
}

int main() {
	static int kk[10][10];
	int n, x, y, ans;

	scanf("%d", &n);
	while (n) {
		x = first(n);
		y = n % 10;
		kk[x][y]++;
		n--;
	}
	ans = 0;
	for (x = 1; x <= 9; x++)
		for (y = 1; y <= 9; y++)
			ans += kk[x][y] * kk[y][x];
	printf("%d\n", ans);
	return 0;
}

73
 3093
 50
 101
 0
 11
 1020
 78
 001
 6

63
 95976
 33
 113
 0
 12
 10412
 72
 1
 6

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

```c
/* Coached by Dukkha */
#include <stdio.h>

int first(int n) {
	return n < 10 ? n : first(n / 10);
}

int main() {
	static int kk[10][10];
	int n, x, y, ans;

	scanf("%d", &n);
	while (n) {
		x = first(n);
		y = n % 10;
		kk[x][y]++;
		n--;
	}
	ans = 0;
	for (x = 1; x <= 9; x++)
		for (y = 1; y <= 9; y++)
			ans += kk[x][y] * kk[y][x];
	printf("%d\n", ans);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	first
	.type	first, @function
first:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	cmpl	$9, -4(%rbp)
	jle	.L2
	movl	-4(%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, %edi
	call	first
	jmp	.L4
.L2:
	movl	-4(%rbp), %eax
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	first, .-first
	.section	.rodata
.LC0:
	.string	"%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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L6
.L7:
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	first
	movl	%eax, -20(%rbp)
	movl	-24(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	addl	%eax, %eax
	subl	%eax, %edx
	movl	%edx, -16(%rbp)
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	kk.0(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-16(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	kk.0(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
.L6:
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L7
	movl	$0, -12(%rbp)
	movl	$1, -20(%rbp)
	jmp	.L8
.L11:
	movl	$1, -16(%rbp)
	jmp	.L9
.L10:
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	kk.0(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	movslq	%eax, %rsi
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	kk.0(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	%ecx, %eax
	addl	%eax, -12(%rbp)
	addl	$1, -16(%rbp)
.L9:
	cmpl	$9, -16(%rbp)
	jle	.L10
	addl	$1, -20(%rbp)
.L8:
	cmpl	$9, -20(%rbp)
	jle	.L11
	movl	-12(%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	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.local	kk.0
	.comm	kk.0,400,32
	.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	first
	.type	first, @function
first:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	cmpl	$9, -4(%rbp)
	jle	.L2
	movl	-4(%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, %edi
	call	first
	jmp	.L4
.L2:
	movl	-4(%rbp), %eax
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	first, .-first
	.section	.rodata
.LC0:
	.string	"%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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L6
.L7:
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	first
	movl	%eax, -20(%rbp)
	movl	-24(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	addl	%eax, %eax
	subl	%eax, %edx
	movl	%edx, -16(%rbp)
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	kk.0(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-16(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	kk.0(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
.L6:
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L7
	movl	$0, -12(%rbp)
	movl	$1, -20(%rbp)
	jmp	.L8
.L11:
	movl	$1, -16(%rbp)
	jmp	.L9
.L10:
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	kk.0(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	movslq	%eax, %rsi
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	kk.0(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	%ecx, %eax
	addl	%eax, -12(%rbp)
	addl	$1, -16(%rbp)
.L9:
	cmpl	$9, -16(%rbp)
	jle	.L10
	addl	$1, -20(%rbp)
.L8:
	cmpl	$9, -20(%rbp)
	jle	.L11
	movl	-12(%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	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.local	kk.0
	.comm	kk.0,400,32
	.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:
