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> // uint64_t

#define BUF_SIZE 30

// size: specify sizeof(str)
int get_str(char *str, int size) {
    if(!fgets(str, size, stdin)) return -1;
    return 0;
}

int get_int(void) {
  int num;
#ifdef BUF_SIZE
  char line[BUF_SIZE];
  if(!fgets(line, BUF_SIZE, stdin)) return 0;
  sscanf(line, "%d", &num);
#else
#error
#endif
  return num;
}

int get_int2(int *a1, int *a2) {
#ifdef BUF_SIZE
  char line[BUF_SIZE];
  if(!fgets(line, BUF_SIZE, stdin)) return -1;
  sscanf(line, "%d %d", a1, a2);
#else
#error
#endif
  return 0;
}

struct list {
    int dst;
    struct list *next;
};

#define VERTEXES_MAX 100000

struct list *create_graph(int vs) {
    static struct list graph[VERTEXES_MAX];
    int i;
    for(i = 0; i < vs; i++) {
        graph[i].next = &graph[i];
    }
    return graph;
}
void add_list(struct list *head, int v) {
    struct list *elem = malloc(sizeof(struct list));
    elem->dst = v;
    elem->next = head->next;
    head->next = elem;
}

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

int dst_cnt[VERTEXES_MAX];
int dp[VERTEXES_MAX];
void dfs(struct list *graph, int v) {
    struct list *head = &graph[v];
    struct list *elem;
    for(elem = head->next; elem != head; elem = elem->next) {
        int dst = elem->dst;
        dst_cnt[dst]--;
        dp[dst] = max(dp[v]+1, dp[dst]);
        if(!dst_cnt[dst]) dfs(graph, dst);
    }
}

int main(void) {
    int vs, es;
    get_int2(&vs, &es);
    struct list *graph = create_graph(vs);
    static char cands[VERTEXES_MAX];
    memset(cands, 0x01, VERTEXES_MAX);
    int i;
    for(i = 0; i < es; i++) {
        int v1, v2;
        get_int2(&v1, &v2);
        // 1-indexed -> 0-indexed
        v1--; v2--;
        add_list(&graph[v1], v2);
        dst_cnt[v2]++;
        cands[v2] = 0;
    }

    for(i = 0; i < vs; i++) {
        // if starting point
        if(cands[i]) dfs(graph, i);
    }
    int ans = 0;
    for(i = 0; i < vs; i++) {
        ans = max(ans, dp[i]);
    }
    printf("%d\n", ans);

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	get_str
	.type	get_str, @function
get_str:
.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	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movq	stdin(%rip), %rdx
	movl	-12(%rbp), %ecx
	movq	-8(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L2
	movl	$-1, %eax
	jmp	.L3
.L2:
	movl	$0, %eax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_str, .-get_str
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	get_int
	.type	get_int, @function
get_int:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rdx
	leaq	-48(%rbp), %rax
	movl	$30, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L5
	movl	$0, %eax
	jmp	.L7
.L5:
	leaq	-52(%rbp), %rdx
	leaq	-48(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-52(%rbp), %eax
.L7:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	get_int, .-get_int
	.section	.rodata
.LC1:
	.string	"%d %d"
	.text
	.globl	get_int2
	.type	get_int2, @function
get_int2:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -56(%rbp)
	movq	%rsi, -64(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rdx
	leaq	-48(%rbp), %rax
	movl	$30, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L10
	movl	$-1, %eax
	jmp	.L12
.L10:
	movq	-64(%rbp), %rcx
	movq	-56(%rbp), %rdx
	leaq	-48(%rbp), %rax
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	$0, %eax
.L12:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	get_int2, .-get_int2
	.globl	create_graph
	.type	create_graph, @function
create_graph:
.LFB9:
	.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	.L15
.L16:
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	graph.1(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+graph.1(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L15:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L16
	leaq	graph.1(%rip), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	create_graph, .-create_graph
	.globl	add_list
	.type	add_list, @function
add_list:
.LFB10:
	.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	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	$16, %edi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	-28(%rbp), %edx
	movl	%edx, (%rax)
	movq	-24(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	-24(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, 8(%rax)
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	add_list, .-add_list
	.globl	dst_cnt
	.bss
	.align 32
	.type	dst_cnt, @object
	.size	dst_cnt, 400000
dst_cnt:
	.zero	400000
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 400000
dp:
	.zero	400000
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.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	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	-44(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -16(%rbp)
	jmp	.L20
.L24:
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dst_cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dst_cnt(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jl	.L21
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	$1, %eax
	jmp	.L22
.L21:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
.L22:
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dp(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dst_cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L23
	movl	-20(%rbp), %edx
	movq	-40(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	dfs
.L23:
	movq	-16(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -16(%rbp)
.L20:
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jne	.L24
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	dfs, .-dfs
	.section	.rodata
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.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
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	get_int2
	movl	-40(%rbp), %eax
	movl	%eax, %edi
	call	create_graph
	movq	%rax, -16(%rbp)
	movl	$100000, %edx
	movl	$1, %esi
	leaq	cands.0(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -24(%rbp)
	jmp	.L26
.L27:
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	get_int2
	movl	-32(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -32(%rbp)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %eax
	movl	-32(%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	-28(%rbp), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dst_cnt(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dst_cnt(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	cltq
	leaq	cands.0(%rip), %rdx
	movb	$0, (%rax,%rdx)
	addl	$1, -24(%rbp)
.L26:
	movl	-36(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L27
	movl	$0, -24(%rbp)
	jmp	.L28
.L30:
	movl	-24(%rbp), %eax
	cltq
	leaq	cands.0(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L29
	movl	-24(%rbp), %edx
	movq	-16(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	dfs
.L29:
	addl	$1, -24(%rbp)
.L28:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L30
	movl	$0, -20(%rbp)
	movl	$0, -24(%rbp)
	jmp	.L31
.L32:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -20(%rbp)
	addl	$1, -24(%rbp)
.L31:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L32
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	main, .-main
	.local	graph.1
	.comm	graph.1,1600000,32
	.local	cands.0
	.comm	cands.0,100000,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
	.p2align 4
	.globl	get_str
	.type	get_str, @function
get_str:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	movq	stdin(%rip), %rcx
	movl	%esi, %edx
	movq	$-1, %rsi
	call	__fgets_chk@PLT
	cmpq	$1, %rax
	sbbl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE51:
	.size	get_str, .-get_str
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.text
	.p2align 4
	.globl	get_int
	.type	get_int, @function
get_int:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$30, %esi
	subq	$64, %rsp
	.cfi_def_cfa_offset 80
	movq	stdin(%rip), %rdx
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	movq	%rbp, %rdi
	call	fgets@PLT
	movq	%rax, %r8
	xorl	%eax, %eax
	testq	%r8, %r8
	je	.L4
	leaq	12(%rsp), %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rbp, %rdi
	call	__isoc99_sscanf@PLT
	movl	12(%rsp), %eax
.L4:
	movq	56(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L10
	addq	$64, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movq	%rsi, %r13
	movl	$30, %esi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	subq	$48, %rsp
	.cfi_def_cfa_offset 80
	movq	stdin(%rip), %rdx
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L14
	movq	%r13, %rcx
	movq	%r12, %rdx
	leaq	.LC1(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	xorl	%eax, %eax
.L11:
	movq	40(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L16
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	movl	$-1, %eax
	jmp	.L11
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.size	get_int2, .-get_int2
	.p2align 4
	.globl	create_graph
	.type	create_graph, @function
create_graph:
.LFB54:
	.cfi_startproc
	endbr64
	movl	%edi, %edx
	leaq	graph.1(%rip), %r8
	testl	%edi, %edi
	jle	.L18
	leal	-1(%rdi), %eax
	cmpl	$10, %eax
	jbe	.L22
	pxor	%xmm5, %xmm5
	movq	%r8, %xmm7
	leaq	72(%r8), %rsi
	movl	%edi, %ecx
	movdqa	%xmm5, %xmm6
	shrl	$2, %ecx
	punpcklqdq	%xmm7, %xmm7
	leaq	8(%r8), %rax
	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
.L20:
	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	.L20
	movl	%edx, %eax
	andl	$-4, %eax
	testb	$3, %dl
	je	.L18
.L19:
	movslq	%eax, %rcx
	salq	$4, %rcx
	leaq	(%r8,%rcx), %rsi
	movq	%rsi, 8(%rsi)
	leal	1(%rax), %esi
	cmpl	%esi, %edx
	jle	.L18
	movslq	%esi, %rsi
	leaq	16(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%r8,%rsi)
	leal	2(%rax), %esi
	cmpl	%esi, %edx
	jle	.L18
	movslq	%esi, %rsi
	leaq	32(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%r8,%rsi)
	leal	3(%rax), %esi
	cmpl	%esi, %edx
	jle	.L18
	movslq	%esi, %rsi
	leaq	48(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%r8,%rsi)
	leal	4(%rax), %esi
	cmpl	%esi, %edx
	jle	.L18
	movslq	%esi, %rsi
	leaq	64(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%r8,%rsi)
	leal	5(%rax), %esi
	cmpl	%esi, %edx
	jle	.L18
	movslq	%esi, %rsi
	leaq	80(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%r8,%rsi)
	leal	6(%rax), %esi
	cmpl	%esi, %edx
	jle	.L18
	movslq	%esi, %rsi
	leaq	96(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%r8,%rsi)
	leal	7(%rax), %esi
	cmpl	%esi, %edx
	jle	.L18
	movslq	%esi, %rsi
	leaq	112(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%r8,%rsi)
	leal	8(%rax), %esi
	cmpl	%esi, %edx
	jle	.L18
	movslq	%esi, %rsi
	leaq	128(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%r8,%rsi)
	leal	9(%rax), %esi
	cmpl	%esi, %edx
	jle	.L18
	movslq	%esi, %rsi
	leaq	144(%r8,%rcx), %rdi
	addl	$10, %eax
	salq	$4, %rsi
	movq	%rdi, 8(%r8,%rsi)
	cmpl	%eax, %edx
	jle	.L18
	cltq
	leaq	160(%r8,%rcx), %rdx
	salq	$4, %rax
	movq	%rdx, 8(%r8,%rax)
.L18:
	movq	%r8, %rax
	ret
.L22:
	xorl	%eax, %eax
	jmp	.L19
	.cfi_endproc
.LFE54:
	.size	create_graph, .-create_graph
	.p2align 4
	.globl	add_list
	.type	add_list, @function
add_list:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	movl	$16, %edi
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	call	malloc@PLT
	movq	8(%rbx), %rdx
	movl	%ebp, (%rax)
	movq	%rdx, 8(%rax)
	movq	%rax, 8(%rbx)
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE55:
	.size	add_list, .-add_list
	.p2align 4
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%esi, %rax
	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	$184, %rsp
	.cfi_def_cfa_offset 240
	movq	%rax, 152(%rsp)
	salq	$4, %rax
	addq	%rdi, %rax
	movq	%rdi, 8(%rsp)
	movq	8(%rax), %rsi
	movq	%rax, 144(%rsp)
	movq	%rsi, 48(%rsp)
	cmpq	%rsi, %rax
	je	.L27
	leaq	dst_cnt(%rip), %r8
	leaq	dp(%rip), %r11
.L28:
	movq	48(%rsp), %rax
	movq	152(%rsp), %rdi
	movslq	(%rax), %rbx
	movl	(%r11,%rdi,4), %ecx
	movl	(%r8,%rbx,4), %eax
	movl	(%r11,%rbx,4), %edx
	leal	1(%rcx), %esi
	movq	%rbx, 88(%rsp)
	movl	%eax, (%rsp)
	subl	$1, %eax
	cmpl	%edx, %ecx
	cmovge	%esi, %edx
	movl	%eax, (%r8,%rbx,4)
	movl	%edx, (%r11,%rbx,4)
	testl	%eax, %eax
	je	.L64
.L30:
	movq	48(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, 48(%rsp)
	cmpq	%rax, 144(%rsp)
	jne	.L28
.L27:
	addq	$184, %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
.L64:
	.cfi_restore_state
	movq	%rbx, %rax
	salq	$4, %rax
	addq	8(%rsp), %rax
	movq	8(%rax), %rbx
	movq	%rax, 136(%rsp)
	movq	%rbx, 32(%rsp)
	cmpq	%rbx, %rax
	je	.L30
.L55:
	movq	32(%rsp), %rax
	leal	1(%rdx), %esi
	movslq	(%rax), %rax
	movl	(%r8,%rax,4), %ebx
	movq	%rax, %rdi
	movq	%rax, 64(%rsp)
	leal	-1(%rbx), %ecx
	movl	%ebx, (%rsp)
	movl	%ecx, (%r8,%rax,4)
	movl	(%r11,%rax,4), %eax
	cmpl	%edx, %eax
	cmovle	%esi, %eax
	movl	%eax, (%r11,%rdi,4)
	testl	%ecx, %ecx
	je	.L65
.L32:
	movq	32(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, 32(%rsp)
	cmpq	%rax, 136(%rsp)
	je	.L30
	movq	88(%rsp), %rax
	movl	(%r11,%rax,4), %edx
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L65:
	movq	%rdi, %rdx
	salq	$4, %rdx
	addq	8(%rsp), %rdx
	movq	8(%rdx), %rdi
	movq	%rdx, 120(%rsp)
	movq	%rdi, 24(%rsp)
	cmpq	%rdi, %rdx
	je	.L32
.L54:
	movq	24(%rsp), %rsi
	movslq	(%rsi), %r9
	leal	1(%rax), %esi
	movl	(%r11,%r9,4), %edx
	movl	(%r8,%r9,4), %ebx
	cmpl	%eax, %edx
	leal	-1(%rbx), %ecx
	cmovle	%esi, %edx
	movl	%ecx, (%r8,%r9,4)
	movl	%edx, (%r11,%r9,4)
	testl	%ecx, %ecx
	je	.L66
.L34:
	movq	24(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, 24(%rsp)
	cmpq	%rax, 120(%rsp)
	je	.L32
	movq	64(%rsp), %rax
	movl	(%r11,%rax,4), %eax
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L66:
	movq	%r9, %rax
	salq	$4, %rax
	addq	8(%rsp), %rax
	movq	8(%rax), %rsi
	movq	%rax, 104(%rsp)
	movq	%rsi, 16(%rsp)
	cmpq	%rsi, %rax
	je	.L34
	movq	%r9, 128(%rsp)
.L53:
	movq	16(%rsp), %rax
	leal	1(%rdx), %esi
	movslq	(%rax), %r10
	movl	(%r8,%r10,4), %eax
	leal	-1(%rax), %ecx
	movl	(%r11,%r10,4), %eax
	movl	%ecx, (%r8,%r10,4)
	cmpl	%edx, %eax
	cmovle	%esi, %eax
	movl	%eax, (%r11,%r10,4)
	testl	%ecx, %ecx
	je	.L67
.L36:
	movq	16(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, 16(%rsp)
	cmpq	%rax, 104(%rsp)
	je	.L34
	movq	128(%rsp), %rax
	movl	(%r11,%rax,4), %edx
	jmp	.L53
	.p2align 4,,10
	.p2align 3
.L67:
	movq	%r10, %rdx
	salq	$4, %rdx
	addq	8(%rsp), %rdx
	movq	8(%rdx), %rdi
	movq	%rdx, 80(%rsp)
	movq	%rdi, (%rsp)
	cmpq	%rdi, %rdx
	je	.L36
	movq	%r10, 112(%rsp)
.L52:
	movq	(%rsp), %rdi
	leal	1(%rax), %esi
	movslq	(%rdi), %r10
	movl	(%r11,%r10,4), %edx
	movl	(%r8,%r10,4), %edi
	cmpl	%eax, %edx
	leal	-1(%rdi), %ecx
	cmovle	%esi, %edx
	movl	%ecx, (%r8,%r10,4)
	movl	%edx, (%r11,%r10,4)
	testl	%ecx, %ecx
	je	.L68
.L38:
	movq	(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, (%rsp)
	cmpq	%rax, 80(%rsp)
	je	.L36
	movq	112(%rsp), %rax
	movl	(%r11,%rax,4), %eax
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L68:
	movq	%r10, %rax
	salq	$4, %rax
	addq	8(%rsp), %rax
	movq	8(%rax), %r9
	movq	%rax, 56(%rsp)
	cmpq	%r9, %rax
	je	.L38
	movq	%r10, 96(%rsp)
.L51:
	movslq	(%r9), %r14
	leal	1(%rdx), %esi
	movl	(%r8,%r14,4), %eax
	leal	-1(%rax), %ecx
	movl	(%r11,%r14,4), %eax
	movl	%ecx, (%r8,%r14,4)
	cmpl	%edx, %eax
	cmovle	%esi, %eax
	movl	%eax, (%r11,%r14,4)
	testl	%ecx, %ecx
	je	.L69
.L40:
	movq	8(%r9), %r9
	cmpq	%r9, 56(%rsp)
	je	.L38
	movq	96(%rsp), %rax
	movl	(%r11,%rax,4), %edx
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L69:
	movq	%r14, %rdx
	salq	$4, %rdx
	addq	8(%rsp), %rdx
	movq	8(%rdx), %r15
	movq	%rdx, 40(%rsp)
	cmpq	%r15, %rdx
	je	.L40
	movq	%r9, 160(%rsp)
	movq	%r14, 72(%rsp)
.L50:
	movslq	(%r15), %r12
	leal	1(%rax), %esi
	movl	(%r11,%r12,4), %edx
	movl	(%r8,%r12,4), %edi
	cmpl	%edx, %eax
	leal	-1(%rdi), %ecx
	cmovge	%esi, %edx
	movl	%ecx, (%r8,%r12,4)
	movl	%edx, (%r11,%r12,4)
	testl	%ecx, %ecx
	je	.L70
.L42:
	movq	8(%r15), %r15
	cmpq	%r15, 40(%rsp)
	je	.L62
.L73:
	movq	72(%rsp), %rax
	movl	(%r11,%rax,4), %eax
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L70:
	movq	%r12, %r9
	salq	$4, %r9
	addq	8(%rsp), %r9
	movq	8(%r9), %r13
	cmpq	%r13, %r9
	je	.L42
	movq	%r12, %rax
	movq	%r9, %r12
	movq	%r15, %r9
	movq	%rax, %r15
.L49:
	movslq	0(%r13), %rbx
	leal	1(%rdx), %esi
	movl	(%r8,%rbx,4), %eax
	leal	-1(%rax), %ecx
	movl	(%r11,%rbx,4), %eax
	movl	%ecx, (%r8,%rbx,4)
	cmpl	%edx, %eax
	cmovle	%esi, %eax
	movl	%eax, (%r11,%rbx,4)
	testl	%ecx, %ecx
	je	.L71
.L44:
	movq	8(%r13), %r13
	cmpq	%r13, %r12
	je	.L61
	movl	(%r11,%r15,4), %edx
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L71:
	movq	%rbx, %r14
	salq	$4, %r14
	addq	8(%rsp), %r14
	movq	8(%r14), %rbp
	cmpq	%rbp, %r14
	je	.L44
.L48:
	movslq	0(%rbp), %rcx
	movl	(%r8,%rcx,4), %edi
	movl	(%r11,%rcx,4), %esi
	leal	-1(%rdi), %edx
	cmpl	%eax, %esi
	leal	1(%rax), %edi
	cmovle	%edi, %esi
	movl	%edx, (%r8,%rcx,4)
	movl	%esi, (%r11,%rcx,4)
	testl	%edx, %edx
	je	.L72
	movq	8(%rbp), %rbp
	cmpq	%rbp, %r14
	je	.L44
.L47:
	movl	(%r11,%rbx,4), %eax
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L61:
	movq	%r9, %r15
	movq	8(%r15), %r15
	cmpq	%r15, 40(%rsp)
	jne	.L73
.L62:
	movq	160(%rsp), %r9
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L72:
	movq	8(%rsp), %rdi
	movl	%ecx, %esi
	movq	%r9, 168(%rsp)
	call	dfs
	movq	8(%rbp), %rbp
	movq	168(%rsp), %r9
	leaq	dp(%rip), %r11
	leaq	dst_cnt(%rip), %r8
	cmpq	%rbp, %r14
	jne	.L47
	jmp	.L44
	.cfi_endproc
.LFE56:
	.size	dfs, .-dfs
	.section	.rodata.str1.1
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB57:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	leaq	16(%rsp), %rdi
	call	get_int2
	movl	16(%rsp), %edx
	testl	%edx, %edx
	jle	.L75
	leal	-1(%rdx), %eax
	cmpl	$10, %eax
	jbe	.L96
	movdqa	.LC4(%rip), %xmm3
	movl	%edx, %ecx
	pxor	%xmm5, %xmm5
	leaq	graph.1(%rip), %rbp
	movdqa	%xmm5, %xmm6
	shrl	$2, %ecx
	movq	%rbp, %xmm7
	leaq	72(%rbp), %rsi
	pcmpgtd	%xmm3, %xmm6
	punpcklqdq	%xmm7, %xmm7
	leaq	8(%rbp), %rax
	subl	$1, %ecx
	salq	$6, %rcx
	movdqa	.LC2(%rip), %xmm4
	movdqa	.LC3(%rip), %xmm8
	addq	%rsi, %rcx
	.p2align 4,,10
	.p2align 3
.L77:
	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	%rcx, %rax
	jne	.L77
	movl	%edx, %eax
	andl	$-4, %eax
	testb	$3, %dl
	je	.L78
.L76:
	movslq	%eax, %rcx
	salq	$4, %rcx
	leaq	0(%rbp,%rcx), %rsi
	movq	%rsi, 8(%rsi)
	leal	1(%rax), %esi
	cmpl	%esi, %edx
	jle	.L78
	movslq	%esi, %rsi
	leaq	16(%rbp,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%rbp,%rsi)
	leal	2(%rax), %esi
	cmpl	%esi, %edx
	jle	.L78
	movslq	%esi, %rsi
	leaq	32(%rbp,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%rbp,%rsi)
	leal	3(%rax), %esi
	cmpl	%esi, %edx
	jle	.L78
	movslq	%esi, %rsi
	leaq	48(%rbp,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%rbp,%rsi)
	leal	4(%rax), %esi
	cmpl	%esi, %edx
	jle	.L78
	movslq	%esi, %rsi
	leaq	64(%rbp,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%rbp,%rsi)
	leal	5(%rax), %esi
	cmpl	%esi, %edx
	jle	.L78
	movslq	%esi, %rsi
	leaq	80(%rbp,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%rbp,%rsi)
	leal	6(%rax), %esi
	cmpl	%esi, %edx
	jle	.L78
	movslq	%esi, %rsi
	leaq	96(%rbp,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%rbp,%rsi)
	leal	7(%rax), %esi
	cmpl	%esi, %edx
	jle	.L78
	movslq	%esi, %rsi
	leaq	112(%rbp,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%rbp,%rsi)
	leal	8(%rax), %esi
	cmpl	%esi, %edx
	jle	.L78
	movslq	%esi, %rsi
	leaq	128(%rbp,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%rbp,%rsi)
	leal	9(%rax), %esi
	cmpl	%esi, %edx
	jle	.L78
	movslq	%esi, %rsi
	leaq	144(%rbp,%rcx), %rdi
	addl	$10, %eax
	salq	$4, %rsi
	movq	%rdi, 8(%rbp,%rsi)
	cmpl	%eax, %edx
	jle	.L78
	cltq
	leaq	160(%rbp,%rcx), %rdx
	salq	$4, %rax
	movq	%rdx, 8(%rbp,%rax)
.L78:
	leaq	cands.0(%rip), %r12
	movl	$100000, %edx
	movl	$1, %esi
	movq	%r12, %rdi
	call	memset@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L94
.L93:
	xorl	%ebx, %ebx
	leaq	32(%rsp), %r14
	leaq	dst_cnt(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L81:
	movq	stdin(%rip), %rdx
	movl	$30, %esi
	movq	%r14, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L80
	leaq	28(%rsp), %rcx
	leaq	24(%rsp), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	call	__isoc99_sscanf@PLT
.L80:
	movl	28(%rsp), %eax
	movl	$16, %edi
	addl	$1, %ebx
	leal	-1(%rax), %r15d
	movl	24(%rsp), %eax
	leal	-1(%rax), %edx
	movslq	%edx, %rdx
	salq	$4, %rdx
	addq	%rbp, %rdx
	movq	%rdx, 8(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rdx
	movl	%r15d, (%rax)
	movq	8(%rdx), %rsi
	movq	%rax, 8(%rdx)
	movq	%rsi, 8(%rax)
	movslq	%r15d, %rax
	addl	$1, 0(%r13,%rax,4)
	movb	$0, (%r12,%rax)
	cmpl	%ebx, 20(%rsp)
	jg	.L81
	movl	16(%rsp), %edx
	testl	%edx, %edx
	jle	.L79
.L94:
	leaq	graph.1(%rip), %r14
	xorl	%r13d, %r13d
	leaq	dst_cnt(%rip), %r9
	leaq	dp(%rip), %r15
	jmp	.L87
	.p2align 4,,10
	.p2align 3
.L82:
	movl	16(%rsp), %eax
	addq	$1, %r13
	addq	$16, %r14
	cmpl	%r13d, %eax
	jle	.L107
.L87:
	cmpb	$0, (%r12,%r13)
	je	.L82
	movq	8(%r14), %rbx
	cmpq	%r14, %rbx
	je	.L82
.L86:
	movslq	(%rbx), %rdx
	movl	(%r15,%r13,4), %esi
	movl	(%r15,%rdx,4), %ecx
	movl	(%r9,%rdx,4), %eax
	leal	1(%rsi), %edi
	subl	$1, %eax
	cmpl	%ecx, %esi
	cmovge	%edi, %ecx
	movl	%eax, (%r9,%rdx,4)
	movl	%ecx, (%r15,%rdx,4)
	testl	%eax, %eax
	je	.L108
	movq	8(%rbx), %rbx
	cmpq	%r14, %rbx
	jne	.L86
	jmp	.L82
	.p2align 4,,10
	.p2align 3
.L108:
	movl	%edx, %esi
	movq	%rbp, %rdi
	call	dfs
	movq	8(%rbx), %rbx
	leaq	dst_cnt(%rip), %r9
	cmpq	%rbx, %r14
	jne	.L86
	jmp	.L82
	.p2align 4,,10
	.p2align 3
.L107:
	testl	%eax, %eax
	jle	.L79
	leal	-1(%rax), %edx
	cmpl	$2, %edx
	jbe	.L97
	movl	%eax, %ecx
	leaq	dp(%rip), %rsi
	pxor	%xmm0, %xmm0
	shrl	$2, %ecx
	leaq	16(%rsi), %rdi
	movq	%rsi, %rdx
	subl	$1, %ecx
	salq	$4, %rcx
	addq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L89:
	movdqa	%xmm0, %xmm1
	addq	$16, %rdx
	pcmpgtd	-16(%rdx), %xmm1
	pand	%xmm1, %xmm0
	pandn	-16(%rdx), %xmm1
	por	%xmm1, %xmm0
	cmpq	%rcx, %rdx
	jne	.L89
	movdqa	%xmm0, %xmm2
	movl	%eax, %ecx
	psrldq	$8, %xmm2
	andl	$-4, %ecx
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %edx
	testb	$3, %al
	je	.L91
.L88:
	movslq	%ecx, %rdi
	movl	(%rsi,%rdi,4), %edi
	cmpl	%edi, %edx
	cmovl	%edi, %edx
	leal	1(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L91
	movslq	%edi, %rdi
	movl	(%rsi,%rdi,4), %edi
	cmpl	%edi, %edx
	cmovl	%edi, %edx
	addl	$2, %ecx
	cmpl	%ecx, %eax
	jle	.L91
	movslq	%ecx, %rcx
	movl	(%rsi,%rcx,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
.L91:
	xorl	%eax, %eax
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L109
	addq	$88, %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
.L75:
	.cfi_restore_state
	leaq	cands.0(%rip), %r12
	movl	$100000, %edx
	movl	$1, %esi
	movq	%r12, %rdi
	call	memset@PLT
	cmpl	$0, 20(%rsp)
	jle	.L79
	leaq	graph.1(%rip), %rbp
	jmp	.L93
.L79:
	xorl	%edx, %edx
	jmp	.L91
.L97:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	leaq	dp(%rip), %rsi
	jmp	.L88
.L96:
	xorl	%eax, %eax
	leaq	graph.1(%rip), %rbp
	jmp	.L76
.L109:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE57:
	.size	main, .-main
	.local	cands.0
	.comm	cands.0,100000,32
	.local	graph.1
	.comm	graph.1,1600000,32
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 400000
dp:
	.zero	400000
	.globl	dst_cnt
	.align 32
	.type	dst_cnt, @object
	.size	dst_cnt, 400000
dst_cnt:
	.zero	400000
	.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
	.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	get_str
	.type	get_str, @function
get_str:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	movq	stdin(%rip), %rcx
	movl	%esi, %edx
	movq	$-1, %rsi
	call	__fgets_chk@PLT
	cmpq	$1, %rax
	sbbl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE51:
	.size	get_str, .-get_str
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.text
	.p2align 4
	.globl	get_int
	.type	get_int, @function
get_int:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$30, %esi
	subq	$64, %rsp
	.cfi_def_cfa_offset 80
	movq	stdin(%rip), %rdx
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	movq	%rbp, %rdi
	call	fgets@PLT
	movq	%rax, %r8
	xorl	%eax, %eax
	testq	%r8, %r8
	je	.L4
	leaq	12(%rsp), %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rbp, %rdi
	call	__isoc99_sscanf@PLT
	movl	12(%rsp), %eax
.L4:
	movq	56(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L10
	addq	$64, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movq	%rsi, %r13
	movl	$30, %esi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	subq	$48, %rsp
	.cfi_def_cfa_offset 80
	movq	stdin(%rip), %rdx
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L14
	movq	%r13, %rcx
	movq	%r12, %rdx
	leaq	.LC1(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	xorl	%eax, %eax
.L11:
	movq	40(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L16
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	movl	$-1, %eax
	jmp	.L11
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.size	get_int2, .-get_int2
	.p2align 4
	.globl	create_graph
	.type	create_graph, @function
create_graph:
.LFB54:
	.cfi_startproc
	endbr64
	movl	%edi, %edx
	leaq	graph.1(%rip), %r8
	testl	%edi, %edi
	jle	.L18
	leal	-1(%rdi), %eax
	cmpl	$10, %eax
	jbe	.L22
	pxor	%xmm5, %xmm5
	movq	%r8, %xmm7
	leaq	72(%r8), %rsi
	movl	%edi, %ecx
	movdqa	%xmm5, %xmm6
	shrl	$2, %ecx
	punpcklqdq	%xmm7, %xmm7
	leaq	8(%r8), %rax
	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
.L20:
	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	.L20
	movl	%edx, %eax
	andl	$-4, %eax
	testb	$3, %dl
	je	.L18
.L19:
	movslq	%eax, %rcx
	salq	$4, %rcx
	leaq	(%r8,%rcx), %rsi
	movq	%rsi, 8(%rsi)
	leal	1(%rax), %esi
	cmpl	%esi, %edx
	jle	.L18
	movslq	%esi, %rsi
	leaq	16(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%r8,%rsi)
	leal	2(%rax), %esi
	cmpl	%esi, %edx
	jle	.L18
	movslq	%esi, %rsi
	leaq	32(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%r8,%rsi)
	leal	3(%rax), %esi
	cmpl	%esi, %edx
	jle	.L18
	movslq	%esi, %rsi
	leaq	48(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%r8,%rsi)
	leal	4(%rax), %esi
	cmpl	%esi, %edx
	jle	.L18
	movslq	%esi, %rsi
	leaq	64(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%r8,%rsi)
	leal	5(%rax), %esi
	cmpl	%esi, %edx
	jle	.L18
	movslq	%esi, %rsi
	leaq	80(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%r8,%rsi)
	leal	6(%rax), %esi
	cmpl	%esi, %edx
	jle	.L18
	movslq	%esi, %rsi
	leaq	96(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%r8,%rsi)
	leal	7(%rax), %esi
	cmpl	%esi, %edx
	jle	.L18
	movslq	%esi, %rsi
	leaq	112(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%r8,%rsi)
	leal	8(%rax), %esi
	cmpl	%esi, %edx
	jle	.L18
	movslq	%esi, %rsi
	leaq	128(%r8,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%r8,%rsi)
	leal	9(%rax), %esi
	cmpl	%esi, %edx
	jle	.L18
	movslq	%esi, %rsi
	leaq	144(%r8,%rcx), %rdi
	addl	$10, %eax
	salq	$4, %rsi
	movq	%rdi, 8(%r8,%rsi)
	cmpl	%eax, %edx
	jle	.L18
	cltq
	leaq	160(%r8,%rcx), %rdx
	salq	$4, %rax
	movq	%rdx, 8(%r8,%rax)
.L18:
	movq	%r8, %rax
	ret
.L22:
	xorl	%eax, %eax
	jmp	.L19
	.cfi_endproc
.LFE54:
	.size	create_graph, .-create_graph
	.p2align 4
	.globl	add_list
	.type	add_list, @function
add_list:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	movl	$16, %edi
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	call	malloc@PLT
	movq	8(%rbx), %rdx
	movl	%ebp, (%rax)
	movq	%rdx, 8(%rax)
	movq	%rax, 8(%rbx)
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE55:
	.size	add_list, .-add_list
	.p2align 4
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%esi, %rax
	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	$184, %rsp
	.cfi_def_cfa_offset 240
	movq	%rax, 152(%rsp)
	salq	$4, %rax
	addq	%rdi, %rax
	movq	%rdi, 8(%rsp)
	movq	8(%rax), %rsi
	movq	%rax, 144(%rsp)
	movq	%rsi, 48(%rsp)
	cmpq	%rsi, %rax
	je	.L27
	leaq	dst_cnt(%rip), %r8
	leaq	dp(%rip), %r11
.L28:
	movq	48(%rsp), %rax
	movq	152(%rsp), %rdi
	movslq	(%rax), %rbx
	movl	(%r11,%rdi,4), %ecx
	movl	(%r8,%rbx,4), %eax
	movl	(%r11,%rbx,4), %edx
	leal	1(%rcx), %esi
	movq	%rbx, 88(%rsp)
	movl	%eax, (%rsp)
	subl	$1, %eax
	cmpl	%edx, %ecx
	cmovge	%esi, %edx
	movl	%eax, (%r8,%rbx,4)
	movl	%edx, (%r11,%rbx,4)
	testl	%eax, %eax
	je	.L64
.L30:
	movq	48(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, 48(%rsp)
	cmpq	%rax, 144(%rsp)
	jne	.L28
.L27:
	addq	$184, %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
.L64:
	.cfi_restore_state
	movq	%rbx, %rax
	salq	$4, %rax
	addq	8(%rsp), %rax
	movq	8(%rax), %rbx
	movq	%rax, 136(%rsp)
	movq	%rbx, 32(%rsp)
	cmpq	%rbx, %rax
	je	.L30
.L55:
	movq	32(%rsp), %rax
	leal	1(%rdx), %esi
	movslq	(%rax), %rax
	movl	(%r8,%rax,4), %ebx
	movq	%rax, %rdi
	movq	%rax, 64(%rsp)
	leal	-1(%rbx), %ecx
	movl	%ebx, (%rsp)
	movl	%ecx, (%r8,%rax,4)
	movl	(%r11,%rax,4), %eax
	cmpl	%edx, %eax
	cmovle	%esi, %eax
	movl	%eax, (%r11,%rdi,4)
	testl	%ecx, %ecx
	je	.L65
.L32:
	movq	32(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, 32(%rsp)
	cmpq	%rax, 136(%rsp)
	je	.L30
	movq	88(%rsp), %rax
	movl	(%r11,%rax,4), %edx
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L65:
	movq	%rdi, %rdx
	salq	$4, %rdx
	addq	8(%rsp), %rdx
	movq	8(%rdx), %rdi
	movq	%rdx, 120(%rsp)
	movq	%rdi, 24(%rsp)
	cmpq	%rdi, %rdx
	je	.L32
.L54:
	movq	24(%rsp), %rsi
	movslq	(%rsi), %r9
	leal	1(%rax), %esi
	movl	(%r11,%r9,4), %edx
	movl	(%r8,%r9,4), %ebx
	cmpl	%eax, %edx
	leal	-1(%rbx), %ecx
	cmovle	%esi, %edx
	movl	%ecx, (%r8,%r9,4)
	movl	%edx, (%r11,%r9,4)
	testl	%ecx, %ecx
	je	.L66
.L34:
	movq	24(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, 24(%rsp)
	cmpq	%rax, 120(%rsp)
	je	.L32
	movq	64(%rsp), %rax
	movl	(%r11,%rax,4), %eax
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L66:
	movq	%r9, %rax
	salq	$4, %rax
	addq	8(%rsp), %rax
	movq	8(%rax), %rsi
	movq	%rax, 104(%rsp)
	movq	%rsi, 16(%rsp)
	cmpq	%rsi, %rax
	je	.L34
	movq	%r9, 128(%rsp)
.L53:
	movq	16(%rsp), %rax
	leal	1(%rdx), %esi
	movslq	(%rax), %r10
	movl	(%r8,%r10,4), %eax
	leal	-1(%rax), %ecx
	movl	(%r11,%r10,4), %eax
	movl	%ecx, (%r8,%r10,4)
	cmpl	%edx, %eax
	cmovle	%esi, %eax
	movl	%eax, (%r11,%r10,4)
	testl	%ecx, %ecx
	je	.L67
.L36:
	movq	16(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, 16(%rsp)
	cmpq	%rax, 104(%rsp)
	je	.L34
	movq	128(%rsp), %rax
	movl	(%r11,%rax,4), %edx
	jmp	.L53
	.p2align 4,,10
	.p2align 3
.L67:
	movq	%r10, %rdx
	salq	$4, %rdx
	addq	8(%rsp), %rdx
	movq	8(%rdx), %rdi
	movq	%rdx, 80(%rsp)
	movq	%rdi, (%rsp)
	cmpq	%rdi, %rdx
	je	.L36
	movq	%r10, 112(%rsp)
.L52:
	movq	(%rsp), %rdi
	leal	1(%rax), %esi
	movslq	(%rdi), %r10
	movl	(%r11,%r10,4), %edx
	movl	(%r8,%r10,4), %edi
	cmpl	%eax, %edx
	leal	-1(%rdi), %ecx
	cmovle	%esi, %edx
	movl	%ecx, (%r8,%r10,4)
	movl	%edx, (%r11,%r10,4)
	testl	%ecx, %ecx
	je	.L68
.L38:
	movq	(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, (%rsp)
	cmpq	%rax, 80(%rsp)
	je	.L36
	movq	112(%rsp), %rax
	movl	(%r11,%rax,4), %eax
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L68:
	movq	%r10, %rax
	salq	$4, %rax
	addq	8(%rsp), %rax
	movq	8(%rax), %r9
	movq	%rax, 56(%rsp)
	cmpq	%r9, %rax
	je	.L38
	movq	%r10, 96(%rsp)
.L51:
	movslq	(%r9), %r14
	leal	1(%rdx), %esi
	movl	(%r8,%r14,4), %eax
	leal	-1(%rax), %ecx
	movl	(%r11,%r14,4), %eax
	movl	%ecx, (%r8,%r14,4)
	cmpl	%edx, %eax
	cmovle	%esi, %eax
	movl	%eax, (%r11,%r14,4)
	testl	%ecx, %ecx
	je	.L69
.L40:
	movq	8(%r9), %r9
	cmpq	%r9, 56(%rsp)
	je	.L38
	movq	96(%rsp), %rax
	movl	(%r11,%rax,4), %edx
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L69:
	movq	%r14, %rdx
	salq	$4, %rdx
	addq	8(%rsp), %rdx
	movq	8(%rdx), %r15
	movq	%rdx, 40(%rsp)
	cmpq	%r15, %rdx
	je	.L40
	movq	%r9, 160(%rsp)
	movq	%r14, 72(%rsp)
.L50:
	movslq	(%r15), %r12
	leal	1(%rax), %esi
	movl	(%r11,%r12,4), %edx
	movl	(%r8,%r12,4), %edi
	cmpl	%edx, %eax
	leal	-1(%rdi), %ecx
	cmovge	%esi, %edx
	movl	%ecx, (%r8,%r12,4)
	movl	%edx, (%r11,%r12,4)
	testl	%ecx, %ecx
	je	.L70
.L42:
	movq	8(%r15), %r15
	cmpq	%r15, 40(%rsp)
	je	.L62
.L73:
	movq	72(%rsp), %rax
	movl	(%r11,%rax,4), %eax
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L70:
	movq	%r12, %r9
	salq	$4, %r9
	addq	8(%rsp), %r9
	movq	8(%r9), %r13
	cmpq	%r13, %r9
	je	.L42
	movq	%r12, %rax
	movq	%r9, %r12
	movq	%r15, %r9
	movq	%rax, %r15
.L49:
	movslq	0(%r13), %rbx
	leal	1(%rdx), %esi
	movl	(%r8,%rbx,4), %eax
	leal	-1(%rax), %ecx
	movl	(%r11,%rbx,4), %eax
	movl	%ecx, (%r8,%rbx,4)
	cmpl	%edx, %eax
	cmovle	%esi, %eax
	movl	%eax, (%r11,%rbx,4)
	testl	%ecx, %ecx
	je	.L71
.L44:
	movq	8(%r13), %r13
	cmpq	%r13, %r12
	je	.L61
	movl	(%r11,%r15,4), %edx
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L71:
	movq	%rbx, %r14
	salq	$4, %r14
	addq	8(%rsp), %r14
	movq	8(%r14), %rbp
	cmpq	%rbp, %r14
	je	.L44
.L48:
	movslq	0(%rbp), %rcx
	movl	(%r8,%rcx,4), %edi
	movl	(%r11,%rcx,4), %esi
	leal	-1(%rdi), %edx
	cmpl	%eax, %esi
	leal	1(%rax), %edi
	cmovle	%edi, %esi
	movl	%edx, (%r8,%rcx,4)
	movl	%esi, (%r11,%rcx,4)
	testl	%edx, %edx
	je	.L72
	movq	8(%rbp), %rbp
	cmpq	%rbp, %r14
	je	.L44
.L47:
	movl	(%r11,%rbx,4), %eax
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L61:
	movq	%r9, %r15
	movq	8(%r15), %r15
	cmpq	%r15, 40(%rsp)
	jne	.L73
.L62:
	movq	160(%rsp), %r9
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L72:
	movq	8(%rsp), %rdi
	movl	%ecx, %esi
	movq	%r9, 168(%rsp)
	call	dfs
	movq	8(%rbp), %rbp
	movq	168(%rsp), %r9
	leaq	dp(%rip), %r11
	leaq	dst_cnt(%rip), %r8
	cmpq	%rbp, %r14
	jne	.L47
	jmp	.L44
	.cfi_endproc
.LFE56:
	.size	dfs, .-dfs
	.section	.rodata.str1.1
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB57:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	leaq	16(%rsp), %rdi
	call	get_int2
	movl	16(%rsp), %edx
	testl	%edx, %edx
	jle	.L75
	leal	-1(%rdx), %eax
	cmpl	$10, %eax
	jbe	.L96
	movdqa	.LC4(%rip), %xmm3
	movl	%edx, %ecx
	pxor	%xmm5, %xmm5
	leaq	graph.1(%rip), %rbp
	movdqa	%xmm5, %xmm6
	shrl	$2, %ecx
	movq	%rbp, %xmm7
	leaq	72(%rbp), %rsi
	pcmpgtd	%xmm3, %xmm6
	punpcklqdq	%xmm7, %xmm7
	leaq	8(%rbp), %rax
	subl	$1, %ecx
	salq	$6, %rcx
	movdqa	.LC2(%rip), %xmm4
	movdqa	.LC3(%rip), %xmm8
	addq	%rsi, %rcx
	.p2align 4,,10
	.p2align 3
.L77:
	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	%rcx, %rax
	jne	.L77
	movl	%edx, %eax
	andl	$-4, %eax
	testb	$3, %dl
	je	.L78
.L76:
	movslq	%eax, %rcx
	salq	$4, %rcx
	leaq	0(%rbp,%rcx), %rsi
	movq	%rsi, 8(%rsi)
	leal	1(%rax), %esi
	cmpl	%esi, %edx
	jle	.L78
	movslq	%esi, %rsi
	leaq	16(%rbp,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%rbp,%rsi)
	leal	2(%rax), %esi
	cmpl	%esi, %edx
	jle	.L78
	movslq	%esi, %rsi
	leaq	32(%rbp,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%rbp,%rsi)
	leal	3(%rax), %esi
	cmpl	%esi, %edx
	jle	.L78
	movslq	%esi, %rsi
	leaq	48(%rbp,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%rbp,%rsi)
	leal	4(%rax), %esi
	cmpl	%esi, %edx
	jle	.L78
	movslq	%esi, %rsi
	leaq	64(%rbp,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%rbp,%rsi)
	leal	5(%rax), %esi
	cmpl	%esi, %edx
	jle	.L78
	movslq	%esi, %rsi
	leaq	80(%rbp,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%rbp,%rsi)
	leal	6(%rax), %esi
	cmpl	%esi, %edx
	jle	.L78
	movslq	%esi, %rsi
	leaq	96(%rbp,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%rbp,%rsi)
	leal	7(%rax), %esi
	cmpl	%esi, %edx
	jle	.L78
	movslq	%esi, %rsi
	leaq	112(%rbp,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%rbp,%rsi)
	leal	8(%rax), %esi
	cmpl	%esi, %edx
	jle	.L78
	movslq	%esi, %rsi
	leaq	128(%rbp,%rcx), %rdi
	salq	$4, %rsi
	movq	%rdi, 8(%rbp,%rsi)
	leal	9(%rax), %esi
	cmpl	%esi, %edx
	jle	.L78
	movslq	%esi, %rsi
	leaq	144(%rbp,%rcx), %rdi
	addl	$10, %eax
	salq	$4, %rsi
	movq	%rdi, 8(%rbp,%rsi)
	cmpl	%eax, %edx
	jle	.L78
	cltq
	leaq	160(%rbp,%rcx), %rdx
	salq	$4, %rax
	movq	%rdx, 8(%rbp,%rax)
.L78:
	leaq	cands.0(%rip), %r12
	movl	$100000, %edx
	movl	$1, %esi
	movq	%r12, %rdi
	call	memset@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L94
.L93:
	xorl	%ebx, %ebx
	leaq	32(%rsp), %r14
	leaq	dst_cnt(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L81:
	movq	stdin(%rip), %rdx
	movl	$30, %esi
	movq	%r14, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L80
	leaq	28(%rsp), %rcx
	leaq	24(%rsp), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	call	__isoc99_sscanf@PLT
.L80:
	movl	28(%rsp), %eax
	movl	$16, %edi
	addl	$1, %ebx
	leal	-1(%rax), %r15d
	movl	24(%rsp), %eax
	leal	-1(%rax), %edx
	movslq	%edx, %rdx
	salq	$4, %rdx
	addq	%rbp, %rdx
	movq	%rdx, 8(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rdx
	movl	%r15d, (%rax)
	movq	8(%rdx), %rsi
	movq	%rax, 8(%rdx)
	movq	%rsi, 8(%rax)
	movslq	%r15d, %rax
	addl	$1, 0(%r13,%rax,4)
	movb	$0, (%r12,%rax)
	cmpl	%ebx, 20(%rsp)
	jg	.L81
	movl	16(%rsp), %edx
	testl	%edx, %edx
	jle	.L79
.L94:
	leaq	graph.1(%rip), %r14
	xorl	%r13d, %r13d
	leaq	dst_cnt(%rip), %r9
	leaq	dp(%rip), %r15
	jmp	.L87
	.p2align 4,,10
	.p2align 3
.L82:
	movl	16(%rsp), %eax
	addq	$1, %r13
	addq	$16, %r14
	cmpl	%r13d, %eax
	jle	.L107
.L87:
	cmpb	$0, (%r12,%r13)
	je	.L82
	movq	8(%r14), %rbx
	cmpq	%r14, %rbx
	je	.L82
.L86:
	movslq	(%rbx), %rdx
	movl	(%r15,%r13,4), %esi
	movl	(%r15,%rdx,4), %ecx
	movl	(%r9,%rdx,4), %eax
	leal	1(%rsi), %edi
	subl	$1, %eax
	cmpl	%ecx, %esi
	cmovge	%edi, %ecx
	movl	%eax, (%r9,%rdx,4)
	movl	%ecx, (%r15,%rdx,4)
	testl	%eax, %eax
	je	.L108
	movq	8(%rbx), %rbx
	cmpq	%r14, %rbx
	jne	.L86
	jmp	.L82
	.p2align 4,,10
	.p2align 3
.L108:
	movl	%edx, %esi
	movq	%rbp, %rdi
	call	dfs
	movq	8(%rbx), %rbx
	leaq	dst_cnt(%rip), %r9
	cmpq	%rbx, %r14
	jne	.L86
	jmp	.L82
	.p2align 4,,10
	.p2align 3
.L107:
	testl	%eax, %eax
	jle	.L79
	leal	-1(%rax), %edx
	cmpl	$2, %edx
	jbe	.L97
	movl	%eax, %ecx
	leaq	dp(%rip), %rsi
	pxor	%xmm0, %xmm0
	shrl	$2, %ecx
	leaq	16(%rsi), %rdi
	movq	%rsi, %rdx
	subl	$1, %ecx
	salq	$4, %rcx
	addq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L89:
	movdqa	%xmm0, %xmm1
	addq	$16, %rdx
	pcmpgtd	-16(%rdx), %xmm1
	pand	%xmm1, %xmm0
	pandn	-16(%rdx), %xmm1
	por	%xmm1, %xmm0
	cmpq	%rcx, %rdx
	jne	.L89
	movdqa	%xmm0, %xmm2
	movl	%eax, %ecx
	psrldq	$8, %xmm2
	andl	$-4, %ecx
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %edx
	testb	$3, %al
	je	.L91
.L88:
	movslq	%ecx, %rdi
	movl	(%rsi,%rdi,4), %edi
	cmpl	%edi, %edx
	cmovl	%edi, %edx
	leal	1(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L91
	movslq	%edi, %rdi
	movl	(%rsi,%rdi,4), %edi
	cmpl	%edi, %edx
	cmovl	%edi, %edx
	addl	$2, %ecx
	cmpl	%ecx, %eax
	jle	.L91
	movslq	%ecx, %rcx
	movl	(%rsi,%rcx,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
.L91:
	xorl	%eax, %eax
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L109
	addq	$88, %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
.L75:
	.cfi_restore_state
	leaq	cands.0(%rip), %r12
	movl	$100000, %edx
	movl	$1, %esi
	movq	%r12, %rdi
	call	memset@PLT
	cmpl	$0, 20(%rsp)
	jle	.L79
	leaq	graph.1(%rip), %rbp
	jmp	.L93
.L79:
	xorl	%edx, %edx
	jmp	.L91
.L97:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	leaq	dp(%rip), %rsi
	jmp	.L88
.L96:
	xorl	%eax, %eax
	leaq	graph.1(%rip), %rbp
	jmp	.L76
.L109:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE57:
	.size	main, .-main
	.local	cands.0
	.comm	cands.0,100000,32
	.local	graph.1
	.comm	graph.1,1600000,32
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 400000
dp:
	.zero	400000
	.globl	dst_cnt
	.align 32
	.type	dst_cnt, @object
	.size	dst_cnt, 400000
dst_cnt:
	.zero	400000
	.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
	.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> // uint64_t

#define BUF_SIZE 30

// size: specify sizeof(str)
int get_str(char *str, int size) {
    if(!fgets(str, size, stdin)) return -1;
    return 0;
}

int get_int(void) {
  int num;
#ifdef BUF_SIZE
  char line[BUF_SIZE];
  if(!fgets(line, BUF_SIZE, stdin)) return 0;
  sscanf(line, "%d", &num);
#else
#error
#endif
  return num;
}

int get_int2(int *a1, int *a2) {
#ifdef BUF_SIZE
  char line[BUF_SIZE];
  if(!fgets(line, BUF_SIZE, stdin)) return -1;
  sscanf(line, "%d %d", a1, a2);
#else
#error
#endif
  return 0;
}

struct list {
    int dst;
    struct list *next;
};

#define VERTEXES_MAX 100000

struct list *create_graph(int vs) {
    static struct list graph[VERTEXES_MAX];
    int i;
    for(i = 0; i < vs; i++) {
        graph[i].next = &graph[i];
    }
    return graph;
}
void add_list(struct list *head, int v) {
    struct list *elem = malloc(sizeof(struct list));
    elem->dst = v;
    elem->next = head->next;
    head->next = elem;
}

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

int dst_cnt[VERTEXES_MAX];
int dp[VERTEXES_MAX];
void dfs(struct list *graph, int v) {
    struct list *head = &graph[v];
    struct list *elem;
    for(elem = head->next; elem != head; elem = elem->next) {
        int dst = elem->dst;
        dst_cnt[dst]--;
        dp[dst] = max(dp[v]+1, dp[dst]);
        if(!dst_cnt[dst]) dfs(graph, dst);
    }
}

int main(void) {
    int vs, es;
    get_int2(&vs, &es);
    struct list *graph = create_graph(vs);
    static char cands[VERTEXES_MAX];
    memset(cands, 0x01, VERTEXES_MAX);
    int i;
    for(i = 0; i < es; i++) {
        int v1, v2;
        get_int2(&v1, &v2);
        // 1-indexed -> 0-indexed
        v1--; v2--;
        add_list(&graph[v1], v2);
        dst_cnt[v2]++;
        cands[v2] = 0;
    }

    for(i = 0; i < vs; i++) {
        // if starting point
        if(cands[i]) dfs(graph, i);
    }
    int ans = 0;
    for(i = 0; i < vs; i++) {
        ans = max(ans, dp[i]);
    }
    printf("%d\n", ans);

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

2
 1
 3
 0
 2
 2
 2
 2
 1
 1

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

```c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h> // uint64_t

#define BUF_SIZE 30

// size: specify sizeof(str)
int get_str(char *str, int size) {
    if(!fgets(str, size, stdin)) return -1;
    return 0;
}

int get_int(void) {
  int num;
#ifdef BUF_SIZE
  char line[BUF_SIZE];
  if(!fgets(line, BUF_SIZE, stdin)) return 0;
  sscanf(line, "%d", &num);
#else
#error
#endif
  return num;
}

int get_int2(int *a1, int *a2) {
#ifdef BUF_SIZE
  char line[BUF_SIZE];
  if(!fgets(line, BUF_SIZE, stdin)) return -1;
  sscanf(line, "%d %d", a1, a2);
#else
#error
#endif
  return 0;
}

struct list {
    int dst;
    struct list *next;
};

#define VERTEXES_MAX 100000

struct list *create_graph(int vs) {
    static struct list graph[VERTEXES_MAX];
    int i;
    for(i = 0; i < vs; i++) {
        graph[i].next = &graph[i];
    }
    return graph;
}
void add_list(struct list *head, int v) {
    struct list *elem = malloc(sizeof(struct list));
    elem->dst = v;
    elem->next = head->next;
    head->next = elem;
}

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

int dst_cnt[VERTEXES_MAX];
int dp[VERTEXES_MAX];
void dfs(struct list *graph, int v) {
    struct list *head = &graph[v];
    struct list *elem;
    for(elem = head->next; elem != head; elem = elem->next) {
        int dst = elem->dst;
        dst_cnt[dst]--;
        dp[dst] = max(dp[v]+1, dp[dst]);
        if(!dst_cnt[dst]) dfs(graph, dst);
    }
}

int main(void) {
    int vs, es;
    get_int2(&vs, &es);
    struct list *graph = create_graph(vs);
    static char cands[VERTEXES_MAX];
    memset(cands, 0x01, VERTEXES_MAX);
    int i;
    for(i = 0; i < es; i++) {
        int v1, v2;
        get_int2(&v1, &v2);
        // 1-indexed -> 0-indexed
        v1--; v2--;
        add_list(&graph[v1], v2);
        dst_cnt[v2]++;
        cands[v2] = 0;
    }

    for(i = 0; i < vs; i++) {
        // if starting point
        if(cands[i]) dfs(graph, i);
    }
    int ans = 0;
    for(i = 0; i < vs; i++) {
        ans = max(ans, dp[i]);
    }
    printf("%d\n", ans);

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	get_str
	.type	get_str, @function
get_str:
.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	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movq	stdin(%rip), %rdx
	movl	-12(%rbp), %ecx
	movq	-8(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L2
	movl	$-1, %eax
	jmp	.L3
.L2:
	movl	$0, %eax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_str, .-get_str
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	get_int
	.type	get_int, @function
get_int:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rdx
	leaq	-48(%rbp), %rax
	movl	$30, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L5
	movl	$0, %eax
	jmp	.L7
.L5:
	leaq	-52(%rbp), %rdx
	leaq	-48(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-52(%rbp), %eax
.L7:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	get_int, .-get_int
	.section	.rodata
.LC1:
	.string	"%d %d"
	.text
	.globl	get_int2
	.type	get_int2, @function
get_int2:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -56(%rbp)
	movq	%rsi, -64(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rdx
	leaq	-48(%rbp), %rax
	movl	$30, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L10
	movl	$-1, %eax
	jmp	.L12
.L10:
	movq	-64(%rbp), %rcx
	movq	-56(%rbp), %rdx
	leaq	-48(%rbp), %rax
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	$0, %eax
.L12:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	get_int2, .-get_int2
	.globl	create_graph
	.type	create_graph, @function
create_graph:
.LFB9:
	.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	.L15
.L16:
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	graph.1(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+graph.1(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L15:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L16
	leaq	graph.1(%rip), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	create_graph, .-create_graph
	.globl	add_list
	.type	add_list, @function
add_list:
.LFB10:
	.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	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	$16, %edi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	-28(%rbp), %edx
	movl	%edx, (%rax)
	movq	-24(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	-24(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, 8(%rax)
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	add_list, .-add_list
	.globl	dst_cnt
	.bss
	.align 32
	.type	dst_cnt, @object
	.size	dst_cnt, 400000
dst_cnt:
	.zero	400000
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 400000
dp:
	.zero	400000
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.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	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	-44(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -16(%rbp)
	jmp	.L20
.L24:
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dst_cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dst_cnt(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jl	.L21
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	$1, %eax
	jmp	.L22
.L21:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
.L22:
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dp(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dst_cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L23
	movl	-20(%rbp), %edx
	movq	-40(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	dfs
.L23:
	movq	-16(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -16(%rbp)
.L20:
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jne	.L24
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	dfs, .-dfs
	.section	.rodata
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.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
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	get_int2
	movl	-40(%rbp), %eax
	movl	%eax, %edi
	call	create_graph
	movq	%rax, -16(%rbp)
	movl	$100000, %edx
	movl	$1, %esi
	leaq	cands.0(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -24(%rbp)
	jmp	.L26
.L27:
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	get_int2
	movl	-32(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -32(%rbp)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %eax
	movl	-32(%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	-28(%rbp), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dst_cnt(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dst_cnt(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	cltq
	leaq	cands.0(%rip), %rdx
	movb	$0, (%rax,%rdx)
	addl	$1, -24(%rbp)
.L26:
	movl	-36(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L27
	movl	$0, -24(%rbp)
	jmp	.L28
.L30:
	movl	-24(%rbp), %eax
	cltq
	leaq	cands.0(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L29
	movl	-24(%rbp), %edx
	movq	-16(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	dfs
.L29:
	addl	$1, -24(%rbp)
.L28:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L30
	movl	$0, -20(%rbp)
	movl	$0, -24(%rbp)
	jmp	.L31
.L32:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -20(%rbp)
	addl	$1, -24(%rbp)
.L31:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L32
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	main, .-main
	.local	graph.1
	.comm	graph.1,1600000,32
	.local	cands.0
	.comm	cands.0,100000,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
	.globl	get_str
	.type	get_str, @function
get_str:
.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	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movq	stdin(%rip), %rdx
	movl	-12(%rbp), %ecx
	movq	-8(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L2
	movl	$-1, %eax
	jmp	.L3
.L2:
	movl	$0, %eax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_str, .-get_str
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	get_int
	.type	get_int, @function
get_int:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rdx
	leaq	-48(%rbp), %rax
	movl	$30, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L5
	movl	$0, %eax
	jmp	.L7
.L5:
	leaq	-52(%rbp), %rdx
	leaq	-48(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-52(%rbp), %eax
.L7:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	get_int, .-get_int
	.section	.rodata
.LC1:
	.string	"%d %d"
	.text
	.globl	get_int2
	.type	get_int2, @function
get_int2:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -56(%rbp)
	movq	%rsi, -64(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rdx
	leaq	-48(%rbp), %rax
	movl	$30, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L10
	movl	$-1, %eax
	jmp	.L12
.L10:
	movq	-64(%rbp), %rcx
	movq	-56(%rbp), %rdx
	leaq	-48(%rbp), %rax
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	$0, %eax
.L12:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	get_int2, .-get_int2
	.globl	create_graph
	.type	create_graph, @function
create_graph:
.LFB9:
	.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	.L15
.L16:
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	graph.1(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+graph.1(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L15:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L16
	leaq	graph.1(%rip), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	create_graph, .-create_graph
	.globl	add_list
	.type	add_list, @function
add_list:
.LFB10:
	.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	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	$16, %edi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	-28(%rbp), %edx
	movl	%edx, (%rax)
	movq	-24(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	-24(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, 8(%rax)
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	add_list, .-add_list
	.globl	dst_cnt
	.bss
	.align 32
	.type	dst_cnt, @object
	.size	dst_cnt, 400000
dst_cnt:
	.zero	400000
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 400000
dp:
	.zero	400000
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.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	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	-44(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -16(%rbp)
	jmp	.L20
.L24:
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dst_cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dst_cnt(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jl	.L21
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	$1, %eax
	jmp	.L22
.L21:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
.L22:
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dp(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dst_cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L23
	movl	-20(%rbp), %edx
	movq	-40(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	dfs
.L23:
	movq	-16(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -16(%rbp)
.L20:
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jne	.L24
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	dfs, .-dfs
	.section	.rodata
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.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
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	get_int2
	movl	-40(%rbp), %eax
	movl	%eax, %edi
	call	create_graph
	movq	%rax, -16(%rbp)
	movl	$100000, %edx
	movl	$1, %esi
	leaq	cands.0(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -24(%rbp)
	jmp	.L26
.L27:
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	get_int2
	movl	-32(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -32(%rbp)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %eax
	movl	-32(%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	-28(%rbp), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dst_cnt(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dst_cnt(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	cltq
	leaq	cands.0(%rip), %rdx
	movb	$0, (%rax,%rdx)
	addl	$1, -24(%rbp)
.L26:
	movl	-36(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L27
	movl	$0, -24(%rbp)
	jmp	.L28
.L30:
	movl	-24(%rbp), %eax
	cltq
	leaq	cands.0(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L29
	movl	-24(%rbp), %edx
	movq	-16(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	dfs
.L29:
	addl	$1, -24(%rbp)
.L28:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L30
	movl	$0, -20(%rbp)
	movl	$0, -24(%rbp)
	jmp	.L31
.L32:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -20(%rbp)
	addl	$1, -24(%rbp)
.L31:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L32
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	main, .-main
	.local	graph.1
	.comm	graph.1,1600000,32
	.local	cands.0
	.comm	cands.0,100000,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:
