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>
#include <math.h>
#include <stdlib.h>

int cup[100],stat[100],sum[100],wat[200];
int N,SET;

int search(int cc,int left,int look,int num){
	int i;

	stat[look]=1;

	if(left==0){
		if(cc<N)stat[cc]=2;
		if(num==0)return 1;
		for(i=N-1;i>=0;i--){
			if(stat[i]==0)break;
			if(stat[i]==1 && search(i,cup[i],99,num))return 1;
		}
		if(look<N)stat[look]=0;
		stat[cc]=1;
		return 0;
	}

	int ccc=(look<N) ? look:cc;

	for(i=ccc-1;i>=0;i--){
		if(left<cup[i])continue;
		if(sum[i]<left)break;
		if(stat[i]==0 && search(cc,left-cup[i],i,num-1))return 1;
		if(i==cc-1 && stat[i]==0)break;
	}

	stat[look]=0;

	return 0;
}

int main(){
    int i,j,k;

    while(scanf("%d",&N)*N){
		SET++;

		for(i=0;i<=100;i++)wat[i]=0;
		for(i=0;i<N;i++){
			scanf("%d",&k);
			wat[k]++;
		}
		for(i=0,j=0,k=0;i<=100,j<N;i++){
			for(;wat[i]>0;wat[i]--){
				k+=i;
				cup[j]=i;
				stat[j]=0;
				sum[j]=k;
				j++;
			}
		}

		if(search(99,0,N-1,N-1))printf("YES\n"); else printf("NO\n");

    }
 
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cup
	.bss
	.align 32
	.type	cup, @object
	.size	cup, 400
cup:
	.zero	400
	.globl	stat
	.align 32
	.type	stat, @object
	.size	stat, 400
stat:
	.zero	400
	.globl	sum
	.align 32
	.type	sum, @object
	.size	sum, 400
sum:
	.zero	400
	.globl	wat
	.align 32
	.type	wat, @object
	.size	wat, 800
wat:
	.zero	800
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	SET
	.align 4
	.type	SET, @object
	.size	SET, 4
SET:
	.zero	4
	.text
	.globl	search
	.type	search, @function
search:
.LFB6:
	.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	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	$1, (%rdx,%rax)
	cmpl	$0, -24(%rbp)
	jne	.L2
	movl	N(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L3
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	$2, (%rdx,%rax)
.L3:
	cmpl	$0, -32(%rbp)
	jne	.L4
	movl	$1, %eax
	jmp	.L5
.L4:
	movl	N(%rip), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L6
.L10:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L21
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L9
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cup(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-32(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %ecx
	movl	$99, %edx
	movl	%eax, %edi
	call	search
	testl	%eax, %eax
	je	.L9
	movl	$1, %eax
	jmp	.L5
.L9:
	subl	$1, -8(%rbp)
.L6:
	cmpl	$0, -8(%rbp)
	jns	.L10
	jmp	.L8
.L21:
	nop
.L8:
	movl	N(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L11
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	$0, (%rdx,%rax)
.L11:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	$0, %eax
	jmp	.L5
.L2:
	movl	N(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L12
	movl	-28(%rbp), %eax
	jmp	.L13
.L12:
	movl	-20(%rbp), %eax
.L13:
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L14
.L20:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cup(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L22
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sum(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jg	.L23
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L19
	movl	-32(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cup(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %esi
	movl	-8(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	search
	testl	%eax, %eax
	je	.L19
	movl	$1, %eax
	jmp	.L5
.L19:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -8(%rbp)
	jne	.L16
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L24
	jmp	.L16
.L22:
	nop
.L16:
	subl	$1, -8(%rbp)
.L14:
	cmpl	$0, -8(%rbp)
	jns	.L20
	jmp	.L18
.L23:
	nop
	jmp	.L18
.L24:
	nop
.L18:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	$0, %eax
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	search, .-search
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L26
.L36:
	movl	SET(%rip), %eax
	addl	$1, %eax
	movl	%eax, SET(%rip)
	movl	$0, -16(%rbp)
	jmp	.L27
.L28:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	wat(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L27:
	cmpl	$100, -16(%rbp)
	jle	.L28
	movl	$0, -16(%rbp)
	jmp	.L29
.L30:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	wat(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	wat(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L29:
	movl	N(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L30
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L31
.L33:
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	cup(%rip), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-20(%rbp), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	sum(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	wat(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	wat(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L32:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	wat(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jg	.L33
	addl	$1, -16(%rbp)
.L31:
	movl	N(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L32
	movl	N(%rip), %eax
	leal	-1(%rax), %edx
	movl	N(%rip), %eax
	subl	$1, %eax
	movl	%edx, %ecx
	movl	%eax, %edx
	movl	$0, %esi
	movl	$99, %edi
	call	search
	testl	%eax, %eax
	je	.L35
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L26
.L35:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L26:
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	N(%rip), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	jne	.L36
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	search
	.type	search, @function
search:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edx, %r8
	movl	%ecx, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movslq	%edi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r8, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	stat(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	$1, (%r12,%r8,4)
	movl	N(%rip), %eax
	testl	%esi, %esi
	jne	.L2
	cmpl	%r14d, %eax
	jle	.L3
	movslq	%r14d, %rdx
	movl	$2, (%r12,%rdx,4)
.L3:
	testl	%r15d, %r15d
	je	.L11
	movl	%eax, %ebx
	subl	$1, %ebx
	js	.L6
	movslq	%ebx, %rbx
	leaq	cup(%rip), %rbp
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L12:
	subq	$1, %rbx
	testl	%ebx, %ebx
	js	.L23
.L9:
	movl	(%r12,%rbx,4), %eax
	movl	%ebx, %edi
	testl	%eax, %eax
	je	.L23
	cmpl	$1, %eax
	jne	.L12
	movl	0(%rbp,%rbx,4), %esi
	movl	%r15d, %ecx
	movl	$99, %edx
	movq	%r8, 8(%rsp)
	call	search
	movq	8(%rsp), %r8
	testl	%eax, %eax
	je	.L12
.L11:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	$1, %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
.L2:
	.cfi_restore_state
	cmpl	%r8d, %eax
	movl	%esi, %ebp
	leaq	cup(%rip), %r9
	cmovle	%r14d, %r13d
	leal	-1(%r13), %eax
	leaq	sum(%rip), %r13
	movslq	%eax, %rbx
	testl	%eax, %eax
	jns	.L18
.L17:
	movl	$0, (%r12,%r8,4)
	addq	$24, %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
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	movl	%ebp, %esi
	leal	-1(%r15), %ecx
	movl	%r14d, %edi
	movq	%r8, 8(%rsp)
	subl	%eax, %esi
	call	search
	testl	%eax, %eax
	jne	.L11
	leal	-1(%r14), %eax
	movq	8(%rsp), %r8
	leaq	cup(%rip), %r9
	cmpl	%ebx, %eax
	je	.L26
	.p2align 4,,10
	.p2align 3
.L16:
	subq	$1, %rbx
	testl	%ebx, %ebx
	js	.L17
.L18:
	movl	(%r9,%rbx,4), %eax
	movl	%ebx, %edx
	cmpl	%eax, %ebp
	jl	.L16
	cmpl	0(%r13,%rbx,4), %ebp
	jg	.L17
	movl	(%r12,%rbx,4), %ecx
	testl	%ecx, %ecx
	jne	.L16
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L26:
	movl	(%r12,%rbx,4), %eax
	testl	%eax, %eax
	jne	.L16
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L23:
	movl	N(%rip), %eax
.L6:
	cmpl	%eax, %r13d
	jge	.L13
	movl	$0, (%r12,%r8,4)
.L13:
	movl	$1, (%r12,%r14,4)
	addq	$24, %rsp
	.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
	.cfi_endproc
.LFE39:
	.size	search, .-search
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.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
	leaq	wat(%rip), %r13
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L29:
	leaq	N(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	N(%rip), %r11d
	imull	%r11d, %eax
	testl	%eax, %eax
	je	.L96
	movl	$50, %ecx
	xorl	%eax, %eax
	movq	%r13, %rdi
	addl	$1, SET(%rip)
	rep stosq
	movl	$0, (%rdi)
	testl	%r11d, %r11d
	jle	.L30
	xorl	%ebx, %ebx
	leaq	36(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L31:
	movq	%rbp, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movslq	36(%rsp), %rax
	movl	N(%rip), %r15d
	addl	$1, 0(%r13,%rax,4)
	cmpl	%ebx, %r15d
	jg	.L31
	movl	$0, 36(%rsp)
	testl	%r15d, %r15d
	jle	.L97
	movl	%r15d, 28(%rsp)
	xorl	%ecx, %ecx
	xorl	%edi, %edi
	xorl	%eax, %eax
	movq	%rcx, %r14
	xorl	%r8d, %r8d
	movl	%edi, %ecx
	.p2align 4,,10
	.p2align 3
.L32:
	movl	0(%r13,%r14,4), %ebp
	movl	%r14d, %r15d
	movl	%r14d, %r12d
	testl	%ebp, %ebp
	jle	.L43
	leal	-1(%rbp), %r9d
	movl	%ebp, 8(%rsp)
	movl	%r9d, %r11d
	cmpl	$2, %r9d
	jle	.L60
	leaq	cup(%rip), %rax
	movslq	%r8d, %rbx
	movd	%r15d, %xmm4
	leaq	(%rax,%rbx,4), %rdx
	movl	%ebp, %eax
	pshufd	$0, %xmm4, %xmm0
	shrl	$2, %eax
	leal	-1(%rax), %esi
	leaq	16(%rdx), %rax
	salq	$4, %rsi
	addq	%rax, %rsi
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L98:
	addq	$16, %rax
.L35:
	movups	%xmm0, (%rdx)
	movq	%rax, %rdx
	cmpq	%rsi, %rax
	jne	.L98
	movl	%ebp, %esi
	movl	%ebp, %edx
	andl	$-4, %esi
	andl	$3, %edx
	leal	(%r8,%rsi), %eax
	cmpl	%esi, %ebp
	je	.L99
.L34:
	movslq	%eax, %rsi
	leaq	cup(%rip), %rdi
	movl	%r12d, (%rdi,%rsi,4)
	leal	1(%rax), %esi
	cmpl	$1, %edx
	je	.L37
	movslq	%esi, %rsi
	addl	$2, %eax
	movl	%r12d, (%rdi,%rsi,4)
	cmpl	$2, %edx
	je	.L37
	cltq
	movl	%r12d, (%rdi,%rax,4)
.L37:
	salq	$2, %rbx
	leaq	stat(%rip), %rax
	movslq	%ebp, %rdx
	xorl	%esi, %esi
	salq	$2, %rdx
	leaq	(%rax,%rbx), %rdi
	movl	%r8d, 24(%rsp)
	movl	%ecx, 20(%rsp)
	movl	%r9d, 16(%rsp)
	movl	%r11d, 12(%rsp)
	call	memset@PLT
	movl	16(%rsp), %r9d
	movl	12(%rsp), %r11d
	leaq	sum(%rip), %r10
	movl	20(%rsp), %ecx
	movl	24(%rsp), %r8d
	cmpl	$2, %r9d
	jle	.L61
.L57:
	leal	(%rcx,%r12), %esi
	movd	%ecx, %xmm1
	sall	$2, %r15d
	addq	%r10, %rbx
	leal	(%r12,%rsi), %eax
	movd	%esi, %xmm6
	movd	%r15d, %xmm7
	leal	(%r12,%rax), %edx
	movd	%eax, %xmm0
	punpckldq	%xmm6, %xmm1
	movl	%ebp, %eax
	shrl	$2, %eax
	movd	%edx, %xmm5
	movd	%r12d, %xmm4
	leal	-1(%rax), %edx
	punpckldq	%xmm5, %xmm0
	leaq	16(%rbx), %rax
	salq	$4, %rdx
	punpcklqdq	%xmm0, %xmm1
	pshufd	$0, %xmm7, %xmm2
	pshufd	$0, %xmm4, %xmm3
	addq	%rax, %rdx
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L100:
	addq	$16, %rax
.L39:
	movdqa	%xmm1, %xmm0
	paddd	%xmm2, %xmm1
	paddd	%xmm3, %xmm0
	movups	%xmm0, (%rbx)
	movq	%rax, %rbx
	cmpq	%rdx, %rax
	jne	.L100
	movl	%ebp, %edi
	movl	%r12d, %eax
	andl	$-4, %edi
	imull	%edi, %eax
	subl	%edi, %ebp
	leal	(%r8,%rdi), %edx
	leal	-1(%rbp), %r9d
	addl	%ecx, %eax
	cmpl	8(%rsp), %edi
	je	.L40
.L38:
	movslq	%edx, %rcx
	addl	%r12d, %eax
	movl	%eax, (%r10,%rcx,4)
	leal	1(%rdx), %ecx
	testl	%r9d, %r9d
	je	.L40
	addl	%r12d, %eax
	movslq	%ecx, %rcx
	addl	$2, %edx
	movl	%eax, (%r10,%rcx,4)
	cmpl	$2, %ebp
	je	.L40
	movslq	%edx, %rdx
	addl	%r12d, %eax
	movl	%eax, (%r10,%rdx,4)
.L40:
	movl	%r12d, %ecx
	leal	1(%r8,%r11), %r8d
	movl	$1, %eax
	movl	$0, 0(%r13,%r14,4)
	imull	%r11d, %ecx
	addl	%esi, %ecx
.L43:
	addq	$1, %r14
	cmpl	%r8d, 28(%rsp)
	jg	.L32
	movl	28(%rsp), %r15d
	testb	%al, %al
	je	.L44
	movl	%ecx, 36(%rsp)
.L44:
	leal	-1(%r15), %r11d
	leaq	stat(%rip), %rax
	movslq	%r11d, %rbx
	movl	$1, (%rax,%rbx,4)
	cmpl	$99, %r15d
	jle	.L45
	movl	$2, 396+stat(%rip)
.L45:
	testl	%r11d, %r11d
	je	.L46
.L56:
	movq	%rbx, %r10
	testl	%r11d, %r11d
	jns	.L52
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L53:
	subq	$1, %r10
	testl	%r10d, %r10d
	js	.L50
.L52:
	leaq	stat(%rip), %rax
	movl	%r10d, %edi
	movl	(%rax,%r10,4), %eax
	testl	%eax, %eax
	je	.L50
	cmpl	$1, %eax
	jne	.L53
	leaq	cup(%rip), %rax
	movl	%r11d, %ecx
	movl	$99, %edx
	movl	(%rax,%r10,4), %esi
	call	search
	testl	%eax, %eax
	je	.L53
.L46:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L99:
	leaq	stat(%rip), %rax
	salq	$2, %rbx
	movl	%ebp, %edx
	xorl	%esi, %esi
	salq	$2, %rdx
	leaq	(%rax,%rbx), %rdi
	movl	%r8d, 20(%rsp)
	movl	%ecx, 16(%rsp)
	movl	%r11d, 12(%rsp)
	call	memset@PLT
	movl	12(%rsp), %r11d
	movl	16(%rsp), %ecx
	leaq	sum(%rip), %r10
	movl	20(%rsp), %r8d
	jmp	.L57
.L61:
	movl	%ecx, %eax
	movl	%r8d, %edx
	leal	(%rcx,%r12), %esi
	jmp	.L38
.L60:
	movl	%r8d, %eax
	movl	%ebp, %edx
	movslq	%r8d, %rbx
	jmp	.L34
.L50:
	cmpl	%r11d, N(%rip)
	jle	.L49
	leaq	stat(%rip), %rax
	movl	$0, (%rax,%rbx,4)
.L49:
	leaq	.LC1(%rip), %rdi
	movl	$1, 396+stat(%rip)
	call	puts@PLT
	jmp	.L29
.L96:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L101
	addq	$56, %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
.L30:
	.cfi_restore_state
	subl	$1, %r11d
	leaq	stat(%rip), %rax
	movl	$0, 36(%rsp)
	movslq	%r11d, %rbx
	movl	$1, (%rax,%rbx,4)
	jmp	.L56
.L97:
	leal	-1(%r15), %r11d
	leaq	stat(%rip), %rax
	movslq	%r11d, %rbx
	movl	$1, (%rax,%rbx,4)
	jmp	.L45
.L101:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	SET
	.bss
	.align 4
	.type	SET, @object
	.size	SET, 4
SET:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	wat
	.align 32
	.type	wat, @object
	.size	wat, 800
wat:
	.zero	800
	.globl	sum
	.align 32
	.type	sum, @object
	.size	sum, 400
sum:
	.zero	400
	.globl	stat
	.align 32
	.type	stat, @object
	.size	stat, 400
stat:
	.zero	400
	.globl	cup
	.align 32
	.type	cup, @object
	.size	cup, 400
cup:
	.zero	400
	.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	search
	.type	search, @function
search:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edx, %r8
	movl	%ecx, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movslq	%edi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r8, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	stat(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	$1, (%r12,%r8,4)
	movl	N(%rip), %eax
	testl	%esi, %esi
	jne	.L2
	cmpl	%r14d, %eax
	jle	.L3
	movslq	%r14d, %rdx
	movl	$2, (%r12,%rdx,4)
.L3:
	testl	%r15d, %r15d
	je	.L11
	movl	%eax, %ebx
	subl	$1, %ebx
	js	.L6
	movslq	%ebx, %rbx
	leaq	cup(%rip), %rbp
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L12:
	subq	$1, %rbx
	testl	%ebx, %ebx
	js	.L23
.L9:
	movl	(%r12,%rbx,4), %eax
	movl	%ebx, %edi
	testl	%eax, %eax
	je	.L23
	cmpl	$1, %eax
	jne	.L12
	movl	0(%rbp,%rbx,4), %esi
	movl	%r15d, %ecx
	movl	$99, %edx
	movq	%r8, 8(%rsp)
	call	search
	movq	8(%rsp), %r8
	testl	%eax, %eax
	je	.L12
.L11:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	$1, %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
.L2:
	.cfi_restore_state
	cmpl	%r8d, %eax
	movl	%esi, %ebp
	leaq	cup(%rip), %r9
	cmovle	%r14d, %r13d
	leal	-1(%r13), %eax
	leaq	sum(%rip), %r13
	movslq	%eax, %rbx
	testl	%eax, %eax
	jns	.L18
.L17:
	movl	$0, (%r12,%r8,4)
	addq	$24, %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
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	movl	%ebp, %esi
	leal	-1(%r15), %ecx
	movl	%r14d, %edi
	movq	%r8, 8(%rsp)
	subl	%eax, %esi
	call	search
	testl	%eax, %eax
	jne	.L11
	leal	-1(%r14), %eax
	movq	8(%rsp), %r8
	leaq	cup(%rip), %r9
	cmpl	%ebx, %eax
	je	.L26
	.p2align 4,,10
	.p2align 3
.L16:
	subq	$1, %rbx
	testl	%ebx, %ebx
	js	.L17
.L18:
	movl	(%r9,%rbx,4), %eax
	movl	%ebx, %edx
	cmpl	%eax, %ebp
	jl	.L16
	cmpl	0(%r13,%rbx,4), %ebp
	jg	.L17
	movl	(%r12,%rbx,4), %ecx
	testl	%ecx, %ecx
	jne	.L16
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L26:
	movl	(%r12,%rbx,4), %eax
	testl	%eax, %eax
	jne	.L16
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L23:
	movl	N(%rip), %eax
.L6:
	cmpl	%eax, %r13d
	jge	.L13
	movl	$0, (%r12,%r8,4)
.L13:
	movl	$1, (%r12,%r14,4)
	addq	$24, %rsp
	.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
	.cfi_endproc
.LFE39:
	.size	search, .-search
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.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
	leaq	wat(%rip), %r13
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L29:
	leaq	N(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	N(%rip), %r11d
	imull	%r11d, %eax
	testl	%eax, %eax
	je	.L96
	movl	$50, %ecx
	xorl	%eax, %eax
	movq	%r13, %rdi
	addl	$1, SET(%rip)
	rep stosq
	movl	$0, (%rdi)
	testl	%r11d, %r11d
	jle	.L30
	xorl	%ebx, %ebx
	leaq	36(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L31:
	movq	%rbp, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movslq	36(%rsp), %rax
	movl	N(%rip), %r15d
	addl	$1, 0(%r13,%rax,4)
	cmpl	%ebx, %r15d
	jg	.L31
	movl	$0, 36(%rsp)
	testl	%r15d, %r15d
	jle	.L97
	movl	%r15d, 28(%rsp)
	xorl	%ecx, %ecx
	xorl	%edi, %edi
	xorl	%eax, %eax
	movq	%rcx, %r14
	xorl	%r8d, %r8d
	movl	%edi, %ecx
	.p2align 4,,10
	.p2align 3
.L32:
	movl	0(%r13,%r14,4), %ebp
	movl	%r14d, %r15d
	movl	%r14d, %r12d
	testl	%ebp, %ebp
	jle	.L43
	leal	-1(%rbp), %r9d
	movl	%ebp, 8(%rsp)
	movl	%r9d, %r11d
	cmpl	$2, %r9d
	jle	.L60
	leaq	cup(%rip), %rax
	movslq	%r8d, %rbx
	movd	%r15d, %xmm4
	leaq	(%rax,%rbx,4), %rdx
	movl	%ebp, %eax
	pshufd	$0, %xmm4, %xmm0
	shrl	$2, %eax
	leal	-1(%rax), %esi
	leaq	16(%rdx), %rax
	salq	$4, %rsi
	addq	%rax, %rsi
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L98:
	addq	$16, %rax
.L35:
	movups	%xmm0, (%rdx)
	movq	%rax, %rdx
	cmpq	%rsi, %rax
	jne	.L98
	movl	%ebp, %esi
	movl	%ebp, %edx
	andl	$-4, %esi
	andl	$3, %edx
	leal	(%r8,%rsi), %eax
	cmpl	%esi, %ebp
	je	.L99
.L34:
	movslq	%eax, %rsi
	leaq	cup(%rip), %rdi
	movl	%r12d, (%rdi,%rsi,4)
	leal	1(%rax), %esi
	cmpl	$1, %edx
	je	.L37
	movslq	%esi, %rsi
	addl	$2, %eax
	movl	%r12d, (%rdi,%rsi,4)
	cmpl	$2, %edx
	je	.L37
	cltq
	movl	%r12d, (%rdi,%rax,4)
.L37:
	salq	$2, %rbx
	leaq	stat(%rip), %rax
	movslq	%ebp, %rdx
	xorl	%esi, %esi
	salq	$2, %rdx
	leaq	(%rax,%rbx), %rdi
	movl	%r8d, 24(%rsp)
	movl	%ecx, 20(%rsp)
	movl	%r9d, 16(%rsp)
	movl	%r11d, 12(%rsp)
	call	memset@PLT
	movl	16(%rsp), %r9d
	movl	12(%rsp), %r11d
	leaq	sum(%rip), %r10
	movl	20(%rsp), %ecx
	movl	24(%rsp), %r8d
	cmpl	$2, %r9d
	jle	.L61
.L57:
	leal	(%rcx,%r12), %esi
	movd	%ecx, %xmm1
	sall	$2, %r15d
	addq	%r10, %rbx
	leal	(%r12,%rsi), %eax
	movd	%esi, %xmm6
	movd	%r15d, %xmm7
	leal	(%r12,%rax), %edx
	movd	%eax, %xmm0
	punpckldq	%xmm6, %xmm1
	movl	%ebp, %eax
	shrl	$2, %eax
	movd	%edx, %xmm5
	movd	%r12d, %xmm4
	leal	-1(%rax), %edx
	punpckldq	%xmm5, %xmm0
	leaq	16(%rbx), %rax
	salq	$4, %rdx
	punpcklqdq	%xmm0, %xmm1
	pshufd	$0, %xmm7, %xmm2
	pshufd	$0, %xmm4, %xmm3
	addq	%rax, %rdx
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L100:
	addq	$16, %rax
.L39:
	movdqa	%xmm1, %xmm0
	paddd	%xmm2, %xmm1
	paddd	%xmm3, %xmm0
	movups	%xmm0, (%rbx)
	movq	%rax, %rbx
	cmpq	%rdx, %rax
	jne	.L100
	movl	%ebp, %edi
	movl	%r12d, %eax
	andl	$-4, %edi
	imull	%edi, %eax
	subl	%edi, %ebp
	leal	(%r8,%rdi), %edx
	leal	-1(%rbp), %r9d
	addl	%ecx, %eax
	cmpl	8(%rsp), %edi
	je	.L40
.L38:
	movslq	%edx, %rcx
	addl	%r12d, %eax
	movl	%eax, (%r10,%rcx,4)
	leal	1(%rdx), %ecx
	testl	%r9d, %r9d
	je	.L40
	addl	%r12d, %eax
	movslq	%ecx, %rcx
	addl	$2, %edx
	movl	%eax, (%r10,%rcx,4)
	cmpl	$2, %ebp
	je	.L40
	movslq	%edx, %rdx
	addl	%r12d, %eax
	movl	%eax, (%r10,%rdx,4)
.L40:
	movl	%r12d, %ecx
	leal	1(%r8,%r11), %r8d
	movl	$1, %eax
	movl	$0, 0(%r13,%r14,4)
	imull	%r11d, %ecx
	addl	%esi, %ecx
.L43:
	addq	$1, %r14
	cmpl	%r8d, 28(%rsp)
	jg	.L32
	movl	28(%rsp), %r15d
	testb	%al, %al
	je	.L44
	movl	%ecx, 36(%rsp)
.L44:
	leal	-1(%r15), %r11d
	leaq	stat(%rip), %rax
	movslq	%r11d, %rbx
	movl	$1, (%rax,%rbx,4)
	cmpl	$99, %r15d
	jle	.L45
	movl	$2, 396+stat(%rip)
.L45:
	testl	%r11d, %r11d
	je	.L46
.L56:
	movq	%rbx, %r10
	testl	%r11d, %r11d
	jns	.L52
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L53:
	subq	$1, %r10
	testl	%r10d, %r10d
	js	.L50
.L52:
	leaq	stat(%rip), %rax
	movl	%r10d, %edi
	movl	(%rax,%r10,4), %eax
	testl	%eax, %eax
	je	.L50
	cmpl	$1, %eax
	jne	.L53
	leaq	cup(%rip), %rax
	movl	%r11d, %ecx
	movl	$99, %edx
	movl	(%rax,%r10,4), %esi
	call	search
	testl	%eax, %eax
	je	.L53
.L46:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L99:
	leaq	stat(%rip), %rax
	salq	$2, %rbx
	movl	%ebp, %edx
	xorl	%esi, %esi
	salq	$2, %rdx
	leaq	(%rax,%rbx), %rdi
	movl	%r8d, 20(%rsp)
	movl	%ecx, 16(%rsp)
	movl	%r11d, 12(%rsp)
	call	memset@PLT
	movl	12(%rsp), %r11d
	movl	16(%rsp), %ecx
	leaq	sum(%rip), %r10
	movl	20(%rsp), %r8d
	jmp	.L57
.L61:
	movl	%ecx, %eax
	movl	%r8d, %edx
	leal	(%rcx,%r12), %esi
	jmp	.L38
.L60:
	movl	%r8d, %eax
	movl	%ebp, %edx
	movslq	%r8d, %rbx
	jmp	.L34
.L50:
	cmpl	%r11d, N(%rip)
	jle	.L49
	leaq	stat(%rip), %rax
	movl	$0, (%rax,%rbx,4)
.L49:
	leaq	.LC1(%rip), %rdi
	movl	$1, 396+stat(%rip)
	call	puts@PLT
	jmp	.L29
.L96:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L101
	addq	$56, %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
.L30:
	.cfi_restore_state
	subl	$1, %r11d
	leaq	stat(%rip), %rax
	movl	$0, 36(%rsp)
	movslq	%r11d, %rbx
	movl	$1, (%rax,%rbx,4)
	jmp	.L56
.L97:
	leal	-1(%r15), %r11d
	leaq	stat(%rip), %rax
	movslq	%r11d, %rbx
	movl	$1, (%rax,%rbx,4)
	jmp	.L45
.L101:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	SET
	.bss
	.align 4
	.type	SET, @object
	.size	SET, 4
SET:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	wat
	.align 32
	.type	wat, @object
	.size	wat, 800
wat:
	.zero	800
	.globl	sum
	.align 32
	.type	sum, @object
	.size	sum, 400
sum:
	.zero	400
	.globl	stat
	.align 32
	.type	stat, @object
	.size	stat, 400
stat:
	.zero	400
	.globl	cup
	.align 32
	.type	cup, @object
	.size	cup, 400
cup:
	.zero	400
	.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>
#include <math.h>
#include <stdlib.h>

int cup[100],stat[100],sum[100],wat[200];
int N,SET;

int search(int cc,int left,int look,int num){
	int i;

	stat[look]=1;

	if(left==0){
		if(cc<N)stat[cc]=2;
		if(num==0)return 1;
		for(i=N-1;i>=0;i--){
			if(stat[i]==0)break;
			if(stat[i]==1 && search(i,cup[i],99,num))return 1;
		}
		if(look<N)stat[look]=0;
		stat[cc]=1;
		return 0;
	}

	int ccc=(look<N) ? look:cc;

	for(i=ccc-1;i>=0;i--){
		if(left<cup[i])continue;
		if(sum[i]<left)break;
		if(stat[i]==0 && search(cc,left-cup[i],i,num-1))return 1;
		if(i==cc-1 && stat[i]==0)break;
	}

	stat[look]=0;

	return 0;
}

int main(){
    int i,j,k;

    while(scanf("%d",&N)*N){
		SET++;

		for(i=0;i<=100;i++)wat[i]=0;
		for(i=0;i<N;i++){
			scanf("%d",&k);
			wat[k]++;
		}
		for(i=0,j=0,k=0;i<=100,j<N;i++){
			for(;wat[i]>0;wat[i]--){
				k+=i;
				cup[j]=i;
				stat[j]=0;
				sum[j]=k;
				j++;
			}
		}

		if(search(99,0,N-1,N-1))printf("YES\n"); else printf("NO\n");

    }
 
    return 0;
}
10
11 2 23 4 2 12 8 5 2 10
8
2 1 3 11 2 3 1 4
9
5 9 1 2 4 8 17 1 8
8
3 38 9 4 24 14 19 5
1
1
0
 10
11 2 23 4 3 12 8 5 2 10
8
2 1 3 11 2 3 1 4
9
5 9 1 2 4 8 17 1 8
8
3 38 9 4 24 14 19 5
1
1
0
 10
11 2 23 4 3 12 8 5 0 10
8
2 1 3 11 2 3 1 4
9
5 9 1 2 4 8 17 1 14
8
3 38 9 4 24 14 19 5
1
1
0
 10
11 2 23 4 2 12 8 5 2 10
8
2 1 3 11 2 3 1 4
9
5 9 1 2 4 8 10 1 8
8
3 38 9 4 18 14 19 5
1
1
0
 10
11 2 23 4 2 12 9 5 2 10
8
2 1 3 11 4 3 1 4
9
5 9 1 2 4 8 10 1 8
8
3 38 9 4 18 14 3 5
1
1
0
 10
11 2 23 4 3 8 8 5 0 10
8
2 1 1 11 2 1 1 4
9
5 9 1 2 4 8 17 1 14
8
3 38 3 4 24 14 19 2
0
1
0
 10
11 2 23 4 3 12 8 5 2 10
8
3 1 3 11 2 5 1 4
9
5 9 1 0 4 8 17 1 8
8
1 38 9 4 24 14 19 5
1
1
0
 10
11 2 23 4 3 12 8 5 0 10
8
4 1 1 5 2 3 1 4
9
5 9 1 2 1 8 17 1 14
0
3 38 9 4 24 14 19 5
1
1
0
 10
11 2 23 4 3 8 8 5 0 10
0
2 1 1 11 2 1 1 4
9
5 9 1 2 4 8 17 1 14
8
3 38 9 4 24 14 8 2
1
1
0
 10
11 2 23 4 3 8 8 5 0 10
8
2 1 1 11 2 1 1 4
9
4 9 1 2 4 8 12 1 14
8
3 38 1 1 24 14 19 2
0
1
0

YES
YES
YES
NO
YES
 NO
YES
YES
NO
YES
 NO
YES
NO
NO
YES
 YES
YES
NO
NO
YES
 YES
YES
NO
YES
YES
 NO
YES
NO
NO
 NO
YES
NO
YES
YES
 NO
YES
YES
 NO
 NO
YES
NO
YES

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>
#include <math.h>
#include <stdlib.h>

int cup[100],stat[100],sum[100],wat[200];
int N,SET;

int search(int cc,int left,int look,int num){
	int i;

	stat[look]=1;

	if(left==0){
		if(cc<N)stat[cc]=2;
		if(num==0)return 1;
		for(i=N-1;i>=0;i--){
			if(stat[i]==0)break;
			if(stat[i]==1 && search(i,cup[i],99,num))return 1;
		}
		if(look<N)stat[look]=0;
		stat[cc]=1;
		return 0;
	}

	int ccc=(look<N) ? look:cc;

	for(i=ccc-1;i>=0;i--){
		if(left<cup[i])continue;
		if(sum[i]<left)break;
		if(stat[i]==0 && search(cc,left-cup[i],i,num-1))return 1;
		if(i==cc-1 && stat[i]==0)break;
	}

	stat[look]=0;

	return 0;
}

int main(){
    int i,j,k;

    while(scanf("%d",&N)*N){
		SET++;

		for(i=0;i<=100;i++)wat[i]=0;
		for(i=0;i<N;i++){
			scanf("%d",&k);
			wat[k]++;
		}
		for(i=0,j=0,k=0;i<=100,j<N;i++){
			for(;wat[i]>0;wat[i]--){
				k+=i;
				cup[j]=i;
				stat[j]=0;
				sum[j]=k;
				j++;
			}
		}

		if(search(99,0,N-1,N-1))printf("YES\n"); else printf("NO\n");

    }
 
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cup
	.bss
	.align 32
	.type	cup, @object
	.size	cup, 400
cup:
	.zero	400
	.globl	stat
	.align 32
	.type	stat, @object
	.size	stat, 400
stat:
	.zero	400
	.globl	sum
	.align 32
	.type	sum, @object
	.size	sum, 400
sum:
	.zero	400
	.globl	wat
	.align 32
	.type	wat, @object
	.size	wat, 800
wat:
	.zero	800
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	SET
	.align 4
	.type	SET, @object
	.size	SET, 4
SET:
	.zero	4
	.text
	.globl	search
	.type	search, @function
search:
.LFB6:
	.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	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	$1, (%rdx,%rax)
	cmpl	$0, -24(%rbp)
	jne	.L2
	movl	N(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L3
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	$2, (%rdx,%rax)
.L3:
	cmpl	$0, -32(%rbp)
	jne	.L4
	movl	$1, %eax
	jmp	.L5
.L4:
	movl	N(%rip), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L6
.L10:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L21
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L9
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cup(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-32(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %ecx
	movl	$99, %edx
	movl	%eax, %edi
	call	search
	testl	%eax, %eax
	je	.L9
	movl	$1, %eax
	jmp	.L5
.L9:
	subl	$1, -8(%rbp)
.L6:
	cmpl	$0, -8(%rbp)
	jns	.L10
	jmp	.L8
.L21:
	nop
.L8:
	movl	N(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L11
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	$0, (%rdx,%rax)
.L11:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	$0, %eax
	jmp	.L5
.L2:
	movl	N(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L12
	movl	-28(%rbp), %eax
	jmp	.L13
.L12:
	movl	-20(%rbp), %eax
.L13:
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L14
.L20:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cup(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L22
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sum(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jg	.L23
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L19
	movl	-32(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cup(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %esi
	movl	-8(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	search
	testl	%eax, %eax
	je	.L19
	movl	$1, %eax
	jmp	.L5
.L19:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -8(%rbp)
	jne	.L16
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L24
	jmp	.L16
.L22:
	nop
.L16:
	subl	$1, -8(%rbp)
.L14:
	cmpl	$0, -8(%rbp)
	jns	.L20
	jmp	.L18
.L23:
	nop
	jmp	.L18
.L24:
	nop
.L18:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	$0, %eax
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	search, .-search
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L26
.L36:
	movl	SET(%rip), %eax
	addl	$1, %eax
	movl	%eax, SET(%rip)
	movl	$0, -16(%rbp)
	jmp	.L27
.L28:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	wat(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L27:
	cmpl	$100, -16(%rbp)
	jle	.L28
	movl	$0, -16(%rbp)
	jmp	.L29
.L30:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	wat(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	wat(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L29:
	movl	N(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L30
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L31
.L33:
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	cup(%rip), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-20(%rbp), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	sum(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	wat(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	wat(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L32:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	wat(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jg	.L33
	addl	$1, -16(%rbp)
.L31:
	movl	N(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L32
	movl	N(%rip), %eax
	leal	-1(%rax), %edx
	movl	N(%rip), %eax
	subl	$1, %eax
	movl	%edx, %ecx
	movl	%eax, %edx
	movl	$0, %esi
	movl	$99, %edi
	call	search
	testl	%eax, %eax
	je	.L35
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L26
.L35:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L26:
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	N(%rip), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	jne	.L36
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	cup
	.bss
	.align 32
	.type	cup, @object
	.size	cup, 400
cup:
	.zero	400
	.globl	stat
	.align 32
	.type	stat, @object
	.size	stat, 400
stat:
	.zero	400
	.globl	sum
	.align 32
	.type	sum, @object
	.size	sum, 400
sum:
	.zero	400
	.globl	wat
	.align 32
	.type	wat, @object
	.size	wat, 800
wat:
	.zero	800
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	SET
	.align 4
	.type	SET, @object
	.size	SET, 4
SET:
	.zero	4
	.text
	.globl	search
	.type	search, @function
search:
.LFB6:
	.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	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	$1, (%rdx,%rax)
	cmpl	$0, -24(%rbp)
	jne	.L2
	movl	N(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L3
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	$2, (%rdx,%rax)
.L3:
	cmpl	$0, -32(%rbp)
	jne	.L4
	movl	$1, %eax
	jmp	.L5
.L4:
	movl	N(%rip), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L6
.L10:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L21
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L9
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cup(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-32(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %ecx
	movl	$99, %edx
	movl	%eax, %edi
	call	search
	testl	%eax, %eax
	je	.L9
	movl	$1, %eax
	jmp	.L5
.L9:
	subl	$1, -8(%rbp)
.L6:
	cmpl	$0, -8(%rbp)
	jns	.L10
	jmp	.L8
.L21:
	nop
.L8:
	movl	N(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L11
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	$0, (%rdx,%rax)
.L11:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	$0, %eax
	jmp	.L5
.L2:
	movl	N(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L12
	movl	-28(%rbp), %eax
	jmp	.L13
.L12:
	movl	-20(%rbp), %eax
.L13:
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L14
.L20:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cup(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L22
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sum(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jg	.L23
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L19
	movl	-32(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cup(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %esi
	movl	-8(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	search
	testl	%eax, %eax
	je	.L19
	movl	$1, %eax
	jmp	.L5
.L19:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -8(%rbp)
	jne	.L16
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L24
	jmp	.L16
.L22:
	nop
.L16:
	subl	$1, -8(%rbp)
.L14:
	cmpl	$0, -8(%rbp)
	jns	.L20
	jmp	.L18
.L23:
	nop
	jmp	.L18
.L24:
	nop
.L18:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	$0, %eax
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	search, .-search
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L26
.L36:
	movl	SET(%rip), %eax
	addl	$1, %eax
	movl	%eax, SET(%rip)
	movl	$0, -16(%rbp)
	jmp	.L27
.L28:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	wat(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L27:
	cmpl	$100, -16(%rbp)
	jle	.L28
	movl	$0, -16(%rbp)
	jmp	.L29
.L30:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	wat(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	wat(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L29:
	movl	N(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L30
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L31
.L33:
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	cup(%rip), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	stat(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-20(%rbp), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	sum(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	wat(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	wat(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L32:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	wat(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jg	.L33
	addl	$1, -16(%rbp)
.L31:
	movl	N(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L32
	movl	N(%rip), %eax
	leal	-1(%rax), %edx
	movl	N(%rip), %eax
	subl	$1, %eax
	movl	%edx, %ecx
	movl	%eax, %edx
	movl	$0, %esi
	movl	$99, %edi
	call	search
	testl	%eax, %eax
	je	.L35
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L26
.L35:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L26:
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	N(%rip), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	jne	.L36
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
