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 chk[10];
int nums[] = {1, 10, 100, 1000, 10000};
int possibleNum[10];
int N;
int K;
int jari;
int idx;
int min = 0x7fff0000;

void DFS(int L, int num)
{
	int i;
	
	if (L > jari)
	{
	    if (num >= N && num < min) min = num;
	    if (num % nums[jari] >= N && num % nums[jari] < min) min = num % nums[jari];
		     
	    return;
	}

	for (i = 0; i < idx; i++)
	{
		DFS(L + 1, num + possibleNum[i] * nums[L]);
	}

}

void input(void)
{
	int i;
	int num;
	scanf("%d %d", &N, &K);

	for (i = 0; i < K; i++)
	{
		scanf("%d", &num);
		chk[num] = 1;
	}

	for (i = 0; i < 10; i++)
	{
		if (chk[i]) continue;
		possibleNum[idx++] = i;
	}
	
	num = N;
	while(num)
	{
	    jari++;
	    num /= 10;
	}


}

int main(void)
{
	input();
	DFS(0, 0);
	printf("%d\n", min);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	chk
	.bss
	.align 32
	.type	chk, @object
	.size	chk, 40
chk:
	.zero	40
	.globl	nums
	.data
	.align 16
	.type	nums, @object
	.size	nums, 20
nums:
	.long	1
	.long	10
	.long	100
	.long	1000
	.long	10000
	.globl	possibleNum
	.bss
	.align 32
	.type	possibleNum, @object
	.size	possibleNum, 40
possibleNum:
	.zero	40
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.zero	4
	.globl	jari
	.align 4
	.type	jari, @object
	.size	jari, 4
jari:
	.zero	4
	.globl	idx
	.align 4
	.type	idx, @object
	.size	idx, 4
idx:
	.zero	4
	.globl	min
	.data
	.align 4
	.type	min, @object
	.size	min, 4
min:
	.long	2147418112
	.text
	.globl	DFS
	.type	DFS, @function
DFS:
.LFB0:
	.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
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	jari(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L2
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L3
	movl	min(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L3
	movl	-24(%rbp), %eax
	movl	%eax, min(%rip)
.L3:
	movl	jari(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nums(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	cltd
	idivl	%ecx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jl	.L8
	movl	jari(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nums(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	cltd
	idivl	%ecx
	movl	min(%rip), %eax
	cmpl	%eax, %edx
	jge	.L8
	movl	jari(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nums(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	movl	%eax, min(%rip)
	jmp	.L8
.L2:
	movl	$0, -4(%rbp)
	jmp	.L6
.L7:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	possibleNum(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	nums(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%eax, %edx
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	DFS
	addl	$1, -4(%rbp)
.L6:
	movl	idx(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L7
	jmp	.L1
.L8:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	DFS, .-DFS
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
	.text
	.globl	input
	.type	input, @function
input:
.LFB1:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	K(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L10
.L11:
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	chk(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L10:
	movl	K(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L11
	movl	$0, -12(%rbp)
	jmp	.L12
.L15:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	chk(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L19
	movl	idx(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, idx(%rip)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	possibleNum(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L14
.L19:
	nop
.L14:
	addl	$1, -12(%rbp)
.L12:
	cmpl	$9, -12(%rbp)
	jle	.L15
	movl	N(%rip), %eax
	movl	%eax, -16(%rbp)
	jmp	.L16
.L17:
	movl	jari(%rip), %eax
	addl	$1, %eax
	movl	%eax, jari(%rip)
	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)
.L16:
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	jne	.L17
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	input, .-input
	.section	.rodata
.LC2:
	.string	"%d\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
	call	input
	movl	$0, %esi
	movl	$0, %edi
	call	DFS
	movl	min(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	popq	%rbp
	.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	DFS
	.type	DFS, @function
DFS:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	movl	jari(%rip), %eax
	cmpl	%edi, %eax
	jl	.L2
	movl	idx(%rip), %eax
	testl	%eax, %eax
	jle	.L1
	leal	1(%rdi), %r13d
	xorl	%r14d, %r14d
	movslq	%edi, %rbx
	leaq	nums(%rip), %r12
	leaq	possibleNum(%rip), %r15
.L7:
	movl	(%r15,%r14,4), %esi
	imull	(%r12,%rbx,4), %esi
	movl	%r13d, %edi
	addq	$1, %r14
	addl	%ebp, %esi
	call	DFS
	cmpl	%r14d, idx(%rip)
	jg	.L7
.L1:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	movl	N(%rip), %ecx
	cmpl	%esi, %ecx
	jg	.L5
	cmpl	%esi, min(%rip)
	jle	.L5
	movl	%esi, min(%rip)
.L5:
	movslq	%eax, %rbx
	movl	%ebp, %eax
	leaq	nums(%rip), %rsi
	cltd
	idivl	(%rsi,%rbx,4)
	cmpl	%edx, %ecx
	jg	.L1
	cmpl	min(%rip), %edx
	jge	.L1
	movl	%edx, min(%rip)
	jmp	.L1
	.cfi_endproc
.LFE23:
	.size	DFS, .-DFS
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
	.text
	.p2align 4
	.globl	input
	.type	input, @function
input:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	K(%rip), %rdx
	leaq	N(%rip), %rsi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	chk(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r13
	call	__isoc99_scanf@PLT
	movl	K(%rip), %r8d
	testl	%r8d, %r8d
	jle	.L26
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	cmpl	%ebx, K(%rip)
	movl	$1, 0(%rbp,%rax,4)
	jg	.L12
.L26:
	movl	chk(%rip), %edi
	movslq	idx(%rip), %rcx
	testl	%edi, %edi
	jne	.L32
	leaq	possibleNum(%rip), %rax
	leal	1(%rcx), %edx
	movl	$0, (%rax,%rcx,4)
	movl	$1, %eax
.L13:
	movl	4+chk(%rip), %esi
	movl	%edx, %ecx
	testl	%esi, %esi
	jne	.L14
	leaq	possibleNum(%rip), %rax
	movslq	%edx, %rdx
	addl	$1, %ecx
	movl	$1, (%rax,%rdx,4)
	movl	$1, %eax
.L14:
	movl	8+chk(%rip), %r13d
	movl	%ecx, %edx
	testl	%r13d, %r13d
	jne	.L15
	leaq	possibleNum(%rip), %rax
	movslq	%ecx, %rcx
	addl	$1, %edx
	movl	$2, (%rax,%rcx,4)
	movl	$1, %eax
.L15:
	movl	12+chk(%rip), %r12d
	movl	%edx, %ecx
	testl	%r12d, %r12d
	jne	.L16
	leaq	possibleNum(%rip), %rax
	movslq	%edx, %rdx
	addl	$1, %ecx
	movl	$3, (%rax,%rdx,4)
	movl	$1, %eax
.L16:
	movl	16+chk(%rip), %ebp
	movl	%ecx, %edx
	testl	%ebp, %ebp
	jne	.L17
	leaq	possibleNum(%rip), %rax
	movslq	%ecx, %rcx
	addl	$1, %edx
	movl	$4, (%rax,%rcx,4)
	movl	$1, %eax
.L17:
	movl	20+chk(%rip), %ebx
	movl	%edx, %ecx
	testl	%ebx, %ebx
	jne	.L18
	leaq	possibleNum(%rip), %rax
	movslq	%edx, %rdx
	addl	$1, %ecx
	movl	$5, (%rax,%rdx,4)
	movl	$1, %eax
.L18:
	movl	24+chk(%rip), %r11d
	movl	%ecx, %edx
	testl	%r11d, %r11d
	jne	.L19
	leaq	possibleNum(%rip), %rax
	movslq	%ecx, %rcx
	addl	$1, %edx
	movl	$6, (%rax,%rcx,4)
	movl	$1, %eax
.L19:
	movl	28+chk(%rip), %r10d
	testl	%r10d, %r10d
	jne	.L20
	movl	32+chk(%rip), %r9d
	leal	1(%rdx), %ecx
	leaq	possibleNum(%rip), %rax
	movslq	%edx, %rdx
	movl	$7, (%rax,%rdx,4)
	testl	%r9d, %r9d
	jne	.L51
.L21:
	movl	36+chk(%rip), %esi
	leal	1(%rcx), %edx
	movslq	%ecx, %rcx
	movl	$8, (%rax,%rcx,4)
	movl	%edx, %ecx
	testl	%esi, %esi
	jne	.L22
.L23:
	leal	1(%rdx), %ecx
	movslq	%edx, %rdx
	movl	$9, (%rax,%rdx,4)
.L22:
	movl	%ecx, idx(%rip)
.L27:
	movl	N(%rip), %ecx
	testl	%ecx, %ecx
	je	.L11
	movl	jari(%rip), %eax
	leal	1(%rax), %edx
	.p2align 4,,10
	.p2align 3
.L29:
	movslq	%ecx, %rax
	movl	%ecx, %esi
	movl	%edx, %edi
	addl	$1, %edx
	imulq	$1717986919, %rax, %rax
	sarl	$31, %esi
	sarq	$34, %rax
	subl	%esi, %eax
	movl	%eax, %ecx
	jne	.L29
	movl	%edi, jari(%rip)
.L11:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L52
	addq	$24, %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
	.p2align 4,,10
	.p2align 3
.L51:
	.cfi_restore_state
	movl	36+chk(%rip), %r8d
	movl	%ecx, %edx
	testl	%r8d, %r8d
	je	.L23
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L20:
	movl	32+chk(%rip), %edi
	testl	%edi, %edi
	jne	.L24
	movl	%edx, %ecx
	leaq	possibleNum(%rip), %rax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L32:
	movl	%ecx, %edx
	xorl	%eax, %eax
	jmp	.L13
.L24:
	movl	36+chk(%rip), %ecx
	testl	%ecx, %ecx
	jne	.L25
	leaq	possibleNum(%rip), %rax
	jmp	.L23
.L25:
	testb	%al, %al
	je	.L27
	movl	%edx, %ecx
	jmp	.L22
.L52:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	input, .-input
	.section	.rodata.str1.1
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	input
	xorl	%esi, %esi
	xorl	%edi, %edi
	call	DFS
	movl	min(%rip), %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	min
	.data
	.align 4
	.type	min, @object
	.size	min, 4
min:
	.long	2147418112
	.globl	idx
	.bss
	.align 4
	.type	idx, @object
	.size	idx, 4
idx:
	.zero	4
	.globl	jari
	.align 4
	.type	jari, @object
	.size	jari, 4
jari:
	.zero	4
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	possibleNum
	.align 32
	.type	possibleNum, @object
	.size	possibleNum, 40
possibleNum:
	.zero	40
	.globl	nums
	.data
	.align 16
	.type	nums, @object
	.size	nums, 20
nums:
	.long	1
	.long	10
	.long	100
	.long	1000
	.long	10000
	.globl	chk
	.bss
	.align 32
	.type	chk, @object
	.size	chk, 40
chk:
	.zero	40
	.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	DFS
	.type	DFS, @function
DFS:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	movl	jari(%rip), %eax
	cmpl	%edi, %eax
	jl	.L2
	movl	idx(%rip), %eax
	testl	%eax, %eax
	jle	.L1
	leal	1(%rdi), %r13d
	xorl	%r14d, %r14d
	movslq	%edi, %rbx
	leaq	nums(%rip), %r12
	leaq	possibleNum(%rip), %r15
.L7:
	movl	(%r15,%r14,4), %esi
	imull	(%r12,%rbx,4), %esi
	movl	%r13d, %edi
	addq	$1, %r14
	addl	%ebp, %esi
	call	DFS
	cmpl	%r14d, idx(%rip)
	jg	.L7
.L1:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	movl	N(%rip), %ecx
	cmpl	%esi, %ecx
	jg	.L5
	cmpl	%esi, min(%rip)
	jle	.L5
	movl	%esi, min(%rip)
.L5:
	movslq	%eax, %rbx
	movl	%ebp, %eax
	leaq	nums(%rip), %rsi
	cltd
	idivl	(%rsi,%rbx,4)
	cmpl	%edx, %ecx
	jg	.L1
	cmpl	min(%rip), %edx
	jge	.L1
	movl	%edx, min(%rip)
	jmp	.L1
	.cfi_endproc
.LFE23:
	.size	DFS, .-DFS
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
	.text
	.p2align 4
	.globl	input
	.type	input, @function
input:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	K(%rip), %rdx
	leaq	N(%rip), %rsi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	chk(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r13
	call	__isoc99_scanf@PLT
	movl	K(%rip), %r8d
	testl	%r8d, %r8d
	jle	.L26
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	cmpl	%ebx, K(%rip)
	movl	$1, 0(%rbp,%rax,4)
	jg	.L12
.L26:
	movl	chk(%rip), %edi
	movslq	idx(%rip), %rcx
	testl	%edi, %edi
	jne	.L32
	leaq	possibleNum(%rip), %rax
	leal	1(%rcx), %edx
	movl	$0, (%rax,%rcx,4)
	movl	$1, %eax
.L13:
	movl	4+chk(%rip), %esi
	movl	%edx, %ecx
	testl	%esi, %esi
	jne	.L14
	leaq	possibleNum(%rip), %rax
	movslq	%edx, %rdx
	addl	$1, %ecx
	movl	$1, (%rax,%rdx,4)
	movl	$1, %eax
.L14:
	movl	8+chk(%rip), %r13d
	movl	%ecx, %edx
	testl	%r13d, %r13d
	jne	.L15
	leaq	possibleNum(%rip), %rax
	movslq	%ecx, %rcx
	addl	$1, %edx
	movl	$2, (%rax,%rcx,4)
	movl	$1, %eax
.L15:
	movl	12+chk(%rip), %r12d
	movl	%edx, %ecx
	testl	%r12d, %r12d
	jne	.L16
	leaq	possibleNum(%rip), %rax
	movslq	%edx, %rdx
	addl	$1, %ecx
	movl	$3, (%rax,%rdx,4)
	movl	$1, %eax
.L16:
	movl	16+chk(%rip), %ebp
	movl	%ecx, %edx
	testl	%ebp, %ebp
	jne	.L17
	leaq	possibleNum(%rip), %rax
	movslq	%ecx, %rcx
	addl	$1, %edx
	movl	$4, (%rax,%rcx,4)
	movl	$1, %eax
.L17:
	movl	20+chk(%rip), %ebx
	movl	%edx, %ecx
	testl	%ebx, %ebx
	jne	.L18
	leaq	possibleNum(%rip), %rax
	movslq	%edx, %rdx
	addl	$1, %ecx
	movl	$5, (%rax,%rdx,4)
	movl	$1, %eax
.L18:
	movl	24+chk(%rip), %r11d
	movl	%ecx, %edx
	testl	%r11d, %r11d
	jne	.L19
	leaq	possibleNum(%rip), %rax
	movslq	%ecx, %rcx
	addl	$1, %edx
	movl	$6, (%rax,%rcx,4)
	movl	$1, %eax
.L19:
	movl	28+chk(%rip), %r10d
	testl	%r10d, %r10d
	jne	.L20
	movl	32+chk(%rip), %r9d
	leal	1(%rdx), %ecx
	leaq	possibleNum(%rip), %rax
	movslq	%edx, %rdx
	movl	$7, (%rax,%rdx,4)
	testl	%r9d, %r9d
	jne	.L51
.L21:
	movl	36+chk(%rip), %esi
	leal	1(%rcx), %edx
	movslq	%ecx, %rcx
	movl	$8, (%rax,%rcx,4)
	movl	%edx, %ecx
	testl	%esi, %esi
	jne	.L22
.L23:
	leal	1(%rdx), %ecx
	movslq	%edx, %rdx
	movl	$9, (%rax,%rdx,4)
.L22:
	movl	%ecx, idx(%rip)
.L27:
	movl	N(%rip), %ecx
	testl	%ecx, %ecx
	je	.L11
	movl	jari(%rip), %eax
	leal	1(%rax), %edx
	.p2align 4,,10
	.p2align 3
.L29:
	movslq	%ecx, %rax
	movl	%ecx, %esi
	movl	%edx, %edi
	addl	$1, %edx
	imulq	$1717986919, %rax, %rax
	sarl	$31, %esi
	sarq	$34, %rax
	subl	%esi, %eax
	movl	%eax, %ecx
	jne	.L29
	movl	%edi, jari(%rip)
.L11:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L52
	addq	$24, %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
	.p2align 4,,10
	.p2align 3
.L51:
	.cfi_restore_state
	movl	36+chk(%rip), %r8d
	movl	%ecx, %edx
	testl	%r8d, %r8d
	je	.L23
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L20:
	movl	32+chk(%rip), %edi
	testl	%edi, %edi
	jne	.L24
	movl	%edx, %ecx
	leaq	possibleNum(%rip), %rax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L32:
	movl	%ecx, %edx
	xorl	%eax, %eax
	jmp	.L13
.L24:
	movl	36+chk(%rip), %ecx
	testl	%ecx, %ecx
	jne	.L25
	leaq	possibleNum(%rip), %rax
	jmp	.L23
.L25:
	testb	%al, %al
	je	.L27
	movl	%edx, %ecx
	jmp	.L22
.L52:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	input, .-input
	.section	.rodata.str1.1
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	input
	xorl	%esi, %esi
	xorl	%edi, %edi
	call	DFS
	movl	min(%rip), %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	min
	.data
	.align 4
	.type	min, @object
	.size	min, 4
min:
	.long	2147418112
	.globl	idx
	.bss
	.align 4
	.type	idx, @object
	.size	idx, 4
idx:
	.zero	4
	.globl	jari
	.align 4
	.type	jari, @object
	.size	jari, 4
jari:
	.zero	4
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	possibleNum
	.align 32
	.type	possibleNum, @object
	.size	possibleNum, 40
possibleNum:
	.zero	40
	.globl	nums
	.data
	.align 16
	.type	nums, @object
	.size	nums, 20
nums:
	.long	1
	.long	10
	.long	100
	.long	1000
	.long	10000
	.globl	chk
	.bss
	.align 32
	.type	chk, @object
	.size	chk, 40
chk:
	.zero	40
	.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 chk[10];
int nums[] = {1, 10, 100, 1000, 10000};
int possibleNum[10];
int N;
int K;
int jari;
int idx;
int min = 0x7fff0000;

void DFS(int L, int num)
{
	int i;
	
	if (L > jari)
	{
	    if (num >= N && num < min) min = num;
	    if (num % nums[jari] >= N && num % nums[jari] < min) min = num % nums[jari];
		     
	    return;
	}

	for (i = 0; i < idx; i++)
	{
		DFS(L + 1, num + possibleNum[i] * nums[L]);
	}

}

void input(void)
{
	int i;
	int num;
	scanf("%d %d", &N, &K);

	for (i = 0; i < K; i++)
	{
		scanf("%d", &num);
		chk[num] = 1;
	}

	for (i = 0; i < 10; i++)
	{
		if (chk[i]) continue;
		possibleNum[idx++] = i;
	}
	
	num = N;
	while(num)
	{
	    jari++;
	    num /= 10;
	}


}

int main(void)
{
	input();
	DFS(0, 0);
	printf("%d\n", min);
	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 chk[10];
int nums[] = {1, 10, 100, 1000, 10000};
int possibleNum[10];
int N;
int K;
int jari;
int idx;
int min = 0x7fff0000;

void DFS(int L, int num)
{
	int i;
	
	if (L > jari)
	{
	    if (num >= N && num < min) min = num;
	    if (num % nums[jari] >= N && num % nums[jari] < min) min = num % nums[jari];
		     
	    return;
	}

	for (i = 0; i < idx; i++)
	{
		DFS(L + 1, num + possibleNum[i] * nums[L]);
	}

}

void input(void)
{
	int i;
	int num;
	scanf("%d %d", &N, &K);

	for (i = 0; i < K; i++)
	{
		scanf("%d", &num);
		chk[num] = 1;
	}

	for (i = 0; i < 10; i++)
	{
		if (chk[i]) continue;
		possibleNum[idx++] = i;
	}
	
	num = N;
	while(num)
	{
	    jari++;
	    num /= 10;
	}


}

int main(void)
{
	input();
	DFS(0, 0);
	printf("%d\n", min);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	chk
	.bss
	.align 32
	.type	chk, @object
	.size	chk, 40
chk:
	.zero	40
	.globl	nums
	.data
	.align 16
	.type	nums, @object
	.size	nums, 20
nums:
	.long	1
	.long	10
	.long	100
	.long	1000
	.long	10000
	.globl	possibleNum
	.bss
	.align 32
	.type	possibleNum, @object
	.size	possibleNum, 40
possibleNum:
	.zero	40
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.zero	4
	.globl	jari
	.align 4
	.type	jari, @object
	.size	jari, 4
jari:
	.zero	4
	.globl	idx
	.align 4
	.type	idx, @object
	.size	idx, 4
idx:
	.zero	4
	.globl	min
	.data
	.align 4
	.type	min, @object
	.size	min, 4
min:
	.long	2147418112
	.text
	.globl	DFS
	.type	DFS, @function
DFS:
.LFB0:
	.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
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	jari(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L2
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L3
	movl	min(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L3
	movl	-24(%rbp), %eax
	movl	%eax, min(%rip)
.L3:
	movl	jari(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nums(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	cltd
	idivl	%ecx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jl	.L8
	movl	jari(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nums(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	cltd
	idivl	%ecx
	movl	min(%rip), %eax
	cmpl	%eax, %edx
	jge	.L8
	movl	jari(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nums(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	movl	%eax, min(%rip)
	jmp	.L8
.L2:
	movl	$0, -4(%rbp)
	jmp	.L6
.L7:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	possibleNum(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	nums(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%eax, %edx
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	DFS
	addl	$1, -4(%rbp)
.L6:
	movl	idx(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L7
	jmp	.L1
.L8:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	DFS, .-DFS
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
	.text
	.globl	input
	.type	input, @function
input:
.LFB1:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	K(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L10
.L11:
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	chk(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L10:
	movl	K(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L11
	movl	$0, -12(%rbp)
	jmp	.L12
.L15:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	chk(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L19
	movl	idx(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, idx(%rip)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	possibleNum(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L14
.L19:
	nop
.L14:
	addl	$1, -12(%rbp)
.L12:
	cmpl	$9, -12(%rbp)
	jle	.L15
	movl	N(%rip), %eax
	movl	%eax, -16(%rbp)
	jmp	.L16
.L17:
	movl	jari(%rip), %eax
	addl	$1, %eax
	movl	%eax, jari(%rip)
	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)
.L16:
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	jne	.L17
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	input, .-input
	.section	.rodata
.LC2:
	.string	"%d\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
	call	input
	movl	$0, %esi
	movl	$0, %edi
	call	DFS
	movl	min(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	popq	%rbp
	.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.
val
	.file	"temp.c"
	.text
	.globl	chk
	.bss
	.align 32
	.type	chk, @object
	.size	chk, 40
chk:
	.zero	40
	.globl	nums
	.data
	.align 16
	.type	nums, @object
	.size	nums, 20
nums:
	.long	1
	.long	10
	.long	100
	.long	1000
	.long	10000
	.globl	possibleNum
	.bss
	.align 32
	.type	possibleNum, @object
	.size	possibleNum, 40
possibleNum:
	.zero	40
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.zero	4
	.globl	jari
	.align 4
	.type	jari, @object
	.size	jari, 4
jari:
	.zero	4
	.globl	idx
	.align 4
	.type	idx, @object
	.size	idx, 4
idx:
	.zero	4
	.globl	min
	.data
	.align 4
	.type	min, @object
	.size	min, 4
min:
	.long	2147418112
	.text
	.globl	DFS
	.type	DFS, @function
DFS:
.LFB0:
	.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
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	jari(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L2
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L3
	movl	min(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L3
	movl	-24(%rbp), %eax
	movl	%eax, min(%rip)
.L3:
	movl	jari(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nums(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	cltd
	idivl	%ecx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jl	.L8
	movl	jari(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nums(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	cltd
	idivl	%ecx
	movl	min(%rip), %eax
	cmpl	%eax, %edx
	jge	.L8
	movl	jari(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nums(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	movl	%eax, min(%rip)
	jmp	.L8
.L2:
	movl	$0, -4(%rbp)
	jmp	.L6
.L7:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	possibleNum(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	nums(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%eax, %edx
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	DFS
	addl	$1, -4(%rbp)
.L6:
	movl	idx(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L7
	jmp	.L1
.L8:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	DFS, .-DFS
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
	.text
	.globl	input
	.type	input, @function
input:
.LFB1:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	K(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L10
.L11:
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	chk(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L10:
	movl	K(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L11
	movl	$0, -12(%rbp)
	jmp	.L12
.L15:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	chk(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L19
	movl	idx(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, idx(%rip)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	possibleNum(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L14
.L19:
	nop
.L14:
	addl	$1, -12(%rbp)
.L12:
	cmpl	$9, -12(%rbp)
	jle	.L15
	movl	N(%rip), %eax
	movl	%eax, -16(%rbp)
	jmp	.L16
.L17:
	movl	jari(%rip), %eax
	addl	$1, %eax
	movl	%eax, jari(%rip)
	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)
.L16:
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	jne	.L17
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	input, .-input
	.section	.rodata
.LC2:
	.string	"%d\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
	call	input
	movl	$0, %esi
	movl	$0, %edi
	call	DFS
	movl	min(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	popq	%rbp
	.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:
