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

```c
n,r,k,m[101][101],t[101],p;
i,j,s,d,v0,v,f;
main(){
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&r,&k);
		for(;k--;){
			scanf("%d",&d);
			m[r][d]=1;
		}
	}
	scanf("%d",&p);
	for(;p--;){
		scanf("%d%d%d",&s,&d,&v0);
		memset(t,0,sizeof(t));
		t[s]=v=v0;
		f=1;
		while(f&&!t[d]&&--v>0){
			f=0;
			for(i=1;i<=n;i++){
				if(t[i]==v+1){
					for(j=1;j<=n;j++){
						if(m[i][j]&&t[j]==0)
							t[j]=v,f=1;
					}
				}
			}
		}
		if(t[d])
			printf("%d\n",v0-t[d]+1);
		else
			puts("NA");
	}
	exit(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 40804
m:
	.zero	40804
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 404
t:
	.zero	404
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	d
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.globl	v0
	.align 4
	.type	v0, @object
	.size	v0, 4
v0:
	.zero	4
	.globl	v
	.align 4
	.type	v, @object
	.size	v, 4
v:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d%d%d"
.LC3:
	.string	"%d\n"
.LC4:
	.string	"NA"
	.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
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, i(%rip)
	jmp	.L2
.L5:
	leaq	k(%rip), %rax
	movq	%rax, %rdx
	leaq	r(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L3
.L4:
	leaq	d(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	r(%rip), %eax
	movl	d(%rip), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	$1, (%rdx,%rax)
.L3:
	movl	k(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, k(%rip)
	testl	%eax, %eax
	jne	.L4
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L2:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L5
	leaq	p(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L6
.L17:
	leaq	v0(%rip), %rax
	movq	%rax, %rcx
	leaq	d(%rip), %rax
	movq	%rax, %rdx
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$404, %edx
	movl	$0, %esi
	leaq	t(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	v0(%rip), %eax
	movl	%eax, v(%rip)
	movl	s(%rip), %edx
	movl	v(%rip), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	t(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$1, f(%rip)
	jmp	.L7
.L15:
	movl	$0, f(%rip)
	movl	$1, i(%rip)
	jmp	.L8
.L13:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	v(%rip), %edx
	addl	$1, %edx
	cmpl	%edx, %eax
	jne	.L9
	movl	$1, j(%rip)
	jmp	.L10
.L12:
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L11
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L11
	movl	j(%rip), %edx
	movl	v(%rip), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	t(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$1, f(%rip)
.L11:
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L10:
	movl	j(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jle	.L12
.L9:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L8:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jle	.L13
.L7:
	movl	f(%rip), %eax
	testl	%eax, %eax
	je	.L14
	movl	d(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L14
	movl	v(%rip), %eax
	subl	$1, %eax
	movl	%eax, v(%rip)
	movl	v(%rip), %eax
	testl	%eax, %eax
	jg	.L15
.L14:
	movl	d(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L16
	movl	v0(%rip), %eax
	movl	d(%rip), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	t(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L16:
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L6:
	movl	p(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, p(%rip)
	testl	%eax, %eax
	jne	.L17
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d%d%d"
.LC3:
	.string	"%d\n"
.LC4:
	.string	"NA"
	.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
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	d(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	leaq	m(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	call	scanf@PLT
	movl	n(%rip), %eax
	movl	$0, i(%rip)
	testl	%eax, %eax
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	k(%rip), %rdx
	leaq	r(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	jmp	.L57
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	r(%rip), %rax
	movslq	d(%rip), %rcx
	leaq	(%rax,%rax,4), %rdx
	leaq	(%rdx,%rdx,4), %rdx
	leaq	(%rax,%rdx,4), %rax
	addq	%rcx, %rax
	movl	$1, (%rbx,%rax,4)
.L57:
	movl	k(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, k(%rip)
	testl	%eax, %eax
	jne	.L5
	movl	i(%rip), %eax
	addl	$1, %eax
	cmpl	n(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L2
.L6:
	movq	%rbp, %rdi
	leaq	p(%rip), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	p(%rip), %eax
	leaq	t(%rip), %rbp
	leaq	d(%rip), %rbx
	leaq	4(%rbp), %r12
	leal	-1(%rax), %edx
	movl	%edx, p(%rip)
	testl	%eax, %eax
	je	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	v0(%rip), %rcx
	movq	%rbx, %rdx
	leaq	s(%rip), %rsi
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rdi
	call	scanf@PLT
	xorl	%eax, %eax
	movl	$50, %ecx
	movq	%rbp, %rdi
	rep stosq
	movl	v0(%rip), %r13d
	movl	n(%rip), %r10d
	leaq	8+t(%rip), %rsi
	movslq	s(%rip), %rax
	movslq	d(%rip), %r11
	xorl	%r9d, %r9d
	movl	$1, f(%rip)
	leal	1(%r10), %r8d
	movl	%r13d, v(%rip)
	movl	%r13d, %ecx
	movl	$0, (%rdi)
	movl	%r13d, 0(%rbp,%rax,4)
	leal	-1(%r10), %eax
	leaq	(%rsi,%rax,4), %rdx
	xorl	%eax, %eax
	movl	%r13d, %esi
	movl	%eax, %edi
	movl	%r15d, %eax
	movl	%r13d, %r15d
	movl	%r10d, %r13d
	movl	%r8d, %r10d
	.p2align 4,,10
	.p2align 3
.L8:
	movl	0(%rbp,%r11,4), %r8d
	testl	%r8d, %r8d
	jne	.L17
	subl	$1, %esi
	testl	%esi, %esi
	jle	.L59
	testl	%r13d, %r13d
	jle	.L60
	leaq	408+m(%rip), %rdi
	leaq	4+t(%rip), %r14
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L12:
	addq	$4, %r14
	addq	$404, %rdi
	cmpq	%r14, %rdx
	je	.L61
.L15:
	cmpl	%ecx, (%r14)
	jne	.L12
	movq	%r12, %rax
	movq	%rdi, %r9
	.p2align 4,,10
	.p2align 3
.L14:
	cmpl	$0, (%r9)
	je	.L13
	cmpl	$0, (%rax)
	jne	.L13
	movl	%esi, (%rax)
	movl	$1, %r8d
.L13:
	addq	$4, %rax
	addq	$4, %r9
	cmpq	%rdx, %rax
	jne	.L14
	addq	$4, %r14
	movl	%r10d, %eax
	movl	$1, %r9d
	addq	$404, %rdi
	cmpq	%r14, %rdx
	jne	.L15
	.p2align 4,,10
	.p2align 3
.L61:
	movl	%r10d, %r14d
	subl	$1, %ecx
	movl	$1, %edi
	testl	%r8d, %r8d
	jne	.L8
	movl	%r15d, %r13d
	movl	%esi, v(%rip)
	movl	%eax, %r15d
	movl	%r10d, i(%rip)
	testb	%r9b, %r9b
	je	.L20
	movl	%eax, j(%rip)
.L20:
	movl	$0, f(%rip)
	movl	0(%rbp,%r11,4), %edi
	testl	%edi, %edi
	jne	.L21
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L60:
	movl	%esi, v(%rip)
	movl	%eax, %r15d
	movl	$1, i(%rip)
	testb	%r9b, %r9b
	je	.L10
	movl	%eax, j(%rip)
.L10:
	movl	$0, f(%rip)
.L22:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
.L23:
	movl	p(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, p(%rip)
	testl	%eax, %eax
	jne	.L3
.L4:
	xorl	%edi, %edi
	call	exit@PLT
.L17:
	movl	%r15d, %r13d
	movl	%eax, %r15d
	movl	%edi, %eax
	movl	%r8d, %edi
	testb	%al, %al
	je	.L26
	movl	%esi, v(%rip)
	movl	%r14d, i(%rip)
	testb	%r9b, %r9b
	je	.L32
	movl	%r15d, j(%rip)
.L32:
	movl	$1, f(%rip)
.L21:
	subl	%edi, %r13d
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rdi
	leal	1(%r13), %esi
	call	printf@PLT
	jmp	.L23
.L59:
	movl	%esi, v(%rip)
	movl	%eax, %r15d
	testb	%dil, %dil
	je	.L24
	movl	%r14d, i(%rip)
	testb	%r9b, %r9b
	je	.L31
	movl	%r15d, j(%rip)
.L31:
	movl	$1, f(%rip)
	jmp	.L22
.L24:
	testb	%r9b, %r9b
	je	.L22
	movl	%r15d, j(%rip)
	jmp	.L22
.L26:
	testb	%r9b, %r9b
	je	.L21
	movl	%r15d, j(%rip)
	jmp	.L21
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	f
	.bss
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	v
	.align 4
	.type	v, @object
	.size	v, 4
v:
	.zero	4
	.globl	v0
	.align 4
	.type	v0, @object
	.size	v0, 4
v0:
	.zero	4
	.globl	d
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.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	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 404
t:
	.zero	404
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 40804
m:
	.zero	40804
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d%d%d"
.LC3:
	.string	"%d\n"
.LC4:
	.string	"NA"
	.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
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	d(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	leaq	m(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	call	scanf@PLT
	movl	n(%rip), %eax
	movl	$0, i(%rip)
	testl	%eax, %eax
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	k(%rip), %rdx
	leaq	r(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	jmp	.L57
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	r(%rip), %rax
	movslq	d(%rip), %rcx
	leaq	(%rax,%rax,4), %rdx
	leaq	(%rdx,%rdx,4), %rdx
	leaq	(%rax,%rdx,4), %rax
	addq	%rcx, %rax
	movl	$1, (%rbx,%rax,4)
.L57:
	movl	k(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, k(%rip)
	testl	%eax, %eax
	jne	.L5
	movl	i(%rip), %eax
	addl	$1, %eax
	cmpl	n(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L2
.L6:
	movq	%rbp, %rdi
	leaq	p(%rip), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	p(%rip), %eax
	leaq	t(%rip), %rbp
	leaq	d(%rip), %rbx
	leaq	4(%rbp), %r12
	leal	-1(%rax), %edx
	movl	%edx, p(%rip)
	testl	%eax, %eax
	je	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	v0(%rip), %rcx
	movq	%rbx, %rdx
	leaq	s(%rip), %rsi
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rdi
	call	scanf@PLT
	xorl	%eax, %eax
	movl	$50, %ecx
	movq	%rbp, %rdi
	rep stosq
	movl	v0(%rip), %r13d
	movl	n(%rip), %r10d
	leaq	8+t(%rip), %rsi
	movslq	s(%rip), %rax
	movslq	d(%rip), %r11
	xorl	%r9d, %r9d
	movl	$1, f(%rip)
	leal	1(%r10), %r8d
	movl	%r13d, v(%rip)
	movl	%r13d, %ecx
	movl	$0, (%rdi)
	movl	%r13d, 0(%rbp,%rax,4)
	leal	-1(%r10), %eax
	leaq	(%rsi,%rax,4), %rdx
	xorl	%eax, %eax
	movl	%r13d, %esi
	movl	%eax, %edi
	movl	%r15d, %eax
	movl	%r13d, %r15d
	movl	%r10d, %r13d
	movl	%r8d, %r10d
	.p2align 4,,10
	.p2align 3
.L8:
	movl	0(%rbp,%r11,4), %r8d
	testl	%r8d, %r8d
	jne	.L17
	subl	$1, %esi
	testl	%esi, %esi
	jle	.L59
	testl	%r13d, %r13d
	jle	.L60
	leaq	408+m(%rip), %rdi
	leaq	4+t(%rip), %r14
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L12:
	addq	$4, %r14
	addq	$404, %rdi
	cmpq	%r14, %rdx
	je	.L61
.L15:
	cmpl	%ecx, (%r14)
	jne	.L12
	movq	%r12, %rax
	movq	%rdi, %r9
	.p2align 4,,10
	.p2align 3
.L14:
	cmpl	$0, (%r9)
	je	.L13
	cmpl	$0, (%rax)
	jne	.L13
	movl	%esi, (%rax)
	movl	$1, %r8d
.L13:
	addq	$4, %rax
	addq	$4, %r9
	cmpq	%rdx, %rax
	jne	.L14
	addq	$4, %r14
	movl	%r10d, %eax
	movl	$1, %r9d
	addq	$404, %rdi
	cmpq	%r14, %rdx
	jne	.L15
	.p2align 4,,10
	.p2align 3
.L61:
	movl	%r10d, %r14d
	subl	$1, %ecx
	movl	$1, %edi
	testl	%r8d, %r8d
	jne	.L8
	movl	%r15d, %r13d
	movl	%esi, v(%rip)
	movl	%eax, %r15d
	movl	%r10d, i(%rip)
	testb	%r9b, %r9b
	je	.L20
	movl	%eax, j(%rip)
.L20:
	movl	$0, f(%rip)
	movl	0(%rbp,%r11,4), %edi
	testl	%edi, %edi
	jne	.L21
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L60:
	movl	%esi, v(%rip)
	movl	%eax, %r15d
	movl	$1, i(%rip)
	testb	%r9b, %r9b
	je	.L10
	movl	%eax, j(%rip)
.L10:
	movl	$0, f(%rip)
.L22:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
.L23:
	movl	p(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, p(%rip)
	testl	%eax, %eax
	jne	.L3
.L4:
	xorl	%edi, %edi
	call	exit@PLT
.L17:
	movl	%r15d, %r13d
	movl	%eax, %r15d
	movl	%edi, %eax
	movl	%r8d, %edi
	testb	%al, %al
	je	.L26
	movl	%esi, v(%rip)
	movl	%r14d, i(%rip)
	testb	%r9b, %r9b
	je	.L32
	movl	%r15d, j(%rip)
.L32:
	movl	$1, f(%rip)
.L21:
	subl	%edi, %r13d
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rdi
	leal	1(%r13), %esi
	call	printf@PLT
	jmp	.L23
.L59:
	movl	%esi, v(%rip)
	movl	%eax, %r15d
	testb	%dil, %dil
	je	.L24
	movl	%r14d, i(%rip)
	testb	%r9b, %r9b
	je	.L31
	movl	%r15d, j(%rip)
.L31:
	movl	$1, f(%rip)
	jmp	.L22
.L24:
	testb	%r9b, %r9b
	je	.L22
	movl	%r15d, j(%rip)
	jmp	.L22
.L26:
	testb	%r9b, %r9b
	je	.L21
	movl	%r15d, j(%rip)
	jmp	.L21
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	f
	.bss
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	v
	.align 4
	.type	v, @object
	.size	v, 4
v:
	.zero	4
	.globl	v0
	.align 4
	.type	v0, @object
	.size	v0, 4
v0:
	.zero	4
	.globl	d
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.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	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 404
t:
	.zero	404
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 40804
m:
	.zero	40804
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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:

n,r,k,m[101][101],t[101],p;
i,j,s,d,v0,v,f;
main(){
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&r,&k);
		for(;k--;){
			scanf("%d",&d);
			m[r][d]=1;
		}
	}
	scanf("%d",&p);
	for(;p--;){
		scanf("%d%d%d",&s,&d,&v0);
		memset(t,0,sizeof(t));
		t[s]=v=v0;
		f=1;
		while(f&&!t[d]&&--v>0){
			f=0;
			for(i=1;i<=n;i++){
				if(t[i]==v+1){
					for(j=1;j<=n;j++){
						if(m[i][j]&&t[j]==0)
							t[j]=v,f=1;
					}
				}
			}
		}
		if(t[d])
			printf("%d\n",v0-t[d]+1);
		else
			puts("NA");
	}
	exit(0);
}
7
1 4 2 5 4 3
2 1 5
3 1 6
4 1 7
5 2 7 6
6 1 1
7 0
6
1 2 2
1 5 3
1 2 0
5 1 3
6 3 3
1 7 4
 7
1 4 2 5 4 6
2 1 5
3 1 6
4 1 7
5 2 7 6
6 1 1
7 0
6
1 2 2
1 3 3
1 2 0
5 1 3
6 3 3
1 7 4
 7
1 4 2 5 4 3
2 1 5
3 1 6
4 1 7
5 2 7 6
6 1 1
7 0
6
1 2 2
1 3 6
1 2 0
5 1 3
6 3 1
1 7 4
 7
1 4 2 7 4 6
2 1 5
3 1 6
4 1 7
5 2 7 6
6 1 1
7 0
6
1 2 2
1 3 3
1 2 0
5 1 3
6 3 3
1 7 4
 7
1 4 2 7 3 6
2 1 5
3 1 6
4 1 7
5 2 7 6
6 1 1
7 0
6
1 2 2
1 3 3
1 2 0
5 1 3
6 3 3
1 7 4
 7
1 4 3 5 4 3
2 1 5
3 1 6
4 1 7
5 2 7 6
6 1 1
7 0
6
1 2 2
1 5 3
1 2 1
5 1 3
6 3 3
1 7 4
 7
1 4 2 5 4 3
2 1 5
3 1 6
4 1 7
5 2 7 6
6 1 1
7 0
6
1 2 2
2 3 3
1 2 0
5 1 3
6 3 3
1 7 4
 7
1 4 2 5 4 6
2 1 5
3 1 6
4 1 7
5 2 7 6
6 1 2
7 0
6
1 2 2
1 3 3
1 2 0
5 1 3
6 3 3
1 7 4
 7
1 4 2 7 3 6
2 1 7
3 1 6
4 1 7
5 2 7 6
6 1 1
7 0
6
1 2 2
1 3 3
1 2 0
5 1 3
6 3 3
1 5 4
 7
1 4 4 5 4 6
2 1 5
3 1 6
4 1 7
5 2 7 6
6 1 1
7 0
6
1 2 2
1 3 2
1 2 0
5 1 3
6 3 3
1 7 4

2
2
NA
3
3
3
 2
NA
NA
3
NA
3
 2
2
NA
3
NA
3
 2
NA
NA
3
NA
2
 2
2
NA
3
3
2
 NA
2
NA
3
3
3
 2
NA
NA
3
3
3
 2
NA
NA
NA
NA
3
 2
2
NA
3
3
NA
 NA
NA
NA
3
NA
3

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

```c
n,r,k,m[101][101],t[101],p;
i,j,s,d,v0,v,f;
main(){
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&r,&k);
		for(;k--;){
			scanf("%d",&d);
			m[r][d]=1;
		}
	}
	scanf("%d",&p);
	for(;p--;){
		scanf("%d%d%d",&s,&d,&v0);
		memset(t,0,sizeof(t));
		t[s]=v=v0;
		f=1;
		while(f&&!t[d]&&--v>0){
			f=0;
			for(i=1;i<=n;i++){
				if(t[i]==v+1){
					for(j=1;j<=n;j++){
						if(m[i][j]&&t[j]==0)
							t[j]=v,f=1;
					}
				}
			}
		}
		if(t[d])
			printf("%d\n",v0-t[d]+1);
		else
			puts("NA");
	}
	exit(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 40804
m:
	.zero	40804
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 404
t:
	.zero	404
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	d
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.globl	v0
	.align 4
	.type	v0, @object
	.size	v0, 4
v0:
	.zero	4
	.globl	v
	.align 4
	.type	v, @object
	.size	v, 4
v:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d%d%d"
.LC3:
	.string	"%d\n"
.LC4:
	.string	"NA"
	.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
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, i(%rip)
	jmp	.L2
.L5:
	leaq	k(%rip), %rax
	movq	%rax, %rdx
	leaq	r(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L3
.L4:
	leaq	d(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	r(%rip), %eax
	movl	d(%rip), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	$1, (%rdx,%rax)
.L3:
	movl	k(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, k(%rip)
	testl	%eax, %eax
	jne	.L4
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L2:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L5
	leaq	p(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L6
.L17:
	leaq	v0(%rip), %rax
	movq	%rax, %rcx
	leaq	d(%rip), %rax
	movq	%rax, %rdx
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$404, %edx
	movl	$0, %esi
	leaq	t(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	v0(%rip), %eax
	movl	%eax, v(%rip)
	movl	s(%rip), %edx
	movl	v(%rip), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	t(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$1, f(%rip)
	jmp	.L7
.L15:
	movl	$0, f(%rip)
	movl	$1, i(%rip)
	jmp	.L8
.L13:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	v(%rip), %edx
	addl	$1, %edx
	cmpl	%edx, %eax
	jne	.L9
	movl	$1, j(%rip)
	jmp	.L10
.L12:
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L11
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L11
	movl	j(%rip), %edx
	movl	v(%rip), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	t(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$1, f(%rip)
.L11:
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L10:
	movl	j(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jle	.L12
.L9:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L8:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jle	.L13
.L7:
	movl	f(%rip), %eax
	testl	%eax, %eax
	je	.L14
	movl	d(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L14
	movl	v(%rip), %eax
	subl	$1, %eax
	movl	%eax, v(%rip)
	movl	v(%rip), %eax
	testl	%eax, %eax
	jg	.L15
.L14:
	movl	d(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L16
	movl	v0(%rip), %eax
	movl	d(%rip), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	t(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L16:
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L6:
	movl	p(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, p(%rip)
	testl	%eax, %eax
	jne	.L17
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.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	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 40804
m:
	.zero	40804
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 404
t:
	.zero	404
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	d
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.globl	v0
	.align 4
	.type	v0, @object
	.size	v0, 4
v0:
	.zero	4
	.globl	v
	.align 4
	.type	v, @object
	.size	v, 4
v:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d%d%d"
.LC3:
	.string	"%d\n"
.LC4:
	.string	"NA"
	.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
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, i(%rip)
	jmp	.L2
.L5:
	leaq	k(%rip), %rax
	movq	%rax, %rdx
	leaq	r(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L3
.L4:
	leaq	d(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	r(%rip), %eax
	movl	d(%rip), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	$1, (%rdx,%rax)
.L3:
	movl	k(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, k(%rip)
	testl	%eax, %eax
	jne	.L4
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L2:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L5
	leaq	p(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L6
.L17:
	leaq	v0(%rip), %rax
	movq	%rax, %rcx
	leaq	d(%rip), %rax
	movq	%rax, %rdx
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$404, %edx
	movl	$0, %esi
	leaq	t(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	v0(%rip), %eax
	movl	%eax, v(%rip)
	movl	s(%rip), %edx
	movl	v(%rip), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	t(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$1, f(%rip)
	jmp	.L7
.L15:
	movl	$0, f(%rip)
	movl	$1, i(%rip)
	jmp	.L8
.L13:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	v(%rip), %edx
	addl	$1, %edx
	cmpl	%edx, %eax
	jne	.L9
	movl	$1, j(%rip)
	jmp	.L10
.L12:
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L11
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L11
	movl	j(%rip), %edx
	movl	v(%rip), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	t(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$1, f(%rip)
.L11:
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L10:
	movl	j(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jle	.L12
.L9:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L8:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jle	.L13
.L7:
	movl	f(%rip), %eax
	testl	%eax, %eax
	je	.L14
	movl	d(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L14
	movl	v(%rip), %eax
	subl	$1, %eax
	movl	%eax, v(%rip)
	movl	v(%rip), %eax
	testl	%eax, %eax
	jg	.L15
.L14:
	movl	d(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L16
	movl	v0(%rip), %eax
	movl	d(%rip), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	t(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L16:
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L6:
	movl	p(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, p(%rip)
	testl	%eax, %eax
	jne	.L17
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.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:
