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>

#define MAX 100000

int list[MAX] = {0};

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

int find(int n){
    if(n==list[n]) return n;
    return list[n]=find(list[n]);
}

int unit_friend(int a,int b){
    if(find(a)==find(b)) return 1;
    else return 0;
}

void unit(int a,int b){
    a=find(a);
    b=find(b);
    
    if(a==b)return;
    
    list[b]=a;
}

int main(void){
    int user_num,friend,i,s,t,q;
    init();
    scanf("%d%d",&user_num,&friend);
    for(i=0;i<friend;i++){
        scanf("%d%d",&s,&t);
        unit(s,t);
    }
    scanf("%d",&q);
    for(i=0;i<q;i++){
        scanf("%d%d",&s,&t);
        if(unit_friend(s,t)==1) printf("yes\n");
        else printf("no\n");
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	list
	.bss
	.align 32
	.type	list, @object
	.size	list, 400000
list:
	.zero	400000
	.text
	.globl	init
	.type	init, @function
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	list(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L2:
	cmpl	$99999, -4(%rbp)
	jle	.L3
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	init, .-init
	.globl	find
	.type	find, @function
find:
.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	list(%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	list(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	find
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	list(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	list(%rip), %rax
	movl	(%rdx,%rax), %eax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	find, .-find
	.globl	unit_friend
	.type	unit_friend, @function
unit_friend:
.LFB2:
	.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	find
	movl	%eax, %ebx
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	find
	cmpl	%eax, %ebx
	jne	.L8
	movl	$1, %eax
	jmp	.L9
.L8:
	movl	$0, %eax
.L9:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	unit_friend, .-unit_friend
	.globl	unit
	.type	unit, @function
unit:
.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	find
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, %edi
	call	find
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	je	.L13
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	list(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L10
.L13:
	nop
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	unit, .-unit
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"yes"
.LC3:
	.string	"no"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, %eax
	call	init
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L15
.L16:
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	unit
	addl	$1, -12(%rbp)
.L15:
	movl	-28(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L16
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L17
.L20:
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	unit_friend
	cmpl	$1, %eax
	jne	.L18
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L19
.L18:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L19:
	addl	$1, -12(%rbp)
.L17:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L20
	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
.LFE4:
	.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	init
	.type	init, @function
init:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	list(%rip), %rax
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC1(%rip), %xmm2
	leaq	400000(%rax), %rdx
	.p2align 4,,10
	.p2align 3
.L2:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L2
	ret
	.cfi_endproc
.LFE23:
	.size	init, .-init
	.p2align 4
	.globl	find
	.type	find, @function
find:
.LFB24:
	.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
	movslq	%edi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	list(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	(%rbx,%rbp,4), %edx
	movl	%edx, %eax
	cmpl	%edi, %edx
	je	.L5
	movslq	%edx, %r12
	movl	(%rbx,%r12,4), %eax
	cmpl	%eax, %edx
	je	.L7
	movslq	%eax, %r13
	movl	(%rbx,%r13,4), %edx
	cmpl	%edx, %eax
	je	.L8
	movslq	%edx, %r14
	movl	(%rbx,%r14,4), %eax
	cmpl	%eax, %edx
	je	.L9
	movslq	%eax, %r15
	movl	(%rbx,%r15,4), %edx
	cmpl	%edx, %eax
	je	.L10
	movslq	%edx, %rcx
	movl	(%rbx,%rcx,4), %eax
	movq	%rcx, 8(%rsp)
	cmpl	%eax, %edx
	je	.L11
	movl	%eax, %edi
	call	find
	movq	8(%rsp), %rcx
	movl	%eax, (%rbx,%rcx,4)
.L11:
	movl	%eax, (%rbx,%r15,4)
.L10:
	movl	%eax, (%rbx,%r14,4)
.L9:
	movl	%eax, (%rbx,%r13,4)
.L8:
	movl	%eax, (%rbx,%r12,4)
.L7:
	movl	%eax, (%rbx,%rbp,4)
.L5:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE24:
	.size	find, .-find
	.p2align 4
	.globl	unit_friend
	.type	unit_friend, @function
unit_friend:
.LFB25:
	.cfi_startproc
	endbr64
	leaq	list(%rip), %r9
	movslq	%edi, %r10
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	%esi, %r8d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	(%r9,%r10,4), %esi
	cmpl	%esi, %edi
	je	.L18
	movslq	%esi, %r11
	movl	(%r9,%r11,4), %eax
	cmpl	%eax, %esi
	je	.L19
	movslq	%eax, %rbx
	movl	(%r9,%rbx,4), %esi
	cmpl	%esi, %eax
	je	.L20
	movslq	%esi, %rbp
	movl	(%r9,%rbp,4), %eax
	cmpl	%eax, %esi
	je	.L21
	movslq	%eax, %r12
	movl	(%r9,%r12,4), %esi
	cmpl	%esi, %eax
	je	.L22
	movl	%esi, %edi
	call	find
	movl	%eax, (%r9,%r12,4)
	movl	%eax, %esi
.L22:
	movl	%esi, (%r9,%rbp,4)
.L21:
	movl	%esi, (%r9,%rbx,4)
.L20:
	movl	%esi, (%r9,%r11,4)
.L19:
	movl	%esi, (%r9,%r10,4)
.L18:
	movslq	%r8d, %r10
	movl	(%r9,%r10,4), %edi
	cmpl	%edi, %r8d
	je	.L23
	movslq	%edi, %r8
	movl	(%r9,%r8,4), %eax
	cmpl	%eax, %edi
	je	.L24
	movslq	%eax, %r11
	movl	(%r9,%r11,4), %edi
	cmpl	%edi, %eax
	je	.L25
	movslq	%edi, %rbx
	movl	(%r9,%rbx,4), %eax
	cmpl	%eax, %edi
	je	.L26
	movslq	%eax, %rbp
	movl	(%r9,%rbp,4), %edi
	cmpl	%edi, %eax
	je	.L27
	call	find
	movl	%eax, (%r9,%rbp,4)
	movl	%eax, %edi
.L27:
	movl	%edi, (%r9,%rbx,4)
.L26:
	movl	%edi, (%r9,%r11,4)
.L25:
	movl	%edi, (%r9,%r8,4)
.L24:
	movl	%edi, (%r9,%r10,4)
.L23:
	xorl	%eax, %eax
	cmpl	%esi, %edi
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	sete	%al
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE25:
	.size	unit_friend, .-unit_friend
	.p2align 4
	.globl	unit
	.type	unit, @function
unit:
.LFB26:
	.cfi_startproc
	endbr64
	leaq	list(%rip), %r9
	movslq	%edi, %r10
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	%esi, %r8d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	(%r9,%r10,4), %esi
	cmpl	%esi, %edi
	je	.L34
	movslq	%esi, %r11
	movl	(%r9,%r11,4), %eax
	cmpl	%eax, %esi
	je	.L35
	movslq	%eax, %rbx
	movl	(%r9,%rbx,4), %esi
	cmpl	%esi, %eax
	je	.L36
	movslq	%esi, %rbp
	movl	(%r9,%rbp,4), %eax
	cmpl	%eax, %esi
	je	.L37
	movslq	%eax, %r12
	movl	(%r9,%r12,4), %esi
	cmpl	%esi, %eax
	je	.L38
	movl	%esi, %edi
	call	find
	movl	%eax, (%r9,%r12,4)
	movl	%eax, %esi
.L38:
	movl	%esi, (%r9,%rbp,4)
.L37:
	movl	%esi, (%r9,%rbx,4)
.L36:
	movl	%esi, (%r9,%r11,4)
.L35:
	movl	%esi, (%r9,%r10,4)
.L34:
	movslq	%r8d, %r10
	movslq	(%r9,%r10,4), %rdi
	cmpl	%edi, %r8d
	je	.L39
	movslq	%edi, %r8
	movl	(%r9,%r8,4), %eax
	cmpl	%eax, %edi
	je	.L40
	movslq	%eax, %r11
	movslq	(%r9,%r11,4), %rdi
	cmpl	%edi, %eax
	je	.L41
	movslq	%edi, %rbx
	movl	(%r9,%rbx,4), %eax
	cmpl	%eax, %edi
	je	.L42
	movslq	%eax, %rbp
	movslq	(%r9,%rbp,4), %rdi
	cmpl	%edi, %eax
	je	.L43
	call	find
	movslq	%eax, %rdi
	movl	%edi, (%r9,%rbp,4)
.L43:
	movl	%edi, (%r9,%rbx,4)
.L42:
	movl	%edi, (%r9,%r11,4)
.L41:
	movl	%edi, (%r9,%r8,4)
.L40:
	movl	%edi, (%r9,%r10,4)
.L39:
	cmpl	%esi, %edi
	je	.L33
	movl	%esi, (%r9,%rdi,4)
.L33:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE26:
	.size	unit, .-unit
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d"
.LC4:
	.string	"yes"
.LC5:
	.string	"no"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB27:
	.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	list(%rip), %rbx
	leaq	400000(%rbx), %rdx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC1(%rip), %xmm2
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rbx, %rax
	.p2align 4,,10
	.p2align 3
.L51:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rax, %rdx
	jne	.L51
	leaq	.LC2(%rip), %r12
	leaq	40(%rsp), %rdx
	xorl	%eax, %eax
	leaq	36(%rsp), %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %edx
	testl	%edx, %edx
	jle	.L52
	xorl	%ebp, %ebp
	leaq	48(%rsp), %r14
	leaq	44(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L69:
	movq	%r13, %rsi
	movq	%r14, %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	44(%rsp), %r8
	movl	48(%rsp), %r9d
	movl	(%rbx,%r8,4), %esi
	cmpl	%esi, %r8d
	je	.L53
	movslq	%esi, %r10
	movl	(%rbx,%r10,4), %eax
	cmpl	%eax, %esi
	je	.L54
	movslq	%eax, %r11
	movl	(%rbx,%r11,4), %esi
	cmpl	%esi, %eax
	je	.L55
	movslq	%esi, %r15
	movl	(%rbx,%r15,4), %eax
	cmpl	%eax, %esi
	je	.L56
	movslq	%eax, %rdx
	movl	%eax, %edi
	movl	(%rbx,%rdx,4), %esi
	cmpl	%esi, %eax
	je	.L57
	movslq	%esi, %rcx
	movl	(%rbx,%rcx,4), %edi
	cmpl	%edi, %esi
	je	.L58
	movslq	%edi, %rsi
	movl	(%rbx,%rsi,4), %eax
	cmpl	%eax, %edi
	je	.L59
	movl	%eax, %edi
	movq	%rcx, 16(%rsp)
	movq	%rdx, 8(%rsp)
	call	find
	movq	16(%rsp), %rcx
	movq	8(%rsp), %rdx
	movl	%eax, (%rbx,%rsi,4)
.L59:
	movl	%eax, (%rbx,%rcx,4)
	movl	%eax, %edi
.L58:
	movl	%edi, (%rbx,%rdx,4)
.L57:
	movl	%edi, (%rbx,%r15,4)
	movl	%edi, %esi
.L56:
	movl	%esi, (%rbx,%r11,4)
.L55:
	movl	%esi, (%rbx,%r10,4)
.L54:
	movl	%esi, (%rbx,%r8,4)
.L53:
	movslq	%r9d, %r8
	movslq	(%rbx,%r8,4), %rax
	cmpl	%eax, %r9d
	je	.L60
	movslq	%eax, %r9
	movl	(%rbx,%r9,4), %edx
	cmpl	%edx, %eax
	je	.L61
	movslq	%edx, %r10
	movslq	(%rbx,%r10,4), %rax
	cmpl	%eax, %edx
	je	.L62
	movslq	%eax, %r11
	movl	(%rbx,%r11,4), %edx
	cmpl	%edx, %eax
	je	.L63
	movslq	%edx, %r15
	movslq	%edx, %rax
	movl	(%rbx,%r15,4), %ecx
	cmpl	%ecx, %eax
	je	.L64
	movslq	%ecx, %rdx
	movslq	(%rbx,%rdx,4), %rax
	cmpl	%eax, %ecx
	je	.L65
	movslq	%eax, %rcx
	movl	(%rbx,%rcx,4), %edi
	movq	%rcx, 8(%rsp)
	cmpl	%edi, %eax
	je	.L66
	movq	%rdx, 16(%rsp)
	call	find
	movq	8(%rsp), %rcx
	movq	16(%rsp), %rdx
	movl	%eax, %edi
	movl	%eax, (%rbx,%rcx,4)
.L66:
	movl	%edi, (%rbx,%rdx,4)
	movslq	%edi, %rax
.L65:
	movl	%eax, (%rbx,%r15,4)
.L64:
	movl	%eax, (%rbx,%r11,4)
.L63:
	movl	%eax, (%rbx,%r10,4)
.L62:
	movl	%eax, (%rbx,%r9,4)
.L61:
	movl	%eax, (%rbx,%r8,4)
.L60:
	cmpl	%esi, %eax
	je	.L67
	movl	%esi, (%rbx,%rax,4)
	addl	$1, %ebp
	cmpl	%ebp, 40(%rsp)
	jg	.L69
.L52:
	leaq	52(%rsp), %rsi
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	52(%rsp), %eax
	testl	%eax, %eax
	jle	.L70
	xorl	%ebp, %ebp
	leaq	48(%rsp), %r14
	leaq	44(%rsp), %r13
	leaq	.LC5(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L87:
	movq	%r13, %rsi
	movq	%r14, %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	44(%rsp), %r8
	movl	48(%rsp), %esi
	movl	(%rbx,%r8,4), %r10d
	cmpl	%r10d, %r8d
	je	.L71
	movslq	%r10d, %r9
	movl	(%rbx,%r9,4), %edx
	cmpl	%edx, %r10d
	je	.L72
	movslq	%edx, %r10
	movl	(%rbx,%r10,4), %eax
	cmpl	%eax, %edx
	je	.L73
	movslq	%eax, %r11
	movl	(%rbx,%r11,4), %ecx
	cmpl	%ecx, %eax
	je	.L74
	movslq	%ecx, %rdx
	movl	%ecx, %eax
	movl	(%rbx,%rdx,4), %edi
	cmpl	%edi, %ecx
	je	.L75
	movslq	%edi, %rcx
	movl	(%rbx,%rcx,4), %eax
	cmpl	%eax, %edi
	je	.L76
	movslq	%eax, %rdi
	movq	%rdi, 8(%rsp)
	movl	(%rbx,%rdi,4), %edi
	cmpl	%edi, %eax
	je	.L77
	movq	%rcx, 24(%rsp)
	movq	%rdx, 16(%rsp)
	call	find
	movq	24(%rsp), %rcx
	movq	16(%rsp), %rdx
	movl	%eax, %edi
	movq	8(%rsp), %rax
	movl	%edi, (%rbx,%rax,4)
.L77:
	movl	%edi, (%rbx,%rcx,4)
	movl	%edi, %eax
.L76:
	movl	%eax, (%rbx,%rdx,4)
.L75:
	movl	%eax, (%rbx,%r11,4)
.L74:
	movl	%eax, (%rbx,%r10,4)
.L73:
	movl	%eax, (%rbx,%r9,4)
	movl	%eax, %r10d
.L72:
	movl	%r10d, (%rbx,%r8,4)
.L71:
	movslq	%esi, %r8
	movl	(%rbx,%r8,4), %eax
	cmpl	%eax, %esi
	je	.L78
	movslq	%eax, %rsi
	movl	(%rbx,%rsi,4), %edx
	cmpl	%edx, %eax
	je	.L79
	movslq	%edx, %r9
	movl	(%rbx,%r9,4), %eax
	cmpl	%eax, %edx
	je	.L80
	movslq	%eax, %r11
	movl	(%rbx,%r11,4), %ecx
	cmpl	%ecx, %eax
	je	.L81
	movslq	%ecx, %rdx
	movl	%ecx, %eax
	movl	(%rbx,%rdx,4), %edi
	cmpl	%edi, %ecx
	je	.L82
	movslq	%edi, %rcx
	movl	(%rbx,%rcx,4), %eax
	cmpl	%eax, %edi
	je	.L83
	movslq	%eax, %rdi
	movq	%rdi, 8(%rsp)
	movl	(%rbx,%rdi,4), %edi
	cmpl	%edi, %eax
	je	.L84
	movq	%rcx, 24(%rsp)
	movq	%rdx, 16(%rsp)
	call	find
	movq	24(%rsp), %rcx
	movq	16(%rsp), %rdx
	movl	%eax, %edi
	movq	8(%rsp), %rax
	movl	%edi, (%rbx,%rax,4)
.L84:
	movl	%edi, (%rbx,%rcx,4)
	movl	%edi, %eax
.L83:
	movl	%eax, (%rbx,%rdx,4)
.L82:
	movl	%eax, (%rbx,%r11,4)
.L81:
	movl	%eax, (%rbx,%r9,4)
.L80:
	movl	%eax, (%rbx,%rsi,4)
.L79:
	movl	%eax, (%rbx,%r8,4)
.L78:
	cmpl	%r10d, %eax
	je	.L103
	movq	%r15, %rdi
	addl	$1, %ebp
	call	puts@PLT
	cmpl	%ebp, 52(%rsp)
	jg	.L87
.L70:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L104
	addq	$72, %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
.L103:
	.cfi_restore_state
	leaq	.LC4(%rip), %rdi
	addl	$1, %ebp
	call	puts@PLT
	cmpl	%ebp, 52(%rsp)
	jg	.L87
	jmp	.L70
	.p2align 4,,10
	.p2align 3
.L67:
	addl	$1, %ebp
	cmpl	%ebp, 40(%rsp)
	jg	.L69
	jmp	.L52
.L104:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE27:
	.size	main, .-main
	.globl	list
	.bss
	.align 32
	.type	list, @object
	.size	list, 400000
list:
	.zero	400000
	.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	init
	.type	init, @function
init:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	list(%rip), %rax
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC1(%rip), %xmm2
	leaq	400000(%rax), %rdx
	.p2align 4,,10
	.p2align 3
.L2:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L2
	ret
	.cfi_endproc
.LFE23:
	.size	init, .-init
	.p2align 4
	.globl	find
	.type	find, @function
find:
.LFB24:
	.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
	movslq	%edi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	list(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	(%rbx,%rbp,4), %edx
	movl	%edx, %eax
	cmpl	%edi, %edx
	je	.L5
	movslq	%edx, %r12
	movl	(%rbx,%r12,4), %eax
	cmpl	%eax, %edx
	je	.L7
	movslq	%eax, %r13
	movl	(%rbx,%r13,4), %edx
	cmpl	%edx, %eax
	je	.L8
	movslq	%edx, %r14
	movl	(%rbx,%r14,4), %eax
	cmpl	%eax, %edx
	je	.L9
	movslq	%eax, %r15
	movl	(%rbx,%r15,4), %edx
	cmpl	%edx, %eax
	je	.L10
	movslq	%edx, %rcx
	movl	(%rbx,%rcx,4), %eax
	movq	%rcx, 8(%rsp)
	cmpl	%eax, %edx
	je	.L11
	movl	%eax, %edi
	call	find
	movq	8(%rsp), %rcx
	movl	%eax, (%rbx,%rcx,4)
.L11:
	movl	%eax, (%rbx,%r15,4)
.L10:
	movl	%eax, (%rbx,%r14,4)
.L9:
	movl	%eax, (%rbx,%r13,4)
.L8:
	movl	%eax, (%rbx,%r12,4)
.L7:
	movl	%eax, (%rbx,%rbp,4)
.L5:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE24:
	.size	find, .-find
	.p2align 4
	.globl	unit_friend
	.type	unit_friend, @function
unit_friend:
.LFB25:
	.cfi_startproc
	endbr64
	leaq	list(%rip), %r9
	movslq	%edi, %r10
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	%esi, %r8d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	(%r9,%r10,4), %esi
	cmpl	%esi, %edi
	je	.L18
	movslq	%esi, %r11
	movl	(%r9,%r11,4), %eax
	cmpl	%eax, %esi
	je	.L19
	movslq	%eax, %rbx
	movl	(%r9,%rbx,4), %esi
	cmpl	%esi, %eax
	je	.L20
	movslq	%esi, %rbp
	movl	(%r9,%rbp,4), %eax
	cmpl	%eax, %esi
	je	.L21
	movslq	%eax, %r12
	movl	(%r9,%r12,4), %esi
	cmpl	%esi, %eax
	je	.L22
	movl	%esi, %edi
	call	find
	movl	%eax, (%r9,%r12,4)
	movl	%eax, %esi
.L22:
	movl	%esi, (%r9,%rbp,4)
.L21:
	movl	%esi, (%r9,%rbx,4)
.L20:
	movl	%esi, (%r9,%r11,4)
.L19:
	movl	%esi, (%r9,%r10,4)
.L18:
	movslq	%r8d, %r10
	movl	(%r9,%r10,4), %edi
	cmpl	%edi, %r8d
	je	.L23
	movslq	%edi, %r8
	movl	(%r9,%r8,4), %eax
	cmpl	%eax, %edi
	je	.L24
	movslq	%eax, %r11
	movl	(%r9,%r11,4), %edi
	cmpl	%edi, %eax
	je	.L25
	movslq	%edi, %rbx
	movl	(%r9,%rbx,4), %eax
	cmpl	%eax, %edi
	je	.L26
	movslq	%eax, %rbp
	movl	(%r9,%rbp,4), %edi
	cmpl	%edi, %eax
	je	.L27
	call	find
	movl	%eax, (%r9,%rbp,4)
	movl	%eax, %edi
.L27:
	movl	%edi, (%r9,%rbx,4)
.L26:
	movl	%edi, (%r9,%r11,4)
.L25:
	movl	%edi, (%r9,%r8,4)
.L24:
	movl	%edi, (%r9,%r10,4)
.L23:
	xorl	%eax, %eax
	cmpl	%esi, %edi
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	sete	%al
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE25:
	.size	unit_friend, .-unit_friend
	.p2align 4
	.globl	unit
	.type	unit, @function
unit:
.LFB26:
	.cfi_startproc
	endbr64
	leaq	list(%rip), %r9
	movslq	%edi, %r10
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	%esi, %r8d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	(%r9,%r10,4), %esi
	cmpl	%esi, %edi
	je	.L34
	movslq	%esi, %r11
	movl	(%r9,%r11,4), %eax
	cmpl	%eax, %esi
	je	.L35
	movslq	%eax, %rbx
	movl	(%r9,%rbx,4), %esi
	cmpl	%esi, %eax
	je	.L36
	movslq	%esi, %rbp
	movl	(%r9,%rbp,4), %eax
	cmpl	%eax, %esi
	je	.L37
	movslq	%eax, %r12
	movl	(%r9,%r12,4), %esi
	cmpl	%esi, %eax
	je	.L38
	movl	%esi, %edi
	call	find
	movl	%eax, (%r9,%r12,4)
	movl	%eax, %esi
.L38:
	movl	%esi, (%r9,%rbp,4)
.L37:
	movl	%esi, (%r9,%rbx,4)
.L36:
	movl	%esi, (%r9,%r11,4)
.L35:
	movl	%esi, (%r9,%r10,4)
.L34:
	movslq	%r8d, %r10
	movslq	(%r9,%r10,4), %rdi
	cmpl	%edi, %r8d
	je	.L39
	movslq	%edi, %r8
	movl	(%r9,%r8,4), %eax
	cmpl	%eax, %edi
	je	.L40
	movslq	%eax, %r11
	movslq	(%r9,%r11,4), %rdi
	cmpl	%edi, %eax
	je	.L41
	movslq	%edi, %rbx
	movl	(%r9,%rbx,4), %eax
	cmpl	%eax, %edi
	je	.L42
	movslq	%eax, %rbp
	movslq	(%r9,%rbp,4), %rdi
	cmpl	%edi, %eax
	je	.L43
	call	find
	movslq	%eax, %rdi
	movl	%edi, (%r9,%rbp,4)
.L43:
	movl	%edi, (%r9,%rbx,4)
.L42:
	movl	%edi, (%r9,%r11,4)
.L41:
	movl	%edi, (%r9,%r8,4)
.L40:
	movl	%edi, (%r9,%r10,4)
.L39:
	cmpl	%esi, %edi
	je	.L33
	movl	%esi, (%r9,%rdi,4)
.L33:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE26:
	.size	unit, .-unit
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d"
.LC4:
	.string	"yes"
.LC5:
	.string	"no"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB27:
	.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	list(%rip), %rbx
	leaq	400000(%rbx), %rdx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC1(%rip), %xmm2
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rbx, %rax
	.p2align 4,,10
	.p2align 3
.L51:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rax, %rdx
	jne	.L51
	leaq	.LC2(%rip), %r12
	leaq	40(%rsp), %rdx
	xorl	%eax, %eax
	leaq	36(%rsp), %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %edx
	testl	%edx, %edx
	jle	.L52
	xorl	%ebp, %ebp
	leaq	48(%rsp), %r14
	leaq	44(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L69:
	movq	%r13, %rsi
	movq	%r14, %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	44(%rsp), %r8
	movl	48(%rsp), %r9d
	movl	(%rbx,%r8,4), %esi
	cmpl	%esi, %r8d
	je	.L53
	movslq	%esi, %r10
	movl	(%rbx,%r10,4), %eax
	cmpl	%eax, %esi
	je	.L54
	movslq	%eax, %r11
	movl	(%rbx,%r11,4), %esi
	cmpl	%esi, %eax
	je	.L55
	movslq	%esi, %r15
	movl	(%rbx,%r15,4), %eax
	cmpl	%eax, %esi
	je	.L56
	movslq	%eax, %rdx
	movl	%eax, %edi
	movl	(%rbx,%rdx,4), %esi
	cmpl	%esi, %eax
	je	.L57
	movslq	%esi, %rcx
	movl	(%rbx,%rcx,4), %edi
	cmpl	%edi, %esi
	je	.L58
	movslq	%edi, %rsi
	movl	(%rbx,%rsi,4), %eax
	cmpl	%eax, %edi
	je	.L59
	movl	%eax, %edi
	movq	%rcx, 16(%rsp)
	movq	%rdx, 8(%rsp)
	call	find
	movq	16(%rsp), %rcx
	movq	8(%rsp), %rdx
	movl	%eax, (%rbx,%rsi,4)
.L59:
	movl	%eax, (%rbx,%rcx,4)
	movl	%eax, %edi
.L58:
	movl	%edi, (%rbx,%rdx,4)
.L57:
	movl	%edi, (%rbx,%r15,4)
	movl	%edi, %esi
.L56:
	movl	%esi, (%rbx,%r11,4)
.L55:
	movl	%esi, (%rbx,%r10,4)
.L54:
	movl	%esi, (%rbx,%r8,4)
.L53:
	movslq	%r9d, %r8
	movslq	(%rbx,%r8,4), %rax
	cmpl	%eax, %r9d
	je	.L60
	movslq	%eax, %r9
	movl	(%rbx,%r9,4), %edx
	cmpl	%edx, %eax
	je	.L61
	movslq	%edx, %r10
	movslq	(%rbx,%r10,4), %rax
	cmpl	%eax, %edx
	je	.L62
	movslq	%eax, %r11
	movl	(%rbx,%r11,4), %edx
	cmpl	%edx, %eax
	je	.L63
	movslq	%edx, %r15
	movslq	%edx, %rax
	movl	(%rbx,%r15,4), %ecx
	cmpl	%ecx, %eax
	je	.L64
	movslq	%ecx, %rdx
	movslq	(%rbx,%rdx,4), %rax
	cmpl	%eax, %ecx
	je	.L65
	movslq	%eax, %rcx
	movl	(%rbx,%rcx,4), %edi
	movq	%rcx, 8(%rsp)
	cmpl	%edi, %eax
	je	.L66
	movq	%rdx, 16(%rsp)
	call	find
	movq	8(%rsp), %rcx
	movq	16(%rsp), %rdx
	movl	%eax, %edi
	movl	%eax, (%rbx,%rcx,4)
.L66:
	movl	%edi, (%rbx,%rdx,4)
	movslq	%edi, %rax
.L65:
	movl	%eax, (%rbx,%r15,4)
.L64:
	movl	%eax, (%rbx,%r11,4)
.L63:
	movl	%eax, (%rbx,%r10,4)
.L62:
	movl	%eax, (%rbx,%r9,4)
.L61:
	movl	%eax, (%rbx,%r8,4)
.L60:
	cmpl	%esi, %eax
	je	.L67
	movl	%esi, (%rbx,%rax,4)
	addl	$1, %ebp
	cmpl	%ebp, 40(%rsp)
	jg	.L69
.L52:
	leaq	52(%rsp), %rsi
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	52(%rsp), %eax
	testl	%eax, %eax
	jle	.L70
	xorl	%ebp, %ebp
	leaq	48(%rsp), %r14
	leaq	44(%rsp), %r13
	leaq	.LC5(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L87:
	movq	%r13, %rsi
	movq	%r14, %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	44(%rsp), %r8
	movl	48(%rsp), %esi
	movl	(%rbx,%r8,4), %r10d
	cmpl	%r10d, %r8d
	je	.L71
	movslq	%r10d, %r9
	movl	(%rbx,%r9,4), %edx
	cmpl	%edx, %r10d
	je	.L72
	movslq	%edx, %r10
	movl	(%rbx,%r10,4), %eax
	cmpl	%eax, %edx
	je	.L73
	movslq	%eax, %r11
	movl	(%rbx,%r11,4), %ecx
	cmpl	%ecx, %eax
	je	.L74
	movslq	%ecx, %rdx
	movl	%ecx, %eax
	movl	(%rbx,%rdx,4), %edi
	cmpl	%edi, %ecx
	je	.L75
	movslq	%edi, %rcx
	movl	(%rbx,%rcx,4), %eax
	cmpl	%eax, %edi
	je	.L76
	movslq	%eax, %rdi
	movq	%rdi, 8(%rsp)
	movl	(%rbx,%rdi,4), %edi
	cmpl	%edi, %eax
	je	.L77
	movq	%rcx, 24(%rsp)
	movq	%rdx, 16(%rsp)
	call	find
	movq	24(%rsp), %rcx
	movq	16(%rsp), %rdx
	movl	%eax, %edi
	movq	8(%rsp), %rax
	movl	%edi, (%rbx,%rax,4)
.L77:
	movl	%edi, (%rbx,%rcx,4)
	movl	%edi, %eax
.L76:
	movl	%eax, (%rbx,%rdx,4)
.L75:
	movl	%eax, (%rbx,%r11,4)
.L74:
	movl	%eax, (%rbx,%r10,4)
.L73:
	movl	%eax, (%rbx,%r9,4)
	movl	%eax, %r10d
.L72:
	movl	%r10d, (%rbx,%r8,4)
.L71:
	movslq	%esi, %r8
	movl	(%rbx,%r8,4), %eax
	cmpl	%eax, %esi
	je	.L78
	movslq	%eax, %rsi
	movl	(%rbx,%rsi,4), %edx
	cmpl	%edx, %eax
	je	.L79
	movslq	%edx, %r9
	movl	(%rbx,%r9,4), %eax
	cmpl	%eax, %edx
	je	.L80
	movslq	%eax, %r11
	movl	(%rbx,%r11,4), %ecx
	cmpl	%ecx, %eax
	je	.L81
	movslq	%ecx, %rdx
	movl	%ecx, %eax
	movl	(%rbx,%rdx,4), %edi
	cmpl	%edi, %ecx
	je	.L82
	movslq	%edi, %rcx
	movl	(%rbx,%rcx,4), %eax
	cmpl	%eax, %edi
	je	.L83
	movslq	%eax, %rdi
	movq	%rdi, 8(%rsp)
	movl	(%rbx,%rdi,4), %edi
	cmpl	%edi, %eax
	je	.L84
	movq	%rcx, 24(%rsp)
	movq	%rdx, 16(%rsp)
	call	find
	movq	24(%rsp), %rcx
	movq	16(%rsp), %rdx
	movl	%eax, %edi
	movq	8(%rsp), %rax
	movl	%edi, (%rbx,%rax,4)
.L84:
	movl	%edi, (%rbx,%rcx,4)
	movl	%edi, %eax
.L83:
	movl	%eax, (%rbx,%rdx,4)
.L82:
	movl	%eax, (%rbx,%r11,4)
.L81:
	movl	%eax, (%rbx,%r9,4)
.L80:
	movl	%eax, (%rbx,%rsi,4)
.L79:
	movl	%eax, (%rbx,%r8,4)
.L78:
	cmpl	%r10d, %eax
	je	.L103
	movq	%r15, %rdi
	addl	$1, %ebp
	call	puts@PLT
	cmpl	%ebp, 52(%rsp)
	jg	.L87
.L70:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L104
	addq	$72, %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
.L103:
	.cfi_restore_state
	leaq	.LC4(%rip), %rdi
	addl	$1, %ebp
	call	puts@PLT
	cmpl	%ebp, 52(%rsp)
	jg	.L87
	jmp	.L70
	.p2align 4,,10
	.p2align 3
.L67:
	addl	$1, %ebp
	cmpl	%ebp, 40(%rsp)
	jg	.L69
	jmp	.L52
.L104:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE27:
	.size	main, .-main
	.globl	list
	.bss
	.align 32
	.type	list, @object
	.size	list, 400000
list:
	.zero	400000
	.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>

#define MAX 100000

int list[MAX] = {0};

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

int find(int n){
    if(n==list[n]) return n;
    return list[n]=find(list[n]);
}

int unit_friend(int a,int b){
    if(find(a)==find(b)) return 1;
    else return 0;
}

void unit(int a,int b){
    a=find(a);
    b=find(b);
    
    if(a==b)return;
    
    list[b]=a;
}

int main(void){
    int user_num,friend,i,s,t,q;
    init();
    scanf("%d%d",&user_num,&friend);
    for(i=0;i<friend;i++){
        scanf("%d%d",&s,&t);
        unit(s,t);
    }
    scanf("%d",&q);
    for(i=0;i<q;i++){
        scanf("%d%d",&s,&t);
        if(unit_friend(s,t)==1) printf("yes\n");
        else printf("no\n");
    }
    return 0;
}
10 9
0 1
0 2
3 4
5 7
5 6
3 7
6 8
7 8
8 9
3
0 1
5 9
1 3
 16 9
0 2
0 2
3 4
5 7
5 6
3 7
6 13
7 8
8 9
3
0 1
5 9
1 3
 16 9
0 2
0 2
3 4
2 7
5 6
3 7
6 13
7 8
8 9
3
0 1
5 9
1 3
 16 9
0 2
0 2
3 4
2 7
5 6
3 7
6 13
7 8
8 9
3
0 0
5 9
1 3
 10 9
0 1
0 2
3 4
5 7
5 6
3 7
0 8
7 8
8 9
3
0 1
5 9
1 3
 16 9
0 2
0 2
3 4
2 7
5 6
3 7
0 13
7 8
8 9
3
1 0
5 2
2 3
 16 9
0 2
0 2
3 4
2 7
5 6
3 7
0 13
7 8
8 9
3
1 0
4 2
2 3
 10 9
0 1
0 2
3 4
5 7
5 6
3 7
0 8
7 8
8 5
3
0 1
5 9
1 3
 16 9
0 2
0 2
0 4
2 7
5 6
3 11
6 13
3 8
8 9
1
0 1
5 9
1 3
 16 9
0 2
1 2
0 4
4 7
5 6
3 11
6 7
3 8
8 9
1
0 1
5 9
1 3

yes
yes
no
 no
yes
no
 no
no
no
 yes
no
no
 yes
yes
yes
 no
no
yes
 no
yes
yes
 yes
no
yes
 no
 yes

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>

#define MAX 100000

int list[MAX] = {0};

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

int find(int n){
    if(n==list[n]) return n;
    return list[n]=find(list[n]);
}

int unit_friend(int a,int b){
    if(find(a)==find(b)) return 1;
    else return 0;
}

void unit(int a,int b){
    a=find(a);
    b=find(b);
    
    if(a==b)return;
    
    list[b]=a;
}

int main(void){
    int user_num,friend,i,s,t,q;
    init();
    scanf("%d%d",&user_num,&friend);
    for(i=0;i<friend;i++){
        scanf("%d%d",&s,&t);
        unit(s,t);
    }
    scanf("%d",&q);
    for(i=0;i<q;i++){
        scanf("%d%d",&s,&t);
        if(unit_friend(s,t)==1) printf("yes\n");
        else printf("no\n");
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	list
	.bss
	.align 32
	.type	list, @object
	.size	list, 400000
list:
	.zero	400000
	.text
	.globl	init
	.type	init, @function
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	list(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L2:
	cmpl	$99999, -4(%rbp)
	jle	.L3
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	init, .-init
	.globl	find
	.type	find, @function
find:
.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	list(%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	list(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	find
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	list(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	list(%rip), %rax
	movl	(%rdx,%rax), %eax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	find, .-find
	.globl	unit_friend
	.type	unit_friend, @function
unit_friend:
.LFB2:
	.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	find
	movl	%eax, %ebx
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	find
	cmpl	%eax, %ebx
	jne	.L8
	movl	$1, %eax
	jmp	.L9
.L8:
	movl	$0, %eax
.L9:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	unit_friend, .-unit_friend
	.globl	unit
	.type	unit, @function
unit:
.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	find
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, %edi
	call	find
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	je	.L13
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	list(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L10
.L13:
	nop
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	unit, .-unit
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"yes"
.LC3:
	.string	"no"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, %eax
	call	init
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L15
.L16:
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	unit
	addl	$1, -12(%rbp)
.L15:
	movl	-28(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L16
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L17
.L20:
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	unit_friend
	cmpl	$1, %eax
	jne	.L18
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L19
.L18:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L19:
	addl	$1, -12(%rbp)
.L17:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L20
	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
.LFE4:
	.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	list
	.bss
	.align 32
	.type	list, @object
	.size	list, 400000
list:
	.zero	400000
	.text
	.globl	init
	.type	init, @function
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	list(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L2:
	cmpl	$99999, -4(%rbp)
	jle	.L3
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	init, .-init
	.globl	find
	.type	find, @function
find:
.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	list(%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	list(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	find
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	list(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	list(%rip), %rax
	movl	(%rdx,%rax), %eax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	find, .-find
	.globl	unit_friend
	.type	unit_friend, @function
unit_friend:
.LFB2:
	.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	find
	movl	%eax, %ebx
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	find
	cmpl	%eax, %ebx
	jne	.L8
	movl	$1, %eax
	jmp	.L9
.L8:
	movl	$0, %eax
.L9:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	unit_friend, .-unit_friend
	.globl	unit
	.type	unit, @function
unit:
.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	find
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, %edi
	call	find
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	je	.L13
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	list(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L10
.L13:
	nop
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	unit, .-unit
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"yes"
.LC3:
	.string	"no"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, %eax
	call	init
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L15
.L16:
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	unit
	addl	$1, -12(%rbp)
.L15:
	movl	-28(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L16
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L17
.L20:
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	unit_friend
	cmpl	$1, %eax
	jne	.L18
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L19
.L18:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L19:
	addl	$1, -12(%rbp)
.L17:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L20
	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
.LFE4:
	.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:
