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

```c
#include <stdio.h>
#include <math.h>

typedef long long ll;
#define MAX_N (200005)

int uf[MAX_N]; // union-find
int n;

void uf_init()
{
	for (int i = 0; i < n; i++) {
		uf[i] = i;
	}
}

int uf_root(int x)
{
	if (uf[x] == x)
	{
		return x;
	}
	else
	{
		uf[x] = uf_root(uf[x]);
		return uf[x];
	}
	
}

void uf_unite(int x, int y)
{
	int rx = uf_root(x);
	int ry = uf_root(y);
	if (rx == ry)
	{
		return;
	}
	uf[rx] = ry;
}

int main() {
	int m;
	scanf("%d %d", &n, &m);
	
	uf_init();
	for (int i = 0; i < m; i++) {
		int a, b;
		scanf("%d %d", &a, &b);
		a--;
		b--;
		uf_unite(a, b);
		
	}
	
	int gr[MAX_N]; // gr[x]: root(i) = x なるiの数(友達軍団の人数)
	for (int i = 0; i < n; i++) {
		gr[i] = 0;
	}
	for (int i = 0; i < n; i++) {
		gr[uf_root(i)]++;
	}
	
	int gr_max = -1;
	for (int i = 0; i < n; i++) {
		if (gr[i] > gr_max) {
			gr_max = gr[i];
		}
	}
	printf("%d", gr_max);
	
	
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	uf
	.bss
	.align 32
	.type	uf, @object
	.size	uf, 800020
uf:
	.zero	800020
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	uf_init
	.type	uf_init, @function
uf_init:
.LFB0:
	.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	.L2
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	uf(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L3
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	uf_init, .-uf_init
	.globl	uf_root
	.type	uf_root, @function
uf_root:
.LFB1:
	.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	uf(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jne	.L5
	movl	-4(%rbp), %eax
	jmp	.L6
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	uf(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	uf_root
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	uf(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	uf(%rip), %rax
	movl	(%rdx,%rax), %eax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	uf_root, .-uf_root
	.globl	uf_unite
	.type	uf_unite, @function
uf_unite:
.LFB2:
	.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	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	uf_root
	movl	%eax, -8(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	uf_root
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	je	.L10
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	uf(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L7
.L10:
	nop
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	uf_unite, .-uf_unite
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1344, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800064(%rbp), %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, %eax
	call	uf_init
	movl	$0, -800052(%rbp)
	jmp	.L12
.L13:
	leaq	-800056(%rbp), %rdx
	leaq	-800060(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-800060(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -800060(%rbp)
	movl	-800056(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -800056(%rbp)
	movl	-800056(%rbp), %edx
	movl	-800060(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	uf_unite
	addl	$1, -800052(%rbp)
.L12:
	movl	-800064(%rbp), %eax
	cmpl	%eax, -800052(%rbp)
	jl	.L13
	movl	$0, -800048(%rbp)
	jmp	.L14
.L15:
	movl	-800048(%rbp), %eax
	cltq
	movl	$0, -800032(%rbp,%rax,4)
	addl	$1, -800048(%rbp)
.L14:
	movl	n(%rip), %eax
	cmpl	%eax, -800048(%rbp)
	jl	.L15
	movl	$0, -800044(%rbp)
	jmp	.L16
.L17:
	movl	-800044(%rbp), %eax
	movl	%eax, %edi
	call	uf_root
	movslq	%eax, %rdx
	movl	-800032(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -800032(%rbp,%rax,4)
	addl	$1, -800044(%rbp)
.L16:
	movl	n(%rip), %eax
	cmpl	%eax, -800044(%rbp)
	jl	.L17
	movl	$-1, -800040(%rbp)
	movl	$0, -800036(%rbp)
	jmp	.L18
.L20:
	movl	-800036(%rbp), %eax
	cltq
	movl	-800032(%rbp,%rax,4), %eax
	cmpl	%eax, -800040(%rbp)
	jge	.L19
	movl	-800036(%rbp), %eax
	cltq
	movl	-800032(%rbp,%rax,4), %eax
	movl	%eax, -800040(%rbp)
.L19:
	addl	$1, -800036(%rbp)
.L18:
	movl	n(%rip), %eax
	cmpl	%eax, -800036(%rbp)
	jl	.L20
	movl	-800040(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	uf_init
	.type	uf_init, @function
uf_init:
.LFB23:
	.cfi_startproc
	endbr64
	movl	n(%rip), %ecx
	testl	%ecx, %ecx
	jle	.L1
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L6
	movl	%ecx, %edx
	leaq	uf(%rip), %rsi
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC1(%rip), %xmm2
	shrl	$2, %edx
	leaq	16(%rsi), %rdi
	movq	%rsi, %rax
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rdi, %rdx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L4
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L9
.L3:
	movslq	%eax, %rdx
	movl	%eax, (%rsi,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %ecx
	jle	.L1
	movslq	%edx, %rdi
	addl	$2, %eax
	movl	%edx, (%rsi,%rdi,4)
	cmpl	%eax, %ecx
	jle	.L1
	movslq	%eax, %rdx
	movl	%eax, (%rsi,%rdx,4)
.L1:
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	ret
.L6:
	xorl	%eax, %eax
	leaq	uf(%rip), %rsi
	jmp	.L3
	.cfi_endproc
.LFE23:
	.size	uf_init, .-uf_init
	.p2align 4
	.globl	uf_root
	.type	uf_root, @function
uf_root:
.LFB24:
	.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	uf(%rip), %rbx
	movq	%rbp, %rax
	movl	(%rbx,%rbp,4), %edx
	cmpl	%ebp, %edx
	jne	.L17
	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
.L17:
	.cfi_restore_state
	movslq	%edx, %r12
	movl	(%rbx,%r12,4), %eax
	cmpl	%eax, %edx
	je	.L12
	movslq	%eax, %r13
	movl	(%rbx,%r13,4), %edx
	cmpl	%edx, %eax
	jne	.L18
.L13:
	movl	%edx, (%rbx,%r12,4)
	movl	%edx, %eax
.L12:
	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
.L18:
	.cfi_restore_state
	movslq	%edx, %r14
	movl	(%rbx,%r14,4), %edi
	cmpl	%edi, %edx
	je	.L14
	call	uf_root
	movl	%eax, (%rbx,%r14,4)
	movl	%eax, %edi
.L14:
	movl	%edi, (%rbx,%r13,4)
	movl	%edi, %edx
	jmp	.L13
	.cfi_endproc
.LFE24:
	.size	uf_root, .-uf_root
	.p2align 4
	.globl	uf_unite
	.type	uf_unite, @function
uf_unite:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	uf(%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	.L38
	movslq	%r8d, %r9
	movl	(%rcx,%r9,4), %eax
	cmpl	%eax, %r8d
	jne	.L39
.L28:
	cmpl	%esi, %eax
	je	.L19
	movl	%eax, (%rcx,%rsi,4)
.L19:
	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
.L38:
	.cfi_restore_state
	movslq	%esi, %r10
	movl	(%rcx,%r10,4), %eax
	cmpl	%eax, %esi
	je	.L21
	movslq	%eax, %rsi
	movl	(%rcx,%rsi,4), %edx
	cmpl	%edx, %eax
	jne	.L40
.L22:
	movl	%edx, (%rcx,%r10,4)
	movl	%edx, %eax
.L21:
	movl	%eax, (%rcx,%r9,4)
	movslq	%r8d, %r9
	movslq	%eax, %rsi
	movl	(%rcx,%r9,4), %eax
	cmpl	%eax, %r8d
	je	.L28
.L39:
	movslq	%eax, %r8
	movl	(%rcx,%r8,4), %edx
	cmpl	%edx, %eax
	je	.L29
	movslq	%edx, %r10
	movl	(%rcx,%r10,4), %eax
	cmpl	%eax, %edx
	jne	.L41
.L30:
	movl	%eax, (%rcx,%r8,4)
	movl	%eax, %edx
.L29:
	movl	%edx, (%rcx,%r9,4)
	movl	%edx, %eax
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L41:
	movslq	%eax, %r11
	movl	(%rcx,%r11,4), %edx
	cmpl	%edx, %eax
	je	.L31
	movslq	%edx, %rbx
	movl	(%rcx,%rbx,4), %eax
	cmpl	%eax, %edx
	jne	.L42
.L32:
	movl	%eax, (%rcx,%r11,4)
	movl	%eax, %edx
.L31:
	movl	%edx, (%rcx,%r10,4)
	movl	%edx, %eax
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L40:
	movslq	%edx, %r11
	movl	(%rcx,%r11,4), %eax
	cmpl	%eax, %edx
	je	.L23
	movslq	%eax, %rbx
	movl	(%rcx,%rbx,4), %edx
	cmpl	%edx, %eax
	jne	.L43
.L24:
	movl	%edx, (%rcx,%r11,4)
	movl	%edx, %eax
.L23:
	movl	%eax, (%rcx,%rsi,4)
	movl	%eax, %edx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L43:
	movslq	%edx, %rbp
	movl	(%rcx,%rbp,4), %eax
	cmpl	%eax, %edx
	je	.L25
	movslq	%eax, %r12
	movl	(%rcx,%r12,4), %edx
	cmpl	%edx, %eax
	je	.L26
	movslq	%edx, %r13
	movl	(%rcx,%r13,4), %edi
	cmpl	%edi, %edx
	je	.L27
	call	uf_root
	movl	%eax, (%rcx,%r13,4)
	movl	%eax, %edi
.L27:
	movl	%edi, (%rcx,%r12,4)
	movl	%edi, %edx
.L26:
	movl	%edx, (%rcx,%rbp,4)
	movl	%edx, %eax
.L25:
	movl	%eax, (%rcx,%rbx,4)
	movl	%eax, %edx
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L42:
	movslq	%eax, %rbp
	movl	(%rcx,%rbp,4), %edx
	cmpl	%edx, %eax
	je	.L33
	movslq	%edx, %r12
	movl	(%rcx,%r12,4), %edi
	cmpl	%edi, %edx
	je	.L34
	movslq	%edi, %r13
	movl	(%rcx,%r13,4), %eax
	cmpl	%eax, %edi
	je	.L35
	movl	%eax, %edi
	call	uf_root
	movl	%eax, (%rcx,%r13,4)
.L35:
	movl	%eax, (%rcx,%r12,4)
	movl	%eax, %edi
.L34:
	movl	%edi, (%rcx,%rbp,4)
	movl	%edi, %edx
.L33:
	movl	%edx, (%rcx,%rbx,4)
	movl	%edx, %eax
	jmp	.L32
	.cfi_endproc
.LFE25:
	.size	uf_unite, .-uf_unite
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"%d %d"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1368, %rsp
	.cfi_def_cfa_offset 800144
	leaq	.LC2(%rip), %r12
	leaq	n(%rip), %rsi
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800072(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	n(%rip), %ebp
	testl	%ebp, %ebp
	jle	.L106
	leal	-1(%rbp), %eax
	cmpl	$2, %eax
	jbe	.L91
	movl	%ebp, %edx
	leaq	uf(%rip), %rbx
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC1(%rip), %xmm2
	shrl	$2, %edx
	leaq	16(%rbx), %rcx
	movq	%rbx, %rax
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L49:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rax, %rdx
	jne	.L49
	movl	%ebp, %eax
	andl	$-4, %eax
	testb	$3, %bpl
	je	.L53
.L48:
	movslq	%eax, %rdx
	movl	%eax, (%rbx,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%ebp, %edx
	jge	.L53
	movslq	%edx, %rcx
	addl	$2, %eax
	movl	%edx, (%rbx,%rcx,4)
	cmpl	%ebp, %eax
	jge	.L53
	movslq	%eax, %rdx
	movl	%eax, (%rbx,%rdx,4)
.L53:
	movl	36(%rsp), %eax
	testl	%eax, %eax
	jle	.L52
.L51:
	xorl	%ebp, %ebp
	leaq	44(%rsp), %r14
	leaq	40(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L47:
	movq	%r13, %rsi
	movq	%r12, %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	movl	44(%rsp), %edi
	subl	$1, %eax
	leal	-1(%rdi), %ecx
	movslq	%eax, %rsi
	movl	%eax, 40(%rsp)
	movslq	(%rbx,%rsi,4), %r9
	movl	%ecx, 44(%rsp)
	cmpl	%r9d, %eax
	je	.L56
	movslq	%r9d, %r8
	movl	(%rbx,%r8,4), %eax
	cmpl	%eax, %r9d
	je	.L57
	movslq	%eax, %r9
	movl	(%rbx,%r9,4), %edx
	cmpl	%edx, %eax
	je	.L58
	movslq	%edx, %r10
	movl	(%rbx,%r10,4), %eax
	cmpl	%eax, %edx
	jne	.L107
.L59:
	movl	%edx, (%rbx,%r9,4)
.L58:
	movl	%edx, (%rbx,%r8,4)
	movl	%edx, %eax
.L57:
	movl	%eax, (%rbx,%rsi,4)
	movslq	%eax, %r9
.L56:
	movslq	%ecx, %rsi
	movl	(%rbx,%rsi,4), %eax
	cmpl	%eax, %ecx
	je	.L65
	movslq	%eax, %rcx
	movl	(%rbx,%rcx,4), %edx
	cmpl	%edx, %eax
	je	.L66
	movslq	%edx, %r8
	movl	(%rbx,%r8,4), %eax
	cmpl	%eax, %edx
	je	.L67
	movslq	%eax, %r10
	movl	(%rbx,%r10,4), %edx
	cmpl	%edx, %eax
	jne	.L108
.L68:
	movl	%eax, (%rbx,%r8,4)
.L67:
	movl	%eax, (%rbx,%rcx,4)
	movl	%eax, %edx
.L66:
	movl	%edx, (%rbx,%rsi,4)
	movl	%edx, %eax
.L65:
	cmpl	%r9d, %eax
	je	.L74
	movl	%eax, (%rbx,%r9,4)
	addl	$1, %ebp
	cmpl	36(%rsp), %ebp
	jl	.L47
.L105:
	movl	n(%rip), %ebp
.L52:
	testl	%ebp, %ebp
	jle	.L55
	movslq	%ebp, %rdx
	leaq	48(%rsp), %r12
	xorl	%esi, %esi
	salq	$2, %rdx
	movq	%r12, %rdi
	call	memset@PLT
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L86:
	movl	(%rbx,%rcx,4), %edx
	movslq	%ecx, %rax
	cmpl	%ecx, %edx
	je	.L77
	movslq	%edx, %rsi
	movslq	(%rbx,%rsi,4), %rax
	cmpl	%eax, %edx
	je	.L78
	movslq	%eax, %r8
	movl	(%rbx,%r8,4), %edx
	cmpl	%edx, %eax
	je	.L79
	movslq	%edx, %r9
	movl	(%rbx,%r9,4), %eax
	cmpl	%eax, %edx
	jne	.L109
.L80:
	movl	%edx, (%rbx,%r8,4)
	movl	n(%rip), %ebp
.L79:
	movl	%edx, (%rbx,%rsi,4)
	movslq	%edx, %rax
.L78:
	movl	%eax, (%rbx,%rcx,4)
.L77:
	addq	$1, %rcx
	addl	$1, 48(%rsp,%rax,4)
	cmpl	%ecx, %ebp
	jg	.L86
	testl	%ebp, %ebp
	jle	.L55
	leal	-1(%rbp), %eax
	cmpl	$2, %eax
	jbe	.L95
	movl	%ebp, %edx
	movq	%r12, %rax
	pcmpeqd	%xmm0, %xmm0
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	64(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L88:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	pcmpgtd	-16(%rax), %xmm1
	pand	%xmm1, %xmm0
	pandn	-16(%rax), %xmm1
	por	%xmm1, %xmm0
	cmpq	%rdx, %rax
	jne	.L88
	movdqa	%xmm0, %xmm2
	movl	%ebp, %eax
	psrldq	$8, %xmm2
	andl	$-4, %eax
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %edx
	testb	$3, %bpl
	je	.L76
.L87:
	movslq	%eax, %rcx
	movl	48(%rsp,%rcx,4), %ecx
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	leal	1(%rax), %ecx
	cmpl	%ecx, %ebp
	jle	.L76
	movslq	%ecx, %rcx
	movl	48(%rsp,%rcx,4), %ecx
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	addl	$2, %eax
	cmpl	%eax, %ebp
	jle	.L76
	cltq
	movl	48(%rsp,%rax,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
.L76:
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800072(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L110
	addq	$800088, %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
.L74:
	.cfi_restore_state
	addl	$1, %ebp
	cmpl	%ebp, 36(%rsp)
	jg	.L47
	jmp	.L105
.L109:
	movslq	%eax, %r10
	movl	(%rbx,%r10,4), %edx
	cmpl	%edx, %eax
	je	.L81
	movslq	%edx, %r11
	movl	(%rbx,%r11,4), %eax
	cmpl	%eax, %edx
	jne	.L111
.L82:
	movl	%eax, (%rbx,%r10,4)
	movl	%eax, %edx
.L81:
	movl	%edx, (%rbx,%r9,4)
	jmp	.L80
.L108:
	movslq	%edx, %r11
	movl	(%rbx,%r11,4), %eax
	cmpl	%eax, %edx
	je	.L69
	movslq	%eax, %r15
	movl	(%rbx,%r15,4), %edi
	cmpl	%edi, %eax
	jne	.L112
.L70:
	movl	%edi, (%rbx,%r11,4)
	movl	%edi, %eax
.L69:
	movl	%eax, (%rbx,%r10,4)
	jmp	.L68
.L107:
	movslq	%eax, %r11
	movl	(%rbx,%r11,4), %edx
	cmpl	%edx, %eax
	je	.L60
	movslq	%edx, %r15
	movl	(%rbx,%r15,4), %eax
	cmpl	%eax, %edx
	jne	.L113
.L61:
	movl	%eax, (%rbx,%r11,4)
	movl	%eax, %edx
.L60:
	movl	%edx, (%rbx,%r10,4)
	jmp	.L59
.L113:
	movslq	%eax, %rdx
	movl	(%rbx,%rdx,4), %edi
	cmpl	%edi, %eax
	je	.L62
	movslq	%edi, %rax
	movq	%rax, 8(%rsp)
	movl	(%rbx,%rax,4), %eax
	cmpl	%eax, %edi
	jne	.L114
.L63:
	movl	%eax, (%rbx,%rdx,4)
	movl	%eax, %edi
.L62:
	movl	%edi, (%rbx,%r15,4)
	movl	%edi, %eax
	jmp	.L61
.L112:
	movslq	%edi, %rdx
	movl	(%rbx,%rdx,4), %eax
	cmpl	%eax, %edi
	je	.L71
	movslq	%eax, %rdi
	movq	%rdi, 8(%rsp)
	movl	(%rbx,%rdi,4), %edi
	cmpl	%edi, %eax
	jne	.L115
.L72:
	movl	%edi, (%rbx,%rdx,4)
	movl	%edi, %eax
.L71:
	movl	%eax, (%rbx,%r15,4)
	movl	%eax, %edi
	jmp	.L70
.L111:
	movslq	%eax, %rbp
	movl	(%rbx,%rbp,4), %edx
	cmpl	%edx, %eax
	je	.L83
	movslq	%edx, %r13
	movl	(%rbx,%r13,4), %eax
	cmpl	%eax, %edx
	jne	.L116
.L84:
	movl	%eax, (%rbx,%rbp,4)
	movl	%eax, %edx
.L83:
	movl	%edx, (%rbx,%r11,4)
	movl	%edx, %eax
	jmp	.L82
.L106:
	cmpl	$0, 36(%rsp)
	leaq	uf(%rip), %rbx
	jg	.L51
.L55:
	orl	$-1, %edx
	jmp	.L76
.L95:
	xorl	%eax, %eax
	orl	$-1, %edx
	jmp	.L87
.L91:
	xorl	%eax, %eax
	leaq	uf(%rip), %rbx
	jmp	.L48
.L116:
	movslq	%eax, %r14
	movl	(%rbx,%r14,4), %edi
	cmpl	%edi, %eax
	je	.L85
	call	uf_root
	movl	%eax, (%rbx,%r14,4)
	movl	%eax, %edi
.L85:
	movl	%edi, (%rbx,%r13,4)
	movl	%edi, %eax
	jmp	.L84
.L115:
	movslq	%edi, %rax
	movq	%rax, 16(%rsp)
	movl	(%rbx,%rax,4), %eax
	cmpl	%eax, %edi
	je	.L73
	movl	%eax, %edi
	movq	%rdx, 24(%rsp)
	call	uf_root
	movq	16(%rsp), %rdi
	movq	24(%rsp), %rdx
	movl	%eax, (%rbx,%rdi,4)
.L73:
	movq	8(%rsp), %rdi
	movl	%eax, (%rbx,%rdi,4)
	movl	%eax, %edi
	jmp	.L72
.L114:
	movslq	%eax, %rdi
	movq	%rdi, 16(%rsp)
	movl	(%rbx,%rdi,4), %edi
	cmpl	%edi, %eax
	je	.L64
	movq	%rdx, 24(%rsp)
	call	uf_root
	movq	24(%rsp), %rdx
	movl	%eax, %edi
	movq	16(%rsp), %rax
	movl	%edi, (%rbx,%rax,4)
.L64:
	movq	8(%rsp), %rax
	movl	%edi, (%rbx,%rax,4)
	movl	%edi, %eax
	jmp	.L63
.L110:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	uf
	.align 32
	.type	uf, @object
	.size	uf, 800020
uf:
	.zero	800020
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC1:
	.long	4
	.long	4
	.long	4
	.long	4
	.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	uf_init
	.type	uf_init, @function
uf_init:
.LFB23:
	.cfi_startproc
	endbr64
	movl	n(%rip), %ecx
	testl	%ecx, %ecx
	jle	.L1
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L6
	movl	%ecx, %edx
	leaq	uf(%rip), %rsi
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC1(%rip), %xmm2
	shrl	$2, %edx
	leaq	16(%rsi), %rdi
	movq	%rsi, %rax
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rdi, %rdx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L4
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L9
.L3:
	movslq	%eax, %rdx
	movl	%eax, (%rsi,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %ecx
	jle	.L1
	movslq	%edx, %rdi
	addl	$2, %eax
	movl	%edx, (%rsi,%rdi,4)
	cmpl	%eax, %ecx
	jle	.L1
	movslq	%eax, %rdx
	movl	%eax, (%rsi,%rdx,4)
.L1:
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	ret
.L6:
	xorl	%eax, %eax
	leaq	uf(%rip), %rsi
	jmp	.L3
	.cfi_endproc
.LFE23:
	.size	uf_init, .-uf_init
	.p2align 4
	.globl	uf_root
	.type	uf_root, @function
uf_root:
.LFB24:
	.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	uf(%rip), %rbx
	movq	%rbp, %rax
	movl	(%rbx,%rbp,4), %edx
	cmpl	%ebp, %edx
	jne	.L17
	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
.L17:
	.cfi_restore_state
	movslq	%edx, %r12
	movl	(%rbx,%r12,4), %eax
	cmpl	%eax, %edx
	je	.L12
	movslq	%eax, %r13
	movl	(%rbx,%r13,4), %edx
	cmpl	%edx, %eax
	jne	.L18
.L13:
	movl	%edx, (%rbx,%r12,4)
	movl	%edx, %eax
.L12:
	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
.L18:
	.cfi_restore_state
	movslq	%edx, %r14
	movl	(%rbx,%r14,4), %edi
	cmpl	%edi, %edx
	je	.L14
	call	uf_root
	movl	%eax, (%rbx,%r14,4)
	movl	%eax, %edi
.L14:
	movl	%edi, (%rbx,%r13,4)
	movl	%edi, %edx
	jmp	.L13
	.cfi_endproc
.LFE24:
	.size	uf_root, .-uf_root
	.p2align 4
	.globl	uf_unite
	.type	uf_unite, @function
uf_unite:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	uf(%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	.L38
	movslq	%r8d, %r9
	movl	(%rcx,%r9,4), %eax
	cmpl	%eax, %r8d
	jne	.L39
.L28:
	cmpl	%esi, %eax
	je	.L19
	movl	%eax, (%rcx,%rsi,4)
.L19:
	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
.L38:
	.cfi_restore_state
	movslq	%esi, %r10
	movl	(%rcx,%r10,4), %eax
	cmpl	%eax, %esi
	je	.L21
	movslq	%eax, %rsi
	movl	(%rcx,%rsi,4), %edx
	cmpl	%edx, %eax
	jne	.L40
.L22:
	movl	%edx, (%rcx,%r10,4)
	movl	%edx, %eax
.L21:
	movl	%eax, (%rcx,%r9,4)
	movslq	%r8d, %r9
	movslq	%eax, %rsi
	movl	(%rcx,%r9,4), %eax
	cmpl	%eax, %r8d
	je	.L28
.L39:
	movslq	%eax, %r8
	movl	(%rcx,%r8,4), %edx
	cmpl	%edx, %eax
	je	.L29
	movslq	%edx, %r10
	movl	(%rcx,%r10,4), %eax
	cmpl	%eax, %edx
	jne	.L41
.L30:
	movl	%eax, (%rcx,%r8,4)
	movl	%eax, %edx
.L29:
	movl	%edx, (%rcx,%r9,4)
	movl	%edx, %eax
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L41:
	movslq	%eax, %r11
	movl	(%rcx,%r11,4), %edx
	cmpl	%edx, %eax
	je	.L31
	movslq	%edx, %rbx
	movl	(%rcx,%rbx,4), %eax
	cmpl	%eax, %edx
	jne	.L42
.L32:
	movl	%eax, (%rcx,%r11,4)
	movl	%eax, %edx
.L31:
	movl	%edx, (%rcx,%r10,4)
	movl	%edx, %eax
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L40:
	movslq	%edx, %r11
	movl	(%rcx,%r11,4), %eax
	cmpl	%eax, %edx
	je	.L23
	movslq	%eax, %rbx
	movl	(%rcx,%rbx,4), %edx
	cmpl	%edx, %eax
	jne	.L43
.L24:
	movl	%edx, (%rcx,%r11,4)
	movl	%edx, %eax
.L23:
	movl	%eax, (%rcx,%rsi,4)
	movl	%eax, %edx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L43:
	movslq	%edx, %rbp
	movl	(%rcx,%rbp,4), %eax
	cmpl	%eax, %edx
	je	.L25
	movslq	%eax, %r12
	movl	(%rcx,%r12,4), %edx
	cmpl	%edx, %eax
	je	.L26
	movslq	%edx, %r13
	movl	(%rcx,%r13,4), %edi
	cmpl	%edi, %edx
	je	.L27
	call	uf_root
	movl	%eax, (%rcx,%r13,4)
	movl	%eax, %edi
.L27:
	movl	%edi, (%rcx,%r12,4)
	movl	%edi, %edx
.L26:
	movl	%edx, (%rcx,%rbp,4)
	movl	%edx, %eax
.L25:
	movl	%eax, (%rcx,%rbx,4)
	movl	%eax, %edx
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L42:
	movslq	%eax, %rbp
	movl	(%rcx,%rbp,4), %edx
	cmpl	%edx, %eax
	je	.L33
	movslq	%edx, %r12
	movl	(%rcx,%r12,4), %edi
	cmpl	%edi, %edx
	je	.L34
	movslq	%edi, %r13
	movl	(%rcx,%r13,4), %eax
	cmpl	%eax, %edi
	je	.L35
	movl	%eax, %edi
	call	uf_root
	movl	%eax, (%rcx,%r13,4)
.L35:
	movl	%eax, (%rcx,%r12,4)
	movl	%eax, %edi
.L34:
	movl	%edi, (%rcx,%rbp,4)
	movl	%edi, %edx
.L33:
	movl	%edx, (%rcx,%rbx,4)
	movl	%edx, %eax
	jmp	.L32
	.cfi_endproc
.LFE25:
	.size	uf_unite, .-uf_unite
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"%d %d"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1368, %rsp
	.cfi_def_cfa_offset 800144
	leaq	.LC2(%rip), %r12
	leaq	n(%rip), %rsi
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800072(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	n(%rip), %ebp
	testl	%ebp, %ebp
	jle	.L106
	leal	-1(%rbp), %eax
	cmpl	$2, %eax
	jbe	.L91
	movl	%ebp, %edx
	leaq	uf(%rip), %rbx
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC1(%rip), %xmm2
	shrl	$2, %edx
	leaq	16(%rbx), %rcx
	movq	%rbx, %rax
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L49:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rax, %rdx
	jne	.L49
	movl	%ebp, %eax
	andl	$-4, %eax
	testb	$3, %bpl
	je	.L53
.L48:
	movslq	%eax, %rdx
	movl	%eax, (%rbx,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%ebp, %edx
	jge	.L53
	movslq	%edx, %rcx
	addl	$2, %eax
	movl	%edx, (%rbx,%rcx,4)
	cmpl	%ebp, %eax
	jge	.L53
	movslq	%eax, %rdx
	movl	%eax, (%rbx,%rdx,4)
.L53:
	movl	36(%rsp), %eax
	testl	%eax, %eax
	jle	.L52
.L51:
	xorl	%ebp, %ebp
	leaq	44(%rsp), %r14
	leaq	40(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L47:
	movq	%r13, %rsi
	movq	%r12, %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	movl	44(%rsp), %edi
	subl	$1, %eax
	leal	-1(%rdi), %ecx
	movslq	%eax, %rsi
	movl	%eax, 40(%rsp)
	movslq	(%rbx,%rsi,4), %r9
	movl	%ecx, 44(%rsp)
	cmpl	%r9d, %eax
	je	.L56
	movslq	%r9d, %r8
	movl	(%rbx,%r8,4), %eax
	cmpl	%eax, %r9d
	je	.L57
	movslq	%eax, %r9
	movl	(%rbx,%r9,4), %edx
	cmpl	%edx, %eax
	je	.L58
	movslq	%edx, %r10
	movl	(%rbx,%r10,4), %eax
	cmpl	%eax, %edx
	jne	.L107
.L59:
	movl	%edx, (%rbx,%r9,4)
.L58:
	movl	%edx, (%rbx,%r8,4)
	movl	%edx, %eax
.L57:
	movl	%eax, (%rbx,%rsi,4)
	movslq	%eax, %r9
.L56:
	movslq	%ecx, %rsi
	movl	(%rbx,%rsi,4), %eax
	cmpl	%eax, %ecx
	je	.L65
	movslq	%eax, %rcx
	movl	(%rbx,%rcx,4), %edx
	cmpl	%edx, %eax
	je	.L66
	movslq	%edx, %r8
	movl	(%rbx,%r8,4), %eax
	cmpl	%eax, %edx
	je	.L67
	movslq	%eax, %r10
	movl	(%rbx,%r10,4), %edx
	cmpl	%edx, %eax
	jne	.L108
.L68:
	movl	%eax, (%rbx,%r8,4)
.L67:
	movl	%eax, (%rbx,%rcx,4)
	movl	%eax, %edx
.L66:
	movl	%edx, (%rbx,%rsi,4)
	movl	%edx, %eax
.L65:
	cmpl	%r9d, %eax
	je	.L74
	movl	%eax, (%rbx,%r9,4)
	addl	$1, %ebp
	cmpl	36(%rsp), %ebp
	jl	.L47
.L105:
	movl	n(%rip), %ebp
.L52:
	testl	%ebp, %ebp
	jle	.L55
	movslq	%ebp, %rdx
	leaq	48(%rsp), %r12
	xorl	%esi, %esi
	salq	$2, %rdx
	movq	%r12, %rdi
	call	memset@PLT
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L86:
	movl	(%rbx,%rcx,4), %edx
	movslq	%ecx, %rax
	cmpl	%ecx, %edx
	je	.L77
	movslq	%edx, %rsi
	movslq	(%rbx,%rsi,4), %rax
	cmpl	%eax, %edx
	je	.L78
	movslq	%eax, %r8
	movl	(%rbx,%r8,4), %edx
	cmpl	%edx, %eax
	je	.L79
	movslq	%edx, %r9
	movl	(%rbx,%r9,4), %eax
	cmpl	%eax, %edx
	jne	.L109
.L80:
	movl	%edx, (%rbx,%r8,4)
	movl	n(%rip), %ebp
.L79:
	movl	%edx, (%rbx,%rsi,4)
	movslq	%edx, %rax
.L78:
	movl	%eax, (%rbx,%rcx,4)
.L77:
	addq	$1, %rcx
	addl	$1, 48(%rsp,%rax,4)
	cmpl	%ecx, %ebp
	jg	.L86
	testl	%ebp, %ebp
	jle	.L55
	leal	-1(%rbp), %eax
	cmpl	$2, %eax
	jbe	.L95
	movl	%ebp, %edx
	movq	%r12, %rax
	pcmpeqd	%xmm0, %xmm0
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	64(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L88:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	pcmpgtd	-16(%rax), %xmm1
	pand	%xmm1, %xmm0
	pandn	-16(%rax), %xmm1
	por	%xmm1, %xmm0
	cmpq	%rdx, %rax
	jne	.L88
	movdqa	%xmm0, %xmm2
	movl	%ebp, %eax
	psrldq	$8, %xmm2
	andl	$-4, %eax
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %edx
	testb	$3, %bpl
	je	.L76
.L87:
	movslq	%eax, %rcx
	movl	48(%rsp,%rcx,4), %ecx
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	leal	1(%rax), %ecx
	cmpl	%ecx, %ebp
	jle	.L76
	movslq	%ecx, %rcx
	movl	48(%rsp,%rcx,4), %ecx
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	addl	$2, %eax
	cmpl	%eax, %ebp
	jle	.L76
	cltq
	movl	48(%rsp,%rax,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
.L76:
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800072(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L110
	addq	$800088, %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
.L74:
	.cfi_restore_state
	addl	$1, %ebp
	cmpl	%ebp, 36(%rsp)
	jg	.L47
	jmp	.L105
.L109:
	movslq	%eax, %r10
	movl	(%rbx,%r10,4), %edx
	cmpl	%edx, %eax
	je	.L81
	movslq	%edx, %r11
	movl	(%rbx,%r11,4), %eax
	cmpl	%eax, %edx
	jne	.L111
.L82:
	movl	%eax, (%rbx,%r10,4)
	movl	%eax, %edx
.L81:
	movl	%edx, (%rbx,%r9,4)
	jmp	.L80
.L108:
	movslq	%edx, %r11
	movl	(%rbx,%r11,4), %eax
	cmpl	%eax, %edx
	je	.L69
	movslq	%eax, %r15
	movl	(%rbx,%r15,4), %edi
	cmpl	%edi, %eax
	jne	.L112
.L70:
	movl	%edi, (%rbx,%r11,4)
	movl	%edi, %eax
.L69:
	movl	%eax, (%rbx,%r10,4)
	jmp	.L68
.L107:
	movslq	%eax, %r11
	movl	(%rbx,%r11,4), %edx
	cmpl	%edx, %eax
	je	.L60
	movslq	%edx, %r15
	movl	(%rbx,%r15,4), %eax
	cmpl	%eax, %edx
	jne	.L113
.L61:
	movl	%eax, (%rbx,%r11,4)
	movl	%eax, %edx
.L60:
	movl	%edx, (%rbx,%r10,4)
	jmp	.L59
.L113:
	movslq	%eax, %rdx
	movl	(%rbx,%rdx,4), %edi
	cmpl	%edi, %eax
	je	.L62
	movslq	%edi, %rax
	movq	%rax, 8(%rsp)
	movl	(%rbx,%rax,4), %eax
	cmpl	%eax, %edi
	jne	.L114
.L63:
	movl	%eax, (%rbx,%rdx,4)
	movl	%eax, %edi
.L62:
	movl	%edi, (%rbx,%r15,4)
	movl	%edi, %eax
	jmp	.L61
.L112:
	movslq	%edi, %rdx
	movl	(%rbx,%rdx,4), %eax
	cmpl	%eax, %edi
	je	.L71
	movslq	%eax, %rdi
	movq	%rdi, 8(%rsp)
	movl	(%rbx,%rdi,4), %edi
	cmpl	%edi, %eax
	jne	.L115
.L72:
	movl	%edi, (%rbx,%rdx,4)
	movl	%edi, %eax
.L71:
	movl	%eax, (%rbx,%r15,4)
	movl	%eax, %edi
	jmp	.L70
.L111:
	movslq	%eax, %rbp
	movl	(%rbx,%rbp,4), %edx
	cmpl	%edx, %eax
	je	.L83
	movslq	%edx, %r13
	movl	(%rbx,%r13,4), %eax
	cmpl	%eax, %edx
	jne	.L116
.L84:
	movl	%eax, (%rbx,%rbp,4)
	movl	%eax, %edx
.L83:
	movl	%edx, (%rbx,%r11,4)
	movl	%edx, %eax
	jmp	.L82
.L106:
	cmpl	$0, 36(%rsp)
	leaq	uf(%rip), %rbx
	jg	.L51
.L55:
	orl	$-1, %edx
	jmp	.L76
.L95:
	xorl	%eax, %eax
	orl	$-1, %edx
	jmp	.L87
.L91:
	xorl	%eax, %eax
	leaq	uf(%rip), %rbx
	jmp	.L48
.L116:
	movslq	%eax, %r14
	movl	(%rbx,%r14,4), %edi
	cmpl	%edi, %eax
	je	.L85
	call	uf_root
	movl	%eax, (%rbx,%r14,4)
	movl	%eax, %edi
.L85:
	movl	%edi, (%rbx,%r13,4)
	movl	%edi, %eax
	jmp	.L84
.L115:
	movslq	%edi, %rax
	movq	%rax, 16(%rsp)
	movl	(%rbx,%rax,4), %eax
	cmpl	%eax, %edi
	je	.L73
	movl	%eax, %edi
	movq	%rdx, 24(%rsp)
	call	uf_root
	movq	16(%rsp), %rdi
	movq	24(%rsp), %rdx
	movl	%eax, (%rbx,%rdi,4)
.L73:
	movq	8(%rsp), %rdi
	movl	%eax, (%rbx,%rdi,4)
	movl	%eax, %edi
	jmp	.L72
.L114:
	movslq	%eax, %rdi
	movq	%rdi, 16(%rsp)
	movl	(%rbx,%rdi,4), %edi
	cmpl	%edi, %eax
	je	.L64
	movq	%rdx, 24(%rsp)
	call	uf_root
	movq	24(%rsp), %rdx
	movl	%eax, %edi
	movq	16(%rsp), %rax
	movl	%edi, (%rbx,%rax,4)
.L64:
	movq	8(%rsp), %rax
	movl	%edi, (%rbx,%rax,4)
	movl	%edi, %eax
	jmp	.L63
.L110:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	uf
	.align 32
	.type	uf, @object
	.size	uf, 800020
uf:
	.zero	800020
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC1:
	.long	4
	.long	4
	.long	4
	.long	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>
#include <math.h>

typedef long long ll;
#define MAX_N (200005)

int uf[MAX_N]; // union-find
int n;

void uf_init()
{
	for (int i = 0; i < n; i++) {
		uf[i] = i;
	}
}

int uf_root(int x)
{
	if (uf[x] == x)
	{
		return x;
	}
	else
	{
		uf[x] = uf_root(uf[x]);
		return uf[x];
	}
	
}

void uf_unite(int x, int y)
{
	int rx = uf_root(x);
	int ry = uf_root(y);
	if (rx == ry)
	{
		return;
	}
	uf[rx] = ry;
}

int main() {
	int m;
	scanf("%d %d", &n, &m);
	
	uf_init();
	for (int i = 0; i < m; i++) {
		int a, b;
		scanf("%d %d", &a, &b);
		a--;
		b--;
		uf_unite(a, b);
		
	}
	
	int gr[MAX_N]; // gr[x]: root(i) = x なるiの数(友達軍団の人数)
	for (int i = 0; i < n; i++) {
		gr[i] = 0;
	}
	for (int i = 0; i < n; i++) {
		gr[uf_root(i)]++;
	}
	
	int gr_max = -1;
	for (int i = 0; i < n; i++) {
		if (gr[i] > gr_max) {
			gr_max = gr[i];
		}
	}
	printf("%d", gr_max);
	
	
	return 0;
}

10 4
3 1
3 1
5 9
2 6
 4 10
1 1
2 1
1 2
2 1
1 2
1 3
1 4
2 3
2 4
3 4
 2 0
1 1
2 1
1 6
2 1
1 2
1 3
1 4
3 3
2 4
4 4
 10 4
6 1
3 1
5 6
2 6
 5 2
1 4
3 4
3 1
 10 4
6 1
3 1
5 9
2 6
 4 10
1 1
2 1
1 2
2 1
1 2
1 3
1 4
1 3
2 4
3 4
 4 10
1 1
2 1
1 2
2 1
1 2
1 3
1 4
1 4
2 4
3 4
 5 3
1 2
3 4
3 1
 10 4
1 1
4 1
5 9
2 6

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

```c
#include <stdio.h>
#include <math.h>

typedef long long ll;
#define MAX_N (200005)

int uf[MAX_N]; // union-find
int n;

void uf_init()
{
	for (int i = 0; i < n; i++) {
		uf[i] = i;
	}
}

int uf_root(int x)
{
	if (uf[x] == x)
	{
		return x;
	}
	else
	{
		uf[x] = uf_root(uf[x]);
		return uf[x];
	}
	
}

void uf_unite(int x, int y)
{
	int rx = uf_root(x);
	int ry = uf_root(y);
	if (rx == ry)
	{
		return;
	}
	uf[rx] = ry;
}

int main() {
	int m;
	scanf("%d %d", &n, &m);
	
	uf_init();
	for (int i = 0; i < m; i++) {
		int a, b;
		scanf("%d %d", &a, &b);
		a--;
		b--;
		uf_unite(a, b);
		
	}
	
	int gr[MAX_N]; // gr[x]: root(i) = x なるiの数(友達軍団の人数)
	for (int i = 0; i < n; i++) {
		gr[i] = 0;
	}
	for (int i = 0; i < n; i++) {
		gr[uf_root(i)]++;
	}
	
	int gr_max = -1;
	for (int i = 0; i < n; i++) {
		if (gr[i] > gr_max) {
			gr_max = gr[i];
		}
	}
	printf("%d", gr_max);
	
	
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	uf
	.bss
	.align 32
	.type	uf, @object
	.size	uf, 800020
uf:
	.zero	800020
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	uf_init
	.type	uf_init, @function
uf_init:
.LFB0:
	.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	.L2
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	uf(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L3
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	uf_init, .-uf_init
	.globl	uf_root
	.type	uf_root, @function
uf_root:
.LFB1:
	.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	uf(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jne	.L5
	movl	-4(%rbp), %eax
	jmp	.L6
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	uf(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	uf_root
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	uf(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	uf(%rip), %rax
	movl	(%rdx,%rax), %eax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	uf_root, .-uf_root
	.globl	uf_unite
	.type	uf_unite, @function
uf_unite:
.LFB2:
	.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	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	uf_root
	movl	%eax, -8(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	uf_root
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	je	.L10
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	uf(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L7
.L10:
	nop
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	uf_unite, .-uf_unite
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1344, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800064(%rbp), %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, %eax
	call	uf_init
	movl	$0, -800052(%rbp)
	jmp	.L12
.L13:
	leaq	-800056(%rbp), %rdx
	leaq	-800060(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-800060(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -800060(%rbp)
	movl	-800056(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -800056(%rbp)
	movl	-800056(%rbp), %edx
	movl	-800060(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	uf_unite
	addl	$1, -800052(%rbp)
.L12:
	movl	-800064(%rbp), %eax
	cmpl	%eax, -800052(%rbp)
	jl	.L13
	movl	$0, -800048(%rbp)
	jmp	.L14
.L15:
	movl	-800048(%rbp), %eax
	cltq
	movl	$0, -800032(%rbp,%rax,4)
	addl	$1, -800048(%rbp)
.L14:
	movl	n(%rip), %eax
	cmpl	%eax, -800048(%rbp)
	jl	.L15
	movl	$0, -800044(%rbp)
	jmp	.L16
.L17:
	movl	-800044(%rbp), %eax
	movl	%eax, %edi
	call	uf_root
	movslq	%eax, %rdx
	movl	-800032(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -800032(%rbp,%rax,4)
	addl	$1, -800044(%rbp)
.L16:
	movl	n(%rip), %eax
	cmpl	%eax, -800044(%rbp)
	jl	.L17
	movl	$-1, -800040(%rbp)
	movl	$0, -800036(%rbp)
	jmp	.L18
.L20:
	movl	-800036(%rbp), %eax
	cltq
	movl	-800032(%rbp,%rax,4), %eax
	cmpl	%eax, -800040(%rbp)
	jge	.L19
	movl	-800036(%rbp), %eax
	cltq
	movl	-800032(%rbp,%rax,4), %eax
	movl	%eax, -800040(%rbp)
.L19:
	addl	$1, -800036(%rbp)
.L18:
	movl	n(%rip), %eax
	cmpl	%eax, -800036(%rbp)
	jl	.L20
	movl	-800040(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	uf
	.bss
	.align 32
	.type	uf, @object
	.size	uf, 800020
uf:
	.zero	800020
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	uf_init
	.type	uf_init, @function
uf_init:
.LFB0:
	.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	.L2
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	uf(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L3
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	uf_init, .-uf_init
	.globl	uf_root
	.type	uf_root, @function
uf_root:
.LFB1:
	.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	uf(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jne	.L5
	movl	-4(%rbp), %eax
	jmp	.L6
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	uf(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	uf_root
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	uf(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	uf(%rip), %rax
	movl	(%rdx,%rax), %eax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	uf_root, .-uf_root
	.globl	uf_unite
	.type	uf_unite, @function
uf_unite:
.LFB2:
	.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	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	uf_root
	movl	%eax, -8(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	uf_root
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	je	.L10
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	uf(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L7
.L10:
	nop
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	uf_unite, .-uf_unite
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1344, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800064(%rbp), %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, %eax
	call	uf_init
	movl	$0, -800052(%rbp)
	jmp	.L12
.L13:
	leaq	-800056(%rbp), %rdx
	leaq	-800060(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-800060(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -800060(%rbp)
	movl	-800056(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -800056(%rbp)
	movl	-800056(%rbp), %edx
	movl	-800060(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	uf_unite
	addl	$1, -800052(%rbp)
.L12:
	movl	-800064(%rbp), %eax
	cmpl	%eax, -800052(%rbp)
	jl	.L13
	movl	$0, -800048(%rbp)
	jmp	.L14
.L15:
	movl	-800048(%rbp), %eax
	cltq
	movl	$0, -800032(%rbp,%rax,4)
	addl	$1, -800048(%rbp)
.L14:
	movl	n(%rip), %eax
	cmpl	%eax, -800048(%rbp)
	jl	.L15
	movl	$0, -800044(%rbp)
	jmp	.L16
.L17:
	movl	-800044(%rbp), %eax
	movl	%eax, %edi
	call	uf_root
	movslq	%eax, %rdx
	movl	-800032(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -800032(%rbp,%rax,4)
	addl	$1, -800044(%rbp)
.L16:
	movl	n(%rip), %eax
	cmpl	%eax, -800044(%rbp)
	jl	.L17
	movl	$-1, -800040(%rbp)
	movl	$0, -800036(%rbp)
	jmp	.L18
.L20:
	movl	-800036(%rbp), %eax
	cltq
	movl	-800032(%rbp,%rax,4), %eax
	cmpl	%eax, -800040(%rbp)
	jge	.L19
	movl	-800036(%rbp), %eax
	cltq
	movl	-800032(%rbp,%rax,4), %eax
	movl	%eax, -800040(%rbp)
.L19:
	addl	$1, -800036(%rbp)
.L18:
	movl	n(%rip), %eax
	cmpl	%eax, -800036(%rbp)
	jl	.L20
	movl	-800040(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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:
