// File: thunlp[P]KB2E/TransR/Train_TransR.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;
		relation_num++;
	}
    FILE* f_kb = fopen("../data/train.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)
        {
            relation2id[s3] = relation_num;
            relation_num++;
        }
        entity2num[entity2id[s1]]++;
        entity2num[entity2id[s2]]++;
        left_entity[relation2id[s3]][entity2id[s1]].push_back(entity2id[s2]);
        right_entity[relation2id[s3]][entity2id[s2]].push_back(entity2id[s1]);
        train.add(entity2id[s1],entity2id[s2],relation2id[s3]);
    }
    for (int i=0; i<relation_num; i++)
    {
    	double sum1=0,sum2=0,sum3 = 0;
    	for (map<int,vector<int> >::iterator it = left_entity[i].begin(); it!=left_entity[i].end(); it++)
    	{
    		sum1++;
    		sum2+=it->second.size();
    		sum3+=sqr(it->second.size());
    	}
    	left_mean[i]=sum2/sum1;

    	left_var[i]=sum3/sum1-sqr(left_mean[i]);
    }
    for (int i=0; i<relation_num; i++)
    {
    	double sum1=0,sum2=0,sum3=0;
    	for (map<int,vector<int> >::iterator it = right_entity[i].begin(); it!=right_entity[i].end(); it++)
    	{
    		sum1++;
    		sum2+=it->second.size();
    		sum3+=sqr(it->second.size());
    	}
    	right_mean[i]=sum2/sum1;
    	right_var[i]=sum3/sum1-sqr(right_mean[i]);
    }

    fclose(f_kb);
    cout<<"relation_num="<<relation_num<<endl;
    cout<<"entity_num="<<entity_num<<endl;
}

// Assembly:
subq $0x318, %rsp            # imm = 0x318
leaq 0x13532(%rip), %rdi     # 0x16080
leaq 0x13541(%rip), %rsi     # 0x16096
callq 0x22b0
movq %rax, 0x310(%rsp)
leaq 0x1352f(%rip), %rdi     # 0x16098
leaq 0x13526(%rip), %rsi     # 0x16096
callq 0x22b0
movq %rax, 0x308(%rsp)
movq 0x310(%rsp), %rdi
leaq 0x13524(%rip), %rsi     # 0x160b0
leaq 0x1d6dd(%rip), %rdx     # 0x20270
leaq 0x304(%rsp), %rcx
movb $0x0, %al
callq 0x23e0
cmpl $0x2, %eax
jne 0x2cca
leaq 0x2df(%rsp), %rdi
movq %rdi, 0x1b0(%rsp)
callq 0x23b0
movq 0x1b0(%rsp), %rdx
leaq 0x1d6a1(%rip), %rsi     # 0x20270
leaq 0x2e0(%rsp), %rdi
callq 0x3ea0
jmp 0x2bde
leaq 0x2df(%rsp), %rdi
callq 0x2270
movl 0x304(%rsp), %eax
movl %eax, 0x1a4(%rsp)
leaq 0x4e3e8(%rip), %rdi     # 0x50fe8
leaq 0x2e0(%rsp), %rsi
callq 0x3f60
movq %rax, 0x1a8(%rsp)
jmp 0x2c17
movq 0x1a8(%rsp), %rax
movl 0x1a4(%rsp), %ecx
movl %ecx, (%rax)
leaq 0x4e3e9(%rip), %rdi     # 0x51018
leaq 0x304(%rsp), %rsi
callq 0x4050
movq %rax, 0x198(%rsp)
jmp 0x2c46
movq 0x198(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
callq 0x2040
jmp 0x2c5d
movl 0x4e351(%rip), %eax     # 0x50fb4
addl $0x1, %eax
movl %eax, 0x4e348(%rip)     # 0x50fb4
leaq 0x2e0(%rsp), %rdi
callq 0x2428
jmp 0x2b7d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2d0(%rsp)
movl %eax, 0x2cc(%rsp)
leaq 0x2df(%rsp), %rdi
callq 0x2270
jmp 0x3980
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2d0(%rsp)
movl %eax, 0x2cc(%rsp)
leaq 0x2e0(%rsp), %rdi
callq 0x2428
jmp 0x3980
jmp 0x2ccc
movq 0x308(%rsp), %rdi
leaq 0x133d5(%rip), %rsi     # 0x160b0
leaq 0x1d58e(%rip), %rdx     # 0x20270
leaq 0x304(%rsp), %rcx
movb $0x0, %al
callq 0x23e0
cmpl $0x2, %eax
jne 0x2e19
leaq 0x2a7(%rsp), %rdi
movq %rdi, 0x190(%rsp)
callq 0x23b0
movq 0x190(%rsp), %rdx
leaq 0x1d552(%rip), %rsi     # 0x20270
leaq 0x2a8(%rsp), %rdi
callq 0x3ea0
jmp 0x2d2d
leaq 0x2a7(%rsp), %rdi
callq 0x2270
movl 0x304(%rsp), %eax
movl %eax, 0x184(%rsp)
leaq 0x4e269(%rip), %rdi     # 0x50fb8
leaq 0x2a8(%rsp), %rsi
callq 0x3f60
movq %rax, 0x188(%rsp)
jmp 0x2d66
movq 0x188(%rsp), %rax
movl 0x184(%rsp), %ecx
movl %ecx, (%rax)
leaq 0x4e2ca(%rip), %rdi     # 0x51048
leaq 0x304(%rsp), %rsi
callq 0x4050
movq %rax, 0x178(%rsp)
jmp 0x2d95
movq 0x178(%rsp), %rdi
leaq 0x2a8(%rsp), %rsi
callq 0x2040
jmp 0x2dac
movl 0x4e1fe(%rip), %eax     # 0x50fb0
addl $0x1, %eax
movl %eax, 0x4e1f5(%rip)     # 0x50fb0
leaq 0x2a8(%rsp), %rdi
callq 0x2428
jmp 0x2ccc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2d0(%rsp)
movl %eax, 0x2cc(%rsp)
leaq 0x2a7(%rsp), %rdi
callq 0x2270
jmp 0x3980
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2d0(%rsp)
movl %eax, 0x2cc(%rsp)
leaq 0x2a8(%rsp), %rdi
callq 0x2428
jmp 0x3980
leaq 0x13295(%rip), %rdi     # 0x160b5
leaq 0x1326f(%rip), %rsi     # 0x16096
callq 0x22b0
movq %rax, 0x298(%rsp)
movq 0x298(%rsp), %rdi
leaq 0x13284(%rip), %rsi     # 0x160c7
leaq 0x1d426(%rip), %rdx     # 0x20270
movb $0x0, %al
callq 0x23e0
cmpl $0x1, %eax
jne 0x347d
leaq 0x277(%rsp), %rdi
movq %rdi, 0x170(%rsp)
callq 0x23b0
movq 0x170(%rsp), %rdx
leaq 0x1d3f2(%rip), %rsi     # 0x20270
leaq 0x278(%rsp), %rdi
callq 0x3ea0
jmp 0x2e8d
leaq 0x277(%rsp), %rdi
callq 0x2270
movq 0x298(%rsp), %rdi
leaq 0x1321e(%rip), %rsi     # 0x160c7
leaq 0x1d3c0(%rip), %rdx     # 0x20270
xorl %eax, %eax
callq 0x23e0
jmp 0x2eb9
leaq 0x24f(%rsp), %rdi
movq %rdi, 0x168(%rsp)
callq 0x23b0
movq 0x168(%rsp), %rdx
leaq 0x1d393(%rip), %rsi     # 0x20270
leaq 0x250(%rsp), %rdi
callq 0x3ea0
jmp 0x2eec
leaq 0x24f(%rsp), %rdi
callq 0x2270
movq 0x298(%rsp), %rdi
leaq 0x131bf(%rip), %rsi     # 0x160c7
leaq 0x1d361(%rip), %rdx     # 0x20270
xorl %eax, %eax
callq 0x23e0
jmp 0x2f18
leaq 0x227(%rsp), %rdi
movq %rdi, 0x160(%rsp)
callq 0x23b0
movq 0x160(%rsp), %rdx
leaq 0x1d334(%rip), %rsi     # 0x20270
leaq 0x228(%rsp), %rdi
callq 0x3ea0
jmp 0x2f4b
leaq 0x227(%rsp), %rdi
callq 0x2270
leaq 0x4e089(%rip), %rdi     # 0x50fe8
leaq 0x278(%rsp), %rsi
callq 0x4140
movq %rax, 0x158(%rsp)
jmp 0x2f76
movq 0x158(%rsp), %rax
cmpq $0x0, %rax
jne 0x30a9
movq 0x1d049(%rip), %rdi     # 0x1ffd8
leaq 0x13134(%rip), %rsi     # 0x160ca
callq 0x2200
movq %rax, 0x150(%rsp)
jmp 0x2fa5
movq 0x150(%rsp), %rdi
leaq 0x278(%rsp), %rsi
callq 0x21d0
movq %rax, 0x148(%rsp)
jmp 0x2fc4
movq 0x148(%rsp), %rdi
movq 0x1cfed(%rip), %rsi     # 0x1ffc0
callq 0x2250
jmp 0x2fda
jmp 0x30a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2d0(%rsp)
movl %eax, 0x2cc(%rsp)
leaq 0x277(%rsp), %rdi
callq 0x2270
jmp 0x3980
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2d0(%rsp)
movl %eax, 0x2cc(%rsp)
jmp 0x346b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2d0(%rsp)
movl %eax, 0x2cc(%rsp)
leaq 0x24f(%rsp), %rdi
callq 0x2270
jmp 0x346b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2d0(%rsp)
movl %eax, 0x2cc(%rsp)
jmp 0x345e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2d0(%rsp)
movl %eax, 0x2cc(%rsp)
leaq 0x227(%rsp), %rdi
callq 0x2270
jmp 0x345e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2d0(%rsp)
movl %eax, 0x2cc(%rsp)
leaq 0x228(%rsp), %rdi
callq 0x2428
jmp 0x345e
leaq 0x4df38(%rip), %rdi     # 0x50fe8
leaq 0x250(%rsp), %rsi
callq 0x4140
movq %rax, 0x140(%rsp)
jmp 0x30c7
movq 0x140(%rsp), %rax
cmpq $0x0, %rax
jne 0x3129
movq 0x1cefc(%rip), %rdi     # 0x1ffd8
leaq 0x12fe7(%rip), %rsi     # 0x160ca
callq 0x2200
movq %rax, 0x138(%rsp)
jmp 0x30f2
movq 0x138(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x21d0
movq %rax, 0x130(%rsp)
jmp 0x3111
movq 0x130(%rsp), %rdi
movq 0x1cea0(%rip), %rsi     # 0x1ffc0
callq 0x2250
jmp 0x3127
jmp 0x3129
leaq 0x4de88(%rip), %rdi     # 0x50fb8
leaq 0x228(%rsp), %rsi
callq 0x4140
movq %rax, 0x128(%rsp)
jmp 0x3147
movq 0x128(%rsp), %rax
cmpq $0x0, %rax
jne 0x31a0
movl 0x4de55(%rip), %eax     # 0x50fb0
movl %eax, 0x11c(%rsp)
leaq 0x4de4f(%rip), %rdi     # 0x50fb8
leaq 0x228(%rsp), %rsi
callq 0x3f60
movq %rax, 0x120(%rsp)
jmp 0x3180
movq 0x120(%rsp), %rax
movl 0x11c(%rsp), %ecx
movl %ecx, (%rax)
movl 0x4de19(%rip), %eax     # 0x50fb0
addl $0x1, %eax
movl %eax, 0x4de10(%rip)     # 0x50fb0
leaq 0x4de41(%rip), %rdi     # 0x50fe8
leaq 0x278(%rsp), %rsi
callq 0x3f60
movq %rax, 0x110(%rsp)
jmp 0x31be
movq 0x110(%rsp), %rsi
leaq 0x4deab(%rip), %rdi     # 0x51078
callq 0x41a0
movq %rax, 0x108(%rsp)
jmp 0x31dc
movq 0x108(%rsp), %rax
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
leaq 0x4ddf7(%rip), %rdi     # 0x50fe8
leaq 0x250(%rsp), %rsi
callq 0x3f60
movq %rax, 0x100(%rsp)
jmp 0x3208
movq 0x100(%rsp), %rsi
leaq 0x4de61(%rip), %rdi     # 0x51078
callq 0x41a0
movq %rax, 0xf8(%rsp)
jmp 0x3226
movq 0xf8(%rsp), %rax
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
leaq 0x4dd7d(%rip), %rdi     # 0x50fb8
leaq 0x228(%rsp), %rsi
callq 0x3f60
movq %rax, 0xf0(%rsp)
jmp 0x3252
movq 0xf0(%rsp), %rsi
leaq 0x4de47(%rip), %rdi     # 0x510a8
callq 0x4290
movq %rax, 0xe8(%rsp)
jmp 0x3270
leaq 0x4dd71(%rip), %rdi     # 0x50fe8
leaq 0x278(%rsp), %rsi
callq 0x3f60
movq %rax, 0xe0(%rsp)
jmp 0x328e
movq 0xe0(%rsp), %rsi
movq 0xe8(%rsp), %rdi
callq 0x4380
movq %rax, 0xd8(%rsp)
jmp 0x32ad
leaq 0x4dd34(%rip), %rdi     # 0x50fe8
leaq 0x250(%rsp), %rsi
callq 0x3f60
movq %rax, 0xd0(%rsp)
jmp 0x32cb
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rdi
callq 0x4470
jmp 0x32e2
leaq 0x4dccf(%rip), %rdi     # 0x50fb8
leaq 0x228(%rsp), %rsi
callq 0x3f60
movq %rax, 0xc8(%rsp)
jmp 0x3300
movq 0xc8(%rsp), %rsi
leaq 0x4ddc9(%rip), %rdi     # 0x510d8
callq 0x4290
movq %rax, 0xc0(%rsp)
jmp 0x331e
leaq 0x4dcc3(%rip), %rdi     # 0x50fe8
leaq 0x250(%rsp), %rsi
callq 0x3f60
movq %rax, 0xb8(%rsp)
jmp 0x333c
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdi
callq 0x4380
movq %rax, 0xb0(%rsp)
jmp 0x335b
leaq 0x4dc86(%rip), %rdi     # 0x50fe8
leaq 0x278(%rsp), %rsi
callq 0x3f60
movq %rax, 0xa8(%rsp)
jmp 0x3379
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdi
callq 0x4470
jmp 0x3390
leaq 0x4dc51(%rip), %rdi     # 0x50fe8
leaq 0x278(%rsp), %rsi
callq 0x3f60
movq %rax, 0xa0(%rsp)
jmp 0x33ae
movq 0xa0(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x94(%rsp)
leaq 0x4dc22(%rip), %rdi     # 0x50fe8
leaq 0x250(%rsp), %rsi
callq 0x3f60
movq %rax, 0x98(%rsp)
jmp 0x33dd
movq 0x98(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x84(%rsp)
leaq 0x4dbc3(%rip), %rdi     # 0x50fb8
leaq 0x228(%rsp), %rsi
callq 0x3f60
movq %rax, 0x88(%rsp)
jmp 0x340c
movl 0x84(%rsp), %edx
movl 0x94(%rsp), %esi
movq 0x88(%rsp), %rax
movl (%rax), %ecx
leaq 0x4dd9d(%rip), %rdi     # 0x511c8
callq 0x44e0
jmp 0x3432
leaq 0x228(%rsp), %rdi
callq 0x2428
leaq 0x250(%rsp), %rdi
callq 0x2428
leaq 0x278(%rsp), %rdi
callq 0x2428
jmp 0x2e34
leaq 0x250(%rsp), %rdi
callq 0x2428
leaq 0x278(%rsp), %rdi
callq 0x2428
jmp 0x3980
movl $0x0, 0x220(%rsp)
movl 0x220(%rsp), %eax
cmpl 0x4db1b(%rip), %eax     # 0x50fb0
jge 0x36c5
xorps %xmm0, %xmm0
movsd %xmm0, 0x218(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x210(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x208(%rsp)
leaq 0x4dbe2(%rip), %rdi     # 0x510a8
leaq 0x220(%rsp), %rsi
callq 0x4290
movq %rax, %rdi
callq 0x4570
movq %rax, 0x200(%rsp)
leaq 0x4dbbe(%rip), %rdi     # 0x510a8
leaq 0x220(%rsp), %rsi
callq 0x4290
movq %rax, %rdi
callq 0x45c0
movq %rax, 0x1f8(%rsp)
leaq 0x200(%rsp), %rdi
leaq 0x1f8(%rsp), %rsi
callq 0x45a0
testb $0x1, %al
jne 0x3525
jmp 0x3613
movsd 0x218(%rsp), %xmm0
movsd 0x12aea(%rip), %xmm1    # 0x16020
addsd %xmm1, %xmm0
movsd %xmm0, 0x218(%rsp)
leaq 0x200(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x45f0
movq %rax, %rdi
addq $0x8, %rdi
callq 0x4610
movq 0x58(%rsp), %rdi
movq %rax, %xmm1
movaps 0x12ade(%rip), %xmm0    # 0x16050
movaps %xmm0, 0x60(%rsp)
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x12add(%rip), %xmm0    # 0x16060
movaps %xmm0, 0x70(%rsp)
subpd %xmm0, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movsd 0x210(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x210(%rsp)
callq 0x45f0
movq %rax, %rdi
addq $0x8, %rdi
callq 0x4610
movaps 0x60(%rsp), %xmm2
movaps 0x70(%rsp), %xmm1
movq %rax, %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
callq 0x29e0
addsd 0x208(%rsp), %xmm0
movsd %xmm0, 0x208(%rsp)
leaq 0x200(%rsp), %rdi
xorl %esi, %esi
callq 0x4630
movq %rax, 0x1f0(%rsp)
jmp 0x34e3
movsd 0x210(%rsp), %xmm0
divsd 0x218(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
leaq 0x4dad6(%rip), %rdi     # 0x51108
leaq 0x220(%rsp), %rsi
callq 0x4670
movsd 0x40(%rsp), %xmm0
movsd %xmm0, (%rax)
movsd 0x208(%rsp), %xmm0
divsd 0x218(%rsp), %xmm0
movsd %xmm0, 0x48(%rsp)
leaq 0x4daa0(%rip), %rdi     # 0x51108
leaq 0x220(%rsp), %rsi
callq 0x4670
movsd (%rax), %xmm0
callq 0x29e0
movaps %xmm0, %xmm1
movsd 0x48(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x50(%rsp)
leaq 0x4dad0(%rip), %rdi     # 0x51168
leaq 0x220(%rsp), %rsi
callq 0x4670
movsd 0x50(%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0x220(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x220(%rsp)
jmp 0x3488
movl $0x0, 0x1ec(%rsp)
movl 0x1ec(%rsp), %eax
cmpl 0x4d8d3(%rip), %eax     # 0x50fb0
jge 0x390b
xorps %xmm0, %xmm0
movsd %xmm0, 0x1e0(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x1d8(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x1d0(%rsp)
leaq 0x4d9ca(%rip), %rdi     # 0x510d8
leaq 0x1ec(%rsp), %rsi
callq 0x4290
movq %rax, %rdi
callq 0x4570
movq %rax, 0x1c8(%rsp)
leaq 0x4d9a6(%rip), %rdi     # 0x510d8
leaq 0x1ec(%rsp), %rsi
callq 0x4290
movq %rax, %rdi
callq 0x45c0
movq %rax, 0x1c0(%rsp)
leaq 0x1c8(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
callq 0x45a0
testb $0x1, %al
jne 0x376d
jmp 0x385b
movsd 0x1e0(%rsp), %xmm0
movsd 0x128a2(%rip), %xmm1    # 0x16020
addsd %xmm1, %xmm0
movsd %xmm0, 0x1e0(%rsp)
leaq 0x1c8(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x45f0
movq %rax, %rdi
addq $0x8, %rdi
callq 0x4610
movq 0x18(%rsp), %rdi
movq %rax, %xmm1
movaps 0x12896(%rip), %xmm0    # 0x16050
movaps %xmm0, 0x20(%rsp)
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x12895(%rip), %xmm0    # 0x16060
movaps %xmm0, 0x30(%rsp)
subpd %xmm0, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movsd 0x1d8(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x1d8(%rsp)
callq 0x45f0
movq %rax, %rdi
addq $0x8, %rdi
callq 0x4610
movaps 0x20(%rsp), %xmm2
movaps 0x30(%rsp), %xmm1
movq %rax, %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
callq 0x29e0
addsd 0x1d0(%rsp), %xmm0
movsd %xmm0, 0x1d0(%rsp)
leaq 0x1c8(%rsp), %rdi
xorl %esi, %esi
callq 0x4630
movq %rax, 0x1b8(%rsp)
jmp 0x372b
movsd 0x1d8(%rsp), %xmm0
divsd 0x1e0(%rsp), %xmm0
movsd %xmm0, (%rsp)
leaq 0x4d8bf(%rip), %rdi     # 0x51138
leaq 0x1ec(%rsp), %rsi
callq 0x4670
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movsd 0x1d0(%rsp), %xmm0
divsd 0x1e0(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x4d88a(%rip), %rdi     # 0x51138
leaq 0x1ec(%rsp), %rsi
callq 0x4670
movsd (%rax), %xmm0
callq 0x29e0
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0x4d8ba(%rip), %rdi     # 0x51198
leaq 0x1ec(%rsp), %rsi
callq 0x4670
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0x1ec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1ec(%rsp)
jmp 0x36d0
movq 0x298(%rsp), %rdi
callq 0x2210
movq 0x1c6b9(%rip), %rdi     # 0x1ffd8
leaq 0x127b1(%rip), %rsi     # 0x160d7
callq 0x2200
movq %rax, %rdi
movl 0x4d67c(%rip), %esi     # 0x50fb0
callq 0x2390
movq %rax, %rdi
movq 0x1c67d(%rip), %rsi     # 0x1ffc0
callq 0x2250
movq 0x1c689(%rip), %rdi     # 0x1ffd8
leaq 0x1278f(%rip), %rsi     # 0x160e5
callq 0x2200
movq %rax, %rdi
movl 0x4d650(%rip), %esi     # 0x50fb4
callq 0x2390
movq %rax, %rdi
movq 0x1c64d(%rip), %rsi     # 0x1ffc0
callq 0x2250
addq $0x318, %rsp            # imm = 0x318
retq
movq 0x2d0(%rsp), %rdi
callq 0x23a0
nopl (%rax)