// File: /workspace/github_cpp_makefile_star2_O3/thunlp[P]KB2E/CTransR/Train_CTransR.cpp
// Function: prepare()
void prepare()
{
    FILE* f1 = fopen("../data/entity2id.txt","r");
	FILE* f2 = fopen("../data/relation2id.txt","r");
	int x;
	while (fscanf(f1,"%s%d",buf,&x)==2)
	{
		string st=buf;
		entity2id[st]=x;
		id2entity[x]=st;
		entity_num++;
	}
	while (fscanf(f2,"%s%d",buf,&x)==2)
	{
		string st=buf;
		relation2id[st]=x;
		id2relation[x]=st;
		fb_relation_num++;
	}
    FILE* f_kb = fopen("../data/train.txt","r");
    FILE* f_train_cluster = fopen("../cluster/output/train_cluster.txt","r");
	while (fscanf(f_kb,"%s",buf)==1)
    {
        string s1=buf;
        fscanf(f_kb,"%s",buf);
        string s2=buf;
        fscanf(f_kb,"%s",buf);
        string s3=buf;
        if (entity2id.count(s1)==0)
        {
            cout<<"miss entity:"<<s1<<endl;
        }
        if (entity2id.count(s2)==0)
        {
            cout<<"miss entity:"<<s2<<endl;
        }
        if (relation2id.count(s3)==0)
        {
            cout<<"miss rel:"<<s3<<endl;
        }
        int e1 = entity2id[s1];
        int e2 = entity2id[s2];
        int rel_fb = relation2id[s3];
        int rel;
        fscanf(f_train_cluster,"%d",&rel);
        left_entity[rel][e1]+=1;
        right_entity[rel][e2]+=1;
        if (cluster2fb.count(rel)==0)
        {
            relation_num+=1;
            cluster2fb[rel]=rel_fb;
        }
        else
        if (cluster2fb[rel]!=rel_fb)
        {
            cout<<"not map:"<<e1<<" "<<e2<<" "<<rel<<' '<<rel_fb<<endl;
            exit(-1);
        }

        fb_left_entity[cluster2fb[rel]][e1]+=1;
        fb_right_entity[cluster2fb[rel]][e2]+=1;
        train.add(e1,e2,rel);
    }
    fclose(f_train_cluster);
    fclose(f_kb);
    for (int i=0; i<relation_num; i++)
    {
    	double sum1=0,sum2=0;
    	for (map<int,int>::iterator it = left_entity[i].begin(); it!=left_entity[i].end(); it++)
    	{
    		sum1++;
    		sum2+=it->second;
    	}
    	left_mean[i]=sum2/sum1;
    }
    for (int i=0; i<relation_num; i++)
    {
    	double sum1=0,sum2=0;
    	for (map<int,int>::iterator it = right_entity[i].begin(); it!=right_entity[i].end(); it++)
    	{
    		sum1++;
    		sum2+=it->second;
    	}
    	right_mean[i]=sum2/sum1;
    }


     for (int i=0; i<fb_relation_num; i++)
    {
    	double sum1=0,sum2=0;
    	for (map<int,int>::iterator it = fb_left_entity[i].begin(); it!=fb_left_entity[i].end(); it++)
    	{
    		sum1++;
    		sum2+=it->second;
    	}
    	fb_left_mean[i]=sum2/sum1;
    }
    for (int i=0; i<fb_relation_num; i++)
    {
    	double sum1=0,sum2=0;
    	for (map<int,int>::iterator it = fb_right_entity[i].begin(); it!=fb_right_entity[i].end(); it++)
    	{
    		sum1++;
    		sum2+=it->second;
    	}
    	fb_right_mean[i]=sum2/sum1;
    }
    for (int i=0; i<fb_relation_num; i++)
    	cout<<fb_left_mean[i]<<' '<<fb_right_mean[i]<<endl;
    cout<<"fb_relation_num="<<fb_relation_num<<endl;
    cout<<"relation_num="<<relation_num<<endl;
    cout<<"entity_num="<<entity_num<<endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
leaq 0x5538(%rip), %rdi      # 0x80b0
leaq 0x5547(%rip), %rbx      # 0x80c6
movq %rbx, %rsi
callq 0x2210
movq %rax, %r14
leaq 0x5537(%rip), %rdi      # 0x80c8
movq %rbx, %rsi
callq 0x2210
movq %rax, (%rsp)
leaq 0x553c(%rip), %rsi      # 0x80e0
leaq 0x9655(%rip), %r15      # 0xc200
leaq 0xc(%rsp), %rcx
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2320
cmpl $0x2, %eax
jne 0x2c5d
leaq 0x20(%rsp), %rbp
leaq 0x10(%rsp), %r12
leaq 0xc(%rsp), %r13
movq %rbp, 0x10(%rsp)
movq %r15, %rdi
callq 0x20d0
leaq (%rax,%r15), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x7362
movl 0xc(%rsp), %ebx
leaq 0x3a3b4(%rip), %rdi     # 0x3cfb0
movq %r12, %rsi
callq 0x3b4e
movl %ebx, (%rax)
leaq 0x3a3d3(%rip), %rdi     # 0x3cfe0
movq %r13, %rsi
callq 0x3bca
movq %rax, %rdi
movq %r12, %rsi
callq 0x2100
incl 0x3a31e(%rip)           # 0x3cf44
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2c3d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21e0
movq %r14, %rdi
leaq 0x5499(%rip), %rsi      # 0x80e0
movq %r15, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x2320
cmpl $0x2, %eax
je 0x2bd5
leaq 0x547c(%rip), %rsi      # 0x80e0
leaq 0x9595(%rip), %r14      # 0xc200
leaq 0xc(%rsp), %rcx
movq (%rsp), %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2320
cmpl $0x2, %eax
jne 0x2d24
leaq 0x20(%rsp), %r12
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %rbp
leaq 0x5443(%rip), %rbx      # 0x80e0
movq %r12, 0x10(%rsp)
movq %r14, %rdi
callq 0x20d0
leaq (%rax,%r14), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x7362
movl 0xc(%rsp), %r13d
leaq 0x3a2bb(%rip), %rdi     # 0x3cf80
movq %r15, %rsi
callq 0x3b4e
movl %r13d, (%rax)
leaq 0x3a339(%rip), %rdi     # 0x3d010
movq %rbp, %rsi
callq 0x3bca
movq %rax, %rdi
movq %r15, %rsi
callq 0x2100
incl 0x3a258(%rip)           # 0x3cf48
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x2d07
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21e0
movq (%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x2320
cmpl $0x2, %eax
je 0x2c9d
leaq 0x53ba(%rip), %rdi      # 0x80e5
leaq 0x5394(%rip), %r14      # 0x80c6
movq %r14, %rsi
callq 0x2210
movq %rax, %rbx
leaq 0x53b3(%rip), %rdi      # 0x80f7
movq %r14, %rsi
callq 0x2210
movq %rax, (%rsp)
leaq 0x53c4(%rip), %rsi      # 0x811b
leaq 0x94a2(%rip), %r15      # 0xc200
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2320
cmpl $0x1, %eax
jne 0x31e5
leaq 0x3a235(%rip), %r12     # 0x3cfb0
leaq 0x40(%rsp), %r13
leaq 0x3a1c9(%rip), %rbp     # 0x3cf50
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x20d0
leaq (%rax,%r15), %rdx
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x7362
movq %rbx, %rdi
leaq 0x5367(%rip), %rsi      # 0x811b
movq %r15, %rdx
xorl %eax, %eax
callq 0x2320
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq %r15, %rdi
callq 0x20d0
leaq (%rax,%r15), %rdx
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
callq 0x7362
movq %rbx, %rdi
leaq 0x5330(%rip), %rsi      # 0x811b
movq %r15, %rdx
xorl %eax, %eax
callq 0x2320
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
movq %r15, %rdi
callq 0x20d0
leaq (%rax,%r15), %rdx
leaq 0x68(%rsp), %rdi
movq %r15, %rsi
callq 0x7362
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
callq 0x79f2
leaq 0x3a18c(%rip), %rcx     # 0x3cfb8
cmpq %rcx, %rax
jne 0x2e89
movl $0xc, %edx
movq 0x919b(%rip), %rdi      # 0xbfd8
leaq 0x52da(%rip), %rsi      # 0x811e
callq 0x2200
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x917e(%rip), %rdi      # 0xbfd8
callq 0x2200
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %r12, %rdi
leaq 0x48(%rsp), %rsi
callq 0x79f2
leaq 0x3a11b(%rip), %rcx     # 0x3cfb8
cmpq %rcx, %rax
jne 0x2efa
movl $0xc, %edx
movq 0x912a(%rip), %rdi      # 0xbfd8
leaq 0x5269(%rip), %rsi      # 0x811e
callq 0x2200
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x910d(%rip), %rdi      # 0xbfd8
callq 0x2200
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
leaq 0x3a07f(%rip), %rdi     # 0x3cf80
leaq 0x68(%rsp), %rsi
callq 0x79f2
leaq 0x3a076(%rip), %rcx     # 0x3cf88
cmpq %rcx, %rax
jne 0x2f6f
movl $0x9, %edx
movq 0x90b5(%rip), %rdi      # 0xbfd8
leaq 0x5201(%rip), %rsi      # 0x812b
callq 0x2200
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x9098(%rip), %rdi      # 0xbfd8
callq 0x2200
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
callq 0x3b4e
movl (%rax), %eax
movl %eax, 0x34(%rsp)
movq %r12, %rdi
leaq 0x48(%rsp), %rsi
callq 0x3b4e
movl (%rax), %eax
movl %eax, 0x30(%rsp)
leaq 0x39fe4(%rip), %rdi     # 0x3cf80
leaq 0x68(%rsp), %rsi
callq 0x3b4e
movl (%rax), %r14d
movq (%rsp), %rdi
leaq 0x512e(%rip), %rsi      # 0x80e2
movq %r13, %rdx
xorl %eax, %eax
callq 0x2320
leaq 0x3a0ab(%rip), %rdi     # 0x3d070
movq %r13, %rsi
callq 0x3c30
movq %rax, %rdi
leaq 0x34(%rsp), %rsi
callq 0x3c96
incl (%rax)
leaq 0x3a0bd(%rip), %rdi     # 0x3d0a0
movq %r13, %rsi
callq 0x3c30
movq %rax, %rdi
leaq 0x30(%rsp), %rsi
callq 0x3c96
incl (%rax)
movq 0x39f5f(%rip), %rcx     # 0x3cf60
testq %rcx, %rcx
je 0x303d
movl 0x40(%rsp), %eax
leaq 0x39f47(%rip), %rdx     # 0x3cf58
xorl %esi, %esi
cmpl %eax, 0x20(%rcx)
setl %sil
cmovgeq %rcx, %rdx
movq 0x10(%rcx,%rsi,8), %rcx
testq %rcx, %rcx
jne 0x3011
leaq 0x39f29(%rip), %rcx     # 0x3cf58
cmpq %rcx, %rdx
je 0x303d
cmpl 0x20(%rdx), %eax
jge 0x3131
incl 0x39efd(%rip)           # 0x3cf40
movq %rbp, %rdi
movq %r13, %rsi
callq 0x3c96
movl %r14d, (%rax)
movq %rbp, %rdi
movq %r13, %rsi
callq 0x3c96
leaq 0x3a0cd(%rip), %rdi     # 0x3d130
movq %rax, %rsi
callq 0x3c30
movq %rax, %rdi
leaq 0x34(%rsp), %rsi
callq 0x3c96
incl (%rax)
movq %rbp, %rdi
movq %r13, %rsi
callq 0x3c96
leaq 0x3a0d4(%rip), %rdi     # 0x3d160
movq %rax, %rsi
callq 0x3c30
movq %rax, %rdi
leaq 0x30(%rsp), %rsi
callq 0x3c96
incl (%rax)
movl 0x34(%rsp), %esi
movl 0x30(%rsp), %edx
movl 0x40(%rsp), %ecx
leaq 0x3a13a(%rip), %rdi     # 0x3d1f0
callq 0x3d44
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x30d7
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x30f3
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x310f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21e0
movq %rbx, %rdi
leaq 0x5002(%rip), %rsi      # 0x811b
movq %r15, %rdx
xorl %eax, %eax
callq 0x2320
cmpl $0x1, %eax
je 0x2d87
jmp 0x31e5
movq %rbp, %rdi
movq %r13, %rsi
callq 0x3c96
cmpl %r14d, (%rax)
je 0x3051
movq 0x8e8c(%rip), %rdi      # 0xbfd8
leaq 0x4fe2(%rip), %rsi      # 0x8135
movl $0x8, %edx
callq 0x2200
movl 0x34(%rsp), %esi
movq 0x8e70(%rip), %rdi      # 0xbfd8
callq 0x22e0
movq %rax, %rbx
leaq 0x5042(%rip), %rsi      # 0x81b9
movl $0x1, %edx
movq %rax, %rdi
callq 0x2200
movl 0x30(%rsp), %esi
movq %rbx, %rdi
callq 0x22e0
movq %rax, %rbx
leaq 0x501f(%rip), %rsi      # 0x81b9
movl $0x1, %edx
movq %rax, %rdi
callq 0x2200
movl 0x40(%rsp), %esi
movq %rbx, %rdi
callq 0x22e0
leaq 0x47(%rsp), %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x2200
movq %rax, %rdi
movl %r14d, %esi
callq 0x22e0
movq %rax, %rdi
callq 0x20e0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2220
movq (%rsp), %rdi
callq 0x21c0
movq %rbx, %rdi
callq 0x21c0
movl $0x0, 0x10(%rsp)
cmpl $0x0, 0x39d3b(%rip)     # 0x3cf40
jle 0x33a5
leaq 0x39e5e(%rip), %rbx     # 0x3d070
leaq 0x10(%rsp), %r14
leaq 0x39eb2(%rip), %r15     # 0x3d0d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c30
movq 0x18(%rax), %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c30
addq $0x8, %rax
movsd 0x4de4(%rip), %xmm1     # 0x8028
cmpq %rax, %r12
je 0x32a0
xorpd %xmm2, %xmm2
xorpd %xmm1, %xmm1
addsd 0x4dc7(%rip), %xmm2     # 0x8020
movsd %xmm2, 0x38(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x24(%r12), %xmm0
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movq %r12, %rdi
callq 0x2130
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c30
movsd 0x38(%rsp), %xmm2
movsd (%rsp), %xmm1
addq $0x8, %rax
cmpq %rax, %r12
jne 0x3251
divsd %xmm2, %xmm1
movsd %xmm1, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x3e80
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0x10(%rsp), %ecx
incl %ecx
movl %ecx, 0x10(%rsp)
movl 0x39c77(%rip), %eax     # 0x3cf40
cmpl %eax, %ecx
jl 0x321e
movl $0x0, 0x10(%rsp)
testl %eax, %eax
jle 0x33a5
leaq 0x39db8(%rip), %rbx     # 0x3d0a0
leaq 0x10(%rsp), %r14
leaq 0x39e0c(%rip), %r15     # 0x3d100
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c30
movq 0x18(%rax), %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c30
addq $0x8, %rax
movsd 0x4d0e(%rip), %xmm1     # 0x8028
cmpq %rax, %r12
je 0x3376
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
addsd 0x4cf1(%rip), %xmm2     # 0x8020
movsd %xmm2, 0x38(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x24(%r12), %xmm0
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movq %r12, %rdi
callq 0x2130
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c30
movsd 0x38(%rsp), %xmm2
movsd (%rsp), %xmm1
addq $0x8, %rax
cmpq %rax, %r12
jne 0x3327
divsd %xmm2, %xmm1
movsd %xmm1, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x3e80
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0x10(%rsp), %eax
incl %eax
movl %eax, 0x10(%rsp)
cmpl 0x39ba1(%rip), %eax     # 0x3cf40
jl 0x32f4
movl $0x0, 0x10(%rsp)
cmpl $0x0, 0x39b94(%rip)     # 0x3cf48
jle 0x360b
leaq 0x39d6f(%rip), %rbx     # 0x3d130
leaq 0x10(%rsp), %r14
leaq 0x39dc3(%rip), %r15     # 0x3d190
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c30
movq 0x18(%rax), %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c30
addq $0x8, %rax
movsd 0x4c35(%rip), %xmm1     # 0x8028
cmpq %rax, %r12
je 0x344f
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
addsd 0x4c18(%rip), %xmm2     # 0x8020
movsd %xmm2, 0x38(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x24(%r12), %xmm0
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movq %r12, %rdi
callq 0x2130
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c30
movsd 0x38(%rsp), %xmm2
movsd (%rsp), %xmm1
addq $0x8, %rax
cmpq %rax, %r12
jne 0x3400
divsd %xmm2, %xmm1
movsd %xmm1, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x3e80
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0x10(%rsp), %ecx
incl %ecx
movl %ecx, 0x10(%rsp)
movl 0x39ad0(%rip), %eax     # 0x3cf48
cmpl %eax, %ecx
jl 0x33cd
movl $0x0, 0x10(%rsp)
testl %eax, %eax
jle 0x360b
leaq 0x39cc9(%rip), %rbx     # 0x3d160
leaq 0x10(%rsp), %r14
leaq 0x39d1d(%rip), %r15     # 0x3d1c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c30
movq 0x18(%rax), %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c30
addq $0x8, %rax
movsd 0x4b5f(%rip), %xmm1     # 0x8028
cmpq %rax, %r12
je 0x3525
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
addsd 0x4b42(%rip), %xmm2     # 0x8020
movsd %xmm2, 0x38(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x24(%r12), %xmm0
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movq %r12, %rdi
callq 0x2130
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c30
movsd 0x38(%rsp), %xmm2
movsd (%rsp), %xmm1
addq $0x8, %rax
cmpq %rax, %r12
jne 0x34d6
divsd %xmm2, %xmm1
movsd %xmm1, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x3e80
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0x10(%rsp), %ecx
incl %ecx
movl %ecx, 0x10(%rsp)
movl 0x399fa(%rip), %eax     # 0x3cf48
cmpl %eax, %ecx
jl 0x34a3
movl $0x0, 0x10(%rsp)
testl %eax, %eax
jle 0x360b
leaq 0x39c23(%rip), %rbx     # 0x3d190
leaq 0x10(%rsp), %r14
movq 0x8a5f(%rip), %r15      # 0xbfd8
leaq 0x48(%rsp), %r12
leaq 0x39c3b(%rip), %r13     # 0x3d1c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3e80
movsd (%rax), %xmm0
movq %r15, %rdi
callq 0x22b0
movb $0x20, 0x48(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2200
movq %rax, %rbp
movq %r13, %rdi
movq %r14, %rsi
callq 0x3e80
movsd (%rax), %xmm0
movq %rbp, %rdi
callq 0x22b0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movl 0x10(%rsp), %eax
incl %eax
movl %eax, 0x10(%rsp)
cmpl 0x39943(%rip), %eax     # 0x3cf48
jl 0x3585
movq 0x89c6(%rip), %rbx      # 0xbfd8
leaq 0x4b25(%rip), %rsi      # 0x813e
movl $0x10, %edx
movq %rbx, %rdi
callq 0x2200
movl 0x3991c(%rip), %esi     # 0x3cf48
movq %rbx, %rdi
callq 0x22e0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
leaq 0x4adc(%rip), %rsi      # 0x8141
movl $0xd, %edx
movq %rbx, %rdi
callq 0x2200
movl 0x398c8(%rip), %esi     # 0x3cf40
movq %rbx, %rdi
callq 0x22e0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
leaq 0x4a9e(%rip), %rsi      # 0x814f
movl $0xb, %edx
movq %rbx, %rdi
callq 0x2200
movl 0x39880(%rip), %esi     # 0x3cf44
movq %rbx, %rdi
callq 0x22e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3747
jmp 0x3747
jmp 0x3747
jmp 0x3747
jmp 0x3722
jmp 0x3714
movq %rax, %rbx
jmp 0x3782
jmp 0x371b
movq %rax, %rbx
jmp 0x3766
jmp 0x3722
movq %rax, %rbx
jmp 0x379e
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
jne 0x3791
jmp 0x379e
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
jne 0x3791
jmp 0x379e
jmp 0x3747
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x3766
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3782
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x379e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x22f0