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>          // printf(), scanf()
#include <stdbool.h>

#define MAX_V 20

int V;
int G[MAX_V][MAX_V];
bool visited[MAX_V];
int out[MAX_V];
int ix;

void
visit(int v)
{
	visited[v] = true;
	for (int u = 0; u < V; ++u)
	{
		if (G[v][u] && !visited[u])
			visit(u);
	}

	out[--ix] = v + 1;
}

void
solve()
{
	for (int u = 0; u < V; ++u)
		visited[u] = false;

	for (int u = 0; u < V; ++u)
		if (!visited[u])
			visit(u);
}

int
main(int argc, char **argv)
{
	scanf("%d", &V);
	for (int v = 0; v < V; ++v)
	{
		for (int u = 0; u < V; ++u)
			G[v][u] = false;
	}

	int E;
	scanf("%d", &E);
	for (int i = 0; i < E; ++i)
	{
		int s, t;
		scanf("%d%d", &s, &t);
		G[s - 1][t - 1] = true;
	}

	ix = V;
	solve();

	for (; ix < V; ++ix)
		printf("%d\n", out[ix]);

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	V
	.bss
	.align 4
	.type	V, @object
	.size	V, 4
V:
	.zero	4
	.globl	G
	.align 32
	.type	G, @object
	.size	G, 1600
G:
	.zero	1600
	.globl	visited
	.align 16
	.type	visited, @object
	.size	visited, 20
visited:
	.zero	20
	.globl	out
	.align 32
	.type	out, @object
	.size	out, 80
out:
	.zero	80
	.globl	ix
	.align 4
	.type	ix, @object
	.size	ix, 4
ix:
	.zero	4
	.text
	.globl	visit
	.type	visit, @function
visit:
.LFB0:
	.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	-20(%rbp), %eax
	cltq
	leaq	visited(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	$0, -4(%rbp)
	jmp	.L2
.L4:
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L3
	movl	-4(%rbp), %eax
	cltq
	leaq	visited(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	xorl	$1, %eax
	testb	%al, %al
	je	.L3
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	visit
.L3:
	addl	$1, -4(%rbp)
.L2:
	movl	V(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L4
	movl	ix(%rip), %eax
	subl	$1, %eax
	movl	%eax, ix(%rip)
	movl	ix(%rip), %eax
	movl	-20(%rbp), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	out(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	visit, .-visit
	.globl	solve
	.type	solve, @function
solve:
.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	$0, -8(%rbp)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	leaq	visited(%rip), %rdx
	movb	$0, (%rax,%rdx)
	addl	$1, -8(%rbp)
.L6:
	movl	V(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L7
	movl	$0, -4(%rbp)
	jmp	.L8
.L10:
	movl	-4(%rbp), %eax
	cltq
	leaq	visited(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	xorl	$1, %eax
	testb	%al, %al
	je	.L9
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	visit
.L9:
	addl	$1, -4(%rbp)
.L8:
	movl	V(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L10
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -36(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	V(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L12
.L15:
	movl	$0, -16(%rbp)
	jmp	.L13
.L14:
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L13:
	movl	V(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L14
	addl	$1, -20(%rbp)
.L12:
	movl	V(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L15
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L16
.L17:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L16:
	movl	-32(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L17
	movl	V(%rip), %eax
	movl	%eax, ix(%rip)
	movl	$0, %eax
	call	solve
	jmp	.L18
.L19:
	movl	ix(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	out(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	ix(%rip), %eax
	addl	$1, %eax
	movl	%eax, ix(%rip)
.L18:
	movl	ix(%rip), %edx
	movl	V(%rip), %eax
	cmpl	%eax, %edx
	jl	.L19
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	visit
	.type	visit, @function
visit:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edi, %rdx
	leaq	visited(%rip), %rsi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdx, %r11
	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	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	V(%rip), %eax
	movb	$1, (%rsi,%rdx)
	testl	%eax, %eax
	jle	.L22
	leaq	(%rdx,%rdx,4), %rdx
	leaq	G(%rip), %r9
	movl	%r11d, 16(%rsp)
	xorl	%ebx, %ebx
	salq	$4, %rdx
	movq	%r9, %r12
	leaq	out(%rip), %r10
	leaq	(%rdx,%r9), %r8
	movq	%r8, %r11
.L12:
	movl	(%r11,%rbx,4), %ebp
	leal	1(%rbx), %r8d
	testl	%ebp, %ebp
	je	.L3
	cmpb	$0, (%rsi,%rbx)
	je	.L23
.L3:
	addq	$1, %rbx
	addq	$80, %r12
	cmpl	%ebx, %eax
	jg	.L12
	movl	16(%rsp), %r11d
.L13:
	movl	ix(%rip), %eax
	leal	1(%r11), %edx
	subl	$1, %eax
	movl	%eax, ix(%rip)
	cltq
	movl	%edx, (%r10,%rax,4)
	addq	$72, %rsp
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	movb	$1, (%rsi,%rbx)
	movq	%r9, %rdx
	xorl	%ebp, %ebp
	movq	%r11, (%rsp)
	movq	%rbx, 8(%rsp)
	movl	%r8d, 20(%rsp)
.L11:
	movl	(%r12,%rbp,4), %ebx
	leal	1(%rbp), %r11d
	testl	%ebx, %ebx
	je	.L4
	cmpb	$0, (%rsi,%rbp)
	je	.L24
.L4:
	addq	$1, %rbp
	addq	$80, %rdx
	cmpl	%ebp, %eax
	jg	.L11
	movl	ix(%rip), %edi
	movl	20(%rsp), %r8d
	movq	(%rsp), %r11
	movq	8(%rsp), %rbx
	leal	-1(%rdi), %edx
	movl	%edx, ix(%rip)
	movslq	%edx, %rdx
	movl	%r8d, (%r10,%rdx,4)
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L24:
	movb	$1, (%rsi,%rbp)
	movq	%r9, %r14
	xorl	%ebx, %ebx
	movl	%r11d, 32(%rsp)
.L10:
	movl	(%rdx,%rbx,4), %r11d
	leal	1(%rbx), %r8d
	testl	%r11d, %r11d
	je	.L5
	cmpb	$0, (%rsi,%rbx)
	je	.L25
.L5:
	addq	$1, %rbx
	addq	$80, %r14
	cmpl	%ebx, %eax
	jg	.L10
	movl	ix(%rip), %ecx
	movl	32(%rsp), %r11d
	subl	$1, %ecx
	movl	%ecx, ix(%rip)
	movslq	%ecx, %rcx
	movl	%r11d, (%r10,%rcx,4)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L22:
	leaq	out(%rip), %r10
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L25:
	movb	$1, (%rsi,%rbx)
	movq	%r9, %rcx
	xorl	%r13d, %r13d
	movq	%rbx, %r11
.L9:
	movl	(%r14,%r13,4), %edi
	leal	1(%r13), %ebx
	testl	%edi, %edi
	je	.L6
	cmpb	$0, (%rsi,%r13)
	je	.L26
.L6:
	addq	$1, %r13
	addq	$80, %rcx
	cmpl	%r13d, %eax
	jg	.L9
	movl	ix(%rip), %edi
	movq	%r11, %rbx
	leal	-1(%rdi), %ecx
	movl	%ecx, ix(%rip)
	movslq	%ecx, %rcx
	movl	%r8d, (%r10,%rcx,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L26:
	movb	$1, (%rsi,%r13)
	xorl	%r15d, %r15d
.L8:
	cmpl	$0, (%rcx,%r15,4)
	movl	%r15d, %edi
	je	.L7
	cmpb	$0, (%rsi,%r15)
	je	.L27
.L7:
	addq	$1, %r15
	cmpl	%r15d, %eax
	jg	.L8
	movl	ix(%rip), %edi
	subl	$1, %edi
	movl	%edi, ix(%rip)
	movslq	%edi, %rdi
	movl	%ebx, (%r10,%rdi,4)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L27:
	movq	%r10, 56(%rsp)
	movq	%rcx, 48(%rsp)
	movq	%r11, 40(%rsp)
	movl	%r8d, 36(%rsp)
	movq	%rdx, 24(%rsp)
	call	visit
	movl	V(%rip), %eax
	movq	56(%rsp), %r10
	leaq	visited(%rip), %rsi
	movq	48(%rsp), %rcx
	movq	40(%rsp), %r11
	leaq	G(%rip), %r9
	movl	36(%rsp), %r8d
	movq	24(%rsp), %rdx
	jmp	.L7
	.cfi_endproc
.LFE23:
	.size	visit, .-visit
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB24:
	.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	$104, %rsp
	.cfi_def_cfa_offset 160
	movl	V(%rip), %r15d
	testl	%r15d, %r15d
	jle	.L28
	leaq	visited(%rip), %r11
	movslq	%r15d, %rdx
	xorl	%esi, %esi
	movq	%r11, %rdi
	call	memset@PLT
	leaq	G(%rip), %r9
	movl	%r15d, %edi
	movq	%rax, %r11
	xorl	%eax, %eax
	movq	%r9, %r10
	movl	%eax, %r8d
	movq	%r11, %r9
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L30:
	addq	$1, %r9
	addq	$80, %r10
	cmpl	%r8d, %edi
	jle	.L28
.L44:
	addl	$1, %r8d
	cmpb	$0, (%r9)
	jne	.L30
	movb	$1, (%r9)
	leaq	G(%rip), %rcx
	xorl	%esi, %esi
	movq	%r9, 8(%rsp)
	movl	%r8d, 16(%rsp)
	movq	%rcx, %r8
.L43:
	movl	(%r10,%rsi,4), %r15d
	leal	1(%rsi), %ecx
	testl	%r15d, %r15d
	je	.L31
	cmpb	$0, (%r11,%rsi)
	je	.L54
.L31:
	addq	$1, %rsi
	addq	$80, %r8
	cmpl	%esi, %edi
	jg	.L43
	movl	ix(%rip), %eax
	movq	8(%rsp), %r9
	addq	$80, %r10
	leaq	out(%rip), %rdx
	movl	16(%rsp), %r8d
	subl	$1, %eax
	addq	$1, %r9
	movl	%eax, ix(%rip)
	cltq
	movl	%r8d, (%rdx,%rax,4)
	cmpl	%r8d, %edi
	jg	.L44
.L28:
	addq	$104, %rsp
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L54:
	.cfi_restore_state
	movb	$1, (%r11,%rsi)
	testl	%edi, %edi
	jle	.L32
	movl	%ecx, 20(%rsp)
	leaq	G(%rip), %r15
	xorl	%r9d, %r9d
	movq	%rsi, 24(%rsp)
.L42:
	movl	(%r8,%r9,4), %r14d
	leal	1(%r9), %ecx
	testl	%r14d, %r14d
	je	.L33
	cmpb	$0, (%r11,%r9)
	je	.L55
.L33:
	addq	$1, %r9
	addq	$80, %r15
	cmpl	%r9d, %edi
	jg	.L42
	movl	20(%rsp), %ecx
	movq	24(%rsp), %rsi
.L32:
	movl	ix(%rip), %eax
	leaq	out(%rip), %rdx
	subl	$1, %eax
	movl	%eax, ix(%rip)
	cltq
	movl	%ecx, (%rdx,%rax,4)
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L55:
	movb	$1, (%r11,%r9)
	leaq	G(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%ecx, 72(%rsp)
.L41:
	movl	(%r15,%rbx,4), %r13d
	leal	1(%rbx), %r14d
	testl	%r13d, %r13d
	je	.L34
	cmpb	$0, (%r11,%rbx)
	je	.L56
.L34:
	addq	$1, %rbx
	addq	$80, %rsi
	cmpl	%ebx, %edi
	jg	.L41
	movl	ix(%rip), %eax
	movl	72(%rsp), %ecx
	leaq	out(%rip), %rdx
	subl	$1, %eax
	movl	%eax, ix(%rip)
	cltq
	movl	%ecx, (%rdx,%rax,4)
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L56:
	movb	$1, (%r11,%rbx)
	leaq	G(%rip), %r13
	xorl	%ebp, %ebp
	movq	%r10, 32(%rsp)
	movq	%r8, 40(%rsp)
.L40:
	movl	(%rsi,%rbp,4), %r12d
	leal	1(%rbp), %ecx
	testl	%r12d, %r12d
	je	.L35
	cmpb	$0, (%r11,%rbp)
	je	.L57
.L35:
	addq	$1, %rbp
	addq	$80, %r13
	cmpl	%ebp, %edi
	jg	.L40
	movl	ix(%rip), %eax
	leaq	out(%rip), %rdx
	movq	32(%rsp), %r10
	movq	40(%rsp), %r8
	subl	$1, %eax
	movl	%eax, ix(%rip)
	cltq
	movl	%r14d, (%rdx,%rax,4)
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L57:
	movb	$1, (%r11,%rbp)
	xorl	%r12d, %r12d
	movq	%rbx, %rax
	movq	%rbp, %r8
	leaq	G(%rip), %rdx
.L39:
	movl	0(%r13,%r12,4), %r10d
	leal	1(%r12), %ebp
	testl	%r10d, %r10d
	je	.L36
	cmpb	$0, (%r11,%r12)
	je	.L58
.L36:
	addq	$1, %r12
	addq	$80, %rdx
	cmpl	%r12d, %edi
	jg	.L39
	movq	%rax, %rbx
	movl	ix(%rip), %eax
	leaq	out(%rip), %rdx
	movq	%r8, %rbp
	subl	$1, %eax
	movl	%eax, ix(%rip)
	cltq
	movl	%ecx, (%rdx,%rax,4)
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L58:
	movb	$1, (%r11,%r12)
	xorl	%ebx, %ebx
.L38:
	cmpl	$0, (%rdx,%rbx,4)
	je	.L37
	cmpb	$0, (%r11,%rbx)
	je	.L59
.L37:
	addq	$1, %rbx
	cmpl	%ebx, %edi
	jg	.L38
	movl	ix(%rip), %ebx
	leal	-1(%rbx), %r10d
	leaq	out(%rip), %rbx
	movl	%r10d, ix(%rip)
	movslq	%r10d, %r10
	movl	%ebp, (%rbx,%r10,4)
	jmp	.L36
.L59:
	movl	%ebx, %edi
	movq	%rdx, 88(%rsp)
	movq	%r8, 80(%rsp)
	movl	%ecx, 76(%rsp)
	movq	%rax, 64(%rsp)
	movq	%rsi, 56(%rsp)
	movq	%r9, 48(%rsp)
	call	visit
	movl	V(%rip), %edi
	movq	88(%rsp), %rdx
	leaq	visited(%rip), %r11
	movq	80(%rsp), %r8
	movl	76(%rsp), %ecx
	movq	64(%rsp), %rax
	movq	56(%rsp), %rsi
	movq	48(%rsp), %r9
	jmp	.L37
	.cfi_endproc
.LFE24:
	.size	solve, .-solve
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	V(%rip), %rsi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	V(%rip), %eax
	testl	%eax, %eax
	jle	.L61
	leal	-1(%rax), %edx
	leaq	G(%rip), %rcx
	leaq	(%rdx,%rdx,4), %rbp
	leaq	80(%rcx), %rdx
	salq	$4, %rbp
	leaq	0(,%rax,4), %rbx
	addq	%rdx, %rbp
	.p2align 4,,10
	.p2align 3
.L62:
	movq	%rcx, %rdi
	movq	%rbx, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	movq	%rax, %rcx
	addq	$80, %rcx
	cmpq	%rbp, %rcx
	jne	.L62
.L61:
	leaq	12(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L63
	xorl	%r14d, %r14d
	leaq	20(%rsp), %r12
	leaq	G(%rip), %r13
	leaq	16(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L64:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	addl	$1, %r14d
	leal	-1(%rax), %edx
	movl	16(%rsp), %eax
	movslq	%edx, %rdx
	subl	$1, %eax
	cltq
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdx,%rax,4), %rax
	movl	$1, 0(%r13,%rax,4)
	cmpl	%r14d, 12(%rsp)
	jg	.L64
.L63:
	movl	V(%rip), %eax
	movl	%eax, ix(%rip)
	xorl	%eax, %eax
	call	solve
	movl	ix(%rip), %eax
	cmpl	%eax, V(%rip)
	jle	.L65
	leaq	out(%rip), %rbp
	leaq	.LC2(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L66:
	cltq
	movq	%rbx, %rsi
	movl	$1, %edi
	movl	0(%rbp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	ix(%rip), %eax
	addl	$1, %eax
	cmpl	V(%rip), %eax
	movl	%eax, ix(%rip)
	jl	.L66
.L65:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L72
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L72:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	ix
	.bss
	.align 4
	.type	ix, @object
	.size	ix, 4
ix:
	.zero	4
	.globl	out
	.align 32
	.type	out, @object
	.size	out, 80
out:
	.zero	80
	.globl	visited
	.align 16
	.type	visited, @object
	.size	visited, 20
visited:
	.zero	20
	.globl	G
	.align 32
	.type	G, @object
	.size	G, 1600
G:
	.zero	1600
	.globl	V
	.align 4
	.type	V, @object
	.size	V, 4
V:
	.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
	.p2align 4
	.globl	visit
	.type	visit, @function
visit:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edi, %rdx
	leaq	visited(%rip), %rsi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdx, %r11
	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	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	V(%rip), %eax
	movb	$1, (%rsi,%rdx)
	testl	%eax, %eax
	jle	.L22
	leaq	(%rdx,%rdx,4), %rdx
	leaq	G(%rip), %r9
	movl	%r11d, 16(%rsp)
	xorl	%ebx, %ebx
	salq	$4, %rdx
	movq	%r9, %r12
	leaq	out(%rip), %r10
	leaq	(%rdx,%r9), %r8
	movq	%r8, %r11
.L12:
	movl	(%r11,%rbx,4), %ebp
	leal	1(%rbx), %r8d
	testl	%ebp, %ebp
	je	.L3
	cmpb	$0, (%rsi,%rbx)
	je	.L23
.L3:
	addq	$1, %rbx
	addq	$80, %r12
	cmpl	%ebx, %eax
	jg	.L12
	movl	16(%rsp), %r11d
.L13:
	movl	ix(%rip), %eax
	leal	1(%r11), %edx
	subl	$1, %eax
	movl	%eax, ix(%rip)
	cltq
	movl	%edx, (%r10,%rax,4)
	addq	$72, %rsp
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	movb	$1, (%rsi,%rbx)
	movq	%r9, %rdx
	xorl	%ebp, %ebp
	movq	%r11, (%rsp)
	movq	%rbx, 8(%rsp)
	movl	%r8d, 20(%rsp)
.L11:
	movl	(%r12,%rbp,4), %ebx
	leal	1(%rbp), %r11d
	testl	%ebx, %ebx
	je	.L4
	cmpb	$0, (%rsi,%rbp)
	je	.L24
.L4:
	addq	$1, %rbp
	addq	$80, %rdx
	cmpl	%ebp, %eax
	jg	.L11
	movl	ix(%rip), %edi
	movl	20(%rsp), %r8d
	movq	(%rsp), %r11
	movq	8(%rsp), %rbx
	leal	-1(%rdi), %edx
	movl	%edx, ix(%rip)
	movslq	%edx, %rdx
	movl	%r8d, (%r10,%rdx,4)
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L24:
	movb	$1, (%rsi,%rbp)
	movq	%r9, %r14
	xorl	%ebx, %ebx
	movl	%r11d, 32(%rsp)
.L10:
	movl	(%rdx,%rbx,4), %r11d
	leal	1(%rbx), %r8d
	testl	%r11d, %r11d
	je	.L5
	cmpb	$0, (%rsi,%rbx)
	je	.L25
.L5:
	addq	$1, %rbx
	addq	$80, %r14
	cmpl	%ebx, %eax
	jg	.L10
	movl	ix(%rip), %ecx
	movl	32(%rsp), %r11d
	subl	$1, %ecx
	movl	%ecx, ix(%rip)
	movslq	%ecx, %rcx
	movl	%r11d, (%r10,%rcx,4)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L22:
	leaq	out(%rip), %r10
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L25:
	movb	$1, (%rsi,%rbx)
	movq	%r9, %rcx
	xorl	%r13d, %r13d
	movq	%rbx, %r11
.L9:
	movl	(%r14,%r13,4), %edi
	leal	1(%r13), %ebx
	testl	%edi, %edi
	je	.L6
	cmpb	$0, (%rsi,%r13)
	je	.L26
.L6:
	addq	$1, %r13
	addq	$80, %rcx
	cmpl	%r13d, %eax
	jg	.L9
	movl	ix(%rip), %edi
	movq	%r11, %rbx
	leal	-1(%rdi), %ecx
	movl	%ecx, ix(%rip)
	movslq	%ecx, %rcx
	movl	%r8d, (%r10,%rcx,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L26:
	movb	$1, (%rsi,%r13)
	xorl	%r15d, %r15d
.L8:
	cmpl	$0, (%rcx,%r15,4)
	movl	%r15d, %edi
	je	.L7
	cmpb	$0, (%rsi,%r15)
	je	.L27
.L7:
	addq	$1, %r15
	cmpl	%r15d, %eax
	jg	.L8
	movl	ix(%rip), %edi
	subl	$1, %edi
	movl	%edi, ix(%rip)
	movslq	%edi, %rdi
	movl	%ebx, (%r10,%rdi,4)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L27:
	movq	%r10, 56(%rsp)
	movq	%rcx, 48(%rsp)
	movq	%r11, 40(%rsp)
	movl	%r8d, 36(%rsp)
	movq	%rdx, 24(%rsp)
	call	visit
	movl	V(%rip), %eax
	movq	56(%rsp), %r10
	leaq	visited(%rip), %rsi
	movq	48(%rsp), %rcx
	movq	40(%rsp), %r11
	leaq	G(%rip), %r9
	movl	36(%rsp), %r8d
	movq	24(%rsp), %rdx
	jmp	.L7
	.cfi_endproc
.LFE23:
	.size	visit, .-visit
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB24:
	.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	$104, %rsp
	.cfi_def_cfa_offset 160
	movl	V(%rip), %r15d
	testl	%r15d, %r15d
	jle	.L28
	leaq	visited(%rip), %r11
	movslq	%r15d, %rdx
	xorl	%esi, %esi
	movq	%r11, %rdi
	call	memset@PLT
	leaq	G(%rip), %r9
	movl	%r15d, %edi
	movq	%rax, %r11
	xorl	%eax, %eax
	movq	%r9, %r10
	movl	%eax, %r8d
	movq	%r11, %r9
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L30:
	addq	$1, %r9
	addq	$80, %r10
	cmpl	%r8d, %edi
	jle	.L28
.L44:
	addl	$1, %r8d
	cmpb	$0, (%r9)
	jne	.L30
	movb	$1, (%r9)
	leaq	G(%rip), %rcx
	xorl	%esi, %esi
	movq	%r9, 8(%rsp)
	movl	%r8d, 16(%rsp)
	movq	%rcx, %r8
.L43:
	movl	(%r10,%rsi,4), %r15d
	leal	1(%rsi), %ecx
	testl	%r15d, %r15d
	je	.L31
	cmpb	$0, (%r11,%rsi)
	je	.L54
.L31:
	addq	$1, %rsi
	addq	$80, %r8
	cmpl	%esi, %edi
	jg	.L43
	movl	ix(%rip), %eax
	movq	8(%rsp), %r9
	addq	$80, %r10
	leaq	out(%rip), %rdx
	movl	16(%rsp), %r8d
	subl	$1, %eax
	addq	$1, %r9
	movl	%eax, ix(%rip)
	cltq
	movl	%r8d, (%rdx,%rax,4)
	cmpl	%r8d, %edi
	jg	.L44
.L28:
	addq	$104, %rsp
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L54:
	.cfi_restore_state
	movb	$1, (%r11,%rsi)
	testl	%edi, %edi
	jle	.L32
	movl	%ecx, 20(%rsp)
	leaq	G(%rip), %r15
	xorl	%r9d, %r9d
	movq	%rsi, 24(%rsp)
.L42:
	movl	(%r8,%r9,4), %r14d
	leal	1(%r9), %ecx
	testl	%r14d, %r14d
	je	.L33
	cmpb	$0, (%r11,%r9)
	je	.L55
.L33:
	addq	$1, %r9
	addq	$80, %r15
	cmpl	%r9d, %edi
	jg	.L42
	movl	20(%rsp), %ecx
	movq	24(%rsp), %rsi
.L32:
	movl	ix(%rip), %eax
	leaq	out(%rip), %rdx
	subl	$1, %eax
	movl	%eax, ix(%rip)
	cltq
	movl	%ecx, (%rdx,%rax,4)
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L55:
	movb	$1, (%r11,%r9)
	leaq	G(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%ecx, 72(%rsp)
.L41:
	movl	(%r15,%rbx,4), %r13d
	leal	1(%rbx), %r14d
	testl	%r13d, %r13d
	je	.L34
	cmpb	$0, (%r11,%rbx)
	je	.L56
.L34:
	addq	$1, %rbx
	addq	$80, %rsi
	cmpl	%ebx, %edi
	jg	.L41
	movl	ix(%rip), %eax
	movl	72(%rsp), %ecx
	leaq	out(%rip), %rdx
	subl	$1, %eax
	movl	%eax, ix(%rip)
	cltq
	movl	%ecx, (%rdx,%rax,4)
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L56:
	movb	$1, (%r11,%rbx)
	leaq	G(%rip), %r13
	xorl	%ebp, %ebp
	movq	%r10, 32(%rsp)
	movq	%r8, 40(%rsp)
.L40:
	movl	(%rsi,%rbp,4), %r12d
	leal	1(%rbp), %ecx
	testl	%r12d, %r12d
	je	.L35
	cmpb	$0, (%r11,%rbp)
	je	.L57
.L35:
	addq	$1, %rbp
	addq	$80, %r13
	cmpl	%ebp, %edi
	jg	.L40
	movl	ix(%rip), %eax
	leaq	out(%rip), %rdx
	movq	32(%rsp), %r10
	movq	40(%rsp), %r8
	subl	$1, %eax
	movl	%eax, ix(%rip)
	cltq
	movl	%r14d, (%rdx,%rax,4)
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L57:
	movb	$1, (%r11,%rbp)
	xorl	%r12d, %r12d
	movq	%rbx, %rax
	movq	%rbp, %r8
	leaq	G(%rip), %rdx
.L39:
	movl	0(%r13,%r12,4), %r10d
	leal	1(%r12), %ebp
	testl	%r10d, %r10d
	je	.L36
	cmpb	$0, (%r11,%r12)
	je	.L58
.L36:
	addq	$1, %r12
	addq	$80, %rdx
	cmpl	%r12d, %edi
	jg	.L39
	movq	%rax, %rbx
	movl	ix(%rip), %eax
	leaq	out(%rip), %rdx
	movq	%r8, %rbp
	subl	$1, %eax
	movl	%eax, ix(%rip)
	cltq
	movl	%ecx, (%rdx,%rax,4)
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L58:
	movb	$1, (%r11,%r12)
	xorl	%ebx, %ebx
.L38:
	cmpl	$0, (%rdx,%rbx,4)
	je	.L37
	cmpb	$0, (%r11,%rbx)
	je	.L59
.L37:
	addq	$1, %rbx
	cmpl	%ebx, %edi
	jg	.L38
	movl	ix(%rip), %ebx
	leal	-1(%rbx), %r10d
	leaq	out(%rip), %rbx
	movl	%r10d, ix(%rip)
	movslq	%r10d, %r10
	movl	%ebp, (%rbx,%r10,4)
	jmp	.L36
.L59:
	movl	%ebx, %edi
	movq	%rdx, 88(%rsp)
	movq	%r8, 80(%rsp)
	movl	%ecx, 76(%rsp)
	movq	%rax, 64(%rsp)
	movq	%rsi, 56(%rsp)
	movq	%r9, 48(%rsp)
	call	visit
	movl	V(%rip), %edi
	movq	88(%rsp), %rdx
	leaq	visited(%rip), %r11
	movq	80(%rsp), %r8
	movl	76(%rsp), %ecx
	movq	64(%rsp), %rax
	movq	56(%rsp), %rsi
	movq	48(%rsp), %r9
	jmp	.L37
	.cfi_endproc
.LFE24:
	.size	solve, .-solve
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	V(%rip), %rsi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	V(%rip), %eax
	testl	%eax, %eax
	jle	.L61
	leal	-1(%rax), %edx
	leaq	G(%rip), %rcx
	leaq	(%rdx,%rdx,4), %rbp
	leaq	80(%rcx), %rdx
	salq	$4, %rbp
	leaq	0(,%rax,4), %rbx
	addq	%rdx, %rbp
	.p2align 4,,10
	.p2align 3
.L62:
	movq	%rcx, %rdi
	movq	%rbx, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	movq	%rax, %rcx
	addq	$80, %rcx
	cmpq	%rbp, %rcx
	jne	.L62
.L61:
	leaq	12(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L63
	xorl	%r14d, %r14d
	leaq	20(%rsp), %r12
	leaq	G(%rip), %r13
	leaq	16(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L64:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	addl	$1, %r14d
	leal	-1(%rax), %edx
	movl	16(%rsp), %eax
	movslq	%edx, %rdx
	subl	$1, %eax
	cltq
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdx,%rax,4), %rax
	movl	$1, 0(%r13,%rax,4)
	cmpl	%r14d, 12(%rsp)
	jg	.L64
.L63:
	movl	V(%rip), %eax
	movl	%eax, ix(%rip)
	xorl	%eax, %eax
	call	solve
	movl	ix(%rip), %eax
	cmpl	%eax, V(%rip)
	jle	.L65
	leaq	out(%rip), %rbp
	leaq	.LC2(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L66:
	cltq
	movq	%rbx, %rsi
	movl	$1, %edi
	movl	0(%rbp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	ix(%rip), %eax
	addl	$1, %eax
	cmpl	V(%rip), %eax
	movl	%eax, ix(%rip)
	jl	.L66
.L65:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L72
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L72:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	ix
	.bss
	.align 4
	.type	ix, @object
	.size	ix, 4
ix:
	.zero	4
	.globl	out
	.align 32
	.type	out, @object
	.size	out, 80
out:
	.zero	80
	.globl	visited
	.align 16
	.type	visited, @object
	.size	visited, 20
visited:
	.zero	20
	.globl	G
	.align 32
	.type	G, @object
	.size	G, 1600
G:
	.zero	1600
	.globl	V
	.align 4
	.type	V, @object
	.size	V, 4
V:
	.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:

#include <stdio.h>          // printf(), scanf()
#include <stdbool.h>

#define MAX_V 20

int V;
int G[MAX_V][MAX_V];
bool visited[MAX_V];
int out[MAX_V];
int ix;

void
visit(int v)
{
	visited[v] = true;
	for (int u = 0; u < V; ++u)
	{
		if (G[v][u] && !visited[u])
			visit(u);
	}

	out[--ix] = v + 1;
}

void
solve()
{
	for (int u = 0; u < V; ++u)
		visited[u] = false;

	for (int u = 0; u < V; ++u)
		if (!visited[u])
			visit(u);
}

int
main(int argc, char **argv)
{
	scanf("%d", &V);
	for (int v = 0; v < V; ++v)
	{
		for (int u = 0; u < V; ++u)
			G[v][u] = false;
	}

	int E;
	scanf("%d", &E);
	for (int i = 0; i < E; ++i)
	{
		int s, t;
		scanf("%d%d", &s, &t);
		G[s - 1][t - 1] = true;
	}

	ix = V;
	solve();

	for (; ix < V; ++ix)
		printf("%d\n", out[ix]);

	return 0;
}
6
7
5 2
1 4
3 5
8 2
1 6
6 4
3 4
 6
7
7 2
1 4
3 5
8 2
1 6
6 4
2 4
 6
7
3 2
1 4
6 5
3 2
1 6
6 4
3 4
 6
7
5 2
1 4
3 5
8 2
2 6
6 4
3 4
 6
7
3 2
1 4
3 1
4 2
1 6
6 4
3 4
 6
7
7 2
1 4
3 5
8 2
2 6
6 4
2 4
 6
7
3 2
1 4
6 5
3 2
1 6
5 4
0 4
 6
7
3 2
1 6
6 5
3 2
2 6
5 4
3 4
 6
7
7 2
2 4
3 5
8 2
2 6
6 4
2 4
 6
7
3 2
2 6
6 5
3 2
2 6
5 4
3 4

3
5
2
1
6
4
 3
5
2
1
6
4
 3
2
1
6
5
4
 3
5
2
6
1
4
 5
3
1
6
4
2
 3
5
2
6
1
4
 3
2
1
6
5
4
 3
2
1
6
5
4
 3
5
2
6
4
1
 3
2
6
5
4
1

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>          // printf(), scanf()
#include <stdbool.h>

#define MAX_V 20

int V;
int G[MAX_V][MAX_V];
bool visited[MAX_V];
int out[MAX_V];
int ix;

void
visit(int v)
{
	visited[v] = true;
	for (int u = 0; u < V; ++u)
	{
		if (G[v][u] && !visited[u])
			visit(u);
	}

	out[--ix] = v + 1;
}

void
solve()
{
	for (int u = 0; u < V; ++u)
		visited[u] = false;

	for (int u = 0; u < V; ++u)
		if (!visited[u])
			visit(u);
}

int
main(int argc, char **argv)
{
	scanf("%d", &V);
	for (int v = 0; v < V; ++v)
	{
		for (int u = 0; u < V; ++u)
			G[v][u] = false;
	}

	int E;
	scanf("%d", &E);
	for (int i = 0; i < E; ++i)
	{
		int s, t;
		scanf("%d%d", &s, &t);
		G[s - 1][t - 1] = true;
	}

	ix = V;
	solve();

	for (; ix < V; ++ix)
		printf("%d\n", out[ix]);

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	V
	.bss
	.align 4
	.type	V, @object
	.size	V, 4
V:
	.zero	4
	.globl	G
	.align 32
	.type	G, @object
	.size	G, 1600
G:
	.zero	1600
	.globl	visited
	.align 16
	.type	visited, @object
	.size	visited, 20
visited:
	.zero	20
	.globl	out
	.align 32
	.type	out, @object
	.size	out, 80
out:
	.zero	80
	.globl	ix
	.align 4
	.type	ix, @object
	.size	ix, 4
ix:
	.zero	4
	.text
	.globl	visit
	.type	visit, @function
visit:
.LFB0:
	.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	-20(%rbp), %eax
	cltq
	leaq	visited(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	$0, -4(%rbp)
	jmp	.L2
.L4:
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L3
	movl	-4(%rbp), %eax
	cltq
	leaq	visited(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	xorl	$1, %eax
	testb	%al, %al
	je	.L3
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	visit
.L3:
	addl	$1, -4(%rbp)
.L2:
	movl	V(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L4
	movl	ix(%rip), %eax
	subl	$1, %eax
	movl	%eax, ix(%rip)
	movl	ix(%rip), %eax
	movl	-20(%rbp), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	out(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	visit, .-visit
	.globl	solve
	.type	solve, @function
solve:
.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	$0, -8(%rbp)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	leaq	visited(%rip), %rdx
	movb	$0, (%rax,%rdx)
	addl	$1, -8(%rbp)
.L6:
	movl	V(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L7
	movl	$0, -4(%rbp)
	jmp	.L8
.L10:
	movl	-4(%rbp), %eax
	cltq
	leaq	visited(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	xorl	$1, %eax
	testb	%al, %al
	je	.L9
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	visit
.L9:
	addl	$1, -4(%rbp)
.L8:
	movl	V(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L10
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -36(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	V(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L12
.L15:
	movl	$0, -16(%rbp)
	jmp	.L13
.L14:
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L13:
	movl	V(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L14
	addl	$1, -20(%rbp)
.L12:
	movl	V(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L15
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L16
.L17:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L16:
	movl	-32(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L17
	movl	V(%rip), %eax
	movl	%eax, ix(%rip)
	movl	$0, %eax
	call	solve
	jmp	.L18
.L19:
	movl	ix(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	out(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	ix(%rip), %eax
	addl	$1, %eax
	movl	%eax, ix(%rip)
.L18:
	movl	ix(%rip), %edx
	movl	V(%rip), %eax
	cmpl	%eax, %edx
	jl	.L19
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	V
	.bss
	.align 4
	.type	V, @object
	.size	V, 4
V:
	.zero	4
	.globl	G
	.align 32
	.type	G, @object
	.size	G, 1600
G:
	.zero	1600
	.globl	visited
	.align 16
	.type	visited, @object
	.size	visited, 20
visited:
	.zero	20
	.globl	out
	.align 32
	.type	out, @object
	.size	out, 80
out:
	.zero	80
	.globl	ix
	.align 4
	.type	ix, @object
	.size	ix, 4
ix:
	.zero	4
	.text
	.globl	visit
	.type	visit, @function
visit:
.LFB0:
	.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	-20(%rbp), %eax
	cltq
	leaq	visited(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	$0, -4(%rbp)
	jmp	.L2
.L4:
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L3
	movl	-4(%rbp), %eax
	cltq
	leaq	visited(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	xorl	$1, %eax
	testb	%al, %al
	je	.L3
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	visit
.L3:
	addl	$1, -4(%rbp)
.L2:
	movl	V(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L4
	movl	ix(%rip), %eax
	subl	$1, %eax
	movl	%eax, ix(%rip)
	movl	ix(%rip), %eax
	movl	-20(%rbp), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	out(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	visit, .-visit
	.globl	solve
	.type	solve, @function
solve:
.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	$0, -8(%rbp)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	leaq	visited(%rip), %rdx
	movb	$0, (%rax,%rdx)
	addl	$1, -8(%rbp)
.L6:
	movl	V(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L7
	movl	$0, -4(%rbp)
	jmp	.L8
.L10:
	movl	-4(%rbp), %eax
	cltq
	leaq	visited(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	xorl	$1, %eax
	testb	%al, %al
	je	.L9
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	visit
.L9:
	addl	$1, -4(%rbp)
.L8:
	movl	V(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L10
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -36(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	V(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L12
.L15:
	movl	$0, -16(%rbp)
	jmp	.L13
.L14:
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L13:
	movl	V(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L14
	addl	$1, -20(%rbp)
.L12:
	movl	V(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L15
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L16
.L17:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L16:
	movl	-32(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L17
	movl	V(%rip), %eax
	movl	%eax, ix(%rip)
	movl	$0, %eax
	call	solve
	jmp	.L18
.L19:
	movl	ix(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	out(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	ix(%rip), %eax
	addl	$1, %eax
	movl	%eax, ix(%rip)
.L18:
	movl	ix(%rip), %edx
	movl	V(%rip), %eax
	cmpl	%eax, %edx
	jl	.L19
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
