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>

long n,m,par[200000];

long find(long x){
	if(x!=par[x]) par[x]=find(par[x]);
	return par[x];
}

int main(){
	long i,x,y;
	scanf("%ld %ld",&n,&m);
	for(i=0;i<n+m;i++){
		par[i]=i;
	}
	for(i=0;i<n;i++){
		scanf("%ld",&x);
		while(x){
			scanf("%ld",&y);
			y=y-1+n;
			par[find(i)]=find(y);
			x--;
		}
	}
	for(i=0;i<n;i++){
		if(find(i)!=find(0)){
			printf("NO\n");
			return 0;
		}
	}
	printf("YES\n");
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.globl	m
	.align 8
	.type	m, @object
	.size	m, 8
m:
	.zero	8
	.globl	par
	.align 32
	.type	par, @object
	.size	par, 1600000
par:
	.zero	1600000
	.text
	.globl	find
	.type	find, @function
find:
.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
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	par(%rip), %rax
	movq	(%rdx,%rax), %rax
	cmpq	%rax, -8(%rbp)
	je	.L2
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	par(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rdi
	call	find
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	par(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L2:
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	par(%rip), %rax
	movq	(%rdx,%rax), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	find, .-find
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld"
.LC2:
	.string	"NO"
.LC3:
	.string	"YES"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	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
	movq	$0, -32(%rbp)
	jmp	.L5
.L6:
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	par(%rip), %rdx
	movq	-32(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	addq	$1, -32(%rbp)
.L5:
	movq	n(%rip), %rdx
	movq	m(%rip), %rax
	addq	%rdx, %rax
	cmpq	%rax, -32(%rbp)
	jl	.L6
	movq	$0, -32(%rbp)
	jmp	.L7
.L10:
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L8
.L9:
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	n(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, -40(%rbp)
	movq	-40(%rbp), %rbx
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	find
	movq	%rax, %r12
	movq	%rbx, %rdi
	call	find
	leaq	0(,%r12,8), %rcx
	leaq	par(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movq	-48(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -48(%rbp)
.L8:
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	jne	.L9
	addq	$1, -32(%rbp)
.L7:
	movq	n(%rip), %rax
	cmpq	%rax, -32(%rbp)
	jl	.L10
	movq	$0, -32(%rbp)
	jmp	.L11
.L14:
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	find
	movq	%rax, %rbx
	movl	$0, %edi
	call	find
	cmpq	%rax, %rbx
	je	.L12
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L15
.L12:
	addq	$1, -32(%rbp)
.L11:
	movq	n(%rip), %rax
	cmpq	%rax, -32(%rbp)
	jl	.L14
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L15:
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	find
	.type	find, @function
find:
.LFB23:
	.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
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	par(%rip), %rbx
	movq	(%rbx,%rdi,8), %rbp
	cmpq	%rdi, %rbp
	jne	.L8
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movq	%r12, %rax
	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
.L8:
	.cfi_restore_state
	movq	(%rbx,%rbp,8), %r13
	cmpq	%r13, %rbp
	je	.L3
	movq	(%rbx,%r13,8), %r14
	cmpq	%r14, %r13
	jne	.L9
.L4:
	movq	%r14, (%rbx,%rbp,8)
	movq	%r14, %r13
.L3:
	movq	%r13, (%rbx,%r12,8)
	movq	%r13, %r12
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movq	%r12, %rax
	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
.L9:
	.cfi_restore_state
	movq	(%rbx,%r14,8), %rdi
	cmpq	%rdi, %r14
	je	.L5
	call	find
	movq	%rax, (%rbx,%r14,8)
	movq	%rax, %rdi
.L5:
	movq	%rdi, (%rbx,%r13,8)
	movq	%rdi, %r14
	jmp	.L4
	.cfi_endproc
.LFE23:
	.size	find, .-find
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%ld %ld"
.LC3:
	.string	"YES"
.LC4:
	.string	"%ld"
.LC5:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	leaq	m(%rip), %rdx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC1(%rip), %rdi
	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
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	n(%rip), %rsi
	movq	m(%rip), %rcx
	addq	%rsi, %rcx
	testq	%rcx, %rcx
	jle	.L17
	cmpq	$1, %rcx
	je	.L51
	movq	%rcx, %rdx
	leaq	par(%rip), %rbx
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC2(%rip), %xmm2
	shrq	%rdx
	movq	%rbx, %rax
	salq	$4, %rdx
	addq	%rbx, %rdx
	.p2align 4,,10
	.p2align 3
.L15:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddq	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rax, %rdx
	jne	.L15
	movq	%rcx, %rax
	andq	$-2, %rax
	andl	$1, %ecx
	je	.L17
.L14:
	movq	%rax, (%rbx,%rax,8)
.L17:
	testq	%rsi, %rsi
	jle	.L13
	leaq	par(%rip), %rbx
	xorl	%ebp, %ebp
	leaq	24(%rsp), %r15
	movq	%rbx, %r12
	leaq	.LC4(%rip), %r13
	leaq	32(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%eax, %eax
	movq	%r15, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	cmpq	$0, 24(%rsp)
	je	.L37
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	32(%rsp), %rdx
	movq	n(%rip), %rax
	movq	%rbp, %rsi
	leaq	-1(%rdx,%rax), %rcx
	movq	(%r12), %rdx
	movq	%rcx, 32(%rsp)
	cmpq	%rbp, %rdx
	je	.L23
	movq	(%rbx,%rdx,8), %rsi
	cmpq	%rsi, %rdx
	je	.L24
	movq	(%rbx,%rsi,8), %r8
	cmpq	%r8, %rsi
	je	.L25
	movq	(%rbx,%r8,8), %r9
	cmpq	%r9, %r8
	je	.L26
	movq	(%rbx,%r9,8), %r10
	cmpq	%r10, %r9
	je	.L27
	movq	(%rbx,%r10,8), %r11
	cmpq	%r11, %r10
	je	.L28
	movq	(%rbx,%r11,8), %rdi
	cmpq	%rdi, %r11
	jne	.L65
.L29:
	movq	(%rbx,%r11,8), %r11
	movq	%r11, (%rbx,%r10,8)
.L28:
	movq	%r11, (%rbx,%r9,8)
	movq	%r11, %r10
.L27:
	movq	%r10, (%rbx,%r8,8)
	movq	%r10, %r9
.L26:
	movq	%r9, (%rbx,%rsi,8)
	movq	%r9, %r8
.L25:
	movq	%r8, (%rbx,%rdx,8)
	movq	%r8, %rsi
.L24:
	movq	%rsi, (%r12)
.L23:
	movq	(%rbx,%rcx,8), %rdx
	cmpq	%rdx, %rcx
	je	.L30
	movq	(%rbx,%rdx,8), %r8
	cmpq	%r8, %rdx
	je	.L31
	movq	(%rbx,%r8,8), %r9
	cmpq	%r9, %r8
	je	.L32
	movq	(%rbx,%r9,8), %r10
	cmpq	%r10, %r9
	je	.L33
	movq	(%rbx,%r10,8), %r11
	cmpq	%r11, %r10
	je	.L34
	movq	(%rbx,%r11,8), %rax
	movq	%rax, 8(%rsp)
	cmpq	%rax, %r11
	je	.L35
	movq	(%rbx,%rax,8), %rdi
	cmpq	%rdi, %rax
	jne	.L66
.L36:
	movq	8(%rsp), %rax
	movq	(%rbx,%rax,8), %rax
	movq	%rax, 8(%rsp)
	movq	%rax, (%rbx,%r11,8)
.L35:
	movq	8(%rsp), %rax
	movq	%rax, (%rbx,%r10,8)
	movq	%rax, %r11
.L34:
	movq	%r11, (%rbx,%r9,8)
	movq	%r11, %r10
.L33:
	movq	%r10, (%rbx,%r8,8)
	movq	%r10, %r9
.L32:
	movq	%r9, (%rbx,%rdx,8)
	movq	%r9, %r8
.L31:
	movq	%r8, (%rbx,%rcx,8)
	movq	%r8, %rdx
.L30:
	subq	$1, 24(%rsp)
	movq	%rdx, (%rbx,%rsi,8)
	jne	.L20
.L37:
	movq	n(%rip), %rax
	addq	$1, %rbp
	addq	$8, %r12
	cmpq	%rbp, %rax
	jg	.L21
	testq	%rax, %rax
	jle	.L13
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L49:
	movq	(%rbx,%rdx,8), %rcx
	movq	%rdx, %rsi
	cmpq	%rdx, %rcx
	je	.L38
	movq	(%rbx,%rcx,8), %rsi
	cmpq	%rsi, %rcx
	je	.L39
	movq	(%rbx,%rsi,8), %r8
	cmpq	%r8, %rsi
	je	.L40
	movq	(%rbx,%r8,8), %r9
	cmpq	%r9, %r8
	je	.L41
	movq	(%rbx,%r9,8), %rdi
	cmpq	%rdi, %r9
	jne	.L67
.L42:
	movq	(%rbx,%r9,8), %rax
	movq	%rax, (%rbx,%r8,8)
.L41:
	movq	(%rbx,%r8,8), %r8
	movq	%r8, (%rbx,%rsi,8)
.L40:
	movq	%r8, (%rbx,%rcx,8)
	movq	%r8, %rsi
.L39:
	movq	%rsi, (%rbx,%rdx,8)
.L38:
	movq	(%rbx), %rcx
	testq	%rcx, %rcx
	je	.L43
	movq	(%rbx,%rcx,8), %r8
	cmpq	%r8, %rcx
	je	.L44
	movq	(%rbx,%r8,8), %r9
	cmpq	%r9, %r8
	je	.L45
	movq	(%rbx,%r9,8), %r10
	cmpq	%r10, %r9
	je	.L46
	movq	(%rbx,%r10,8), %rdi
	cmpq	%rdi, %r10
	jne	.L68
.L47:
	movq	(%rbx,%r10,8), %rax
	movq	%rax, (%rbx,%r9,8)
.L46:
	movq	(%rbx,%r9,8), %r9
	movq	%r9, (%rbx,%r8,8)
.L45:
	movq	%r9, (%rbx,%rcx,8)
	movq	%r9, %r8
.L44:
	movq	%r8, (%rbx)
	movq	%r8, %rcx
.L43:
	cmpq	%rcx, %rsi
	jne	.L69
	addq	$1, %rdx
	cmpq	%rdx, n(%rip)
	jg	.L49
.L13:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L19:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L70
	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
.L66:
	.cfi_restore_state
	call	find
	movq	8(%rsp), %rdi
	movq	%rax, (%rbx,%rdi,8)
	jmp	.L36
.L65:
	call	find
	movq	%rax, (%rbx,%r11,8)
	jmp	.L29
.L68:
	call	find
	movq	%rax, (%rbx,%r10,8)
	jmp	.L47
.L67:
	call	find
	movq	%rax, (%rbx,%r9,8)
	jmp	.L42
.L69:
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
	jmp	.L19
.L51:
	xorl	%eax, %eax
	leaq	par(%rip), %rbx
	jmp	.L14
.L70:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	par
	.bss
	.align 32
	.type	par, @object
	.size	par, 1600000
par:
	.zero	1600000
	.globl	m
	.align 8
	.type	m, @object
	.size	m, 8
m:
	.zero	8
	.globl	n
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.quad	0
	.quad	1
	.align 16
.LC2:
	.quad	2
	.quad	2
	.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	find
	.type	find, @function
find:
.LFB23:
	.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
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	par(%rip), %rbx
	movq	(%rbx,%rdi,8), %rbp
	cmpq	%rdi, %rbp
	jne	.L8
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movq	%r12, %rax
	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
.L8:
	.cfi_restore_state
	movq	(%rbx,%rbp,8), %r13
	cmpq	%r13, %rbp
	je	.L3
	movq	(%rbx,%r13,8), %r14
	cmpq	%r14, %r13
	jne	.L9
.L4:
	movq	%r14, (%rbx,%rbp,8)
	movq	%r14, %r13
.L3:
	movq	%r13, (%rbx,%r12,8)
	movq	%r13, %r12
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movq	%r12, %rax
	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
.L9:
	.cfi_restore_state
	movq	(%rbx,%r14,8), %rdi
	cmpq	%rdi, %r14
	je	.L5
	call	find
	movq	%rax, (%rbx,%r14,8)
	movq	%rax, %rdi
.L5:
	movq	%rdi, (%rbx,%r13,8)
	movq	%rdi, %r14
	jmp	.L4
	.cfi_endproc
.LFE23:
	.size	find, .-find
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%ld %ld"
.LC3:
	.string	"YES"
.LC4:
	.string	"%ld"
.LC5:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	leaq	m(%rip), %rdx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC1(%rip), %rdi
	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
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	n(%rip), %rsi
	movq	m(%rip), %rcx
	addq	%rsi, %rcx
	testq	%rcx, %rcx
	jle	.L17
	cmpq	$1, %rcx
	je	.L51
	movq	%rcx, %rdx
	leaq	par(%rip), %rbx
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC2(%rip), %xmm2
	shrq	%rdx
	movq	%rbx, %rax
	salq	$4, %rdx
	addq	%rbx, %rdx
	.p2align 4,,10
	.p2align 3
.L15:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddq	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rax, %rdx
	jne	.L15
	movq	%rcx, %rax
	andq	$-2, %rax
	andl	$1, %ecx
	je	.L17
.L14:
	movq	%rax, (%rbx,%rax,8)
.L17:
	testq	%rsi, %rsi
	jle	.L13
	leaq	par(%rip), %rbx
	xorl	%ebp, %ebp
	leaq	24(%rsp), %r15
	movq	%rbx, %r12
	leaq	.LC4(%rip), %r13
	leaq	32(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%eax, %eax
	movq	%r15, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	cmpq	$0, 24(%rsp)
	je	.L37
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	32(%rsp), %rdx
	movq	n(%rip), %rax
	movq	%rbp, %rsi
	leaq	-1(%rdx,%rax), %rcx
	movq	(%r12), %rdx
	movq	%rcx, 32(%rsp)
	cmpq	%rbp, %rdx
	je	.L23
	movq	(%rbx,%rdx,8), %rsi
	cmpq	%rsi, %rdx
	je	.L24
	movq	(%rbx,%rsi,8), %r8
	cmpq	%r8, %rsi
	je	.L25
	movq	(%rbx,%r8,8), %r9
	cmpq	%r9, %r8
	je	.L26
	movq	(%rbx,%r9,8), %r10
	cmpq	%r10, %r9
	je	.L27
	movq	(%rbx,%r10,8), %r11
	cmpq	%r11, %r10
	je	.L28
	movq	(%rbx,%r11,8), %rdi
	cmpq	%rdi, %r11
	jne	.L65
.L29:
	movq	(%rbx,%r11,8), %r11
	movq	%r11, (%rbx,%r10,8)
.L28:
	movq	%r11, (%rbx,%r9,8)
	movq	%r11, %r10
.L27:
	movq	%r10, (%rbx,%r8,8)
	movq	%r10, %r9
.L26:
	movq	%r9, (%rbx,%rsi,8)
	movq	%r9, %r8
.L25:
	movq	%r8, (%rbx,%rdx,8)
	movq	%r8, %rsi
.L24:
	movq	%rsi, (%r12)
.L23:
	movq	(%rbx,%rcx,8), %rdx
	cmpq	%rdx, %rcx
	je	.L30
	movq	(%rbx,%rdx,8), %r8
	cmpq	%r8, %rdx
	je	.L31
	movq	(%rbx,%r8,8), %r9
	cmpq	%r9, %r8
	je	.L32
	movq	(%rbx,%r9,8), %r10
	cmpq	%r10, %r9
	je	.L33
	movq	(%rbx,%r10,8), %r11
	cmpq	%r11, %r10
	je	.L34
	movq	(%rbx,%r11,8), %rax
	movq	%rax, 8(%rsp)
	cmpq	%rax, %r11
	je	.L35
	movq	(%rbx,%rax,8), %rdi
	cmpq	%rdi, %rax
	jne	.L66
.L36:
	movq	8(%rsp), %rax
	movq	(%rbx,%rax,8), %rax
	movq	%rax, 8(%rsp)
	movq	%rax, (%rbx,%r11,8)
.L35:
	movq	8(%rsp), %rax
	movq	%rax, (%rbx,%r10,8)
	movq	%rax, %r11
.L34:
	movq	%r11, (%rbx,%r9,8)
	movq	%r11, %r10
.L33:
	movq	%r10, (%rbx,%r8,8)
	movq	%r10, %r9
.L32:
	movq	%r9, (%rbx,%rdx,8)
	movq	%r9, %r8
.L31:
	movq	%r8, (%rbx,%rcx,8)
	movq	%r8, %rdx
.L30:
	subq	$1, 24(%rsp)
	movq	%rdx, (%rbx,%rsi,8)
	jne	.L20
.L37:
	movq	n(%rip), %rax
	addq	$1, %rbp
	addq	$8, %r12
	cmpq	%rbp, %rax
	jg	.L21
	testq	%rax, %rax
	jle	.L13
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L49:
	movq	(%rbx,%rdx,8), %rcx
	movq	%rdx, %rsi
	cmpq	%rdx, %rcx
	je	.L38
	movq	(%rbx,%rcx,8), %rsi
	cmpq	%rsi, %rcx
	je	.L39
	movq	(%rbx,%rsi,8), %r8
	cmpq	%r8, %rsi
	je	.L40
	movq	(%rbx,%r8,8), %r9
	cmpq	%r9, %r8
	je	.L41
	movq	(%rbx,%r9,8), %rdi
	cmpq	%rdi, %r9
	jne	.L67
.L42:
	movq	(%rbx,%r9,8), %rax
	movq	%rax, (%rbx,%r8,8)
.L41:
	movq	(%rbx,%r8,8), %r8
	movq	%r8, (%rbx,%rsi,8)
.L40:
	movq	%r8, (%rbx,%rcx,8)
	movq	%r8, %rsi
.L39:
	movq	%rsi, (%rbx,%rdx,8)
.L38:
	movq	(%rbx), %rcx
	testq	%rcx, %rcx
	je	.L43
	movq	(%rbx,%rcx,8), %r8
	cmpq	%r8, %rcx
	je	.L44
	movq	(%rbx,%r8,8), %r9
	cmpq	%r9, %r8
	je	.L45
	movq	(%rbx,%r9,8), %r10
	cmpq	%r10, %r9
	je	.L46
	movq	(%rbx,%r10,8), %rdi
	cmpq	%rdi, %r10
	jne	.L68
.L47:
	movq	(%rbx,%r10,8), %rax
	movq	%rax, (%rbx,%r9,8)
.L46:
	movq	(%rbx,%r9,8), %r9
	movq	%r9, (%rbx,%r8,8)
.L45:
	movq	%r9, (%rbx,%rcx,8)
	movq	%r9, %r8
.L44:
	movq	%r8, (%rbx)
	movq	%r8, %rcx
.L43:
	cmpq	%rcx, %rsi
	jne	.L69
	addq	$1, %rdx
	cmpq	%rdx, n(%rip)
	jg	.L49
.L13:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L19:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L70
	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
.L66:
	.cfi_restore_state
	call	find
	movq	8(%rsp), %rdi
	movq	%rax, (%rbx,%rdi,8)
	jmp	.L36
.L65:
	call	find
	movq	%rax, (%rbx,%r11,8)
	jmp	.L29
.L68:
	call	find
	movq	%rax, (%rbx,%r10,8)
	jmp	.L47
.L67:
	call	find
	movq	%rax, (%rbx,%r9,8)
	jmp	.L42
.L69:
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
	jmp	.L19
.L51:
	xorl	%eax, %eax
	leaq	par(%rip), %rbx
	jmp	.L14
.L70:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	par
	.bss
	.align 32
	.type	par, @object
	.size	par, 1600000
par:
	.zero	1600000
	.globl	m
	.align 8
	.type	m, @object
	.size	m, 8
m:
	.zero	8
	.globl	n
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.quad	0
	.quad	1
	.align 16
.LC2:
	.quad	2
	.quad	2
	.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>

long n,m,par[200000];

long find(long x){
	if(x!=par[x]) par[x]=find(par[x]);
	return par[x];
}

int main(){
	long i,x,y;
	scanf("%ld %ld",&n,&m);
	for(i=0;i<n+m;i++){
		par[i]=i;
	}
	for(i=0;i<n;i++){
		scanf("%ld",&x);
		while(x){
			scanf("%ld",&y);
			y=y-1+n;
			par[find(i)]=find(y);
			x--;
		}
	}
	for(i=0;i<n;i++){
		if(find(i)!=find(0)){
			printf("NO\n");
			return 0;
		}
	}
	printf("YES\n");
	return 0;
}

4 4
2 1 2
2 1 2
0 3
2 4 3
 4 6
3 2 3 3
2 4 2
2 4 6
1 6
 4 4
2 2 2
2 1 2
0 3
2 4 3
 4 4
2 2 2
2 1 2
1 3
2 4 3
 4 6
3 1 3 3
2 4 2
2 4 6
1 6
 4 4
2 2 2
2 2 2
0 3
2 4 3
 4 4
2 2 2
2 2 2
0 3
2 4 4
 4 6
3 2 3 4
2 4 2
2 4 6
1 6
 4 4
2 2 2
2 2 2
0 3
2 2 4
 4 4
2 2 2
2 2 2
0 3
2 1 4

NO
 YES
 NO
 NO
 NO
 NO
 NO
 YES
 NO
 NO

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>

long n,m,par[200000];

long find(long x){
	if(x!=par[x]) par[x]=find(par[x]);
	return par[x];
}

int main(){
	long i,x,y;
	scanf("%ld %ld",&n,&m);
	for(i=0;i<n+m;i++){
		par[i]=i;
	}
	for(i=0;i<n;i++){
		scanf("%ld",&x);
		while(x){
			scanf("%ld",&y);
			y=y-1+n;
			par[find(i)]=find(y);
			x--;
		}
	}
	for(i=0;i<n;i++){
		if(find(i)!=find(0)){
			printf("NO\n");
			return 0;
		}
	}
	printf("YES\n");
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.globl	m
	.align 8
	.type	m, @object
	.size	m, 8
m:
	.zero	8
	.globl	par
	.align 32
	.type	par, @object
	.size	par, 1600000
par:
	.zero	1600000
	.text
	.globl	find
	.type	find, @function
find:
.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
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	par(%rip), %rax
	movq	(%rdx,%rax), %rax
	cmpq	%rax, -8(%rbp)
	je	.L2
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	par(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rdi
	call	find
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	par(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L2:
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	par(%rip), %rax
	movq	(%rdx,%rax), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	find, .-find
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld"
.LC2:
	.string	"NO"
.LC3:
	.string	"YES"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	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
	movq	$0, -32(%rbp)
	jmp	.L5
.L6:
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	par(%rip), %rdx
	movq	-32(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	addq	$1, -32(%rbp)
.L5:
	movq	n(%rip), %rdx
	movq	m(%rip), %rax
	addq	%rdx, %rax
	cmpq	%rax, -32(%rbp)
	jl	.L6
	movq	$0, -32(%rbp)
	jmp	.L7
.L10:
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L8
.L9:
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	n(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, -40(%rbp)
	movq	-40(%rbp), %rbx
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	find
	movq	%rax, %r12
	movq	%rbx, %rdi
	call	find
	leaq	0(,%r12,8), %rcx
	leaq	par(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movq	-48(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -48(%rbp)
.L8:
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	jne	.L9
	addq	$1, -32(%rbp)
.L7:
	movq	n(%rip), %rax
	cmpq	%rax, -32(%rbp)
	jl	.L10
	movq	$0, -32(%rbp)
	jmp	.L11
.L14:
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	find
	movq	%rax, %rbx
	movl	$0, %edi
	call	find
	cmpq	%rax, %rbx
	je	.L12
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L15
.L12:
	addq	$1, -32(%rbp)
.L11:
	movq	n(%rip), %rax
	cmpq	%rax, -32(%rbp)
	jl	.L14
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L15:
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.globl	m
	.align 8
	.type	m, @object
	.size	m, 8
m:
	.zero	8
	.globl	par
	.align 32
	.type	par, @object
	.size	par, 1600000
par:
	.zero	1600000
	.text
	.globl	find
	.type	find, @function
find:
.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
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	par(%rip), %rax
	movq	(%rdx,%rax), %rax
	cmpq	%rax, -8(%rbp)
	je	.L2
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	par(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rdi
	call	find
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	par(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L2:
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	par(%rip), %rax
	movq	(%rdx,%rax), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	find, .-find
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld"
.LC2:
	.string	"NO"
.LC3:
	.string	"YES"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	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
	movq	$0, -32(%rbp)
	jmp	.L5
.L6:
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	par(%rip), %rdx
	movq	-32(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	addq	$1, -32(%rbp)
.L5:
	movq	n(%rip), %rdx
	movq	m(%rip), %rax
	addq	%rdx, %rax
	cmpq	%rax, -32(%rbp)
	jl	.L6
	movq	$0, -32(%rbp)
	jmp	.L7
.L10:
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L8
.L9:
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	n(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, -40(%rbp)
	movq	-40(%rbp), %rbx
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	find
	movq	%rax, %r12
	movq	%rbx, %rdi
	call	find
	leaq	0(,%r12,8), %rcx
	leaq	par(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movq	-48(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -48(%rbp)
.L8:
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	jne	.L9
	addq	$1, -32(%rbp)
.L7:
	movq	n(%rip), %rax
	cmpq	%rax, -32(%rbp)
	jl	.L10
	movq	$0, -32(%rbp)
	jmp	.L11
.L14:
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	find
	movq	%rax, %rbx
	movl	$0, %edi
	call	find
	cmpq	%rax, %rbx
	je	.L12
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L15
.L12:
	addq	$1, -32(%rbp)
.L11:
	movq	n(%rip), %rax
	cmpq	%rax, -32(%rbp)
	jl	.L14
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L15:
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
