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

```c
#include<stdio.h>
int N,M;
int a[50];
int l[50];
int r[50];
int ans=0;

void init();
int root(int x);
void unite(int x,int y);
int query(int x,int y);
int judge();

int main(){
	scanf("%d%d",&N,&M);
	
	int i;
	for(i=0;i<M;i++){
		scanf("%d%d",&l[i],&r[i]);
		l[i]--;
		r[i]--;
	}
	
	for(i=0;i<M;i++){
		init();
		
		int j;
		for(j=0;j<M;j++){
			if(j==i)continue;
			unite(l[j],r[j]);
		}
		
		if(judge()==0)ans++;
	}
	
	printf("%d\n",ans);
	return 0;
}

void init(){
	for(int i=0;i<N;i++)a[i]=i;
}

int root(int x){
	if(a[x]==x)return x;
	else return a[x]=root(a[x]);
}

void unite(int x,int y){
	x=root(x);
	y=root(y);
	if(x==y)return;
	a[x]=y;
}

int query(int x,int y){
	if(root(x)==root(y))return 1;
	return 0;
}

int judge(){
	for(int i=0;i<N;i++){
		for(int j=i+1;j<N;j++){
			if(query(i,j)==0)return 0;
		}
	}
	return 1;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 200
a:
	.zero	200
	.globl	l
	.align 32
	.type	l, @object
	.size	l, 200
l:
	.zero	200
	.globl	r
	.align 32
	.type	r, @object
	.size	r, 200
r:
	.zero	200
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	leaq	M(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8(%rbp)
	jmp	.L2
.L3:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	r(%rip), %rax
	addq	%rax, %rdx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	l(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	r(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	r(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L2:
	movl	M(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L3
	movl	$0, -8(%rbp)
	jmp	.L4
.L10:
	movl	$0, %eax
	call	init
	movl	$0, -4(%rbp)
	jmp	.L5
.L8:
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	je	.L12
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	r(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	l(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	unite
	jmp	.L7
.L12:
	nop
.L7:
	addl	$1, -4(%rbp)
.L5:
	movl	M(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L8
	movl	$0, %eax
	call	judge
	testl	%eax, %eax
	jne	.L9
	movl	ans(%rip), %eax
	addl	$1, %eax
	movl	%eax, ans(%rip)
.L9:
	addl	$1, -8(%rbp)
.L4:
	movl	M(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L10
	movl	ans(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	init
	.type	init, @function
init:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -4(%rbp)
	jmp	.L14
.L15:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L14:
	movl	N(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L15
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	init, .-init
	.globl	root
	.type	root, @function
root:
.LFB2:
	.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	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jne	.L17
	movl	-4(%rbp), %eax
	jmp	.L18
.L17:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	root
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	root, .-root
	.globl	unite
	.type	unite, @function
unite:
.LFB3:
	.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	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	root
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, %edi
	call	root
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	je	.L22
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L19
.L22:
	nop
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	unite, .-unite
	.globl	query
	.type	query, @function
query:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	root
	movl	%eax, %ebx
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	root
	cmpl	%eax, %ebx
	jne	.L24
	movl	$1, %eax
	jmp	.L25
.L24:
	movl	$0, %eax
.L25:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	query, .-query
	.globl	judge
	.type	judge, @function
judge:
.LFB5:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	jmp	.L27
.L32:
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L28
.L31:
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	query
	testl	%eax, %eax
	jne	.L29
	movl	$0, %eax
	jmp	.L30
.L29:
	addl	$1, -4(%rbp)
.L28:
	movl	N(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L31
	addl	$1, -8(%rbp)
.L27:
	movl	N(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L32
	movl	$1, %eax
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	judge, .-judge
	.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	init
	.type	init, @function
init:
.LFB24:
	.cfi_startproc
	endbr64
	movl	N(%rip), %eax
	testl	%eax, %eax
	jle	.L1
	leal	-1(%rax), %edx
	cmpl	$2, %edx
	jbe	.L6
	movdqa	.LC0(%rip), %xmm0
	movl	%eax, %edx
	shrl	$2, %edx
	movaps	%xmm0, a(%rip)
	cmpl	$1, %edx
	je	.L4
	movdqa	.LC1(%rip), %xmm0
	movaps	%xmm0, 16+a(%rip)
	cmpl	$2, %edx
	je	.L4
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 32+a(%rip)
	cmpl	$3, %edx
	je	.L4
	movdqa	.LC3(%rip), %xmm0
	movaps	%xmm0, 48+a(%rip)
	cmpl	$4, %edx
	je	.L4
	movdqa	.LC4(%rip), %xmm0
	movaps	%xmm0, 64+a(%rip)
	cmpl	$5, %edx
	je	.L4
	movdqa	.LC5(%rip), %xmm0
	movaps	%xmm0, 80+a(%rip)
	cmpl	$6, %edx
	je	.L4
	movdqa	.LC6(%rip), %xmm0
	movaps	%xmm0, 96+a(%rip)
	cmpl	$7, %edx
	je	.L4
	movdqa	.LC7(%rip), %xmm0
	movaps	%xmm0, 112+a(%rip)
	cmpl	$8, %edx
	je	.L4
	movdqa	.LC8(%rip), %xmm0
	movaps	%xmm0, 128+a(%rip)
	cmpl	$9, %edx
	je	.L4
	movdqa	.LC9(%rip), %xmm0
	movaps	%xmm0, 144+a(%rip)
	cmpl	$10, %edx
	je	.L4
	movdqa	.LC10(%rip), %xmm0
	movaps	%xmm0, 160+a(%rip)
	cmpl	$11, %edx
	je	.L4
	movdqa	.LC11(%rip), %xmm0
	movaps	%xmm0, 176+a(%rip)
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%eax, %edx
	andl	$-4, %edx
	testb	$3, %al
	je	.L41
.L3:
	movslq	%edx, %rcx
	leaq	a(%rip), %rsi
	movl	%edx, (%rsi,%rcx,4)
	leal	1(%rdx), %ecx
	cmpl	%ecx, %eax
	jle	.L1
	movslq	%ecx, %rdi
	addl	$2, %edx
	movl	%ecx, (%rsi,%rdi,4)
	cmpl	%edx, %eax
	jle	.L1
	movslq	%edx, %rax
	movl	%edx, (%rsi,%rax,4)
.L1:
	ret
	.p2align 4,,10
	.p2align 3
.L41:
	ret
.L6:
	xorl	%edx, %edx
	jmp	.L3
	.cfi_endproc
.LFE24:
	.size	init, .-init
	.p2align 4
	.globl	root
	.type	root, @function
root:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movslq	%edi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	a(%rip), %rbx
	movq	%rbp, %rax
	movl	(%rbx,%rbp,4), %edx
	cmpl	%ebp, %edx
	jne	.L49
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L49:
	.cfi_restore_state
	movslq	%edx, %r12
	movl	(%rbx,%r12,4), %eax
	cmpl	%eax, %edx
	je	.L44
	movslq	%eax, %r13
	movl	(%rbx,%r13,4), %edx
	cmpl	%edx, %eax
	jne	.L50
.L45:
	movl	%edx, (%rbx,%r12,4)
	movl	%edx, %eax
.L44:
	movl	%eax, (%rbx,%rbp,4)
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L50:
	.cfi_restore_state
	movslq	%edx, %r14
	movl	(%rbx,%r14,4), %edi
	cmpl	%edi, %edx
	je	.L46
	call	root
	movl	%eax, (%rbx,%r14,4)
	movl	%eax, %edi
.L46:
	movl	%edi, (%rbx,%r13,4)
	movl	%edi, %edx
	jmp	.L45
	.cfi_endproc
.LFE25:
	.size	root, .-root
	.p2align 4
	.globl	unite
	.type	unite, @function
unite:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	a(%rip), %rcx
	movslq	%edi, %r9
	movl	%esi, %r8d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	movslq	(%rcx,%r9,4), %rsi
	cmpl	%esi, %edi
	jne	.L70
	movslq	%r8d, %r9
	movl	(%rcx,%r9,4), %eax
	cmpl	%eax, %r8d
	jne	.L71
.L60:
	cmpl	%esi, %eax
	je	.L51
	movl	%eax, (%rcx,%rsi,4)
.L51:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.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
	.p2align 4,,10
	.p2align 3
.L70:
	.cfi_restore_state
	movslq	%esi, %r10
	movl	(%rcx,%r10,4), %eax
	cmpl	%eax, %esi
	je	.L53
	movslq	%eax, %rsi
	movl	(%rcx,%rsi,4), %edx
	cmpl	%edx, %eax
	jne	.L72
.L54:
	movl	%edx, (%rcx,%r10,4)
	movl	%edx, %eax
.L53:
	movl	%eax, (%rcx,%r9,4)
	movslq	%r8d, %r9
	movslq	%eax, %rsi
	movl	(%rcx,%r9,4), %eax
	cmpl	%eax, %r8d
	je	.L60
.L71:
	movslq	%eax, %r8
	movl	(%rcx,%r8,4), %edx
	cmpl	%edx, %eax
	je	.L61
	movslq	%edx, %r10
	movl	(%rcx,%r10,4), %eax
	cmpl	%eax, %edx
	jne	.L73
.L62:
	movl	%eax, (%rcx,%r8,4)
	movl	%eax, %edx
.L61:
	movl	%edx, (%rcx,%r9,4)
	movl	%edx, %eax
	jmp	.L60
	.p2align 4,,10
	.p2align 3
.L73:
	movslq	%eax, %r11
	movl	(%rcx,%r11,4), %edx
	cmpl	%edx, %eax
	je	.L63
	movslq	%edx, %rbx
	movl	(%rcx,%rbx,4), %eax
	cmpl	%eax, %edx
	jne	.L74
.L64:
	movl	%eax, (%rcx,%r11,4)
	movl	%eax, %edx
.L63:
	movl	%edx, (%rcx,%r10,4)
	movl	%edx, %eax
	jmp	.L62
	.p2align 4,,10
	.p2align 3
.L72:
	movslq	%edx, %r11
	movl	(%rcx,%r11,4), %eax
	cmpl	%eax, %edx
	je	.L55
	movslq	%eax, %rbx
	movl	(%rcx,%rbx,4), %edx
	cmpl	%edx, %eax
	jne	.L75
.L56:
	movl	%edx, (%rcx,%r11,4)
	movl	%edx, %eax
.L55:
	movl	%eax, (%rcx,%rsi,4)
	movl	%eax, %edx
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L75:
	movslq	%edx, %rbp
	movl	(%rcx,%rbp,4), %eax
	cmpl	%eax, %edx
	je	.L57
	movslq	%eax, %r12
	movl	(%rcx,%r12,4), %edx
	cmpl	%edx, %eax
	je	.L58
	movslq	%edx, %r13
	movl	(%rcx,%r13,4), %edi
	cmpl	%edi, %edx
	je	.L59
	call	root
	movl	%eax, (%rcx,%r13,4)
	movl	%eax, %edi
.L59:
	movl	%edi, (%rcx,%r12,4)
	movl	%edi, %edx
.L58:
	movl	%edx, (%rcx,%rbp,4)
	movl	%edx, %eax
.L57:
	movl	%eax, (%rcx,%rbx,4)
	movl	%eax, %edx
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L74:
	movslq	%eax, %rbp
	movl	(%rcx,%rbp,4), %edx
	cmpl	%edx, %eax
	je	.L65
	movslq	%edx, %r12
	movl	(%rcx,%r12,4), %edi
	cmpl	%edi, %edx
	je	.L66
	movslq	%edi, %r13
	movl	(%rcx,%r13,4), %eax
	cmpl	%eax, %edi
	je	.L67
	movl	%eax, %edi
	call	root
	movl	%eax, (%rcx,%r13,4)
.L67:
	movl	%eax, (%rcx,%r12,4)
	movl	%eax, %edi
.L66:
	movl	%edi, (%rcx,%rbp,4)
	movl	%edi, %edx
.L65:
	movl	%edx, (%rcx,%rbx,4)
	movl	%edx, %eax
	jmp	.L64
	.cfi_endproc
.LFE26:
	.size	unite, .-unite
	.p2align 4
	.globl	query
	.type	query, @function
query:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	a(%rip), %rcx
	movslq	%edi, %r8
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	movl	(%rcx,%r8,4), %r9d
	cmpl	%r9d, %edi
	jne	.L94
	movslq	%esi, %r8
	movl	(%rcx,%r8,4), %eax
	cmpl	%eax, %esi
	jne	.L95
.L85:
	cmpl	%r9d, %eax
	sete	%al
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	movzbl	%al, %eax
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L94:
	.cfi_restore_state
	movslq	%r9d, %r10
	movl	(%rcx,%r10,4), %eax
	cmpl	%eax, %r9d
	je	.L78
	movslq	%eax, %r9
	movl	(%rcx,%r9,4), %edx
	cmpl	%edx, %eax
	jne	.L96
.L79:
	movl	%edx, (%rcx,%r10,4)
	movl	%edx, %eax
.L78:
	movl	%eax, (%rcx,%r8,4)
	movslq	%esi, %r8
	movl	%eax, %r9d
	movl	(%rcx,%r8,4), %eax
	cmpl	%eax, %esi
	je	.L85
.L95:
	movslq	%eax, %rsi
	movl	(%rcx,%rsi,4), %edx
	cmpl	%edx, %eax
	je	.L86
	movslq	%edx, %r10
	movl	(%rcx,%r10,4), %eax
	cmpl	%eax, %edx
	jne	.L97
.L87:
	movl	%eax, (%rcx,%rsi,4)
	movl	%eax, %edx
.L86:
	movl	%edx, (%rcx,%r8,4)
	movl	%edx, %eax
	jmp	.L85
	.p2align 4,,10
	.p2align 3
.L97:
	movslq	%eax, %r11
	movl	(%rcx,%r11,4), %edx
	cmpl	%edx, %eax
	je	.L88
	movslq	%edx, %rbx
	movl	(%rcx,%rbx,4), %eax
	cmpl	%eax, %edx
	jne	.L98
.L89:
	movl	%eax, (%rcx,%r11,4)
	movl	%eax, %edx
.L88:
	movl	%edx, (%rcx,%r10,4)
	movl	%edx, %eax
	jmp	.L87
	.p2align 4,,10
	.p2align 3
.L96:
	movslq	%edx, %r11
	movl	(%rcx,%r11,4), %eax
	cmpl	%eax, %edx
	je	.L80
	movslq	%eax, %rbx
	movl	(%rcx,%rbx,4), %edx
	cmpl	%edx, %eax
	jne	.L99
.L81:
	movl	%edx, (%rcx,%r11,4)
	movl	%edx, %eax
.L80:
	movl	%eax, (%rcx,%r9,4)
	movl	%eax, %edx
	jmp	.L79
	.p2align 4,,10
	.p2align 3
.L99:
	movslq	%edx, %rbp
	movl	(%rcx,%rbp,4), %eax
	cmpl	%eax, %edx
	je	.L82
	movslq	%eax, %r12
	movl	(%rcx,%r12,4), %edx
	cmpl	%edx, %eax
	je	.L83
	movslq	%edx, %r13
	movl	(%rcx,%r13,4), %edi
	cmpl	%edi, %edx
	je	.L84
	call	root
	movl	%eax, (%rcx,%r13,4)
	movl	%eax, %edi
.L84:
	movl	%edi, (%rcx,%r12,4)
	movl	%edi, %edx
.L83:
	movl	%edx, (%rcx,%rbp,4)
	movl	%edx, %eax
.L82:
	movl	%eax, (%rcx,%rbx,4)
	movl	%eax, %edx
	jmp	.L81
	.p2align 4,,10
	.p2align 3
.L98:
	movslq	%eax, %rbp
	movl	(%rcx,%rbp,4), %edx
	cmpl	%edx, %eax
	je	.L90
	movslq	%edx, %r12
	movl	(%rcx,%r12,4), %edi
	cmpl	%edi, %edx
	je	.L91
	movslq	%edi, %r13
	movl	(%rcx,%r13,4), %eax
	cmpl	%eax, %edi
	je	.L92
	movl	%eax, %edi
	call	root
	movl	%eax, (%rcx,%r13,4)
.L92:
	movl	%eax, (%rcx,%r12,4)
	movl	%eax, %edi
.L91:
	movl	%edi, (%rcx,%rbp,4)
	movl	%edi, %edx
.L90:
	movl	%edx, (%rcx,%rbx,4)
	movl	%edx, %eax
	jmp	.L89
	.cfi_endproc
.LFE27:
	.size	query, .-query
	.p2align 4
	.globl	judge
	.type	judge, @function
judge:
.LFB28:
	.cfi_startproc
	endbr64
	movl	N(%rip), %eax
	testl	%eax, %eax
	jle	.L138
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%r15d, %r15d
	leaq	a(%rip), %rsi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leal	1(%r15), %edx
	movq	%rsi, %r10
	movl	%r15d, %r11d
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	cmpl	%edx, %eax
	jle	.L103
.L142:
	leaq	1(%r15), %r14
	movq	%r14, %rcx
	.p2align 4,,10
	.p2align 3
.L126:
	movl	(%r10), %eax
	movl	%ecx, %r8d
	movl	%r11d, %ebp
	cmpl	%r15d, %eax
	je	.L104
	movslq	%eax, %r9
	movl	(%rsi,%r9,4), %ebp
	cmpl	%ebp, %eax
	je	.L105
	movslq	%ebp, %rbx
	movl	(%rsi,%rbx,4), %eax
	cmpl	%eax, %ebp
	je	.L106
	movslq	%eax, %rbp
	movl	(%rsi,%rbp,4), %edx
	cmpl	%edx, %eax
	je	.L107
	movslq	%edx, %r12
	movl	(%rsi,%r12,4), %eax
	cmpl	%eax, %edx
	jne	.L139
.L108:
	movl	%eax, (%rsi,%rbp,4)
	movl	%eax, %edx
.L107:
	movl	%edx, (%rsi,%rbx,4)
	movl	%edx, %eax
.L106:
	movl	%eax, (%rsi,%r9,4)
	movl	%eax, %ebp
.L105:
	movl	%ebp, (%r10)
.L104:
	movl	(%rsi,%rcx,4), %eax
	cmpl	%ecx, %eax
	je	.L115
	movslq	%eax, %r9
	movl	(%rsi,%r9,4), %r8d
	cmpl	%r8d, %eax
	je	.L116
	movslq	%r8d, %rbx
	movl	(%rsi,%rbx,4), %eax
	cmpl	%eax, %r8d
	je	.L117
	movslq	%eax, %r8
	movl	(%rsi,%r8,4), %edx
	cmpl	%edx, %eax
	je	.L118
	movslq	%edx, %r12
	movl	(%rsi,%r12,4), %eax
	cmpl	%eax, %edx
	jne	.L140
.L119:
	movl	%eax, (%rsi,%r8,4)
	movl	%eax, %edx
.L118:
	movl	%edx, (%rsi,%rbx,4)
	movl	%edx, %eax
.L117:
	movl	%eax, (%rsi,%r9,4)
	movl	%eax, %r8d
.L116:
	movl	%r8d, (%rsi,%rcx,4)
.L115:
	cmpl	%ebp, %r8d
	je	.L141
	addq	$56, %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
.L141:
	.cfi_restore_state
	movl	N(%rip), %eax
	addq	$1, %rcx
	cmpl	%ecx, %eax
	jg	.L126
	addq	$4, %r10
	cmpl	%r14d, %eax
	jle	.L103
	movq	%r14, %r15
	leal	1(%r15), %edx
	movl	%r15d, %r11d
	cmpl	%edx, %eax
	jg	.L142
.L103:
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	$1, %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
.L140:
	.cfi_restore_state
	movslq	%eax, %r13
	movl	(%rsi,%r13,4), %edi
	cmpl	%edi, %eax
	je	.L120
	movslq	%edi, %rdx
	movl	(%rsi,%rdx,4), %eax
	cmpl	%eax, %edi
	jne	.L143
.L121:
	movl	%eax, (%rsi,%r13,4)
	movl	%eax, %edi
.L120:
	movl	%edi, (%rsi,%r12,4)
	movl	%edi, %eax
	jmp	.L119
	.p2align 4,,10
	.p2align 3
.L139:
	movslq	%eax, %r13
	movl	(%rsi,%r13,4), %edi
	cmpl	%edi, %eax
	je	.L109
	movslq	%edi, %rdx
	movl	(%rsi,%rdx,4), %eax
	cmpl	%eax, %edi
	jne	.L144
.L110:
	movl	%eax, (%rsi,%r13,4)
	movl	%eax, %edi
.L109:
	movl	%edi, (%rsi,%r12,4)
	movl	%edi, %eax
	jmp	.L108
.L144:
	movslq	%eax, %rdi
	movq	%rdi, 8(%rsp)
	movl	(%rsi,%rdi,4), %edi
	cmpl	%edi, %eax
	je	.L111
	movslq	%edi, %rax
	movq	%rax, 16(%rsp)
	movl	(%rsi,%rax,4), %eax
	cmpl	%eax, %edi
	jne	.L145
.L112:
	movq	8(%rsp), %rdi
	movl	%eax, (%rsi,%rdi,4)
	movl	%eax, %edi
.L111:
	movl	%edi, (%rsi,%rdx,4)
	movl	%edi, %eax
	jmp	.L110
.L143:
	movslq	%eax, %rdi
	movq	%rdi, 8(%rsp)
	movl	(%rsi,%rdi,4), %edi
	cmpl	%edi, %eax
	je	.L122
	movslq	%edi, %rax
	movq	%rax, 16(%rsp)
	movl	(%rsi,%rax,4), %eax
	cmpl	%eax, %edi
	jne	.L146
.L123:
	movq	8(%rsp), %rdi
	movl	%eax, (%rsi,%rdi,4)
	movl	%eax, %edi
.L122:
	movl	%edi, (%rsi,%rdx,4)
	movl	%edi, %eax
	jmp	.L121
.L146:
	movslq	%eax, %rdi
	movq	%rdi, 32(%rsp)
	movl	(%rsi,%rdi,4), %edi
	cmpl	%edi, %eax
	je	.L124
	movslq	%edi, %rax
	movq	%rax, 24(%rsp)
	movl	(%rsi,%rax,4), %eax
	cmpl	%eax, %edi
	je	.L125
	movl	%eax, %edi
	movq	%rdx, 40(%rsp)
	call	root
	movq	24(%rsp), %rdi
	movq	40(%rsp), %rdx
	movl	%eax, (%rsi,%rdi,4)
.L125:
	movq	32(%rsp), %rdi
	movl	%eax, (%rsi,%rdi,4)
	movl	%eax, %edi
.L124:
	movq	16(%rsp), %rax
	movl	%edi, (%rsi,%rax,4)
	movl	%edi, %eax
	jmp	.L123
.L145:
	movslq	%eax, %rdi
	movq	%rdi, 32(%rsp)
	movl	(%rsi,%rdi,4), %edi
	cmpl	%edi, %eax
	je	.L113
	movslq	%edi, %rax
	movq	%rax, 24(%rsp)
	movl	(%rsi,%rax,4), %eax
	cmpl	%eax, %edi
	je	.L114
	movl	%eax, %edi
	movq	%rdx, 40(%rsp)
	call	root
	movq	24(%rsp), %rdi
	movq	40(%rsp), %rdx
	movl	%eax, (%rsi,%rdi,4)
.L114:
	movq	32(%rsp), %rdi
	movl	%eax, (%rsi,%rdi,4)
	movl	%eax, %edi
.L113:
	movq	16(%rsp), %rax
	movl	%edi, (%rsi,%rax,4)
	movl	%edi, %eax
	jmp	.L112
.L138:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE28:
	.size	judge, .-judge
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC12:
	.string	"%d%d"
.LC13:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	M(%rip), %rdx
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC12(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__isoc99_scanf@PLT
	movl	M(%rip), %eax
	testl	%eax, %eax
	jle	.L148
	leaq	l(%rip), %r12
	leaq	r(%rip), %r13
	xorl	%r15d, %r15d
	movq	%r12, %rbp
	movq	%r13, %rbx
	.p2align 4,,10
	.p2align 3
.L149:
	movq	%rbx, %rdx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	M(%rip), %edx
	addl	$1, %r15d
	subl	$1, 0(%rbp)
	subl	$1, (%rbx)
	addq	$4, %rbp
	addq	$4, %rbx
	cmpl	%r15d, %edx
	jg	.L149
	testl	%edx, %edx
	jle	.L148
	movdqa	.LC0(%rip), %xmm1
	movdqa	.LC1(%rip), %xmm2
	xorl	%ebp, %ebp
	leaq	a(%rip), %rbx
	movdqa	.LC2(%rip), %xmm3
	.p2align 4,,10
	.p2align 3
.L150:
	movl	N(%rip), %eax
	testl	%eax, %eax
	jle	.L154
	leal	-1(%rax), %ecx
	cmpl	$2, %ecx
	jbe	.L179
	movl	%eax, %ecx
	movaps	%xmm1, (%rbx)
	shrl	$2, %ecx
	cmpl	$1, %ecx
	je	.L152
	movaps	%xmm2, 16+a(%rip)
	cmpl	$2, %ecx
	je	.L152
	movaps	%xmm3, 32+a(%rip)
	cmpl	$3, %ecx
	je	.L152
	movdqa	.LC3(%rip), %xmm0
	movaps	%xmm0, 48+a(%rip)
	cmpl	$4, %ecx
	je	.L152
	movdqa	.LC4(%rip), %xmm0
	movaps	%xmm0, 64+a(%rip)
	cmpl	$5, %ecx
	je	.L152
	movdqa	.LC5(%rip), %xmm0
	movaps	%xmm0, 80+a(%rip)
	cmpl	$6, %ecx
	je	.L152
	movdqa	.LC6(%rip), %xmm0
	movaps	%xmm0, 96+a(%rip)
	cmpl	$7, %ecx
	je	.L152
	movdqa	.LC7(%rip), %xmm0
	movaps	%xmm0, 112+a(%rip)
	cmpl	$8, %ecx
	je	.L152
	movdqa	.LC8(%rip), %xmm0
	movaps	%xmm0, 128+a(%rip)
	cmpl	$9, %ecx
	je	.L152
	movdqa	.LC9(%rip), %xmm0
	movaps	%xmm0, 144+a(%rip)
	cmpl	$10, %ecx
	je	.L152
	movdqa	.LC10(%rip), %xmm0
	movaps	%xmm0, 160+a(%rip)
	cmpl	$11, %ecx
	je	.L152
	movdqa	.LC11(%rip), %xmm0
	movaps	%xmm0, 176+a(%rip)
	.p2align 4,,10
	.p2align 3
.L152:
	movl	%eax, %ecx
	andl	$-4, %ecx
	testb	$3, %al
	je	.L154
.L151:
	movslq	%ecx, %rsi
	movl	%ecx, (%rbx,%rsi,4)
	leal	1(%rcx), %esi
	cmpl	%eax, %esi
	jge	.L154
	movslq	%esi, %rdi
	addl	$2, %ecx
	movl	%esi, (%rbx,%rdi,4)
	cmpl	%eax, %ecx
	jge	.L154
	movslq	%ecx, %rax
	movl	%ecx, (%rbx,%rax,4)
.L154:
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L174:
	cmpl	%ecx, %ebp
	je	.L157
	movslq	(%r12,%rcx,4), %r8
	movl	0(%r13,%rcx,4), %esi
	movslq	(%rbx,%r8,4), %r10
	cmpl	%r10d, %r8d
	je	.L158
	movslq	%r10d, %r9
	movl	(%rbx,%r9,4), %eax
	cmpl	%eax, %r10d
	je	.L159
	movslq	%eax, %r10
	movl	(%rbx,%r10,4), %edx
	cmpl	%edx, %eax
	je	.L160
	movslq	%edx, %r11
	movl	(%rbx,%r11,4), %eax
	cmpl	%eax, %edx
	je	.L161
	movslq	%eax, %r14
	movl	(%rbx,%r14,4), %edx
	cmpl	%edx, %eax
	je	.L162
	movslq	%edx, %r15
	movl	(%rbx,%r15,4), %eax
	cmpl	%eax, %edx
	je	.L163
	movslq	%eax, %rdx
	movl	(%rbx,%rdx,4), %edi
	cmpl	%edi, %eax
	jne	.L221
.L164:
	movl	%edi, (%rbx,%r15,4)
	movl	%edi, %edx
.L163:
	movl	%edx, (%rbx,%r14,4)
.L162:
	movl	%edx, (%rbx,%r11,4)
	movl	%edx, %eax
.L161:
	movl	%eax, (%rbx,%r10,4)
	movl	%eax, %edx
.L160:
	movl	%edx, (%rbx,%r9,4)
	movl	%edx, %eax
.L159:
	movl	%eax, (%rbx,%r8,4)
	movslq	%eax, %r10
.L158:
	movslq	%esi, %r8
	movl	(%rbx,%r8,4), %eax
	cmpl	%eax, %esi
	je	.L166
	movslq	%eax, %rsi
	movl	(%rbx,%rsi,4), %edx
	cmpl	%edx, %eax
	je	.L167
	movslq	%edx, %r9
	movl	(%rbx,%r9,4), %eax
	cmpl	%eax, %edx
	je	.L168
	movslq	%eax, %r11
	movl	(%rbx,%r11,4), %edx
	cmpl	%edx, %eax
	je	.L169
	movslq	%edx, %r14
	movl	(%rbx,%r14,4), %eax
	cmpl	%eax, %edx
	je	.L170
	movslq	%eax, %r15
	movl	(%rbx,%r15,4), %edi
	cmpl	%edi, %eax
	je	.L171
	movslq	%edi, %rdx
	movl	(%rbx,%rdx,4), %eax
	cmpl	%eax, %edi
	jne	.L222
.L172:
	movl	%eax, (%rbx,%r15,4)
.L171:
	movl	%eax, (%rbx,%r14,4)
.L170:
	movl	%eax, (%rbx,%r11,4)
	movl	%eax, %edx
.L169:
	movl	%edx, (%rbx,%r9,4)
	movl	%edx, %eax
.L168:
	movl	%eax, (%rbx,%rsi,4)
	movl	%eax, %edx
.L167:
	movl	%edx, (%rbx,%r8,4)
	movl	%edx, %eax
.L166:
	movl	M(%rip), %edx
	cmpl	%r10d, %eax
	je	.L157
	movl	%eax, (%rbx,%r10,4)
.L157:
	addq	$1, %rcx
	cmpl	%ecx, %edx
	jg	.L174
	xorl	%eax, %eax
	call	judge
	testl	%eax, %eax
	jne	.L223
	movl	M(%rip), %edx
	addl	$1, %ebp
	addl	$1, ans(%rip)
	cmpl	%ebp, %edx
	jg	.L150
.L148:
	movl	ans(%rip), %edx
	leaq	.LC13(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$24, %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
.L223:
	.cfi_restore_state
	movl	M(%rip), %edx
	addl	$1, %ebp
	cmpl	%ebp, %edx
	jg	.L150
	jmp	.L148
.L179:
	xorl	%ecx, %ecx
	jmp	.L151
.L222:
	movslq	%eax, %rdi
	movq	%rdi, (%rsp)
	movl	(%rbx,%rdi,4), %edi
	cmpl	%edi, %eax
	jne	.L224
.L173:
	movl	%edi, (%rbx,%rdx,4)
	movl	%edi, %eax
	jmp	.L172
.L221:
	movslq	%edi, %rax
	movq	%rax, (%rsp)
	movl	(%rbx,%rax,4), %eax
	cmpl	%eax, %edi
	jne	.L225
.L165:
	movl	%eax, (%rbx,%rdx,4)
	movl	%eax, %edi
	jmp	.L164
.L225:
	movl	%eax, %edi
	movq	%rdx, 8(%rsp)
	call	root
	movq	(%rsp), %rdi
	movq	8(%rsp), %rdx
	movl	%eax, (%rbx,%rdi,4)
	jmp	.L165
.L224:
	movq	%rdx, 8(%rsp)
	call	root
	movq	8(%rsp), %rdx
	movl	%eax, %edi
	movq	(%rsp), %rax
	movl	%edi, (%rbx,%rax,4)
	jmp	.L173
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	ans
	.bss
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	r
	.align 32
	.type	r, @object
	.size	r, 200
r:
	.zero	200
	.globl	l
	.align 32
	.type	l, @object
	.size	l, 200
l:
	.zero	200
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 200
a:
	.zero	200
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC1:
	.long	4
	.long	5
	.long	6
	.long	7
	.align 16
.LC2:
	.long	8
	.long	9
	.long	10
	.long	11
	.align 16
.LC3:
	.long	12
	.long	13
	.long	14
	.long	15
	.align 16
.LC4:
	.long	16
	.long	17
	.long	18
	.long	19
	.align 16
.LC5:
	.long	20
	.long	21
	.long	22
	.long	23
	.align 16
.LC6:
	.long	24
	.long	25
	.long	26
	.long	27
	.align 16
.LC7:
	.long	28
	.long	29
	.long	30
	.long	31
	.align 16
.LC8:
	.long	32
	.long	33
	.long	34
	.long	35
	.align 16
.LC9:
	.long	36
	.long	37
	.long	38
	.long	39
	.align 16
.LC10:
	.long	40
	.long	41
	.long	42
	.long	43
	.align 16
.LC11:
	.long	44
	.long	45
	.long	46
	.long	47
	.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	init
	.type	init, @function
init:
.LFB24:
	.cfi_startproc
	endbr64
	movl	N(%rip), %eax
	testl	%eax, %eax
	jle	.L1
	leal	-1(%rax), %edx
	cmpl	$2, %edx
	jbe	.L6
	movdqa	.LC0(%rip), %xmm0
	movl	%eax, %edx
	shrl	$2, %edx
	movaps	%xmm0, a(%rip)
	cmpl	$1, %edx
	je	.L4
	movdqa	.LC1(%rip), %xmm0
	movaps	%xmm0, 16+a(%rip)
	cmpl	$2, %edx
	je	.L4
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 32+a(%rip)
	cmpl	$3, %edx
	je	.L4
	movdqa	.LC3(%rip), %xmm0
	movaps	%xmm0, 48+a(%rip)
	cmpl	$4, %edx
	je	.L4
	movdqa	.LC4(%rip), %xmm0
	movaps	%xmm0, 64+a(%rip)
	cmpl	$5, %edx
	je	.L4
	movdqa	.LC5(%rip), %xmm0
	movaps	%xmm0, 80+a(%rip)
	cmpl	$6, %edx
	je	.L4
	movdqa	.LC6(%rip), %xmm0
	movaps	%xmm0, 96+a(%rip)
	cmpl	$7, %edx
	je	.L4
	movdqa	.LC7(%rip), %xmm0
	movaps	%xmm0, 112+a(%rip)
	cmpl	$8, %edx
	je	.L4
	movdqa	.LC8(%rip), %xmm0
	movaps	%xmm0, 128+a(%rip)
	cmpl	$9, %edx
	je	.L4
	movdqa	.LC9(%rip), %xmm0
	movaps	%xmm0, 144+a(%rip)
	cmpl	$10, %edx
	je	.L4
	movdqa	.LC10(%rip), %xmm0
	movaps	%xmm0, 160+a(%rip)
	cmpl	$11, %edx
	je	.L4
	movdqa	.LC11(%rip), %xmm0
	movaps	%xmm0, 176+a(%rip)
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%eax, %edx
	andl	$-4, %edx
	testb	$3, %al
	je	.L41
.L3:
	movslq	%edx, %rcx
	leaq	a(%rip), %rsi
	movl	%edx, (%rsi,%rcx,4)
	leal	1(%rdx), %ecx
	cmpl	%ecx, %eax
	jle	.L1
	movslq	%ecx, %rdi
	addl	$2, %edx
	movl	%ecx, (%rsi,%rdi,4)
	cmpl	%edx, %eax
	jle	.L1
	movslq	%edx, %rax
	movl	%edx, (%rsi,%rax,4)
.L1:
	ret
	.p2align 4,,10
	.p2align 3
.L41:
	ret
.L6:
	xorl	%edx, %edx
	jmp	.L3
	.cfi_endproc
.LFE24:
	.size	init, .-init
	.p2align 4
	.globl	root
	.type	root, @function
root:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movslq	%edi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	a(%rip), %rbx
	movq	%rbp, %rax
	movl	(%rbx,%rbp,4), %edx
	cmpl	%ebp, %edx
	jne	.L49
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L49:
	.cfi_restore_state
	movslq	%edx, %r12
	movl	(%rbx,%r12,4), %eax
	cmpl	%eax, %edx
	je	.L44
	movslq	%eax, %r13
	movl	(%rbx,%r13,4), %edx
	cmpl	%edx, %eax
	jne	.L50
.L45:
	movl	%edx, (%rbx,%r12,4)
	movl	%edx, %eax
.L44:
	movl	%eax, (%rbx,%rbp,4)
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L50:
	.cfi_restore_state
	movslq	%edx, %r14
	movl	(%rbx,%r14,4), %edi
	cmpl	%edi, %edx
	je	.L46
	call	root
	movl	%eax, (%rbx,%r14,4)
	movl	%eax, %edi
.L46:
	movl	%edi, (%rbx,%r13,4)
	movl	%edi, %edx
	jmp	.L45
	.cfi_endproc
.LFE25:
	.size	root, .-root
	.p2align 4
	.globl	unite
	.type	unite, @function
unite:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	a(%rip), %rcx
	movslq	%edi, %r9
	movl	%esi, %r8d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	movslq	(%rcx,%r9,4), %rsi
	cmpl	%esi, %edi
	jne	.L70
	movslq	%r8d, %r9
	movl	(%rcx,%r9,4), %eax
	cmpl	%eax, %r8d
	jne	.L71
.L60:
	cmpl	%esi, %eax
	je	.L51
	movl	%eax, (%rcx,%rsi,4)
.L51:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.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
	.p2align 4,,10
	.p2align 3
.L70:
	.cfi_restore_state
	movslq	%esi, %r10
	movl	(%rcx,%r10,4), %eax
	cmpl	%eax, %esi
	je	.L53
	movslq	%eax, %rsi
	movl	(%rcx,%rsi,4), %edx
	cmpl	%edx, %eax
	jne	.L72
.L54:
	movl	%edx, (%rcx,%r10,4)
	movl	%edx, %eax
.L53:
	movl	%eax, (%rcx,%r9,4)
	movslq	%r8d, %r9
	movslq	%eax, %rsi
	movl	(%rcx,%r9,4), %eax
	cmpl	%eax, %r8d
	je	.L60
.L71:
	movslq	%eax, %r8
	movl	(%rcx,%r8,4), %edx
	cmpl	%edx, %eax
	je	.L61
	movslq	%edx, %r10
	movl	(%rcx,%r10,4), %eax
	cmpl	%eax, %edx
	jne	.L73
.L62:
	movl	%eax, (%rcx,%r8,4)
	movl	%eax, %edx
.L61:
	movl	%edx, (%rcx,%r9,4)
	movl	%edx, %eax
	jmp	.L60
	.p2align 4,,10
	.p2align 3
.L73:
	movslq	%eax, %r11
	movl	(%rcx,%r11,4), %edx
	cmpl	%edx, %eax
	je	.L63
	movslq	%edx, %rbx
	movl	(%rcx,%rbx,4), %eax
	cmpl	%eax, %edx
	jne	.L74
.L64:
	movl	%eax, (%rcx,%r11,4)
	movl	%eax, %edx
.L63:
	movl	%edx, (%rcx,%r10,4)
	movl	%edx, %eax
	jmp	.L62
	.p2align 4,,10
	.p2align 3
.L72:
	movslq	%edx, %r11
	movl	(%rcx,%r11,4), %eax
	cmpl	%eax, %edx
	je	.L55
	movslq	%eax, %rbx
	movl	(%rcx,%rbx,4), %edx
	cmpl	%edx, %eax
	jne	.L75
.L56:
	movl	%edx, (%rcx,%r11,4)
	movl	%edx, %eax
.L55:
	movl	%eax, (%rcx,%rsi,4)
	movl	%eax, %edx
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L75:
	movslq	%edx, %rbp
	movl	(%rcx,%rbp,4), %eax
	cmpl	%eax, %edx
	je	.L57
	movslq	%eax, %r12
	movl	(%rcx,%r12,4), %edx
	cmpl	%edx, %eax
	je	.L58
	movslq	%edx, %r13
	movl	(%rcx,%r13,4), %edi
	cmpl	%edi, %edx
	je	.L59
	call	root
	movl	%eax, (%rcx,%r13,4)
	movl	%eax, %edi
.L59:
	movl	%edi, (%rcx,%r12,4)
	movl	%edi, %edx
.L58:
	movl	%edx, (%rcx,%rbp,4)
	movl	%edx, %eax
.L57:
	movl	%eax, (%rcx,%rbx,4)
	movl	%eax, %edx
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L74:
	movslq	%eax, %rbp
	movl	(%rcx,%rbp,4), %edx
	cmpl	%edx, %eax
	je	.L65
	movslq	%edx, %r12
	movl	(%rcx,%r12,4), %edi
	cmpl	%edi, %edx
	je	.L66
	movslq	%edi, %r13
	movl	(%rcx,%r13,4), %eax
	cmpl	%eax, %edi
	je	.L67
	movl	%eax, %edi
	call	root
	movl	%eax, (%rcx,%r13,4)
.L67:
	movl	%eax, (%rcx,%r12,4)
	movl	%eax, %edi
.L66:
	movl	%edi, (%rcx,%rbp,4)
	movl	%edi, %edx
.L65:
	movl	%edx, (%rcx,%rbx,4)
	movl	%edx, %eax
	jmp	.L64
	.cfi_endproc
.LFE26:
	.size	unite, .-unite
	.p2align 4
	.globl	query
	.type	query, @function
query:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	a(%rip), %rcx
	movslq	%edi, %r8
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	movl	(%rcx,%r8,4), %r9d
	cmpl	%r9d, %edi
	jne	.L94
	movslq	%esi, %r8
	movl	(%rcx,%r8,4), %eax
	cmpl	%eax, %esi
	jne	.L95
.L85:
	cmpl	%r9d, %eax
	sete	%al
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	movzbl	%al, %eax
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L94:
	.cfi_restore_state
	movslq	%r9d, %r10
	movl	(%rcx,%r10,4), %eax
	cmpl	%eax, %r9d
	je	.L78
	movslq	%eax, %r9
	movl	(%rcx,%r9,4), %edx
	cmpl	%edx, %eax
	jne	.L96
.L79:
	movl	%edx, (%rcx,%r10,4)
	movl	%edx, %eax
.L78:
	movl	%eax, (%rcx,%r8,4)
	movslq	%esi, %r8
	movl	%eax, %r9d
	movl	(%rcx,%r8,4), %eax
	cmpl	%eax, %esi
	je	.L85
.L95:
	movslq	%eax, %rsi
	movl	(%rcx,%rsi,4), %edx
	cmpl	%edx, %eax
	je	.L86
	movslq	%edx, %r10
	movl	(%rcx,%r10,4), %eax
	cmpl	%eax, %edx
	jne	.L97
.L87:
	movl	%eax, (%rcx,%rsi,4)
	movl	%eax, %edx
.L86:
	movl	%edx, (%rcx,%r8,4)
	movl	%edx, %eax
	jmp	.L85
	.p2align 4,,10
	.p2align 3
.L97:
	movslq	%eax, %r11
	movl	(%rcx,%r11,4), %edx
	cmpl	%edx, %eax
	je	.L88
	movslq	%edx, %rbx
	movl	(%rcx,%rbx,4), %eax
	cmpl	%eax, %edx
	jne	.L98
.L89:
	movl	%eax, (%rcx,%r11,4)
	movl	%eax, %edx
.L88:
	movl	%edx, (%rcx,%r10,4)
	movl	%edx, %eax
	jmp	.L87
	.p2align 4,,10
	.p2align 3
.L96:
	movslq	%edx, %r11
	movl	(%rcx,%r11,4), %eax
	cmpl	%eax, %edx
	je	.L80
	movslq	%eax, %rbx
	movl	(%rcx,%rbx,4), %edx
	cmpl	%edx, %eax
	jne	.L99
.L81:
	movl	%edx, (%rcx,%r11,4)
	movl	%edx, %eax
.L80:
	movl	%eax, (%rcx,%r9,4)
	movl	%eax, %edx
	jmp	.L79
	.p2align 4,,10
	.p2align 3
.L99:
	movslq	%edx, %rbp
	movl	(%rcx,%rbp,4), %eax
	cmpl	%eax, %edx
	je	.L82
	movslq	%eax, %r12
	movl	(%rcx,%r12,4), %edx
	cmpl	%edx, %eax
	je	.L83
	movslq	%edx, %r13
	movl	(%rcx,%r13,4), %edi
	cmpl	%edi, %edx
	je	.L84
	call	root
	movl	%eax, (%rcx,%r13,4)
	movl	%eax, %edi
.L84:
	movl	%edi, (%rcx,%r12,4)
	movl	%edi, %edx
.L83:
	movl	%edx, (%rcx,%rbp,4)
	movl	%edx, %eax
.L82:
	movl	%eax, (%rcx,%rbx,4)
	movl	%eax, %edx
	jmp	.L81
	.p2align 4,,10
	.p2align 3
.L98:
	movslq	%eax, %rbp
	movl	(%rcx,%rbp,4), %edx
	cmpl	%edx, %eax
	je	.L90
	movslq	%edx, %r12
	movl	(%rcx,%r12,4), %edi
	cmpl	%edi, %edx
	je	.L91
	movslq	%edi, %r13
	movl	(%rcx,%r13,4), %eax
	cmpl	%eax, %edi
	je	.L92
	movl	%eax, %edi
	call	root
	movl	%eax, (%rcx,%r13,4)
.L92:
	movl	%eax, (%rcx,%r12,4)
	movl	%eax, %edi
.L91:
	movl	%edi, (%rcx,%rbp,4)
	movl	%edi, %edx
.L90:
	movl	%edx, (%rcx,%rbx,4)
	movl	%edx, %eax
	jmp	.L89
	.cfi_endproc
.LFE27:
	.size	query, .-query
	.p2align 4
	.globl	judge
	.type	judge, @function
judge:
.LFB28:
	.cfi_startproc
	endbr64
	movl	N(%rip), %eax
	testl	%eax, %eax
	jle	.L138
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%r15d, %r15d
	leaq	a(%rip), %rsi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leal	1(%r15), %edx
	movq	%rsi, %r10
	movl	%r15d, %r11d
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	cmpl	%edx, %eax
	jle	.L103
.L142:
	leaq	1(%r15), %r14
	movq	%r14, %rcx
	.p2align 4,,10
	.p2align 3
.L126:
	movl	(%r10), %eax
	movl	%ecx, %r8d
	movl	%r11d, %ebp
	cmpl	%r15d, %eax
	je	.L104
	movslq	%eax, %r9
	movl	(%rsi,%r9,4), %ebp
	cmpl	%ebp, %eax
	je	.L105
	movslq	%ebp, %rbx
	movl	(%rsi,%rbx,4), %eax
	cmpl	%eax, %ebp
	je	.L106
	movslq	%eax, %rbp
	movl	(%rsi,%rbp,4), %edx
	cmpl	%edx, %eax
	je	.L107
	movslq	%edx, %r12
	movl	(%rsi,%r12,4), %eax
	cmpl	%eax, %edx
	jne	.L139
.L108:
	movl	%eax, (%rsi,%rbp,4)
	movl	%eax, %edx
.L107:
	movl	%edx, (%rsi,%rbx,4)
	movl	%edx, %eax
.L106:
	movl	%eax, (%rsi,%r9,4)
	movl	%eax, %ebp
.L105:
	movl	%ebp, (%r10)
.L104:
	movl	(%rsi,%rcx,4), %eax
	cmpl	%ecx, %eax
	je	.L115
	movslq	%eax, %r9
	movl	(%rsi,%r9,4), %r8d
	cmpl	%r8d, %eax
	je	.L116
	movslq	%r8d, %rbx
	movl	(%rsi,%rbx,4), %eax
	cmpl	%eax, %r8d
	je	.L117
	movslq	%eax, %r8
	movl	(%rsi,%r8,4), %edx
	cmpl	%edx, %eax
	je	.L118
	movslq	%edx, %r12
	movl	(%rsi,%r12,4), %eax
	cmpl	%eax, %edx
	jne	.L140
.L119:
	movl	%eax, (%rsi,%r8,4)
	movl	%eax, %edx
.L118:
	movl	%edx, (%rsi,%rbx,4)
	movl	%edx, %eax
.L117:
	movl	%eax, (%rsi,%r9,4)
	movl	%eax, %r8d
.L116:
	movl	%r8d, (%rsi,%rcx,4)
.L115:
	cmpl	%ebp, %r8d
	je	.L141
	addq	$56, %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
.L141:
	.cfi_restore_state
	movl	N(%rip), %eax
	addq	$1, %rcx
	cmpl	%ecx, %eax
	jg	.L126
	addq	$4, %r10
	cmpl	%r14d, %eax
	jle	.L103
	movq	%r14, %r15
	leal	1(%r15), %edx
	movl	%r15d, %r11d
	cmpl	%edx, %eax
	jg	.L142
.L103:
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	$1, %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
.L140:
	.cfi_restore_state
	movslq	%eax, %r13
	movl	(%rsi,%r13,4), %edi
	cmpl	%edi, %eax
	je	.L120
	movslq	%edi, %rdx
	movl	(%rsi,%rdx,4), %eax
	cmpl	%eax, %edi
	jne	.L143
.L121:
	movl	%eax, (%rsi,%r13,4)
	movl	%eax, %edi
.L120:
	movl	%edi, (%rsi,%r12,4)
	movl	%edi, %eax
	jmp	.L119
	.p2align 4,,10
	.p2align 3
.L139:
	movslq	%eax, %r13
	movl	(%rsi,%r13,4), %edi
	cmpl	%edi, %eax
	je	.L109
	movslq	%edi, %rdx
	movl	(%rsi,%rdx,4), %eax
	cmpl	%eax, %edi
	jne	.L144
.L110:
	movl	%eax, (%rsi,%r13,4)
	movl	%eax, %edi
.L109:
	movl	%edi, (%rsi,%r12,4)
	movl	%edi, %eax
	jmp	.L108
.L144:
	movslq	%eax, %rdi
	movq	%rdi, 8(%rsp)
	movl	(%rsi,%rdi,4), %edi
	cmpl	%edi, %eax
	je	.L111
	movslq	%edi, %rax
	movq	%rax, 16(%rsp)
	movl	(%rsi,%rax,4), %eax
	cmpl	%eax, %edi
	jne	.L145
.L112:
	movq	8(%rsp), %rdi
	movl	%eax, (%rsi,%rdi,4)
	movl	%eax, %edi
.L111:
	movl	%edi, (%rsi,%rdx,4)
	movl	%edi, %eax
	jmp	.L110
.L143:
	movslq	%eax, %rdi
	movq	%rdi, 8(%rsp)
	movl	(%rsi,%rdi,4), %edi
	cmpl	%edi, %eax
	je	.L122
	movslq	%edi, %rax
	movq	%rax, 16(%rsp)
	movl	(%rsi,%rax,4), %eax
	cmpl	%eax, %edi
	jne	.L146
.L123:
	movq	8(%rsp), %rdi
	movl	%eax, (%rsi,%rdi,4)
	movl	%eax, %edi
.L122:
	movl	%edi, (%rsi,%rdx,4)
	movl	%edi, %eax
	jmp	.L121
.L146:
	movslq	%eax, %rdi
	movq	%rdi, 32(%rsp)
	movl	(%rsi,%rdi,4), %edi
	cmpl	%edi, %eax
	je	.L124
	movslq	%edi, %rax
	movq	%rax, 24(%rsp)
	movl	(%rsi,%rax,4), %eax
	cmpl	%eax, %edi
	je	.L125
	movl	%eax, %edi
	movq	%rdx, 40(%rsp)
	call	root
	movq	24(%rsp), %rdi
	movq	40(%rsp), %rdx
	movl	%eax, (%rsi,%rdi,4)
.L125:
	movq	32(%rsp), %rdi
	movl	%eax, (%rsi,%rdi,4)
	movl	%eax, %edi
.L124:
	movq	16(%rsp), %rax
	movl	%edi, (%rsi,%rax,4)
	movl	%edi, %eax
	jmp	.L123
.L145:
	movslq	%eax, %rdi
	movq	%rdi, 32(%rsp)
	movl	(%rsi,%rdi,4), %edi
	cmpl	%edi, %eax
	je	.L113
	movslq	%edi, %rax
	movq	%rax, 24(%rsp)
	movl	(%rsi,%rax,4), %eax
	cmpl	%eax, %edi
	je	.L114
	movl	%eax, %edi
	movq	%rdx, 40(%rsp)
	call	root
	movq	24(%rsp), %rdi
	movq	40(%rsp), %rdx
	movl	%eax, (%rsi,%rdi,4)
.L114:
	movq	32(%rsp), %rdi
	movl	%eax, (%rsi,%rdi,4)
	movl	%eax, %edi
.L113:
	movq	16(%rsp), %rax
	movl	%edi, (%rsi,%rax,4)
	movl	%edi, %eax
	jmp	.L112
.L138:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE28:
	.size	judge, .-judge
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC12:
	.string	"%d%d"
.LC13:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	M(%rip), %rdx
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC12(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__isoc99_scanf@PLT
	movl	M(%rip), %eax
	testl	%eax, %eax
	jle	.L148
	leaq	l(%rip), %r12
	leaq	r(%rip), %r13
	xorl	%r15d, %r15d
	movq	%r12, %rbp
	movq	%r13, %rbx
	.p2align 4,,10
	.p2align 3
.L149:
	movq	%rbx, %rdx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	M(%rip), %edx
	addl	$1, %r15d
	subl	$1, 0(%rbp)
	subl	$1, (%rbx)
	addq	$4, %rbp
	addq	$4, %rbx
	cmpl	%r15d, %edx
	jg	.L149
	testl	%edx, %edx
	jle	.L148
	movdqa	.LC0(%rip), %xmm1
	movdqa	.LC1(%rip), %xmm2
	xorl	%ebp, %ebp
	leaq	a(%rip), %rbx
	movdqa	.LC2(%rip), %xmm3
	.p2align 4,,10
	.p2align 3
.L150:
	movl	N(%rip), %eax
	testl	%eax, %eax
	jle	.L154
	leal	-1(%rax), %ecx
	cmpl	$2, %ecx
	jbe	.L179
	movl	%eax, %ecx
	movaps	%xmm1, (%rbx)
	shrl	$2, %ecx
	cmpl	$1, %ecx
	je	.L152
	movaps	%xmm2, 16+a(%rip)
	cmpl	$2, %ecx
	je	.L152
	movaps	%xmm3, 32+a(%rip)
	cmpl	$3, %ecx
	je	.L152
	movdqa	.LC3(%rip), %xmm0
	movaps	%xmm0, 48+a(%rip)
	cmpl	$4, %ecx
	je	.L152
	movdqa	.LC4(%rip), %xmm0
	movaps	%xmm0, 64+a(%rip)
	cmpl	$5, %ecx
	je	.L152
	movdqa	.LC5(%rip), %xmm0
	movaps	%xmm0, 80+a(%rip)
	cmpl	$6, %ecx
	je	.L152
	movdqa	.LC6(%rip), %xmm0
	movaps	%xmm0, 96+a(%rip)
	cmpl	$7, %ecx
	je	.L152
	movdqa	.LC7(%rip), %xmm0
	movaps	%xmm0, 112+a(%rip)
	cmpl	$8, %ecx
	je	.L152
	movdqa	.LC8(%rip), %xmm0
	movaps	%xmm0, 128+a(%rip)
	cmpl	$9, %ecx
	je	.L152
	movdqa	.LC9(%rip), %xmm0
	movaps	%xmm0, 144+a(%rip)
	cmpl	$10, %ecx
	je	.L152
	movdqa	.LC10(%rip), %xmm0
	movaps	%xmm0, 160+a(%rip)
	cmpl	$11, %ecx
	je	.L152
	movdqa	.LC11(%rip), %xmm0
	movaps	%xmm0, 176+a(%rip)
	.p2align 4,,10
	.p2align 3
.L152:
	movl	%eax, %ecx
	andl	$-4, %ecx
	testb	$3, %al
	je	.L154
.L151:
	movslq	%ecx, %rsi
	movl	%ecx, (%rbx,%rsi,4)
	leal	1(%rcx), %esi
	cmpl	%eax, %esi
	jge	.L154
	movslq	%esi, %rdi
	addl	$2, %ecx
	movl	%esi, (%rbx,%rdi,4)
	cmpl	%eax, %ecx
	jge	.L154
	movslq	%ecx, %rax
	movl	%ecx, (%rbx,%rax,4)
.L154:
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L174:
	cmpl	%ecx, %ebp
	je	.L157
	movslq	(%r12,%rcx,4), %r8
	movl	0(%r13,%rcx,4), %esi
	movslq	(%rbx,%r8,4), %r10
	cmpl	%r10d, %r8d
	je	.L158
	movslq	%r10d, %r9
	movl	(%rbx,%r9,4), %eax
	cmpl	%eax, %r10d
	je	.L159
	movslq	%eax, %r10
	movl	(%rbx,%r10,4), %edx
	cmpl	%edx, %eax
	je	.L160
	movslq	%edx, %r11
	movl	(%rbx,%r11,4), %eax
	cmpl	%eax, %edx
	je	.L161
	movslq	%eax, %r14
	movl	(%rbx,%r14,4), %edx
	cmpl	%edx, %eax
	je	.L162
	movslq	%edx, %r15
	movl	(%rbx,%r15,4), %eax
	cmpl	%eax, %edx
	je	.L163
	movslq	%eax, %rdx
	movl	(%rbx,%rdx,4), %edi
	cmpl	%edi, %eax
	jne	.L221
.L164:
	movl	%edi, (%rbx,%r15,4)
	movl	%edi, %edx
.L163:
	movl	%edx, (%rbx,%r14,4)
.L162:
	movl	%edx, (%rbx,%r11,4)
	movl	%edx, %eax
.L161:
	movl	%eax, (%rbx,%r10,4)
	movl	%eax, %edx
.L160:
	movl	%edx, (%rbx,%r9,4)
	movl	%edx, %eax
.L159:
	movl	%eax, (%rbx,%r8,4)
	movslq	%eax, %r10
.L158:
	movslq	%esi, %r8
	movl	(%rbx,%r8,4), %eax
	cmpl	%eax, %esi
	je	.L166
	movslq	%eax, %rsi
	movl	(%rbx,%rsi,4), %edx
	cmpl	%edx, %eax
	je	.L167
	movslq	%edx, %r9
	movl	(%rbx,%r9,4), %eax
	cmpl	%eax, %edx
	je	.L168
	movslq	%eax, %r11
	movl	(%rbx,%r11,4), %edx
	cmpl	%edx, %eax
	je	.L169
	movslq	%edx, %r14
	movl	(%rbx,%r14,4), %eax
	cmpl	%eax, %edx
	je	.L170
	movslq	%eax, %r15
	movl	(%rbx,%r15,4), %edi
	cmpl	%edi, %eax
	je	.L171
	movslq	%edi, %rdx
	movl	(%rbx,%rdx,4), %eax
	cmpl	%eax, %edi
	jne	.L222
.L172:
	movl	%eax, (%rbx,%r15,4)
.L171:
	movl	%eax, (%rbx,%r14,4)
.L170:
	movl	%eax, (%rbx,%r11,4)
	movl	%eax, %edx
.L169:
	movl	%edx, (%rbx,%r9,4)
	movl	%edx, %eax
.L168:
	movl	%eax, (%rbx,%rsi,4)
	movl	%eax, %edx
.L167:
	movl	%edx, (%rbx,%r8,4)
	movl	%edx, %eax
.L166:
	movl	M(%rip), %edx
	cmpl	%r10d, %eax
	je	.L157
	movl	%eax, (%rbx,%r10,4)
.L157:
	addq	$1, %rcx
	cmpl	%ecx, %edx
	jg	.L174
	xorl	%eax, %eax
	call	judge
	testl	%eax, %eax
	jne	.L223
	movl	M(%rip), %edx
	addl	$1, %ebp
	addl	$1, ans(%rip)
	cmpl	%ebp, %edx
	jg	.L150
.L148:
	movl	ans(%rip), %edx
	leaq	.LC13(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$24, %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
.L223:
	.cfi_restore_state
	movl	M(%rip), %edx
	addl	$1, %ebp
	cmpl	%ebp, %edx
	jg	.L150
	jmp	.L148
.L179:
	xorl	%ecx, %ecx
	jmp	.L151
.L222:
	movslq	%eax, %rdi
	movq	%rdi, (%rsp)
	movl	(%rbx,%rdi,4), %edi
	cmpl	%edi, %eax
	jne	.L224
.L173:
	movl	%edi, (%rbx,%rdx,4)
	movl	%edi, %eax
	jmp	.L172
.L221:
	movslq	%edi, %rax
	movq	%rax, (%rsp)
	movl	(%rbx,%rax,4), %eax
	cmpl	%eax, %edi
	jne	.L225
.L165:
	movl	%eax, (%rbx,%rdx,4)
	movl	%eax, %edi
	jmp	.L164
.L225:
	movl	%eax, %edi
	movq	%rdx, 8(%rsp)
	call	root
	movq	(%rsp), %rdi
	movq	8(%rsp), %rdx
	movl	%eax, (%rbx,%rdi,4)
	jmp	.L165
.L224:
	movq	%rdx, 8(%rsp)
	call	root
	movq	8(%rsp), %rdx
	movl	%eax, %edi
	movq	(%rsp), %rax
	movl	%edi, (%rbx,%rax,4)
	jmp	.L173
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	ans
	.bss
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	r
	.align 32
	.type	r, @object
	.size	r, 200
r:
	.zero	200
	.globl	l
	.align 32
	.type	l, @object
	.size	l, 200
l:
	.zero	200
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 200
a:
	.zero	200
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC1:
	.long	4
	.long	5
	.long	6
	.long	7
	.align 16
.LC2:
	.long	8
	.long	9
	.long	10
	.long	11
	.align 16
.LC3:
	.long	12
	.long	13
	.long	14
	.long	15
	.align 16
.LC4:
	.long	16
	.long	17
	.long	18
	.long	19
	.align 16
.LC5:
	.long	20
	.long	21
	.long	22
	.long	23
	.align 16
.LC6:
	.long	24
	.long	25
	.long	26
	.long	27
	.align 16
.LC7:
	.long	28
	.long	29
	.long	30
	.long	31
	.align 16
.LC8:
	.long	32
	.long	33
	.long	34
	.long	35
	.align 16
.LC9:
	.long	36
	.long	37
	.long	38
	.long	39
	.align 16
.LC10:
	.long	40
	.long	41
	.long	42
	.long	43
	.align 16
.LC11:
	.long	44
	.long	45
	.long	46
	.long	47
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
int N,M;
int a[50];
int l[50];
int r[50];
int ans=0;

void init();
int root(int x);
void unite(int x,int y);
int query(int x,int y);
int judge();

int main(){
	scanf("%d%d",&N,&M);
	
	int i;
	for(i=0;i<M;i++){
		scanf("%d%d",&l[i],&r[i]);
		l[i]--;
		r[i]--;
	}
	
	for(i=0;i<M;i++){
		init();
		
		int j;
		for(j=0;j<M;j++){
			if(j==i)continue;
			unite(l[j],r[j]);
		}
		
		if(judge()==0)ans++;
	}
	
	printf("%d\n",ans);
	return 0;
}

void init(){
	for(int i=0;i<N;i++)a[i]=i;
}

int root(int x){
	if(a[x]==x)return x;
	else return a[x]=root(a[x]);
}

void unite(int x,int y){
	x=root(x);
	y=root(y);
	if(x==y)return;
	a[x]=y;
}

int query(int x,int y){
	if(root(x)==root(y))return 1;
	return 0;
}

int judge(){
	for(int i=0;i<N;i++){
		for(int j=i+1;j<N;j++){
			if(query(i,j)==0)return 0;
		}
	}
	return 1;
}
3 2
1 2
1 3
2 3
 6 5
1 2
2 3
3 4
3 5
5 6
 3 0
2 2
1 3
3 3
 6 1
2 1
1 1
1 3
 3 2
2 2
1 3
2 3
 3 2
2 1
1 3
2 3
 6 5
1 2
2 3
3 4
4 5
2 6
 6 5
1 4
2 3
3 4
3 5
5 6
 3 2
2 2
1 3
3 3
 6 5
1 4
2 4
3 4
3 5
5 6

2
 5
 0
 1
 2
 2
 5
 5
 2
 5

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

```c
#include<stdio.h>
int N,M;
int a[50];
int l[50];
int r[50];
int ans=0;

void init();
int root(int x);
void unite(int x,int y);
int query(int x,int y);
int judge();

int main(){
	scanf("%d%d",&N,&M);
	
	int i;
	for(i=0;i<M;i++){
		scanf("%d%d",&l[i],&r[i]);
		l[i]--;
		r[i]--;
	}
	
	for(i=0;i<M;i++){
		init();
		
		int j;
		for(j=0;j<M;j++){
			if(j==i)continue;
			unite(l[j],r[j]);
		}
		
		if(judge()==0)ans++;
	}
	
	printf("%d\n",ans);
	return 0;
}

void init(){
	for(int i=0;i<N;i++)a[i]=i;
}

int root(int x){
	if(a[x]==x)return x;
	else return a[x]=root(a[x]);
}

void unite(int x,int y){
	x=root(x);
	y=root(y);
	if(x==y)return;
	a[x]=y;
}

int query(int x,int y){
	if(root(x)==root(y))return 1;
	return 0;
}

int judge(){
	for(int i=0;i<N;i++){
		for(int j=i+1;j<N;j++){
			if(query(i,j)==0)return 0;
		}
	}
	return 1;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 200
a:
	.zero	200
	.globl	l
	.align 32
	.type	l, @object
	.size	l, 200
l:
	.zero	200
	.globl	r
	.align 32
	.type	r, @object
	.size	r, 200
r:
	.zero	200
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	leaq	M(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8(%rbp)
	jmp	.L2
.L3:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	r(%rip), %rax
	addq	%rax, %rdx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	l(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	r(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	r(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L2:
	movl	M(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L3
	movl	$0, -8(%rbp)
	jmp	.L4
.L10:
	movl	$0, %eax
	call	init
	movl	$0, -4(%rbp)
	jmp	.L5
.L8:
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	je	.L12
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	r(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	l(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	unite
	jmp	.L7
.L12:
	nop
.L7:
	addl	$1, -4(%rbp)
.L5:
	movl	M(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L8
	movl	$0, %eax
	call	judge
	testl	%eax, %eax
	jne	.L9
	movl	ans(%rip), %eax
	addl	$1, %eax
	movl	%eax, ans(%rip)
.L9:
	addl	$1, -8(%rbp)
.L4:
	movl	M(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L10
	movl	ans(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	init
	.type	init, @function
init:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -4(%rbp)
	jmp	.L14
.L15:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L14:
	movl	N(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L15
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	init, .-init
	.globl	root
	.type	root, @function
root:
.LFB2:
	.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	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jne	.L17
	movl	-4(%rbp), %eax
	jmp	.L18
.L17:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	root
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	root, .-root
	.globl	unite
	.type	unite, @function
unite:
.LFB3:
	.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	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	root
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, %edi
	call	root
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	je	.L22
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L19
.L22:
	nop
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	unite, .-unite
	.globl	query
	.type	query, @function
query:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	root
	movl	%eax, %ebx
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	root
	cmpl	%eax, %ebx
	jne	.L24
	movl	$1, %eax
	jmp	.L25
.L24:
	movl	$0, %eax
.L25:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	query, .-query
	.globl	judge
	.type	judge, @function
judge:
.LFB5:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	jmp	.L27
.L32:
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L28
.L31:
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	query
	testl	%eax, %eax
	jne	.L29
	movl	$0, %eax
	jmp	.L30
.L29:
	addl	$1, -4(%rbp)
.L28:
	movl	N(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L31
	addl	$1, -8(%rbp)
.L27:
	movl	N(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L32
	movl	$1, %eax
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	judge, .-judge
	.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	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 200
a:
	.zero	200
	.globl	l
	.align 32
	.type	l, @object
	.size	l, 200
l:
	.zero	200
	.globl	r
	.align 32
	.type	r, @object
	.size	r, 200
r:
	.zero	200
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	leaq	M(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8(%rbp)
	jmp	.L2
.L3:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	r(%rip), %rax
	addq	%rax, %rdx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	l(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	r(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	r(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L2:
	movl	M(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L3
	movl	$0, -8(%rbp)
	jmp	.L4
.L10:
	movl	$0, %eax
	call	init
	movl	$0, -4(%rbp)
	jmp	.L5
.L8:
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	je	.L12
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	r(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	l(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	unite
	jmp	.L7
.L12:
	nop
.L7:
	addl	$1, -4(%rbp)
.L5:
	movl	M(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L8
	movl	$0, %eax
	call	judge
	testl	%eax, %eax
	jne	.L9
	movl	ans(%rip), %eax
	addl	$1, %eax
	movl	%eax, ans(%rip)
.L9:
	addl	$1, -8(%rbp)
.L4:
	movl	M(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L10
	movl	ans(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	init
	.type	init, @function
init:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -4(%rbp)
	jmp	.L14
.L15:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L14:
	movl	N(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L15
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	init, .-init
	.globl	root
	.type	root, @function
root:
.LFB2:
	.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	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jne	.L17
	movl	-4(%rbp), %eax
	jmp	.L18
.L17:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	root
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	root, .-root
	.globl	unite
	.type	unite, @function
unite:
.LFB3:
	.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	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	root
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, %edi
	call	root
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	je	.L22
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L19
.L22:
	nop
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	unite, .-unite
	.globl	query
	.type	query, @function
query:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	root
	movl	%eax, %ebx
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	root
	cmpl	%eax, %ebx
	jne	.L24
	movl	$1, %eax
	jmp	.L25
.L24:
	movl	$0, %eax
.L25:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	query, .-query
	.globl	judge
	.type	judge, @function
judge:
.LFB5:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	jmp	.L27
.L32:
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L28
.L31:
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	query
	testl	%eax, %eax
	jne	.L29
	movl	$0, %eax
	jmp	.L30
.L29:
	addl	$1, -4(%rbp)
.L28:
	movl	N(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L31
	addl	$1, -8(%rbp)
.L27:
	movl	N(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L32
	movl	$1, %eax
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	judge, .-judge
	.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:
