// File: thunlp[P]KB2E/cluster/generate.cpp
// Function: main
int main(int argc, char** argv)
{
    int rel_now=-1;
    if (argc ==2)
        rel_now =  atoi(argv[1]);
    else
        return 0;
    cout<<rel_now<<endl;


    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");
    vector<int> train_e1,train_e2,train_rel,train_index;
    int index=-1;
	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;
        int e1 = entity2id[s1];
        int e2 = entity2id[s2];
        int rel = relation2id[s3];
        index+=1;
        if (rel!=rel_now)
            continue;
        train_index.push_back(index);
        train_e1.push_back(e1);
        train_e2.push_back(e2);
        train_rel.push_back(rel);
    }
    FILE* f_ent_vec = fopen("../TransE/entity2vec.txt","r");

   // FILE* f_ent_vec = fopen("../data/entity_vec_word2vec.txt","r");
    int vec_size=50;
    entity_vec.resize(entity_num);
    for (int i=0; i<entity_num;i++)
    {
        entity_vec[i].resize(vec_size);
        for (int ii=0; ii<vec_size; ii++)
        {
            fscanf(f_ent_vec,"%lf",&entity_vec[i][ii]);
        }
    }
    double sum = 0;
    int n=train_e1.size();
    FILE* g_sim = fopen("similarity.txt","w");
    for (int i=0; i<n; i++)
        for (int j=0; j<n; j++)
        if (i!=j)
        {
            double tmp=0;
            for (int ii=0; ii<vec_size; ii++)
                tmp-=sqr(entity_vec[train_e1[i]][ii]-entity_vec[train_e2[i]][ii]-
                          entity_vec[train_e1[j]][ii]+entity_vec[train_e2[j]][ii]);
            a.push_back(tmp);
            if (tmp>1e6)
            {
                vec_output(entity_vec[train_e1[i]]);
                vec_output(entity_vec[train_e2[i]]);
                vec_output(entity_vec[train_e1[j]]);
                vec_output(entity_vec[train_e2[j]]);
                exit(0);
            }
            fprintf(g_sim,"%d\t%d\t%lf\n",i+1,j+1,tmp);
        }
    fclose(g_sim);
    if (n>1)
    {
        sort(a.begin(),a.end());
        cout<<a[0]<<' '<<a[a.size()-1]<<' '<<a[0]-(a[a.size()-1]-a[0])<<endl;
        sum = a[0]-10*(a[a.size()-1]-a[0]);
    }
    FILE* g_pre = fopen("pre.txt","w");
    for (int i=0; i<n; i++)
        fprintf(g_pre,"%lf\n",sum);
    fclose(g_pre);
    FILE* g_env = fopen(("data/id2index"+string(argv[1])+".txt").c_str(),"w");
    for (int i=0; i<n; i++)
    {
        fprintf(g_env,"%d\n",train_index[i]);
    }
    fclose(g_env);
    return 0;
}

// Assembly:
subq $0x398, %rsp            # imm = 0x398
movl $0x0, 0x394(%rsp)
movl %edi, 0x390(%rsp)
movq %rsi, 0x388(%rsp)
movl $0xffffffff, 0x384(%rsp) # imm = 0xFFFFFFFF
cmpl $0x2, 0x390(%rsp)
jne 0x26d0
movq 0x388(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x22a0
movl %eax, 0x384(%rsp)
jmp 0x26e0
movl $0x0, 0x394(%rsp)
jmp 0x3740
movl 0x384(%rsp), %esi
movq 0xd8ea(%rip), %rdi      # 0xffd8
callq 0x22d0
movq %rax, %rdi
movq 0xd8cb(%rip), %rsi      # 0xffc8
callq 0x21d0
leaq 0x890f(%rip), %rdi      # 0xb018
leaq 0x891e(%rip), %rsi      # 0xb02e
callq 0x2230
movq %rax, 0x378(%rsp)
leaq 0x890c(%rip), %rdi      # 0xb030
leaq 0x8903(%rip), %rsi      # 0xb02e
callq 0x2230
movq %rax, 0x370(%rsp)
movq 0x378(%rsp), %rdi
leaq 0x8901(%rip), %rsi      # 0xb048
leaq 0xdb52(%rip), %rdx      # 0x102a0
leaq 0x36c(%rsp), %rcx
movb $0x0, %al
callq 0x2310
cmpl $0x2, %eax
jne 0x2885
leaq 0x347(%rsp), %rdi
movq %rdi, 0x130(%rsp)
callq 0x22f0
movq 0x130(%rsp), %rdx
leaq 0xdb16(%rip), %rsi      # 0x102a0
leaq 0x348(%rsp), %rdi
callq 0x38c0
jmp 0x2799
leaq 0x347(%rsp), %rdi
callq 0x21f0
movl 0x36c(%rsp), %eax
movl %eax, 0x124(%rsp)
leaq 0xda4d(%rip), %rdi      # 0x10208
leaq 0x348(%rsp), %rsi
callq 0x3980
movq %rax, 0x128(%rsp)
jmp 0x27d2
movq 0x128(%rsp), %rax
movl 0x124(%rsp), %ecx
movl %ecx, (%rax)
leaq 0xda4e(%rip), %rdi      # 0x10238
leaq 0x36c(%rsp), %rsi
callq 0x3a70
movq %rax, 0x118(%rsp)
jmp 0x2801
movq 0x118(%rsp), %rdi
leaq 0x348(%rsp), %rsi
callq 0x2040
jmp 0x2818
movl 0xda7a(%rip), %eax      # 0x10298
addl $0x1, %eax
movl %eax, 0xda71(%rip)      # 0x10298
leaq 0x348(%rsp), %rdi
callq 0x2110
jmp 0x2738
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x338(%rsp)
movl %eax, 0x334(%rsp)
leaq 0x347(%rsp), %rdi
callq 0x21f0
jmp 0x374f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x338(%rsp)
movl %eax, 0x334(%rsp)
leaq 0x348(%rsp), %rdi
callq 0x2110
jmp 0x374f
jmp 0x2887
movq 0x370(%rsp), %rdi
leaq 0x87b2(%rip), %rsi      # 0xb048
leaq 0xda03(%rip), %rdx      # 0x102a0
leaq 0x36c(%rsp), %rcx
movb $0x0, %al
callq 0x2310
cmpl $0x2, %eax
jne 0x29d4
leaq 0x30f(%rsp), %rdi
movq %rdi, 0x110(%rsp)
callq 0x22f0
movq 0x110(%rsp), %rdx
leaq 0xd9c7(%rip), %rsi      # 0x102a0
leaq 0x310(%rsp), %rdi
callq 0x38c0
jmp 0x28e8
leaq 0x30f(%rsp), %rdi
callq 0x21f0
movl 0x36c(%rsp), %eax
movl %eax, 0x104(%rsp)
leaq 0xd8ce(%rip), %rdi      # 0x101d8
leaq 0x310(%rsp), %rsi
callq 0x3980
movq %rax, 0x108(%rsp)
jmp 0x2921
movq 0x108(%rsp), %rax
movl 0x104(%rsp), %ecx
movl %ecx, (%rax)
leaq 0xd92f(%rip), %rdi      # 0x10268
leaq 0x36c(%rsp), %rsi
callq 0x3a70
movq %rax, 0xf8(%rsp)
jmp 0x2950
movq 0xf8(%rsp), %rdi
leaq 0x310(%rsp), %rsi
callq 0x2040
jmp 0x2967
movl 0xd92f(%rip), %eax      # 0x1029c
addl $0x1, %eax
movl %eax, 0xd926(%rip)      # 0x1029c
leaq 0x310(%rsp), %rdi
callq 0x2110
jmp 0x2887
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x338(%rsp)
movl %eax, 0x334(%rsp)
leaq 0x30f(%rsp), %rdi
callq 0x21f0
jmp 0x374f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x338(%rsp)
movl %eax, 0x334(%rsp)
leaq 0x310(%rsp), %rdi
callq 0x2110
jmp 0x374f
leaq 0x8672(%rip), %rdi      # 0xb04d
leaq 0x864c(%rip), %rsi      # 0xb02e
callq 0x2230
movq %rax, 0x300(%rsp)
leaq 0x2e8(%rsp), %rdi
callq 0x3b60
leaq 0x2d0(%rsp), %rdi
callq 0x3b60
leaq 0x2b8(%rsp), %rdi
callq 0x3b60
leaq 0x2a0(%rsp), %rdi
callq 0x3b60
movl $0xffffffff, 0x29c(%rsp) # imm = 0xFFFFFFFF
movq 0x300(%rsp), %rdi
leaq 0x8622(%rip), %rsi      # 0xb05f
leaq 0xd85c(%rip), %rdx      # 0x102a0
xorl %eax, %eax
callq 0x2310
movl %eax, 0xf4(%rsp)
jmp 0x2a54
movl 0xf4(%rsp), %eax
cmpl $0x1, %eax
jne 0x2dcb
leaq 0x277(%rsp), %rdi
movq %rdi, 0xe8(%rsp)
callq 0x22f0
movq 0xe8(%rsp), %rdx
leaq 0xd818(%rip), %rsi      # 0x102a0
leaq 0x278(%rsp), %rdi
callq 0x38c0
jmp 0x2a97
leaq 0x277(%rsp), %rdi
callq 0x21f0
movq 0x300(%rsp), %rdi
leaq 0x85ac(%rip), %rsi      # 0xb05f
leaq 0xd7e6(%rip), %rdx      # 0x102a0
xorl %eax, %eax
callq 0x2310
jmp 0x2ac3
leaq 0x24f(%rsp), %rdi
movq %rdi, 0xe0(%rsp)
callq 0x22f0
movq 0xe0(%rsp), %rdx
leaq 0xd7b9(%rip), %rsi      # 0x102a0
leaq 0x250(%rsp), %rdi
callq 0x38c0
jmp 0x2af6
leaq 0x24f(%rsp), %rdi
callq 0x21f0
movq 0x300(%rsp), %rdi
leaq 0x854d(%rip), %rsi      # 0xb05f
leaq 0xd787(%rip), %rdx      # 0x102a0
xorl %eax, %eax
callq 0x2310
jmp 0x2b22
leaq 0x227(%rsp), %rdi
movq %rdi, 0xd8(%rsp)
callq 0x22f0
movq 0xd8(%rsp), %rdx
leaq 0xd75a(%rip), %rsi      # 0x102a0
leaq 0x228(%rsp), %rdi
callq 0x38c0
jmp 0x2b55
leaq 0x227(%rsp), %rdi
callq 0x21f0
leaq 0xd69f(%rip), %rdi      # 0x10208
leaq 0x278(%rsp), %rsi
callq 0x3980
movq %rax, 0xd0(%rsp)
jmp 0x2b80
movq 0xd0(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x220(%rsp)
leaq 0xd670(%rip), %rdi      # 0x10208
leaq 0x250(%rsp), %rsi
callq 0x3980
movq %rax, 0xc8(%rsp)
jmp 0x2baf
movq 0xc8(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x21c(%rsp)
leaq 0xd611(%rip), %rdi      # 0x101d8
leaq 0x228(%rsp), %rsi
callq 0x3980
movq %rax, 0xc0(%rsp)
jmp 0x2bde
movq 0xc0(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x218(%rsp)
movl 0x29c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29c(%rsp)
movl 0x218(%rsp), %eax
cmpl 0x384(%rsp), %eax
je 0x2d07
movl $0x6, 0x214(%rsp)
jmp 0x2d6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x338(%rsp)
movl %eax, 0x334(%rsp)
jmp 0x370a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x338(%rsp)
movl %eax, 0x334(%rsp)
leaq 0x277(%rsp), %rdi
callq 0x21f0
jmp 0x370a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x338(%rsp)
movl %eax, 0x334(%rsp)
jmp 0x2db9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x338(%rsp)
movl %eax, 0x334(%rsp)
leaq 0x24f(%rsp), %rdi
callq 0x21f0
jmp 0x2db9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x338(%rsp)
movl %eax, 0x334(%rsp)
jmp 0x2dac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x338(%rsp)
movl %eax, 0x334(%rsp)
leaq 0x227(%rsp), %rdi
callq 0x21f0
jmp 0x2dac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x338(%rsp)
movl %eax, 0x334(%rsp)
leaq 0x228(%rsp), %rdi
callq 0x2110
jmp 0x2dac
leaq 0x2a0(%rsp), %rdi
leaq 0x29c(%rsp), %rsi
callq 0x3b70
jmp 0x2d1e
leaq 0x2e8(%rsp), %rdi
leaq 0x220(%rsp), %rsi
callq 0x3b70
jmp 0x2d35
leaq 0x2d0(%rsp), %rdi
leaq 0x21c(%rsp), %rsi
callq 0x3b70
jmp 0x2d4c
leaq 0x2b8(%rsp), %rdi
leaq 0x218(%rsp), %rsi
callq 0x3b70
jmp 0x2d63
movl $0x0, 0x214(%rsp)
leaq 0x228(%rsp), %rdi
callq 0x2110
leaq 0x250(%rsp), %rdi
callq 0x2110
leaq 0x278(%rsp), %rdi
callq 0x2110
movl 0x214(%rsp), %eax
testl %eax, %eax
je 0x2da7
jmp 0x2da2
jmp 0x2a2e
jmp 0x2a2e
leaq 0x250(%rsp), %rdi
callq 0x2110
leaq 0x278(%rsp), %rdi
callq 0x2110
jmp 0x370a
leaq 0x8290(%rip), %rdi      # 0xb062
leaq 0x8255(%rip), %rsi      # 0xb02e
callq 0x2230
movq %rax, 0xb8(%rsp)
jmp 0x2de8
movq 0xb8(%rsp), %rax
movq %rax, 0x208(%rsp)
movl $0x32, 0x204(%rsp)
movslq 0xd48e(%rip), %rsi      # 0x10298
leaq 0x3e1cf(%rip), %rdi     # 0x40fe0
callq 0x3be0
jmp 0x2e18
movl $0x0, 0x200(%rsp)
movl 0x200(%rsp), %eax
cmpl 0xd468(%rip), %eax      # 0x10298
jge 0x2ef3
movslq 0x200(%rsp), %rsi
leaq 0x3e19b(%rip), %rdi     # 0x40fe0
callq 0x3c80
movq %rax, %rdi
movslq 0x204(%rsp), %rsi
callq 0x3ca0
jmp 0x2e5c
movl $0x0, 0x1fc(%rsp)
movl 0x1fc(%rsp), %eax
cmpl 0x204(%rsp), %eax
jge 0x2edb
movq 0x208(%rsp), %rax
movq %rax, 0xb0(%rsp)
movslq 0x200(%rsp), %rsi
leaq 0x3e14a(%rip), %rdi     # 0x40fe0
callq 0x3c80
movq %rax, %rdi
movslq 0x1fc(%rsp), %rsi
callq 0x38a0
movq 0xb0(%rsp), %rdi
movq %rax, %rdx
leaq 0x81be(%rip), %rsi      # 0xb07b
xorl %eax, %eax
callq 0x2310
jmp 0x2ec6
jmp 0x2ec8
movl 0x1fc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1fc(%rsp)
jmp 0x2e67
jmp 0x2edd
movl 0x200(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x200(%rsp)
jmp 0x2e23
movq $0x0, 0x1f0(%rsp)
leaq 0x2e8(%rsp), %rdi
callq 0x3d40
movl %eax, 0x1ec(%rsp)
leaq 0x8165(%rip), %rdi      # 0xb07f
leaq 0x816d(%rip), %rsi      # 0xb08e
callq 0x2230
movq %rax, 0xa8(%rsp)
jmp 0x2f30
movq 0xa8(%rsp), %rax
movq %rax, 0x1e0(%rsp)
movl $0x0, 0x1dc(%rsp)
movl 0x1dc(%rsp), %eax
cmpl 0x1ec(%rsp), %eax
jge 0x325a
movl $0x0, 0x1d8(%rsp)
movl 0x1d8(%rsp), %eax
cmpl 0x1ec(%rsp), %eax
jge 0x3242
movl 0x1dc(%rsp), %eax
cmpl 0x1d8(%rsp), %eax
je 0x322a
xorps %xmm0, %xmm0
movsd %xmm0, 0x1d0(%rsp)
movl $0x0, 0x1cc(%rsp)
movl 0x1cc(%rsp), %eax
cmpl 0x204(%rsp), %eax
jge 0x3107
movslq 0x1dc(%rsp), %rsi
leaq 0x2e8(%rsp), %rdi
callq 0x3d60
movslq (%rax), %rsi
leaq 0x3e004(%rip), %rdi     # 0x40fe0
callq 0x3c80
movq %rax, %rdi
movslq 0x1cc(%rsp), %rsi
callq 0x38a0
movsd (%rax), %xmm0
movsd %xmm0, 0x90(%rsp)
movslq 0x1dc(%rsp), %rsi
leaq 0x2d0(%rsp), %rdi
callq 0x3d60
movslq (%rax), %rsi
leaq 0x3dfc3(%rip), %rdi     # 0x40fe0
callq 0x3c80
movq %rax, %rdi
movslq 0x1cc(%rsp), %rsi
callq 0x38a0
movsd 0x90(%rsp), %xmm0
subsd (%rax), %xmm0
movsd %xmm0, 0x98(%rsp)
movslq 0x1d8(%rsp), %rsi
leaq 0x2e8(%rsp), %rdi
callq 0x3d60
movslq (%rax), %rsi
leaq 0x3df79(%rip), %rdi     # 0x40fe0
callq 0x3c80
movq %rax, %rdi
movslq 0x1cc(%rsp), %rsi
callq 0x38a0
movsd 0x98(%rsp), %xmm0
subsd (%rax), %xmm0
movsd %xmm0, 0xa0(%rsp)
movslq 0x1d8(%rsp), %rsi
leaq 0x2d0(%rsp), %rdi
callq 0x3d60
movslq (%rax), %rsi
leaq 0x3df2f(%rip), %rdi     # 0x40fe0
callq 0x3c80
movq %rax, %rdi
movslq 0x1cc(%rsp), %rsi
callq 0x38a0
movsd 0xa0(%rsp), %xmm0
addsd (%rax), %xmm0
callq 0x25d0
movaps %xmm0, %xmm1
movsd 0x1d0(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x1d0(%rsp)
movl 0x1cc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1cc(%rsp)
jmp 0x2fa9
leaq 0x3deea(%rip), %rdi     # 0x40ff8
leaq 0x1d0(%rsp), %rsi
callq 0x3d80
jmp 0x311d
movsd 0x1d0(%rsp), %xmm0
movsd 0x7ee2(%rip), %xmm1     # 0xb010
ucomisd %xmm1, %xmm0
jbe 0x31f7
movslq 0x1dc(%rsp), %rsi
leaq 0x2e8(%rsp), %rdi
callq 0x3d60
movslq (%rax), %rsi
leaq 0x3de89(%rip), %rdi     # 0x40fe0
callq 0x3c80
movq %rax, %rdi
callq 0x25f0
jmp 0x3166
movslq 0x1dc(%rsp), %rsi
leaq 0x2d0(%rsp), %rdi
callq 0x3d60
movslq (%rax), %rsi
leaq 0x3de5b(%rip), %rdi     # 0x40fe0
callq 0x3c80
movq %rax, %rdi
callq 0x25f0
jmp 0x3194
movslq 0x1d8(%rsp), %rsi
leaq 0x2e8(%rsp), %rdi
callq 0x3d60
movslq (%rax), %rsi
leaq 0x3de2d(%rip), %rdi     # 0x40fe0
callq 0x3c80
movq %rax, %rdi
callq 0x25f0
jmp 0x31c2
movslq 0x1d8(%rsp), %rsi
leaq 0x2d0(%rsp), %rdi
callq 0x3d60
movslq (%rax), %rsi
leaq 0x3ddff(%rip), %rdi     # 0x40fe0
callq 0x3c80
movq %rax, %rdi
callq 0x25f0
jmp 0x31f0
xorl %edi, %edi
callq 0x2240
movq 0x1e0(%rsp), %rdi
movl 0x1dc(%rsp), %edx
addl $0x1, %edx
movl 0x1d8(%rsp), %ecx
addl $0x1, %ecx
movsd 0x1d0(%rsp), %xmm0
leaq 0x7e6d(%rip), %rsi      # 0xb090
movb $0x1, %al
callq 0x2270
jmp 0x322c
movl 0x1d8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1d8(%rsp)
jmp 0x2f6a
jmp 0x3244
movl 0x1dc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1dc(%rsp)
jmp 0x2f4b
movq 0x1e0(%rsp), %rdi
callq 0x2190
jmp 0x3269
cmpl $0x1, 0x1ec(%rsp)
jle 0x345d
leaq 0x3dd7a(%rip), %rdi     # 0x40ff8
movq %rdi, 0x88(%rsp)
callq 0x3e30
movq 0x88(%rsp), %rdi
movq %rax, 0x1c0(%rsp)
callq 0x3e60
movq %rax, 0x1b8(%rsp)
movq 0x1c0(%rsp), %rdi
movq 0x1b8(%rsp), %rsi
callq 0x3df0
jmp 0x32bf
leaq 0x3dd32(%rip), %rdi     # 0x40ff8
xorl %eax, %eax
movl %eax, %esi
callq 0x38a0
movsd (%rax), %xmm0
movq 0xccfe(%rip), %rdi      # 0xffd8
callq 0x2320
movq %rax, 0x80(%rsp)
jmp 0x32e9
movq 0x80(%rsp), %rdi
movl $0x20, %esi
callq 0x2220
movq %rax, 0x78(%rsp)
jmp 0x3302
leaq 0x3dcef(%rip), %rdi     # 0x40ff8
movq %rdi, 0x68(%rsp)
callq 0x3880
movq 0x68(%rsp), %rdi
movq %rax, %rsi
decq %rsi
callq 0x38a0
movq 0x78(%rsp), %rdi
movsd (%rax), %xmm0
callq 0x2320
movq %rax, 0x70(%rsp)
jmp 0x3338
movq 0x70(%rsp), %rdi
movl $0x20, %esi
callq 0x2220
movq %rax, 0x60(%rsp)
jmp 0x334e
leaq 0x3dca3(%rip), %rdi     # 0x40ff8
movq %rdi, 0x38(%rsp)
xorl %eax, %eax
movl %eax, %esi
movq %rsi, 0x40(%rsp)
callq 0x38a0
movq 0x38(%rsp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
callq 0x3880
movq 0x38(%rsp), %rdi
movq %rax, %rsi
decq %rsi
callq 0x38a0
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
movsd (%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
callq 0x38a0
movsd 0x48(%rsp), %xmm1
movsd 0x50(%rsp), %xmm0
movq 0x60(%rsp), %rdi
movsd (%rax), %xmm2
subsd %xmm2, %xmm1
subsd %xmm1, %xmm0
callq 0x2320
movq %rax, 0x58(%rsp)
jmp 0x33ce
movq 0x58(%rsp), %rdi
movq 0xcbee(%rip), %rsi      # 0xffc8
callq 0x21d0
jmp 0x33e1
leaq 0x3dc10(%rip), %rdi     # 0x40ff8
xorl %eax, %eax
movl %eax, %esi
callq 0x38a0
movsd (%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
leaq 0x3dbf6(%rip), %rdi     # 0x40ff8
callq 0x3880
movq %rax, %rsi
subq $0x1, %rsi
leaq 0x3dbe3(%rip), %rdi     # 0x40ff8
callq 0x38a0
movsd (%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
leaq 0x3dbcd(%rip), %rdi     # 0x40ff8
xorl %eax, %eax
movl %eax, %esi
callq 0x38a0
movsd 0x28(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
subsd (%rax), %xmm0
movsd 0x7bbc(%rip), %xmm2     # 0xb008
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x1f0(%rsp)
leaq 0x7c37(%rip), %rdi      # 0xb09b
leaq 0x7c23(%rip), %rsi      # 0xb08e
callq 0x2230
movq %rax, 0x20(%rsp)
jmp 0x3477
movq 0x20(%rsp), %rax
movq %rax, 0x1b0(%rsp)
movl $0x0, 0x1ac(%rsp)
movl 0x1ac(%rsp), %eax
cmpl 0x1ec(%rsp), %eax
jge 0x34d1
movq 0x1b0(%rsp), %rdi
movsd 0x1f0(%rsp), %xmm0
leaq 0x7bdf(%rip), %rsi      # 0xb096
movb $0x1, %al
callq 0x2270
movl 0x1ac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1ac(%rsp)
jmp 0x348f
movq 0x1b0(%rsp), %rdi
callq 0x2190
jmp 0x34e0
movq 0x388(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
leaq 0x13f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x22f0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x140(%rsp), %rdi
callq 0x38c0
jmp 0x351c
leaq 0x7b80(%rip), %rsi      # 0xb0a3
leaq 0x160(%rsp), %rdi
leaq 0x140(%rsp), %rdx
callq 0x3ee0
jmp 0x353a
leaq 0x7b35(%rip), %rdx      # 0xb076
leaq 0x180(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0x3e90
jmp 0x3558
leaq 0x180(%rsp), %rdi
callq 0x20b0
movq %rax, %rdi
leaq 0x7b1f(%rip), %rsi      # 0xb08e
callq 0x2230
movq %rax, 0x8(%rsp)
jmp 0x357b
leaq 0x180(%rsp), %rdi
callq 0x2110
leaq 0x160(%rsp), %rdi
callq 0x2110
leaq 0x140(%rsp), %rdi
callq 0x2110
leaq 0x13f(%rsp), %rdi
callq 0x21f0
movq 0x8(%rsp), %rax
movq %rax, 0x1a0(%rsp)
movl $0x0, 0x138(%rsp)
movl 0x138(%rsp), %eax
cmpl 0x1ec(%rsp), %eax
jge 0x36af
movq 0x1a0(%rsp), %rax
movq %rax, (%rsp)
movslq 0x138(%rsp), %rsi
leaq 0x2a0(%rsp), %rdi
callq 0x3d60
movq (%rsp), %rdi
movl (%rax), %edx
leaq 0x7aa8(%rip), %rsi      # 0xb0b1
movb $0x0, %al
callq 0x2270
movl 0x138(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x138(%rsp)
jmp 0x35c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x338(%rsp)
movl %eax, 0x334(%rsp)
jmp 0x36a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x338(%rsp)
movl %eax, 0x334(%rsp)
jmp 0x3693
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x338(%rsp)
movl %eax, 0x334(%rsp)
jmp 0x3686
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x338(%rsp)
movl %eax, 0x334(%rsp)
leaq 0x180(%rsp), %rdi
callq 0x2110
leaq 0x160(%rsp), %rdi
callq 0x2110
leaq 0x140(%rsp), %rdi
callq 0x2110
leaq 0x13f(%rsp), %rdi
callq 0x21f0
jmp 0x370a
movq 0x1a0(%rsp), %rdi
callq 0x2190
jmp 0x36be
movl $0x0, 0x394(%rsp)
movl $0x1, 0x214(%rsp)
leaq 0x2a0(%rsp), %rdi
callq 0x3f30
leaq 0x2b8(%rsp), %rdi
callq 0x3f30
leaq 0x2d0(%rsp), %rdi
callq 0x3f30
leaq 0x2e8(%rsp), %rdi
callq 0x3f30
jmp 0x3740
leaq 0x2a0(%rsp), %rdi
callq 0x3f30
leaq 0x2b8(%rsp), %rdi
callq 0x3f30
leaq 0x2d0(%rsp), %rdi
callq 0x3f30
leaq 0x2e8(%rsp), %rdi
callq 0x3f30
jmp 0x374f
movl 0x394(%rsp), %eax
addq $0x398, %rsp            # imm = 0x398
retq
movq 0x338(%rsp), %rdi
callq 0x22e0
nopl (%rax)