Given the following C code and 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;
}
```

Assembly Code:

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

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	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
```assembly
	.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:
```
```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;
}
```
Given the following C 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;
}
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

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

Assembly Code:

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

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	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:
```