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>
#define MAX 2000

int slove(int,int,int*);

int main(){
    int m[MAX];
    int A[MAX];
    int q;
    int n;

    scanf("%d",&n);
    for(int i = 0;i < n;i++)scanf("%d",&A[i]);
    scanf("%d",&q);
    for(int i = 0;i < q;i++)scanf("%d",&m[i]);

    for(int i = 0;i < q;i ++){
        if(slove(n,m[i],A) == 1)printf("yes\n");
        else printf("no\n");
    }          

    return 0;
}

int slove(int n,int m,int *A){
    if(n == 0)return 0;
    if(m == A[0])return 1;
    if(m < A[0])return slove(n-1,m,A + 1);
    return slove(n - 1,m - A[0],A + 1) || slove(n-1, m, A + 1);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"yes"
.LC2:
	.string	"no"
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3760, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16028(%rbp)
	jmp	.L2
.L3:
	leaq	-8016(%rbp), %rdx
	movl	-16028(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16028(%rbp)
.L2:
	movl	-16032(%rbp), %eax
	cmpl	%eax, -16028(%rbp)
	jl	.L3
	leaq	-16036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16024(%rbp)
	jmp	.L4
.L5:
	leaq	-16016(%rbp), %rdx
	movl	-16024(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16024(%rbp)
.L4:
	movl	-16036(%rbp), %eax
	cmpl	%eax, -16024(%rbp)
	jl	.L5
	movl	$0, -16020(%rbp)
	jmp	.L6
.L9:
	movl	-16020(%rbp), %eax
	cltq
	movl	-16016(%rbp,%rax,4), %ecx
	movl	-16032(%rbp), %eax
	leaq	-8016(%rbp), %rdx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	slove
	cmpl	$1, %eax
	jne	.L7
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L8
.L7:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L8:
	addl	$1, -16020(%rbp)
.L6:
	movl	-16036(%rbp), %eax
	cmpl	%eax, -16020(%rbp)
	jl	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	slove
	.type	slove, @function
slove:
.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
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movq	%rdx, -16(%rbp)
	cmpl	$0, -4(%rbp)
	jne	.L13
	movl	$0, %eax
	jmp	.L14
.L13:
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L15
	movl	$1, %eax
	jmp	.L14
.L15:
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jge	.L16
	movq	-16(%rbp), %rax
	leaq	4(%rax), %rdx
	movl	-4(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	slove
	jmp	.L14
.L16:
	movq	-16(%rbp), %rax
	leaq	4(%rax), %rdx
	movq	-16(%rbp), %rax
	movl	(%rax), %esi
	movl	-8(%rbp), %eax
	subl	%esi, %eax
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	slove
	testl	%eax, %eax
	jne	.L17
	movq	-16(%rbp), %rax
	leaq	4(%rax), %rdx
	movl	-4(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	slove
	testl	%eax, %eax
	je	.L18
.L17:
	movl	$1, %eax
	jmp	.L14
.L18:
	movl	$0, %eax
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	slove, .-slove
	.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	slove
	.type	slove, @function
slove:
.LFB24:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	je	.L13
	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
	movl	%esi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rdx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%edi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L37:
	addq	$4, %r12
	subl	$1, %ebp
	cmpl	%r13d, %eax
	jle	.L3
	testl	%ebp, %ebp
	je	.L23
.L4:
	movl	(%r12), %eax
	cmpl	%r13d, %eax
	jne	.L37
.L22:
	movl	$1, %r9d
.L1:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r9d, %eax
	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
.L23:
	.cfi_restore_state
	xorl	%r9d, %r9d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%r13d, %ebx
	subl	%eax, %ebx
	testl	%ebp, %ebp
	je	.L23
	movq	%r12, %r14
	movl	%ebp, %r15d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L38:
	addq	$4, %r14
	subl	$1, %r15d
	cmpl	%eax, %ebx
	jge	.L5
	testl	%r15d, %r15d
	je	.L7
.L6:
	movl	(%r14), %eax
	cmpl	%eax, %ebx
	jne	.L38
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L39:
	addq	$4, %r12
	subl	$1, %ebp
	cmpl	%eax, %r13d
	jge	.L12
	testl	%ebp, %ebp
	je	.L23
.L7:
	movl	(%r12), %eax
	cmpl	%eax, %r13d
	jne	.L39
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%ebx, %r8d
	subl	%eax, %r8d
	testl	%r15d, %r15d
	je	.L8
	movq	%r14, %rdx
	movl	%r15d, %edi
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L40:
	addq	$4, %rdx
	subl	$1, %edi
	cmpl	%eax, %r8d
	jge	.L9
	testl	%edi, %edi
	je	.L8
.L10:
	movl	(%rdx), %eax
	cmpl	%eax, %r8d
	jne	.L40
	jmp	.L22
.L13:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	xorl	%eax, %eax
	ret
.L9:
	.cfi_def_cfa_offset 80
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	movl	%r8d, %esi
	movl	%r8d, 12(%rsp)
	subl	%eax, %esi
	movq	%rdx, (%rsp)
	movl	%edi, 8(%rsp)
	call	slove
	movl	8(%rsp), %edi
	movq	(%rsp), %rdx
	movl	$1, %r9d
	testl	%eax, %eax
	movl	12(%rsp), %r8d
	jne	.L1
	movl	%r8d, %esi
	movl	%r9d, 8(%rsp)
	call	slove
	movl	8(%rsp), %r9d
	testl	%eax, %eax
	jne	.L1
.L8:
	movq	%r14, %rdx
	movl	%ebx, %esi
	movl	%r15d, %edi
	call	slove
	movl	$1, %r9d
	testl	%eax, %eax
	jne	.L1
	jmp	.L7
.L12:
	movl	%r13d, %esi
	movq	%r12, %rdx
	movl	%ebp, %edi
	subl	%eax, %esi
	call	slove
	movl	$1, %r9d
	testl	%eax, %eax
	jne	.L1
	movq	%r12, %rdx
	movl	%r13d, %esi
	movl	%ebp, %edi
	call	slove
	xorl	%r9d, %r9d
	testl	%eax, %eax
	setne	%r9b
	jmp	.L1
	.cfi_endproc
.LFE24:
	.size	slove, .-slove
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"yes"
.LC2:
	.string	"no"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 12344
	orq	$0, (%rsp)
	subq	$3784, %rsp
	.cfi_def_cfa_offset 16128
	leaq	.LC0(%rip), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 16056(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rsi
	leaq	8048(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %edx
	testl	%edx, %edx
	jle	.L46
	.p2align 4,,10
	.p2align 3
.L45:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	cmpl	%ebx, 44(%rsp)
	jg	.L45
.L46:
	leaq	40(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	call	__isoc99_scanf@PLT
	leaq	48(%rsp), %rax
	movq	%rax, %r14
	movq	%rax, %rbp
	movl	40(%rsp), %eax
	testl	%eax, %eax
	jle	.L44
	.p2align 4,,10
	.p2align 3
.L47:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L47
	testl	%eax, %eax
	jle	.L44
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L68:
	movl	44(%rsp), %r10d
	movl	(%r14,%rbx,4), %ebp
	testl	%r10d, %r10d
	je	.L48
	leaq	8048(%rsp), %r11
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L129:
	addq	$4, %r11
	subl	$1, %r10d
	cmpl	%eax, %ebp
	jge	.L50
	testl	%r10d, %r10d
	je	.L48
.L51:
	movl	(%r11), %eax
	cmpl	%eax, %ebp
	jne	.L129
.L49:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L67:
	addq	$1, %rbx
	cmpl	%ebx, 40(%rsp)
	jg	.L68
.L44:
	movq	16056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L130
	addq	$16072, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L66:
	.cfi_restore_state
	movl	%ebp, %esi
	movq	%r11, %rdx
	movl	%r10d, %edi
	subl	%eax, %esi
	call	slove
	testl	%eax, %eax
	jne	.L49
	movq	%r11, %rdx
	movl	%ebp, %esi
	movl	%r10d, %edi
	call	slove
	testl	%eax, %eax
	jne	.L49
	.p2align 4,,10
	.p2align 3
.L48:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L67
	.p2align 4,,10
	.p2align 3
.L50:
	movl	%ebp, %r15d
	subl	%eax, %r15d
	testl	%r10d, %r10d
	je	.L48
	movq	%r11, %r12
	movl	%r10d, %r13d
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L131:
	addq	$4, %r12
	subl	$1, %r13d
	cmpl	%eax, %r15d
	jge	.L52
	testl	%r13d, %r13d
	je	.L98
.L54:
	movl	(%r12), %eax
	cmpl	%eax, %r15d
	jne	.L131
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L132:
	addq	$4, %r11
	subl	$1, %r10d
	cmpl	%eax, %ebp
	jge	.L62
	testl	%r10d, %r10d
	je	.L48
.L98:
	movl	(%r11), %eax
	cmpl	%eax, %ebp
	jne	.L132
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L52:
	movl	%r15d, %r9d
	subl	%eax, %r9d
	testl	%r13d, %r13d
	je	.L98
	movq	%r12, %rcx
	movl	%r13d, %r8d
	jmp	.L57
	.p2align 4,,10
	.p2align 3
.L133:
	addq	$4, %rcx
	subl	$1, %r8d
	cmpl	%eax, %r9d
	jge	.L55
	testl	%r8d, %r8d
	je	.L99
.L57:
	movl	(%rcx), %eax
	cmpl	%eax, %r9d
	jne	.L133
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L134:
	addq	$4, %r12
	subl	$1, %r13d
	cmpl	%eax, %r15d
	jge	.L61
	testl	%r13d, %r13d
	je	.L98
.L99:
	movl	(%r12), %eax
	cmpl	%eax, %r15d
	jne	.L134
	jmp	.L49
.L62:
	movl	%ebp, %r15d
	subl	%eax, %r15d
	testl	%r10d, %r10d
	je	.L48
	movq	%r11, %r12
	movl	%r10d, %r13d
	jmp	.L65
	.p2align 4,,10
	.p2align 3
.L135:
	addq	$4, %r12
	subl	$1, %r13d
	cmpl	%eax, %r15d
	jge	.L63
	testl	%r13d, %r13d
	je	.L100
.L65:
	movl	(%r12), %eax
	cmpl	%eax, %r15d
	jne	.L135
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L136:
	addq	$4, %r11
	subl	$1, %r10d
	cmpl	%eax, %ebp
	jge	.L66
	testl	%r10d, %r10d
	je	.L48
.L100:
	movl	(%r11), %eax
	cmpl	%eax, %ebp
	jne	.L136
	jmp	.L49
.L55:
	movl	%r9d, %esi
	subl	%eax, %esi
	movl	%esi, 8(%rsp)
	testl	%r8d, %r8d
	je	.L58
	movq	%rcx, %rdx
	movl	%r8d, %edi
	jmp	.L60
	.p2align 4,,10
	.p2align 3
.L137:
	addq	$4, %rdx
	subl	$1, %edi
	cmpl	%eax, %esi
	jge	.L59
	testl	%edi, %edi
	je	.L58
.L60:
	movl	(%rdx), %eax
	cmpl	%eax, %esi
	jne	.L137
	jmp	.L49
.L63:
	movl	%r15d, %esi
	movq	%r12, %rdx
	movl	%r13d, %edi
	subl	%eax, %esi
	call	slove
	testl	%eax, %eax
	jne	.L49
	movq	%r12, %rdx
	movl	%r15d, %esi
	movl	%r13d, %edi
	call	slove
	testl	%eax, %eax
	jne	.L49
	jmp	.L100
.L61:
	movl	%r15d, %esi
	movq	%r12, %rdx
	movl	%r13d, %edi
	subl	%eax, %esi
	call	slove
	testl	%eax, %eax
	jne	.L49
	movq	%r12, %rdx
	movl	%r15d, %esi
	movl	%r13d, %edi
	call	slove
	testl	%eax, %eax
	jne	.L49
	jmp	.L98
.L59:
	movl	8(%rsp), %esi
	movl	%r8d, 28(%rsp)
	movl	%r9d, 24(%rsp)
	subl	%eax, %esi
	movq	%rdx, 16(%rsp)
	movl	%edi, 12(%rsp)
	call	slove
	movl	12(%rsp), %edi
	movq	16(%rsp), %rdx
	testl	%eax, %eax
	movl	24(%rsp), %r9d
	movl	28(%rsp), %r8d
	jne	.L49
	movl	8(%rsp), %esi
	movl	%r9d, 16(%rsp)
	movl	%r8d, 12(%rsp)
	call	slove
	movl	12(%rsp), %r8d
	movl	16(%rsp), %r9d
	testl	%eax, %eax
	jne	.L49
.L58:
	movq	%rcx, %rdx
	movl	%r9d, %esi
	movl	%r8d, %edi
	call	slove
	testl	%eax, %eax
	jne	.L49
	jmp	.L99
.L130:
	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
	.p2align 4
	.globl	slove
	.type	slove, @function
slove:
.LFB24:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	je	.L13
	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
	movl	%esi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rdx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%edi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L37:
	addq	$4, %r12
	subl	$1, %ebp
	cmpl	%r13d, %eax
	jle	.L3
	testl	%ebp, %ebp
	je	.L23
.L4:
	movl	(%r12), %eax
	cmpl	%r13d, %eax
	jne	.L37
.L22:
	movl	$1, %r9d
.L1:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r9d, %eax
	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
.L23:
	.cfi_restore_state
	xorl	%r9d, %r9d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%r13d, %ebx
	subl	%eax, %ebx
	testl	%ebp, %ebp
	je	.L23
	movq	%r12, %r14
	movl	%ebp, %r15d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L38:
	addq	$4, %r14
	subl	$1, %r15d
	cmpl	%eax, %ebx
	jge	.L5
	testl	%r15d, %r15d
	je	.L7
.L6:
	movl	(%r14), %eax
	cmpl	%eax, %ebx
	jne	.L38
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L39:
	addq	$4, %r12
	subl	$1, %ebp
	cmpl	%eax, %r13d
	jge	.L12
	testl	%ebp, %ebp
	je	.L23
.L7:
	movl	(%r12), %eax
	cmpl	%eax, %r13d
	jne	.L39
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%ebx, %r8d
	subl	%eax, %r8d
	testl	%r15d, %r15d
	je	.L8
	movq	%r14, %rdx
	movl	%r15d, %edi
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L40:
	addq	$4, %rdx
	subl	$1, %edi
	cmpl	%eax, %r8d
	jge	.L9
	testl	%edi, %edi
	je	.L8
.L10:
	movl	(%rdx), %eax
	cmpl	%eax, %r8d
	jne	.L40
	jmp	.L22
.L13:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	xorl	%eax, %eax
	ret
.L9:
	.cfi_def_cfa_offset 80
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	movl	%r8d, %esi
	movl	%r8d, 12(%rsp)
	subl	%eax, %esi
	movq	%rdx, (%rsp)
	movl	%edi, 8(%rsp)
	call	slove
	movl	8(%rsp), %edi
	movq	(%rsp), %rdx
	movl	$1, %r9d
	testl	%eax, %eax
	movl	12(%rsp), %r8d
	jne	.L1
	movl	%r8d, %esi
	movl	%r9d, 8(%rsp)
	call	slove
	movl	8(%rsp), %r9d
	testl	%eax, %eax
	jne	.L1
.L8:
	movq	%r14, %rdx
	movl	%ebx, %esi
	movl	%r15d, %edi
	call	slove
	movl	$1, %r9d
	testl	%eax, %eax
	jne	.L1
	jmp	.L7
.L12:
	movl	%r13d, %esi
	movq	%r12, %rdx
	movl	%ebp, %edi
	subl	%eax, %esi
	call	slove
	movl	$1, %r9d
	testl	%eax, %eax
	jne	.L1
	movq	%r12, %rdx
	movl	%r13d, %esi
	movl	%ebp, %edi
	call	slove
	xorl	%r9d, %r9d
	testl	%eax, %eax
	setne	%r9b
	jmp	.L1
	.cfi_endproc
.LFE24:
	.size	slove, .-slove
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"yes"
.LC2:
	.string	"no"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 12344
	orq	$0, (%rsp)
	subq	$3784, %rsp
	.cfi_def_cfa_offset 16128
	leaq	.LC0(%rip), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 16056(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rsi
	leaq	8048(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %edx
	testl	%edx, %edx
	jle	.L46
	.p2align 4,,10
	.p2align 3
.L45:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	cmpl	%ebx, 44(%rsp)
	jg	.L45
.L46:
	leaq	40(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	call	__isoc99_scanf@PLT
	leaq	48(%rsp), %rax
	movq	%rax, %r14
	movq	%rax, %rbp
	movl	40(%rsp), %eax
	testl	%eax, %eax
	jle	.L44
	.p2align 4,,10
	.p2align 3
.L47:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L47
	testl	%eax, %eax
	jle	.L44
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L68:
	movl	44(%rsp), %r10d
	movl	(%r14,%rbx,4), %ebp
	testl	%r10d, %r10d
	je	.L48
	leaq	8048(%rsp), %r11
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L129:
	addq	$4, %r11
	subl	$1, %r10d
	cmpl	%eax, %ebp
	jge	.L50
	testl	%r10d, %r10d
	je	.L48
.L51:
	movl	(%r11), %eax
	cmpl	%eax, %ebp
	jne	.L129
.L49:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L67:
	addq	$1, %rbx
	cmpl	%ebx, 40(%rsp)
	jg	.L68
.L44:
	movq	16056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L130
	addq	$16072, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L66:
	.cfi_restore_state
	movl	%ebp, %esi
	movq	%r11, %rdx
	movl	%r10d, %edi
	subl	%eax, %esi
	call	slove
	testl	%eax, %eax
	jne	.L49
	movq	%r11, %rdx
	movl	%ebp, %esi
	movl	%r10d, %edi
	call	slove
	testl	%eax, %eax
	jne	.L49
	.p2align 4,,10
	.p2align 3
.L48:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L67
	.p2align 4,,10
	.p2align 3
.L50:
	movl	%ebp, %r15d
	subl	%eax, %r15d
	testl	%r10d, %r10d
	je	.L48
	movq	%r11, %r12
	movl	%r10d, %r13d
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L131:
	addq	$4, %r12
	subl	$1, %r13d
	cmpl	%eax, %r15d
	jge	.L52
	testl	%r13d, %r13d
	je	.L98
.L54:
	movl	(%r12), %eax
	cmpl	%eax, %r15d
	jne	.L131
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L132:
	addq	$4, %r11
	subl	$1, %r10d
	cmpl	%eax, %ebp
	jge	.L62
	testl	%r10d, %r10d
	je	.L48
.L98:
	movl	(%r11), %eax
	cmpl	%eax, %ebp
	jne	.L132
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L52:
	movl	%r15d, %r9d
	subl	%eax, %r9d
	testl	%r13d, %r13d
	je	.L98
	movq	%r12, %rcx
	movl	%r13d, %r8d
	jmp	.L57
	.p2align 4,,10
	.p2align 3
.L133:
	addq	$4, %rcx
	subl	$1, %r8d
	cmpl	%eax, %r9d
	jge	.L55
	testl	%r8d, %r8d
	je	.L99
.L57:
	movl	(%rcx), %eax
	cmpl	%eax, %r9d
	jne	.L133
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L134:
	addq	$4, %r12
	subl	$1, %r13d
	cmpl	%eax, %r15d
	jge	.L61
	testl	%r13d, %r13d
	je	.L98
.L99:
	movl	(%r12), %eax
	cmpl	%eax, %r15d
	jne	.L134
	jmp	.L49
.L62:
	movl	%ebp, %r15d
	subl	%eax, %r15d
	testl	%r10d, %r10d
	je	.L48
	movq	%r11, %r12
	movl	%r10d, %r13d
	jmp	.L65
	.p2align 4,,10
	.p2align 3
.L135:
	addq	$4, %r12
	subl	$1, %r13d
	cmpl	%eax, %r15d
	jge	.L63
	testl	%r13d, %r13d
	je	.L100
.L65:
	movl	(%r12), %eax
	cmpl	%eax, %r15d
	jne	.L135
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L136:
	addq	$4, %r11
	subl	$1, %r10d
	cmpl	%eax, %ebp
	jge	.L66
	testl	%r10d, %r10d
	je	.L48
.L100:
	movl	(%r11), %eax
	cmpl	%eax, %ebp
	jne	.L136
	jmp	.L49
.L55:
	movl	%r9d, %esi
	subl	%eax, %esi
	movl	%esi, 8(%rsp)
	testl	%r8d, %r8d
	je	.L58
	movq	%rcx, %rdx
	movl	%r8d, %edi
	jmp	.L60
	.p2align 4,,10
	.p2align 3
.L137:
	addq	$4, %rdx
	subl	$1, %edi
	cmpl	%eax, %esi
	jge	.L59
	testl	%edi, %edi
	je	.L58
.L60:
	movl	(%rdx), %eax
	cmpl	%eax, %esi
	jne	.L137
	jmp	.L49
.L63:
	movl	%r15d, %esi
	movq	%r12, %rdx
	movl	%r13d, %edi
	subl	%eax, %esi
	call	slove
	testl	%eax, %eax
	jne	.L49
	movq	%r12, %rdx
	movl	%r15d, %esi
	movl	%r13d, %edi
	call	slove
	testl	%eax, %eax
	jne	.L49
	jmp	.L100
.L61:
	movl	%r15d, %esi
	movq	%r12, %rdx
	movl	%r13d, %edi
	subl	%eax, %esi
	call	slove
	testl	%eax, %eax
	jne	.L49
	movq	%r12, %rdx
	movl	%r15d, %esi
	movl	%r13d, %edi
	call	slove
	testl	%eax, %eax
	jne	.L49
	jmp	.L98
.L59:
	movl	8(%rsp), %esi
	movl	%r8d, 28(%rsp)
	movl	%r9d, 24(%rsp)
	subl	%eax, %esi
	movq	%rdx, 16(%rsp)
	movl	%edi, 12(%rsp)
	call	slove
	movl	12(%rsp), %edi
	movq	16(%rsp), %rdx
	testl	%eax, %eax
	movl	24(%rsp), %r9d
	movl	28(%rsp), %r8d
	jne	.L49
	movl	8(%rsp), %esi
	movl	%r9d, 16(%rsp)
	movl	%r8d, 12(%rsp)
	call	slove
	movl	12(%rsp), %r8d
	movl	16(%rsp), %r9d
	testl	%eax, %eax
	jne	.L49
.L58:
	movq	%rcx, %rdx
	movl	%r9d, %esi
	movl	%r8d, %edi
	call	slove
	testl	%eax, %eax
	jne	.L49
	jmp	.L99
.L130:
	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>
#define MAX 2000

int slove(int,int,int*);

int main(){
    int m[MAX];
    int A[MAX];
    int q;
    int n;

    scanf("%d",&n);
    for(int i = 0;i < n;i++)scanf("%d",&A[i]);
    scanf("%d",&q);
    for(int i = 0;i < q;i++)scanf("%d",&m[i]);

    for(int i = 0;i < q;i ++){
        if(slove(n,m[i],A) == 1)printf("yes\n");
        else printf("no\n");
    }          

    return 0;
}

int slove(int n,int m,int *A){
    if(n == 0)return 0;
    if(m == A[0])return 1;
    if(m < A[0])return slove(n-1,m,A + 1);
    return slove(n - 1,m - A[0],A + 1) || slove(n-1, m, A + 1);
}

5
1 5 7 10 21
8
2 4 17 10 22 21 100 35
 5
1 5 7 3 21
8
2 4 17 10 22 21 100 42
 5
1 5 7 3 21
8
0 4 17 10 22 21 100 42
 5
1 5 7 3 21
8
0 4 17 11 22 21 010 42
 5
0 5 7 3 21
8
0 4 17 11 22 21 010 42
 5
0 5 10 3 21
8
0 4 17 11 22 14 010 42
 5
0 5 10 3 21
8
1 4 17 11 22 14 010 42
 5
0 5 10 3 21
8
1 4 17 11 22 14 011 42
 5
0 5 10 -1 21
8
1 7 17 11 8 14 011 41
 5
0 5 13 -1 21
8
1 2 17 11 8 14 011 41

no
no
yes
yes
yes
yes
no
no
 no
yes
no
yes
yes
yes
no
no
 no
yes
no
yes
yes
yes
no
no
 no
yes
no
yes
yes
yes
yes
no
 yes
no
no
no
no
yes
yes
no
 yes
no
no
no
no
no
yes
no
 no
no
no
no
no
no
yes
no
 no
no
no
no
no
no
no
no
 no
no
no
no
no
no
no
no
 no
no
no
no
no
no
no
no

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>
#define MAX 2000

int slove(int,int,int*);

int main(){
    int m[MAX];
    int A[MAX];
    int q;
    int n;

    scanf("%d",&n);
    for(int i = 0;i < n;i++)scanf("%d",&A[i]);
    scanf("%d",&q);
    for(int i = 0;i < q;i++)scanf("%d",&m[i]);

    for(int i = 0;i < q;i ++){
        if(slove(n,m[i],A) == 1)printf("yes\n");
        else printf("no\n");
    }          

    return 0;
}

int slove(int n,int m,int *A){
    if(n == 0)return 0;
    if(m == A[0])return 1;
    if(m < A[0])return slove(n-1,m,A + 1);
    return slove(n - 1,m - A[0],A + 1) || slove(n-1, m, A + 1);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"yes"
.LC2:
	.string	"no"
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3760, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16028(%rbp)
	jmp	.L2
.L3:
	leaq	-8016(%rbp), %rdx
	movl	-16028(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16028(%rbp)
.L2:
	movl	-16032(%rbp), %eax
	cmpl	%eax, -16028(%rbp)
	jl	.L3
	leaq	-16036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16024(%rbp)
	jmp	.L4
.L5:
	leaq	-16016(%rbp), %rdx
	movl	-16024(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16024(%rbp)
.L4:
	movl	-16036(%rbp), %eax
	cmpl	%eax, -16024(%rbp)
	jl	.L5
	movl	$0, -16020(%rbp)
	jmp	.L6
.L9:
	movl	-16020(%rbp), %eax
	cltq
	movl	-16016(%rbp,%rax,4), %ecx
	movl	-16032(%rbp), %eax
	leaq	-8016(%rbp), %rdx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	slove
	cmpl	$1, %eax
	jne	.L7
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L8
.L7:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L8:
	addl	$1, -16020(%rbp)
.L6:
	movl	-16036(%rbp), %eax
	cmpl	%eax, -16020(%rbp)
	jl	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	slove
	.type	slove, @function
slove:
.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
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movq	%rdx, -16(%rbp)
	cmpl	$0, -4(%rbp)
	jne	.L13
	movl	$0, %eax
	jmp	.L14
.L13:
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L15
	movl	$1, %eax
	jmp	.L14
.L15:
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jge	.L16
	movq	-16(%rbp), %rax
	leaq	4(%rax), %rdx
	movl	-4(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	slove
	jmp	.L14
.L16:
	movq	-16(%rbp), %rax
	leaq	4(%rax), %rdx
	movq	-16(%rbp), %rax
	movl	(%rax), %esi
	movl	-8(%rbp), %eax
	subl	%esi, %eax
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	slove
	testl	%eax, %eax
	jne	.L17
	movq	-16(%rbp), %rax
	leaq	4(%rax), %rdx
	movl	-4(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	slove
	testl	%eax, %eax
	je	.L18
.L17:
	movl	$1, %eax
	jmp	.L14
.L18:
	movl	$0, %eax
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	slove, .-slove
	.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
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"yes"
.LC2:
	.string	"no"
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3760, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16028(%rbp)
	jmp	.L2
.L3:
	leaq	-8016(%rbp), %rdx
	movl	-16028(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16028(%rbp)
.L2:
	movl	-16032(%rbp), %eax
	cmpl	%eax, -16028(%rbp)
	jl	.L3
	leaq	-16036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16024(%rbp)
	jmp	.L4
.L5:
	leaq	-16016(%rbp), %rdx
	movl	-16024(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16024(%rbp)
.L4:
	movl	-16036(%rbp), %eax
	cmpl	%eax, -16024(%rbp)
	jl	.L5
	movl	$0, -16020(%rbp)
	jmp	.L6
.L9:
	movl	-16020(%rbp), %eax
	cltq
	movl	-16016(%rbp,%rax,4), %ecx
	movl	-16032(%rbp), %eax
	leaq	-8016(%rbp), %rdx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	slove
	cmpl	$1, %eax
	jne	.L7
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L8
.L7:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L8:
	addl	$1, -16020(%rbp)
.L6:
	movl	-16036(%rbp), %eax
	cmpl	%eax, -16020(%rbp)
	jl	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	slove
	.type	slove, @function
slove:
.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
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movq	%rdx, -16(%rbp)
	cmpl	$0, -4(%rbp)
	jne	.L13
	movl	$0, %eax
	jmp	.L14
.L13:
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L15
	movl	$1, %eax
	jmp	.L14
.L15:
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jge	.L16
	movq	-16(%rbp), %rax
	leaq	4(%rax), %rdx
	movl	-4(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	slove
	jmp	.L14
.L16:
	movq	-16(%rbp), %rax
	leaq	4(%rax), %rdx
	movq	-16(%rbp), %rax
	movl	(%rax), %esi
	movl	-8(%rbp), %eax
	subl	%esi, %eax
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	slove
	testl	%eax, %eax
	jne	.L17
	movq	-16(%rbp), %rax
	leaq	4(%rax), %rdx
	movl	-4(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	slove
	testl	%eax, %eax
	je	.L18
.L17:
	movl	$1, %eax
	jmp	.L14
.L18:
	movl	$0, %eax
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	slove, .-slove
	.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:
