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

```c
m[25],w[25],i,j,W,g;main(n){for(;scanf("%d",&n)*n;puts(g?"No":"Yes"))for(W=g=i=0;++i<999;)for(j=n;j--;w[j]-i||(W+=m[j],g|=W>i))i-1||scanf("%d%d",m+j,w+j);}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"No"
.LC1:
	.string	"Yes"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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	.LC3(%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
	leaq	m(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %r14
.L2:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	je	.L19
	movl	$0, g(%rip)
	movl	$1, %ecx
	leaq	w(%rip), %r15
	movl	$0, W(%rip)
	movl	$1, i(%rip)
	.p2align 4,,10
	.p2align 3
.L10:
	leal	-1(%rdx), %eax
	leaq	.LC2(%rip), %r12
	movl	%eax, j(%rip)
	testl	%edx, %edx
	je	.L20
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	$1, %ecx
	je	.L21
	movslq	%eax, %rdx
	cmpl	%ecx, (%r15,%rdx,4)
	je	.L22
	movl	%eax, %edx
.L23:
	leal	-1(%rdx), %eax
	movl	%eax, j(%rip)
	testl	%edx, %edx
	jne	.L8
.L20:
	addl	$1, %ecx
	movl	%ecx, i(%rip)
	cmpl	$998, %ecx
	jg	.L9
	movl	12(%rsp), %edx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rbx, %rbp
.L6:
	movl	W(%rip), %esi
	addl	0(%rbp,%rdx,4), %esi
	cmpl	%ecx, %esi
	movl	%esi, W(%rip)
	setg	%dl
	movzbl	%dl, %edx
	orl	%edx, g(%rip)
	movl	%eax, %edx
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L21:
	cltq
	movq	%r12, %rdi
	movq	%rbx, %rbp
	salq	$2, %rax
	leaq	(%rax,%r15), %rdx
	leaq	(%rbx,%rax), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	j(%rip), %rdx
	movl	i(%rip), %ecx
	movq	%rdx, %rax
	cmpl	(%r15,%rdx,4), %ecx
	je	.L6
	movl	%eax, %edx
	jmp	.L23
.L9:
	movl	g(%rip), %eax
	leaq	.LC0(%rip), %rdi
	testl	%eax, %eax
	leaq	.LC1(%rip), %rax
	cmove	%rax, %rdi
	call	puts@PLT
	jmp	.L2
.L19:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	g
	.bss
	.align 4
	.type	g, @object
	.size	g, 4
g:
	.zero	4
	.globl	W
	.align 4
	.type	W, @object
	.size	W, 4
W:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 100
w:
	.zero	100
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 100
m:
	.zero	100
	.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	"No"
.LC1:
	.string	"Yes"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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	.LC3(%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
	leaq	m(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %r14
.L2:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	je	.L19
	movl	$0, g(%rip)
	movl	$1, %ecx
	leaq	w(%rip), %r15
	movl	$0, W(%rip)
	movl	$1, i(%rip)
	.p2align 4,,10
	.p2align 3
.L10:
	leal	-1(%rdx), %eax
	leaq	.LC2(%rip), %r12
	movl	%eax, j(%rip)
	testl	%edx, %edx
	je	.L20
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	$1, %ecx
	je	.L21
	movslq	%eax, %rdx
	cmpl	%ecx, (%r15,%rdx,4)
	je	.L22
	movl	%eax, %edx
.L23:
	leal	-1(%rdx), %eax
	movl	%eax, j(%rip)
	testl	%edx, %edx
	jne	.L8
.L20:
	addl	$1, %ecx
	movl	%ecx, i(%rip)
	cmpl	$998, %ecx
	jg	.L9
	movl	12(%rsp), %edx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rbx, %rbp
.L6:
	movl	W(%rip), %esi
	addl	0(%rbp,%rdx,4), %esi
	cmpl	%ecx, %esi
	movl	%esi, W(%rip)
	setg	%dl
	movzbl	%dl, %edx
	orl	%edx, g(%rip)
	movl	%eax, %edx
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L21:
	cltq
	movq	%r12, %rdi
	movq	%rbx, %rbp
	salq	$2, %rax
	leaq	(%rax,%r15), %rdx
	leaq	(%rbx,%rax), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	j(%rip), %rdx
	movl	i(%rip), %ecx
	movq	%rdx, %rax
	cmpl	(%r15,%rdx,4), %ecx
	je	.L6
	movl	%eax, %edx
	jmp	.L23
.L9:
	movl	g(%rip), %eax
	leaq	.LC0(%rip), %rdi
	testl	%eax, %eax
	leaq	.LC1(%rip), %rax
	cmove	%rax, %rdi
	call	puts@PLT
	jmp	.L2
.L19:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	g
	.bss
	.align 4
	.type	g, @object
	.size	g, 4
g:
	.zero	4
	.globl	W
	.align 4
	.type	W, @object
	.size	W, 4
W:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 100
w:
	.zero	100
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 100
m:
	.zero	100
	.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	"No"
.LC1:
	.string	"Yes"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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	.LC3(%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
	leaq	m(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %r14
.L2:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	je	.L19
	movl	$0, g(%rip)
	movl	$1, %ecx
	leaq	w(%rip), %r15
	movl	$0, W(%rip)
	movl	$1, i(%rip)
	.p2align 4,,10
	.p2align 3
.L10:
	leal	-1(%rdx), %eax
	leaq	.LC2(%rip), %r12
	movl	%eax, j(%rip)
	testl	%edx, %edx
	je	.L20
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	$1, %ecx
	je	.L21
	movslq	%eax, %rdx
	cmpl	%ecx, (%r15,%rdx,4)
	je	.L22
	movl	%eax, %edx
.L23:
	leal	-1(%rdx), %eax
	movl	%eax, j(%rip)
	testl	%edx, %edx
	jne	.L8
.L20:
	addl	$1, %ecx
	movl	%ecx, i(%rip)
	cmpl	$998, %ecx
	jg	.L9
	movl	12(%rsp), %edx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rbx, %rbp
.L6:
	movl	W(%rip), %esi
	addl	0(%rbp,%rdx,4), %esi
	cmpl	%ecx, %esi
	movl	%esi, W(%rip)
	setg	%dl
	movzbl	%dl, %edx
	orl	%edx, g(%rip)
	movl	%eax, %edx
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L21:
	cltq
	movq	%r12, %rdi
	movq	%rbx, %rbp
	salq	$2, %rax
	leaq	(%rax,%r15), %rdx
	leaq	(%rbx,%rax), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	j(%rip), %rdx
	movl	i(%rip), %ecx
	movq	%rdx, %rax
	cmpl	(%r15,%rdx,4), %ecx
	je	.L6
	movl	%eax, %edx
	jmp	.L23
.L9:
	movl	g(%rip), %eax
	leaq	.LC0(%rip), %rdi
	testl	%eax, %eax
	leaq	.LC1(%rip), %rax
	cmove	%rax, %rdi
	call	puts@PLT
	jmp	.L2
.L19:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	g
	.bss
	.align 4
	.type	g, @object
	.size	g, 4
g:
	.zero	4
	.globl	W
	.align 4
	.type	W, @object
	.size	W, 4
W:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 100
w:
	.zero	100
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 100
m:
	.zero	100
	.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
m[25],w[25],i,j,W,g;main(n){for(;scanf("%d",&n)*n;puts(g?"No":"Yes"))for(W=g=i=0;++i<999;)for(j=n;j--;w[j]-i||(W+=m[j],g|=W>i))i-1||scanf("%d%d",m+j,w+j);}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
m[25],w[25],i,j,W,g;main(n){for(;scanf("%d",&n)*n;puts(g?"No":"Yes"))for(W=g=i=0;++i<999;)for(j=n;j--;w[j]-i||(W+=m[j],g|=W>i))i-1||scanf("%d%d",m+j,w+j);}```

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
2 3
3 6
1 2
3
2 3
3 5
2 2
0
 3
2 3
3 6
2 2
3
3 3
3 6
2 2
0
 3
2 1
3 6
1 2
3
2 3
3 5
0 2
0
 3
2 5
0 9
4 1
0
2 0
3 10
2 3
0
 3
4 5
3 8
1 2
0
7 3
3 5
2 1
0
 3
2 3
3 6
1 2
3
0 3
3 5
1 2
0
 3
2 3
3 6
1 2
3
3 3
3 5
2 2
0
 3
2 3
3 6
1 2
3
3 3
3 6
2 2
0
 3
2 3
3 8
2 2
3
3 3
3 6
2 2
0
 3
2 3
3 8
2 2
3
3 3
3 6
2 3
0

Yes
No
 No
No
 No
Yes
 No
 Yes
 Yes
Yes
 Yes
No
 Yes
No
 No
No
 No
No

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

```c
m[25],w[25],i,j,W,g;main(n){for(;scanf("%d",&n)*n;puts(g?"No":"Yes"))for(W=g=i=0;++i<999;)for(j=n;j--;w[j]-i||(W+=m[j],g|=W>i))i-1||scanf("%d%d",m+j,w+j);}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"No"
.LC1:
	.string	"Yes"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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	.LC3(%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
	leaq	m(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %r14
.L2:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	je	.L19
	movl	$0, g(%rip)
	movl	$1, %ecx
	leaq	w(%rip), %r15
	movl	$0, W(%rip)
	movl	$1, i(%rip)
	.p2align 4,,10
	.p2align 3
.L10:
	leal	-1(%rdx), %eax
	leaq	.LC2(%rip), %r12
	movl	%eax, j(%rip)
	testl	%edx, %edx
	je	.L20
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	$1, %ecx
	je	.L21
	movslq	%eax, %rdx
	cmpl	%ecx, (%r15,%rdx,4)
	je	.L22
	movl	%eax, %edx
.L23:
	leal	-1(%rdx), %eax
	movl	%eax, j(%rip)
	testl	%edx, %edx
	jne	.L8
.L20:
	addl	$1, %ecx
	movl	%ecx, i(%rip)
	cmpl	$998, %ecx
	jg	.L9
	movl	12(%rsp), %edx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rbx, %rbp
.L6:
	movl	W(%rip), %esi
	addl	0(%rbp,%rdx,4), %esi
	cmpl	%ecx, %esi
	movl	%esi, W(%rip)
	setg	%dl
	movzbl	%dl, %edx
	orl	%edx, g(%rip)
	movl	%eax, %edx
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L21:
	cltq
	movq	%r12, %rdi
	movq	%rbx, %rbp
	salq	$2, %rax
	leaq	(%rax,%r15), %rdx
	leaq	(%rbx,%rax), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	j(%rip), %rdx
	movl	i(%rip), %ecx
	movq	%rdx, %rax
	cmpl	(%r15,%rdx,4), %ecx
	je	.L6
	movl	%eax, %edx
	jmp	.L23
.L9:
	movl	g(%rip), %eax
	leaq	.LC0(%rip), %rdi
	testl	%eax, %eax
	leaq	.LC1(%rip), %rax
	cmove	%rax, %rdi
	call	puts@PLT
	jmp	.L2
.L19:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	g
	.bss
	.align 4
	.type	g, @object
	.size	g, 4
g:
	.zero	4
	.globl	W
	.align 4
	.type	W, @object
	.size	W, 4
W:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 100
w:
	.zero	100
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 100
m:
	.zero	100
	.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	"No"
.LC1:
	.string	"Yes"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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	.LC3(%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
	leaq	m(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %r14
.L2:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	je	.L19
	movl	$0, g(%rip)
	movl	$1, %ecx
	leaq	w(%rip), %r15
	movl	$0, W(%rip)
	movl	$1, i(%rip)
	.p2align 4,,10
	.p2align 3
.L10:
	leal	-1(%rdx), %eax
	leaq	.LC2(%rip), %r12
	movl	%eax, j(%rip)
	testl	%edx, %edx
	je	.L20
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	$1, %ecx
	je	.L21
	movslq	%eax, %rdx
	cmpl	%ecx, (%r15,%rdx,4)
	je	.L22
	movl	%eax, %edx
.L23:
	leal	-1(%rdx), %eax
	movl	%eax, j(%rip)
	testl	%edx, %edx
	jne	.L8
.L20:
	addl	$1, %ecx
	movl	%ecx, i(%rip)
	cmpl	$998, %ecx
	jg	.L9
	movl	12(%rsp), %edx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rbx, %rbp
.L6:
	movl	W(%rip), %esi
	addl	0(%rbp,%rdx,4), %esi
	cmpl	%ecx, %esi
	movl	%esi, W(%rip)
	setg	%dl
	movzbl	%dl, %edx
	orl	%edx, g(%rip)
	movl	%eax, %edx
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L21:
	cltq
	movq	%r12, %rdi
	movq	%rbx, %rbp
	salq	$2, %rax
	leaq	(%rax,%r15), %rdx
	leaq	(%rbx,%rax), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	j(%rip), %rdx
	movl	i(%rip), %ecx
	movq	%rdx, %rax
	cmpl	(%r15,%rdx,4), %ecx
	je	.L6
	movl	%eax, %edx
	jmp	.L23
.L9:
	movl	g(%rip), %eax
	leaq	.LC0(%rip), %rdi
	testl	%eax, %eax
	leaq	.LC1(%rip), %rax
	cmove	%rax, %rdi
	call	puts@PLT
	jmp	.L2
.L19:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	g
	.bss
	.align 4
	.type	g, @object
	.size	g, 4
g:
	.zero	4
	.globl	W
	.align 4
	.type	W, @object
	.size	W, 4
W:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 100
w:
	.zero	100
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 100
m:
	.zero	100
	.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:
```