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

```c
#include <stdio.h>

const int pow[4] = {1, 9, 81, 729};

int combination(int n, int k)
{
	if (n < k) return 0;
	else if (k == 0 || n == k) return 1;
	
	int i, x;
	for (i = n, x = 1; i >= n - k + 1; i--) x *= i;
	for (i = 2; i <= k; i++) x /= i;
	return x;
}

long long recursion(char N[], int l, int K)
{
	if (K == 0) return 1;
	else if (l == 0) return 0;
	else if (N[0] == '0') return recursion(&(N[1]), l - 1, K);
	else return recursion(&(N[1]), l - 1, K - 1) + combination(l - 1, K - 1) * pow[K-1] * (N[0] - '1') + combination(l - 1, K) * pow[K];
}

int main()
{
	int l, K;
	char N[102];
	scanf("%s", N);
	scanf("%d", &K);
	for (l = 0; N[l] != 0; l++);
	printf("%lld\n", recursion(N, l, K));
	fflush(stdout);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	pow
	.section	.rodata
	.align 16
	.type	pow, @object
	.size	pow, 16
pow:
	.long	1
	.long	9
	.long	81
	.long	729
	.text
	.globl	combination
	.type	combination, @function
combination:
.LFB0:
	.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	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jge	.L2
	movl	$0, %eax
	jmp	.L3
.L2:
	cmpl	$0, -24(%rbp)
	je	.L4
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jne	.L5
.L4:
	movl	$1, %eax
	jmp	.L3
.L5:
	movl	-20(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	$1, -4(%rbp)
	jmp	.L6
.L7:
	movl	-4(%rbp), %eax
	imull	-8(%rbp), %eax
	movl	%eax, -4(%rbp)
	subl	$1, -8(%rbp)
.L6:
	movl	-20(%rbp), %eax
	subl	-24(%rbp), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L7
	movl	$2, -8(%rbp)
	jmp	.L8
.L9:
	movl	-4(%rbp), %eax
	cltd
	idivl	-8(%rbp)
	movl	%eax, -4(%rbp)
	addl	$1, -8(%rbp)
.L8:
	movl	-8(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L9
	movl	-4(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	combination, .-combination
	.globl	recursion
	.type	recursion, @function
recursion:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	cmpl	$0, -32(%rbp)
	jne	.L11
	movl	$1, %eax
	jmp	.L12
.L11:
	cmpl	$0, -28(%rbp)
	jne	.L13
	movl	$0, %eax
	jmp	.L12
.L13:
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	jne	.L14
	movl	-28(%rbp), %eax
	leal	-1(%rax), %esi
	movq	-24(%rbp), %rax
	leaq	1(%rax), %rcx
	movl	-32(%rbp), %eax
	movl	%eax, %edx
	movq	%rcx, %rdi
	call	recursion
	jmp	.L12
.L14:
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %eax
	leal	-1(%rax), %ecx
	movq	-24(%rbp), %rax
	addq	$1, %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	recursion
	movq	%rax, %rbx
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	combination
	movl	-32(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	pow(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	imull	%eax, %edx
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$49, %eax
	imull	%edx, %eax
	cltq
	addq	%rax, %rbx
	movl	-28(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-32(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	combination
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	pow(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	imull	%edx, %eax
	cltq
	addq	%rbx, %rax
.L12:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	recursion, .-recursion
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -116(%rbp)
	jmp	.L16
.L17:
	addl	$1, -116(%rbp)
.L16:
	movl	-116(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L17
	movl	-120(%rbp), %edx
	movl	-116(%rbp), %ecx
	leaq	-112(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	recursion
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	combination
	.type	combination, @function
combination:
.LFB23:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	cmpl	%esi, %edi
	jl	.L1
	testl	%esi, %esi
	je	.L7
	cmpl	%esi, %edi
	je	.L7
	movl	%edi, %edx
	movl	$1, %eax
	subl	%esi, %edx
	cmpl	%edx, %edi
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	imull	%edi, %eax
	subl	$1, %edi
	cmpl	%edx, %edi
	jne	.L4
.L3:
	cmpl	$1, %esi
	jle	.L1
	addl	$1, %esi
	movl	$2, %ecx
	.p2align 4,,10
	.p2align 3
.L5:
	cltd
	idivl	%ecx
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jne	.L5
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$1, %eax
.L1:
	ret
	.cfi_endproc
.LFE23:
	.size	combination, .-combination
	.p2align 4
	.globl	recursion
	.type	recursion, @function
recursion:
.LFB24:
	.cfi_startproc
	endbr64
	testl	%edx, %edx
	je	.L28
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movl	%edx, %r13d
	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
	movl	%esi, %ebx
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L48:
	movsbl	(%rdi), %ebp
	movl	%ebx, %r12d
	addq	$1, %rdi
	subl	$1, %ebx
	cmpb	$48, %bpl
	jne	.L14
.L47:
	testl	%ebx, %ebx
	jne	.L48
	xorl	%r8d, %r8d
.L12:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movq	%r8, %rax
	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
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	leal	-1(%r13), %r14d
	movl	%ebx, %esi
	movl	%r14d, %edx
	call	recursion
	movq	%rax, %r8
	cmpl	%r12d, %r13d
	jg	.L16
	movslq	%r14d, %rax
	leaq	pow(%rip), %rdx
	subl	$49, %ebp
	movl	(%rdx,%rax,4), %esi
	testl	%r14d, %r14d
	je	.L34
	cmpl	%r12d, %r13d
	je	.L34
	subl	%r13d, %r12d
	cmpl	%ebx, %r12d
	jge	.L31
	movl	%ebx, %edx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L20:
	imull	%edx, %eax
	subl	$1, %edx
	cmpl	%r12d, %edx
	jne	.L20
.L19:
	movl	$2, %ecx
	cmpl	$1, %r14d
	jle	.L45
	.p2align 4,,10
	.p2align 3
.L21:
	cltd
	idivl	%ecx
	addl	$1, %ecx
	cmpl	%ecx, %r13d
	jne	.L21
.L45:
	imull	%esi, %eax
	imull	%ebp, %eax
	cltq
	addq	%rax, %r8
.L16:
	cmpl	%ebx, %r13d
	jg	.L12
	movslq	%r13d, %rax
	leaq	pow(%rip), %rdx
	movslq	(%rdx,%rax,4), %rdi
	je	.L49
	movl	%ebx, %edx
	movl	$1, %eax
	subl	%r13d, %edx
	cmpl	%ebx, %edx
	jge	.L24
	.p2align 4,,10
	.p2align 3
.L25:
	imull	%ebx, %eax
	subl	$1, %ebx
	cmpl	%edx, %ebx
	jne	.L25
.L24:
	leal	1(%r13), %esi
	movl	$2, %ecx
	cmpl	$1, %r13d
	jle	.L46
	.p2align 4,,10
	.p2align 3
.L27:
	cltd
	idivl	%ecx
	addl	$1, %ecx
	cmpl	%esi, %ecx
	jne	.L27
.L46:
	imull	%edi, %eax
	popq	%rbx
	.cfi_remember_state
	.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
	cltq
	addq	%rax, %r8
	movq	%r8, %rax
	ret
.L49:
	.cfi_restore_state
	addq	%rdi, %r8
	jmp	.L12
.L34:
	imull	%ebp, %esi
	movslq	%esi, %rax
	addq	%rax, %r8
	jmp	.L16
.L28:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	movl	$1, %eax
	ret
.L31:
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	.cfi_offset 6, -40
	.cfi_offset 12, -32
	.cfi_offset 13, -24
	.cfi_offset 14, -16
	movl	$1, %eax
	jmp	.L19
	.cfi_endproc
.LFE24:
	.size	recursion, .-recursion
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	addq	$-128, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpb	$0, 16(%rsp)
	je	.L54
	movl	$1, %eax
	leaq	15(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L52:
	movl	%eax, %esi
	addq	$1, %rax
	cmpb	$0, (%rdx,%rax)
	jne	.L52
.L51:
	movl	12(%rsp), %edx
	movq	%rbp, %rdi
	call	recursion
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L57
	subq	$-128, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L54:
	.cfi_restore_state
	xorl	%esi, %esi
	jmp	.L51
.L57:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	pow
	.section	.rodata
	.align 16
	.type	pow, @object
	.size	pow, 16
pow:
	.long	1
	.long	9
	.long	81
	.long	729
	.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	combination
	.type	combination, @function
combination:
.LFB23:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	cmpl	%esi, %edi
	jl	.L1
	testl	%esi, %esi
	je	.L7
	cmpl	%esi, %edi
	je	.L7
	movl	%edi, %edx
	movl	$1, %eax
	subl	%esi, %edx
	cmpl	%edx, %edi
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	imull	%edi, %eax
	subl	$1, %edi
	cmpl	%edx, %edi
	jne	.L4
.L3:
	cmpl	$1, %esi
	jle	.L1
	addl	$1, %esi
	movl	$2, %ecx
	.p2align 4,,10
	.p2align 3
.L5:
	cltd
	idivl	%ecx
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jne	.L5
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$1, %eax
.L1:
	ret
	.cfi_endproc
.LFE23:
	.size	combination, .-combination
	.p2align 4
	.globl	recursion
	.type	recursion, @function
recursion:
.LFB24:
	.cfi_startproc
	endbr64
	testl	%edx, %edx
	je	.L28
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movl	%edx, %r13d
	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
	movl	%esi, %ebx
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L48:
	movsbl	(%rdi), %ebp
	movl	%ebx, %r12d
	addq	$1, %rdi
	subl	$1, %ebx
	cmpb	$48, %bpl
	jne	.L14
.L47:
	testl	%ebx, %ebx
	jne	.L48
	xorl	%r8d, %r8d
.L12:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movq	%r8, %rax
	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
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	leal	-1(%r13), %r14d
	movl	%ebx, %esi
	movl	%r14d, %edx
	call	recursion
	movq	%rax, %r8
	cmpl	%r12d, %r13d
	jg	.L16
	movslq	%r14d, %rax
	leaq	pow(%rip), %rdx
	subl	$49, %ebp
	movl	(%rdx,%rax,4), %esi
	testl	%r14d, %r14d
	je	.L34
	cmpl	%r12d, %r13d
	je	.L34
	subl	%r13d, %r12d
	cmpl	%ebx, %r12d
	jge	.L31
	movl	%ebx, %edx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L20:
	imull	%edx, %eax
	subl	$1, %edx
	cmpl	%r12d, %edx
	jne	.L20
.L19:
	movl	$2, %ecx
	cmpl	$1, %r14d
	jle	.L45
	.p2align 4,,10
	.p2align 3
.L21:
	cltd
	idivl	%ecx
	addl	$1, %ecx
	cmpl	%ecx, %r13d
	jne	.L21
.L45:
	imull	%esi, %eax
	imull	%ebp, %eax
	cltq
	addq	%rax, %r8
.L16:
	cmpl	%ebx, %r13d
	jg	.L12
	movslq	%r13d, %rax
	leaq	pow(%rip), %rdx
	movslq	(%rdx,%rax,4), %rdi
	je	.L49
	movl	%ebx, %edx
	movl	$1, %eax
	subl	%r13d, %edx
	cmpl	%ebx, %edx
	jge	.L24
	.p2align 4,,10
	.p2align 3
.L25:
	imull	%ebx, %eax
	subl	$1, %ebx
	cmpl	%edx, %ebx
	jne	.L25
.L24:
	leal	1(%r13), %esi
	movl	$2, %ecx
	cmpl	$1, %r13d
	jle	.L46
	.p2align 4,,10
	.p2align 3
.L27:
	cltd
	idivl	%ecx
	addl	$1, %ecx
	cmpl	%esi, %ecx
	jne	.L27
.L46:
	imull	%edi, %eax
	popq	%rbx
	.cfi_remember_state
	.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
	cltq
	addq	%rax, %r8
	movq	%r8, %rax
	ret
.L49:
	.cfi_restore_state
	addq	%rdi, %r8
	jmp	.L12
.L34:
	imull	%ebp, %esi
	movslq	%esi, %rax
	addq	%rax, %r8
	jmp	.L16
.L28:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	movl	$1, %eax
	ret
.L31:
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	.cfi_offset 6, -40
	.cfi_offset 12, -32
	.cfi_offset 13, -24
	.cfi_offset 14, -16
	movl	$1, %eax
	jmp	.L19
	.cfi_endproc
.LFE24:
	.size	recursion, .-recursion
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	addq	$-128, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpb	$0, 16(%rsp)
	je	.L54
	movl	$1, %eax
	leaq	15(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L52:
	movl	%eax, %esi
	addq	$1, %rax
	cmpb	$0, (%rdx,%rax)
	jne	.L52
.L51:
	movl	12(%rsp), %edx
	movq	%rbp, %rdi
	call	recursion
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L57
	subq	$-128, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L54:
	.cfi_restore_state
	xorl	%esi, %esi
	jmp	.L51
.L57:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	pow
	.section	.rodata
	.align 16
	.type	pow, @object
	.size	pow, 16
pow:
	.long	1
	.long	9
	.long	81
	.long	729
	.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:

#include <stdio.h>

const int pow[4] = {1, 9, 81, 729};

int combination(int n, int k)
{
	if (n < k) return 0;
	else if (k == 0 || n == k) return 1;
	
	int i, x;
	for (i = n, x = 1; i >= n - k + 1; i--) x *= i;
	for (i = 2; i <= k; i++) x /= i;
	return x;
}

long long recursion(char N[], int l, int K)
{
	if (K == 0) return 1;
	else if (l == 0) return 0;
	else if (N[0] == '0') return recursion(&(N[1]), l - 1, K);
	else return recursion(&(N[1]), l - 1, K - 1) + combination(l - 1, K - 1) * pow[K-1] * (N[0] - '1') + combination(l - 1, K) * pow[K];
}

int main()
{
	int l, K;
	char N[102];
	scanf("%s", N);
	scanf("%d", &K);
	for (l = 0; N[l] != 0; l++);
	printf("%lld\n", recursion(N, l, K));
	fflush(stdout);
	return 0;
}
314159
1
 25
1
 100
2
 314159
3
 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
2
 25
4
 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
1
 100
001
 100
4
 25
5

48
 11
 81
 9427
 400950
 0
 900
 19
 0
 0

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

```c
#include <stdio.h>

const int pow[4] = {1, 9, 81, 729};

int combination(int n, int k)
{
	if (n < k) return 0;
	else if (k == 0 || n == k) return 1;
	
	int i, x;
	for (i = n, x = 1; i >= n - k + 1; i--) x *= i;
	for (i = 2; i <= k; i++) x /= i;
	return x;
}

long long recursion(char N[], int l, int K)
{
	if (K == 0) return 1;
	else if (l == 0) return 0;
	else if (N[0] == '0') return recursion(&(N[1]), l - 1, K);
	else return recursion(&(N[1]), l - 1, K - 1) + combination(l - 1, K - 1) * pow[K-1] * (N[0] - '1') + combination(l - 1, K) * pow[K];
}

int main()
{
	int l, K;
	char N[102];
	scanf("%s", N);
	scanf("%d", &K);
	for (l = 0; N[l] != 0; l++);
	printf("%lld\n", recursion(N, l, K));
	fflush(stdout);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	pow
	.section	.rodata
	.align 16
	.type	pow, @object
	.size	pow, 16
pow:
	.long	1
	.long	9
	.long	81
	.long	729
	.text
	.globl	combination
	.type	combination, @function
combination:
.LFB0:
	.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	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jge	.L2
	movl	$0, %eax
	jmp	.L3
.L2:
	cmpl	$0, -24(%rbp)
	je	.L4
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jne	.L5
.L4:
	movl	$1, %eax
	jmp	.L3
.L5:
	movl	-20(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	$1, -4(%rbp)
	jmp	.L6
.L7:
	movl	-4(%rbp), %eax
	imull	-8(%rbp), %eax
	movl	%eax, -4(%rbp)
	subl	$1, -8(%rbp)
.L6:
	movl	-20(%rbp), %eax
	subl	-24(%rbp), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L7
	movl	$2, -8(%rbp)
	jmp	.L8
.L9:
	movl	-4(%rbp), %eax
	cltd
	idivl	-8(%rbp)
	movl	%eax, -4(%rbp)
	addl	$1, -8(%rbp)
.L8:
	movl	-8(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L9
	movl	-4(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	combination, .-combination
	.globl	recursion
	.type	recursion, @function
recursion:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	cmpl	$0, -32(%rbp)
	jne	.L11
	movl	$1, %eax
	jmp	.L12
.L11:
	cmpl	$0, -28(%rbp)
	jne	.L13
	movl	$0, %eax
	jmp	.L12
.L13:
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	jne	.L14
	movl	-28(%rbp), %eax
	leal	-1(%rax), %esi
	movq	-24(%rbp), %rax
	leaq	1(%rax), %rcx
	movl	-32(%rbp), %eax
	movl	%eax, %edx
	movq	%rcx, %rdi
	call	recursion
	jmp	.L12
.L14:
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %eax
	leal	-1(%rax), %ecx
	movq	-24(%rbp), %rax
	addq	$1, %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	recursion
	movq	%rax, %rbx
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	combination
	movl	-32(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	pow(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	imull	%eax, %edx
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$49, %eax
	imull	%edx, %eax
	cltq
	addq	%rax, %rbx
	movl	-28(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-32(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	combination
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	pow(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	imull	%edx, %eax
	cltq
	addq	%rbx, %rax
.L12:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	recursion, .-recursion
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -116(%rbp)
	jmp	.L16
.L17:
	addl	$1, -116(%rbp)
.L16:
	movl	-116(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L17
	movl	-120(%rbp), %edx
	movl	-116(%rbp), %ecx
	leaq	-112(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	recursion
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	pow
	.section	.rodata
	.align 16
	.type	pow, @object
	.size	pow, 16
pow:
	.long	1
	.long	9
	.long	81
	.long	729
	.text
	.globl	combination
	.type	combination, @function
combination:
.LFB0:
	.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	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jge	.L2
	movl	$0, %eax
	jmp	.L3
.L2:
	cmpl	$0, -24(%rbp)
	je	.L4
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jne	.L5
.L4:
	movl	$1, %eax
	jmp	.L3
.L5:
	movl	-20(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	$1, -4(%rbp)
	jmp	.L6
.L7:
	movl	-4(%rbp), %eax
	imull	-8(%rbp), %eax
	movl	%eax, -4(%rbp)
	subl	$1, -8(%rbp)
.L6:
	movl	-20(%rbp), %eax
	subl	-24(%rbp), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L7
	movl	$2, -8(%rbp)
	jmp	.L8
.L9:
	movl	-4(%rbp), %eax
	cltd
	idivl	-8(%rbp)
	movl	%eax, -4(%rbp)
	addl	$1, -8(%rbp)
.L8:
	movl	-8(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L9
	movl	-4(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	combination, .-combination
	.globl	recursion
	.type	recursion, @function
recursion:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	cmpl	$0, -32(%rbp)
	jne	.L11
	movl	$1, %eax
	jmp	.L12
.L11:
	cmpl	$0, -28(%rbp)
	jne	.L13
	movl	$0, %eax
	jmp	.L12
.L13:
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	jne	.L14
	movl	-28(%rbp), %eax
	leal	-1(%rax), %esi
	movq	-24(%rbp), %rax
	leaq	1(%rax), %rcx
	movl	-32(%rbp), %eax
	movl	%eax, %edx
	movq	%rcx, %rdi
	call	recursion
	jmp	.L12
.L14:
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %eax
	leal	-1(%rax), %ecx
	movq	-24(%rbp), %rax
	addq	$1, %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	recursion
	movq	%rax, %rbx
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	combination
	movl	-32(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	pow(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	imull	%eax, %edx
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$49, %eax
	imull	%edx, %eax
	cltq
	addq	%rax, %rbx
	movl	-28(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-32(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	combination
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	pow(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	imull	%edx, %eax
	cltq
	addq	%rbx, %rax
.L12:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	recursion, .-recursion
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -116(%rbp)
	jmp	.L16
.L17:
	addl	$1, -116(%rbp)
.L16:
	movl	-116(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L17
	movl	-120(%rbp), %edx
	movl	-116(%rbp), %ecx
	leaq	-112(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	recursion
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
