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

```c
// AOJ GRL_3_A Articulation Points
// 2018.5.7 bal4u
// https://everysick.hatenablog.com/entry/2016/06/13/120033 を参考にした
 
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
 
#define MAX_V 100002
#define MAX_E 100002

int  hi[MAX_V], *to[MAX_V];
int  low[MAX_V], ord[MAX_V];
int  cnt;
int  ap[MAX_V], sz;      // Articulation Point 関節点
char mk[MAX_V];

void dfs(int cur, int from)
{
	int i, e, t, ct;
	int is_ap;
	
	mk[cur] = 1;
	low[cur] = ord[cur] = cnt++;
	is_ap = 0;
	ct = 0;

	for (i = 0; i < hi[cur]; i++) {
		e = to[cur][i];
		if (!mk[e]) {
			ct++;
			dfs(e, cur);
			t = low[e];
			if (t < low[cur]) low[cur] = t;
			if (~from && ord[cur] <= low[e]) is_ap = 1;
		} else if (from != e) {
			t = ord[e];
			if (t < low[cur]) low[cur] = t;
		}
	}
	if (from == -1 && ct > 1) is_ap = 1;
	if (is_ap) ap[sz++] = cur;
} 

void check_ap(int V)
{
	int i;
	cnt = 0;
	for (i = 0; i < V; i++) {
		if (!mk[i]) dfs(i, -1);
	}
}

#if 1
#define gc() getchar_unlocked()
#else
#define gc() getchar()
#endif

int in()
{
	int n = 0, c = gc();
	do n = 10*n + (c & 0xf), c = gc(); while (c >= '0');
	return n;
}

int cmp(int *a, int *b) { return *a - *b; }

int main()
{
    int E, V, s, t, i, j;
    int *memo;
 
    V = in(), E = in();
    memo = malloc(E<<3);
    j = 0; for (i = 0; i < E; i++) {
        memo[j++] = s = in(), memo[j++] = t = in();
        hi[s]++, hi[t]++;
     }
    for (i = 0; i < V; i++) {
        if (hi[i]) to[i] = malloc(hi[i]<<2);
    }
    memset(hi, 0, V<<2);
 
    j = 0; while (E--) {
        s = memo[j++], t = memo[j++];
		to[s][hi[s]++] = t, to[t][hi[t]++] = s;
    }
 
    check_ap(V);
 	qsort(ap, sz, sizeof(int), cmp);

	for (i = 0; i < sz; i++) printf("%d\n", ap[i]);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	hi
	.bss
	.align 32
	.type	hi, @object
	.size	hi, 400008
hi:
	.zero	400008
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 800016
to:
	.zero	800016
	.globl	low
	.align 32
	.type	low, @object
	.size	low, 400008
low:
	.zero	400008
	.globl	ord
	.align 32
	.type	ord, @object
	.size	ord, 400008
ord:
	.zero	400008
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	ap
	.align 32
	.type	ap, @object
	.size	ap, 400008
ap:
	.zero	400008
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	mk
	.align 32
	.type	mk, @object
	.size	mk, 100002
mk:
	.zero	100002
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -36(%rbp)
	movl	%esi, -40(%rbp)
	movl	-36(%rbp), %eax
	cltq
	leaq	mk(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	cnt(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, cnt(%rip)
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	ord(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ord(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	low(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$0, -12(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L2
.L6:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	to(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	mk(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L3
	addl	$1, -16(%rbp)
	movl	-36(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	dfs
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	low(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	low(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jge	.L4
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	low(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L4:
	cmpl	$-1, -40(%rbp)
	je	.L5
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ord(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	low(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L5
	movl	$1, -12(%rbp)
	jmp	.L5
.L3:
	movl	-40(%rbp), %eax
	cmpl	-8(%rbp), %eax
	je	.L5
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ord(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	low(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jge	.L5
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	low(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L5:
	addl	$1, -20(%rbp)
.L2:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L6
	cmpl	$-1, -40(%rbp)
	jne	.L7
	cmpl	$1, -16(%rbp)
	jle	.L7
	movl	$1, -12(%rbp)
.L7:
	cmpl	$0, -12(%rbp)
	je	.L9
	movl	sz(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sz(%rip)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	ap(%rip), %rdx
	movl	-36(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L9:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dfs, .-dfs
	.globl	check_ap
	.type	check_ap, @function
check_ap:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	$0, cnt(%rip)
	movl	$0, -4(%rbp)
	jmp	.L11
.L13:
	movl	-4(%rbp), %eax
	cltq
	leaq	mk(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L12
	movl	-4(%rbp), %eax
	movl	$-1, %esi
	movl	%eax, %edi
	call	dfs
.L12:
	addl	$1, -4(%rbp)
.L11:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L13
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	check_ap, .-check_ap
	.globl	in
	.type	in, @function
in:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	call	getchar_unlocked@PLT
	movl	%eax, -4(%rbp)
.L15:
	movl	-8(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	andl	$15, %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	call	getchar_unlocked@PLT
	movl	%eax, -4(%rbp)
	cmpl	$47, -4(%rbp)
	jg	.L15
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	in, .-in
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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
	movl	$0, %eax
	call	in
	movl	%eax, -20(%rbp)
	movl	$0, %eax
	call	in
	movl	%eax, -32(%rbp)
	movl	-32(%rbp), %eax
	sall	$3, %eax
	cltq
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movl	$0, -24(%rbp)
	movl	$0, -28(%rbp)
	jmp	.L20
.L21:
	movl	$0, %eax
	call	in
	movl	%eax, -16(%rbp)
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -24(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-8(%rbp), %rax
	addq	%rax, %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rdx)
	movl	$0, %eax
	call	in
	movl	%eax, -12(%rbp)
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -24(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-8(%rbp), %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -28(%rbp)
.L20:
	movl	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jl	.L21
	movl	$0, -28(%rbp)
	jmp	.L22
.L24:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L23
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	sall	$2, %eax
	cltq
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, %rcx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	to(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L23:
	addl	$1, -28(%rbp)
.L22:
	movl	-28(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L24
	movl	-20(%rbp), %eax
	sall	$2, %eax
	cltq
	movq	%rax, %rdx
	movl	$0, %esi
	leaq	hi(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -24(%rbp)
	jmp	.L25
.L26:
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -24(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -16(%rbp)
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -24(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	to(%rip), %rax
	movq	(%rdx,%rax), %rdi
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %edx
	movl	-16(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	hi(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	salq	$2, %rax
	leaq	(%rdi,%rax), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	to(%rip), %rax
	movq	(%rdx,%rax), %rdi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %edx
	movl	-12(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	hi(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	salq	$2, %rax
	leaq	(%rdi,%rax), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rdx)
.L25:
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -32(%rbp)
	testl	%eax, %eax
	jne	.L26
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	check_ap
	movl	sz(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	ap(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -28(%rbp)
	jmp	.L27
.L28:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ap(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -28(%rbp)
.L27:
	movl	sz(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L28
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	cmp
	.type	cmp, @function
cmp:
.LFB54:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE54:
	.size	cmp, .-cmp
	.p2align 4
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	hi(%rip), %r9
	leaq	mk(%rip), %rdx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%esi, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	low(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movslq	%edi, %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movl	cnt(%rip), %esi
	movb	$1, (%rdx,%rbx)
	leal	1(%rsi), %ecx
	movl	%esi, (%r12,%rbx,4)
	movl	%ecx, cnt(%rip)
	leaq	ord(%rip), %rcx
	movl	%esi, (%rcx,%rbx,4)
	movl	(%r9,%rbx,4), %esi
	testl	%esi, %esi
	jle	.L3
	movq	%rbx, %r15
	xorl	%ebp, %ebp
	xorl	%r11d, %r11d
	xorl	%r10d, %r10d
	leaq	to(%rip), %r8
	cmpl	$-1, %r14d
	je	.L29
.L6:
	movq	(%r8,%rbx,8), %rdi
	movslq	(%rdi,%rbp,4), %r13
	cmpb	$0, (%rdx,%r13)
	movq	%r13, %rdi
	je	.L30
	cmpl	%r13d, %r14d
	je	.L15
	movl	(%rcx,%r13,4), %edi
	cmpl	%edi, (%r12,%rbx,4)
	jle	.L15
	movl	%edi, (%r12,%rbx,4)
	movl	(%r9,%rbx,4), %esi
.L15:
	addq	$1, %rbp
	cmpl	%ebp, %esi
	jg	.L6
.L12:
	cmpl	$-1, %r14d
	sete	%cl
	cmpl	$1, %r10d
	setg	%dl
	testb	%dl, %cl
	jne	.L19
	andl	$1, %r11d
	je	.L3
.L19:
	movslq	sz(%rip), %rdx
	leal	1(%rdx), %ecx
	movl	%ecx, sz(%rip)
	leaq	ap(%rip), %rcx
	movl	%r15d, (%rcx,%rdx,4)
.L3:
	addq	$40, %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
.L30:
	.cfi_restore_state
	addl	$1, %r10d
	movl	%r15d, %esi
	movq	%r8, 24(%rsp)
	movl	%r11d, 16(%rsp)
	movl	%r10d, 12(%rsp)
	call	dfs
	movl	(%r12,%r13,4), %esi
	cmpl	%esi, (%r12,%rbx,4)
	leaq	mk(%rip), %rdx
	movl	12(%rsp), %r10d
	movl	16(%rsp), %r11d
	leaq	ord(%rip), %rcx
	leaq	hi(%rip), %r9
	movq	24(%rsp), %r8
	jle	.L14
	movl	%esi, (%r12,%rbx,4)
.L14:
	movl	(%r12,%r13,4), %eax
	cmpl	%eax, (%rcx,%rbx,4)
	movl	$1, %eax
	movl	(%r9,%rbx,4), %esi
	cmovle	%eax, %r11d
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L29:
	xorl	%r10d, %r10d
	leaq	to(%rip), %r8
.L11:
	movq	(%r8,%rbx,8), %rdi
	movslq	(%rdi,%rbp,4), %r13
	cmpb	$0, (%rdx,%r13)
	movq	%r13, %rdi
	je	.L7
	cmpl	$-1, %r13d
	je	.L8
	movl	(%rcx,%r13,4), %edi
	cmpl	%edi, (%r12,%rbx,4)
	jle	.L8
	movl	%edi, (%r12,%rbx,4)
	movl	(%r9,%rbx,4), %esi
.L8:
	addq	$1, %rbp
	cmpl	%ebp, %esi
	jg	.L11
	xorl	%r11d, %r11d
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, %r10d
	movl	%r15d, %esi
	movq	%r8, 16(%rsp)
	movl	%r10d, 12(%rsp)
	call	dfs
	movl	(%r12,%r13,4), %esi
	cmpl	%esi, (%r12,%rbx,4)
	leaq	mk(%rip), %rdx
	movl	12(%rsp), %r10d
	movq	16(%rsp), %r8
	leaq	ord(%rip), %rcx
	leaq	hi(%rip), %r9
	jle	.L10
	movl	%esi, (%r12,%rbx,4)
.L10:
	movl	(%r9,%rbx,4), %esi
	jmp	.L8
	.cfi_endproc
.LFE51:
	.size	dfs, .-dfs
	.p2align 4
	.globl	check_ap
	.type	check_ap, @function
check_ap:
.LFB52:
	.cfi_startproc
	endbr64
	movl	$0, cnt(%rip)
	testl	%edi, %edi
	jle	.L37
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	mk(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	1(%r12), %rax
	leal	-1(%rdi), %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	addq	%rax, %rbp
	movq	%r12, %rbx
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L33:
	addq	$1, %rbx
	cmpq	%rbp, %rbx
	je	.L40
.L34:
	movl	%ebx, %edi
	subl	%r12d, %edi
	cmpb	$0, (%rbx)
	jne	.L33
	movl	$-1, %esi
	addq	$1, %rbx
	call	dfs
	cmpq	%rbp, %rbx
	jne	.L34
.L40:
	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
.L37:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	ret
	.cfi_endproc
.LFE52:
	.size	check_ap, .-check_ap
	.p2align 4
	.globl	in
	.type	in, @function
in:
.LFB53:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L50
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L43:
	xorl	%r12d, %r12d
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L44:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L41
.L45:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L47:
	leal	(%r12,%r12,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r12d
	cmpq	%rcx, %rdx
	jb	.L44
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L41
	movq	stdin(%rip), %rdi
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L41:
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L50:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L43
	.cfi_endproc
.LFE53:
	.size	in, .-in
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	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
	call	in
	movl	%eax, %ebp
	xorl	%eax, %eax
	call	in
	leal	0(,%rax,8), %edi
	movl	%eax, 24(%rsp)
	movl	%eax, %ebx
	movslq	%edi, %rdi
	call	malloc@PLT
	movq	%rax, 8(%rsp)
	testl	%ebx, %ebx
	jle	.L52
	movq	%rax, %rcx
	movq	%rax, %r15
	leal	-1(%rbx), %eax
	addq	$8, %rcx
	movl	%eax, 28(%rsp)
	leaq	hi(%rip), %r14
	movq	%rcx, 16(%rsp)
	leaq	(%rcx,%rax,8), %r12
	.p2align 4,,10
	.p2align 3
.L65:
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rax
	movq	16(%rdi), %r9
	cmpq	%r9, %rax
	jnb	.L93
	leaq	1(%rax), %rsi
	movq	%rsi, 8(%rdi)
	movzbl	(%rax), %eax
.L54:
	xorl	%r13d, %r13d
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L55:
	leaq	1(%rsi), %r11
	movq	%r11, 8(%rdi)
	movzbl	(%rsi), %eax
	cmpl	$47, %eax
	jle	.L57
.L56:
	movq	%r11, %rsi
.L58:
	leal	0(%r13,%r13,4), %edx
	andl	$15, %eax
	leal	(%rax,%rdx,2), %r13d
	cmpq	%r9, %rsi
	jb	.L55
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %r11
	movq	16(%rdi), %r9
	cmpl	$47, %eax
	jg	.L56
	.p2align 4,,10
	.p2align 3
.L57:
	movl	%r13d, (%r15)
	cmpq	%r9, %r11
	jnb	.L94
	leaq	1(%r11), %r10
	movq	%r10, 8(%rdi)
	movzbl	(%r11), %eax
.L60:
	xorl	%ebx, %ebx
	jmp	.L64
	.p2align 4,,10
	.p2align 3
.L61:
	leaq	1(%r10), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%r10), %eax
	cmpl	$47, %eax
	jle	.L63
.L62:
	movq	8(%rdi), %r10
	movq	16(%rdi), %r9
.L64:
	leal	(%rbx,%rbx,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %ebx
	cmpq	%r9, %r10
	jb	.L61
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L63
	movq	stdin(%rip), %rdi
	jmp	.L62
	.p2align 4,,10
	.p2align 3
.L63:
	movl	%ebx, 4(%r15)
	movslq	%r13d, %rdx
	movslq	%ebx, %rsi
	addq	$8, %r15
	addl	$1, (%r14,%rdx,4)
	addl	$1, (%r14,%rsi,4)
	cmpq	%r15, %r12
	jne	.L65
	testl	%ebp, %ebp
	jle	.L95
.L67:
	xorl	%r15d, %r15d
	leaq	to(%rip), %r12
	jmp	.L71
	.p2align 4,,10
	.p2align 3
.L70:
	addq	$1, %r15
	cmpl	%r15d, %ebp
	jle	.L72
.L71:
	movl	(%r14,%r15,4), %eax
	testl	%eax, %eax
	je	.L70
	sall	$2, %eax
	movslq	%eax, %rdi
	call	malloc@PLT
	movq	%rax, (%r12,%r15,8)
	addq	$1, %r15
	cmpl	%r15d, %ebp
	jg	.L71
.L72:
	leal	0(,%rbp,4), %edx
	movl	$400008, %ecx
	xorl	%esi, %esi
	movq	%r14, %rdi
	movslq	%edx, %rdx
	call	__memset_chk@PLT
	movq	8(%rsp), %rax
	movl	24(%rsp), %edx
	addq	$8, %rax
	movq	%rax, 16(%rsp)
	testl	%edx, %edx
	je	.L69
.L68:
	movl	28(%rsp), %eax
	movq	16(%rsp), %rcx
	leaq	to(%rip), %rdi
	movq	8(%rsp), %rbx
	leaq	(%rcx,%rax,8), %r10
	.p2align 4,,10
	.p2align 3
.L75:
	movslq	(%rbx), %rcx
	movslq	4(%rbx), %rax
	addq	$8, %rbx
	movslq	(%r14,%rcx,4), %rdx
	movq	(%rdi,%rcx,8), %r9
	movq	%rcx, %rsi
	leal	1(%rdx), %r11d
	movl	%r11d, (%r14,%rcx,4)
	movq	(%rdi,%rax,8), %rcx
	movl	%eax, (%r9,%rdx,4)
	movslq	(%r14,%rax,4), %rdx
	leal	1(%rdx), %r9d
	movl	%r9d, (%r14,%rax,4)
	movl	%esi, (%rcx,%rdx,4)
	cmpq	%rbx, %r10
	jne	.L75
.L69:
	movl	%ebp, %edi
	leaq	ap(%rip), %rbp
	xorl	%ebx, %ebx
	call	check_ap
	movslq	sz(%rip), %rsi
	movl	$4, %edx
	movq	%rbp, %rdi
	leaq	cmp(%rip), %rcx
	leaq	.LC0(%rip), %r12
	call	qsort@PLT
	movl	sz(%rip), %eax
	testl	%eax, %eax
	jle	.L90
	.p2align 4,,10
	.p2align 3
.L73:
	movl	0(%rbp,%rbx,4), %edx
	xorl	%eax, %eax
	movq	%r12, %rsi
	movl	$1, %edi
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, sz(%rip)
	jg	.L73
.L90:
	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
	.p2align 4,,10
	.p2align 3
.L94:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %r10
	movq	16(%rdi), %r9
	jmp	.L60
	.p2align 4,,10
	.p2align 3
.L93:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rsi
	movq	16(%rdi), %r9
	jmp	.L54
.L52:
	movl	24(%rsp), %eax
	leaq	hi(%rip), %r14
	subl	$1, %eax
	movl	%eax, 28(%rsp)
	testl	%ebp, %ebp
	jg	.L67
	jmp	.L72
.L95:
	leal	0(,%rbp,4), %edx
	movl	$400008, %ecx
	xorl	%esi, %esi
	movq	%r14, %rdi
	movslq	%edx, %rdx
	call	__memset_chk@PLT
	jmp	.L68
	.cfi_endproc
.LFE55:
	.size	main, .-main
	.globl	mk
	.bss
	.align 32
	.type	mk, @object
	.size	mk, 100002
mk:
	.zero	100002
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	ap
	.align 32
	.type	ap, @object
	.size	ap, 400008
ap:
	.zero	400008
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	ord
	.align 32
	.type	ord, @object
	.size	ord, 400008
ord:
	.zero	400008
	.globl	low
	.align 32
	.type	low, @object
	.size	low, 400008
low:
	.zero	400008
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 800016
to:
	.zero	800016
	.globl	hi
	.align 32
	.type	hi, @object
	.size	hi, 400008
hi:
	.zero	400008
	.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	cmp
	.type	cmp, @function
cmp:
.LFB54:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE54:
	.size	cmp, .-cmp
	.p2align 4
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	hi(%rip), %r9
	leaq	mk(%rip), %rdx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%esi, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	low(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movslq	%edi, %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movl	cnt(%rip), %esi
	movb	$1, (%rdx,%rbx)
	leal	1(%rsi), %ecx
	movl	%esi, (%r12,%rbx,4)
	movl	%ecx, cnt(%rip)
	leaq	ord(%rip), %rcx
	movl	%esi, (%rcx,%rbx,4)
	movl	(%r9,%rbx,4), %esi
	testl	%esi, %esi
	jle	.L3
	movq	%rbx, %r15
	xorl	%ebp, %ebp
	xorl	%r11d, %r11d
	xorl	%r10d, %r10d
	leaq	to(%rip), %r8
	cmpl	$-1, %r14d
	je	.L29
.L6:
	movq	(%r8,%rbx,8), %rdi
	movslq	(%rdi,%rbp,4), %r13
	cmpb	$0, (%rdx,%r13)
	movq	%r13, %rdi
	je	.L30
	cmpl	%r13d, %r14d
	je	.L15
	movl	(%rcx,%r13,4), %edi
	cmpl	%edi, (%r12,%rbx,4)
	jle	.L15
	movl	%edi, (%r12,%rbx,4)
	movl	(%r9,%rbx,4), %esi
.L15:
	addq	$1, %rbp
	cmpl	%ebp, %esi
	jg	.L6
.L12:
	cmpl	$-1, %r14d
	sete	%cl
	cmpl	$1, %r10d
	setg	%dl
	testb	%dl, %cl
	jne	.L19
	andl	$1, %r11d
	je	.L3
.L19:
	movslq	sz(%rip), %rdx
	leal	1(%rdx), %ecx
	movl	%ecx, sz(%rip)
	leaq	ap(%rip), %rcx
	movl	%r15d, (%rcx,%rdx,4)
.L3:
	addq	$40, %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
.L30:
	.cfi_restore_state
	addl	$1, %r10d
	movl	%r15d, %esi
	movq	%r8, 24(%rsp)
	movl	%r11d, 16(%rsp)
	movl	%r10d, 12(%rsp)
	call	dfs
	movl	(%r12,%r13,4), %esi
	cmpl	%esi, (%r12,%rbx,4)
	leaq	mk(%rip), %rdx
	movl	12(%rsp), %r10d
	movl	16(%rsp), %r11d
	leaq	ord(%rip), %rcx
	leaq	hi(%rip), %r9
	movq	24(%rsp), %r8
	jle	.L14
	movl	%esi, (%r12,%rbx,4)
.L14:
	movl	(%r12,%r13,4), %eax
	cmpl	%eax, (%rcx,%rbx,4)
	movl	$1, %eax
	movl	(%r9,%rbx,4), %esi
	cmovle	%eax, %r11d
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L29:
	xorl	%r10d, %r10d
	leaq	to(%rip), %r8
.L11:
	movq	(%r8,%rbx,8), %rdi
	movslq	(%rdi,%rbp,4), %r13
	cmpb	$0, (%rdx,%r13)
	movq	%r13, %rdi
	je	.L7
	cmpl	$-1, %r13d
	je	.L8
	movl	(%rcx,%r13,4), %edi
	cmpl	%edi, (%r12,%rbx,4)
	jle	.L8
	movl	%edi, (%r12,%rbx,4)
	movl	(%r9,%rbx,4), %esi
.L8:
	addq	$1, %rbp
	cmpl	%ebp, %esi
	jg	.L11
	xorl	%r11d, %r11d
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, %r10d
	movl	%r15d, %esi
	movq	%r8, 16(%rsp)
	movl	%r10d, 12(%rsp)
	call	dfs
	movl	(%r12,%r13,4), %esi
	cmpl	%esi, (%r12,%rbx,4)
	leaq	mk(%rip), %rdx
	movl	12(%rsp), %r10d
	movq	16(%rsp), %r8
	leaq	ord(%rip), %rcx
	leaq	hi(%rip), %r9
	jle	.L10
	movl	%esi, (%r12,%rbx,4)
.L10:
	movl	(%r9,%rbx,4), %esi
	jmp	.L8
	.cfi_endproc
.LFE51:
	.size	dfs, .-dfs
	.p2align 4
	.globl	check_ap
	.type	check_ap, @function
check_ap:
.LFB52:
	.cfi_startproc
	endbr64
	movl	$0, cnt(%rip)
	testl	%edi, %edi
	jle	.L37
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	mk(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	1(%r12), %rax
	leal	-1(%rdi), %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	addq	%rax, %rbp
	movq	%r12, %rbx
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L33:
	addq	$1, %rbx
	cmpq	%rbp, %rbx
	je	.L40
.L34:
	movl	%ebx, %edi
	subl	%r12d, %edi
	cmpb	$0, (%rbx)
	jne	.L33
	movl	$-1, %esi
	addq	$1, %rbx
	call	dfs
	cmpq	%rbp, %rbx
	jne	.L34
.L40:
	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
.L37:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	ret
	.cfi_endproc
.LFE52:
	.size	check_ap, .-check_ap
	.p2align 4
	.globl	in
	.type	in, @function
in:
.LFB53:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L50
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L43:
	xorl	%r12d, %r12d
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L44:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L41
.L45:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L47:
	leal	(%r12,%r12,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r12d
	cmpq	%rcx, %rdx
	jb	.L44
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L41
	movq	stdin(%rip), %rdi
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L41:
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L50:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L43
	.cfi_endproc
.LFE53:
	.size	in, .-in
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	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
	call	in
	movl	%eax, %ebp
	xorl	%eax, %eax
	call	in
	leal	0(,%rax,8), %edi
	movl	%eax, 24(%rsp)
	movl	%eax, %ebx
	movslq	%edi, %rdi
	call	malloc@PLT
	movq	%rax, 8(%rsp)
	testl	%ebx, %ebx
	jle	.L52
	movq	%rax, %rcx
	movq	%rax, %r15
	leal	-1(%rbx), %eax
	addq	$8, %rcx
	movl	%eax, 28(%rsp)
	leaq	hi(%rip), %r14
	movq	%rcx, 16(%rsp)
	leaq	(%rcx,%rax,8), %r12
	.p2align 4,,10
	.p2align 3
.L65:
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rax
	movq	16(%rdi), %r9
	cmpq	%r9, %rax
	jnb	.L93
	leaq	1(%rax), %rsi
	movq	%rsi, 8(%rdi)
	movzbl	(%rax), %eax
.L54:
	xorl	%r13d, %r13d
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L55:
	leaq	1(%rsi), %r11
	movq	%r11, 8(%rdi)
	movzbl	(%rsi), %eax
	cmpl	$47, %eax
	jle	.L57
.L56:
	movq	%r11, %rsi
.L58:
	leal	0(%r13,%r13,4), %edx
	andl	$15, %eax
	leal	(%rax,%rdx,2), %r13d
	cmpq	%r9, %rsi
	jb	.L55
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %r11
	movq	16(%rdi), %r9
	cmpl	$47, %eax
	jg	.L56
	.p2align 4,,10
	.p2align 3
.L57:
	movl	%r13d, (%r15)
	cmpq	%r9, %r11
	jnb	.L94
	leaq	1(%r11), %r10
	movq	%r10, 8(%rdi)
	movzbl	(%r11), %eax
.L60:
	xorl	%ebx, %ebx
	jmp	.L64
	.p2align 4,,10
	.p2align 3
.L61:
	leaq	1(%r10), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%r10), %eax
	cmpl	$47, %eax
	jle	.L63
.L62:
	movq	8(%rdi), %r10
	movq	16(%rdi), %r9
.L64:
	leal	(%rbx,%rbx,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %ebx
	cmpq	%r9, %r10
	jb	.L61
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L63
	movq	stdin(%rip), %rdi
	jmp	.L62
	.p2align 4,,10
	.p2align 3
.L63:
	movl	%ebx, 4(%r15)
	movslq	%r13d, %rdx
	movslq	%ebx, %rsi
	addq	$8, %r15
	addl	$1, (%r14,%rdx,4)
	addl	$1, (%r14,%rsi,4)
	cmpq	%r15, %r12
	jne	.L65
	testl	%ebp, %ebp
	jle	.L95
.L67:
	xorl	%r15d, %r15d
	leaq	to(%rip), %r12
	jmp	.L71
	.p2align 4,,10
	.p2align 3
.L70:
	addq	$1, %r15
	cmpl	%r15d, %ebp
	jle	.L72
.L71:
	movl	(%r14,%r15,4), %eax
	testl	%eax, %eax
	je	.L70
	sall	$2, %eax
	movslq	%eax, %rdi
	call	malloc@PLT
	movq	%rax, (%r12,%r15,8)
	addq	$1, %r15
	cmpl	%r15d, %ebp
	jg	.L71
.L72:
	leal	0(,%rbp,4), %edx
	movl	$400008, %ecx
	xorl	%esi, %esi
	movq	%r14, %rdi
	movslq	%edx, %rdx
	call	__memset_chk@PLT
	movq	8(%rsp), %rax
	movl	24(%rsp), %edx
	addq	$8, %rax
	movq	%rax, 16(%rsp)
	testl	%edx, %edx
	je	.L69
.L68:
	movl	28(%rsp), %eax
	movq	16(%rsp), %rcx
	leaq	to(%rip), %rdi
	movq	8(%rsp), %rbx
	leaq	(%rcx,%rax,8), %r10
	.p2align 4,,10
	.p2align 3
.L75:
	movslq	(%rbx), %rcx
	movslq	4(%rbx), %rax
	addq	$8, %rbx
	movslq	(%r14,%rcx,4), %rdx
	movq	(%rdi,%rcx,8), %r9
	movq	%rcx, %rsi
	leal	1(%rdx), %r11d
	movl	%r11d, (%r14,%rcx,4)
	movq	(%rdi,%rax,8), %rcx
	movl	%eax, (%r9,%rdx,4)
	movslq	(%r14,%rax,4), %rdx
	leal	1(%rdx), %r9d
	movl	%r9d, (%r14,%rax,4)
	movl	%esi, (%rcx,%rdx,4)
	cmpq	%rbx, %r10
	jne	.L75
.L69:
	movl	%ebp, %edi
	leaq	ap(%rip), %rbp
	xorl	%ebx, %ebx
	call	check_ap
	movslq	sz(%rip), %rsi
	movl	$4, %edx
	movq	%rbp, %rdi
	leaq	cmp(%rip), %rcx
	leaq	.LC0(%rip), %r12
	call	qsort@PLT
	movl	sz(%rip), %eax
	testl	%eax, %eax
	jle	.L90
	.p2align 4,,10
	.p2align 3
.L73:
	movl	0(%rbp,%rbx,4), %edx
	xorl	%eax, %eax
	movq	%r12, %rsi
	movl	$1, %edi
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, sz(%rip)
	jg	.L73
.L90:
	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
	.p2align 4,,10
	.p2align 3
.L94:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %r10
	movq	16(%rdi), %r9
	jmp	.L60
	.p2align 4,,10
	.p2align 3
.L93:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rsi
	movq	16(%rdi), %r9
	jmp	.L54
.L52:
	movl	24(%rsp), %eax
	leaq	hi(%rip), %r14
	subl	$1, %eax
	movl	%eax, 28(%rsp)
	testl	%ebp, %ebp
	jg	.L67
	jmp	.L72
.L95:
	leal	0(,%rbp,4), %edx
	movl	$400008, %ecx
	xorl	%esi, %esi
	movq	%r14, %rdi
	movslq	%edx, %rdx
	call	__memset_chk@PLT
	jmp	.L68
	.cfi_endproc
.LFE55:
	.size	main, .-main
	.globl	mk
	.bss
	.align 32
	.type	mk, @object
	.size	mk, 100002
mk:
	.zero	100002
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	ap
	.align 32
	.type	ap, @object
	.size	ap, 400008
ap:
	.zero	400008
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	ord
	.align 32
	.type	ord, @object
	.size	ord, 400008
ord:
	.zero	400008
	.globl	low
	.align 32
	.type	low, @object
	.size	low, 400008
low:
	.zero	400008
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 800016
to:
	.zero	800016
	.globl	hi
	.align 32
	.type	hi, @object
	.size	hi, 400008
hi:
	.zero	400008
	.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:

// AOJ GRL_3_A Articulation Points
// 2018.5.7 bal4u
// https://everysick.hatenablog.com/entry/2016/06/13/120033 を参考にした
 
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
 
#define MAX_V 100002
#define MAX_E 100002

int  hi[MAX_V], *to[MAX_V];
int  low[MAX_V], ord[MAX_V];
int  cnt;
int  ap[MAX_V], sz;      // Articulation Point 関節点
char mk[MAX_V];

void dfs(int cur, int from)
{
	int i, e, t, ct;
	int is_ap;
	
	mk[cur] = 1;
	low[cur] = ord[cur] = cnt++;
	is_ap = 0;
	ct = 0;

	for (i = 0; i < hi[cur]; i++) {
		e = to[cur][i];
		if (!mk[e]) {
			ct++;
			dfs(e, cur);
			t = low[e];
			if (t < low[cur]) low[cur] = t;
			if (~from && ord[cur] <= low[e]) is_ap = 1;
		} else if (from != e) {
			t = ord[e];
			if (t < low[cur]) low[cur] = t;
		}
	}
	if (from == -1 && ct > 1) is_ap = 1;
	if (is_ap) ap[sz++] = cur;
} 

void check_ap(int V)
{
	int i;
	cnt = 0;
	for (i = 0; i < V; i++) {
		if (!mk[i]) dfs(i, -1);
	}
}

#if 1
#define gc() getchar_unlocked()
#else
#define gc() getchar()
#endif

int in()
{
	int n = 0, c = gc();
	do n = 10*n + (c & 0xf), c = gc(); while (c >= '0');
	return n;
}

int cmp(int *a, int *b) { return *a - *b; }

int main()
{
    int E, V, s, t, i, j;
    int *memo;
 
    V = in(), E = in();
    memo = malloc(E<<3);
    j = 0; for (i = 0; i < E; i++) {
        memo[j++] = s = in(), memo[j++] = t = in();
        hi[s]++, hi[t]++;
     }
    for (i = 0; i < V; i++) {
        if (hi[i]) to[i] = malloc(hi[i]<<2);
    }
    memset(hi, 0, V<<2);
 
    j = 0; while (E--) {
        s = memo[j++], t = memo[j++];
		to[s][hi[s]++] = t, to[t][hi[t]++] = s;
    }
 
    check_ap(V);
 	qsort(ap, sz, sizeof(int), cmp);

	for (i = 0; i < sz; i++) printf("%d\n", ap[i]);
    return 0;
}

5 4
0 1
1 2
2 3
3 2

1
2

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

```c
// AOJ GRL_3_A Articulation Points
// 2018.5.7 bal4u
// https://everysick.hatenablog.com/entry/2016/06/13/120033 を参考にした
 
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
 
#define MAX_V 100002
#define MAX_E 100002

int  hi[MAX_V], *to[MAX_V];
int  low[MAX_V], ord[MAX_V];
int  cnt;
int  ap[MAX_V], sz;      // Articulation Point 関節点
char mk[MAX_V];

void dfs(int cur, int from)
{
	int i, e, t, ct;
	int is_ap;
	
	mk[cur] = 1;
	low[cur] = ord[cur] = cnt++;
	is_ap = 0;
	ct = 0;

	for (i = 0; i < hi[cur]; i++) {
		e = to[cur][i];
		if (!mk[e]) {
			ct++;
			dfs(e, cur);
			t = low[e];
			if (t < low[cur]) low[cur] = t;
			if (~from && ord[cur] <= low[e]) is_ap = 1;
		} else if (from != e) {
			t = ord[e];
			if (t < low[cur]) low[cur] = t;
		}
	}
	if (from == -1 && ct > 1) is_ap = 1;
	if (is_ap) ap[sz++] = cur;
} 

void check_ap(int V)
{
	int i;
	cnt = 0;
	for (i = 0; i < V; i++) {
		if (!mk[i]) dfs(i, -1);
	}
}

#if 1
#define gc() getchar_unlocked()
#else
#define gc() getchar()
#endif

int in()
{
	int n = 0, c = gc();
	do n = 10*n + (c & 0xf), c = gc(); while (c >= '0');
	return n;
}

int cmp(int *a, int *b) { return *a - *b; }

int main()
{
    int E, V, s, t, i, j;
    int *memo;
 
    V = in(), E = in();
    memo = malloc(E<<3);
    j = 0; for (i = 0; i < E; i++) {
        memo[j++] = s = in(), memo[j++] = t = in();
        hi[s]++, hi[t]++;
     }
    for (i = 0; i < V; i++) {
        if (hi[i]) to[i] = malloc(hi[i]<<2);
    }
    memset(hi, 0, V<<2);
 
    j = 0; while (E--) {
        s = memo[j++], t = memo[j++];
		to[s][hi[s]++] = t, to[t][hi[t]++] = s;
    }
 
    check_ap(V);
 	qsort(ap, sz, sizeof(int), cmp);

	for (i = 0; i < sz; i++) printf("%d\n", ap[i]);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	hi
	.bss
	.align 32
	.type	hi, @object
	.size	hi, 400008
hi:
	.zero	400008
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 800016
to:
	.zero	800016
	.globl	low
	.align 32
	.type	low, @object
	.size	low, 400008
low:
	.zero	400008
	.globl	ord
	.align 32
	.type	ord, @object
	.size	ord, 400008
ord:
	.zero	400008
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	ap
	.align 32
	.type	ap, @object
	.size	ap, 400008
ap:
	.zero	400008
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	mk
	.align 32
	.type	mk, @object
	.size	mk, 100002
mk:
	.zero	100002
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -36(%rbp)
	movl	%esi, -40(%rbp)
	movl	-36(%rbp), %eax
	cltq
	leaq	mk(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	cnt(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, cnt(%rip)
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	ord(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ord(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	low(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$0, -12(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L2
.L6:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	to(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	mk(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L3
	addl	$1, -16(%rbp)
	movl	-36(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	dfs
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	low(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	low(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jge	.L4
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	low(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L4:
	cmpl	$-1, -40(%rbp)
	je	.L5
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ord(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	low(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L5
	movl	$1, -12(%rbp)
	jmp	.L5
.L3:
	movl	-40(%rbp), %eax
	cmpl	-8(%rbp), %eax
	je	.L5
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ord(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	low(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jge	.L5
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	low(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L5:
	addl	$1, -20(%rbp)
.L2:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L6
	cmpl	$-1, -40(%rbp)
	jne	.L7
	cmpl	$1, -16(%rbp)
	jle	.L7
	movl	$1, -12(%rbp)
.L7:
	cmpl	$0, -12(%rbp)
	je	.L9
	movl	sz(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sz(%rip)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	ap(%rip), %rdx
	movl	-36(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L9:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dfs, .-dfs
	.globl	check_ap
	.type	check_ap, @function
check_ap:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	$0, cnt(%rip)
	movl	$0, -4(%rbp)
	jmp	.L11
.L13:
	movl	-4(%rbp), %eax
	cltq
	leaq	mk(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L12
	movl	-4(%rbp), %eax
	movl	$-1, %esi
	movl	%eax, %edi
	call	dfs
.L12:
	addl	$1, -4(%rbp)
.L11:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L13
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	check_ap, .-check_ap
	.globl	in
	.type	in, @function
in:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	call	getchar_unlocked@PLT
	movl	%eax, -4(%rbp)
.L15:
	movl	-8(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	andl	$15, %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	call	getchar_unlocked@PLT
	movl	%eax, -4(%rbp)
	cmpl	$47, -4(%rbp)
	jg	.L15
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	in, .-in
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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
	movl	$0, %eax
	call	in
	movl	%eax, -20(%rbp)
	movl	$0, %eax
	call	in
	movl	%eax, -32(%rbp)
	movl	-32(%rbp), %eax
	sall	$3, %eax
	cltq
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movl	$0, -24(%rbp)
	movl	$0, -28(%rbp)
	jmp	.L20
.L21:
	movl	$0, %eax
	call	in
	movl	%eax, -16(%rbp)
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -24(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-8(%rbp), %rax
	addq	%rax, %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rdx)
	movl	$0, %eax
	call	in
	movl	%eax, -12(%rbp)
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -24(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-8(%rbp), %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -28(%rbp)
.L20:
	movl	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jl	.L21
	movl	$0, -28(%rbp)
	jmp	.L22
.L24:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L23
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	sall	$2, %eax
	cltq
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, %rcx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	to(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L23:
	addl	$1, -28(%rbp)
.L22:
	movl	-28(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L24
	movl	-20(%rbp), %eax
	sall	$2, %eax
	cltq
	movq	%rax, %rdx
	movl	$0, %esi
	leaq	hi(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -24(%rbp)
	jmp	.L25
.L26:
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -24(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -16(%rbp)
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -24(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	to(%rip), %rax
	movq	(%rdx,%rax), %rdi
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %edx
	movl	-16(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	hi(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	salq	$2, %rax
	leaq	(%rdi,%rax), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	to(%rip), %rax
	movq	(%rdx,%rax), %rdi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %edx
	movl	-12(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	hi(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	salq	$2, %rax
	leaq	(%rdi,%rax), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rdx)
.L25:
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -32(%rbp)
	testl	%eax, %eax
	jne	.L26
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	check_ap
	movl	sz(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	ap(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -28(%rbp)
	jmp	.L27
.L28:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ap(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -28(%rbp)
.L27:
	movl	sz(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L28
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	hi
	.bss
	.align 32
	.type	hi, @object
	.size	hi, 400008
hi:
	.zero	400008
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 800016
to:
	.zero	800016
	.globl	low
	.align 32
	.type	low, @object
	.size	low, 400008
low:
	.zero	400008
	.globl	ord
	.align 32
	.type	ord, @object
	.size	ord, 400008
ord:
	.zero	400008
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	ap
	.align 32
	.type	ap, @object
	.size	ap, 400008
ap:
	.zero	400008
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	mk
	.align 32
	.type	mk, @object
	.size	mk, 100002
mk:
	.zero	100002
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -36(%rbp)
	movl	%esi, -40(%rbp)
	movl	-36(%rbp), %eax
	cltq
	leaq	mk(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	cnt(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, cnt(%rip)
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	ord(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ord(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	low(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$0, -12(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L2
.L6:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	to(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	mk(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L3
	addl	$1, -16(%rbp)
	movl	-36(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	dfs
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	low(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	low(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jge	.L4
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	low(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L4:
	cmpl	$-1, -40(%rbp)
	je	.L5
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ord(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	low(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L5
	movl	$1, -12(%rbp)
	jmp	.L5
.L3:
	movl	-40(%rbp), %eax
	cmpl	-8(%rbp), %eax
	je	.L5
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ord(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	low(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jge	.L5
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	low(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L5:
	addl	$1, -20(%rbp)
.L2:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L6
	cmpl	$-1, -40(%rbp)
	jne	.L7
	cmpl	$1, -16(%rbp)
	jle	.L7
	movl	$1, -12(%rbp)
.L7:
	cmpl	$0, -12(%rbp)
	je	.L9
	movl	sz(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sz(%rip)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	ap(%rip), %rdx
	movl	-36(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L9:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dfs, .-dfs
	.globl	check_ap
	.type	check_ap, @function
check_ap:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	$0, cnt(%rip)
	movl	$0, -4(%rbp)
	jmp	.L11
.L13:
	movl	-4(%rbp), %eax
	cltq
	leaq	mk(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L12
	movl	-4(%rbp), %eax
	movl	$-1, %esi
	movl	%eax, %edi
	call	dfs
.L12:
	addl	$1, -4(%rbp)
.L11:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L13
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	check_ap, .-check_ap
	.globl	in
	.type	in, @function
in:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	call	getchar_unlocked@PLT
	movl	%eax, -4(%rbp)
.L15:
	movl	-8(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	andl	$15, %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	call	getchar_unlocked@PLT
	movl	%eax, -4(%rbp)
	cmpl	$47, -4(%rbp)
	jg	.L15
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	in, .-in
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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
	movl	$0, %eax
	call	in
	movl	%eax, -20(%rbp)
	movl	$0, %eax
	call	in
	movl	%eax, -32(%rbp)
	movl	-32(%rbp), %eax
	sall	$3, %eax
	cltq
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movl	$0, -24(%rbp)
	movl	$0, -28(%rbp)
	jmp	.L20
.L21:
	movl	$0, %eax
	call	in
	movl	%eax, -16(%rbp)
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -24(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-8(%rbp), %rax
	addq	%rax, %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rdx)
	movl	$0, %eax
	call	in
	movl	%eax, -12(%rbp)
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -24(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-8(%rbp), %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -28(%rbp)
.L20:
	movl	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jl	.L21
	movl	$0, -28(%rbp)
	jmp	.L22
.L24:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L23
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	sall	$2, %eax
	cltq
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, %rcx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	to(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L23:
	addl	$1, -28(%rbp)
.L22:
	movl	-28(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L24
	movl	-20(%rbp), %eax
	sall	$2, %eax
	cltq
	movq	%rax, %rdx
	movl	$0, %esi
	leaq	hi(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -24(%rbp)
	jmp	.L25
.L26:
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -24(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -16(%rbp)
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -24(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	to(%rip), %rax
	movq	(%rdx,%rax), %rdi
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %edx
	movl	-16(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	hi(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	salq	$2, %rax
	leaq	(%rdi,%rax), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	to(%rip), %rax
	movq	(%rdx,%rax), %rdi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hi(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %edx
	movl	-12(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	hi(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	salq	$2, %rax
	leaq	(%rdi,%rax), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rdx)
.L25:
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -32(%rbp)
	testl	%eax, %eax
	jne	.L26
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	check_ap
	movl	sz(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	ap(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -28(%rbp)
	jmp	.L27
.L28:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ap(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -28(%rbp)
.L27:
	movl	sz(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L28
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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:
