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<stdlib.h>
#define N 1000
#define rep(i,n) for(int i=0;i<n;i++)
typedef struct{
    int num;
    int post;
}Data;
int comp(const void *a,const void *b){
    Data c = *(Data *)a;
    Data d = *(Data *)b;
    return d.post-c.post;
}
Data d[N];
int used[N]={0};
double map[N][N]={0};
int g[N][N]={0};
int len[N];
int n,m,cnt;
void init(){
    rep(i,n){
        used[i]=len[i]=0;
        rep(j,n){
            map[i][j]=g[i][j]=0;
        }
    }
}

void init2(){
    rep(i,n){
        used[i]=0;
    }
}

void dfs(int pos){//ラベル
    if(used[pos]) return;
    used[pos]=1;
    rep(i,n){
        if(used[i]) continue;
        if(map[pos][i]){
            dfs(i);
        }
    }
    d[pos].post=++cnt;
}
void dfs_init(){
    cnt=0;
    rep(i,n){
        dfs(i);
    }
}

void dfs2(int j,int pos){//強連結分解
    if(used[pos]) return;
    used[pos]=1; g[j][cnt++]=pos;
    len[j]=cnt;
    rep(i,n){
        if(used[i]) continue;
        if(map[i][pos]){
            dfs2(j,i);
        }
    }
}
void dfs2_init(){
    init2();
    int idx=0;
    rep(i,n){
        cnt=0;
        if(used[d[i].num]);
        else{
            dfs2(idx,d[i].num);
            idx++;
        }
    }
}
int wake(int i){
    int used2[N]={0};
    rep(j,len[i]) used2[g[i][j]]=1;
    rep(j,len[i]){
        rep(k,n){
            if(used2[k]) continue;
            if(map[k][g[i][j]]) return 0;
        }
    }
    return 1;
}
int main(void){
    while(1){
        scanf("%d",&n);
        if(n==0) break;
        init();
        double p[N]={0};
        rep(i,n){
            double p_;
            int x,y;
            scanf("%lf%d",&p_,&x);
            p[i]=p_;
            rep(j,x){
                scanf("%d",&y);
                map[i][y-1]=1;
            }
        }
        rep(i,n){
            d[i].num=i;
            d[i].post=1;
        }
        dfs_init();
        //printf("%d\n",cnt); rep(i,n) printf("%d ",d[i].post); puts("\n");
        qsort(d,n,sizeof(Data),comp);
        dfs2_init();
        /*rep(i,n){
            if(len[i]==0) continue;
            rep(j,len[i]){
                printf("%d ",g[i][j]);
            }puts("");
        }puts("");*/
        /*rep(i,n){
            rep(j,n){
                printf("%6f ",map[i][j]);
            }puts("");
        }puts("");*/
        double sum=1;
        rep(i,n){
            if(len[i]==0) continue;
            double tmp=1;
            if(wake(i)){
                rep(j,len[i])
                tmp*=p[g[i][j]];
                sum*=(1-tmp);
            }
        }
        printf("%.9f\n",sum);
    }
    
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-4(%rbp), %eax
	movl	-12(%rbp), %edx
	subl	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 8000
d:
	.zero	8000
	.globl	used
	.align 32
	.type	used, @object
	.size	used, 4000
used:
	.zero	4000
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 8000000
map:
	.zero	8000000
	.globl	g
	.align 32
	.type	g, @object
	.size	g, 4000000
g:
	.zero	4000000
	.globl	len
	.align 32
	.type	len, @object
	.size	len, 4000
len:
	.zero	4000
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.text
	.globl	init
	.type	init, @function
init:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -8(%rbp)
	jmp	.L4
.L7:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	used(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$0, -4(%rbp)
	jmp	.L5
.L6:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	map(%rip), %rax
	pxor	%xmm0, %xmm0
	movsd	%xmm0, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L5:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L6
	addl	$1, -8(%rbp)
.L4:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L7
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	init, .-init
	.globl	init2
	.type	init2, @function
init2:
.LFB8:
	.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	.L9
.L10:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L9:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L10
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	init2, .-init2
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB9:
	.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	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L20
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	$0, -4(%rbp)
	jmp	.L14
.L18:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L21
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	map(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L19
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	je	.L16
.L19:
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	dfs
	jmp	.L16
.L21:
	nop
.L16:
	addl	$1, -4(%rbp)
.L14:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L18
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
	movl	cnt(%rip), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+d(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	jmp	.L11
.L20:
	nop
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	dfs, .-dfs
	.globl	dfs_init
	.type	dfs_init, @function
dfs_init:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, cnt(%rip)
	movl	$0, -4(%rbp)
	jmp	.L23
.L24:
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	dfs
	addl	$1, -4(%rbp)
.L23:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L24
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	dfs_init, .-dfs_init
	.globl	dfs2
	.type	dfs2, @function
dfs2:
.LFB11:
	.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	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L34
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	cnt(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, cnt(%rip)
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	g(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	cnt(%rip), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	len(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$0, -4(%rbp)
	jmp	.L28
.L32:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L35
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	map(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L33
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	je	.L30
.L33:
	movl	-4(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	dfs2
	jmp	.L30
.L35:
	nop
.L30:
	addl	$1, -4(%rbp)
.L28:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L32
	jmp	.L25
.L34:
	nop
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	dfs2, .-dfs2
	.globl	dfs2_init
	.type	dfs2_init, @function
dfs2_init:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, %eax
	call	init2
	movl	$0, -8(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L37
.L39:
	movl	$0, cnt(%rip)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L38
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	dfs2
	addl	$1, -8(%rbp)
.L38:
	addl	$1, -4(%rbp)
.L37:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L39
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	dfs2_init, .-dfs2_init
	.globl	wake
	.type	wake, @function
wake:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4048, %rsp
	movl	%edi, -4036(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-4016(%rbp), %rdx
	movl	$0, %eax
	movl	$500, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -4028(%rbp)
	jmp	.L41
.L42:
	movl	-4028(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4036(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movl	$1, -4016(%rbp,%rax,4)
	addl	$1, -4028(%rbp)
.L41:
	movl	-4036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4028(%rbp)
	jl	.L42
	movl	$0, -4024(%rbp)
	jmp	.L43
.L50:
	movl	$0, -4020(%rbp)
	jmp	.L44
.L49:
	movl	-4020(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L54
	movl	-4024(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4036(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-4020(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	map(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L53
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	je	.L46
.L53:
	movl	$0, %eax
	jmp	.L51
.L54:
	nop
.L46:
	addl	$1, -4020(%rbp)
.L44:
	movl	n(%rip), %eax
	cmpl	%eax, -4020(%rbp)
	jl	.L49
	addl	$1, -4024(%rbp)
.L43:
	movl	-4036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4024(%rbp)
	jl	.L50
	movl	$1, %eax
.L51:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L52
	call	__stack_chk_fail@PLT
.L52:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	wake, .-wake
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%lf%d"
.LC4:
	.string	"%.9f\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB14:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3984, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L70:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jne	.L56
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L71
	jmp	.L72
.L56:
	movl	$0, %eax
	call	init
	leaq	-8016(%rbp), %rdx
	movl	$0, %eax
	movl	$1000, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -8060(%rbp)
	jmp	.L58
.L61:
	leaq	-8068(%rbp), %rdx
	leaq	-8040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movsd	-8040(%rbp), %xmm0
	movl	-8060(%rbp), %eax
	cltq
	movsd	%xmm0, -8016(%rbp,%rax,8)
	movl	$0, -8056(%rbp)
	jmp	.L59
.L60:
	leaq	-8064(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-8064(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-8060(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	map(%rip), %rax
	movsd	.LC3(%rip), %xmm0
	movsd	%xmm0, (%rdx,%rax)
	addl	$1, -8056(%rbp)
.L59:
	movl	-8068(%rbp), %eax
	cmpl	%eax, -8056(%rbp)
	jl	.L60
	addl	$1, -8060(%rbp)
.L58:
	movl	n(%rip), %eax
	cmpl	%eax, -8060(%rbp)
	jl	.L61
	movl	$0, -8052(%rbp)
	jmp	.L62
.L63:
	movl	-8052(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	d(%rip), %rdx
	movl	-8052(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8052(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+d(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -8052(%rbp)
.L62:
	movl	n(%rip), %eax
	cmpl	%eax, -8052(%rbp)
	jl	.L63
	movl	$0, %eax
	call	dfs_init
	movl	n(%rip), %eax
	cltq
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	d(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, %eax
	call	dfs2_init
	movsd	.LC3(%rip), %xmm0
	movsd	%xmm0, -8032(%rbp)
	movl	$0, -8048(%rbp)
	jmp	.L64
.L69:
	movl	-8048(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L73
	movsd	.LC3(%rip), %xmm0
	movsd	%xmm0, -8024(%rbp)
	movl	-8048(%rbp), %eax
	movl	%eax, %edi
	call	wake
	testl	%eax, %eax
	je	.L66
	movl	$0, -8044(%rbp)
	jmp	.L67
.L68:
	movl	-8044(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8048(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movsd	-8016(%rbp,%rax,8), %xmm0
	movsd	-8024(%rbp), %xmm1
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -8024(%rbp)
	addl	$1, -8044(%rbp)
.L67:
	movl	-8048(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8044(%rbp)
	jl	.L68
	movsd	.LC3(%rip), %xmm0
	subsd	-8024(%rbp), %xmm0
	movsd	-8032(%rbp), %xmm1
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -8032(%rbp)
	jmp	.L66
.L73:
	nop
.L66:
	addl	$1, -8048(%rbp)
.L64:
	movl	n(%rip), %eax
	cmpl	%eax, -8048(%rbp)
	jl	.L69
	movq	-8032(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	jmp	.L70
.L72:
	call	__stack_chk_fail@PLT
.L71:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.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	comp
	.type	comp, @function
comp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	4(%rsi), %eax
	subl	4(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	comp, .-comp
	.p2align 4
	.type	dfs.part.0, @function
dfs.part.0:
.LFB48:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movslq	%edi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	used(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movl	n(%rip), %eax
	movl	$1, (%r12,%r14,4)
	testl	%eax, %eax
	jle	.L17
	imulq	$8000, %r14, %rcx
	leaq	map(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%rsi, %r13
	pxor	%xmm0, %xmm0
	leaq	4+d(%rip), %r10
	addq	%rsi, %rcx
.L16:
	movl	(%r12,%rbx,4), %r9d
	testl	%r9d, %r9d
	jne	.L5
	ucomisd	(%rcx,%rbx,8), %xmm0
	jp	.L18
	jne	.L18
.L5:
	addq	$1, %rbx
	addq	$8000, %r13
	cmpl	%ebx, %eax
	jg	.L16
.L17:
	movl	cnt(%rip), %eax
	leaq	d(%rip), %rdx
	addl	$1, %eax
	movl	%eax, 4(%rdx,%r14,8)
	movl	%eax, cnt(%rip)
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	movl	$1, (%r12,%rbx,4)
	movq	%rsi, %rdx
	xorl	%ebp, %ebp
.L15:
	movl	(%r12,%rbp,4), %r8d
	testl	%r8d, %r8d
	jne	.L7
	ucomisd	0(%r13,%rbp,8), %xmm0
	jp	.L19
	jne	.L19
.L7:
	addq	$1, %rbp
	addq	$8000, %rdx
	cmpl	%ebp, %eax
	jg	.L15
	movl	cnt(%rip), %edi
	leal	1(%rdi), %edx
	movl	%edx, cnt(%rip)
	movl	%edx, (%r10,%rbx,8)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L19:
	movl	$1, (%r12,%rbp,4)
	movq	%rsi, %r9
	xorl	%r15d, %r15d
.L14:
	movl	(%r12,%r15,4), %edi
	testl	%edi, %edi
	jne	.L9
	ucomisd	(%rdx,%r15,8), %xmm0
	jp	.L20
	jne	.L20
.L9:
	addq	$1, %r15
	addq	$8000, %r9
	cmpl	%r15d, %eax
	jg	.L14
	movl	cnt(%rip), %edi
	addl	$1, %edi
	movl	%edi, cnt(%rip)
	movl	%edi, (%r10,%rbp,8)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	movl	$1, (%r12,%r15,4)
	xorl	%r8d, %r8d
.L13:
	movl	(%r12,%r8,4), %r11d
	movl	%r8d, %edi
	testl	%r11d, %r11d
	jne	.L11
	ucomisd	(%r9,%r8,8), %xmm0
	jp	.L21
	jne	.L21
.L11:
	addq	$1, %r8
	cmpl	%r8d, %eax
	jg	.L13
	movl	cnt(%rip), %edi
	addl	$1, %edi
	movl	%edi, cnt(%rip)
	movl	%edi, (%r10,%r15,8)
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%r8, 24(%rsp)
	movq	%r9, 16(%rsp)
	movq	%rdx, 8(%rsp)
	movq	%rcx, (%rsp)
	call	dfs.part.0
	movl	n(%rip), %eax
	movq	24(%rsp), %r8
	leaq	4+d(%rip), %r10
	movq	16(%rsp), %r9
	movq	8(%rsp), %rdx
	pxor	%xmm0, %xmm0
	leaq	map(%rip), %rsi
	movq	(%rsp), %rcx
	jmp	.L11
	.cfi_endproc
.LFE48:
	.size	dfs.part.0, .-dfs.part.0
	.p2align 4
	.type	dfs2.part.0, @function
dfs2.part.0:
.LFB49:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%edi, %edx
	leaq	g(%rip), %rcx
	movslq	%esi, %r10
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movslq	%edx, %rax
	leaq	len(%rip), %r8
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	imulq	$1000, %rax, %rdx
	leaq	used(%rip), %r13
	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
	movl	$1, 0(%r13,%r10,4)
	movl	%edi, 4(%rsp)
	movslq	cnt(%rip), %rdi
	leal	1(%rdi), %r9d
	addq	%rdx, %rdi
	movl	%esi, (%rcx,%rdi,4)
	movl	n(%rip), %esi
	movl	%r9d, cnt(%rip)
	movl	%r9d, (%r8,%rax,4)
	testl	%esi, %esi
	jle	.L28
	leaq	map(%rip), %r11
	xorl	%ebx, %ebx
	pxor	%xmm0, %xmm0
	leaq	(%r11,%r10,8), %rbp
	movq	%rdx, %r10
.L41:
	movl	0(%r13,%rbx,4), %edi
	movl	%ebx, %edx
	testl	%edi, %edi
	jne	.L30
	ucomisd	0(%rbp), %xmm0
	jp	.L43
	jne	.L43
.L30:
	addq	$1, %rbx
	addq	$8000, %rbp
	cmpl	%ebx, %esi
	jg	.L41
.L28:
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L43:
	.cfi_restore_state
	movslq	cnt(%rip), %rdi
	movq	%rbx, 8(%rsp)
	leaq	(%r11,%rbx,8), %r14
	xorl	%r12d, %r12d
	movl	$1, 0(%r13,%rbx,4)
	leal	1(%rdi), %r9d
	addq	%r10, %rdi
	movl	%r9d, cnt(%rip)
	movl	%edx, (%rcx,%rdi,4)
	movl	%r9d, (%r8,%rax,4)
.L40:
	movl	0(%r13,%r12,4), %r15d
	movl	%r12d, %edx
	testl	%r15d, %r15d
	jne	.L32
	ucomisd	(%r14), %xmm0
	jp	.L44
	jne	.L44
.L32:
	addq	$1, %r12
	addq	$8000, %r14
	cmpl	%r12d, %esi
	jg	.L40
	movq	8(%rsp), %rbx
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L44:
	movslq	cnt(%rip), %rdi
	leaq	(%r11,%r12,8), %r15
	xorl	%ebx, %ebx
	movl	$1, 0(%r13,%r12,4)
	leal	1(%rdi), %r9d
	addq	%r10, %rdi
	movl	%r9d, cnt(%rip)
	movl	%edx, (%rcx,%rdi,4)
	movq	%r14, %rdx
	movq	%r12, %r14
	movl	%r9d, (%r8,%rax,4)
	movq	%rbp, %r9
	movq	%r15, %rbp
.L39:
	movl	0(%r13,%rbx,4), %r12d
	movl	%ebx, %edi
	testl	%r12d, %r12d
	jne	.L34
	ucomisd	0(%rbp), %xmm0
	jp	.L45
	jne	.L45
.L34:
	addq	$1, %rbx
	addq	$8000, %rbp
	cmpl	%ebx, %esi
	jg	.L39
	movq	%r14, %r12
	movq	%r9, %rbp
	movq	%rdx, %r14
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L45:
	movslq	cnt(%rip), %r12
	movq	%r9, 16(%rsp)
	movl	$1, 0(%r13,%rbx,4)
	leal	1(%r12), %r15d
	addq	%r10, %r12
	movl	%r15d, cnt(%rip)
	movl	%edi, (%rcx,%r12,4)
	leaq	(%r11,%rbx,8), %r12
	movl	%r15d, (%r8,%rax,4)
	xorl	%r15d, %r15d
.L38:
	movl	0(%r13,%r15,4), %edi
	movl	%r15d, %r9d
	testl	%edi, %edi
	jne	.L36
	ucomisd	(%r12), %xmm0
	jp	.L46
	jne	.L46
.L36:
	addq	$1, %r15
	addq	$8000, %r12
	cmpl	%r15d, %esi
	jg	.L38
	movq	16(%rsp), %r9
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L46:
	movl	4(%rsp), %edi
	movl	%r9d, %esi
	movq	%rax, 40(%rsp)
	movq	%r10, 32(%rsp)
	movq	%rdx, 24(%rsp)
	call	dfs2.part.0
	movl	n(%rip), %esi
	movq	40(%rsp), %rax
	pxor	%xmm0, %xmm0
	movq	32(%rsp), %r10
	movq	24(%rsp), %rdx
	leaq	len(%rip), %r8
	leaq	g(%rip), %rcx
	leaq	map(%rip), %r11
	jmp	.L36
	.cfi_endproc
.LFE49:
	.size	dfs2.part.0, .-dfs2.part.0
	.p2align 4
	.globl	init
	.type	init, @function
init:
.LFB40:
	.cfi_startproc
	endbr64
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L57
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leal	-1(%rax), %esi
	leaq	used(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	0(,%rax,4), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	0(,%rax,8), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	g(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	map(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	len(%rip), %rbx
	leaq	4(%rbx), %rdx
	leaq	(%rdx,%rsi,4), %rcx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%rcx, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L54:
	movq	%r12, %rdi
	movq	%r14, %rdx
	xorl	%esi, %esi
	movl	$0, (%rbx)
	movl	$0, (%r15)
	addq	$4, %rbx
	addq	$4, %r15
	addq	$4000, %r12
	call	memset@PLT
	movq	%rbp, %rdi
	movq	%r13, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	addq	$8000, %rbp
	cmpq	8(%rsp), %rbx
	jne	.L54
	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
.L57:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE40:
	.size	init, .-init
	.p2align 4
	.globl	init2
	.type	init2, @function
init2:
.LFB41:
	.cfi_startproc
	endbr64
	movslq	n(%rip), %rdx
	testl	%edx, %edx
	jle	.L60
	salq	$2, %rdx
	xorl	%esi, %esi
	leaq	used(%rip), %rdi
	jmp	memset@PLT
	.p2align 4,,10
	.p2align 3
.L60:
	ret
	.cfi_endproc
.LFE41:
	.size	init2, .-init2
	.p2align 4
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB42:
	.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
	movslq	%edi, %r14
	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
	leaq	used(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	0(%rbp,%r14,4), %ebx
	testl	%ebx, %ebx
	jne	.L62
	movl	$1, 0(%rbp,%r14,4)
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L74
	imulq	$8000, %r14, %rcx
	leaq	map(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%rsi, %r13
	pxor	%xmm1, %xmm1
	leaq	4+d(%rip), %r8
	addq	%rsi, %rcx
.L73:
	movl	0(%rbp,%rbx,4), %r11d
	testl	%r11d, %r11d
	jne	.L65
	ucomisd	(%rcx,%rbx,8), %xmm1
	jp	.L75
	jne	.L75
.L65:
	addq	$1, %rbx
	addq	$8000, %r13
	cmpl	%ebx, %eax
	jg	.L73
.L74:
	movl	cnt(%rip), %eax
	leaq	d(%rip), %rdx
	addl	$1, %eax
	movl	%eax, cnt(%rip)
	movl	%eax, 4(%rdx,%r14,8)
.L62:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L75:
	.cfi_restore_state
	movl	$1, 0(%rbp,%rbx,4)
	movq	%rsi, %rdx
	xorl	%r12d, %r12d
.L72:
	movl	0(%rbp,%r12,4), %r10d
	testl	%r10d, %r10d
	jne	.L67
	ucomisd	0(%r13,%r12,8), %xmm1
	jp	.L76
	jne	.L76
.L67:
	addq	$1, %r12
	addq	$8000, %rdx
	cmpl	%r12d, %eax
	jg	.L72
	movl	cnt(%rip), %edi
	leal	1(%rdi), %edx
	movl	%edx, cnt(%rip)
	movl	%edx, (%r8,%rbx,8)
	jmp	.L65
	.p2align 4,,10
	.p2align 3
.L76:
	movl	$1, 0(%rbp,%r12,4)
	xorl	%r15d, %r15d
.L71:
	movl	0(%rbp,%r15,4), %r9d
	movl	%r15d, %edi
	testl	%r9d, %r9d
	jne	.L69
	ucomisd	(%rdx,%r15,8), %xmm1
	jp	.L77
	jne	.L77
.L69:
	addq	$1, %r15
	cmpl	%r15d, %eax
	jg	.L71
	movl	cnt(%rip), %edi
	addl	$1, %edi
	movl	%edi, cnt(%rip)
	movl	%edi, (%r8,%r12,8)
	jmp	.L67
	.p2align 4,,10
	.p2align 3
.L77:
	movq	%rdx, 8(%rsp)
	movq	%rcx, (%rsp)
	call	dfs.part.0
	movl	n(%rip), %eax
	movq	(%rsp), %rcx
	leaq	4+d(%rip), %r8
	movq	8(%rsp), %rdx
	leaq	map(%rip), %rsi
	jmp	.L69
	.cfi_endproc
.LFE42:
	.size	dfs, .-dfs
	.p2align 4
	.globl	dfs_init
	.type	dfs_init, @function
dfs_init:
.LFB43:
	.cfi_startproc
	endbr64
	movl	$0, cnt(%rip)
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L121
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	map(%rip), %r9
	leaq	4+d(%rip), %r11
	pxor	%xmm1, %xmm1
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	movq	%r9, %r10
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %r8
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	used(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	.p2align 4,,10
	.p2align 3
.L104:
	movl	0(%rbp,%r8,4), %r13d
	testl	%r13d, %r13d
	jne	.L84
	movl	$1, 0(%rbp,%r8,4)
	movq	%r9, %rsi
	xorl	%ebx, %ebx
.L103:
	movl	0(%rbp,%rbx,4), %r12d
	testl	%r12d, %r12d
	jne	.L85
	ucomisd	(%r10,%rbx,8), %xmm1
	jp	.L106
	jne	.L106
.L85:
	addq	$1, %rbx
	addq	$8000, %rsi
	cmpl	%ebx, %eax
	jg	.L103
	movl	cnt(%rip), %edi
	leal	1(%rdi), %edx
	movl	%edx, cnt(%rip)
	movl	%edx, (%r11,%r8,8)
.L84:
	addq	$1, %r8
	addq	$8000, %r10
	cmpl	%r8d, %eax
	jg	.L104
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L106:
	.cfi_restore_state
	movl	$1, 0(%rbp,%rbx,4)
	testl	%eax, %eax
	jle	.L87
	movq	%rbx, (%rsp)
	movq	%r9, %rcx
	xorl	%r12d, %r12d
.L102:
	movl	0(%rbp,%r12,4), %ebx
	testl	%ebx, %ebx
	jne	.L88
	ucomisd	(%rsi,%r12,8), %xmm1
	jp	.L107
	jne	.L107
.L88:
	addq	$1, %r12
	addq	$8000, %rcx
	cmpl	%r12d, %eax
	jg	.L102
	movq	(%rsp), %rbx
.L87:
	movl	cnt(%rip), %edi
	leal	1(%rdi), %edx
	movl	%edx, cnt(%rip)
	movl	%edx, (%r11,%rbx,8)
	jmp	.L85
	.p2align 4,,10
	.p2align 3
.L107:
	movl	$1, 0(%rbp,%r12,4)
	movq	%r9, %r14
	xorl	%ebx, %ebx
	movq	%r10, 8(%rsp)
	movq	%r8, 16(%rsp)
.L101:
	movl	0(%rbp,%rbx,4), %r10d
	testl	%r10d, %r10d
	jne	.L90
	ucomisd	(%rcx,%rbx,8), %xmm1
	jp	.L108
	jne	.L108
.L90:
	addq	$1, %rbx
	addq	$8000, %r14
	cmpl	%ebx, %eax
	jg	.L101
	movl	cnt(%rip), %edi
	movq	8(%rsp), %r10
	movq	16(%rsp), %r8
	leal	1(%rdi), %edx
	movl	%edx, cnt(%rip)
	movl	%edx, (%r11,%r12,8)
	jmp	.L88
	.p2align 4,,10
	.p2align 3
.L108:
	movl	$1, 0(%rbp,%rbx,4)
	movq	%r9, %rdx
	xorl	%r13d, %r13d
.L100:
	movl	0(%rbp,%r13,4), %r8d
	testl	%r8d, %r8d
	jne	.L92
	ucomisd	(%r14,%r13,8), %xmm1
	jp	.L109
	jne	.L109
.L92:
	addq	$1, %r13
	addq	$8000, %rdx
	cmpl	%r13d, %eax
	jg	.L100
	movl	cnt(%rip), %edi
	leal	1(%rdi), %edx
	movl	%edx, cnt(%rip)
	movl	%edx, (%r11,%rbx,8)
	jmp	.L90
	.p2align 4,,10
	.p2align 3
.L109:
	movl	$1, 0(%rbp,%r13,4)
	movq	%r13, %r8
	movq	%r9, %r10
	xorl	%r15d, %r15d
	movq	%rbx, %r13
.L99:
	movl	0(%rbp,%r15,4), %edi
	testl	%edi, %edi
	jne	.L94
	ucomisd	(%rdx,%r15,8), %xmm1
	jp	.L110
	jne	.L110
.L94:
	addq	$1, %r15
	addq	$8000, %r10
	cmpl	%r15d, %eax
	jg	.L99
	movl	cnt(%rip), %edi
	movq	%r13, %rbx
	movq	%r8, %r13
	addl	$1, %edi
	movl	%edi, cnt(%rip)
	movl	%edi, (%r11,%r8,8)
	jmp	.L92
	.p2align 4,,10
	.p2align 3
.L110:
	movl	$1, 0(%rbp,%r15,4)
	xorl	%ebx, %ebx
	movq	%r14, 24(%rsp)
	movq	%rcx, %r14
	movq	%r13, 32(%rsp)
	movq	%rsi, %r13
	movq	%r15, 40(%rsp)
	movq	%r12, %r15
	movq	%r10, %r12
.L98:
	movl	0(%rbp,%rbx,4), %ecx
	movl	%ebx, %edi
	testl	%ecx, %ecx
	jne	.L96
	ucomisd	(%r12,%rbx,8), %xmm1
	jp	.L111
	jne	.L111
.L96:
	addq	$1, %rbx
	cmpl	%ebx, %eax
	jg	.L98
	movl	cnt(%rip), %edi
	movq	%r12, %r10
	movq	%r15, %r12
	movq	%r13, %rsi
	movq	40(%rsp), %r15
	movq	%r14, %rcx
	movq	32(%rsp), %r13
	addl	$1, %edi
	movq	24(%rsp), %r14
	movl	%edi, cnt(%rip)
	movl	%edi, (%r11,%r15,8)
	jmp	.L94
.L111:
	movq	%r8, 56(%rsp)
	movq	%rdx, 48(%rsp)
	call	dfs.part.0
	movl	n(%rip), %eax
	movq	56(%rsp), %r8
	leaq	4+d(%rip), %r11
	movq	48(%rsp), %rdx
	leaq	map(%rip), %r9
	jmp	.L96
.L121:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE43:
	.size	dfs_init, .-dfs_init
	.p2align 4
	.globl	dfs2
	.type	dfs2, @function
dfs2:
.LFB44:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%esi, %rcx
	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
	leaq	used(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movl	0(%rbp,%rcx,4), %r14d
	testl	%r14d, %r14d
	jne	.L124
	movslq	%edi, %rdx
	movslq	cnt(%rip), %rax
	leaq	g(%rip), %r10
	leaq	len(%rip), %r9
	imulq	$1000, %rdx, %r8
	movl	$1, 0(%rbp,%rcx,4)
	leal	1(%rax), %r11d
	movl	%r11d, cnt(%rip)
	addq	%r8, %rax
	movl	%r11d, (%r9,%rdx,4)
	movl	%esi, (%r10,%rax,4)
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L124
	leaq	map(%rip), %r11
	xorl	%ebx, %ebx
	pxor	%xmm1, %xmm1
	leaq	(%r11,%rcx,8), %r12
.L135:
	movl	0(%rbp,%rbx,4), %r13d
	movl	%ebx, %ecx
	testl	%r13d, %r13d
	jne	.L127
	ucomisd	(%r12), %xmm1
	jp	.L136
	jne	.L136
.L127:
	addq	$1, %rbx
	addq	$8000, %r12
	cmpl	%ebx, %eax
	jg	.L135
.L124:
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L136:
	.cfi_restore_state
	movslq	cnt(%rip), %rsi
	movl	$1, 0(%rbp,%rbx,4)
	leaq	(%r11,%rbx,8), %r14
	leal	1(%rsi), %r13d
	addq	%r8, %rsi
	movl	%ecx, (%r10,%rsi,4)
	movl	%r13d, cnt(%rip)
	movl	%r13d, (%r9,%rdx,4)
	xorl	%r13d, %r13d
.L134:
	movl	0(%rbp,%r13,4), %esi
	movl	%r13d, %ecx
	testl	%esi, %esi
	jne	.L129
	ucomisd	(%r14), %xmm1
	jp	.L137
	jne	.L137
.L129:
	addq	$1, %r13
	addq	$8000, %r14
	cmpl	%r13d, %eax
	jg	.L134
	jmp	.L127
	.p2align 4,,10
	.p2align 3
.L137:
	movl	$1, 0(%rbp,%r13,4)
	movslq	cnt(%rip), %rsi
	leal	1(%rsi), %r15d
	addq	%r8, %rsi
	movl	%r15d, cnt(%rip)
	movl	%ecx, (%r10,%rsi,4)
	leaq	(%r11,%r13,8), %rcx
	movl	%r15d, (%r9,%rdx,4)
	xorl	%r15d, %r15d
.L133:
	cmpl	$0, 0(%rbp,%r15,4)
	movl	%r15d, %esi
	jne	.L131
	ucomisd	(%rcx), %xmm1
	jp	.L138
	jne	.L138
.L131:
	addq	$1, %r15
	addq	$8000, %rcx
	cmpl	%r15d, %eax
	jg	.L133
	jmp	.L129
	.p2align 4,,10
	.p2align 3
.L138:
	movq	%rdx, 24(%rsp)
	movq	%r8, 16(%rsp)
	movq	%rcx, 8(%rsp)
	movl	%edi, 4(%rsp)
	call	dfs2.part.0
	movl	n(%rip), %eax
	movq	24(%rsp), %rdx
	leaq	map(%rip), %r11
	movq	16(%rsp), %r8
	movq	8(%rsp), %rcx
	leaq	g(%rip), %r10
	leaq	len(%rip), %r9
	movl	4(%rsp), %edi
	jmp	.L131
	.cfi_endproc
.LFE44:
	.size	dfs2, .-dfs2
	.p2align 4
	.globl	dfs2_init
	.type	dfs2_init, @function
dfs2_init:
.LFB45:
	.cfi_startproc
	endbr64
	movl	n(%rip), %r11d
	testl	%r11d, %r11d
	jle	.L175
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	used(%rip), %r9
	movslq	%r11d, %rdx
	xorl	%esi, %esi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%r9, %rdi
	salq	$2, %rdx
	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	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	%r11d, 8(%rsp)
	call	memset@PLT
	xorl	%edi, %edi
	movl	8(%rsp), %esi
	xorl	%r8d, %r8d
	movl	%edi, 4(%rsp)
	movq	%rax, %r9
	leaq	d(%rip), %r10
	pxor	%xmm1, %xmm1
	jmp	.L161
	.p2align 4,,10
	.p2align 3
.L145:
	addq	$1, %r8
	cmpl	%r8d, %esi
	jle	.L178
.L161:
	movl	$0, cnt(%rip)
	movslq	(%r10,%r8,8), %rax
	movl	(%r9,%rax,4), %edi
	testl	%edi, %edi
	jne	.L145
	movslq	4(%rsp), %r15
	movq	%r8, 8(%rsp)
	xorl	%ebx, %ebx
	leaq	g(%rip), %rdi
	leaq	map(%rip), %r11
	movl	$1, (%r9,%rax,4)
	imulq	$4000, %r15, %rcx
	leaq	(%r11,%rax,8), %rbp
	movq	%r15, %r8
	movl	$1, cnt(%rip)
	movl	%eax, (%rdi,%rcx)
	imulq	$1000, %r15, %rax
	leaq	len(%rip), %rcx
	movl	$1, (%rcx,%r15,4)
	movq	%rax, 16(%rsp)
.L160:
	movl	(%r9,%rbx,4), %ecx
	movl	%ebx, %eax
	testl	%ecx, %ecx
	jne	.L146
	ucomisd	0(%rbp), %xmm1
	jp	.L163
	jne	.L163
.L146:
	addq	$1, %rbx
	addq	$8000, %rbp
	cmpl	%ebx, %esi
	jg	.L160
	movq	8(%rsp), %r8
	addl	$1, 4(%rsp)
	addq	$1, %r8
	cmpl	%r8d, %esi
	jg	.L161
.L178:
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L163:
	.cfi_restore_state
	movslq	cnt(%rip), %rdx
	leaq	g(%rip), %rdi
	leaq	(%r11,%rbx,8), %r13
	xorl	%r12d, %r12d
	movl	$1, (%r9,%rbx,4)
	leal	1(%rdx), %ecx
	addq	16(%rsp), %rdx
	movq	%rbx, 24(%rsp)
	movl	%eax, (%rdi,%rdx,4)
	leaq	len(%rip), %rax
	movl	%ecx, cnt(%rip)
	movl	%ecx, (%rax,%r8,4)
.L159:
	movl	(%r9,%r12,4), %edx
	movl	%r12d, %eax
	testl	%edx, %edx
	jne	.L148
	ucomisd	0(%r13), %xmm1
	jp	.L164
	jne	.L164
.L148:
	addq	$1, %r12
	addq	$8000, %r13
	cmpl	%r12d, %esi
	jg	.L159
	movq	24(%rsp), %rbx
	jmp	.L146
	.p2align 4,,10
	.p2align 3
.L164:
	movslq	cnt(%rip), %rdx
	leaq	g(%rip), %rdi
	movl	$1, (%r9,%r12,4)
	xorl	%ebx, %ebx
	leaq	(%r11,%r12,8), %r14
	leal	1(%rdx), %ecx
	addq	16(%rsp), %rdx
	movl	%eax, (%rdi,%rdx,4)
	leaq	len(%rip), %rax
	movl	%ecx, cnt(%rip)
	movl	%ecx, (%rax,%r8,4)
.L158:
	movl	(%r9,%rbx,4), %r15d
	movl	%ebx, %eax
	testl	%r15d, %r15d
	jne	.L150
	ucomisd	(%r14), %xmm1
	jp	.L165
	jne	.L165
.L150:
	addq	$1, %rbx
	addq	$8000, %r14
	cmpl	%ebx, %esi
	jg	.L158
	jmp	.L148
	.p2align 4,,10
	.p2align 3
.L165:
	movslq	cnt(%rip), %rdx
	leaq	g(%rip), %rdi
	movl	$1, (%r9,%rbx,4)
	xorl	%r15d, %r15d
	leal	1(%rdx), %ecx
	addq	16(%rsp), %rdx
	movl	%eax, (%rdi,%rdx,4)
	leaq	len(%rip), %rax
	movq	%r13, %rdx
	movq	%r12, %r13
	movl	%ecx, (%rax,%r8,4)
	movq	%rbx, %r12
	leaq	(%r11,%rbx,8), %rax
	movl	%ecx, cnt(%rip)
	movq	%rbp, %rcx
.L157:
	movl	(%r9,%r15,4), %ebx
	movl	%r15d, %edi
	testl	%ebx, %ebx
	jne	.L152
	ucomisd	(%rax), %xmm1
	jp	.L166
	jne	.L166
.L152:
	addq	$1, %r15
	addq	$8000, %rax
	cmpl	%r15d, %esi
	jg	.L157
	movq	%r12, %rbx
	movq	%rcx, %rbp
	movq	%r13, %r12
	movq	%rdx, %r13
	jmp	.L150
	.p2align 4,,10
	.p2align 3
.L166:
	movslq	cnt(%rip), %rbx
	movl	$1, (%r9,%r15,4)
	movq	%r8, 40(%rsp)
	leal	1(%rbx), %ebp
	addq	16(%rsp), %rbx
	movl	%ebp, 32(%rsp)
	movl	%ebp, cnt(%rip)
	leaq	g(%rip), %rbp
	movl	%edi, 0(%rbp,%rbx,4)
	movl	32(%rsp), %ebx
	leaq	len(%rip), %rdi
	leaq	(%r11,%r15,8), %rbp
	movq	%r13, 32(%rsp)
	movq	%r12, %r13
	movq	%rax, %r12
	movl	%ebx, (%rdi,%r8,4)
	xorl	%ebx, %ebx
.L156:
	movl	(%r9,%rbx,4), %eax
	movl	%ebx, %r8d
	testl	%eax, %eax
	jne	.L154
	ucomisd	0(%rbp), %xmm1
	jp	.L167
	jne	.L167
.L154:
	addq	$1, %rbx
	addq	$8000, %rbp
	cmpl	%ebx, %esi
	jg	.L156
	movq	%r12, %rax
	movq	40(%rsp), %r8
	movq	%r13, %r12
	movq	32(%rsp), %r13
	jmp	.L152
	.p2align 4,,10
	.p2align 3
.L167:
	movl	4(%rsp), %edi
	movl	%r8d, %esi
	movq	%rcx, 56(%rsp)
	movq	%rdx, 48(%rsp)
	call	dfs2.part.0
	movl	n(%rip), %esi
	movq	56(%rsp), %rcx
	leaq	used(%rip), %r9
	movq	48(%rsp), %rdx
	leaq	map(%rip), %r11
	leaq	d(%rip), %r10
	jmp	.L154
.L175:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE45:
	.size	dfs2_init, .-dfs2_init
	.p2align 4
	.globl	wake
	.type	wake, @function
wake:
.LFB46:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%edi, %r8d
	movl	$500, %ecx
	leaq	len(%rip), %rdx
	subq	$4016, %rsp
	.cfi_def_cfa_offset 4032
	movq	%fs:40, %rax
	movq	%rax, 4008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	movq	%rsi, %rdi
	rep stosq
	movslq	%r8d, %rax
	movl	(%rdx,%rax,4), %edx
	testl	%edx, %edx
	jle	.L180
	imulq	$4000, %rax, %r9
	leaq	g(%rip), %rcx
	subl	$1, %edx
	imulq	$1000, %rax, %rax
	addq	%rcx, %r9
	addq	%rdx, %rax
	leaq	4(%rcx), %rdx
	leaq	(%rdx,%rax,4), %r11
	movq	%r9, %rax
	.p2align 4,,10
	.p2align 3
.L181:
	movslq	(%rax), %rdx
	addq	$4, %rax
	movl	$1, (%rsp,%rdx,4)
	cmpq	%r11, %rax
	jne	.L181
	movslq	n(%rip), %rdi
	leaq	map(%rip), %r10
	pxor	%xmm0, %xmm0
	movq	%rdi, %rbx
.L182:
	xorl	%eax, %eax
	testl	%ebx, %ebx
	jle	.L188
	.p2align 4,,10
	.p2align 3
.L186:
	movl	(%rsi,%rax,4), %r8d
	testl	%r8d, %r8d
	jne	.L183
	movslq	%eax, %rdx
	movslq	(%r9), %rcx
	imulq	$1000, %rdx, %rdx
	addq	%rcx, %rdx
	ucomisd	(%r10,%rdx,8), %xmm0
	jp	.L179
	jne	.L179
.L183:
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L186
.L188:
	addq	$4, %r9
	cmpq	%r11, %r9
	jne	.L182
.L180:
	movl	$1, %r8d
	.p2align 4,,10
	.p2align 3
.L179:
	movq	4008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L194
	addq	$4016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	movl	%r8d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L194:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE46:
	.size	wake, .-wake
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%d"
.LC4:
	.string	"%lf%d"
.LC7:
	.string	"%.9f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB47:
	.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
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4072, %rsp
	.cfi_def_cfa_offset 8224
	leaq	.LC3(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 8152(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L256:
	leaq	n(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %edx
	testl	%edx, %edx
	je	.L196
	jle	.L197
	leaq	len(%rip), %rcx
	leal	-1(%rdx), %esi
	leaq	4(%rcx), %rax
	leaq	used(%rip), %r15
	leaq	(%rax,%rsi,4), %rax
	leaq	map(%rip), %r14
	movq	%r15, 32(%rsp)
	movq	%r15, %r13
	movq	%rax, 16(%rsp)
	movq	%r14, %rbx
	movq	%rcx, %r15
	leaq	0(,%rdx,4), %rax
	movq	%rax, 8(%rsp)
	leaq	0(,%rdx,8), %rax
	leaq	g(%rip), %r12
	movq	%r14, 24(%rsp)
	movq	%rax, %r14
	.p2align 4,,10
	.p2align 3
.L198:
	movl	$0, (%r15)
	movq	%r12, %rdi
	xorl	%esi, %esi
	addq	$4, %r15
	movq	8(%rsp), %rdx
	movl	$0, 0(%r13)
	addq	$4000, %r12
	addq	$4, %r13
	call	memset@PLT
	movq	%rbx, %rdi
	movq	%r14, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	addq	$8000, %rbx
	cmpq	16(%rsp), %r15
	jne	.L198
	xorl	%eax, %eax
	movl	$1000, %ecx
	movq	32(%rsp), %r15
	xorl	%r13d, %r13d
	leaq	144(%rsp), %rdi
	movq	24(%rsp), %r14
	movsd	.LC2(%rip), %xmm7
	leaq	132(%rsp), %r12
	movq	%rdi, 32(%rsp)
	rep stosq
	leaq	128(%rsp), %rax
	movq	%r15, 40(%rsp)
	movq	%rax, 16(%rsp)
	leaq	136(%rsp), %rax
	movq	%rax, 24(%rsp)
	movsd	%xmm7, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L201:
	movq	16(%rsp), %rdx
	movq	24(%rsp), %rsi
	xorl	%eax, %eax
	movslq	%r13d, %rbx
	leaq	.LC4(%rip), %rdi
	xorl	%r15d, %r15d
	call	__isoc99_scanf@PLT
	movq	32(%rsp), %rax
	movsd	136(%rsp), %xmm0
	movsd	%xmm0, (%rax,%r13,8)
	movl	128(%rsp), %eax
	testl	%eax, %eax
	jle	.L203
	imulq	$1000, %rbx, %rbx
	.p2align 4,,10
	.p2align 3
.L200:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	132(%rsp), %eax
	movsd	8(%rsp), %xmm4
	subl	$1, %eax
	cltq
	addq	%rbx, %rax
	movsd	%xmm4, (%r14,%rax,8)
	cmpl	%r15d, 128(%rsp)
	jg	.L200
.L203:
	movl	n(%rip), %edx
	addq	$1, %r13
	cmpl	%r13d, %edx
	jg	.L201
	movq	40(%rsp), %r15
	testl	%edx, %edx
	jle	.L204
	leal	-1(%rdx), %eax
	cmpl	$2, %eax
	jbe	.L260
	movl	%edx, %ecx
	leaq	d(%rip), %rax
	movdqa	.LC1(%rip), %xmm1
	movdqa	.LC6(%rip), %xmm2
	shrl	$2, %ecx
	movq	%rax, 16(%rsp)
	leaq	32(%rax), %rsi
	subl	$1, %ecx
	salq	$5, %rcx
	addq	%rsi, %rcx
	.p2align 4,,10
	.p2align 3
.L206:
	movdqa	%xmm1, %xmm0
	addq	$32, %rax
	paddd	.LC5(%rip), %xmm1
	movdqa	%xmm0, %xmm3
	punpckhdq	%xmm2, %xmm0
	punpckldq	%xmm2, %xmm3
	movaps	%xmm0, -16(%rax)
	movaps	%xmm3, -32(%rax)
	cmpq	%rcx, %rax
	jne	.L206
	movl	%edx, %eax
	andl	$-4, %eax
	testb	$3, %dl
	je	.L207
.L205:
	movq	16(%rsp), %rdi
	movslq	%eax, %rcx
	movl	%eax, (%rdi,%rcx,8)
	movl	$1, 4(%rdi,%rcx,8)
	leal	1(%rax), %ecx
	cmpl	%ecx, %edx
	jle	.L207
	movslq	%ecx, %rsi
	addl	$2, %eax
	movl	%ecx, (%rdi,%rsi,8)
	movl	$1, 4(%rdi,%rsi,8)
	cmpl	%eax, %edx
	jle	.L207
	movslq	%eax, %rcx
	movl	%eax, (%rdi,%rcx,8)
	movl	$1, 4(%rdi,%rcx,8)
.L207:
	movl	$0, cnt(%rip)
	leaq	map(%rip), %r8
	xorl	%r11d, %r11d
	leaq	4+d(%rip), %r9
	movq	%r8, %r10
	movq	%r14, %r8
	.p2align 4,,10
	.p2align 3
.L228:
	movl	(%r15,%r11,4), %eax
	testl	%eax, %eax
	jne	.L208
	movl	$1, (%r15,%r11,4)
	movq	%r8, %rsi
	xorl	%ebx, %ebx
	movq	%r11, 24(%rsp)
.L227:
	movl	(%r15,%rbx,4), %eax
	testl	%eax, %eax
	jne	.L209
	pxor	%xmm5, %xmm5
	ucomisd	(%r10,%rbx,8), %xmm5
	jp	.L262
	jne	.L262
.L209:
	addq	$1, %rbx
	addq	$8000, %rsi
	cmpl	%ebx, %edx
	jg	.L227
	movl	cnt(%rip), %eax
	movq	24(%rsp), %r11
	addl	$1, %eax
	movl	%eax, cnt(%rip)
	movl	%eax, (%r9,%r11,8)
.L208:
	addq	$1, %r11
	addq	$8000, %r10
	cmpl	%r11d, %edx
	jg	.L228
.L257:
	movq	16(%rsp), %rdi
	movslq	%edx, %rsi
	leaq	comp(%rip), %rcx
	movl	$8, %edx
	call	qsort@PLT
	movl	n(%rip), %r11d
	testl	%r11d, %r11d
	jle	.L251
	movslq	%r11d, %rdx
	leaq	used(%rip), %r15
	xorl	%esi, %esi
	movl	%r11d, 32(%rsp)
	salq	$2, %rdx
	movq	%r15, %rdi
	call	memset@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	pxor	%xmm1, %xmm1
	movl	%r9d, 24(%rsp)
	movq	%r8, %r10
	movl	32(%rsp), %r9d
	jmp	.L250
	.p2align 4,,10
	.p2align 3
.L231:
	addq	$1, %r10
	cmpl	%r10d, %r9d
	jle	.L306
.L250:
	movl	$0, cnt(%rip)
	movq	16(%rsp), %rax
	movslq	(%rax,%r10,8), %rax
	movl	(%r15,%rax,4), %r13d
	testl	%r13d, %r13d
	jne	.L231
	movslq	24(%rsp), %r8
	movq	%r10, 32(%rsp)
	xorl	%ebx, %ebx
	leaq	g(%rip), %rdi
	movl	$1, (%r15,%rax,4)
	imulq	$4000, %r8, %rcx
	movl	$1, cnt(%rip)
	movl	%eax, (%rdi,%rcx)
	leaq	len(%rip), %rcx
	movl	$1, (%rcx,%r8,4)
	leaq	map(%rip), %rcx
	leaq	(%rcx,%rax,8), %r11
	movq	%rcx, 48(%rsp)
	imulq	$1000, %r8, %rax
	movq	%rax, 40(%rsp)
.L249:
	movl	(%r15,%rbx,4), %r12d
	movl	%ebx, %eax
	testl	%r12d, %r12d
	jne	.L232
	ucomisd	(%r11), %xmm1
	jp	.L268
	jne	.L268
.L232:
	addq	$1, %rbx
	addq	$8000, %r11
	cmpl	%ebx, %r9d
	jg	.L249
	movq	32(%rsp), %r10
	addl	$1, 24(%rsp)
	addq	$1, %r10
	cmpl	%r10d, %r9d
	jg	.L250
.L306:
	testl	%r9d, %r9d
	jle	.L251
	movsd	8(%rsp), %xmm2
	movslq	%r9d, %r12
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	leaq	len(%rip), %rbx
	movsd	%xmm2, 16(%rsp)
	jmp	.L255
	.p2align 4,,10
	.p2align 3
.L252:
	addq	$1, %r15
	addq	$1000, %r13
	cmpq	%r15, %r12
	je	.L230
.L255:
	movl	(%rbx,%r15,4), %r14d
	movl	%r15d, %edi
	testl	%r14d, %r14d
	je	.L252
	call	wake
	testl	%eax, %eax
	je	.L252
	testl	%r14d, %r14d
	jle	.L261
	leal	-1(%r14), %edx
	leaq	g(%rip), %rax
	movsd	8(%rsp), %xmm0
	addq	%r13, %rdx
	leaq	4+g(%rip), %rcx
	leaq	(%rax,%r13,4), %rax
	leaq	(%rcx,%rdx,4), %rcx
	.p2align 4,,10
	.p2align 3
.L254:
	movslq	(%rax), %rdx
	addq	$4, %rax
	mulsd	144(%rsp,%rdx,8), %xmm0
	cmpq	%rcx, %rax
	jne	.L254
	movsd	8(%rsp), %xmm1
	subsd	%xmm0, %xmm1
.L253:
	mulsd	16(%rsp), %xmm1
	addq	$1, %r15
	addq	$1000, %r13
	movsd	%xmm1, 16(%rsp)
	cmpq	%r15, %r12
	jne	.L255
	.p2align 4,,10
	.p2align 3
.L230:
	movsd	16(%rsp), %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC7(%rip), %rsi
	call	__printf_chk@PLT
	jmp	.L256
	.p2align 4,,10
	.p2align 3
.L262:
	movl	$1, (%r15,%rbx,4)
	testl	%edx, %edx
	jle	.L211
	movq	%r10, 32(%rsp)
	movq	%r8, %r11
	xorl	%r12d, %r12d
	movq	%rbx, %r10
.L226:
	movl	(%r15,%r12,4), %r14d
	testl	%r14d, %r14d
	jne	.L212
	pxor	%xmm6, %xmm6
	ucomisd	(%rsi,%r12,8), %xmm6
	jp	.L263
	jne	.L263
.L212:
	addq	$1, %r12
	addq	$8000, %r11
	cmpl	%r12d, %edx
	jg	.L226
	movq	%r10, %rbx
	movq	32(%rsp), %r10
.L211:
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
	movl	%eax, (%r9,%rbx,8)
	jmp	.L209
	.p2align 4,,10
	.p2align 3
.L263:
	movl	$1, (%r15,%r12,4)
	movq	%r8, %r14
	xorl	%ebx, %ebx
	movq	%r10, 40(%rsp)
	movq	%rsi, 48(%rsp)
.L225:
	movl	(%r15,%rbx,4), %r13d
	testl	%r13d, %r13d
	jne	.L214
	pxor	%xmm7, %xmm7
	ucomisd	(%r11,%rbx,8), %xmm7
	jp	.L264
	jne	.L264
.L214:
	addq	$1, %rbx
	addq	$8000, %r14
	cmpl	%ebx, %edx
	jg	.L225
	movl	cnt(%rip), %eax
	movq	40(%rsp), %r10
	movq	48(%rsp), %rsi
	addl	$1, %eax
	movl	%eax, cnt(%rip)
	movl	%eax, (%r9,%r12,8)
	jmp	.L212
	.p2align 4,,10
	.p2align 3
.L268:
	movslq	cnt(%rip), %rdx
	leaq	g(%rip), %rdi
	movq	%r11, 56(%rsp)
	xorl	%r12d, %r12d
	movl	$1, (%r15,%rbx,4)
	movq	%rbx, %r11
	leal	1(%rdx), %ecx
	addq	40(%rsp), %rdx
	movl	%eax, (%rdi,%rdx,4)
	leaq	len(%rip), %rax
	movl	%ecx, (%rax,%r8,4)
	movq	48(%rsp), %rax
	movl	%ecx, cnt(%rip)
	leaq	(%rax,%rbx,8), %r10
.L248:
	movl	(%r15,%r12,4), %ebx
	movl	%r12d, %eax
	testl	%ebx, %ebx
	jne	.L234
	ucomisd	(%r10), %xmm1
	jp	.L269
	jne	.L269
.L234:
	addq	$1, %r12
	addq	$8000, %r10
	cmpl	%r12d, %r9d
	jg	.L248
	movq	%r11, %rbx
	movq	56(%rsp), %r11
	jmp	.L232
	.p2align 4,,10
	.p2align 3
.L264:
	movl	$1, (%r15,%rbx,4)
	movq	%r8, %rcx
	xorl	%r13d, %r13d
.L224:
	movl	(%r15,%r13,4), %r10d
	testl	%r10d, %r10d
	jne	.L216
	pxor	%xmm7, %xmm7
	ucomisd	(%r14,%r13,8), %xmm7
	jp	.L265
	jne	.L265
.L216:
	addq	$1, %r13
	addq	$8000, %rcx
	cmpl	%r13d, %edx
	jg	.L224
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
	movl	%eax, (%r9,%rbx,8)
	jmp	.L214
	.p2align 4,,10
	.p2align 3
.L269:
	movslq	cnt(%rip), %rdx
	leaq	g(%rip), %rdi
	movl	%r9d, %esi
	xorl	%ebx, %ebx
	movl	$1, (%r15,%r12,4)
	movq	%r12, %r9
	leal	1(%rdx), %ecx
	addq	40(%rsp), %rdx
	movl	%eax, (%rdi,%rdx,4)
	leaq	len(%rip), %rax
	movl	%ecx, (%rax,%r8,4)
	movq	48(%rsp), %rax
	movl	%ecx, cnt(%rip)
	leaq	(%rax,%r12,8), %r13
	movq	%r10, %r12
.L247:
	movl	(%r15,%rbx,4), %edi
	movl	%ebx, %eax
	testl	%edi, %edi
	jne	.L236
	ucomisd	0(%r13), %xmm1
	jp	.L270
	jne	.L270
.L236:
	addq	$1, %rbx
	addq	$8000, %r13
	cmpl	%ebx, %esi
	jg	.L247
	movq	%r12, %r10
	movq	%r9, %r12
	movl	%esi, %r9d
	jmp	.L234
.L265:
	movl	$1, (%r15,%r13,4)
	movq	%r12, %rsi
	movq	%r8, %r10
	xorl	%eax, %eax
	movq	%rbx, %r12
.L223:
	movl	(%r15,%rax,4), %edi
	testl	%edi, %edi
	jne	.L218
	pxor	%xmm2, %xmm2
	ucomisd	(%rcx,%rax,8), %xmm2
	jp	.L266
	jne	.L266
.L218:
	addq	$1, %rax
	addq	$8000, %r10
	cmpl	%eax, %edx
	jg	.L223
	movl	cnt(%rip), %eax
	movq	%r12, %rbx
	movq	%rsi, %r12
	addl	$1, %eax
	movl	%eax, cnt(%rip)
	movl	%eax, (%r9,%r13,8)
	jmp	.L216
.L270:
	movslq	cnt(%rip), %rdx
	leaq	g(%rip), %rdi
	movq	%r9, 64(%rsp)
	xorl	%r14d, %r14d
	movl	$1, (%r15,%rbx,4)
	leal	1(%rdx), %ecx
	addq	40(%rsp), %rdx
	movl	%eax, (%rdi,%rdx,4)
	leaq	len(%rip), %rax
	movl	%ecx, (%rax,%r8,4)
	movq	48(%rsp), %rax
	movl	%ecx, cnt(%rip)
	leaq	(%rax,%rbx,8), %rax
.L246:
	movl	(%r15,%r14,4), %ecx
	movl	%r14d, %edx
	testl	%ecx, %ecx
	jne	.L238
	ucomisd	(%rax), %xmm1
	jp	.L271
	jne	.L271
.L238:
	addq	$1, %r14
	addq	$8000, %rax
	cmpl	%r14d, %esi
	jg	.L246
	movq	64(%rsp), %r9
	jmp	.L236
.L266:
	movl	$1, (%r15,%rax,4)
	xorl	%ebx, %ebx
	movq	%r12, 56(%rsp)
	movq	%r10, %r12
	movq	%r14, 64(%rsp)
	movq	%r13, %r14
	movq	%rax, %r13
.L222:
	movl	(%r15,%rbx,4), %eax
	movl	%ebx, %edi
	testl	%eax, %eax
	jne	.L220
	pxor	%xmm6, %xmm6
	ucomisd	(%r12,%rbx,8), %xmm6
	jp	.L267
	jne	.L267
.L220:
	addq	$1, %rbx
	cmpl	%ebx, %edx
	jg	.L222
	movl	cnt(%rip), %edi
	movq	%r13, %rax
	movq	%r12, %r10
	movq	%r14, %r13
	movq	56(%rsp), %r12
	movq	64(%rsp), %r14
	addl	$1, %edi
	movl	%edi, cnt(%rip)
	movl	%edi, (%r9,%rax,8)
	jmp	.L218
.L271:
	movslq	cnt(%rip), %rcx
	leaq	g(%rip), %r9
	movl	$1, (%r15,%r14,4)
	movq	%r14, %r10
	leal	1(%rcx), %edi
	addq	40(%rsp), %rcx
	movl	%edx, (%r9,%rcx,4)
	leaq	len(%rip), %rcx
	xorl	%edx, %edx
	movq	%rbx, %r9
	movl	%edi, (%rcx,%r8,4)
	movq	48(%rsp), %rcx
	movl	%edi, cnt(%rip)
	leaq	(%rcx,%r14,8), %rcx
	movq	%r13, %r14
	movq	%r12, %r13
.L245:
	movl	(%r15,%rdx,4), %ebx
	movl	%edx, %edi
	testl	%ebx, %ebx
	jne	.L240
	ucomisd	(%rcx), %xmm1
	jp	.L272
	jne	.L272
.L240:
	addq	$1, %rdx
	addq	$8000, %rcx
	cmpl	%edx, %esi
	jg	.L245
	movq	%r13, %r12
	movq	%r9, %rbx
	movq	%r14, %r13
	movq	%r10, %r14
	jmp	.L238
.L261:
	pxor	%xmm1, %xmm1
	jmp	.L253
.L267:
	movq	%r8, 96(%rsp)
	movq	%r11, 88(%rsp)
	movq	%rsi, 80(%rsp)
	movq	%rcx, 72(%rsp)
	call	dfs.part.0
	movl	n(%rip), %edx
	movq	96(%rsp), %r8
	leaq	4+d(%rip), %r9
	movq	88(%rsp), %r11
	movq	80(%rsp), %rsi
	movq	72(%rsp), %rcx
	jmp	.L220
.L196:
	movq	8152(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L307
	addq	$8168, %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
.L197:
	.cfi_restore_state
	leaq	144(%rsp), %rdi
	movl	$1000, %ecx
	xorl	%eax, %eax
	movsd	.LC2(%rip), %xmm2
	rep stosq
	movsd	%xmm2, 8(%rsp)
.L204:
	leaq	d(%rip), %rax
	movl	$0, cnt(%rip)
	movq	%rax, 16(%rsp)
	jmp	.L257
.L251:
	movsd	8(%rsp), %xmm2
	movsd	%xmm2, 16(%rsp)
	jmp	.L230
.L272:
	movslq	cnt(%rip), %rbx
	movl	$1, (%r15,%rdx,4)
	leal	1(%rbx), %r12d
	addq	40(%rsp), %rbx
	movl	%r12d, 72(%rsp)
	movl	%r12d, cnt(%rip)
	leaq	g(%rip), %r12
	movl	%edi, (%r12,%rbx,4)
	movl	72(%rsp), %ebx
	leaq	len(%rip), %rdi
	movq	%r8, 72(%rsp)
	movl	%ebx, (%rdi,%r8,4)
	movq	48(%rsp), %rdi
	xorl	%ebx, %ebx
	leaq	(%rdi,%rdx,8), %r12
.L244:
	movl	(%r15,%rbx,4), %edi
	movl	%ebx, %r8d
	testl	%edi, %edi
	jne	.L242
	ucomisd	(%r12), %xmm1
	jp	.L273
	jne	.L273
.L242:
	addq	$1, %rbx
	addq	$8000, %r12
	cmpl	%ebx, %esi
	jg	.L244
	movq	72(%rsp), %r8
	jmp	.L240
.L260:
	leaq	d(%rip), %rcx
	xorl	%eax, %eax
	movq	%rcx, 16(%rsp)
	jmp	.L205
.L273:
	movl	24(%rsp), %edi
	movl	%r8d, %esi
	movq	%r11, 120(%rsp)
	movq	%rdx, 112(%rsp)
	movq	%rcx, 104(%rsp)
	movq	%r10, 96(%rsp)
	movq	%rax, 88(%rsp)
	movq	%r9, 80(%rsp)
	call	dfs2.part.0
	movl	n(%rip), %esi
	movq	120(%rsp), %r11
	movq	112(%rsp), %rdx
	movq	104(%rsp), %rcx
	movq	96(%rsp), %r10
	movq	88(%rsp), %rax
	movq	80(%rsp), %r9
	jmp	.L242
.L307:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE47:
	.size	main, .-main
	.globl	cnt
	.bss
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	len
	.align 32
	.type	len, @object
	.size	len, 4000
len:
	.zero	4000
	.globl	g
	.align 32
	.type	g, @object
	.size	g, 4000000
g:
	.zero	4000000
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 8000000
map:
	.zero	8000000
	.globl	used
	.align 32
	.type	used, @object
	.size	used, 4000
used:
	.zero	4000
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 8000
d:
	.zero	8000
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	0
	.long	1
	.long	2
	.long	3
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.section	.rodata.cst16
	.align 16
.LC5:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC6:
	.long	1
	.long	1
	.long	1
	.long	1
	.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	comp
	.type	comp, @function
comp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	4(%rsi), %eax
	subl	4(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	comp, .-comp
	.p2align 4
	.type	dfs.part.0, @function
dfs.part.0:
.LFB48:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movslq	%edi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	used(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movl	n(%rip), %eax
	movl	$1, (%r12,%r14,4)
	testl	%eax, %eax
	jle	.L17
	imulq	$8000, %r14, %rcx
	leaq	map(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%rsi, %r13
	pxor	%xmm0, %xmm0
	leaq	4+d(%rip), %r10
	addq	%rsi, %rcx
.L16:
	movl	(%r12,%rbx,4), %r9d
	testl	%r9d, %r9d
	jne	.L5
	ucomisd	(%rcx,%rbx,8), %xmm0
	jp	.L18
	jne	.L18
.L5:
	addq	$1, %rbx
	addq	$8000, %r13
	cmpl	%ebx, %eax
	jg	.L16
.L17:
	movl	cnt(%rip), %eax
	leaq	d(%rip), %rdx
	addl	$1, %eax
	movl	%eax, 4(%rdx,%r14,8)
	movl	%eax, cnt(%rip)
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	movl	$1, (%r12,%rbx,4)
	movq	%rsi, %rdx
	xorl	%ebp, %ebp
.L15:
	movl	(%r12,%rbp,4), %r8d
	testl	%r8d, %r8d
	jne	.L7
	ucomisd	0(%r13,%rbp,8), %xmm0
	jp	.L19
	jne	.L19
.L7:
	addq	$1, %rbp
	addq	$8000, %rdx
	cmpl	%ebp, %eax
	jg	.L15
	movl	cnt(%rip), %edi
	leal	1(%rdi), %edx
	movl	%edx, cnt(%rip)
	movl	%edx, (%r10,%rbx,8)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L19:
	movl	$1, (%r12,%rbp,4)
	movq	%rsi, %r9
	xorl	%r15d, %r15d
.L14:
	movl	(%r12,%r15,4), %edi
	testl	%edi, %edi
	jne	.L9
	ucomisd	(%rdx,%r15,8), %xmm0
	jp	.L20
	jne	.L20
.L9:
	addq	$1, %r15
	addq	$8000, %r9
	cmpl	%r15d, %eax
	jg	.L14
	movl	cnt(%rip), %edi
	addl	$1, %edi
	movl	%edi, cnt(%rip)
	movl	%edi, (%r10,%rbp,8)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	movl	$1, (%r12,%r15,4)
	xorl	%r8d, %r8d
.L13:
	movl	(%r12,%r8,4), %r11d
	movl	%r8d, %edi
	testl	%r11d, %r11d
	jne	.L11
	ucomisd	(%r9,%r8,8), %xmm0
	jp	.L21
	jne	.L21
.L11:
	addq	$1, %r8
	cmpl	%r8d, %eax
	jg	.L13
	movl	cnt(%rip), %edi
	addl	$1, %edi
	movl	%edi, cnt(%rip)
	movl	%edi, (%r10,%r15,8)
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%r8, 24(%rsp)
	movq	%r9, 16(%rsp)
	movq	%rdx, 8(%rsp)
	movq	%rcx, (%rsp)
	call	dfs.part.0
	movl	n(%rip), %eax
	movq	24(%rsp), %r8
	leaq	4+d(%rip), %r10
	movq	16(%rsp), %r9
	movq	8(%rsp), %rdx
	pxor	%xmm0, %xmm0
	leaq	map(%rip), %rsi
	movq	(%rsp), %rcx
	jmp	.L11
	.cfi_endproc
.LFE48:
	.size	dfs.part.0, .-dfs.part.0
	.p2align 4
	.type	dfs2.part.0, @function
dfs2.part.0:
.LFB49:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%edi, %edx
	leaq	g(%rip), %rcx
	movslq	%esi, %r10
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movslq	%edx, %rax
	leaq	len(%rip), %r8
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	imulq	$1000, %rax, %rdx
	leaq	used(%rip), %r13
	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
	movl	$1, 0(%r13,%r10,4)
	movl	%edi, 4(%rsp)
	movslq	cnt(%rip), %rdi
	leal	1(%rdi), %r9d
	addq	%rdx, %rdi
	movl	%esi, (%rcx,%rdi,4)
	movl	n(%rip), %esi
	movl	%r9d, cnt(%rip)
	movl	%r9d, (%r8,%rax,4)
	testl	%esi, %esi
	jle	.L28
	leaq	map(%rip), %r11
	xorl	%ebx, %ebx
	pxor	%xmm0, %xmm0
	leaq	(%r11,%r10,8), %rbp
	movq	%rdx, %r10
.L41:
	movl	0(%r13,%rbx,4), %edi
	movl	%ebx, %edx
	testl	%edi, %edi
	jne	.L30
	ucomisd	0(%rbp), %xmm0
	jp	.L43
	jne	.L43
.L30:
	addq	$1, %rbx
	addq	$8000, %rbp
	cmpl	%ebx, %esi
	jg	.L41
.L28:
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L43:
	.cfi_restore_state
	movslq	cnt(%rip), %rdi
	movq	%rbx, 8(%rsp)
	leaq	(%r11,%rbx,8), %r14
	xorl	%r12d, %r12d
	movl	$1, 0(%r13,%rbx,4)
	leal	1(%rdi), %r9d
	addq	%r10, %rdi
	movl	%r9d, cnt(%rip)
	movl	%edx, (%rcx,%rdi,4)
	movl	%r9d, (%r8,%rax,4)
.L40:
	movl	0(%r13,%r12,4), %r15d
	movl	%r12d, %edx
	testl	%r15d, %r15d
	jne	.L32
	ucomisd	(%r14), %xmm0
	jp	.L44
	jne	.L44
.L32:
	addq	$1, %r12
	addq	$8000, %r14
	cmpl	%r12d, %esi
	jg	.L40
	movq	8(%rsp), %rbx
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L44:
	movslq	cnt(%rip), %rdi
	leaq	(%r11,%r12,8), %r15
	xorl	%ebx, %ebx
	movl	$1, 0(%r13,%r12,4)
	leal	1(%rdi), %r9d
	addq	%r10, %rdi
	movl	%r9d, cnt(%rip)
	movl	%edx, (%rcx,%rdi,4)
	movq	%r14, %rdx
	movq	%r12, %r14
	movl	%r9d, (%r8,%rax,4)
	movq	%rbp, %r9
	movq	%r15, %rbp
.L39:
	movl	0(%r13,%rbx,4), %r12d
	movl	%ebx, %edi
	testl	%r12d, %r12d
	jne	.L34
	ucomisd	0(%rbp), %xmm0
	jp	.L45
	jne	.L45
.L34:
	addq	$1, %rbx
	addq	$8000, %rbp
	cmpl	%ebx, %esi
	jg	.L39
	movq	%r14, %r12
	movq	%r9, %rbp
	movq	%rdx, %r14
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L45:
	movslq	cnt(%rip), %r12
	movq	%r9, 16(%rsp)
	movl	$1, 0(%r13,%rbx,4)
	leal	1(%r12), %r15d
	addq	%r10, %r12
	movl	%r15d, cnt(%rip)
	movl	%edi, (%rcx,%r12,4)
	leaq	(%r11,%rbx,8), %r12
	movl	%r15d, (%r8,%rax,4)
	xorl	%r15d, %r15d
.L38:
	movl	0(%r13,%r15,4), %edi
	movl	%r15d, %r9d
	testl	%edi, %edi
	jne	.L36
	ucomisd	(%r12), %xmm0
	jp	.L46
	jne	.L46
.L36:
	addq	$1, %r15
	addq	$8000, %r12
	cmpl	%r15d, %esi
	jg	.L38
	movq	16(%rsp), %r9
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L46:
	movl	4(%rsp), %edi
	movl	%r9d, %esi
	movq	%rax, 40(%rsp)
	movq	%r10, 32(%rsp)
	movq	%rdx, 24(%rsp)
	call	dfs2.part.0
	movl	n(%rip), %esi
	movq	40(%rsp), %rax
	pxor	%xmm0, %xmm0
	movq	32(%rsp), %r10
	movq	24(%rsp), %rdx
	leaq	len(%rip), %r8
	leaq	g(%rip), %rcx
	leaq	map(%rip), %r11
	jmp	.L36
	.cfi_endproc
.LFE49:
	.size	dfs2.part.0, .-dfs2.part.0
	.p2align 4
	.globl	init
	.type	init, @function
init:
.LFB40:
	.cfi_startproc
	endbr64
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L57
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leal	-1(%rax), %esi
	leaq	used(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	0(,%rax,4), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	0(,%rax,8), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	g(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	map(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	len(%rip), %rbx
	leaq	4(%rbx), %rdx
	leaq	(%rdx,%rsi,4), %rcx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%rcx, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L54:
	movq	%r12, %rdi
	movq	%r14, %rdx
	xorl	%esi, %esi
	movl	$0, (%rbx)
	movl	$0, (%r15)
	addq	$4, %rbx
	addq	$4, %r15
	addq	$4000, %r12
	call	memset@PLT
	movq	%rbp, %rdi
	movq	%r13, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	addq	$8000, %rbp
	cmpq	8(%rsp), %rbx
	jne	.L54
	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
.L57:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE40:
	.size	init, .-init
	.p2align 4
	.globl	init2
	.type	init2, @function
init2:
.LFB41:
	.cfi_startproc
	endbr64
	movslq	n(%rip), %rdx
	testl	%edx, %edx
	jle	.L60
	salq	$2, %rdx
	xorl	%esi, %esi
	leaq	used(%rip), %rdi
	jmp	memset@PLT
	.p2align 4,,10
	.p2align 3
.L60:
	ret
	.cfi_endproc
.LFE41:
	.size	init2, .-init2
	.p2align 4
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB42:
	.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
	movslq	%edi, %r14
	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
	leaq	used(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	0(%rbp,%r14,4), %ebx
	testl	%ebx, %ebx
	jne	.L62
	movl	$1, 0(%rbp,%r14,4)
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L74
	imulq	$8000, %r14, %rcx
	leaq	map(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%rsi, %r13
	pxor	%xmm1, %xmm1
	leaq	4+d(%rip), %r8
	addq	%rsi, %rcx
.L73:
	movl	0(%rbp,%rbx,4), %r11d
	testl	%r11d, %r11d
	jne	.L65
	ucomisd	(%rcx,%rbx,8), %xmm1
	jp	.L75
	jne	.L75
.L65:
	addq	$1, %rbx
	addq	$8000, %r13
	cmpl	%ebx, %eax
	jg	.L73
.L74:
	movl	cnt(%rip), %eax
	leaq	d(%rip), %rdx
	addl	$1, %eax
	movl	%eax, cnt(%rip)
	movl	%eax, 4(%rdx,%r14,8)
.L62:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L75:
	.cfi_restore_state
	movl	$1, 0(%rbp,%rbx,4)
	movq	%rsi, %rdx
	xorl	%r12d, %r12d
.L72:
	movl	0(%rbp,%r12,4), %r10d
	testl	%r10d, %r10d
	jne	.L67
	ucomisd	0(%r13,%r12,8), %xmm1
	jp	.L76
	jne	.L76
.L67:
	addq	$1, %r12
	addq	$8000, %rdx
	cmpl	%r12d, %eax
	jg	.L72
	movl	cnt(%rip), %edi
	leal	1(%rdi), %edx
	movl	%edx, cnt(%rip)
	movl	%edx, (%r8,%rbx,8)
	jmp	.L65
	.p2align 4,,10
	.p2align 3
.L76:
	movl	$1, 0(%rbp,%r12,4)
	xorl	%r15d, %r15d
.L71:
	movl	0(%rbp,%r15,4), %r9d
	movl	%r15d, %edi
	testl	%r9d, %r9d
	jne	.L69
	ucomisd	(%rdx,%r15,8), %xmm1
	jp	.L77
	jne	.L77
.L69:
	addq	$1, %r15
	cmpl	%r15d, %eax
	jg	.L71
	movl	cnt(%rip), %edi
	addl	$1, %edi
	movl	%edi, cnt(%rip)
	movl	%edi, (%r8,%r12,8)
	jmp	.L67
	.p2align 4,,10
	.p2align 3
.L77:
	movq	%rdx, 8(%rsp)
	movq	%rcx, (%rsp)
	call	dfs.part.0
	movl	n(%rip), %eax
	movq	(%rsp), %rcx
	leaq	4+d(%rip), %r8
	movq	8(%rsp), %rdx
	leaq	map(%rip), %rsi
	jmp	.L69
	.cfi_endproc
.LFE42:
	.size	dfs, .-dfs
	.p2align 4
	.globl	dfs_init
	.type	dfs_init, @function
dfs_init:
.LFB43:
	.cfi_startproc
	endbr64
	movl	$0, cnt(%rip)
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L121
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	map(%rip), %r9
	leaq	4+d(%rip), %r11
	pxor	%xmm1, %xmm1
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	movq	%r9, %r10
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %r8
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	used(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	.p2align 4,,10
	.p2align 3
.L104:
	movl	0(%rbp,%r8,4), %r13d
	testl	%r13d, %r13d
	jne	.L84
	movl	$1, 0(%rbp,%r8,4)
	movq	%r9, %rsi
	xorl	%ebx, %ebx
.L103:
	movl	0(%rbp,%rbx,4), %r12d
	testl	%r12d, %r12d
	jne	.L85
	ucomisd	(%r10,%rbx,8), %xmm1
	jp	.L106
	jne	.L106
.L85:
	addq	$1, %rbx
	addq	$8000, %rsi
	cmpl	%ebx, %eax
	jg	.L103
	movl	cnt(%rip), %edi
	leal	1(%rdi), %edx
	movl	%edx, cnt(%rip)
	movl	%edx, (%r11,%r8,8)
.L84:
	addq	$1, %r8
	addq	$8000, %r10
	cmpl	%r8d, %eax
	jg	.L104
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L106:
	.cfi_restore_state
	movl	$1, 0(%rbp,%rbx,4)
	testl	%eax, %eax
	jle	.L87
	movq	%rbx, (%rsp)
	movq	%r9, %rcx
	xorl	%r12d, %r12d
.L102:
	movl	0(%rbp,%r12,4), %ebx
	testl	%ebx, %ebx
	jne	.L88
	ucomisd	(%rsi,%r12,8), %xmm1
	jp	.L107
	jne	.L107
.L88:
	addq	$1, %r12
	addq	$8000, %rcx
	cmpl	%r12d, %eax
	jg	.L102
	movq	(%rsp), %rbx
.L87:
	movl	cnt(%rip), %edi
	leal	1(%rdi), %edx
	movl	%edx, cnt(%rip)
	movl	%edx, (%r11,%rbx,8)
	jmp	.L85
	.p2align 4,,10
	.p2align 3
.L107:
	movl	$1, 0(%rbp,%r12,4)
	movq	%r9, %r14
	xorl	%ebx, %ebx
	movq	%r10, 8(%rsp)
	movq	%r8, 16(%rsp)
.L101:
	movl	0(%rbp,%rbx,4), %r10d
	testl	%r10d, %r10d
	jne	.L90
	ucomisd	(%rcx,%rbx,8), %xmm1
	jp	.L108
	jne	.L108
.L90:
	addq	$1, %rbx
	addq	$8000, %r14
	cmpl	%ebx, %eax
	jg	.L101
	movl	cnt(%rip), %edi
	movq	8(%rsp), %r10
	movq	16(%rsp), %r8
	leal	1(%rdi), %edx
	movl	%edx, cnt(%rip)
	movl	%edx, (%r11,%r12,8)
	jmp	.L88
	.p2align 4,,10
	.p2align 3
.L108:
	movl	$1, 0(%rbp,%rbx,4)
	movq	%r9, %rdx
	xorl	%r13d, %r13d
.L100:
	movl	0(%rbp,%r13,4), %r8d
	testl	%r8d, %r8d
	jne	.L92
	ucomisd	(%r14,%r13,8), %xmm1
	jp	.L109
	jne	.L109
.L92:
	addq	$1, %r13
	addq	$8000, %rdx
	cmpl	%r13d, %eax
	jg	.L100
	movl	cnt(%rip), %edi
	leal	1(%rdi), %edx
	movl	%edx, cnt(%rip)
	movl	%edx, (%r11,%rbx,8)
	jmp	.L90
	.p2align 4,,10
	.p2align 3
.L109:
	movl	$1, 0(%rbp,%r13,4)
	movq	%r13, %r8
	movq	%r9, %r10
	xorl	%r15d, %r15d
	movq	%rbx, %r13
.L99:
	movl	0(%rbp,%r15,4), %edi
	testl	%edi, %edi
	jne	.L94
	ucomisd	(%rdx,%r15,8), %xmm1
	jp	.L110
	jne	.L110
.L94:
	addq	$1, %r15
	addq	$8000, %r10
	cmpl	%r15d, %eax
	jg	.L99
	movl	cnt(%rip), %edi
	movq	%r13, %rbx
	movq	%r8, %r13
	addl	$1, %edi
	movl	%edi, cnt(%rip)
	movl	%edi, (%r11,%r8,8)
	jmp	.L92
	.p2align 4,,10
	.p2align 3
.L110:
	movl	$1, 0(%rbp,%r15,4)
	xorl	%ebx, %ebx
	movq	%r14, 24(%rsp)
	movq	%rcx, %r14
	movq	%r13, 32(%rsp)
	movq	%rsi, %r13
	movq	%r15, 40(%rsp)
	movq	%r12, %r15
	movq	%r10, %r12
.L98:
	movl	0(%rbp,%rbx,4), %ecx
	movl	%ebx, %edi
	testl	%ecx, %ecx
	jne	.L96
	ucomisd	(%r12,%rbx,8), %xmm1
	jp	.L111
	jne	.L111
.L96:
	addq	$1, %rbx
	cmpl	%ebx, %eax
	jg	.L98
	movl	cnt(%rip), %edi
	movq	%r12, %r10
	movq	%r15, %r12
	movq	%r13, %rsi
	movq	40(%rsp), %r15
	movq	%r14, %rcx
	movq	32(%rsp), %r13
	addl	$1, %edi
	movq	24(%rsp), %r14
	movl	%edi, cnt(%rip)
	movl	%edi, (%r11,%r15,8)
	jmp	.L94
.L111:
	movq	%r8, 56(%rsp)
	movq	%rdx, 48(%rsp)
	call	dfs.part.0
	movl	n(%rip), %eax
	movq	56(%rsp), %r8
	leaq	4+d(%rip), %r11
	movq	48(%rsp), %rdx
	leaq	map(%rip), %r9
	jmp	.L96
.L121:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE43:
	.size	dfs_init, .-dfs_init
	.p2align 4
	.globl	dfs2
	.type	dfs2, @function
dfs2:
.LFB44:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%esi, %rcx
	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
	leaq	used(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movl	0(%rbp,%rcx,4), %r14d
	testl	%r14d, %r14d
	jne	.L124
	movslq	%edi, %rdx
	movslq	cnt(%rip), %rax
	leaq	g(%rip), %r10
	leaq	len(%rip), %r9
	imulq	$1000, %rdx, %r8
	movl	$1, 0(%rbp,%rcx,4)
	leal	1(%rax), %r11d
	movl	%r11d, cnt(%rip)
	addq	%r8, %rax
	movl	%r11d, (%r9,%rdx,4)
	movl	%esi, (%r10,%rax,4)
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L124
	leaq	map(%rip), %r11
	xorl	%ebx, %ebx
	pxor	%xmm1, %xmm1
	leaq	(%r11,%rcx,8), %r12
.L135:
	movl	0(%rbp,%rbx,4), %r13d
	movl	%ebx, %ecx
	testl	%r13d, %r13d
	jne	.L127
	ucomisd	(%r12), %xmm1
	jp	.L136
	jne	.L136
.L127:
	addq	$1, %rbx
	addq	$8000, %r12
	cmpl	%ebx, %eax
	jg	.L135
.L124:
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L136:
	.cfi_restore_state
	movslq	cnt(%rip), %rsi
	movl	$1, 0(%rbp,%rbx,4)
	leaq	(%r11,%rbx,8), %r14
	leal	1(%rsi), %r13d
	addq	%r8, %rsi
	movl	%ecx, (%r10,%rsi,4)
	movl	%r13d, cnt(%rip)
	movl	%r13d, (%r9,%rdx,4)
	xorl	%r13d, %r13d
.L134:
	movl	0(%rbp,%r13,4), %esi
	movl	%r13d, %ecx
	testl	%esi, %esi
	jne	.L129
	ucomisd	(%r14), %xmm1
	jp	.L137
	jne	.L137
.L129:
	addq	$1, %r13
	addq	$8000, %r14
	cmpl	%r13d, %eax
	jg	.L134
	jmp	.L127
	.p2align 4,,10
	.p2align 3
.L137:
	movl	$1, 0(%rbp,%r13,4)
	movslq	cnt(%rip), %rsi
	leal	1(%rsi), %r15d
	addq	%r8, %rsi
	movl	%r15d, cnt(%rip)
	movl	%ecx, (%r10,%rsi,4)
	leaq	(%r11,%r13,8), %rcx
	movl	%r15d, (%r9,%rdx,4)
	xorl	%r15d, %r15d
.L133:
	cmpl	$0, 0(%rbp,%r15,4)
	movl	%r15d, %esi
	jne	.L131
	ucomisd	(%rcx), %xmm1
	jp	.L138
	jne	.L138
.L131:
	addq	$1, %r15
	addq	$8000, %rcx
	cmpl	%r15d, %eax
	jg	.L133
	jmp	.L129
	.p2align 4,,10
	.p2align 3
.L138:
	movq	%rdx, 24(%rsp)
	movq	%r8, 16(%rsp)
	movq	%rcx, 8(%rsp)
	movl	%edi, 4(%rsp)
	call	dfs2.part.0
	movl	n(%rip), %eax
	movq	24(%rsp), %rdx
	leaq	map(%rip), %r11
	movq	16(%rsp), %r8
	movq	8(%rsp), %rcx
	leaq	g(%rip), %r10
	leaq	len(%rip), %r9
	movl	4(%rsp), %edi
	jmp	.L131
	.cfi_endproc
.LFE44:
	.size	dfs2, .-dfs2
	.p2align 4
	.globl	dfs2_init
	.type	dfs2_init, @function
dfs2_init:
.LFB45:
	.cfi_startproc
	endbr64
	movl	n(%rip), %r11d
	testl	%r11d, %r11d
	jle	.L175
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	used(%rip), %r9
	movslq	%r11d, %rdx
	xorl	%esi, %esi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%r9, %rdi
	salq	$2, %rdx
	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	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	%r11d, 8(%rsp)
	call	memset@PLT
	xorl	%edi, %edi
	movl	8(%rsp), %esi
	xorl	%r8d, %r8d
	movl	%edi, 4(%rsp)
	movq	%rax, %r9
	leaq	d(%rip), %r10
	pxor	%xmm1, %xmm1
	jmp	.L161
	.p2align 4,,10
	.p2align 3
.L145:
	addq	$1, %r8
	cmpl	%r8d, %esi
	jle	.L178
.L161:
	movl	$0, cnt(%rip)
	movslq	(%r10,%r8,8), %rax
	movl	(%r9,%rax,4), %edi
	testl	%edi, %edi
	jne	.L145
	movslq	4(%rsp), %r15
	movq	%r8, 8(%rsp)
	xorl	%ebx, %ebx
	leaq	g(%rip), %rdi
	leaq	map(%rip), %r11
	movl	$1, (%r9,%rax,4)
	imulq	$4000, %r15, %rcx
	leaq	(%r11,%rax,8), %rbp
	movq	%r15, %r8
	movl	$1, cnt(%rip)
	movl	%eax, (%rdi,%rcx)
	imulq	$1000, %r15, %rax
	leaq	len(%rip), %rcx
	movl	$1, (%rcx,%r15,4)
	movq	%rax, 16(%rsp)
.L160:
	movl	(%r9,%rbx,4), %ecx
	movl	%ebx, %eax
	testl	%ecx, %ecx
	jne	.L146
	ucomisd	0(%rbp), %xmm1
	jp	.L163
	jne	.L163
.L146:
	addq	$1, %rbx
	addq	$8000, %rbp
	cmpl	%ebx, %esi
	jg	.L160
	movq	8(%rsp), %r8
	addl	$1, 4(%rsp)
	addq	$1, %r8
	cmpl	%r8d, %esi
	jg	.L161
.L178:
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L163:
	.cfi_restore_state
	movslq	cnt(%rip), %rdx
	leaq	g(%rip), %rdi
	leaq	(%r11,%rbx,8), %r13
	xorl	%r12d, %r12d
	movl	$1, (%r9,%rbx,4)
	leal	1(%rdx), %ecx
	addq	16(%rsp), %rdx
	movq	%rbx, 24(%rsp)
	movl	%eax, (%rdi,%rdx,4)
	leaq	len(%rip), %rax
	movl	%ecx, cnt(%rip)
	movl	%ecx, (%rax,%r8,4)
.L159:
	movl	(%r9,%r12,4), %edx
	movl	%r12d, %eax
	testl	%edx, %edx
	jne	.L148
	ucomisd	0(%r13), %xmm1
	jp	.L164
	jne	.L164
.L148:
	addq	$1, %r12
	addq	$8000, %r13
	cmpl	%r12d, %esi
	jg	.L159
	movq	24(%rsp), %rbx
	jmp	.L146
	.p2align 4,,10
	.p2align 3
.L164:
	movslq	cnt(%rip), %rdx
	leaq	g(%rip), %rdi
	movl	$1, (%r9,%r12,4)
	xorl	%ebx, %ebx
	leaq	(%r11,%r12,8), %r14
	leal	1(%rdx), %ecx
	addq	16(%rsp), %rdx
	movl	%eax, (%rdi,%rdx,4)
	leaq	len(%rip), %rax
	movl	%ecx, cnt(%rip)
	movl	%ecx, (%rax,%r8,4)
.L158:
	movl	(%r9,%rbx,4), %r15d
	movl	%ebx, %eax
	testl	%r15d, %r15d
	jne	.L150
	ucomisd	(%r14), %xmm1
	jp	.L165
	jne	.L165
.L150:
	addq	$1, %rbx
	addq	$8000, %r14
	cmpl	%ebx, %esi
	jg	.L158
	jmp	.L148
	.p2align 4,,10
	.p2align 3
.L165:
	movslq	cnt(%rip), %rdx
	leaq	g(%rip), %rdi
	movl	$1, (%r9,%rbx,4)
	xorl	%r15d, %r15d
	leal	1(%rdx), %ecx
	addq	16(%rsp), %rdx
	movl	%eax, (%rdi,%rdx,4)
	leaq	len(%rip), %rax
	movq	%r13, %rdx
	movq	%r12, %r13
	movl	%ecx, (%rax,%r8,4)
	movq	%rbx, %r12
	leaq	(%r11,%rbx,8), %rax
	movl	%ecx, cnt(%rip)
	movq	%rbp, %rcx
.L157:
	movl	(%r9,%r15,4), %ebx
	movl	%r15d, %edi
	testl	%ebx, %ebx
	jne	.L152
	ucomisd	(%rax), %xmm1
	jp	.L166
	jne	.L166
.L152:
	addq	$1, %r15
	addq	$8000, %rax
	cmpl	%r15d, %esi
	jg	.L157
	movq	%r12, %rbx
	movq	%rcx, %rbp
	movq	%r13, %r12
	movq	%rdx, %r13
	jmp	.L150
	.p2align 4,,10
	.p2align 3
.L166:
	movslq	cnt(%rip), %rbx
	movl	$1, (%r9,%r15,4)
	movq	%r8, 40(%rsp)
	leal	1(%rbx), %ebp
	addq	16(%rsp), %rbx
	movl	%ebp, 32(%rsp)
	movl	%ebp, cnt(%rip)
	leaq	g(%rip), %rbp
	movl	%edi, 0(%rbp,%rbx,4)
	movl	32(%rsp), %ebx
	leaq	len(%rip), %rdi
	leaq	(%r11,%r15,8), %rbp
	movq	%r13, 32(%rsp)
	movq	%r12, %r13
	movq	%rax, %r12
	movl	%ebx, (%rdi,%r8,4)
	xorl	%ebx, %ebx
.L156:
	movl	(%r9,%rbx,4), %eax
	movl	%ebx, %r8d
	testl	%eax, %eax
	jne	.L154
	ucomisd	0(%rbp), %xmm1
	jp	.L167
	jne	.L167
.L154:
	addq	$1, %rbx
	addq	$8000, %rbp
	cmpl	%ebx, %esi
	jg	.L156
	movq	%r12, %rax
	movq	40(%rsp), %r8
	movq	%r13, %r12
	movq	32(%rsp), %r13
	jmp	.L152
	.p2align 4,,10
	.p2align 3
.L167:
	movl	4(%rsp), %edi
	movl	%r8d, %esi
	movq	%rcx, 56(%rsp)
	movq	%rdx, 48(%rsp)
	call	dfs2.part.0
	movl	n(%rip), %esi
	movq	56(%rsp), %rcx
	leaq	used(%rip), %r9
	movq	48(%rsp), %rdx
	leaq	map(%rip), %r11
	leaq	d(%rip), %r10
	jmp	.L154
.L175:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE45:
	.size	dfs2_init, .-dfs2_init
	.p2align 4
	.globl	wake
	.type	wake, @function
wake:
.LFB46:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%edi, %r8d
	movl	$500, %ecx
	leaq	len(%rip), %rdx
	subq	$4016, %rsp
	.cfi_def_cfa_offset 4032
	movq	%fs:40, %rax
	movq	%rax, 4008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	movq	%rsi, %rdi
	rep stosq
	movslq	%r8d, %rax
	movl	(%rdx,%rax,4), %edx
	testl	%edx, %edx
	jle	.L180
	imulq	$4000, %rax, %r9
	leaq	g(%rip), %rcx
	subl	$1, %edx
	imulq	$1000, %rax, %rax
	addq	%rcx, %r9
	addq	%rdx, %rax
	leaq	4(%rcx), %rdx
	leaq	(%rdx,%rax,4), %r11
	movq	%r9, %rax
	.p2align 4,,10
	.p2align 3
.L181:
	movslq	(%rax), %rdx
	addq	$4, %rax
	movl	$1, (%rsp,%rdx,4)
	cmpq	%r11, %rax
	jne	.L181
	movslq	n(%rip), %rdi
	leaq	map(%rip), %r10
	pxor	%xmm0, %xmm0
	movq	%rdi, %rbx
.L182:
	xorl	%eax, %eax
	testl	%ebx, %ebx
	jle	.L188
	.p2align 4,,10
	.p2align 3
.L186:
	movl	(%rsi,%rax,4), %r8d
	testl	%r8d, %r8d
	jne	.L183
	movslq	%eax, %rdx
	movslq	(%r9), %rcx
	imulq	$1000, %rdx, %rdx
	addq	%rcx, %rdx
	ucomisd	(%r10,%rdx,8), %xmm0
	jp	.L179
	jne	.L179
.L183:
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L186
.L188:
	addq	$4, %r9
	cmpq	%r11, %r9
	jne	.L182
.L180:
	movl	$1, %r8d
	.p2align 4,,10
	.p2align 3
.L179:
	movq	4008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L194
	addq	$4016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	movl	%r8d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L194:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE46:
	.size	wake, .-wake
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%d"
.LC4:
	.string	"%lf%d"
.LC7:
	.string	"%.9f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB47:
	.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
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4072, %rsp
	.cfi_def_cfa_offset 8224
	leaq	.LC3(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 8152(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L256:
	leaq	n(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %edx
	testl	%edx, %edx
	je	.L196
	jle	.L197
	leaq	len(%rip), %rcx
	leal	-1(%rdx), %esi
	leaq	4(%rcx), %rax
	leaq	used(%rip), %r15
	leaq	(%rax,%rsi,4), %rax
	leaq	map(%rip), %r14
	movq	%r15, 32(%rsp)
	movq	%r15, %r13
	movq	%rax, 16(%rsp)
	movq	%r14, %rbx
	movq	%rcx, %r15
	leaq	0(,%rdx,4), %rax
	movq	%rax, 8(%rsp)
	leaq	0(,%rdx,8), %rax
	leaq	g(%rip), %r12
	movq	%r14, 24(%rsp)
	movq	%rax, %r14
	.p2align 4,,10
	.p2align 3
.L198:
	movl	$0, (%r15)
	movq	%r12, %rdi
	xorl	%esi, %esi
	addq	$4, %r15
	movq	8(%rsp), %rdx
	movl	$0, 0(%r13)
	addq	$4000, %r12
	addq	$4, %r13
	call	memset@PLT
	movq	%rbx, %rdi
	movq	%r14, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	addq	$8000, %rbx
	cmpq	16(%rsp), %r15
	jne	.L198
	xorl	%eax, %eax
	movl	$1000, %ecx
	movq	32(%rsp), %r15
	xorl	%r13d, %r13d
	leaq	144(%rsp), %rdi
	movq	24(%rsp), %r14
	movsd	.LC2(%rip), %xmm7
	leaq	132(%rsp), %r12
	movq	%rdi, 32(%rsp)
	rep stosq
	leaq	128(%rsp), %rax
	movq	%r15, 40(%rsp)
	movq	%rax, 16(%rsp)
	leaq	136(%rsp), %rax
	movq	%rax, 24(%rsp)
	movsd	%xmm7, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L201:
	movq	16(%rsp), %rdx
	movq	24(%rsp), %rsi
	xorl	%eax, %eax
	movslq	%r13d, %rbx
	leaq	.LC4(%rip), %rdi
	xorl	%r15d, %r15d
	call	__isoc99_scanf@PLT
	movq	32(%rsp), %rax
	movsd	136(%rsp), %xmm0
	movsd	%xmm0, (%rax,%r13,8)
	movl	128(%rsp), %eax
	testl	%eax, %eax
	jle	.L203
	imulq	$1000, %rbx, %rbx
	.p2align 4,,10
	.p2align 3
.L200:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	132(%rsp), %eax
	movsd	8(%rsp), %xmm4
	subl	$1, %eax
	cltq
	addq	%rbx, %rax
	movsd	%xmm4, (%r14,%rax,8)
	cmpl	%r15d, 128(%rsp)
	jg	.L200
.L203:
	movl	n(%rip), %edx
	addq	$1, %r13
	cmpl	%r13d, %edx
	jg	.L201
	movq	40(%rsp), %r15
	testl	%edx, %edx
	jle	.L204
	leal	-1(%rdx), %eax
	cmpl	$2, %eax
	jbe	.L260
	movl	%edx, %ecx
	leaq	d(%rip), %rax
	movdqa	.LC1(%rip), %xmm1
	movdqa	.LC6(%rip), %xmm2
	shrl	$2, %ecx
	movq	%rax, 16(%rsp)
	leaq	32(%rax), %rsi
	subl	$1, %ecx
	salq	$5, %rcx
	addq	%rsi, %rcx
	.p2align 4,,10
	.p2align 3
.L206:
	movdqa	%xmm1, %xmm0
	addq	$32, %rax
	paddd	.LC5(%rip), %xmm1
	movdqa	%xmm0, %xmm3
	punpckhdq	%xmm2, %xmm0
	punpckldq	%xmm2, %xmm3
	movaps	%xmm0, -16(%rax)
	movaps	%xmm3, -32(%rax)
	cmpq	%rcx, %rax
	jne	.L206
	movl	%edx, %eax
	andl	$-4, %eax
	testb	$3, %dl
	je	.L207
.L205:
	movq	16(%rsp), %rdi
	movslq	%eax, %rcx
	movl	%eax, (%rdi,%rcx,8)
	movl	$1, 4(%rdi,%rcx,8)
	leal	1(%rax), %ecx
	cmpl	%ecx, %edx
	jle	.L207
	movslq	%ecx, %rsi
	addl	$2, %eax
	movl	%ecx, (%rdi,%rsi,8)
	movl	$1, 4(%rdi,%rsi,8)
	cmpl	%eax, %edx
	jle	.L207
	movslq	%eax, %rcx
	movl	%eax, (%rdi,%rcx,8)
	movl	$1, 4(%rdi,%rcx,8)
.L207:
	movl	$0, cnt(%rip)
	leaq	map(%rip), %r8
	xorl	%r11d, %r11d
	leaq	4+d(%rip), %r9
	movq	%r8, %r10
	movq	%r14, %r8
	.p2align 4,,10
	.p2align 3
.L228:
	movl	(%r15,%r11,4), %eax
	testl	%eax, %eax
	jne	.L208
	movl	$1, (%r15,%r11,4)
	movq	%r8, %rsi
	xorl	%ebx, %ebx
	movq	%r11, 24(%rsp)
.L227:
	movl	(%r15,%rbx,4), %eax
	testl	%eax, %eax
	jne	.L209
	pxor	%xmm5, %xmm5
	ucomisd	(%r10,%rbx,8), %xmm5
	jp	.L262
	jne	.L262
.L209:
	addq	$1, %rbx
	addq	$8000, %rsi
	cmpl	%ebx, %edx
	jg	.L227
	movl	cnt(%rip), %eax
	movq	24(%rsp), %r11
	addl	$1, %eax
	movl	%eax, cnt(%rip)
	movl	%eax, (%r9,%r11,8)
.L208:
	addq	$1, %r11
	addq	$8000, %r10
	cmpl	%r11d, %edx
	jg	.L228
.L257:
	movq	16(%rsp), %rdi
	movslq	%edx, %rsi
	leaq	comp(%rip), %rcx
	movl	$8, %edx
	call	qsort@PLT
	movl	n(%rip), %r11d
	testl	%r11d, %r11d
	jle	.L251
	movslq	%r11d, %rdx
	leaq	used(%rip), %r15
	xorl	%esi, %esi
	movl	%r11d, 32(%rsp)
	salq	$2, %rdx
	movq	%r15, %rdi
	call	memset@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	pxor	%xmm1, %xmm1
	movl	%r9d, 24(%rsp)
	movq	%r8, %r10
	movl	32(%rsp), %r9d
	jmp	.L250
	.p2align 4,,10
	.p2align 3
.L231:
	addq	$1, %r10
	cmpl	%r10d, %r9d
	jle	.L306
.L250:
	movl	$0, cnt(%rip)
	movq	16(%rsp), %rax
	movslq	(%rax,%r10,8), %rax
	movl	(%r15,%rax,4), %r13d
	testl	%r13d, %r13d
	jne	.L231
	movslq	24(%rsp), %r8
	movq	%r10, 32(%rsp)
	xorl	%ebx, %ebx
	leaq	g(%rip), %rdi
	movl	$1, (%r15,%rax,4)
	imulq	$4000, %r8, %rcx
	movl	$1, cnt(%rip)
	movl	%eax, (%rdi,%rcx)
	leaq	len(%rip), %rcx
	movl	$1, (%rcx,%r8,4)
	leaq	map(%rip), %rcx
	leaq	(%rcx,%rax,8), %r11
	movq	%rcx, 48(%rsp)
	imulq	$1000, %r8, %rax
	movq	%rax, 40(%rsp)
.L249:
	movl	(%r15,%rbx,4), %r12d
	movl	%ebx, %eax
	testl	%r12d, %r12d
	jne	.L232
	ucomisd	(%r11), %xmm1
	jp	.L268
	jne	.L268
.L232:
	addq	$1, %rbx
	addq	$8000, %r11
	cmpl	%ebx, %r9d
	jg	.L249
	movq	32(%rsp), %r10
	addl	$1, 24(%rsp)
	addq	$1, %r10
	cmpl	%r10d, %r9d
	jg	.L250
.L306:
	testl	%r9d, %r9d
	jle	.L251
	movsd	8(%rsp), %xmm2
	movslq	%r9d, %r12
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	leaq	len(%rip), %rbx
	movsd	%xmm2, 16(%rsp)
	jmp	.L255
	.p2align 4,,10
	.p2align 3
.L252:
	addq	$1, %r15
	addq	$1000, %r13
	cmpq	%r15, %r12
	je	.L230
.L255:
	movl	(%rbx,%r15,4), %r14d
	movl	%r15d, %edi
	testl	%r14d, %r14d
	je	.L252
	call	wake
	testl	%eax, %eax
	je	.L252
	testl	%r14d, %r14d
	jle	.L261
	leal	-1(%r14), %edx
	leaq	g(%rip), %rax
	movsd	8(%rsp), %xmm0
	addq	%r13, %rdx
	leaq	4+g(%rip), %rcx
	leaq	(%rax,%r13,4), %rax
	leaq	(%rcx,%rdx,4), %rcx
	.p2align 4,,10
	.p2align 3
.L254:
	movslq	(%rax), %rdx
	addq	$4, %rax
	mulsd	144(%rsp,%rdx,8), %xmm0
	cmpq	%rcx, %rax
	jne	.L254
	movsd	8(%rsp), %xmm1
	subsd	%xmm0, %xmm1
.L253:
	mulsd	16(%rsp), %xmm1
	addq	$1, %r15
	addq	$1000, %r13
	movsd	%xmm1, 16(%rsp)
	cmpq	%r15, %r12
	jne	.L255
	.p2align 4,,10
	.p2align 3
.L230:
	movsd	16(%rsp), %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC7(%rip), %rsi
	call	__printf_chk@PLT
	jmp	.L256
	.p2align 4,,10
	.p2align 3
.L262:
	movl	$1, (%r15,%rbx,4)
	testl	%edx, %edx
	jle	.L211
	movq	%r10, 32(%rsp)
	movq	%r8, %r11
	xorl	%r12d, %r12d
	movq	%rbx, %r10
.L226:
	movl	(%r15,%r12,4), %r14d
	testl	%r14d, %r14d
	jne	.L212
	pxor	%xmm6, %xmm6
	ucomisd	(%rsi,%r12,8), %xmm6
	jp	.L263
	jne	.L263
.L212:
	addq	$1, %r12
	addq	$8000, %r11
	cmpl	%r12d, %edx
	jg	.L226
	movq	%r10, %rbx
	movq	32(%rsp), %r10
.L211:
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
	movl	%eax, (%r9,%rbx,8)
	jmp	.L209
	.p2align 4,,10
	.p2align 3
.L263:
	movl	$1, (%r15,%r12,4)
	movq	%r8, %r14
	xorl	%ebx, %ebx
	movq	%r10, 40(%rsp)
	movq	%rsi, 48(%rsp)
.L225:
	movl	(%r15,%rbx,4), %r13d
	testl	%r13d, %r13d
	jne	.L214
	pxor	%xmm7, %xmm7
	ucomisd	(%r11,%rbx,8), %xmm7
	jp	.L264
	jne	.L264
.L214:
	addq	$1, %rbx
	addq	$8000, %r14
	cmpl	%ebx, %edx
	jg	.L225
	movl	cnt(%rip), %eax
	movq	40(%rsp), %r10
	movq	48(%rsp), %rsi
	addl	$1, %eax
	movl	%eax, cnt(%rip)
	movl	%eax, (%r9,%r12,8)
	jmp	.L212
	.p2align 4,,10
	.p2align 3
.L268:
	movslq	cnt(%rip), %rdx
	leaq	g(%rip), %rdi
	movq	%r11, 56(%rsp)
	xorl	%r12d, %r12d
	movl	$1, (%r15,%rbx,4)
	movq	%rbx, %r11
	leal	1(%rdx), %ecx
	addq	40(%rsp), %rdx
	movl	%eax, (%rdi,%rdx,4)
	leaq	len(%rip), %rax
	movl	%ecx, (%rax,%r8,4)
	movq	48(%rsp), %rax
	movl	%ecx, cnt(%rip)
	leaq	(%rax,%rbx,8), %r10
.L248:
	movl	(%r15,%r12,4), %ebx
	movl	%r12d, %eax
	testl	%ebx, %ebx
	jne	.L234
	ucomisd	(%r10), %xmm1
	jp	.L269
	jne	.L269
.L234:
	addq	$1, %r12
	addq	$8000, %r10
	cmpl	%r12d, %r9d
	jg	.L248
	movq	%r11, %rbx
	movq	56(%rsp), %r11
	jmp	.L232
	.p2align 4,,10
	.p2align 3
.L264:
	movl	$1, (%r15,%rbx,4)
	movq	%r8, %rcx
	xorl	%r13d, %r13d
.L224:
	movl	(%r15,%r13,4), %r10d
	testl	%r10d, %r10d
	jne	.L216
	pxor	%xmm7, %xmm7
	ucomisd	(%r14,%r13,8), %xmm7
	jp	.L265
	jne	.L265
.L216:
	addq	$1, %r13
	addq	$8000, %rcx
	cmpl	%r13d, %edx
	jg	.L224
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
	movl	%eax, (%r9,%rbx,8)
	jmp	.L214
	.p2align 4,,10
	.p2align 3
.L269:
	movslq	cnt(%rip), %rdx
	leaq	g(%rip), %rdi
	movl	%r9d, %esi
	xorl	%ebx, %ebx
	movl	$1, (%r15,%r12,4)
	movq	%r12, %r9
	leal	1(%rdx), %ecx
	addq	40(%rsp), %rdx
	movl	%eax, (%rdi,%rdx,4)
	leaq	len(%rip), %rax
	movl	%ecx, (%rax,%r8,4)
	movq	48(%rsp), %rax
	movl	%ecx, cnt(%rip)
	leaq	(%rax,%r12,8), %r13
	movq	%r10, %r12
.L247:
	movl	(%r15,%rbx,4), %edi
	movl	%ebx, %eax
	testl	%edi, %edi
	jne	.L236
	ucomisd	0(%r13), %xmm1
	jp	.L270
	jne	.L270
.L236:
	addq	$1, %rbx
	addq	$8000, %r13
	cmpl	%ebx, %esi
	jg	.L247
	movq	%r12, %r10
	movq	%r9, %r12
	movl	%esi, %r9d
	jmp	.L234
.L265:
	movl	$1, (%r15,%r13,4)
	movq	%r12, %rsi
	movq	%r8, %r10
	xorl	%eax, %eax
	movq	%rbx, %r12
.L223:
	movl	(%r15,%rax,4), %edi
	testl	%edi, %edi
	jne	.L218
	pxor	%xmm2, %xmm2
	ucomisd	(%rcx,%rax,8), %xmm2
	jp	.L266
	jne	.L266
.L218:
	addq	$1, %rax
	addq	$8000, %r10
	cmpl	%eax, %edx
	jg	.L223
	movl	cnt(%rip), %eax
	movq	%r12, %rbx
	movq	%rsi, %r12
	addl	$1, %eax
	movl	%eax, cnt(%rip)
	movl	%eax, (%r9,%r13,8)
	jmp	.L216
.L270:
	movslq	cnt(%rip), %rdx
	leaq	g(%rip), %rdi
	movq	%r9, 64(%rsp)
	xorl	%r14d, %r14d
	movl	$1, (%r15,%rbx,4)
	leal	1(%rdx), %ecx
	addq	40(%rsp), %rdx
	movl	%eax, (%rdi,%rdx,4)
	leaq	len(%rip), %rax
	movl	%ecx, (%rax,%r8,4)
	movq	48(%rsp), %rax
	movl	%ecx, cnt(%rip)
	leaq	(%rax,%rbx,8), %rax
.L246:
	movl	(%r15,%r14,4), %ecx
	movl	%r14d, %edx
	testl	%ecx, %ecx
	jne	.L238
	ucomisd	(%rax), %xmm1
	jp	.L271
	jne	.L271
.L238:
	addq	$1, %r14
	addq	$8000, %rax
	cmpl	%r14d, %esi
	jg	.L246
	movq	64(%rsp), %r9
	jmp	.L236
.L266:
	movl	$1, (%r15,%rax,4)
	xorl	%ebx, %ebx
	movq	%r12, 56(%rsp)
	movq	%r10, %r12
	movq	%r14, 64(%rsp)
	movq	%r13, %r14
	movq	%rax, %r13
.L222:
	movl	(%r15,%rbx,4), %eax
	movl	%ebx, %edi
	testl	%eax, %eax
	jne	.L220
	pxor	%xmm6, %xmm6
	ucomisd	(%r12,%rbx,8), %xmm6
	jp	.L267
	jne	.L267
.L220:
	addq	$1, %rbx
	cmpl	%ebx, %edx
	jg	.L222
	movl	cnt(%rip), %edi
	movq	%r13, %rax
	movq	%r12, %r10
	movq	%r14, %r13
	movq	56(%rsp), %r12
	movq	64(%rsp), %r14
	addl	$1, %edi
	movl	%edi, cnt(%rip)
	movl	%edi, (%r9,%rax,8)
	jmp	.L218
.L271:
	movslq	cnt(%rip), %rcx
	leaq	g(%rip), %r9
	movl	$1, (%r15,%r14,4)
	movq	%r14, %r10
	leal	1(%rcx), %edi
	addq	40(%rsp), %rcx
	movl	%edx, (%r9,%rcx,4)
	leaq	len(%rip), %rcx
	xorl	%edx, %edx
	movq	%rbx, %r9
	movl	%edi, (%rcx,%r8,4)
	movq	48(%rsp), %rcx
	movl	%edi, cnt(%rip)
	leaq	(%rcx,%r14,8), %rcx
	movq	%r13, %r14
	movq	%r12, %r13
.L245:
	movl	(%r15,%rdx,4), %ebx
	movl	%edx, %edi
	testl	%ebx, %ebx
	jne	.L240
	ucomisd	(%rcx), %xmm1
	jp	.L272
	jne	.L272
.L240:
	addq	$1, %rdx
	addq	$8000, %rcx
	cmpl	%edx, %esi
	jg	.L245
	movq	%r13, %r12
	movq	%r9, %rbx
	movq	%r14, %r13
	movq	%r10, %r14
	jmp	.L238
.L261:
	pxor	%xmm1, %xmm1
	jmp	.L253
.L267:
	movq	%r8, 96(%rsp)
	movq	%r11, 88(%rsp)
	movq	%rsi, 80(%rsp)
	movq	%rcx, 72(%rsp)
	call	dfs.part.0
	movl	n(%rip), %edx
	movq	96(%rsp), %r8
	leaq	4+d(%rip), %r9
	movq	88(%rsp), %r11
	movq	80(%rsp), %rsi
	movq	72(%rsp), %rcx
	jmp	.L220
.L196:
	movq	8152(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L307
	addq	$8168, %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
.L197:
	.cfi_restore_state
	leaq	144(%rsp), %rdi
	movl	$1000, %ecx
	xorl	%eax, %eax
	movsd	.LC2(%rip), %xmm2
	rep stosq
	movsd	%xmm2, 8(%rsp)
.L204:
	leaq	d(%rip), %rax
	movl	$0, cnt(%rip)
	movq	%rax, 16(%rsp)
	jmp	.L257
.L251:
	movsd	8(%rsp), %xmm2
	movsd	%xmm2, 16(%rsp)
	jmp	.L230
.L272:
	movslq	cnt(%rip), %rbx
	movl	$1, (%r15,%rdx,4)
	leal	1(%rbx), %r12d
	addq	40(%rsp), %rbx
	movl	%r12d, 72(%rsp)
	movl	%r12d, cnt(%rip)
	leaq	g(%rip), %r12
	movl	%edi, (%r12,%rbx,4)
	movl	72(%rsp), %ebx
	leaq	len(%rip), %rdi
	movq	%r8, 72(%rsp)
	movl	%ebx, (%rdi,%r8,4)
	movq	48(%rsp), %rdi
	xorl	%ebx, %ebx
	leaq	(%rdi,%rdx,8), %r12
.L244:
	movl	(%r15,%rbx,4), %edi
	movl	%ebx, %r8d
	testl	%edi, %edi
	jne	.L242
	ucomisd	(%r12), %xmm1
	jp	.L273
	jne	.L273
.L242:
	addq	$1, %rbx
	addq	$8000, %r12
	cmpl	%ebx, %esi
	jg	.L244
	movq	72(%rsp), %r8
	jmp	.L240
.L260:
	leaq	d(%rip), %rcx
	xorl	%eax, %eax
	movq	%rcx, 16(%rsp)
	jmp	.L205
.L273:
	movl	24(%rsp), %edi
	movl	%r8d, %esi
	movq	%r11, 120(%rsp)
	movq	%rdx, 112(%rsp)
	movq	%rcx, 104(%rsp)
	movq	%r10, 96(%rsp)
	movq	%rax, 88(%rsp)
	movq	%r9, 80(%rsp)
	call	dfs2.part.0
	movl	n(%rip), %esi
	movq	120(%rsp), %r11
	movq	112(%rsp), %rdx
	movq	104(%rsp), %rcx
	movq	96(%rsp), %r10
	movq	88(%rsp), %rax
	movq	80(%rsp), %r9
	jmp	.L242
.L307:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE47:
	.size	main, .-main
	.globl	cnt
	.bss
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	len
	.align 32
	.type	len, @object
	.size	len, 4000
len:
	.zero	4000
	.globl	g
	.align 32
	.type	g, @object
	.size	g, 4000000
g:
	.zero	4000000
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 8000000
map:
	.zero	8000000
	.globl	used
	.align 32
	.type	used, @object
	.size	used, 4000
used:
	.zero	4000
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 8000
d:
	.zero	8000
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	0
	.long	1
	.long	2
	.long	3
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.section	.rodata.cst16
	.align 16
.LC5:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC6:
	.long	1
	.long	1
	.long	1
	.long	1
	.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<stdlib.h>
#define N 1000
#define rep(i,n) for(int i=0;i<n;i++)
typedef struct{
    int num;
    int post;
}Data;
int comp(const void *a,const void *b){
    Data c = *(Data *)a;
    Data d = *(Data *)b;
    return d.post-c.post;
}
Data d[N];
int used[N]={0};
double map[N][N]={0};
int g[N][N]={0};
int len[N];
int n,m,cnt;
void init(){
    rep(i,n){
        used[i]=len[i]=0;
        rep(j,n){
            map[i][j]=g[i][j]=0;
        }
    }
}

void init2(){
    rep(i,n){
        used[i]=0;
    }
}

void dfs(int pos){//ラベル
    if(used[pos]) return;
    used[pos]=1;
    rep(i,n){
        if(used[i]) continue;
        if(map[pos][i]){
            dfs(i);
        }
    }
    d[pos].post=++cnt;
}
void dfs_init(){
    cnt=0;
    rep(i,n){
        dfs(i);
    }
}

void dfs2(int j,int pos){//強連結分解
    if(used[pos]) return;
    used[pos]=1; g[j][cnt++]=pos;
    len[j]=cnt;
    rep(i,n){
        if(used[i]) continue;
        if(map[i][pos]){
            dfs2(j,i);
        }
    }
}
void dfs2_init(){
    init2();
    int idx=0;
    rep(i,n){
        cnt=0;
        if(used[d[i].num]);
        else{
            dfs2(idx,d[i].num);
            idx++;
        }
    }
}
int wake(int i){
    int used2[N]={0};
    rep(j,len[i]) used2[g[i][j]]=1;
    rep(j,len[i]){
        rep(k,n){
            if(used2[k]) continue;
            if(map[k][g[i][j]]) return 0;
        }
    }
    return 1;
}
int main(void){
    while(1){
        scanf("%d",&n);
        if(n==0) break;
        init();
        double p[N]={0};
        rep(i,n){
            double p_;
            int x,y;
            scanf("%lf%d",&p_,&x);
            p[i]=p_;
            rep(j,x){
                scanf("%d",&y);
                map[i][y-1]=1;
            }
        }
        rep(i,n){
            d[i].num=i;
            d[i].post=1;
        }
        dfs_init();
        //printf("%d\n",cnt); rep(i,n) printf("%d ",d[i].post); puts("\n");
        qsort(d,n,sizeof(Data),comp);
        dfs2_init();
        /*rep(i,n){
            if(len[i]==0) continue;
            rep(j,len[i]){
                printf("%d ",g[i][j]);
            }puts("");
        }puts("");*/
        /*rep(i,n){
            rep(j,n){
                printf("%6f ",map[i][j]);
            }puts("");
        }puts("");*/
        double sum=1;
        rep(i,n){
            if(len[i]==0) continue;
            double tmp=1;
            if(wake(i)){
                rep(j,len[i])
                tmp*=p[g[i][j]];
                sum*=(1-tmp);
            }
        }
        printf("%.9f\n",sum);
    }
    
}


2
0.60 1 2
0.60 0
2
0.60 1 2
0.60 1 1
5
0.10 1 2
0.20 1 3
0.30 1 4
0.40 1 5
0.50 1 1
5
0.10 0
0.20 1 1
0.8904968944594156 1 1
0.40 1 1
0.50 1 1
5
0.10 4 2 3 4 5
0.20 0
0.30 0
0.40 0
0.50 0
4
0.10 1 2
0.20 0
0.30 1 4
0.40 1 3
5
0.10 0
0.20 0
0.30 0
0.40 0
0.50 0
0
 2
0.60 1 2
0.60 0
2
0.60 1 2
0.60 1 1
5
0.10 1 2
0.20 1 3
0.30 1 4
0.40 1 5
0.50 1 1
5
0.10 0
0.20 1 1
0.8904968944594156 1 1
0.40 1 1
0.50 1 1
5
0.10 4 2 3 4 5
0.20 0
0.30 0
0.40 0
0.50 0
4
0.10 1 2
0.20 0
0.30 1 4
0.40 1 3
5
0.10 0
0.20 0
0.30 0
0.40 0
0.6358811514072436 0
0
 2
0.60 1 2
0.60 0
2
0.60 1 2
0.60 1 1
5
0.10 1 2
0.20 1 3
0.30 1 4
0.40 1 5
0.50 1 1
5
0.10 0
0.20 1 1
0.8904968944594156 1 1
0.40 1 1
0.50 1 1
5
0.10 4 2 3 4 5
0.20 0
0.30 0
0.40 0
0.50 0
4
0.10 1 2
0.20 0
0.30 1 4
0.40 1 3
5
0.10 0
0.20 0
1.278396585912571 0
0.40 0
0.6358811514072436 0
0
 2
0.60 1 2
0.60 0
2
0.60 1 2
0.60 1 1
5
0.10 1 2
0.20 1 3
0.30 1 4
0.40 1 5
0.50 1 1
5
0.10 0
0.20 1 1
0.8904968944594156 1 1
0.40 1 1
0.50 1 1
5
0.10 4 2 3 4 5
0.20 0
0.30 0
0.40 0
0.50 0
4
0.10 1 2
0.20 0
0.30 1 4
0.40 1 3
5
0.10 0
0.20 0
1.5479161594780728 0
0.40 0
0.6358811514072436 0
0
 2
0.60 1 2
0.60 0
2
0.60 1 2
0.60 1 1
5
0.10 1 2
0.20 1 3
0.30 1 4
0.40 1 5
0.50 1 1
5
0.10 0
0.20 1 1
0.8904968944594156 1 1
0.40 1 1
0.50 1 1
5
0.5337845409531047 4 2 3 4 5
0.20 0
0.30 0
0.40 0
0.50 0
4
0.10 1 2
0.20 0
0.30 1 4
0.40 1 3
5
0.10 0
0.20 0
1.5479161594780728 0
0.40 0
0.6358811514072436 0
0
 2
0.60 1 2
0.60 0
2
0.60 1 2
0.60 1 1
5
0.10 1 2
0.20 1 3
0.30 1 4
0.40 1 5
0.50 1 1
5
0.10 0
0.20 1 1
0.30 1 1
0.40 1 1
0.50 1 1
5
0.10 4 2 3 4 5
0.20 0
0.30 0
0.40 0
0.50 0
4
0.10 1 2
0.20 0
0.30 1 4
0.40 1 3
5
0.10 0
0.20 0
0.30 0
0.4925885981639069 0
0.50 0
0
 2
0.60 1 2
0.60 0
2
0.60 1 2
0.60 1 1
5
0.10 1 2
0.20 1 3
0.30 1 4
0.40 1 5
0.50 1 1
5
0.10 0
0.20 1 1
0.8904968944594156 1 1
0.40 1 1
0.50 1 1
5
0.9592397375909304 4 2 3 4 5
0.20 0
0.30 0
0.40 0
0.50 0
4
0.10 1 2
0.20 0
0.30 1 4
0.40 1 3
5
0.10 0
0.20 0
0.30 0
0.40 0
0.50 0
0
 2
0.60 1 2
0.60 0
0
0.60 1 2
0.60 1 1
5
0.10 1 2
0.20 1 3
0.30 1 4
0.40 1 5
0.50 1 1
5
0.10 0
0.20 1 1
0.8904968944594156 1 1
0.40 1 1
0.50 1 1
5
0.10 4 2 3 4 5
0.20 0
0.30 0
0.40 0
0.50 0
4
0.10 1 2
0.20 0
0.30 1 4
0.40 1 3
5
0.10 0
0.20 0
0.30 0
0.40 0
0.6358811514072436 0
0
 2
0.60 1 2
0.60 0
2
0.60 1 2
0.60 1 2
5
0.10 1 2
0.20 1 3
0.30 1 4
0.40 1 5
0.50 1 1
5
0.10 0
0.20 1 1
0.8904968944594156 1 1
0.40 1 1
0.50 1 1
5
0.10 4 2 3 4 5
0.20 0
0.30 0
0.40 0
0.50 0
4
0.10 1 2
0.20 0
0.30 1 4
0.40 1 3
5
0.10 0
0.20 0
1.5479161594780728 0
0.40 0
0.6358811514072436 0
0
 2
0.60 1 2
0.60 0
2
0.60 1 2
0.60 1 1
5
0.10 1 2
0.20 1 3
0.30 1 4
1.2307241008495593 1 5
0.50 1 1
5
0.10 0
0.20 1 1
0.8904968944594156 1 1
0.40 1 1
0.50 1 1
5
0.5337845409531047 4 2 3 4 5
0.20 0
0.30 0
0.40 0
0.50 0
4
0.10 1 2
0.20 0
0.30 1 4
0.40 1 3
5
0.10 0
0.20 0
1.5479161594780728 0
0.40 0
0.6358811514072436 0
0

0.400000000
0.640000000
0.998800000
0.026280745
0.900000000
0.792000000
0.151200000
 0.400000000
0.640000000
0.998800000
0.026280745
0.900000000
0.792000000
0.110109540
 0.400000000
0.640000000
0.998800000
0.026280745
0.900000000
0.792000000
-0.043791600
 0.400000000
0.640000000
0.998800000
0.026280745
0.900000000
0.792000000
-0.086186852
 0.400000000
0.640000000
0.998800000
0.026280745
0.466215459
0.792000000
-0.086186852
 0.400000000
0.640000000
0.998800000
0.168000000
0.900000000
0.792000000
0.127867673
 0.400000000
0.640000000
0.998800000
0.026280745
0.040760262
0.792000000
0.151200000
 0.400000000
 0.400000000
0.400000000
0.998800000
0.026280745
0.900000000
0.792000000
-0.086186852
 0.400000000
0.640000000
0.996307828
0.026280745
0.466215459
0.792000000
-0.086186852

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<stdlib.h>
#define N 1000
#define rep(i,n) for(int i=0;i<n;i++)
typedef struct{
    int num;
    int post;
}Data;
int comp(const void *a,const void *b){
    Data c = *(Data *)a;
    Data d = *(Data *)b;
    return d.post-c.post;
}
Data d[N];
int used[N]={0};
double map[N][N]={0};
int g[N][N]={0};
int len[N];
int n,m,cnt;
void init(){
    rep(i,n){
        used[i]=len[i]=0;
        rep(j,n){
            map[i][j]=g[i][j]=0;
        }
    }
}

void init2(){
    rep(i,n){
        used[i]=0;
    }
}

void dfs(int pos){//ラベル
    if(used[pos]) return;
    used[pos]=1;
    rep(i,n){
        if(used[i]) continue;
        if(map[pos][i]){
            dfs(i);
        }
    }
    d[pos].post=++cnt;
}
void dfs_init(){
    cnt=0;
    rep(i,n){
        dfs(i);
    }
}

void dfs2(int j,int pos){//強連結分解
    if(used[pos]) return;
    used[pos]=1; g[j][cnt++]=pos;
    len[j]=cnt;
    rep(i,n){
        if(used[i]) continue;
        if(map[i][pos]){
            dfs2(j,i);
        }
    }
}
void dfs2_init(){
    init2();
    int idx=0;
    rep(i,n){
        cnt=0;
        if(used[d[i].num]);
        else{
            dfs2(idx,d[i].num);
            idx++;
        }
    }
}
int wake(int i){
    int used2[N]={0};
    rep(j,len[i]) used2[g[i][j]]=1;
    rep(j,len[i]){
        rep(k,n){
            if(used2[k]) continue;
            if(map[k][g[i][j]]) return 0;
        }
    }
    return 1;
}
int main(void){
    while(1){
        scanf("%d",&n);
        if(n==0) break;
        init();
        double p[N]={0};
        rep(i,n){
            double p_;
            int x,y;
            scanf("%lf%d",&p_,&x);
            p[i]=p_;
            rep(j,x){
                scanf("%d",&y);
                map[i][y-1]=1;
            }
        }
        rep(i,n){
            d[i].num=i;
            d[i].post=1;
        }
        dfs_init();
        //printf("%d\n",cnt); rep(i,n) printf("%d ",d[i].post); puts("\n");
        qsort(d,n,sizeof(Data),comp);
        dfs2_init();
        /*rep(i,n){
            if(len[i]==0) continue;
            rep(j,len[i]){
                printf("%d ",g[i][j]);
            }puts("");
        }puts("");*/
        /*rep(i,n){
            rep(j,n){
                printf("%6f ",map[i][j]);
            }puts("");
        }puts("");*/
        double sum=1;
        rep(i,n){
            if(len[i]==0) continue;
            double tmp=1;
            if(wake(i)){
                rep(j,len[i])
                tmp*=p[g[i][j]];
                sum*=(1-tmp);
            }
        }
        printf("%.9f\n",sum);
    }
    
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-4(%rbp), %eax
	movl	-12(%rbp), %edx
	subl	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 8000
d:
	.zero	8000
	.globl	used
	.align 32
	.type	used, @object
	.size	used, 4000
used:
	.zero	4000
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 8000000
map:
	.zero	8000000
	.globl	g
	.align 32
	.type	g, @object
	.size	g, 4000000
g:
	.zero	4000000
	.globl	len
	.align 32
	.type	len, @object
	.size	len, 4000
len:
	.zero	4000
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.text
	.globl	init
	.type	init, @function
init:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -8(%rbp)
	jmp	.L4
.L7:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	used(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$0, -4(%rbp)
	jmp	.L5
.L6:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	map(%rip), %rax
	pxor	%xmm0, %xmm0
	movsd	%xmm0, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L5:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L6
	addl	$1, -8(%rbp)
.L4:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L7
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	init, .-init
	.globl	init2
	.type	init2, @function
init2:
.LFB8:
	.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	.L9
.L10:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L9:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L10
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	init2, .-init2
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB9:
	.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	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L20
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	$0, -4(%rbp)
	jmp	.L14
.L18:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L21
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	map(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L19
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	je	.L16
.L19:
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	dfs
	jmp	.L16
.L21:
	nop
.L16:
	addl	$1, -4(%rbp)
.L14:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L18
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
	movl	cnt(%rip), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+d(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	jmp	.L11
.L20:
	nop
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	dfs, .-dfs
	.globl	dfs_init
	.type	dfs_init, @function
dfs_init:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, cnt(%rip)
	movl	$0, -4(%rbp)
	jmp	.L23
.L24:
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	dfs
	addl	$1, -4(%rbp)
.L23:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L24
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	dfs_init, .-dfs_init
	.globl	dfs2
	.type	dfs2, @function
dfs2:
.LFB11:
	.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	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L34
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	cnt(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, cnt(%rip)
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	g(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	cnt(%rip), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	len(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$0, -4(%rbp)
	jmp	.L28
.L32:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L35
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	map(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L33
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	je	.L30
.L33:
	movl	-4(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	dfs2
	jmp	.L30
.L35:
	nop
.L30:
	addl	$1, -4(%rbp)
.L28:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L32
	jmp	.L25
.L34:
	nop
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	dfs2, .-dfs2
	.globl	dfs2_init
	.type	dfs2_init, @function
dfs2_init:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, %eax
	call	init2
	movl	$0, -8(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L37
.L39:
	movl	$0, cnt(%rip)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L38
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	dfs2
	addl	$1, -8(%rbp)
.L38:
	addl	$1, -4(%rbp)
.L37:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L39
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	dfs2_init, .-dfs2_init
	.globl	wake
	.type	wake, @function
wake:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4048, %rsp
	movl	%edi, -4036(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-4016(%rbp), %rdx
	movl	$0, %eax
	movl	$500, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -4028(%rbp)
	jmp	.L41
.L42:
	movl	-4028(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4036(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movl	$1, -4016(%rbp,%rax,4)
	addl	$1, -4028(%rbp)
.L41:
	movl	-4036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4028(%rbp)
	jl	.L42
	movl	$0, -4024(%rbp)
	jmp	.L43
.L50:
	movl	$0, -4020(%rbp)
	jmp	.L44
.L49:
	movl	-4020(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L54
	movl	-4024(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4036(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-4020(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	map(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L53
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	je	.L46
.L53:
	movl	$0, %eax
	jmp	.L51
.L54:
	nop
.L46:
	addl	$1, -4020(%rbp)
.L44:
	movl	n(%rip), %eax
	cmpl	%eax, -4020(%rbp)
	jl	.L49
	addl	$1, -4024(%rbp)
.L43:
	movl	-4036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4024(%rbp)
	jl	.L50
	movl	$1, %eax
.L51:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L52
	call	__stack_chk_fail@PLT
.L52:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	wake, .-wake
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%lf%d"
.LC4:
	.string	"%.9f\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB14:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3984, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L70:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jne	.L56
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L71
	jmp	.L72
.L56:
	movl	$0, %eax
	call	init
	leaq	-8016(%rbp), %rdx
	movl	$0, %eax
	movl	$1000, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -8060(%rbp)
	jmp	.L58
.L61:
	leaq	-8068(%rbp), %rdx
	leaq	-8040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movsd	-8040(%rbp), %xmm0
	movl	-8060(%rbp), %eax
	cltq
	movsd	%xmm0, -8016(%rbp,%rax,8)
	movl	$0, -8056(%rbp)
	jmp	.L59
.L60:
	leaq	-8064(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-8064(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-8060(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	map(%rip), %rax
	movsd	.LC3(%rip), %xmm0
	movsd	%xmm0, (%rdx,%rax)
	addl	$1, -8056(%rbp)
.L59:
	movl	-8068(%rbp), %eax
	cmpl	%eax, -8056(%rbp)
	jl	.L60
	addl	$1, -8060(%rbp)
.L58:
	movl	n(%rip), %eax
	cmpl	%eax, -8060(%rbp)
	jl	.L61
	movl	$0, -8052(%rbp)
	jmp	.L62
.L63:
	movl	-8052(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	d(%rip), %rdx
	movl	-8052(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8052(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+d(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -8052(%rbp)
.L62:
	movl	n(%rip), %eax
	cmpl	%eax, -8052(%rbp)
	jl	.L63
	movl	$0, %eax
	call	dfs_init
	movl	n(%rip), %eax
	cltq
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	d(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, %eax
	call	dfs2_init
	movsd	.LC3(%rip), %xmm0
	movsd	%xmm0, -8032(%rbp)
	movl	$0, -8048(%rbp)
	jmp	.L64
.L69:
	movl	-8048(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L73
	movsd	.LC3(%rip), %xmm0
	movsd	%xmm0, -8024(%rbp)
	movl	-8048(%rbp), %eax
	movl	%eax, %edi
	call	wake
	testl	%eax, %eax
	je	.L66
	movl	$0, -8044(%rbp)
	jmp	.L67
.L68:
	movl	-8044(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8048(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movsd	-8016(%rbp,%rax,8), %xmm0
	movsd	-8024(%rbp), %xmm1
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -8024(%rbp)
	addl	$1, -8044(%rbp)
.L67:
	movl	-8048(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8044(%rbp)
	jl	.L68
	movsd	.LC3(%rip), %xmm0
	subsd	-8024(%rbp), %xmm0
	movsd	-8032(%rbp), %xmm1
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -8032(%rbp)
	jmp	.L66
.L73:
	nop
.L66:
	addl	$1, -8048(%rbp)
.L64:
	movl	n(%rip), %eax
	cmpl	%eax, -8048(%rbp)
	jl	.L69
	movq	-8032(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	jmp	.L70
.L72:
	call	__stack_chk_fail@PLT
.L71:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.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	comp
	.type	comp, @function
comp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-4(%rbp), %eax
	movl	-12(%rbp), %edx
	subl	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 8000
d:
	.zero	8000
	.globl	used
	.align 32
	.type	used, @object
	.size	used, 4000
used:
	.zero	4000
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 8000000
map:
	.zero	8000000
	.globl	g
	.align 32
	.type	g, @object
	.size	g, 4000000
g:
	.zero	4000000
	.globl	len
	.align 32
	.type	len, @object
	.size	len, 4000
len:
	.zero	4000
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.text
	.globl	init
	.type	init, @function
init:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -8(%rbp)
	jmp	.L4
.L7:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	used(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$0, -4(%rbp)
	jmp	.L5
.L6:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	map(%rip), %rax
	pxor	%xmm0, %xmm0
	movsd	%xmm0, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L5:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L6
	addl	$1, -8(%rbp)
.L4:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L7
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	init, .-init
	.globl	init2
	.type	init2, @function
init2:
.LFB8:
	.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	.L9
.L10:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L9:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L10
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	init2, .-init2
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB9:
	.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	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L20
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	$0, -4(%rbp)
	jmp	.L14
.L18:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L21
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	map(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L19
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	je	.L16
.L19:
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	dfs
	jmp	.L16
.L21:
	nop
.L16:
	addl	$1, -4(%rbp)
.L14:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L18
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
	movl	cnt(%rip), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+d(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	jmp	.L11
.L20:
	nop
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	dfs, .-dfs
	.globl	dfs_init
	.type	dfs_init, @function
dfs_init:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, cnt(%rip)
	movl	$0, -4(%rbp)
	jmp	.L23
.L24:
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	dfs
	addl	$1, -4(%rbp)
.L23:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L24
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	dfs_init, .-dfs_init
	.globl	dfs2
	.type	dfs2, @function
dfs2:
.LFB11:
	.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	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L34
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	cnt(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, cnt(%rip)
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	g(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	cnt(%rip), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	len(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$0, -4(%rbp)
	jmp	.L28
.L32:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L35
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	map(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L33
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	je	.L30
.L33:
	movl	-4(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	dfs2
	jmp	.L30
.L35:
	nop
.L30:
	addl	$1, -4(%rbp)
.L28:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L32
	jmp	.L25
.L34:
	nop
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	dfs2, .-dfs2
	.globl	dfs2_init
	.type	dfs2_init, @function
dfs2_init:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, %eax
	call	init2
	movl	$0, -8(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L37
.L39:
	movl	$0, cnt(%rip)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L38
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	dfs2
	addl	$1, -8(%rbp)
.L38:
	addl	$1, -4(%rbp)
.L37:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L39
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	dfs2_init, .-dfs2_init
	.globl	wake
	.type	wake, @function
wake:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4048, %rsp
	movl	%edi, -4036(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-4016(%rbp), %rdx
	movl	$0, %eax
	movl	$500, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -4028(%rbp)
	jmp	.L41
.L42:
	movl	-4028(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4036(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movl	$1, -4016(%rbp,%rax,4)
	addl	$1, -4028(%rbp)
.L41:
	movl	-4036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4028(%rbp)
	jl	.L42
	movl	$0, -4024(%rbp)
	jmp	.L43
.L50:
	movl	$0, -4020(%rbp)
	jmp	.L44
.L49:
	movl	-4020(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L54
	movl	-4024(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4036(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-4020(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	map(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L53
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	je	.L46
.L53:
	movl	$0, %eax
	jmp	.L51
.L54:
	nop
.L46:
	addl	$1, -4020(%rbp)
.L44:
	movl	n(%rip), %eax
	cmpl	%eax, -4020(%rbp)
	jl	.L49
	addl	$1, -4024(%rbp)
.L43:
	movl	-4036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4024(%rbp)
	jl	.L50
	movl	$1, %eax
.L51:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L52
	call	__stack_chk_fail@PLT
.L52:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	wake, .-wake
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%lf%d"
.LC4:
	.string	"%.9f\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB14:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3984, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L70:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jne	.L56
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L71
	jmp	.L72
.L56:
	movl	$0, %eax
	call	init
	leaq	-8016(%rbp), %rdx
	movl	$0, %eax
	movl	$1000, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -8060(%rbp)
	jmp	.L58
.L61:
	leaq	-8068(%rbp), %rdx
	leaq	-8040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movsd	-8040(%rbp), %xmm0
	movl	-8060(%rbp), %eax
	cltq
	movsd	%xmm0, -8016(%rbp,%rax,8)
	movl	$0, -8056(%rbp)
	jmp	.L59
.L60:
	leaq	-8064(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-8064(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-8060(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	map(%rip), %rax
	movsd	.LC3(%rip), %xmm0
	movsd	%xmm0, (%rdx,%rax)
	addl	$1, -8056(%rbp)
.L59:
	movl	-8068(%rbp), %eax
	cmpl	%eax, -8056(%rbp)
	jl	.L60
	addl	$1, -8060(%rbp)
.L58:
	movl	n(%rip), %eax
	cmpl	%eax, -8060(%rbp)
	jl	.L61
	movl	$0, -8052(%rbp)
	jmp	.L62
.L63:
	movl	-8052(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	d(%rip), %rdx
	movl	-8052(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8052(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+d(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -8052(%rbp)
.L62:
	movl	n(%rip), %eax
	cmpl	%eax, -8052(%rbp)
	jl	.L63
	movl	$0, %eax
	call	dfs_init
	movl	n(%rip), %eax
	cltq
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	d(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, %eax
	call	dfs2_init
	movsd	.LC3(%rip), %xmm0
	movsd	%xmm0, -8032(%rbp)
	movl	$0, -8048(%rbp)
	jmp	.L64
.L69:
	movl	-8048(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L73
	movsd	.LC3(%rip), %xmm0
	movsd	%xmm0, -8024(%rbp)
	movl	-8048(%rbp), %eax
	movl	%eax, %edi
	call	wake
	testl	%eax, %eax
	je	.L66
	movl	$0, -8044(%rbp)
	jmp	.L67
.L68:
	movl	-8044(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8048(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movsd	-8016(%rbp,%rax,8), %xmm0
	movsd	-8024(%rbp), %xmm1
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -8024(%rbp)
	addl	$1, -8044(%rbp)
.L67:
	movl	-8048(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8044(%rbp)
	jl	.L68
	movsd	.LC3(%rip), %xmm0
	subsd	-8024(%rbp), %xmm0
	movsd	-8032(%rbp), %xmm1
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -8032(%rbp)
	jmp	.L66
.L73:
	nop
.L66:
	addl	$1, -8048(%rbp)
.L64:
	movl	n(%rip), %eax
	cmpl	%eax, -8048(%rbp)
	jl	.L69
	movq	-8032(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	jmp	.L70
.L72:
	call	__stack_chk_fail@PLT
.L71:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.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:
