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

```c
#include <stdio.h>

int d[9],c[9];
int main(){
	int n,m;
	scanf("%d%d",&n,&m);
	for(int i=0;i<m;i++)scanf("%d%d",d+i,c+i);
	int l,r;
	if(n==1)l=0,r=10;
	if(n==2)l=10,r=100;
	if(n==3)l=100,r=1000;
	
	for(int x=l;x<r;x++){
		char s[9];
		sprintf(s,"%d",x);
		int flag=1;
		for(int i=0;i<m;i++)flag&=s[d[i]-1]-'0'==c[i];
		if(flag){
			printf("%d",x);
			return 0;
		}
	}
	puts("-1");
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"-1"
	.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
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	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	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	d(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	c(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(%r13,%rbx,4), %rdx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, 8(%rsp)
	jg	.L3
.L2:
	movl	4(%rsp), %eax
	cmpl	$2, %eax
	je	.L11
	cmpl	$3, %eax
	movl	$10, %ebx
	movl	$1000, %eax
	movl	$0, %r12d
	cmove	%eax, %ebx
	movl	$100, %eax
	cmove	%eax, %r12d
.L4:
	leaq	15(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L43:
	movl	d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	c(%rip), %edx
	sete	%dl
	sete	%sil
	movzbl	%dl, %edx
	cmpl	$1, %eax
	je	.L6
	movl	4+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	4+c(%rip), %edx
	sete	%cl
	andl	%esi, %ecx
	movzbl	%cl, %edx
	cmpl	$2, %eax
	je	.L6
	movl	8+d(%rip), %esi
	leal	-1(%rsi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	8+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$3, %eax
	je	.L6
	movl	12+d(%rip), %esi
	leal	-1(%rsi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	12+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$4, %eax
	je	.L6
	movl	16+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	16+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$5, %eax
	je	.L6
	movl	20+d(%rip), %esi
	leal	-1(%rsi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	20+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$6, %eax
	je	.L6
	movl	24+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	24+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$7, %eax
	je	.L6
	movl	28+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	28+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$8, %eax
	je	.L6
	movl	32+d(%rip), %eax
	xorl	%edx, %edx
	subl	$1, %eax
	cltq
	movsbl	15(%rsp,%rax), %eax
	subl	$48, %eax
	cmpl	32+c(%rip), %eax
	sete	%dl
	andl	%ecx, %edx
.L6:
	testl	%edx, %edx
	jne	.L5
	addl	$1, %r12d
	cmpl	%r12d, %ebx
	jle	.L42
.L9:
	movl	%r12d, %r8d
	movq	%r13, %rcx
	movl	$9, %edx
	movl	$1, %esi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__sprintf_chk@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jg	.L43
.L5:
	movl	%r12d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L42:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L8:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
.L11:
	.cfi_restore_state
	movl	$100, %ebx
	movl	$10, %r12d
	jmp	.L4
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 36
c:
	.zero	36
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 36
d:
	.zero	36
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"-1"
	.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
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	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	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	d(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	c(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(%r13,%rbx,4), %rdx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, 8(%rsp)
	jg	.L3
.L2:
	movl	4(%rsp), %eax
	cmpl	$2, %eax
	je	.L11
	cmpl	$3, %eax
	movl	$10, %ebx
	movl	$1000, %eax
	movl	$0, %r12d
	cmove	%eax, %ebx
	movl	$100, %eax
	cmove	%eax, %r12d
.L4:
	leaq	15(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L43:
	movl	d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	c(%rip), %edx
	sete	%dl
	sete	%sil
	movzbl	%dl, %edx
	cmpl	$1, %eax
	je	.L6
	movl	4+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	4+c(%rip), %edx
	sete	%cl
	andl	%esi, %ecx
	movzbl	%cl, %edx
	cmpl	$2, %eax
	je	.L6
	movl	8+d(%rip), %esi
	leal	-1(%rsi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	8+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$3, %eax
	je	.L6
	movl	12+d(%rip), %esi
	leal	-1(%rsi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	12+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$4, %eax
	je	.L6
	movl	16+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	16+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$5, %eax
	je	.L6
	movl	20+d(%rip), %esi
	leal	-1(%rsi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	20+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$6, %eax
	je	.L6
	movl	24+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	24+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$7, %eax
	je	.L6
	movl	28+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	28+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$8, %eax
	je	.L6
	movl	32+d(%rip), %eax
	xorl	%edx, %edx
	subl	$1, %eax
	cltq
	movsbl	15(%rsp,%rax), %eax
	subl	$48, %eax
	cmpl	32+c(%rip), %eax
	sete	%dl
	andl	%ecx, %edx
.L6:
	testl	%edx, %edx
	jne	.L5
	addl	$1, %r12d
	cmpl	%r12d, %ebx
	jle	.L42
.L9:
	movl	%r12d, %r8d
	movq	%r13, %rcx
	movl	$9, %edx
	movl	$1, %esi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__sprintf_chk@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jg	.L43
.L5:
	movl	%r12d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L42:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L8:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
.L11:
	.cfi_restore_state
	movl	$100, %ebx
	movl	$10, %r12d
	jmp	.L4
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 36
c:
	.zero	36
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 36
d:
	.zero	36
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"-1"
	.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
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	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	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	d(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	c(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(%r13,%rbx,4), %rdx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, 8(%rsp)
	jg	.L3
.L2:
	movl	4(%rsp), %eax
	cmpl	$2, %eax
	je	.L11
	cmpl	$3, %eax
	movl	$10, %ebx
	movl	$1000, %eax
	movl	$0, %r12d
	cmove	%eax, %ebx
	movl	$100, %eax
	cmove	%eax, %r12d
.L4:
	leaq	15(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L43:
	movl	d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	c(%rip), %edx
	sete	%dl
	sete	%sil
	movzbl	%dl, %edx
	cmpl	$1, %eax
	je	.L6
	movl	4+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	4+c(%rip), %edx
	sete	%cl
	andl	%esi, %ecx
	movzbl	%cl, %edx
	cmpl	$2, %eax
	je	.L6
	movl	8+d(%rip), %esi
	leal	-1(%rsi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	8+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$3, %eax
	je	.L6
	movl	12+d(%rip), %esi
	leal	-1(%rsi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	12+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$4, %eax
	je	.L6
	movl	16+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	16+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$5, %eax
	je	.L6
	movl	20+d(%rip), %esi
	leal	-1(%rsi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	20+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$6, %eax
	je	.L6
	movl	24+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	24+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$7, %eax
	je	.L6
	movl	28+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	28+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$8, %eax
	je	.L6
	movl	32+d(%rip), %eax
	xorl	%edx, %edx
	subl	$1, %eax
	cltq
	movsbl	15(%rsp,%rax), %eax
	subl	$48, %eax
	cmpl	32+c(%rip), %eax
	sete	%dl
	andl	%ecx, %edx
.L6:
	testl	%edx, %edx
	jne	.L5
	addl	$1, %r12d
	cmpl	%r12d, %ebx
	jle	.L42
.L9:
	movl	%r12d, %r8d
	movq	%r13, %rcx
	movl	$9, %edx
	movl	$1, %esi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__sprintf_chk@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jg	.L43
.L5:
	movl	%r12d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L42:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L8:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
.L11:
	.cfi_restore_state
	movl	$100, %ebx
	movl	$10, %r12d
	jmp	.L4
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 36
c:
	.zero	36
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 36
d:
	.zero	36
	.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
#include <stdio.h>

int d[9],c[9];
int main(){
	int n,m;
	scanf("%d%d",&n,&m);
	for(int i=0;i<m;i++)scanf("%d%d",d+i,c+i);
	int l,r;
	if(n==1)l=0,r=10;
	if(n==2)l=10,r=100;
	if(n==3)l=100,r=1000;
	
	for(int x=l;x<r;x++){
		char s[9];
		sprintf(s,"%d",x);
		int flag=1;
		for(int i=0;i<m;i++)flag&=s[d[i]-1]-'0'==c[i];
		if(flag){
			printf("%d",x);
			return 0;
		}
	}
	puts("-1");
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int d[9],c[9];
int main(){
	int n,m;
	scanf("%d%d",&n,&m);
	for(int i=0;i<m;i++)scanf("%d%d",d+i,c+i);
	int l,r;
	if(n==1)l=0,r=10;
	if(n==2)l=10,r=100;
	if(n==3)l=100,r=1000;
	
	for(int x=l;x<r;x++){
		char s[9];
		sprintf(s,"%d",x);
		int flag=1;
		for(int i=0;i<m;i++)flag&=s[d[i]-1]-'0'==c[i];
		if(flag){
			printf("%d",x);
			return 0;
		}
	}
	puts("-1");
}```

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:

3 3
1 14
3 2
1 7
 3 0
2 1
2 3
 3 1
2 1
1 3
 3 1
0 1
1 0
 3 3
1 7
3 4
1 7
 3 2
2 0
1 3
 3 3
0 2
3 2
1 1
 3 2
3 0
2 6
 1 1
0 1
1 0
 2 1
0 1
1 0

-1
 100 110 -1
 704 300 -1
 160 -1
 -1

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

```c
#include <stdio.h>

int d[9],c[9];
int main(){
	int n,m;
	scanf("%d%d",&n,&m);
	for(int i=0;i<m;i++)scanf("%d%d",d+i,c+i);
	int l,r;
	if(n==1)l=0,r=10;
	if(n==2)l=10,r=100;
	if(n==3)l=100,r=1000;
	
	for(int x=l;x<r;x++){
		char s[9];
		sprintf(s,"%d",x);
		int flag=1;
		for(int i=0;i<m;i++)flag&=s[d[i]-1]-'0'==c[i];
		if(flag){
			printf("%d",x);
			return 0;
		}
	}
	puts("-1");
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"-1"
	.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
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	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	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	d(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	c(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(%r13,%rbx,4), %rdx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, 8(%rsp)
	jg	.L3
.L2:
	movl	4(%rsp), %eax
	cmpl	$2, %eax
	je	.L11
	cmpl	$3, %eax
	movl	$10, %ebx
	movl	$1000, %eax
	movl	$0, %r12d
	cmove	%eax, %ebx
	movl	$100, %eax
	cmove	%eax, %r12d
.L4:
	leaq	15(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L43:
	movl	d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	c(%rip), %edx
	sete	%dl
	sete	%sil
	movzbl	%dl, %edx
	cmpl	$1, %eax
	je	.L6
	movl	4+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	4+c(%rip), %edx
	sete	%cl
	andl	%esi, %ecx
	movzbl	%cl, %edx
	cmpl	$2, %eax
	je	.L6
	movl	8+d(%rip), %esi
	leal	-1(%rsi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	8+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$3, %eax
	je	.L6
	movl	12+d(%rip), %esi
	leal	-1(%rsi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	12+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$4, %eax
	je	.L6
	movl	16+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	16+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$5, %eax
	je	.L6
	movl	20+d(%rip), %esi
	leal	-1(%rsi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	20+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$6, %eax
	je	.L6
	movl	24+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	24+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$7, %eax
	je	.L6
	movl	28+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	28+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$8, %eax
	je	.L6
	movl	32+d(%rip), %eax
	xorl	%edx, %edx
	subl	$1, %eax
	cltq
	movsbl	15(%rsp,%rax), %eax
	subl	$48, %eax
	cmpl	32+c(%rip), %eax
	sete	%dl
	andl	%ecx, %edx
.L6:
	testl	%edx, %edx
	jne	.L5
	addl	$1, %r12d
	cmpl	%r12d, %ebx
	jle	.L42
.L9:
	movl	%r12d, %r8d
	movq	%r13, %rcx
	movl	$9, %edx
	movl	$1, %esi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__sprintf_chk@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jg	.L43
.L5:
	movl	%r12d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L42:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L8:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
.L11:
	.cfi_restore_state
	movl	$100, %ebx
	movl	$10, %r12d
	jmp	.L4
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 36
c:
	.zero	36
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 36
d:
	.zero	36
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"-1"
	.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
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	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	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	d(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	c(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(%r13,%rbx,4), %rdx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, 8(%rsp)
	jg	.L3
.L2:
	movl	4(%rsp), %eax
	cmpl	$2, %eax
	je	.L11
	cmpl	$3, %eax
	movl	$10, %ebx
	movl	$1000, %eax
	movl	$0, %r12d
	cmove	%eax, %ebx
	movl	$100, %eax
	cmove	%eax, %r12d
.L4:
	leaq	15(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L43:
	movl	d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	c(%rip), %edx
	sete	%dl
	sete	%sil
	movzbl	%dl, %edx
	cmpl	$1, %eax
	je	.L6
	movl	4+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	4+c(%rip), %edx
	sete	%cl
	andl	%esi, %ecx
	movzbl	%cl, %edx
	cmpl	$2, %eax
	je	.L6
	movl	8+d(%rip), %esi
	leal	-1(%rsi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	8+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$3, %eax
	je	.L6
	movl	12+d(%rip), %esi
	leal	-1(%rsi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	12+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$4, %eax
	je	.L6
	movl	16+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	16+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$5, %eax
	je	.L6
	movl	20+d(%rip), %esi
	leal	-1(%rsi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	20+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$6, %eax
	je	.L6
	movl	24+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	24+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$7, %eax
	je	.L6
	movl	28+d(%rip), %edi
	leal	-1(%rdi), %edx
	movslq	%edx, %rdx
	movsbl	15(%rsp,%rdx), %edx
	subl	$48, %edx
	cmpl	28+c(%rip), %edx
	sete	%dl
	andl	%edx, %ecx
	movzbl	%cl, %edx
	cmpl	$8, %eax
	je	.L6
	movl	32+d(%rip), %eax
	xorl	%edx, %edx
	subl	$1, %eax
	cltq
	movsbl	15(%rsp,%rax), %eax
	subl	$48, %eax
	cmpl	32+c(%rip), %eax
	sete	%dl
	andl	%ecx, %edx
.L6:
	testl	%edx, %edx
	jne	.L5
	addl	$1, %r12d
	cmpl	%r12d, %ebx
	jle	.L42
.L9:
	movl	%r12d, %r8d
	movq	%r13, %rcx
	movl	$9, %edx
	movl	$1, %esi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__sprintf_chk@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jg	.L43
.L5:
	movl	%r12d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L42:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L8:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
.L11:
	.cfi_restore_state
	movl	$100, %ebx
	movl	$10, %r12d
	jmp	.L4
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 36
c:
	.zero	36
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 36
d:
	.zero	36
	.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:
```