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>
int d[2][100010],w=0;
int ta[100010],to[200010],nt[200010];
void f(int s){
  int i,j,t,r,q[100010];
  d[w][q[t=0]=s]=1;
  for(r=1;r-t;t++){
    for(i=ta[q[t]];i+1;i=nt[i]){
      if(d[w][to[i]])continue;
      d[w][to[i]]=d[w][q[t]]+1;
      q[r++]=to[i];
    }
  }
}
int main(){
  int n,a,b,i;
  scanf("%d",&n);
  for(i=0;i<n;i++)ta[i+1]=-1;
  for(i=0;i<n-1;i++){
    scanf("%d %d",&a,&b);
    nt[i    ]=ta[to[i+n]=a];
    nt[i+n  ]=ta[to[i  ]=b];
    ta[a]=i;
    ta[b]=i+n;
  }
  f(1);
  w++;//for(i=1;i<=n;i++)printf("%d %d\n",d[0][i],d[1][i]);
  f(n);
  for(i=a=b=0;i<n;i++){
    if(d[0][i+1]>d[1][i+1])b++;
    else a++;
  }
  //for(i=1;i<=n;i++)printf("%d %d\n",d[0][i],d[1][i]);
  printf("%s\n",b<a?"Fennec":"Snuke");
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 800080
d:
	.zero	800080
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	ta
	.align 32
	.type	ta, @object
	.size	ta, 400040
ta:
	.zero	400040
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 800040
to:
	.zero	800040
	.globl	nt
	.align 32
	.type	nt, @object
	.size	nt, 800040
nt:
	.zero	800040
	.text
	.globl	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2768, %rsp
	movl	%edi, -400068(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	w(%rip), %ecx
	movl	$0, -400056(%rbp)
	movl	-400056(%rbp), %eax
	cltq
	movl	-400068(%rbp), %edx
	movl	%edx, -400048(%rbp,%rax,4)
	movl	-400056(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movslq	%ecx, %rax
	imulq	$100010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	$1, -400052(%rbp)
	jmp	.L2
.L7:
	movl	-400056(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -400060(%rbp)
	jmp	.L3
.L6:
	movl	w(%rip), %eax
	movl	-400060(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	to(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$100010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L9
	movl	w(%rip), %edx
	movl	-400056(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$100010, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	w(%rip), %eax
	movl	-400060(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rsi
	leaq	to(%rip), %rdx
	movl	(%rsi,%rdx), %edx
	addl	$1, %ecx
	movslq	%edx, %rdx
	cltq
	imulq	$100010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-400052(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -400052(%rbp)
	movl	-400060(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	to(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	cltq
	movl	%edx, -400048(%rbp,%rax,4)
	jmp	.L5
.L9:
	nop
.L5:
	movl	-400060(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nt(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -400060(%rbp)
.L3:
	cmpl	$-1, -400060(%rbp)
	jne	.L6
	addl	$1, -400056(%rbp)
.L2:
	movl	-400052(%rbp), %eax
	cmpl	-400056(%rbp), %eax
	jne	.L7
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"Fennec"
.LC3:
	.string	"Snuke"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L11
.L12:
	movl	-12(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L11:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L12
	movl	$0, -12(%rbp)
	jmp	.L13
.L14:
	leaq	-16(%rbp), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	movl	-20(%rbp), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	to(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	to(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-24(%rbp), %ecx
	movl	-12(%rbp), %edx
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	ta(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-24(%rbp), %ecx
	movl	-16(%rbp), %eax
	movl	-12(%rbp), %edx
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L13:
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -12(%rbp)
	jl	.L14
	movl	$1, %edi
	call	f
	movl	w(%rip), %eax
	addl	$1, %eax
	movl	%eax, w(%rip)
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	f
	movl	$0, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L15
.L18:
	movl	-12(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-12(%rbp), %eax
	addl	$1, %eax
	cltq
	addq	$100010, %rax
	leaq	0(,%rax,4), %rcx
	leaq	d(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L16
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L17
.L16:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -20(%rbp)
.L17:
	addl	$1, -12(%rbp)
.L15:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L18
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L19
	leaq	.LC2(%rip), %rax
	jmp	.L20
.L19:
	leaq	.LC3(%rip), %rax
.L20:
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	f
	.type	f, @function
f:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397344
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2736, %rsp
	.cfi_def_cfa_offset 400080
	leaq	d(%rip), %r8
	movl	$1, %ecx
	xorl	%ebx, %ebx
	leaq	ta(%rip), %rbp
	leaq	to(%rip), %r10
	leaq	nt(%rip), %r11
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	movslq	%edi, %rax
	movl	%edi, (%rsp)
	movslq	w(%rip), %rdi
	movq	%rsp, %r9
	imulq	$100010, %rdi, %rdi
	addq	%rdi, %rax
	movl	$1, (%r8,%rax,4)
	.p2align 4,,10
	.p2align 3
.L6:
	movslq	(%r9), %rax
	movslq	0(%rbp,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	movslq	(%r10,%rax,4), %rdx
	movq	%rdx, %r12
	addq	%rdi, %rdx
	movl	(%r8,%rdx,4), %esi
	testl	%esi, %esi
	jne	.L3
	movslq	(%r9), %rsi
	movslq	(%r11,%rax,4), %rax
	movl	%r12d, (%rsp,%rcx,4)
	addq	%rdi, %rsi
	movl	(%r8,%rsi,4), %esi
	addl	$1, %esi
	movl	%esi, (%r8,%rdx,4)
	leal	1(%rcx), %edx
	movslq	%edx, %rcx
	cmpl	$-1, %eax
	jne	.L5
.L2:
	addl	$1, %ebx
	addq	$4, %r9
	cmpl	%ecx, %ebx
	jne	.L6
.L19:
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$400048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	movslq	(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	jne	.L5
	addl	$1, %ebx
	addq	$4, %r9
	cmpl	%ecx, %ebx
	jne	.L6
	jmp	.L19
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	f, .-f
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Fennec"
.LC1:
	.string	"Snuke"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC2(%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	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ebx
	testl	%ebx, %ebx
	jle	.L21
	movslq	%ebx, %rdx
	movl	$255, %esi
	leaq	4+ta(%rip), %rdi
	salq	$2, %rdx
	call	memset@PLT
	cmpl	$1, %ebx
	jle	.L21
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r13
	leaq	16(%rsp), %r12
	leaq	to(%rip), %rbp
	leaq	nt(%rip), %r15
	leaq	ta(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%r13, %rdx
	movq	%r12, %rsi
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rdx
	movl	12(%rsp), %esi
	movl	(%r14,%rdx,4), %eax
	leal	(%rsi,%rbx), %edi
	subl	$1, %esi
	movslq	%edi, %r8
	movl	%eax, (%r15,%rbx,4)
	movslq	20(%rsp), %rax
	movl	%edx, 0(%rbp,%r8,4)
	movl	(%r14,%rax,4), %r9d
	movl	%eax, 0(%rbp,%rbx,4)
	movl	%ebx, (%r14,%rdx,4)
	addq	$1, %rbx
	movl	%r9d, (%r15,%r8,4)
	movl	%edi, (%r14,%rax,4)
	cmpl	%ebx, %esi
	jg	.L22
.L21:
	movl	$1, %edi
	call	f
	movl	12(%rsp), %edi
	addl	$1, w(%rip)
	call	f
	movl	12(%rsp), %edx
	movl	$0, 20(%rsp)
	movl	$0, 16(%rsp)
	testl	%edx, %edx
	jle	.L24
	leaq	4+d(%rip), %rax
	leal	-1(%rdx), %ecx
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	leaq	4(%rax), %rdx
	leaq	(%rdx,%rcx,4), %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L42:
	addq	$4, %rax
	addl	$1, %ecx
	movl	$1, %edi
	cmpq	%rsi, %rax
	je	.L41
.L28:
	movl	400040(%rax), %ebx
	cmpl	%ebx, (%rax)
	jg	.L42
	addq	$4, %rax
	addl	$1, %edx
	movl	$1, %r8d
	cmpq	%rsi, %rax
	jne	.L28
.L41:
	testb	%r8b, %r8b
	je	.L29
	movl	%edx, 16(%rsp)
	testb	%dil, %dil
	je	.L30
.L31:
	movl	%ecx, 20(%rsp)
.L30:
	movl	16(%rsp), %eax
	cmpl	%eax, 20(%rsp)
	jge	.L24
	leaq	.LC0(%rip), %rdi
.L25:
	call	puts@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L43
	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
.L29:
	.cfi_restore_state
	testb	%dil, %dil
	jne	.L31
.L24:
	leaq	.LC1(%rip), %rdi
	jmp	.L25
.L43:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	nt
	.bss
	.align 32
	.type	nt, @object
	.size	nt, 800040
nt:
	.zero	800040
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 800040
to:
	.zero	800040
	.globl	ta
	.align 32
	.type	ta, @object
	.size	ta, 400040
ta:
	.zero	400040
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 800080
d:
	.zero	800080
	.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	f
	.type	f, @function
f:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397344
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2736, %rsp
	.cfi_def_cfa_offset 400080
	leaq	d(%rip), %r8
	movl	$1, %ecx
	xorl	%ebx, %ebx
	leaq	ta(%rip), %rbp
	leaq	to(%rip), %r10
	leaq	nt(%rip), %r11
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	movslq	%edi, %rax
	movl	%edi, (%rsp)
	movslq	w(%rip), %rdi
	movq	%rsp, %r9
	imulq	$100010, %rdi, %rdi
	addq	%rdi, %rax
	movl	$1, (%r8,%rax,4)
	.p2align 4,,10
	.p2align 3
.L6:
	movslq	(%r9), %rax
	movslq	0(%rbp,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	movslq	(%r10,%rax,4), %rdx
	movq	%rdx, %r12
	addq	%rdi, %rdx
	movl	(%r8,%rdx,4), %esi
	testl	%esi, %esi
	jne	.L3
	movslq	(%r9), %rsi
	movslq	(%r11,%rax,4), %rax
	movl	%r12d, (%rsp,%rcx,4)
	addq	%rdi, %rsi
	movl	(%r8,%rsi,4), %esi
	addl	$1, %esi
	movl	%esi, (%r8,%rdx,4)
	leal	1(%rcx), %edx
	movslq	%edx, %rcx
	cmpl	$-1, %eax
	jne	.L5
.L2:
	addl	$1, %ebx
	addq	$4, %r9
	cmpl	%ecx, %ebx
	jne	.L6
.L19:
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$400048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	movslq	(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	jne	.L5
	addl	$1, %ebx
	addq	$4, %r9
	cmpl	%ecx, %ebx
	jne	.L6
	jmp	.L19
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	f, .-f
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Fennec"
.LC1:
	.string	"Snuke"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC2(%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	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ebx
	testl	%ebx, %ebx
	jle	.L21
	movslq	%ebx, %rdx
	movl	$255, %esi
	leaq	4+ta(%rip), %rdi
	salq	$2, %rdx
	call	memset@PLT
	cmpl	$1, %ebx
	jle	.L21
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r13
	leaq	16(%rsp), %r12
	leaq	to(%rip), %rbp
	leaq	nt(%rip), %r15
	leaq	ta(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%r13, %rdx
	movq	%r12, %rsi
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rdx
	movl	12(%rsp), %esi
	movl	(%r14,%rdx,4), %eax
	leal	(%rsi,%rbx), %edi
	subl	$1, %esi
	movslq	%edi, %r8
	movl	%eax, (%r15,%rbx,4)
	movslq	20(%rsp), %rax
	movl	%edx, 0(%rbp,%r8,4)
	movl	(%r14,%rax,4), %r9d
	movl	%eax, 0(%rbp,%rbx,4)
	movl	%ebx, (%r14,%rdx,4)
	addq	$1, %rbx
	movl	%r9d, (%r15,%r8,4)
	movl	%edi, (%r14,%rax,4)
	cmpl	%ebx, %esi
	jg	.L22
.L21:
	movl	$1, %edi
	call	f
	movl	12(%rsp), %edi
	addl	$1, w(%rip)
	call	f
	movl	12(%rsp), %edx
	movl	$0, 20(%rsp)
	movl	$0, 16(%rsp)
	testl	%edx, %edx
	jle	.L24
	leaq	4+d(%rip), %rax
	leal	-1(%rdx), %ecx
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	leaq	4(%rax), %rdx
	leaq	(%rdx,%rcx,4), %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L42:
	addq	$4, %rax
	addl	$1, %ecx
	movl	$1, %edi
	cmpq	%rsi, %rax
	je	.L41
.L28:
	movl	400040(%rax), %ebx
	cmpl	%ebx, (%rax)
	jg	.L42
	addq	$4, %rax
	addl	$1, %edx
	movl	$1, %r8d
	cmpq	%rsi, %rax
	jne	.L28
.L41:
	testb	%r8b, %r8b
	je	.L29
	movl	%edx, 16(%rsp)
	testb	%dil, %dil
	je	.L30
.L31:
	movl	%ecx, 20(%rsp)
.L30:
	movl	16(%rsp), %eax
	cmpl	%eax, 20(%rsp)
	jge	.L24
	leaq	.LC0(%rip), %rdi
.L25:
	call	puts@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L43
	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
.L29:
	.cfi_restore_state
	testb	%dil, %dil
	jne	.L31
.L24:
	leaq	.LC1(%rip), %rdi
	jmp	.L25
.L43:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	nt
	.bss
	.align 32
	.type	nt, @object
	.size	nt, 800040
nt:
	.zero	800040
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 800040
to:
	.zero	800040
	.globl	ta
	.align 32
	.type	ta, @object
	.size	ta, 400040
ta:
	.zero	400040
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 800080
d:
	.zero	800080
	.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>
int d[2][100010],w=0;
int ta[100010],to[200010],nt[200010];
void f(int s){
  int i,j,t,r,q[100010];
  d[w][q[t=0]=s]=1;
  for(r=1;r-t;t++){
    for(i=ta[q[t]];i+1;i=nt[i]){
      if(d[w][to[i]])continue;
      d[w][to[i]]=d[w][q[t]]+1;
      q[r++]=to[i];
    }
  }
}
int main(){
  int n,a,b,i;
  scanf("%d",&n);
  for(i=0;i<n;i++)ta[i+1]=-1;
  for(i=0;i<n-1;i++){
    scanf("%d %d",&a,&b);
    nt[i    ]=ta[to[i+n]=a];
    nt[i+n  ]=ta[to[i  ]=b];
    ta[a]=i;
    ta[b]=i+n;
  }
  f(1);
  w++;//for(i=1;i<=n;i++)printf("%d %d\n",d[0][i],d[1][i]);
  f(n);
  for(i=a=b=0;i<n;i++){
    if(d[0][i+1]>d[1][i+1])b++;
    else a++;
  }
  //for(i=1;i<=n;i++)printf("%d %d\n",d[0][i],d[1][i]);
  printf("%s\n",b<a?"Fennec":"Snuke");
  return 0;
}

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

Snuke
 Fennec
 Fennec
 Fennec
 Fennec
 Fennec
 Snuke
 Fennec
 Snuke
 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>
int d[2][100010],w=0;
int ta[100010],to[200010],nt[200010];
void f(int s){
  int i,j,t,r,q[100010];
  d[w][q[t=0]=s]=1;
  for(r=1;r-t;t++){
    for(i=ta[q[t]];i+1;i=nt[i]){
      if(d[w][to[i]])continue;
      d[w][to[i]]=d[w][q[t]]+1;
      q[r++]=to[i];
    }
  }
}
int main(){
  int n,a,b,i;
  scanf("%d",&n);
  for(i=0;i<n;i++)ta[i+1]=-1;
  for(i=0;i<n-1;i++){
    scanf("%d %d",&a,&b);
    nt[i    ]=ta[to[i+n]=a];
    nt[i+n  ]=ta[to[i  ]=b];
    ta[a]=i;
    ta[b]=i+n;
  }
  f(1);
  w++;//for(i=1;i<=n;i++)printf("%d %d\n",d[0][i],d[1][i]);
  f(n);
  for(i=a=b=0;i<n;i++){
    if(d[0][i+1]>d[1][i+1])b++;
    else a++;
  }
  //for(i=1;i<=n;i++)printf("%d %d\n",d[0][i],d[1][i]);
  printf("%s\n",b<a?"Fennec":"Snuke");
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 800080
d:
	.zero	800080
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	ta
	.align 32
	.type	ta, @object
	.size	ta, 400040
ta:
	.zero	400040
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 800040
to:
	.zero	800040
	.globl	nt
	.align 32
	.type	nt, @object
	.size	nt, 800040
nt:
	.zero	800040
	.text
	.globl	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2768, %rsp
	movl	%edi, -400068(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	w(%rip), %ecx
	movl	$0, -400056(%rbp)
	movl	-400056(%rbp), %eax
	cltq
	movl	-400068(%rbp), %edx
	movl	%edx, -400048(%rbp,%rax,4)
	movl	-400056(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movslq	%ecx, %rax
	imulq	$100010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	$1, -400052(%rbp)
	jmp	.L2
.L7:
	movl	-400056(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -400060(%rbp)
	jmp	.L3
.L6:
	movl	w(%rip), %eax
	movl	-400060(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	to(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$100010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L9
	movl	w(%rip), %edx
	movl	-400056(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$100010, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	w(%rip), %eax
	movl	-400060(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rsi
	leaq	to(%rip), %rdx
	movl	(%rsi,%rdx), %edx
	addl	$1, %ecx
	movslq	%edx, %rdx
	cltq
	imulq	$100010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-400052(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -400052(%rbp)
	movl	-400060(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	to(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	cltq
	movl	%edx, -400048(%rbp,%rax,4)
	jmp	.L5
.L9:
	nop
.L5:
	movl	-400060(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nt(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -400060(%rbp)
.L3:
	cmpl	$-1, -400060(%rbp)
	jne	.L6
	addl	$1, -400056(%rbp)
.L2:
	movl	-400052(%rbp), %eax
	cmpl	-400056(%rbp), %eax
	jne	.L7
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"Fennec"
.LC3:
	.string	"Snuke"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L11
.L12:
	movl	-12(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L11:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L12
	movl	$0, -12(%rbp)
	jmp	.L13
.L14:
	leaq	-16(%rbp), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	movl	-20(%rbp), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	to(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	to(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-24(%rbp), %ecx
	movl	-12(%rbp), %edx
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	ta(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-24(%rbp), %ecx
	movl	-16(%rbp), %eax
	movl	-12(%rbp), %edx
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L13:
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -12(%rbp)
	jl	.L14
	movl	$1, %edi
	call	f
	movl	w(%rip), %eax
	addl	$1, %eax
	movl	%eax, w(%rip)
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	f
	movl	$0, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L15
.L18:
	movl	-12(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-12(%rbp), %eax
	addl	$1, %eax
	cltq
	addq	$100010, %rax
	leaq	0(,%rax,4), %rcx
	leaq	d(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L16
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L17
.L16:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -20(%rbp)
.L17:
	addl	$1, -12(%rbp)
.L15:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L18
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L19
	leaq	.LC2(%rip), %rax
	jmp	.L20
.L19:
	leaq	.LC3(%rip), %rax
.L20:
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 800080
d:
	.zero	800080
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	ta
	.align 32
	.type	ta, @object
	.size	ta, 400040
ta:
	.zero	400040
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 800040
to:
	.zero	800040
	.globl	nt
	.align 32
	.type	nt, @object
	.size	nt, 800040
nt:
	.zero	800040
	.text
	.globl	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2768, %rsp
	movl	%edi, -400068(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	w(%rip), %ecx
	movl	$0, -400056(%rbp)
	movl	-400056(%rbp), %eax
	cltq
	movl	-400068(%rbp), %edx
	movl	%edx, -400048(%rbp,%rax,4)
	movl	-400056(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movslq	%ecx, %rax
	imulq	$100010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	$1, -400052(%rbp)
	jmp	.L2
.L7:
	movl	-400056(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -400060(%rbp)
	jmp	.L3
.L6:
	movl	w(%rip), %eax
	movl	-400060(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	to(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$100010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L9
	movl	w(%rip), %edx
	movl	-400056(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$100010, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	w(%rip), %eax
	movl	-400060(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rsi
	leaq	to(%rip), %rdx
	movl	(%rsi,%rdx), %edx
	addl	$1, %ecx
	movslq	%edx, %rdx
	cltq
	imulq	$100010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-400052(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -400052(%rbp)
	movl	-400060(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	to(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	cltq
	movl	%edx, -400048(%rbp,%rax,4)
	jmp	.L5
.L9:
	nop
.L5:
	movl	-400060(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nt(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -400060(%rbp)
.L3:
	cmpl	$-1, -400060(%rbp)
	jne	.L6
	addl	$1, -400056(%rbp)
.L2:
	movl	-400052(%rbp), %eax
	cmpl	-400056(%rbp), %eax
	jne	.L7
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"Fennec"
.LC3:
	.string	"Snuke"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L11
.L12:
	movl	-12(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L11:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L12
	movl	$0, -12(%rbp)
	jmp	.L13
.L14:
	leaq	-16(%rbp), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	movl	-20(%rbp), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	to(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	to(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-24(%rbp), %ecx
	movl	-12(%rbp), %edx
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	ta(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-24(%rbp), %ecx
	movl	-16(%rbp), %eax
	movl	-12(%rbp), %edx
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L13:
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -12(%rbp)
	jl	.L14
	movl	$1, %edi
	call	f
	movl	w(%rip), %eax
	addl	$1, %eax
	movl	%eax, w(%rip)
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	f
	movl	$0, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L15
.L18:
	movl	-12(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-12(%rbp), %eax
	addl	$1, %eax
	cltq
	addq	$100010, %rax
	leaq	0(,%rax,4), %rcx
	leaq	d(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L16
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L17
.L16:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -20(%rbp)
.L17:
	addl	$1, -12(%rbp)
.L15:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L18
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L19
	leaq	.LC2(%rip), %rax
	jmp	.L20
.L19:
	leaq	.LC3(%rip), %rax
.L20:
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
