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>

int main(void) {
	int N, K;
	int i;
	int Dmask = 0;
	int asumikana;
	if (scanf("%d%d", &N, &K) != 2) return 1;
	for (i = 0; i < K; i++) {
		int D;
		if (scanf("%d", &D) != 1) return 1;
		Dmask |= 1 << D;
	}
	asumikana = N;
	for (;;) {
		int kitamuraeri = asumikana;
		int ng = 0;
		while (kitamuraeri > 0) {
			if (Dmask & (1 << (kitamuraeri % 10))) {
				ng = 1;
				break;
			}
			kitamuraeri /= 10;
		}
		if (!ng) break;
		asumikana++;
	}
	printf("%d\n", asumikana);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -24(%rbp)
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L14
.L2:
	movl	$0, -28(%rbp)
	jmp	.L4
.L6:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L5
	movl	$1, %eax
	jmp	.L14
.L5:
	movl	-32(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	orl	%eax, -24(%rbp)
	addl	$1, -28(%rbp)
.L4:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L6
	movl	-40(%rbp), %eax
	movl	%eax, -20(%rbp)
.L13:
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L7
.L10:
	movl	-16(%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
	movl	-24(%rbp), %eax
	movl	%edx, %ecx
	sarl	%cl, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L8
	movl	$1, -12(%rbp)
	jmp	.L9
.L8:
	movl	-16(%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, -16(%rbp)
.L7:
	cmpl	$0, -16(%rbp)
	jg	.L10
.L9:
	cmpl	$0, -12(%rbp)
	je	.L17
	addl	$1, -20(%rbp)
	jmp	.L13
.L17:
	nop
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L14:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	%eax, %r8d
	movl	$1, %eax
	cmpl	$2, %r8d
	jne	.L1
	xorl	%ebx, %ebx
	cmpl	$0, 16(%rsp)
	jle	.L3
	xorl	%r13d, %r13d
	leaq	20(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movl	20(%rsp), %ecx
	addl	$1, %r13d
	sall	%cl, %eax
	orl	%eax, %ebx
	cmpl	%r13d, 16(%rsp)
	jle	.L3
.L5:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L4
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L1:
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L17
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L3:
	.cfi_restore_state
	movl	12(%rsp), %r8d
	movl	$3435973837, %ecx
	.p2align 4,,10
	.p2align 3
.L10:
	testl	%r8d, %r8d
	jle	.L6
	movslq	%r8d, %rax
	movl	%r8d, %edx
	imulq	$1717986919, %rax, %rax
	sarl	$31, %edx
	sarq	$34, %rax
	subl	%edx, %eax
	movl	%r8d, %edx
	leal	(%rax,%rax,4), %eax
	addl	%eax, %eax
	subl	%eax, %edx
	btl	%edx, %ebx
	jc	.L7
	movl	%r8d, %eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%eax, %edx
	movl	%eax, %esi
	imulq	%rcx, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %edx
	addl	%edx, %edx
	subl	%edx, %esi
	btl	%esi, %ebx
	jc	.L7
.L8:
	movl	%eax, %eax
	movq	%rax, %rdx
	imulq	%rcx, %rax
	shrq	$35, %rax
	cmpl	$9, %edx
	jg	.L9
.L6:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, %r8d
	jmp	.L10
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	%eax, %r8d
	movl	$1, %eax
	cmpl	$2, %r8d
	jne	.L1
	xorl	%ebx, %ebx
	cmpl	$0, 16(%rsp)
	jle	.L3
	xorl	%r13d, %r13d
	leaq	20(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movl	20(%rsp), %ecx
	addl	$1, %r13d
	sall	%cl, %eax
	orl	%eax, %ebx
	cmpl	%r13d, 16(%rsp)
	jle	.L3
.L5:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L4
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L1:
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L17
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L3:
	.cfi_restore_state
	movl	12(%rsp), %r8d
	movl	$3435973837, %ecx
	.p2align 4,,10
	.p2align 3
.L10:
	testl	%r8d, %r8d
	jle	.L6
	movslq	%r8d, %rax
	movl	%r8d, %edx
	imulq	$1717986919, %rax, %rax
	sarl	$31, %edx
	sarq	$34, %rax
	subl	%edx, %eax
	movl	%r8d, %edx
	leal	(%rax,%rax,4), %eax
	addl	%eax, %eax
	subl	%eax, %edx
	btl	%edx, %ebx
	jc	.L7
	movl	%r8d, %eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%eax, %edx
	movl	%eax, %esi
	imulq	%rcx, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %edx
	addl	%edx, %edx
	subl	%edx, %esi
	btl	%esi, %ebx
	jc	.L7
.L8:
	movl	%eax, %eax
	movq	%rax, %rdx
	imulq	%rcx, %rax
	shrq	$35, %rax
	cmpl	$9, %edx
	jg	.L9
.L6:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, %r8d
	jmp	.L10
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

#include <stdio.h>

int main(void) {
	int N, K;
	int i;
	int Dmask = 0;
	int asumikana;
	if (scanf("%d%d", &N, &K) != 2) return 1;
	for (i = 0; i < K; i++) {
		int D;
		if (scanf("%d", &D) != 1) return 1;
		Dmask |= 1 << D;
	}
	asumikana = N;
	for (;;) {
		int kitamuraeri = asumikana;
		int ng = 0;
		while (kitamuraeri > 0) {
			if (Dmask & (1 << (kitamuraeri % 10))) {
				ng = 1;
				break;
			}
			kitamuraeri /= 10;
		}
		if (!ng) break;
		asumikana++;
	}
	printf("%d\n", asumikana);
	return 0;
}

1000 8
1 3 4 5 6 7 8 9

2000

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>

int main(void) {
	int N, K;
	int i;
	int Dmask = 0;
	int asumikana;
	if (scanf("%d%d", &N, &K) != 2) return 1;
	for (i = 0; i < K; i++) {
		int D;
		if (scanf("%d", &D) != 1) return 1;
		Dmask |= 1 << D;
	}
	asumikana = N;
	for (;;) {
		int kitamuraeri = asumikana;
		int ng = 0;
		while (kitamuraeri > 0) {
			if (Dmask & (1 << (kitamuraeri % 10))) {
				ng = 1;
				break;
			}
			kitamuraeri /= 10;
		}
		if (!ng) break;
		asumikana++;
	}
	printf("%d\n", asumikana);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -24(%rbp)
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L14
.L2:
	movl	$0, -28(%rbp)
	jmp	.L4
.L6:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L5
	movl	$1, %eax
	jmp	.L14
.L5:
	movl	-32(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	orl	%eax, -24(%rbp)
	addl	$1, -28(%rbp)
.L4:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L6
	movl	-40(%rbp), %eax
	movl	%eax, -20(%rbp)
.L13:
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L7
.L10:
	movl	-16(%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
	movl	-24(%rbp), %eax
	movl	%edx, %ecx
	sarl	%cl, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L8
	movl	$1, -12(%rbp)
	jmp	.L9
.L8:
	movl	-16(%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, -16(%rbp)
.L7:
	cmpl	$0, -16(%rbp)
	jg	.L10
.L9:
	cmpl	$0, -12(%rbp)
	je	.L17
	addl	$1, -20(%rbp)
	jmp	.L13
.L17:
	nop
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L14:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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.
val
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -24(%rbp)
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L14
.L2:
	movl	$0, -28(%rbp)
	jmp	.L4
.L6:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L5
	movl	$1, %eax
	jmp	.L14
.L5:
	movl	-32(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	orl	%eax, -24(%rbp)
	addl	$1, -28(%rbp)
.L4:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L6
	movl	-40(%rbp), %eax
	movl	%eax, -20(%rbp)
.L13:
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L7
.L10:
	movl	-16(%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
	movl	-24(%rbp), %eax
	movl	%edx, %ecx
	sarl	%cl, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L8
	movl	$1, -12(%rbp)
	jmp	.L9
.L8:
	movl	-16(%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, -16(%rbp)
.L7:
	cmpl	$0, -16(%rbp)
	jg	.L10
.L9:
	cmpl	$0, -12(%rbp)
	je	.L17
	addl	$1, -20(%rbp)
	jmp	.L13
.L17:
	nop
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L14:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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:
