// File: 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:
subq $0x368, %rsp            # imm = 0x368
leaq 0x13482(%rip), %rdi     # 0x16070
leaq 0x13491(%rip), %rsi     # 0x16086
callq 0x22b0
movq %rax, 0x360(%rsp)
leaq 0x1347f(%rip), %rdi     # 0x16088
leaq 0x13476(%rip), %rsi     # 0x16086
callq 0x22b0
movq %rax, 0x358(%rsp)
movq 0x360(%rsp), %rdi
leaq 0x13474(%rip), %rsi     # 0x160a0
leaq 0x1c63d(%rip), %rdx     # 0x1f270
leaq 0x354(%rsp), %rcx
movb $0x0, %al
callq 0x23e0
cmpl $0x2, %eax
jne 0x2d6a
leaq 0x32f(%rsp), %rdi
movq %rdi, 0x190(%rsp)
callq 0x23b0
movq 0x190(%rsp), %rdx
leaq 0x1c601(%rip), %rsi     # 0x1f270
leaq 0x330(%rsp), %rdi
callq 0x4290
jmp 0x2c7e
leaq 0x32f(%rsp), %rdi
callq 0x2270
movl 0x354(%rsp), %eax
movl %eax, 0x184(%rsp)
leaq 0x4d380(%rip), %rdi     # 0x50020
leaq 0x330(%rsp), %rsi
callq 0x4350
movq %rax, 0x188(%rsp)
jmp 0x2cb7
movq 0x188(%rsp), %rax
movl 0x184(%rsp), %ecx
movl %ecx, (%rax)
leaq 0x4d381(%rip), %rdi     # 0x50050
leaq 0x354(%rsp), %rsi
callq 0x4440
movq %rax, 0x178(%rsp)
jmp 0x2ce6
movq 0x178(%rsp), %rdi
leaq 0x330(%rsp), %rsi
callq 0x2040
jmp 0x2cfd
movl 0x4d2b1(%rip), %eax     # 0x4ffb4
addl $0x1, %eax
movl %eax, 0x4d2a8(%rip)     # 0x4ffb4
leaq 0x330(%rsp), %rdi
callq 0x2428
jmp 0x2c1d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x320(%rsp)
movl %eax, 0x31c(%rsp)
leaq 0x32f(%rsp), %rdi
callq 0x2270
jmp 0x3cb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x320(%rsp)
movl %eax, 0x31c(%rsp)
leaq 0x330(%rsp), %rdi
callq 0x2428
jmp 0x3cb0
jmp 0x2d6c
movq 0x358(%rsp), %rdi
leaq 0x13325(%rip), %rsi     # 0x160a0
leaq 0x1c4ee(%rip), %rdx     # 0x1f270
leaq 0x354(%rsp), %rcx
movb $0x0, %al
callq 0x23e0
cmpl $0x2, %eax
jne 0x2eb9
leaq 0x2f7(%rsp), %rdi
movq %rdi, 0x170(%rsp)
callq 0x23b0
movq 0x170(%rsp), %rdx
leaq 0x1c4b2(%rip), %rsi     # 0x1f270
leaq 0x2f8(%rsp), %rdi
callq 0x4290
jmp 0x2dcd
leaq 0x2f7(%rsp), %rdi
callq 0x2270
movl 0x354(%rsp), %eax
movl %eax, 0x164(%rsp)
leaq 0x4d201(%rip), %rdi     # 0x4fff0
leaq 0x2f8(%rsp), %rsi
callq 0x4350
movq %rax, 0x168(%rsp)
jmp 0x2e06
movq 0x168(%rsp), %rax
movl 0x164(%rsp), %ecx
movl %ecx, (%rax)
leaq 0x4d262(%rip), %rdi     # 0x50080
leaq 0x354(%rsp), %rsi
callq 0x4440
movq %rax, 0x158(%rsp)
jmp 0x2e35
movq 0x158(%rsp), %rdi
leaq 0x2f8(%rsp), %rsi
callq 0x2040
jmp 0x2e4c
movl 0x4d166(%rip), %eax     # 0x4ffb8
addl $0x1, %eax
movl %eax, 0x4d15d(%rip)     # 0x4ffb8
leaq 0x2f8(%rsp), %rdi
callq 0x2428
jmp 0x2d6c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x320(%rsp)
movl %eax, 0x31c(%rsp)
leaq 0x2f7(%rsp), %rdi
callq 0x2270
jmp 0x3cb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x320(%rsp)
movl %eax, 0x31c(%rsp)
leaq 0x2f8(%rsp), %rdi
callq 0x2428
jmp 0x3cb0
leaq 0x131e5(%rip), %rdi     # 0x160a5
leaq 0x131bf(%rip), %rsi     # 0x16086
callq 0x22b0
movq %rax, 0x2e8(%rsp)
leaq 0x131dc(%rip), %rdi     # 0x160b7
leaq 0x131a4(%rip), %rsi     # 0x16086
callq 0x22b0
movq %rax, 0x2e0(%rsp)
movq 0x2e8(%rsp), %rdi
leaq 0x131dd(%rip), %rsi     # 0x160db
leaq 0x1c36b(%rip), %rdx     # 0x1f270
movb $0x0, %al
callq 0x23e0
cmpl $0x1, %eax
jne 0x366b
leaq 0x2bf(%rsp), %rdi
movq %rdi, 0x150(%rsp)
callq 0x23b0
movq 0x150(%rsp), %rdx
leaq 0x1c337(%rip), %rsi     # 0x1f270
leaq 0x2c0(%rsp), %rdi
callq 0x4290
jmp 0x2f48
leaq 0x2bf(%rsp), %rdi
callq 0x2270
movq 0x2e8(%rsp), %rdi
leaq 0x13177(%rip), %rsi     # 0x160db
leaq 0x1c305(%rip), %rdx     # 0x1f270
xorl %eax, %eax
callq 0x23e0
jmp 0x2f74
leaq 0x297(%rsp), %rdi
movq %rdi, 0x148(%rsp)
callq 0x23b0
movq 0x148(%rsp), %rdx
leaq 0x1c2d8(%rip), %rsi     # 0x1f270
leaq 0x298(%rsp), %rdi
callq 0x4290
jmp 0x2fa7
leaq 0x297(%rsp), %rdi
callq 0x2270
movq 0x2e8(%rsp), %rdi
leaq 0x13118(%rip), %rsi     # 0x160db
leaq 0x1c2a6(%rip), %rdx     # 0x1f270
xorl %eax, %eax
callq 0x23e0
jmp 0x2fd3
leaq 0x26f(%rsp), %rdi
movq %rdi, 0x140(%rsp)
callq 0x23b0
movq 0x140(%rsp), %rdx
leaq 0x1c279(%rip), %rsi     # 0x1f270
leaq 0x270(%rsp), %rdi
callq 0x4290
jmp 0x3006
leaq 0x26f(%rsp), %rdi
callq 0x2270
leaq 0x4d006(%rip), %rdi     # 0x50020
leaq 0x2c0(%rsp), %rsi
callq 0x4530
movq %rax, 0x138(%rsp)
jmp 0x3031
movq 0x138(%rsp), %rax
cmpq $0x0, %rax
jne 0x3164
movq 0x1bf8e(%rip), %rdi     # 0x1efd8
leaq 0x1308d(%rip), %rsi     # 0x160de
callq 0x2200
movq %rax, 0x130(%rsp)
jmp 0x3060
movq 0x130(%rsp), %rdi
leaq 0x2c0(%rsp), %rsi
callq 0x21d0
movq %rax, 0x128(%rsp)
jmp 0x307f
movq 0x128(%rsp), %rdi
movq 0x1bf32(%rip), %rsi     # 0x1efc0
callq 0x2250
jmp 0x3095
jmp 0x3164
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x320(%rsp)
movl %eax, 0x31c(%rsp)
leaq 0x2bf(%rsp), %rdi
callq 0x2270
jmp 0x3cb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x320(%rsp)
movl %eax, 0x31c(%rsp)
jmp 0x3659
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x320(%rsp)
movl %eax, 0x31c(%rsp)
leaq 0x297(%rsp), %rdi
callq 0x2270
jmp 0x3659
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x320(%rsp)
movl %eax, 0x31c(%rsp)
jmp 0x364c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x320(%rsp)
movl %eax, 0x31c(%rsp)
leaq 0x26f(%rsp), %rdi
callq 0x2270
jmp 0x364c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x320(%rsp)
movl %eax, 0x31c(%rsp)
leaq 0x270(%rsp), %rdi
callq 0x2428
jmp 0x364c
leaq 0x4ceb5(%rip), %rdi     # 0x50020
leaq 0x298(%rsp), %rsi
callq 0x4530
movq %rax, 0x120(%rsp)
jmp 0x3182
movq 0x120(%rsp), %rax
cmpq $0x0, %rax
jne 0x31e4
movq 0x1be41(%rip), %rdi     # 0x1efd8
leaq 0x12f40(%rip), %rsi     # 0x160de
callq 0x2200
movq %rax, 0x118(%rsp)
jmp 0x31ad
movq 0x118(%rsp), %rdi
leaq 0x298(%rsp), %rsi
callq 0x21d0
movq %rax, 0x110(%rsp)
jmp 0x31cc
movq 0x110(%rsp), %rdi
movq 0x1bde5(%rip), %rsi     # 0x1efc0
callq 0x2250
jmp 0x31e2
jmp 0x31e4
leaq 0x4ce05(%rip), %rdi     # 0x4fff0
leaq 0x270(%rsp), %rsi
callq 0x4530
movq %rax, 0x108(%rsp)
jmp 0x3202
movq 0x108(%rsp), %rax
cmpq $0x0, %rax
jne 0x3264
movq 0x1bdc1(%rip), %rdi     # 0x1efd8
leaq 0x12ecd(%rip), %rsi     # 0x160eb
callq 0x2200
movq %rax, 0x100(%rsp)
jmp 0x322d
movq 0x100(%rsp), %rdi
leaq 0x270(%rsp), %rsi
callq 0x21d0
movq %rax, 0xf8(%rsp)
jmp 0x324c
movq 0xf8(%rsp), %rdi
movq 0x1bd65(%rip), %rsi     # 0x1efc0
callq 0x2250
jmp 0x3262
jmp 0x3264
leaq 0x4cdb5(%rip), %rdi     # 0x50020
leaq 0x2c0(%rsp), %rsi
callq 0x4350
movq %rax, 0xf0(%rsp)
jmp 0x3282
movq 0xf0(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x268(%rsp)
leaq 0x4cd86(%rip), %rdi     # 0x50020
leaq 0x298(%rsp), %rsi
callq 0x4350
movq %rax, 0xe8(%rsp)
jmp 0x32b1
movq 0xe8(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x264(%rsp)
leaq 0x4cd27(%rip), %rdi     # 0x4fff0
leaq 0x270(%rsp), %rsi
callq 0x4350
movq %rax, 0xe0(%rsp)
jmp 0x32e0
movq 0xe0(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x260(%rsp)
movq 0x2e0(%rsp), %rdi
leaq 0x12da2(%rip), %rsi     # 0x160a2
xorl %eax, %eax
leaq 0x25c(%rsp), %rdx
callq 0x23e0
jmp 0x3311
leaq 0x4cdc8(%rip), %rdi     # 0x500e0
leaq 0x25c(%rsp), %rsi
callq 0x4590
movq %rax, 0xd8(%rsp)
jmp 0x332f
movq 0xd8(%rsp), %rdi
leaq 0x268(%rsp), %rsi
callq 0x4680
movq %rax, 0xd0(%rsp)
jmp 0x334e
movq 0xd0(%rsp), %rax
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
leaq 0x4cdad(%rip), %rdi     # 0x50110
leaq 0x25c(%rsp), %rsi
callq 0x4590
movq %rax, 0xc8(%rsp)
jmp 0x337a
movq 0xc8(%rsp), %rdi
leaq 0x264(%rsp), %rsi
callq 0x4680
movq %rax, 0xc0(%rsp)
jmp 0x3399
movq 0xc0(%rsp), %rax
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
leaq 0x4cc12(%rip), %rdi     # 0x4ffc0
leaq 0x25c(%rsp), %rsi
callq 0x4770
movq %rax, 0xb8(%rsp)
jmp 0x33c5
movq 0xb8(%rsp), %rax
cmpq $0x0, %rax
jne 0x3423
movl 0x4cbd7(%rip), %eax     # 0x4ffb0
incl %eax
movl %eax, 0x4cbcf(%rip)     # 0x4ffb0
movl 0x260(%rsp), %eax
movl %eax, 0xac(%rsp)
leaq 0x4cbca(%rip), %rdi     # 0x4ffc0
leaq 0x25c(%rsp), %rsi
callq 0x4680
movq %rax, 0xb0(%rsp)
jmp 0x340d
movq 0xb0(%rsp), %rax
movl 0xac(%rsp), %ecx
movl %ecx, (%rax)
jmp 0x354f
leaq 0x4cb96(%rip), %rdi     # 0x4ffc0
leaq 0x25c(%rsp), %rsi
callq 0x4680
movq %rax, 0xa0(%rsp)
jmp 0x3441
movq 0xa0(%rsp), %rax
movl (%rax), %eax
cmpl 0x260(%rsp), %eax
je 0x354d
movq 0x1bb79(%rip), %rdi     # 0x1efd8
leaq 0x12c8f(%rip), %rsi     # 0x160f5
callq 0x2200
movq %rax, 0x98(%rsp)
jmp 0x3475
movq 0x98(%rsp), %rdi
movl 0x268(%rsp), %esi
callq 0x2390
movq %rax, 0x90(%rsp)
jmp 0x3493
movq 0x90(%rsp), %rdi
leaq 0x12cd7(%rip), %rsi     # 0x16179
callq 0x2200
movq %rax, 0x88(%rsp)
jmp 0x34b1
movq 0x88(%rsp), %rdi
movl 0x264(%rsp), %esi
callq 0x2390
movq %rax, 0x80(%rsp)
jmp 0x34cf
movq 0x80(%rsp), %rdi
leaq 0x12c9b(%rip), %rsi     # 0x16179
callq 0x2200
movq %rax, 0x78(%rsp)
jmp 0x34ea
movq 0x78(%rsp), %rdi
movl 0x25c(%rsp), %esi
callq 0x2390
movq %rax, 0x70(%rsp)
jmp 0x3502
movq 0x70(%rsp), %rdi
movl $0x20, %esi
callq 0x22a0
movq %rax, 0x68(%rsp)
jmp 0x3518
movq 0x68(%rsp), %rdi
movl 0x260(%rsp), %esi
callq 0x2390
movq %rax, 0x60(%rsp)
jmp 0x3530
movq 0x60(%rsp), %rdi
movq 0x1ba84(%rip), %rsi     # 0x1efc0
callq 0x2250
jmp 0x3543
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x22c0
jmp 0x354f
leaq 0x4ca6a(%rip), %rdi     # 0x4ffc0
leaq 0x25c(%rsp), %rsi
callq 0x4680
movq %rax, 0x58(%rsp)
jmp 0x356a
movq 0x58(%rsp), %rsi
leaq 0x4cc2a(%rip), %rdi     # 0x501a0
callq 0x4590
movq %rax, 0x50(%rsp)
jmp 0x3582
movq 0x50(%rsp), %rdi
leaq 0x268(%rsp), %rsi
callq 0x4680
movq %rax, 0x48(%rsp)
jmp 0x359b
movq 0x48(%rsp), %rax
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
leaq 0x4ca13(%rip), %rdi     # 0x4ffc0
leaq 0x25c(%rsp), %rsi
callq 0x4680
movq %rax, 0x40(%rsp)
jmp 0x35c1
movq 0x40(%rsp), %rsi
leaq 0x4cc03(%rip), %rdi     # 0x501d0
callq 0x4590
movq %rax, 0x38(%rsp)
jmp 0x35d9
movq 0x38(%rsp), %rdi
leaq 0x264(%rsp), %rsi
callq 0x4680
movq %rax, 0x30(%rsp)
jmp 0x35f2
movq 0x30(%rsp), %rax
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
movl 0x268(%rsp), %esi
movl 0x264(%rsp), %edx
movl 0x25c(%rsp), %ecx
leaq 0x4cc47(%rip), %rdi     # 0x50260
callq 0x47d0
jmp 0x3620
leaq 0x270(%rsp), %rdi
callq 0x2428
leaq 0x298(%rsp), %rdi
callq 0x2428
leaq 0x2c0(%rsp), %rdi
callq 0x2428
jmp 0x2eef
leaq 0x298(%rsp), %rdi
callq 0x2428
leaq 0x2c0(%rsp), %rdi
callq 0x2428
jmp 0x3cb0
movq 0x2e0(%rsp), %rdi
callq 0x2210
movq 0x2e8(%rsp), %rdi
callq 0x2210
movl $0x0, 0x258(%rsp)
movl 0x258(%rsp), %eax
cmpl 0x4c913(%rip), %eax     # 0x4ffb0
jge 0x37c4
xorps %xmm0, %xmm0
movsd %xmm0, 0x250(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x248(%rsp)
leaq 0x4ca1e(%rip), %rdi     # 0x500e0
leaq 0x258(%rsp), %rsi
callq 0x4590
movq %rax, %rdi
callq 0x48c0
movq %rax, 0x240(%rsp)
leaq 0x4c9fa(%rip), %rdi     # 0x500e0
leaq 0x258(%rsp), %rsi
callq 0x4590
movq %rax, %rdi
callq 0x4910
movq %rax, 0x238(%rsp)
leaq 0x240(%rsp), %rdi
leaq 0x238(%rsp), %rsi
callq 0x48f0
testb $0x1, %al
jne 0x371e
jmp 0x3778
movsd 0x128fa(%rip), %xmm0    # 0x16020
addsd 0x250(%rsp), %xmm0
movsd %xmm0, 0x250(%rsp)
leaq 0x240(%rsp), %rdi
callq 0x4940
cvtsi2sdl 0x4(%rax), %xmm0
addsd 0x248(%rsp), %xmm0
movsd %xmm0, 0x248(%rsp)
leaq 0x240(%rsp), %rdi
xorl %esi, %esi
callq 0x4960
movq %rax, 0x230(%rsp)
jmp 0x36df
movsd 0x248(%rsp), %xmm0
divsd 0x250(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
leaq 0x4c9a9(%rip), %rdi     # 0x50140
leaq 0x258(%rsp), %rsi
callq 0x49a0
movsd 0x28(%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0x258(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x258(%rsp)
jmp 0x3690
movl $0x0, 0x22c(%rsp)
movl 0x22c(%rsp), %eax
cmpl 0x4c7d4(%rip), %eax     # 0x4ffb0
jge 0x3903
xorps %xmm0, %xmm0
movsd %xmm0, 0x220(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x218(%rsp)
leaq 0x4c90f(%rip), %rdi     # 0x50110
leaq 0x22c(%rsp), %rsi
callq 0x4590
movq %rax, %rdi
callq 0x48c0
movq %rax, 0x210(%rsp)
leaq 0x4c8eb(%rip), %rdi     # 0x50110
leaq 0x22c(%rsp), %rsi
callq 0x4590
movq %rax, %rdi
callq 0x4910
movq %rax, 0x208(%rsp)
leaq 0x210(%rsp), %rdi
leaq 0x208(%rsp), %rsi
callq 0x48f0
testb $0x1, %al
jne 0x385d
jmp 0x38b7
movsd 0x127bb(%rip), %xmm0    # 0x16020
addsd 0x220(%rsp), %xmm0
movsd %xmm0, 0x220(%rsp)
leaq 0x210(%rsp), %rdi
callq 0x4940
cvtsi2sdl 0x4(%rax), %xmm0
addsd 0x218(%rsp), %xmm0
movsd %xmm0, 0x218(%rsp)
leaq 0x210(%rsp), %rdi
xorl %esi, %esi
callq 0x4960
movq %rax, 0x200(%rsp)
jmp 0x381e
movsd 0x218(%rsp), %xmm0
divsd 0x220(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
leaq 0x4c89a(%rip), %rdi     # 0x50170
leaq 0x22c(%rsp), %rsi
callq 0x49a0
movsd 0x20(%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0x22c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x22c(%rsp)
jmp 0x37cf
movl $0x0, 0x1fc(%rsp)
movl 0x1fc(%rsp), %eax
cmpl 0x4c69d(%rip), %eax     # 0x4ffb8
jge 0x3a42
xorps %xmm0, %xmm0
movsd %xmm0, 0x1f0(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x1e8(%rsp)
leaq 0x4c860(%rip), %rdi     # 0x501a0
leaq 0x1fc(%rsp), %rsi
callq 0x4590
movq %rax, %rdi
callq 0x48c0
movq %rax, 0x1e0(%rsp)
leaq 0x4c83c(%rip), %rdi     # 0x501a0
leaq 0x1fc(%rsp), %rsi
callq 0x4590
movq %rax, %rdi
callq 0x4910
movq %rax, 0x1d8(%rsp)
leaq 0x1e0(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
callq 0x48f0
testb $0x1, %al
jne 0x399c
jmp 0x39f6
movsd 0x1267c(%rip), %xmm0    # 0x16020
addsd 0x1f0(%rsp), %xmm0
movsd %xmm0, 0x1f0(%rsp)
leaq 0x1e0(%rsp), %rdi
callq 0x4940
cvtsi2sdl 0x4(%rax), %xmm0
addsd 0x1e8(%rsp), %xmm0
movsd %xmm0, 0x1e8(%rsp)
leaq 0x1e0(%rsp), %rdi
xorl %esi, %esi
callq 0x4960
movq %rax, 0x1d0(%rsp)
jmp 0x395d
movsd 0x1e8(%rsp), %xmm0
divsd 0x1f0(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x4c7eb(%rip), %rdi     # 0x50200
leaq 0x1fc(%rsp), %rsi
callq 0x49a0
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0x1fc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1fc(%rsp)
jmp 0x390e
movl $0x0, 0x1cc(%rsp)
movl 0x1cc(%rsp), %eax
cmpl 0x4c55e(%rip), %eax     # 0x4ffb8
jge 0x3b81
xorps %xmm0, %xmm0
movsd %xmm0, 0x1c0(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x1b8(%rsp)
leaq 0x4c751(%rip), %rdi     # 0x501d0
leaq 0x1cc(%rsp), %rsi
callq 0x4590
movq %rax, %rdi
callq 0x48c0
movq %rax, 0x1b0(%rsp)
leaq 0x4c72d(%rip), %rdi     # 0x501d0
leaq 0x1cc(%rsp), %rsi
callq 0x4590
movq %rax, %rdi
callq 0x4910
movq %rax, 0x1a8(%rsp)
leaq 0x1b0(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0x48f0
testb $0x1, %al
jne 0x3adb
jmp 0x3b35
movsd 0x1253d(%rip), %xmm0    # 0x16020
addsd 0x1c0(%rsp), %xmm0
movsd %xmm0, 0x1c0(%rsp)
leaq 0x1b0(%rsp), %rdi
callq 0x4940
cvtsi2sdl 0x4(%rax), %xmm0
addsd 0x1b8(%rsp), %xmm0
movsd %xmm0, 0x1b8(%rsp)
leaq 0x1b0(%rsp), %rdi
xorl %esi, %esi
callq 0x4960
movq %rax, 0x1a0(%rsp)
jmp 0x3a9c
movsd 0x1b8(%rsp), %xmm0
divsd 0x1c0(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0x4c6dc(%rip), %rdi     # 0x50230
leaq 0x1cc(%rsp), %rsi
callq 0x49a0
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0x1cc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1cc(%rsp)
jmp 0x3a4d
movl $0x0, 0x19c(%rsp)
movl 0x19c(%rsp), %eax
cmpl 0x4c41f(%rip), %eax     # 0x4ffb8
jge 0x3c18
leaq 0x4c65e(%rip), %rdi     # 0x50200
leaq 0x19c(%rsp), %rsi
callq 0x49a0
movsd (%rax), %xmm0
movq 0x1b41e(%rip), %rdi     # 0x1efd8
callq 0x23f0
movq %rax, %rdi
movl $0x20, %esi
callq 0x22a0
movq %rax, 0x8(%rsp)
leaq 0x4c658(%rip), %rdi     # 0x50230
leaq 0x19c(%rsp), %rsi
callq 0x49a0
movq 0x8(%rsp), %rdi
movsd (%rax), %xmm0
callq 0x23f0
movq %rax, %rdi
movq 0x1b3c3(%rip), %rsi     # 0x1efc0
callq 0x2250
movl 0x19c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x19c(%rsp)
jmp 0x3b8c
movq 0x1b3b9(%rip), %rdi     # 0x1efd8
leaq 0x124d8(%rip), %rsi     # 0x160fe
callq 0x2200
movq %rax, %rdi
movl 0x4c384(%rip), %esi     # 0x4ffb8
callq 0x2390
movq %rax, %rdi
movq 0x1b37d(%rip), %rsi     # 0x1efc0
callq 0x2250
movq 0x1b389(%rip), %rdi     # 0x1efd8
leaq 0x124ab(%rip), %rsi     # 0x16101
callq 0x2200
movq %rax, %rdi
movl 0x4c34c(%rip), %esi     # 0x4ffb0
callq 0x2390
movq %rax, %rdi
movq 0x1b34d(%rip), %rsi     # 0x1efc0
callq 0x2250
movq 0x1b359(%rip), %rdi     # 0x1efd8
leaq 0x12489(%rip), %rsi     # 0x1610f
callq 0x2200
movq %rax, %rdi
movl 0x4c320(%rip), %esi     # 0x4ffb4
callq 0x2390
movq %rax, %rdi
movq 0x1b31d(%rip), %rsi     # 0x1efc0
callq 0x2250
addq $0x368, %rsp            # imm = 0x368
retq
movq 0x320(%rsp), %rdi
callq 0x23a0
nopl (%rax)