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 <string.h>
#include <stdlib.h>
#include <stdint.h> // int64_t

#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))

int get_int(void) {
  int num;
  scanf("%d", &num);
  return num;
}

int get_int2(int *a1, int *a2) {
  scanf("%d %d", a1, a2);
  return 0;
}


#define VERTEX_MAX 100000
// undirected
#define EDGE_MAX (100000*2)
struct list {
    struct list *next;
    int dst;
};

struct list *create_graph(int vs) {
    static struct list graph[VERTEX_MAX];
    int i;
    for(i = 0; i < vs; i++) {
        graph[i].next = &graph[i];
    }
    return graph;
}

struct list lpool[EDGE_MAX];
int lidx = 0;

void add_list(struct list *head, int v) {
    struct list *elem = &lpool[lidx++];
    elem->dst = v;
    elem->next = head->next;
    head->next = elem;
}

void get_dist(struct list *graph, int node, int parent, int *out) {
    if(parent == -1) {
        out[node] = 0;
    } else {
        out[node] = out[parent]+1;
    }
    struct list *elem;
    struct list *head = &graph[node];
    for(elem = head->next; elem != head; elem = elem->next) {
        if(elem->dst == parent) continue;
        get_dist(graph, elem->dst, node, out);
    }
    return;
}


int main(void) {
    int num = get_int();
    struct list *graph = create_graph(num);
    int i;
    for(i = 0; i < num-1; i++) {
        int v1, v2;
        get_int2(&v1, &v2);
        v1--; v2--;
        add_list(&graph[v1], v2);
        add_list(&graph[v2], v1);
    }

    static int aout[VERTEX_MAX];
    static int bout[VERTEX_MAX];
    get_dist(graph, 0, -1, aout);
    get_dist(graph, num-1, -1, bout);

    int blacks = 0;
    int whites = 0;
    for(i = 0; i < num; i++) {
        if(aout[i] <= bout[i]) {
            blacks++;
        } else {
            whites++;
        }
    }
#ifdef DEBUG
    printf("%d vs %d\n", blacks, whites);
#endif
    printf("%s\n", blacks > whites ? "Fennec" : "Snuke");
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	get_int
	.type	get_int, @function
get_int:
.LFB6:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_int, .-get_int
	.section	.rodata
.LC1:
	.string	"%d %d"
	.text
	.globl	get_int2
	.type	get_int2, @function
get_int2:
.LFB7:
	.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
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	get_int2, .-get_int2
	.globl	create_graph
	.type	create_graph, @function
create_graph:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L7
.L8:
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	graph.2(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	graph.2(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L7:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L8
	leaq	graph.2(%rip), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	create_graph, .-create_graph
	.globl	lpool
	.bss
	.align 32
	.type	lpool, @object
	.size	lpool, 3200000
lpool:
	.zero	3200000
	.globl	lidx
	.align 4
	.type	lidx, @object
	.size	lidx, 4
lidx:
	.zero	4
	.text
	.globl	add_list
	.type	add_list, @function
add_list:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	lidx(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, lidx(%rip)
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	lpool(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	-28(%rbp), %edx
	movl	%edx, 8(%rax)
	movq	-24(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	add_list, .-add_list
	.globl	get_dist
	.type	get_dist, @function
get_dist:
.LFB10:
	.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
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movq	%rcx, -40(%rbp)
	cmpl	$-1, -32(%rbp)
	jne	.L12
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	jmp	.L13
.L12:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	addl	$1, %edx
	movl	%edx, (%rax)
.L13:
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	jmp	.L14
.L17:
	movq	-16(%rbp), %rax
	movl	8(%rax), %eax
	cmpl	%eax, -32(%rbp)
	je	.L19
	movq	-16(%rbp), %rax
	movl	8(%rax), %esi
	movq	-40(%rbp), %rcx
	movl	-28(%rbp), %edx
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	get_dist
	jmp	.L16
.L19:
	nop
.L16:
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
.L14:
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jne	.L17
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	get_dist, .-get_dist
	.section	.rodata
.LC2:
	.string	"Fennec"
.LC3:
	.string	"Snuke"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	call	get_int
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	create_graph
	movq	%rax, -16(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L21
.L22:
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	get_int2
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -36(%rbp)
	movl	-36(%rbp), %eax
	movl	-40(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	add_list
	movl	-40(%rbp), %eax
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	add_list
	addl	$1, -32(%rbp)
.L21:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -32(%rbp)
	jl	.L22
	movq	-16(%rbp), %rax
	leaq	aout.1(%rip), %rdx
	movq	%rdx, %rcx
	movl	$-1, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	get_dist
	movl	-20(%rbp), %eax
	leal	-1(%rax), %esi
	movq	-16(%rbp), %rax
	leaq	bout.0(%rip), %rdx
	movq	%rdx, %rcx
	movl	$-1, %edx
	movq	%rax, %rdi
	call	get_dist
	movl	$0, -28(%rbp)
	movl	$0, -24(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L23
.L26:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	aout.1(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	bout.0(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L24
	addl	$1, -28(%rbp)
	jmp	.L25
.L24:
	addl	$1, -24(%rbp)
.L25:
	addl	$1, -32(%rbp)
.L23:
	movl	-32(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L26
	movl	-28(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L27
	leaq	.LC2(%rip), %rax
	jmp	.L28
.L27:
	leaq	.LC3(%rip), %rax
.L28:
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	main, .-main
	.local	graph.2
	.comm	graph.2,1600000,32
	.local	aout.1
	.comm	aout.1,400000,32
	.local	bout.0
	.comm	bout.0,400000,32
	.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"
	.text
	.p2align 4
	.globl	get_int
	.type	get_int, @function
get_int:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	movq	8(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L5
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	get_int, .-get_int
	.section	.rodata.str1.1
.LC1:
	.string	"%d %d"
	.text
	.p2align 4
	.globl	get_int2
	.type	get_int2, @function
get_int2:
.LFB52:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	movq	%rsi, %rdx
	xorl	%eax, %eax
	movq	%rdi, %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE52:
	.size	get_int2, .-get_int2
	.p2align 4
	.globl	create_graph
	.type	create_graph, @function
create_graph:
.LFB53:
	.cfi_startproc
	endbr64
	movl	%edi, %edx
	leaq	graph.2(%rip), %r8
	testl	%edi, %edi
	jle	.L9
	leal	-1(%rdi), %eax
	cmpl	$10, %eax
	jbe	.L13
	movl	%edi, %ecx
	pxor	%xmm5, %xmm5
	movq	%r8, %xmm7
	movq	%r8, %rax
	movdqa	%xmm5, %xmm6
	shrl	$2, %ecx
	leaq	64(%r8), %rsi
	punpcklqdq	%xmm7, %xmm7
	movdqa	.LC4(%rip), %xmm3
	subl	$1, %ecx
	movdqa	.LC2(%rip), %xmm4
	movdqa	.LC3(%rip), %xmm8
	salq	$6, %rcx
	pcmpgtd	%xmm3, %xmm6
	addq	%rsi, %rcx
	.p2align 4,,10
	.p2align 3
.L11:
	movdqa	%xmm4, %xmm0
	movdqa	%xmm5, %xmm2
	movdqa	%xmm6, %xmm9
	addq	$64, %rax
	movdqa	%xmm0, %xmm1
	paddd	%xmm8, %xmm4
	punpckldq	%xmm0, %xmm1
	punpckhdq	%xmm0, %xmm0
	pcmpgtd	%xmm1, %xmm2
	pmuludq	%xmm1, %xmm9
	pmuludq	%xmm3, %xmm1
	pmuludq	%xmm3, %xmm2
	paddq	%xmm9, %xmm2
	movdqa	%xmm6, %xmm9
	psllq	$32, %xmm2
	pmuludq	%xmm0, %xmm9
	paddq	%xmm2, %xmm1
	movdqa	%xmm5, %xmm2
	pcmpgtd	%xmm0, %xmm2
	pmuludq	%xmm3, %xmm0
	paddq	%xmm7, %xmm1
	movq	%xmm1, -64(%rax)
	movhps	%xmm1, -48(%rax)
	pmuludq	%xmm3, %xmm2
	paddq	%xmm9, %xmm2
	psllq	$32, %xmm2
	paddq	%xmm2, %xmm0
	paddq	%xmm7, %xmm0
	movq	%xmm0, -32(%rax)
	movhps	%xmm0, -16(%rax)
	cmpq	%rax, %rcx
	jne	.L11
	movl	%edx, %eax
	andl	$-4, %eax
	testb	$3, %dl
	je	.L9
.L10:
	movslq	%eax, %rcx
	salq	$4, %rcx
	leaq	(%r8,%rcx), %rsi
	movq	%rsi, (%rsi)
	leal	1(%rax), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	leaq	16(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, (%r8,%rsi)
	leal	2(%rax), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	leaq	32(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, (%r8,%rsi)
	leal	3(%rax), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	leaq	48(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, (%r8,%rsi)
	leal	4(%rax), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	leaq	64(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, (%r8,%rsi)
	leal	5(%rax), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	leaq	80(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, (%r8,%rsi)
	leal	6(%rax), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	leaq	96(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, (%r8,%rsi)
	leal	7(%rax), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	leaq	112(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, (%r8,%rsi)
	leal	8(%rax), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	leaq	128(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, (%r8,%rsi)
	leal	9(%rax), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	leaq	144(%r8,%rcx), %rdi
	addl	$10, %eax
	salq	$4, %rsi
	movq	%rdi, (%r8,%rsi)
	cmpl	%eax, %edx
	jle	.L9
	cltq
	leaq	160(%r8,%rcx), %rdx
	salq	$4, %rax
	movq	%rdx, (%r8,%rax)
.L9:
	movq	%r8, %rax
	ret
.L13:
	xorl	%eax, %eax
	jmp	.L10
	.cfi_endproc
.LFE53:
	.size	create_graph, .-create_graph
	.p2align 4
	.globl	add_list
	.type	add_list, @function
add_list:
.LFB54:
	.cfi_startproc
	endbr64
	movslq	lidx(%rip), %rax
	leal	1(%rax), %edx
	salq	$4, %rax
	movl	%edx, lidx(%rip)
	leaq	lpool(%rip), %rdx
	addq	%rdx, %rax
	movl	%esi, 8(%rax)
	movq	(%rdi), %rdx
	movq	%rdx, (%rax)
	movq	%rax, (%rdi)
	ret
	.cfi_endproc
.LFE54:
	.size	add_list, .-add_list
	.p2align 4
	.globl	get_dist
	.type	get_dist, @function
get_dist:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%esi, %rax
	movq	%rcx, %r11
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	(%rcx,%rax,4), %rcx
	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
	movl	%edx, %ebx
	subq	$232, %rsp
	.cfi_def_cfa_offset 288
	movl	%edx, 168(%rsp)
	xorl	%edx, %edx
	movl	%esi, 124(%rsp)
	movq	%rcx, 160(%rsp)
	cmpl	$-1, %ebx
	je	.L18
	movslq	%ebx, %rdx
	movl	(%r11,%rdx,4), %edx
	addl	$1, %edx
.L18:
	leaq	(%r11,%rax,4), %rcx
	salq	$4, %rax
	addq	%rdi, %rax
	movl	%edx, (%rcx)
	movq	(%rax), %rdx
	movq	%rax, 144(%rsp)
	movq	%rdx, 112(%rsp)
	cmpq	%rdx, %rax
	je	.L17
.L19:
	movq	112(%rsp), %rax
	movl	8(%rax), %eax
	movl	%eax, 120(%rsp)
	cmpl	168(%rsp), %eax
	je	.L23
	movslq	120(%rsp), %rax
	leaq	(%r11,%rax,4), %rdx
	movq	%rdx, 152(%rsp)
	xorl	%edx, %edx
	cmpl	$-1, 124(%rsp)
	je	.L22
	movq	160(%rsp), %rdx
	movl	(%rdx), %ecx
	movl	%ecx, 16(%rsp)
	movl	%ecx, %edx
	addl	$1, %edx
.L22:
	leaq	(%r11,%rax,4), %rcx
	salq	$4, %rax
	addq	%rdi, %rax
	movl	%edx, (%rcx)
	movq	(%rax), %rcx
	movq	%rax, 128(%rsp)
	movq	%rcx, 88(%rsp)
	cmpq	%rcx, %rax
	je	.L23
.L25:
	movq	88(%rsp), %rax
	movl	8(%rax), %eax
	movl	%eax, 68(%rsp)
	cmpl	%eax, 124(%rsp)
	je	.L27
	movslq	68(%rsp), %rax
	leaq	(%r11,%rax,4), %rdx
	movq	%rdx, 136(%rsp)
	xorl	%edx, %edx
	cmpl	$-1, 120(%rsp)
	je	.L26
	movq	152(%rsp), %rdx
	movl	(%rdx), %ecx
	movl	%ecx, 16(%rsp)
	movl	%ecx, %edx
	addl	$1, %edx
.L26:
	leaq	(%r11,%rax,4), %rcx
	salq	$4, %rax
	addq	%rdi, %rax
	movl	%edx, (%rcx)
	movq	(%rax), %rdx
	movq	%rax, 104(%rsp)
	movq	%rdx, 80(%rsp)
	cmpq	%rdx, %rax
	je	.L27
.L29:
	movq	80(%rsp), %rax
	movl	8(%rax), %eax
	movl	%eax, 64(%rsp)
	cmpl	%eax, 120(%rsp)
	je	.L31
	movslq	64(%rsp), %rax
	leaq	(%r11,%rax,4), %rdx
	movq	%rdx, 96(%rsp)
	xorl	%edx, %edx
	cmpl	$-1, 68(%rsp)
	je	.L30
	movq	136(%rsp), %rcx
	movl	(%rcx), %edx
	movl	%edx, 16(%rsp)
	leal	1(%rdx), %edx
.L30:
	leaq	(%r11,%rax,4), %rcx
	salq	$4, %rax
	addq	%rdi, %rax
	movl	%edx, (%rcx)
	movq	(%rax), %rdx
	movq	%rax, 72(%rsp)
	movq	%rdx, 40(%rsp)
	cmpq	%rdx, %rax
	je	.L31
.L33:
	movq	40(%rsp), %rax
	movl	8(%rax), %eax
	movl	%eax, 16(%rsp)
	cmpl	%eax, 68(%rsp)
	je	.L35
	movslq	16(%rsp), %rax
	leaq	(%r11,%rax,4), %rdx
	movq	%rdx, 56(%rsp)
	xorl	%edx, %edx
	cmpl	$-1, 64(%rsp)
	je	.L34
	movq	96(%rsp), %rcx
	movl	(%rcx), %edx
	movl	%edx, (%rsp)
	leal	1(%rdx), %edx
.L34:
	leaq	(%r11,%rax,4), %rcx
	salq	$4, %rax
	addq	%rdi, %rax
	movl	%edx, (%rcx)
	movq	(%rax), %rcx
	movq	%rax, 48(%rsp)
	movq	%rcx, (%rsp)
	cmpq	%rcx, %rax
	je	.L35
	movq	%r11, %rcx
.L37:
	movq	(%rsp), %rax
	movl	8(%rax), %r11d
	cmpl	%r11d, 64(%rsp)
	je	.L39
	movslq	%r11d, %rax
	leaq	(%rcx,%rax,4), %rdx
	movq	%rdx, 32(%rsp)
	xorl	%edx, %edx
	cmpl	$-1, 16(%rsp)
	je	.L38
	movq	56(%rsp), %rdx
	movl	(%rdx), %edx
	movl	%edx, 8(%rsp)
	addl	$1, %edx
.L38:
	leaq	(%rcx,%rax,4), %rbx
	salq	$4, %rax
	leaq	(%rdi,%rax), %rsi
	movl	%edx, (%rbx)
	movq	(%rsi), %rax
	movq	%rsi, 8(%rsp)
	cmpq	%rax, %rsi
	je	.L39
	movl	%r11d, 20(%rsp)
.L41:
	movl	8(%rax), %r14d
	cmpl	%r14d, 16(%rsp)
	je	.L43
	movslq	%r14d, %rdx
	xorl	%esi, %esi
	cmpl	$-1, 20(%rsp)
	leaq	(%rcx,%rdx,4), %r9
	je	.L42
	movq	32(%rsp), %rsi
	movl	(%rsi), %esi
	movl	%esi, 24(%rsp)
	addl	$1, %esi
.L42:
	salq	$4, %rdx
	movl	%esi, (%r9)
	leaq	(%rdi,%rdx), %r10
	movq	(%r10), %r11
	cmpq	%r11, %r10
	je	.L43
.L45:
	movl	8(%r11), %r15d
	cmpl	%r15d, 20(%rsp)
	je	.L47
	movslq	%r15d, %rbx
	xorl	%edx, %edx
	leaq	(%rcx,%rbx,4), %r8
	cmpl	$-1, %r14d
	je	.L46
	movl	(%r9), %esi
	leal	1(%rsi), %edx
.L46:
	salq	$4, %rbx
	movl	%edx, (%r8)
	addq	%rdi, %rbx
	movq	(%rbx), %r13
	cmpq	%r13, %rbx
	je	.L47
.L49:
	movl	8(%r13), %edx
	cmpl	%edx, %r14d
	je	.L51
	movslq	%edx, %rbp
	xorl	%esi, %esi
	leaq	(%rcx,%rbp,4), %r12
	cmpl	$-1, %r15d
	je	.L50
	movl	(%r8), %esi
	addl	$1, %esi
.L50:
	salq	$4, %rbp
	movl	%esi, (%r12)
	addq	%rdi, %rbp
	movq	0(%rbp), %r12
	cmpq	%r12, %rbp
	je	.L51
.L54:
	movl	8(%r12), %esi
	cmpl	%esi, %r15d
	je	.L52
	movq	%r9, 216(%rsp)
	movq	%r8, 208(%rsp)
	movq	%r11, 200(%rsp)
	movq	%r10, 192(%rsp)
	movq	%rax, 184(%rsp)
	movq	%rcx, 176(%rsp)
	movl	%edx, 172(%rsp)
	movq	%rdi, 24(%rsp)
	call	get_dist
	movq	(%r12), %r12
	movq	24(%rsp), %rdi
	movl	172(%rsp), %edx
	movq	176(%rsp), %rcx
	cmpq	%r12, %rbp
	movq	184(%rsp), %rax
	movq	192(%rsp), %r10
	movq	200(%rsp), %r11
	movq	208(%rsp), %r8
	movq	216(%rsp), %r9
	jne	.L54
	.p2align 4,,10
	.p2align 3
.L51:
	movq	0(%r13), %r13
	cmpq	%r13, %rbx
	jne	.L49
.L47:
	movq	(%r11), %r11
	cmpq	%r11, %r10
	jne	.L45
.L43:
	movq	(%rax), %rax
	cmpq	%rax, 8(%rsp)
	jne	.L41
.L39:
	movq	(%rsp), %rax
	movq	(%rax), %rax
	movq	%rax, (%rsp)
	cmpq	%rax, 48(%rsp)
	jne	.L37
	movq	%rcx, %r11
.L35:
	movq	40(%rsp), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%rsp)
	cmpq	%rax, 72(%rsp)
	jne	.L33
.L31:
	movq	80(%rsp), %rax
	movq	(%rax), %rax
	movq	%rax, 80(%rsp)
	cmpq	%rax, 104(%rsp)
	jne	.L29
.L27:
	movq	88(%rsp), %rax
	movq	(%rax), %rax
	movq	%rax, 88(%rsp)
	cmpq	%rax, 128(%rsp)
	jne	.L25
.L23:
	movq	112(%rsp), %rax
	movq	(%rax), %rax
	movq	%rax, 112(%rsp)
	cmpq	%rax, 144(%rsp)
	jne	.L19
.L17:
	addq	$232, %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
.L52:
	.cfi_restore_state
	movq	(%r12), %r12
	cmpq	%r12, %rbp
	jne	.L54
	movq	0(%r13), %r13
	cmpq	%r13, %rbx
	jne	.L49
	jmp	.L47
	.cfi_endproc
.LFE55:
	.size	get_dist, .-get_dist
	.section	.rodata.str1.1
.LC5:
	.string	"Fennec"
.LC6:
	.string	"Snuke"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %r12
	movq	%r12, %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %ebx
	movl	%ebx, 12(%rsp)
	testl	%ebx, %ebx
	jle	.L85
	leal	-1(%rbx), %eax
	movl	%eax, 8(%rsp)
	cmpl	$10, %eax
	jbe	.L104
	movdqa	.LC4(%rip), %xmm3
	shrl	$2, %ebx
	pxor	%xmm5, %xmm5
	leaq	graph.2(%rip), %r15
	movl	%ebx, %edx
	movdqa	%xmm5, %xmm6
	movq	%r15, %xmm7
	movq	%r15, %rax
	pcmpgtd	%xmm3, %xmm6
	leaq	64(%r15), %rcx
	punpcklqdq	%xmm7, %xmm7
	subl	$1, %edx
	salq	$6, %rdx
	movdqa	.LC2(%rip), %xmm4
	movdqa	.LC3(%rip), %xmm8
	addq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L87:
	movdqa	%xmm4, %xmm0
	movdqa	%xmm5, %xmm2
	movdqa	%xmm6, %xmm9
	addq	$64, %rax
	movdqa	%xmm0, %xmm1
	paddd	%xmm8, %xmm4
	punpckldq	%xmm0, %xmm1
	punpckhdq	%xmm0, %xmm0
	pcmpgtd	%xmm1, %xmm2
	pmuludq	%xmm1, %xmm9
	pmuludq	%xmm3, %xmm1
	pmuludq	%xmm3, %xmm2
	paddq	%xmm9, %xmm2
	movdqa	%xmm6, %xmm9
	psllq	$32, %xmm2
	pmuludq	%xmm0, %xmm9
	paddq	%xmm2, %xmm1
	movdqa	%xmm5, %xmm2
	pcmpgtd	%xmm0, %xmm2
	pmuludq	%xmm3, %xmm0
	paddq	%xmm7, %xmm1
	movq	%xmm1, -64(%rax)
	movhps	%xmm1, -48(%rax)
	pmuludq	%xmm3, %xmm2
	paddq	%xmm9, %xmm2
	psllq	$32, %xmm2
	paddq	%xmm2, %xmm0
	paddq	%xmm7, %xmm0
	movq	%xmm0, -32(%rax)
	movhps	%xmm0, -16(%rax)
	cmpq	%rax, %rdx
	jne	.L87
	movl	12(%rsp), %ecx
	movl	%ecx, %eax
	andl	$-4, %eax
	andl	$3, %ecx
	je	.L88
.L86:
	movslq	%eax, %rdx
	movl	12(%rsp), %ebx
	salq	$4, %rdx
	leaq	(%r15,%rdx), %rcx
	movq	%rcx, (%rcx)
	leal	1(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L88
	movslq	%ecx, %rcx
	leaq	16(%r15,%rdx), %rsi
	salq	$4, %rcx
	movq	%rsi, (%r15,%rcx)
	leal	2(%rax), %ecx
	cmpl	%ebx, %ecx
	jge	.L88
	movslq	%ecx, %rcx
	leaq	32(%r15,%rdx), %rsi
	salq	$4, %rcx
	movq	%rsi, (%r15,%rcx)
	leal	3(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L88
	movslq	%ecx, %rcx
	leaq	48(%r15,%rdx), %rsi
	salq	$4, %rcx
	movq	%rsi, (%r15,%rcx)
	leal	4(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L88
	movslq	%ecx, %rcx
	leaq	64(%r15,%rdx), %rsi
	salq	$4, %rcx
	movq	%rsi, (%r15,%rcx)
	leal	5(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L88
	movslq	%ecx, %rcx
	leaq	80(%r15,%rdx), %rsi
	salq	$4, %rcx
	movq	%rsi, (%r15,%rcx)
	leal	6(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L88
	movslq	%ecx, %rcx
	leaq	96(%r15,%rdx), %rsi
	salq	$4, %rcx
	movq	%rsi, (%r15,%rcx)
	leal	7(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L88
	movslq	%ecx, %rcx
	leaq	112(%r15,%rdx), %rsi
	salq	$4, %rcx
	movq	%rsi, (%r15,%rcx)
	leal	8(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L88
	movslq	%ecx, %rcx
	leaq	128(%r15,%rdx), %rsi
	salq	$4, %rcx
	movq	%rsi, (%r15,%rcx)
	leal	9(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L88
	movslq	%ecx, %rcx
	leaq	144(%r15,%rdx), %rsi
	addl	$10, %eax
	salq	$4, %rcx
	movq	%rsi, (%r15,%rcx)
	cmpl	%eax, %ebx
	jle	.L88
	cltq
	leaq	160(%r15,%rdx), %rdx
	salq	$4, %rax
	movq	%rdx, (%r15,%rax)
.L88:
	movl	8(%rsp), %eax
	testl	%eax, %eax
	je	.L89
	xorl	%ebx, %ebx
	movq	%r15, %rax
	leaq	16(%rsp), %r14
	movl	%ebx, %r15d
	leaq	.LC1(%rip), %r13
	movq	%rax, %rbx
	leaq	lpool(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L90:
	movq	%r12, %rdx
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %eax
	movslq	lidx(%rip), %rsi
	addl	$1, %r15d
	leal	-1(%rax), %edi
	movl	20(%rsp), %eax
	movq	%rsi, %r8
	leal	1(%rsi), %edx
	salq	$4, %rsi
	movslq	%edi, %r9
	movslq	%edx, %rdx
	addl	$2, %r8d
	leaq	0(%rbp,%rsi), %r10
	salq	$4, %r9
	subl	$1, %eax
	salq	$4, %rdx
	movl	%eax, 8(%r10)
	cltq
	addq	%rbp, %rdx
	addq	%rbx, %r9
	salq	$4, %rax
	movq	(%r9), %r11
	movl	%edi, 8(%rdx)
	addq	%rbx, %rax
	movq	%r10, (%r9)
	movq	(%rax), %rdi
	movq	%r11, (%r10)
	movl	%r8d, lidx(%rip)
	movq	%rdi, (%rdx)
	leaq	16(%rbp,%rsi), %rdx
	movq	%rdx, (%rax)
	cmpl	8(%rsp), %r15d
	jne	.L90
	movq	%rbx, %rax
	leaq	aout.1(%rip), %r12
	movl	%r15d, %ebx
	xorl	%esi, %esi
	movq	%rax, %r15
	movq	%rax, %rdi
	movq	%r12, %rcx
	movl	$-1, %edx
	call	get_dist
	movq	%r15, %rdi
	movl	$-1, %edx
	movl	%ebx, %esi
	leaq	bout.0(%rip), %rbp
	movq	%rbp, %rcx
	call	get_dist
	movl	12(%rsp), %eax
	leaq	.LC6(%rip), %rdi
	testl	%eax, %eax
	jle	.L91
	cmpl	$2, %ebx
	jbe	.L106
	shrl	$2, %eax
	pxor	%xmm1, %xmm1
	movdqa	.LC7(%rip), %xmm4
	movl	%eax, %edx
	movdqa	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	xorl	%eax, %eax
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L93:
	movdqa	(%r12,%rax), %xmm0
	pcmpgtd	0(%rbp,%rax), %xmm0
	addq	$16, %rax
	pcmpeqd	%xmm3, %xmm0
	psubd	%xmm0, %xmm2
	pandn	%xmm4, %xmm0
	paddd	%xmm0, %xmm1
	cmpq	%rdx, %rax
	jne	.L93
	movdqa	%xmm1, %xmm0
	movl	12(%rsp), %ebx
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movl	%ebx, %ecx
	movdqa	%xmm1, %xmm0
	andl	$-4, %ecx
	andl	$3, %ebx
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	movd	%xmm1, %eax
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %edx
	je	.L94
.L92:
	movslq	%ecx, %rsi
	movl	(%r12,%rsi,4), %edi
	cmpl	%edi, 0(%rbp,%rsi,4)
	jge	.L113
	addl	$1, %eax
.L96:
	leal	1(%rcx), %esi
	cmpl	%esi, 12(%rsp)
	jle	.L94
	movslq	%esi, %rsi
	movl	(%r12,%rsi,4), %edi
	cmpl	%edi, 0(%rbp,%rsi,4)
	jl	.L97
	addl	$1, %edx
.L98:
	addl	$2, %ecx
	cmpl	%ecx, 12(%rsp)
	jle	.L94
	movslq	%ecx, %rcx
	movl	0(%rbp,%rcx,4), %edi
	cmpl	%edi, (%r12,%rcx,4)
	jle	.L99
	addl	$1, %eax
.L94:
	cmpl	%eax, %edx
	leaq	.LC6(%rip), %rdi
	leaq	.LC5(%rip), %rax
	cmovg	%rax, %rdi
.L91:
	call	puts@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L114
	addq	$40, %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
.L113:
	.cfi_restore_state
	addl	$1, %edx
	jmp	.L96
.L97:
	addl	$1, %eax
	jmp	.L98
.L99:
	addl	$1, %edx
	jmp	.L94
.L85:
	leaq	graph.2(%rip), %rbp
	leaq	aout.1(%rip), %rcx
	orl	$-1, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	get_dist
	movl	12(%rsp), %esi
	movq	%rbp, %rdi
	orl	$-1, %edx
	leaq	bout.0(%rip), %rcx
	subl	$1, %esi
	call	get_dist
	leaq	.LC6(%rip), %rdi
	jmp	.L91
.L89:
	leaq	aout.1(%rip), %r12
	orl	$-1, %edx
	xorl	%esi, %esi
	movq	%r15, %rdi
	movq	%r12, %rcx
	leaq	bout.0(%rip), %rbp
	call	get_dist
	movq	%rbp, %rcx
	orl	$-1, %edx
	xorl	%esi, %esi
	movq	%r15, %rdi
	call	get_dist
.L106:
	xorl	%eax, %eax
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L92
.L104:
	xorl	%eax, %eax
	leaq	graph.2(%rip), %r15
	jmp	.L86
.L114:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE56:
	.size	main, .-main
	.local	bout.0
	.comm	bout.0,400000,32
	.local	aout.1
	.comm	aout.1,400000,32
	.local	graph.2
	.comm	graph.2,1600000,32
	.globl	lidx
	.bss
	.align 4
	.type	lidx, @object
	.size	lidx, 4
lidx:
	.zero	4
	.globl	lpool
	.align 32
	.type	lpool, @object
	.size	lpool, 3200000
lpool:
	.zero	3200000
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC4:
	.long	16
	.long	16
	.long	16
	.long	16
	.align 16
.LC7:
	.long	1
	.long	1
	.long	1
	.long	1
	.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"
	.text
	.p2align 4
	.globl	get_int
	.type	get_int, @function
get_int:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	movq	8(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L5
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	get_int, .-get_int
	.section	.rodata.str1.1
.LC1:
	.string	"%d %d"
	.text
	.p2align 4
	.globl	get_int2
	.type	get_int2, @function
get_int2:
.LFB52:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	movq	%rsi, %rdx
	xorl	%eax, %eax
	movq	%rdi, %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE52:
	.size	get_int2, .-get_int2
	.p2align 4
	.globl	create_graph
	.type	create_graph, @function
create_graph:
.LFB53:
	.cfi_startproc
	endbr64
	movl	%edi, %edx
	leaq	graph.2(%rip), %r8
	testl	%edi, %edi
	jle	.L9
	leal	-1(%rdi), %eax
	cmpl	$10, %eax
	jbe	.L13
	movl	%edi, %ecx
	pxor	%xmm5, %xmm5
	movq	%r8, %xmm7
	movq	%r8, %rax
	movdqa	%xmm5, %xmm6
	shrl	$2, %ecx
	leaq	64(%r8), %rsi
	punpcklqdq	%xmm7, %xmm7
	movdqa	.LC4(%rip), %xmm3
	subl	$1, %ecx
	movdqa	.LC2(%rip), %xmm4
	movdqa	.LC3(%rip), %xmm8
	salq	$6, %rcx
	pcmpgtd	%xmm3, %xmm6
	addq	%rsi, %rcx
	.p2align 4,,10
	.p2align 3
.L11:
	movdqa	%xmm4, %xmm0
	movdqa	%xmm5, %xmm2
	movdqa	%xmm6, %xmm9
	addq	$64, %rax
	movdqa	%xmm0, %xmm1
	paddd	%xmm8, %xmm4
	punpckldq	%xmm0, %xmm1
	punpckhdq	%xmm0, %xmm0
	pcmpgtd	%xmm1, %xmm2
	pmuludq	%xmm1, %xmm9
	pmuludq	%xmm3, %xmm1
	pmuludq	%xmm3, %xmm2
	paddq	%xmm9, %xmm2
	movdqa	%xmm6, %xmm9
	psllq	$32, %xmm2
	pmuludq	%xmm0, %xmm9
	paddq	%xmm2, %xmm1
	movdqa	%xmm5, %xmm2
	pcmpgtd	%xmm0, %xmm2
	pmuludq	%xmm3, %xmm0
	paddq	%xmm7, %xmm1
	movq	%xmm1, -64(%rax)
	movhps	%xmm1, -48(%rax)
	pmuludq	%xmm3, %xmm2
	paddq	%xmm9, %xmm2
	psllq	$32, %xmm2
	paddq	%xmm2, %xmm0
	paddq	%xmm7, %xmm0
	movq	%xmm0, -32(%rax)
	movhps	%xmm0, -16(%rax)
	cmpq	%rax, %rcx
	jne	.L11
	movl	%edx, %eax
	andl	$-4, %eax
	testb	$3, %dl
	je	.L9
.L10:
	movslq	%eax, %rcx
	salq	$4, %rcx
	leaq	(%r8,%rcx), %rsi
	movq	%rsi, (%rsi)
	leal	1(%rax), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	leaq	16(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, (%r8,%rsi)
	leal	2(%rax), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	leaq	32(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, (%r8,%rsi)
	leal	3(%rax), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	leaq	48(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, (%r8,%rsi)
	leal	4(%rax), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	leaq	64(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, (%r8,%rsi)
	leal	5(%rax), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	leaq	80(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, (%r8,%rsi)
	leal	6(%rax), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	leaq	96(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, (%r8,%rsi)
	leal	7(%rax), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	leaq	112(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, (%r8,%rsi)
	leal	8(%rax), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	leaq	128(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, (%r8,%rsi)
	leal	9(%rax), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	leaq	144(%r8,%rcx), %rdi
	addl	$10, %eax
	salq	$4, %rsi
	movq	%rdi, (%r8,%rsi)
	cmpl	%eax, %edx
	jle	.L9
	cltq
	leaq	160(%r8,%rcx), %rdx
	salq	$4, %rax
	movq	%rdx, (%r8,%rax)
.L9:
	movq	%r8, %rax
	ret
.L13:
	xorl	%eax, %eax
	jmp	.L10
	.cfi_endproc
.LFE53:
	.size	create_graph, .-create_graph
	.p2align 4
	.globl	add_list
	.type	add_list, @function
add_list:
.LFB54:
	.cfi_startproc
	endbr64
	movslq	lidx(%rip), %rax
	leal	1(%rax), %edx
	salq	$4, %rax
	movl	%edx, lidx(%rip)
	leaq	lpool(%rip), %rdx
	addq	%rdx, %rax
	movl	%esi, 8(%rax)
	movq	(%rdi), %rdx
	movq	%rdx, (%rax)
	movq	%rax, (%rdi)
	ret
	.cfi_endproc
.LFE54:
	.size	add_list, .-add_list
	.p2align 4
	.globl	get_dist
	.type	get_dist, @function
get_dist:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%esi, %rax
	movq	%rcx, %r11
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	(%rcx,%rax,4), %rcx
	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
	movl	%edx, %ebx
	subq	$232, %rsp
	.cfi_def_cfa_offset 288
	movl	%edx, 168(%rsp)
	xorl	%edx, %edx
	movl	%esi, 124(%rsp)
	movq	%rcx, 160(%rsp)
	cmpl	$-1, %ebx
	je	.L18
	movslq	%ebx, %rdx
	movl	(%r11,%rdx,4), %edx
	addl	$1, %edx
.L18:
	leaq	(%r11,%rax,4), %rcx
	salq	$4, %rax
	addq	%rdi, %rax
	movl	%edx, (%rcx)
	movq	(%rax), %rdx
	movq	%rax, 144(%rsp)
	movq	%rdx, 112(%rsp)
	cmpq	%rdx, %rax
	je	.L17
.L19:
	movq	112(%rsp), %rax
	movl	8(%rax), %eax
	movl	%eax, 120(%rsp)
	cmpl	168(%rsp), %eax
	je	.L23
	movslq	120(%rsp), %rax
	leaq	(%r11,%rax,4), %rdx
	movq	%rdx, 152(%rsp)
	xorl	%edx, %edx
	cmpl	$-1, 124(%rsp)
	je	.L22
	movq	160(%rsp), %rdx
	movl	(%rdx), %ecx
	movl	%ecx, 16(%rsp)
	movl	%ecx, %edx
	addl	$1, %edx
.L22:
	leaq	(%r11,%rax,4), %rcx
	salq	$4, %rax
	addq	%rdi, %rax
	movl	%edx, (%rcx)
	movq	(%rax), %rcx
	movq	%rax, 128(%rsp)
	movq	%rcx, 88(%rsp)
	cmpq	%rcx, %rax
	je	.L23
.L25:
	movq	88(%rsp), %rax
	movl	8(%rax), %eax
	movl	%eax, 68(%rsp)
	cmpl	%eax, 124(%rsp)
	je	.L27
	movslq	68(%rsp), %rax
	leaq	(%r11,%rax,4), %rdx
	movq	%rdx, 136(%rsp)
	xorl	%edx, %edx
	cmpl	$-1, 120(%rsp)
	je	.L26
	movq	152(%rsp), %rdx
	movl	(%rdx), %ecx
	movl	%ecx, 16(%rsp)
	movl	%ecx, %edx
	addl	$1, %edx
.L26:
	leaq	(%r11,%rax,4), %rcx
	salq	$4, %rax
	addq	%rdi, %rax
	movl	%edx, (%rcx)
	movq	(%rax), %rdx
	movq	%rax, 104(%rsp)
	movq	%rdx, 80(%rsp)
	cmpq	%rdx, %rax
	je	.L27
.L29:
	movq	80(%rsp), %rax
	movl	8(%rax), %eax
	movl	%eax, 64(%rsp)
	cmpl	%eax, 120(%rsp)
	je	.L31
	movslq	64(%rsp), %rax
	leaq	(%r11,%rax,4), %rdx
	movq	%rdx, 96(%rsp)
	xorl	%edx, %edx
	cmpl	$-1, 68(%rsp)
	je	.L30
	movq	136(%rsp), %rcx
	movl	(%rcx), %edx
	movl	%edx, 16(%rsp)
	leal	1(%rdx), %edx
.L30:
	leaq	(%r11,%rax,4), %rcx
	salq	$4, %rax
	addq	%rdi, %rax
	movl	%edx, (%rcx)
	movq	(%rax), %rdx
	movq	%rax, 72(%rsp)
	movq	%rdx, 40(%rsp)
	cmpq	%rdx, %rax
	je	.L31
.L33:
	movq	40(%rsp), %rax
	movl	8(%rax), %eax
	movl	%eax, 16(%rsp)
	cmpl	%eax, 68(%rsp)
	je	.L35
	movslq	16(%rsp), %rax
	leaq	(%r11,%rax,4), %rdx
	movq	%rdx, 56(%rsp)
	xorl	%edx, %edx
	cmpl	$-1, 64(%rsp)
	je	.L34
	movq	96(%rsp), %rcx
	movl	(%rcx), %edx
	movl	%edx, (%rsp)
	leal	1(%rdx), %edx
.L34:
	leaq	(%r11,%rax,4), %rcx
	salq	$4, %rax
	addq	%rdi, %rax
	movl	%edx, (%rcx)
	movq	(%rax), %rcx
	movq	%rax, 48(%rsp)
	movq	%rcx, (%rsp)
	cmpq	%rcx, %rax
	je	.L35
	movq	%r11, %rcx
.L37:
	movq	(%rsp), %rax
	movl	8(%rax), %r11d
	cmpl	%r11d, 64(%rsp)
	je	.L39
	movslq	%r11d, %rax
	leaq	(%rcx,%rax,4), %rdx
	movq	%rdx, 32(%rsp)
	xorl	%edx, %edx
	cmpl	$-1, 16(%rsp)
	je	.L38
	movq	56(%rsp), %rdx
	movl	(%rdx), %edx
	movl	%edx, 8(%rsp)
	addl	$1, %edx
.L38:
	leaq	(%rcx,%rax,4), %rbx
	salq	$4, %rax
	leaq	(%rdi,%rax), %rsi
	movl	%edx, (%rbx)
	movq	(%rsi), %rax
	movq	%rsi, 8(%rsp)
	cmpq	%rax, %rsi
	je	.L39
	movl	%r11d, 20(%rsp)
.L41:
	movl	8(%rax), %r14d
	cmpl	%r14d, 16(%rsp)
	je	.L43
	movslq	%r14d, %rdx
	xorl	%esi, %esi
	cmpl	$-1, 20(%rsp)
	leaq	(%rcx,%rdx,4), %r9
	je	.L42
	movq	32(%rsp), %rsi
	movl	(%rsi), %esi
	movl	%esi, 24(%rsp)
	addl	$1, %esi
.L42:
	salq	$4, %rdx
	movl	%esi, (%r9)
	leaq	(%rdi,%rdx), %r10
	movq	(%r10), %r11
	cmpq	%r11, %r10
	je	.L43
.L45:
	movl	8(%r11), %r15d
	cmpl	%r15d, 20(%rsp)
	je	.L47
	movslq	%r15d, %rbx
	xorl	%edx, %edx
	leaq	(%rcx,%rbx,4), %r8
	cmpl	$-1, %r14d
	je	.L46
	movl	(%r9), %esi
	leal	1(%rsi), %edx
.L46:
	salq	$4, %rbx
	movl	%edx, (%r8)
	addq	%rdi, %rbx
	movq	(%rbx), %r13
	cmpq	%r13, %rbx
	je	.L47
.L49:
	movl	8(%r13), %edx
	cmpl	%edx, %r14d
	je	.L51
	movslq	%edx, %rbp
	xorl	%esi, %esi
	leaq	(%rcx,%rbp,4), %r12
	cmpl	$-1, %r15d
	je	.L50
	movl	(%r8), %esi
	addl	$1, %esi
.L50:
	salq	$4, %rbp
	movl	%esi, (%r12)
	addq	%rdi, %rbp
	movq	0(%rbp), %r12
	cmpq	%r12, %rbp
	je	.L51
.L54:
	movl	8(%r12), %esi
	cmpl	%esi, %r15d
	je	.L52
	movq	%r9, 216(%rsp)
	movq	%r8, 208(%rsp)
	movq	%r11, 200(%rsp)
	movq	%r10, 192(%rsp)
	movq	%rax, 184(%rsp)
	movq	%rcx, 176(%rsp)
	movl	%edx, 172(%rsp)
	movq	%rdi, 24(%rsp)
	call	get_dist
	movq	(%r12), %r12
	movq	24(%rsp), %rdi
	movl	172(%rsp), %edx
	movq	176(%rsp), %rcx
	cmpq	%r12, %rbp
	movq	184(%rsp), %rax
	movq	192(%rsp), %r10
	movq	200(%rsp), %r11
	movq	208(%rsp), %r8
	movq	216(%rsp), %r9
	jne	.L54
	.p2align 4,,10
	.p2align 3
.L51:
	movq	0(%r13), %r13
	cmpq	%r13, %rbx
	jne	.L49
.L47:
	movq	(%r11), %r11
	cmpq	%r11, %r10
	jne	.L45
.L43:
	movq	(%rax), %rax
	cmpq	%rax, 8(%rsp)
	jne	.L41
.L39:
	movq	(%rsp), %rax
	movq	(%rax), %rax
	movq	%rax, (%rsp)
	cmpq	%rax, 48(%rsp)
	jne	.L37
	movq	%rcx, %r11
.L35:
	movq	40(%rsp), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%rsp)
	cmpq	%rax, 72(%rsp)
	jne	.L33
.L31:
	movq	80(%rsp), %rax
	movq	(%rax), %rax
	movq	%rax, 80(%rsp)
	cmpq	%rax, 104(%rsp)
	jne	.L29
.L27:
	movq	88(%rsp), %rax
	movq	(%rax), %rax
	movq	%rax, 88(%rsp)
	cmpq	%rax, 128(%rsp)
	jne	.L25
.L23:
	movq	112(%rsp), %rax
	movq	(%rax), %rax
	movq	%rax, 112(%rsp)
	cmpq	%rax, 144(%rsp)
	jne	.L19
.L17:
	addq	$232, %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
.L52:
	.cfi_restore_state
	movq	(%r12), %r12
	cmpq	%r12, %rbp
	jne	.L54
	movq	0(%r13), %r13
	cmpq	%r13, %rbx
	jne	.L49
	jmp	.L47
	.cfi_endproc
.LFE55:
	.size	get_dist, .-get_dist
	.section	.rodata.str1.1
.LC5:
	.string	"Fennec"
.LC6:
	.string	"Snuke"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %r12
	movq	%r12, %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %ebx
	movl	%ebx, 12(%rsp)
	testl	%ebx, %ebx
	jle	.L85
	leal	-1(%rbx), %eax
	movl	%eax, 8(%rsp)
	cmpl	$10, %eax
	jbe	.L104
	movdqa	.LC4(%rip), %xmm3
	shrl	$2, %ebx
	pxor	%xmm5, %xmm5
	leaq	graph.2(%rip), %r15
	movl	%ebx, %edx
	movdqa	%xmm5, %xmm6
	movq	%r15, %xmm7
	movq	%r15, %rax
	pcmpgtd	%xmm3, %xmm6
	leaq	64(%r15), %rcx
	punpcklqdq	%xmm7, %xmm7
	subl	$1, %edx
	salq	$6, %rdx
	movdqa	.LC2(%rip), %xmm4
	movdqa	.LC3(%rip), %xmm8
	addq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L87:
	movdqa	%xmm4, %xmm0
	movdqa	%xmm5, %xmm2
	movdqa	%xmm6, %xmm9
	addq	$64, %rax
	movdqa	%xmm0, %xmm1
	paddd	%xmm8, %xmm4
	punpckldq	%xmm0, %xmm1
	punpckhdq	%xmm0, %xmm0
	pcmpgtd	%xmm1, %xmm2
	pmuludq	%xmm1, %xmm9
	pmuludq	%xmm3, %xmm1
	pmuludq	%xmm3, %xmm2
	paddq	%xmm9, %xmm2
	movdqa	%xmm6, %xmm9
	psllq	$32, %xmm2
	pmuludq	%xmm0, %xmm9
	paddq	%xmm2, %xmm1
	movdqa	%xmm5, %xmm2
	pcmpgtd	%xmm0, %xmm2
	pmuludq	%xmm3, %xmm0
	paddq	%xmm7, %xmm1
	movq	%xmm1, -64(%rax)
	movhps	%xmm1, -48(%rax)
	pmuludq	%xmm3, %xmm2
	paddq	%xmm9, %xmm2
	psllq	$32, %xmm2
	paddq	%xmm2, %xmm0
	paddq	%xmm7, %xmm0
	movq	%xmm0, -32(%rax)
	movhps	%xmm0, -16(%rax)
	cmpq	%rax, %rdx
	jne	.L87
	movl	12(%rsp), %ecx
	movl	%ecx, %eax
	andl	$-4, %eax
	andl	$3, %ecx
	je	.L88
.L86:
	movslq	%eax, %rdx
	movl	12(%rsp), %ebx
	salq	$4, %rdx
	leaq	(%r15,%rdx), %rcx
	movq	%rcx, (%rcx)
	leal	1(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L88
	movslq	%ecx, %rcx
	leaq	16(%r15,%rdx), %rsi
	salq	$4, %rcx
	movq	%rsi, (%r15,%rcx)
	leal	2(%rax), %ecx
	cmpl	%ebx, %ecx
	jge	.L88
	movslq	%ecx, %rcx
	leaq	32(%r15,%rdx), %rsi
	salq	$4, %rcx
	movq	%rsi, (%r15,%rcx)
	leal	3(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L88
	movslq	%ecx, %rcx
	leaq	48(%r15,%rdx), %rsi
	salq	$4, %rcx
	movq	%rsi, (%r15,%rcx)
	leal	4(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L88
	movslq	%ecx, %rcx
	leaq	64(%r15,%rdx), %rsi
	salq	$4, %rcx
	movq	%rsi, (%r15,%rcx)
	leal	5(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L88
	movslq	%ecx, %rcx
	leaq	80(%r15,%rdx), %rsi
	salq	$4, %rcx
	movq	%rsi, (%r15,%rcx)
	leal	6(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L88
	movslq	%ecx, %rcx
	leaq	96(%r15,%rdx), %rsi
	salq	$4, %rcx
	movq	%rsi, (%r15,%rcx)
	leal	7(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L88
	movslq	%ecx, %rcx
	leaq	112(%r15,%rdx), %rsi
	salq	$4, %rcx
	movq	%rsi, (%r15,%rcx)
	leal	8(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L88
	movslq	%ecx, %rcx
	leaq	128(%r15,%rdx), %rsi
	salq	$4, %rcx
	movq	%rsi, (%r15,%rcx)
	leal	9(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L88
	movslq	%ecx, %rcx
	leaq	144(%r15,%rdx), %rsi
	addl	$10, %eax
	salq	$4, %rcx
	movq	%rsi, (%r15,%rcx)
	cmpl	%eax, %ebx
	jle	.L88
	cltq
	leaq	160(%r15,%rdx), %rdx
	salq	$4, %rax
	movq	%rdx, (%r15,%rax)
.L88:
	movl	8(%rsp), %eax
	testl	%eax, %eax
	je	.L89
	xorl	%ebx, %ebx
	movq	%r15, %rax
	leaq	16(%rsp), %r14
	movl	%ebx, %r15d
	leaq	.LC1(%rip), %r13
	movq	%rax, %rbx
	leaq	lpool(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L90:
	movq	%r12, %rdx
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %eax
	movslq	lidx(%rip), %rsi
	addl	$1, %r15d
	leal	-1(%rax), %edi
	movl	20(%rsp), %eax
	movq	%rsi, %r8
	leal	1(%rsi), %edx
	salq	$4, %rsi
	movslq	%edi, %r9
	movslq	%edx, %rdx
	addl	$2, %r8d
	leaq	0(%rbp,%rsi), %r10
	salq	$4, %r9
	subl	$1, %eax
	salq	$4, %rdx
	movl	%eax, 8(%r10)
	cltq
	addq	%rbp, %rdx
	addq	%rbx, %r9
	salq	$4, %rax
	movq	(%r9), %r11
	movl	%edi, 8(%rdx)
	addq	%rbx, %rax
	movq	%r10, (%r9)
	movq	(%rax), %rdi
	movq	%r11, (%r10)
	movl	%r8d, lidx(%rip)
	movq	%rdi, (%rdx)
	leaq	16(%rbp,%rsi), %rdx
	movq	%rdx, (%rax)
	cmpl	8(%rsp), %r15d
	jne	.L90
	movq	%rbx, %rax
	leaq	aout.1(%rip), %r12
	movl	%r15d, %ebx
	xorl	%esi, %esi
	movq	%rax, %r15
	movq	%rax, %rdi
	movq	%r12, %rcx
	movl	$-1, %edx
	call	get_dist
	movq	%r15, %rdi
	movl	$-1, %edx
	movl	%ebx, %esi
	leaq	bout.0(%rip), %rbp
	movq	%rbp, %rcx
	call	get_dist
	movl	12(%rsp), %eax
	leaq	.LC6(%rip), %rdi
	testl	%eax, %eax
	jle	.L91
	cmpl	$2, %ebx
	jbe	.L106
	shrl	$2, %eax
	pxor	%xmm1, %xmm1
	movdqa	.LC7(%rip), %xmm4
	movl	%eax, %edx
	movdqa	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	xorl	%eax, %eax
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L93:
	movdqa	(%r12,%rax), %xmm0
	pcmpgtd	0(%rbp,%rax), %xmm0
	addq	$16, %rax
	pcmpeqd	%xmm3, %xmm0
	psubd	%xmm0, %xmm2
	pandn	%xmm4, %xmm0
	paddd	%xmm0, %xmm1
	cmpq	%rdx, %rax
	jne	.L93
	movdqa	%xmm1, %xmm0
	movl	12(%rsp), %ebx
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movl	%ebx, %ecx
	movdqa	%xmm1, %xmm0
	andl	$-4, %ecx
	andl	$3, %ebx
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	movd	%xmm1, %eax
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %edx
	je	.L94
.L92:
	movslq	%ecx, %rsi
	movl	(%r12,%rsi,4), %edi
	cmpl	%edi, 0(%rbp,%rsi,4)
	jge	.L113
	addl	$1, %eax
.L96:
	leal	1(%rcx), %esi
	cmpl	%esi, 12(%rsp)
	jle	.L94
	movslq	%esi, %rsi
	movl	(%r12,%rsi,4), %edi
	cmpl	%edi, 0(%rbp,%rsi,4)
	jl	.L97
	addl	$1, %edx
.L98:
	addl	$2, %ecx
	cmpl	%ecx, 12(%rsp)
	jle	.L94
	movslq	%ecx, %rcx
	movl	0(%rbp,%rcx,4), %edi
	cmpl	%edi, (%r12,%rcx,4)
	jle	.L99
	addl	$1, %eax
.L94:
	cmpl	%eax, %edx
	leaq	.LC6(%rip), %rdi
	leaq	.LC5(%rip), %rax
	cmovg	%rax, %rdi
.L91:
	call	puts@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L114
	addq	$40, %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
.L113:
	.cfi_restore_state
	addl	$1, %edx
	jmp	.L96
.L97:
	addl	$1, %eax
	jmp	.L98
.L99:
	addl	$1, %edx
	jmp	.L94
.L85:
	leaq	graph.2(%rip), %rbp
	leaq	aout.1(%rip), %rcx
	orl	$-1, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	get_dist
	movl	12(%rsp), %esi
	movq	%rbp, %rdi
	orl	$-1, %edx
	leaq	bout.0(%rip), %rcx
	subl	$1, %esi
	call	get_dist
	leaq	.LC6(%rip), %rdi
	jmp	.L91
.L89:
	leaq	aout.1(%rip), %r12
	orl	$-1, %edx
	xorl	%esi, %esi
	movq	%r15, %rdi
	movq	%r12, %rcx
	leaq	bout.0(%rip), %rbp
	call	get_dist
	movq	%rbp, %rcx
	orl	$-1, %edx
	xorl	%esi, %esi
	movq	%r15, %rdi
	call	get_dist
.L106:
	xorl	%eax, %eax
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L92
.L104:
	xorl	%eax, %eax
	leaq	graph.2(%rip), %r15
	jmp	.L86
.L114:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE56:
	.size	main, .-main
	.local	bout.0
	.comm	bout.0,400000,32
	.local	aout.1
	.comm	aout.1,400000,32
	.local	graph.2
	.comm	graph.2,1600000,32
	.globl	lidx
	.bss
	.align 4
	.type	lidx, @object
	.size	lidx, 4
lidx:
	.zero	4
	.globl	lpool
	.align 32
	.type	lpool, @object
	.size	lpool, 3200000
lpool:
	.zero	3200000
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC4:
	.long	16
	.long	16
	.long	16
	.long	16
	.align 16
.LC7:
	.long	1
	.long	1
	.long	1
	.long	1
	.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 <string.h>
#include <stdlib.h>
#include <stdint.h> // int64_t

#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))

int get_int(void) {
  int num;
  scanf("%d", &num);
  return num;
}

int get_int2(int *a1, int *a2) {
  scanf("%d %d", a1, a2);
  return 0;
}


#define VERTEX_MAX 100000
// undirected
#define EDGE_MAX (100000*2)
struct list {
    struct list *next;
    int dst;
};

struct list *create_graph(int vs) {
    static struct list graph[VERTEX_MAX];
    int i;
    for(i = 0; i < vs; i++) {
        graph[i].next = &graph[i];
    }
    return graph;
}

struct list lpool[EDGE_MAX];
int lidx = 0;

void add_list(struct list *head, int v) {
    struct list *elem = &lpool[lidx++];
    elem->dst = v;
    elem->next = head->next;
    head->next = elem;
}

void get_dist(struct list *graph, int node, int parent, int *out) {
    if(parent == -1) {
        out[node] = 0;
    } else {
        out[node] = out[parent]+1;
    }
    struct list *elem;
    struct list *head = &graph[node];
    for(elem = head->next; elem != head; elem = elem->next) {
        if(elem->dst == parent) continue;
        get_dist(graph, elem->dst, node, out);
    }
    return;
}


int main(void) {
    int num = get_int();
    struct list *graph = create_graph(num);
    int i;
    for(i = 0; i < num-1; i++) {
        int v1, v2;
        get_int2(&v1, &v2);
        v1--; v2--;
        add_list(&graph[v1], v2);
        add_list(&graph[v2], v1);
    }

    static int aout[VERTEX_MAX];
    static int bout[VERTEX_MAX];
    get_dist(graph, 0, -1, aout);
    get_dist(graph, num-1, -1, bout);

    int blacks = 0;
    int whites = 0;
    for(i = 0; i < num; i++) {
        if(aout[i] <= bout[i]) {
            blacks++;
        } else {
            whites++;
        }
    }
#ifdef DEBUG
    printf("%d vs %d\n", blacks, whites);
#endif
    printf("%s\n", blacks > whites ? "Fennec" : "Snuke");
    return 0;
}
7
3 6
1 2
3 1
7 4
5 7
1 4

Fennec

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 <string.h>
#include <stdlib.h>
#include <stdint.h> // int64_t

#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))

int get_int(void) {
  int num;
  scanf("%d", &num);
  return num;
}

int get_int2(int *a1, int *a2) {
  scanf("%d %d", a1, a2);
  return 0;
}


#define VERTEX_MAX 100000
// undirected
#define EDGE_MAX (100000*2)
struct list {
    struct list *next;
    int dst;
};

struct list *create_graph(int vs) {
    static struct list graph[VERTEX_MAX];
    int i;
    for(i = 0; i < vs; i++) {
        graph[i].next = &graph[i];
    }
    return graph;
}

struct list lpool[EDGE_MAX];
int lidx = 0;

void add_list(struct list *head, int v) {
    struct list *elem = &lpool[lidx++];
    elem->dst = v;
    elem->next = head->next;
    head->next = elem;
}

void get_dist(struct list *graph, int node, int parent, int *out) {
    if(parent == -1) {
        out[node] = 0;
    } else {
        out[node] = out[parent]+1;
    }
    struct list *elem;
    struct list *head = &graph[node];
    for(elem = head->next; elem != head; elem = elem->next) {
        if(elem->dst == parent) continue;
        get_dist(graph, elem->dst, node, out);
    }
    return;
}


int main(void) {
    int num = get_int();
    struct list *graph = create_graph(num);
    int i;
    for(i = 0; i < num-1; i++) {
        int v1, v2;
        get_int2(&v1, &v2);
        v1--; v2--;
        add_list(&graph[v1], v2);
        add_list(&graph[v2], v1);
    }

    static int aout[VERTEX_MAX];
    static int bout[VERTEX_MAX];
    get_dist(graph, 0, -1, aout);
    get_dist(graph, num-1, -1, bout);

    int blacks = 0;
    int whites = 0;
    for(i = 0; i < num; i++) {
        if(aout[i] <= bout[i]) {
            blacks++;
        } else {
            whites++;
        }
    }
#ifdef DEBUG
    printf("%d vs %d\n", blacks, whites);
#endif
    printf("%s\n", blacks > whites ? "Fennec" : "Snuke");
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	get_int
	.type	get_int, @function
get_int:
.LFB6:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_int, .-get_int
	.section	.rodata
.LC1:
	.string	"%d %d"
	.text
	.globl	get_int2
	.type	get_int2, @function
get_int2:
.LFB7:
	.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
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	get_int2, .-get_int2
	.globl	create_graph
	.type	create_graph, @function
create_graph:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L7
.L8:
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	graph.2(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	graph.2(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L7:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L8
	leaq	graph.2(%rip), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	create_graph, .-create_graph
	.globl	lpool
	.bss
	.align 32
	.type	lpool, @object
	.size	lpool, 3200000
lpool:
	.zero	3200000
	.globl	lidx
	.align 4
	.type	lidx, @object
	.size	lidx, 4
lidx:
	.zero	4
	.text
	.globl	add_list
	.type	add_list, @function
add_list:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	lidx(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, lidx(%rip)
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	lpool(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	-28(%rbp), %edx
	movl	%edx, 8(%rax)
	movq	-24(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	add_list, .-add_list
	.globl	get_dist
	.type	get_dist, @function
get_dist:
.LFB10:
	.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
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movq	%rcx, -40(%rbp)
	cmpl	$-1, -32(%rbp)
	jne	.L12
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	jmp	.L13
.L12:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	addl	$1, %edx
	movl	%edx, (%rax)
.L13:
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	jmp	.L14
.L17:
	movq	-16(%rbp), %rax
	movl	8(%rax), %eax
	cmpl	%eax, -32(%rbp)
	je	.L19
	movq	-16(%rbp), %rax
	movl	8(%rax), %esi
	movq	-40(%rbp), %rcx
	movl	-28(%rbp), %edx
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	get_dist
	jmp	.L16
.L19:
	nop
.L16:
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
.L14:
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jne	.L17
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	get_dist, .-get_dist
	.section	.rodata
.LC2:
	.string	"Fennec"
.LC3:
	.string	"Snuke"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	call	get_int
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	create_graph
	movq	%rax, -16(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L21
.L22:
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	get_int2
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -36(%rbp)
	movl	-36(%rbp), %eax
	movl	-40(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	add_list
	movl	-40(%rbp), %eax
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	add_list
	addl	$1, -32(%rbp)
.L21:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -32(%rbp)
	jl	.L22
	movq	-16(%rbp), %rax
	leaq	aout.1(%rip), %rdx
	movq	%rdx, %rcx
	movl	$-1, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	get_dist
	movl	-20(%rbp), %eax
	leal	-1(%rax), %esi
	movq	-16(%rbp), %rax
	leaq	bout.0(%rip), %rdx
	movq	%rdx, %rcx
	movl	$-1, %edx
	movq	%rax, %rdi
	call	get_dist
	movl	$0, -28(%rbp)
	movl	$0, -24(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L23
.L26:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	aout.1(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	bout.0(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L24
	addl	$1, -28(%rbp)
	jmp	.L25
.L24:
	addl	$1, -24(%rbp)
.L25:
	addl	$1, -32(%rbp)
.L23:
	movl	-32(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L26
	movl	-28(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L27
	leaq	.LC2(%rip), %rax
	jmp	.L28
.L27:
	leaq	.LC3(%rip), %rax
.L28:
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	main, .-main
	.local	graph.2
	.comm	graph.2,1600000,32
	.local	aout.1
	.comm	aout.1,400000,32
	.local	bout.0
	.comm	bout.0,400000,32
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	get_int
	.type	get_int, @function
get_int:
.LFB6:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_int, .-get_int
	.section	.rodata
.LC1:
	.string	"%d %d"
	.text
	.globl	get_int2
	.type	get_int2, @function
get_int2:
.LFB7:
	.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
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	get_int2, .-get_int2
	.globl	create_graph
	.type	create_graph, @function
create_graph:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L7
.L8:
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	graph.2(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	graph.2(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L7:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L8
	leaq	graph.2(%rip), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	create_graph, .-create_graph
	.globl	lpool
	.bss
	.align 32
	.type	lpool, @object
	.size	lpool, 3200000
lpool:
	.zero	3200000
	.globl	lidx
	.align 4
	.type	lidx, @object
	.size	lidx, 4
lidx:
	.zero	4
	.text
	.globl	add_list
	.type	add_list, @function
add_list:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	lidx(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, lidx(%rip)
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	lpool(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	-28(%rbp), %edx
	movl	%edx, 8(%rax)
	movq	-24(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	add_list, .-add_list
	.globl	get_dist
	.type	get_dist, @function
get_dist:
.LFB10:
	.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
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movq	%rcx, -40(%rbp)
	cmpl	$-1, -32(%rbp)
	jne	.L12
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	jmp	.L13
.L12:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	addl	$1, %edx
	movl	%edx, (%rax)
.L13:
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	jmp	.L14
.L17:
	movq	-16(%rbp), %rax
	movl	8(%rax), %eax
	cmpl	%eax, -32(%rbp)
	je	.L19
	movq	-16(%rbp), %rax
	movl	8(%rax), %esi
	movq	-40(%rbp), %rcx
	movl	-28(%rbp), %edx
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	get_dist
	jmp	.L16
.L19:
	nop
.L16:
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
.L14:
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jne	.L17
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	get_dist, .-get_dist
	.section	.rodata
.LC2:
	.string	"Fennec"
.LC3:
	.string	"Snuke"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	call	get_int
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	create_graph
	movq	%rax, -16(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L21
.L22:
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	get_int2
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -36(%rbp)
	movl	-36(%rbp), %eax
	movl	-40(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	add_list
	movl	-40(%rbp), %eax
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	add_list
	addl	$1, -32(%rbp)
.L21:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -32(%rbp)
	jl	.L22
	movq	-16(%rbp), %rax
	leaq	aout.1(%rip), %rdx
	movq	%rdx, %rcx
	movl	$-1, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	get_dist
	movl	-20(%rbp), %eax
	leal	-1(%rax), %esi
	movq	-16(%rbp), %rax
	leaq	bout.0(%rip), %rdx
	movq	%rdx, %rcx
	movl	$-1, %edx
	movq	%rax, %rdi
	call	get_dist
	movl	$0, -28(%rbp)
	movl	$0, -24(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L23
.L26:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	aout.1(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	bout.0(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L24
	addl	$1, -28(%rbp)
	jmp	.L25
.L24:
	addl	$1, -24(%rbp)
.L25:
	addl	$1, -32(%rbp)
.L23:
	movl	-32(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L26
	movl	-28(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L27
	leaq	.LC2(%rip), %rax
	jmp	.L28
.L27:
	leaq	.LC3(%rip), %rax
.L28:
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	main, .-main
	.local	graph.2
	.comm	graph.2,1600000,32
	.local	aout.1
	.comm	aout.1,400000,32
	.local	bout.0
	.comm	bout.0,400000,32
	.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:
