// File: bobverity[P]MavericK/writeOut.cpp
// Function: printQmatrix_ind(globals&, int)
void printQmatrix_ind(globals &globals, int Kindex) {
    int K = globals.Kmin+Kindex;
    
    if (globals.outputQmatrix_structureFormat_on) {
        
        // open outputQmatrix_ind filestream for this K
        string s = globals.outputQmatrix_ind_filePath;
        s.erase(end(s)-4,end(s));
        s = s + "_K" + to_string((long long)K) + ".txt";
        globals.outputQmatrix_ind_fileStream = safe_ofstream(s,globals.outputLog_on, globals.outputLog_fileStream);
        
        // write headers
        /*
        globals.outputQmatrix_ind_fileStream << "        Label (%Miss) ";
        if (globals.popCol_on)
            globals.outputQmatrix_ind_fileStream << "Pop";
        globals.outputQmatrix_ind_fileStream << ":  Inferred clusters\n";
        */
        
        // write results
        for (int i=0; i<globals.n; i++) {
            
            // individual index
            if ((i+1)<100)
                globals.outputQmatrix_ind_fileStream << " ";
            if ((i+1)<10)
                globals.outputQmatrix_ind_fileStream << " ";
            globals.outputQmatrix_ind_fileStream << i+1;
            
            // individual label
            int stringLength = int(globals.indLabels_vec[i].length());
            if (stringLength<8) {
                for (int j=0; j<(8-stringLength); j++) {
                    globals.outputQmatrix_ind_fileStream << " ";
                }
            }
            globals.outputQmatrix_ind_fileStream << " ";
            string s = globals.indLabels_vec[i];
            if (stringLength>11)
                s.erase(begin(s)+11,end(s));
            globals.outputQmatrix_ind_fileStream << s;
            
            // missing data
            double missPercent = my_round(globals.missing_vec[i]/double(globals.loci)/double(globals.ploidy_vec[i])*100);
            if (missPercent<10)
                globals.outputQmatrix_ind_fileStream << " ";
            globals.outputQmatrix_ind_fileStream << "  (" << missPercent << ")   ";
            
            // population data
            if (globals.popCol_on) {
                if (globals.pop_vec[i].length()==1)
                    globals.outputQmatrix_ind_fileStream << " ";
                globals.outputQmatrix_ind_fileStream << " " << globals.pop_vec[i] << " ";
            }
            
            globals.outputQmatrix_ind_fileStream << ": ";
            
            // probabilities
            for (int k=0; k<K; k++) {
                char * buffer = new char[256];
                sprintf(buffer, "%.3f", my_round(globals.Qmatrix_ind[Kindex][i][k]*1000)/1000.0);
                string s = buffer;
                delete [] buffer;
                globals.outputQmatrix_ind_fileStream << " " << s;
            }
            globals.outputQmatrix_ind_fileStream << "\n";
            
        }
        
    } // end of if outputQmatrix_structureFormat_on=true
    
    // open outputQmatrix_ind filestream for this K
    string s = globals.outputQmatrix_ind_filePath;
    s.erase(end(s)-4,end(s));
    s = s + "_K" + to_string((long long)K) + ".csv";
    globals.outputQmatrix_ind_fileStream = safe_ofstream(s,globals.outputLog_on, globals.outputLog_fileStream);
    
    // write headers
    globals.outputQmatrix_ind_fileStream << "index,label";
    if (globals.popCol_on)
        globals.outputQmatrix_ind_fileStream << ",given_population";
    for (int k=0; k<K; k++)
        globals.outputQmatrix_ind_fileStream << ",deme" << k+1;
    globals.outputQmatrix_ind_fileStream << "\n";
    
    // write results
    for (int i=0; i<globals.n; i++) {
        
        // individual index
        globals.outputQmatrix_ind_fileStream << i+1;
        globals.outputQmatrix_ind_fileStream << ",";
        
        // individual label
        globals.outputQmatrix_ind_fileStream << globals.indLabels_vec[i];
        globals.outputQmatrix_ind_fileStream << ",";
        
        // population data
        if (globals.popCol_on) {
            globals.outputQmatrix_ind_fileStream << globals.pop_vec[i];
            globals.outputQmatrix_ind_fileStream << ",";
        }
        
        // probabilities
        for (int k=0; k<K; k++) {
            char * buffer = new char[256];
            sprintf(buffer, "%.3f", my_round(globals.Qmatrix_ind[Kindex][i][k]*1000)/1000.0);
            string s = buffer;
            delete [] buffer;
            globals.outputQmatrix_ind_fileStream << s;
            if (k<(K-1))
                globals.outputQmatrix_ind_fileStream << ",";
        }
        
        globals.outputQmatrix_ind_fileStream << "\n";
        
    }
    
    globals.outputQmatrix_ind_fileStream.flush();
}

// Assembly:
subq $0x808, %rsp            # imm = 0x808
movq %rdi, 0x800(%rsp)
movl %esi, 0x7fc(%rsp)
movq 0x800(%rsp), %rax
movl 0x2bc8(%rax), %eax
addl 0x7fc(%rsp), %eax
movl %eax, 0x7f8(%rsp)
movq 0x800(%rsp), %rax
testb $0x1, 0x2c4d(%rax)
je 0x598b5
movq 0x800(%rsp), %rsi
addq $0x360, %rsi            # imm = 0x360
leaq 0x7d8(%rsp), %rdi
movq %rdi, 0x118(%rsp)
callq 0x4180
movq 0x118(%rsp), %rdi
callq 0x5bc90
movq %rax, 0x120(%rsp)
jmp 0x58ef2
movq 0x120(%rsp), %rax
movq %rax, 0x7c0(%rsp)
leaq 0x7c0(%rsp), %rdi
movl $0x4, %esi
callq 0x5bcc0
movq %rax, 0x7c8(%rsp)
leaq 0x7d0(%rsp), %rdi
leaq 0x7c8(%rsp), %rsi
callq 0x5bd00
leaq 0x7d8(%rsp), %rdi
callq 0x5bc90
movq %rax, 0x110(%rsp)
jmp 0x58f48
movq 0x110(%rsp), %rax
movq %rax, 0x7a0(%rsp)
leaq 0x7a8(%rsp), %rdi
leaq 0x7a0(%rsp), %rsi
callq 0x5bd00
movq 0x7d0(%rsp), %rsi
movq 0x7a8(%rsp), %rdx
leaq 0x7d8(%rsp), %rdi
callq 0x40d0
movq %rax, 0x108(%rsp)
jmp 0x58f94
movq 0x108(%rsp), %rax
movq %rax, 0x798(%rsp)
leaq 0x584b(%rip), %rdx      # 0x5e7f6
leaq 0x738(%rsp), %rdi
leaq 0x7d8(%rsp), %rsi
callq 0x2af00
jmp 0x58fc2
movslq 0x7f8(%rsp), %rsi
leaq 0x718(%rsp), %rdi
callq 0xcb30
jmp 0x58fd9
leaq 0x758(%rsp), %rdi
leaq 0x738(%rsp), %rsi
leaq 0x718(%rsp), %rdx
callq 0xc9f0
jmp 0x58ff8
leaq 0x325f(%rip), %rdx      # 0x5c25e
leaq 0x778(%rsp), %rdi
leaq 0x758(%rsp), %rsi
callq 0x22900
jmp 0x59016
leaq 0x7d8(%rsp), %rdi
movq %rdi, 0x100(%rsp)
leaq 0x778(%rsp), %rsi
movq %rsi, 0xf8(%rsp)
callq 0x4500
movq 0xf8(%rsp), %rdi
callq 0x4270
leaq 0x758(%rsp), %rdi
callq 0x4270
leaq 0x718(%rsp), %rdi
callq 0x4270
leaq 0x738(%rsp), %rdi
callq 0x4270
movq 0x100(%rsp), %rsi
leaq 0x4f8(%rsp), %rdi
callq 0x4180
jmp 0x59086
movq 0x800(%rsp), %rax
movq %rax, %rcx
addq $0x970, %rcx            # imm = 0x970
movzbl 0x2c3c(%rax), %edx
andl $0x1, %edx
leaq 0x518(%rsp), %rdi
leaq 0x4f8(%rsp), %rsi
callq 0x52e90
jmp 0x590b9
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x518(%rsp), %rsi
callq 0x44e0
jmp 0x590d7
leaq 0x518(%rsp), %rdi
callq 0x45d0
leaq 0x4f8(%rsp), %rdi
callq 0x4270
movl $0x0, 0x4f4(%rsp)
movl 0x4f4(%rsp), %eax
movq 0x800(%rsp), %rcx
cmpl 0x2d18(%rcx), %eax
jge 0x59894
movl 0x4f4(%rsp), %eax
addl $0x1, %eax
cmpl $0x64, %eax
jge 0x5921a
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x58bb(%rip), %rsi      # 0x5e9fb
callq 0x4430
jmp 0x59147
jmp 0x5921a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7b8(%rsp)
movl %eax, 0x7b4(%rsp)
jmp 0x598a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7b8(%rsp)
movl %eax, 0x7b4(%rsp)
jmp 0x591bf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7b8(%rsp)
movl %eax, 0x7b4(%rsp)
jmp 0x591b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7b8(%rsp)
movl %eax, 0x7b4(%rsp)
leaq 0x758(%rsp), %rdi
callq 0x4270
leaq 0x718(%rsp), %rdi
callq 0x4270
leaq 0x738(%rsp), %rdi
callq 0x4270
jmp 0x598a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7b8(%rsp)
movl %eax, 0x7b4(%rsp)
jmp 0x59208
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7b8(%rsp)
movl %eax, 0x7b4(%rsp)
leaq 0x518(%rsp), %rdi
callq 0x45d0
leaq 0x4f8(%rsp), %rdi
callq 0x4270
jmp 0x598a3
movl 0x4f4(%rsp), %eax
addl $0x1, %eax
cmpl $0xa, %eax
jge 0x59248
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x57bc(%rip), %rsi      # 0x5e9fb
callq 0x4430
jmp 0x59246
jmp 0x59248
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
movl 0x4f4(%rsp), %esi
incl %esi
callq 0x4700
jmp 0x59267
movq 0x800(%rsp), %rdi
addq $0x2c58, %rdi           # imm = 0x2C58
movslq 0x4f4(%rsp), %rsi
callq 0x4fe90
movq %rax, %rdi
callq 0x45f0
movl %eax, 0x4f0(%rsp)
cmpl $0x8, 0x4f0(%rsp)
jge 0x592f2
movl $0x0, 0x4ec(%rsp)
movl 0x4ec(%rsp), %eax
movl $0x8, %ecx
subl 0x4f0(%rsp), %ecx
cmpl %ecx, %eax
jge 0x592f0
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x5727(%rip), %rsi      # 0x5e9fb
callq 0x4430
jmp 0x592db
jmp 0x592dd
movl 0x4ec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4ec(%rsp)
jmp 0x592a7
jmp 0x592f2
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x56f3(%rip), %rsi      # 0x5e9fb
callq 0x4430
jmp 0x5930f
movq 0x800(%rsp), %rdi
addq $0x2c58, %rdi           # imm = 0x2C58
movslq 0x4f4(%rsp), %rsi
callq 0x4fe90
movq %rax, %rsi
leaq 0x4c8(%rsp), %rdi
callq 0x4180
jmp 0x5933d
cmpl $0xb, 0x4f0(%rsp)
jle 0x5942f
leaq 0x4c8(%rsp), %rdi
callq 0x5bd40
movq %rax, 0xf0(%rsp)
jmp 0x59362
movq 0xf0(%rsp), %rax
movq %rax, 0x4b0(%rsp)
leaq 0x4b0(%rsp), %rdi
movl $0xb, %esi
callq 0x5bd70
movq %rax, 0x4b8(%rsp)
leaq 0x4c0(%rsp), %rdi
leaq 0x4b8(%rsp), %rsi
callq 0x5bd00
leaq 0x4c8(%rsp), %rdi
callq 0x5bc90
movq %rax, 0xe8(%rsp)
jmp 0x593b8
movq 0xe8(%rsp), %rax
movq %rax, 0x4a0(%rsp)
leaq 0x4a8(%rsp), %rdi
leaq 0x4a0(%rsp), %rsi
callq 0x5bd00
movq 0x4c0(%rsp), %rsi
movq 0x4a8(%rsp), %rdx
leaq 0x4c8(%rsp), %rdi
callq 0x40d0
movq %rax, 0xe0(%rsp)
jmp 0x59404
movq 0xe0(%rsp), %rax
movq %rax, 0x498(%rsp)
jmp 0x5942f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7b8(%rsp)
movl %eax, 0x7b4(%rsp)
jmp 0x59885
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x4c8(%rsp), %rsi
callq 0x43e0
jmp 0x5944d
movq 0x800(%rsp), %rdi
addq $0x2ce8, %rdi           # imm = 0x2CE8
movslq 0x4f4(%rsp), %rsi
callq 0x8ba0
cvtsi2sdl (%rax), %xmm0
movq 0x800(%rsp), %rdi
cvtsi2sdl 0x2d1c(%rdi), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0xd0(%rsp)
addq $0x2cd0, %rdi           # imm = 0x2CD0
movslq 0x4f4(%rsp), %rsi
callq 0x8ba0
movsd 0xd0(%rsp), %xmm0
cvtsi2sdl (%rax), %xmm1
divsd %xmm1, %xmm0
movsd 0x2d99(%rip), %xmm1     # 0x5c250
mulsd %xmm1, %xmm0
callq 0x33950
movl %eax, 0xdc(%rsp)
jmp 0x594c9
movl 0xdc(%rsp), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x490(%rsp)
movsd 0x2d23(%rip), %xmm0     # 0x5c208
ucomisd 0x490(%rsp), %xmm0
jbe 0x5950f
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x54f5(%rip), %rsi      # 0x5e9fb
callq 0x4430
jmp 0x5950d
jmp 0x5950f
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x54c3(%rip), %rsi      # 0x5e9e8
callq 0x4430
movq %rax, 0xc8(%rsp)
jmp 0x59534
movq 0xc8(%rsp), %rdi
movsd 0x490(%rsp), %xmm0
callq 0x4790
movq %rax, 0xc0(%rsp)
jmp 0x59554
movq 0xc0(%rsp), %rdi
leaq 0x5489(%rip), %rsi      # 0x5e9ec
callq 0x4430
jmp 0x5956a
movq 0x800(%rsp), %rax
testb $0x1, 0x2ba1(%rax)
je 0x5963b
movq 0x800(%rsp), %rdi
addq $0x2c70, %rdi           # imm = 0x2C70
movslq 0x4f4(%rsp), %rsi
callq 0x4fe90
movq %rax, %rdi
callq 0x45f0
cmpq $0x1, %rax
jne 0x595c8
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x543c(%rip), %rsi      # 0x5e9fb
callq 0x4430
jmp 0x595c6
jmp 0x595c8
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x541d(%rip), %rsi      # 0x5e9fb
callq 0x4430
movq %rax, 0xb8(%rsp)
jmp 0x595ed
movq 0x800(%rsp), %rdi
addq $0x2c70, %rdi           # imm = 0x2C70
movslq 0x4f4(%rsp), %rsi
callq 0x4fe90
movq 0xb8(%rsp), %rdi
movq %rax, %rsi
callq 0x43e0
movq %rax, 0xb0(%rsp)
jmp 0x59623
movq 0xb0(%rsp), %rdi
leaq 0x53c9(%rip), %rsi      # 0x5e9fb
callq 0x4430
jmp 0x59639
jmp 0x5963b
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x3402(%rip), %rsi      # 0x5ca53
callq 0x4430
jmp 0x59658
movl $0x0, 0x48c(%rsp)
movl 0x48c(%rsp), %eax
cmpl 0x7f8(%rsp), %eax
jge 0x59845
movl $0x100, %edi            # imm = 0x100
callq 0x4030
movq %rax, 0xa8(%rsp)
jmp 0x5968b
movq 0xa8(%rsp), %rax
movq %rax, 0x480(%rsp)
movq 0x480(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x800(%rsp), %rdi
addq $0x2da0, %rdi           # imm = 0x2DA0
movslq 0x7fc(%rsp), %rsi
callq 0x8ae0
movq %rax, %rdi
movslq 0x4f4(%rsp), %rsi
callq 0x8bc0
movq %rax, %rdi
movslq 0x48c(%rsp), %rsi
callq 0x8c20
movsd (%rax), %xmm0
movsd 0x4f8d(%rip), %xmm1     # 0x5e680
mulsd %xmm1, %xmm0
callq 0x33950
movl %eax, 0xa4(%rsp)
jmp 0x59705
movq 0x98(%rsp), %rdi
movl 0xa4(%rsp), %eax
cvtsi2sd %eax, %xmm0
movsd 0x4f60(%rip), %xmm1     # 0x5e680
divsd %xmm1, %xmm0
leaq 0x52b8(%rip), %rsi      # 0x5e9e3
movb $0x1, %al
callq 0x40b0
movq 0x480(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x45f(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0x4740
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
leaq 0x460(%rsp), %rdi
callq 0x4580
jmp 0x59776
leaq 0x45f(%rsp), %rdi
callq 0x4490
movq 0x480(%rsp), %rax
movq %rax, 0x80(%rsp)
cmpq $0x0, %rax
je 0x597a6
movq 0x80(%rsp), %rdi
callq 0x4530
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x523f(%rip), %rsi      # 0x5e9fb
callq 0x4430
movq %rax, 0x78(%rsp)
jmp 0x597c8
movq 0x78(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x43e0
jmp 0x597dc
leaq 0x460(%rsp), %rdi
callq 0x4270
movl 0x48c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48c(%rsp)
jmp 0x59663
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7b8(%rsp)
movl %eax, 0x7b4(%rsp)
leaq 0x45f(%rsp), %rdi
callq 0x4490
jmp 0x59885
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7b8(%rsp)
movl %eax, 0x7b4(%rsp)
leaq 0x460(%rsp), %rdi
callq 0x4270
jmp 0x59885
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x3037(%rip), %rsi      # 0x5c892
callq 0x4430
jmp 0x59862
leaq 0x4c8(%rsp), %rdi
callq 0x4270
movl 0x4f4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4f4(%rsp)
jmp 0x590fc
leaq 0x4c8(%rsp), %rdi
callq 0x4270
jmp 0x598a3
leaq 0x7d8(%rsp), %rdi
callq 0x4270
jmp 0x598b5
leaq 0x7d8(%rsp), %rdi
callq 0x4270
jmp 0x59fe8
movq 0x800(%rsp), %rsi
addq $0x360, %rsi            # imm = 0x360
leaq 0x438(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x4180
movq 0x68(%rsp), %rdi
callq 0x5bc90
movq %rax, 0x70(%rsp)
jmp 0x598e7
movq 0x70(%rsp), %rax
movq %rax, 0x420(%rsp)
leaq 0x420(%rsp), %rdi
movl $0x4, %esi
callq 0x5bcc0
movq %rax, 0x428(%rsp)
leaq 0x430(%rsp), %rdi
leaq 0x428(%rsp), %rsi
callq 0x5bd00
leaq 0x438(%rsp), %rdi
callq 0x5bc90
movq %rax, 0x60(%rsp)
jmp 0x59937
movq 0x60(%rsp), %rax
movq %rax, 0x410(%rsp)
leaq 0x418(%rsp), %rdi
leaq 0x410(%rsp), %rsi
callq 0x5bd00
movq 0x430(%rsp), %rsi
movq 0x418(%rsp), %rdx
leaq 0x438(%rsp), %rdi
callq 0x40d0
movq %rax, 0x58(%rsp)
jmp 0x5997d
movq 0x58(%rsp), %rax
movq %rax, 0x408(%rsp)
leaq 0x4e65(%rip), %rdx      # 0x5e7f6
leaq 0x3a8(%rsp), %rdi
leaq 0x438(%rsp), %rsi
callq 0x2af00
jmp 0x599a8
movslq 0x7f8(%rsp), %rsi
leaq 0x388(%rsp), %rdi
callq 0xcb30
jmp 0x599bf
leaq 0x3c8(%rsp), %rdi
leaq 0x3a8(%rsp), %rsi
leaq 0x388(%rsp), %rdx
callq 0xc9f0
jmp 0x599de
leaq 0x2970(%rip), %rdx      # 0x5c355
leaq 0x3e8(%rsp), %rdi
leaq 0x3c8(%rsp), %rsi
callq 0x22900
jmp 0x599fc
leaq 0x438(%rsp), %rdi
movq %rdi, 0x50(%rsp)
leaq 0x3e8(%rsp), %rsi
movq %rsi, 0x48(%rsp)
callq 0x4500
movq 0x48(%rsp), %rdi
callq 0x4270
leaq 0x3c8(%rsp), %rdi
callq 0x4270
leaq 0x388(%rsp), %rdi
callq 0x4270
leaq 0x3a8(%rsp), %rdi
callq 0x4270
movq 0x50(%rsp), %rsi
leaq 0x168(%rsp), %rdi
callq 0x4180
jmp 0x59a60
movq 0x800(%rsp), %rax
movq %rax, %rcx
addq $0x970, %rcx            # imm = 0x970
movzbl 0x2c3c(%rax), %edx
andl $0x1, %edx
leaq 0x188(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0x52e90
jmp 0x59a93
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x188(%rsp), %rsi
callq 0x44e0
jmp 0x59ab1
leaq 0x188(%rsp), %rdi
callq 0x45d0
leaq 0x168(%rsp), %rdi
callq 0x4270
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x4ecd(%rip), %rsi      # 0x5e9ae
callq 0x4430
jmp 0x59ae8
movq 0x800(%rsp), %rax
testb $0x1, 0x2ba1(%rax)
je 0x59bed
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x4ea7(%rip), %rsi      # 0x5e9ba
callq 0x4430
jmp 0x59b1a
jmp 0x59bed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7b8(%rsp)
movl %eax, 0x7b4(%rsp)
jmp 0x59fdb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7b8(%rsp)
movl %eax, 0x7b4(%rsp)
jmp 0x59b92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7b8(%rsp)
movl %eax, 0x7b4(%rsp)
jmp 0x59b85
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7b8(%rsp)
movl %eax, 0x7b4(%rsp)
leaq 0x3c8(%rsp), %rdi
callq 0x4270
leaq 0x388(%rsp), %rdi
callq 0x4270
leaq 0x3a8(%rsp), %rdi
callq 0x4270
jmp 0x59fdb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7b8(%rsp)
movl %eax, 0x7b4(%rsp)
jmp 0x59bdb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7b8(%rsp)
movl %eax, 0x7b4(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x45d0
leaq 0x168(%rsp), %rdi
callq 0x4270
jmp 0x59fdb
movl $0x0, 0x164(%rsp)
movl 0x164(%rsp), %eax
cmpl 0x7f8(%rsp), %eax
jge 0x59c54
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x4dbf(%rip), %rsi      # 0x5e9dd
callq 0x4430
movq %rax, 0x40(%rsp)
jmp 0x59c2a
movq 0x40(%rsp), %rdi
movl 0x164(%rsp), %esi
incl %esi
callq 0x4700
jmp 0x59c3f
jmp 0x59c41
movl 0x164(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x164(%rsp)
jmp 0x59bf8
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x2c28(%rip), %rsi      # 0x5c892
callq 0x4430
jmp 0x59c71
movl $0x0, 0x160(%rsp)
movl 0x160(%rsp), %eax
movq 0x800(%rsp), %rcx
cmpl 0x2d18(%rcx), %eax
jge 0x59fb0
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
movl 0x160(%rsp), %esi
incl %esi
callq 0x4700
jmp 0x59cb6
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x255c(%rip), %rsi      # 0x5c228
callq 0x4430
jmp 0x59cd3
movq 0x800(%rsp), %rdi
movq %rdi, %rax
addq $0xd70, %rax            # imm = 0xD70
movq %rax, 0x38(%rsp)
addq $0x2c58, %rdi           # imm = 0x2C58
movslq 0x160(%rsp), %rsi
callq 0x4fe90
movq 0x38(%rsp), %rdi
movq %rax, %rsi
callq 0x43e0
jmp 0x59d0c
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x2506(%rip), %rsi      # 0x5c228
callq 0x4430
jmp 0x59d29
movq 0x800(%rsp), %rax
testb $0x1, 0x2ba1(%rax)
je 0x59d92
movq 0x800(%rsp), %rdi
movq %rdi, %rax
addq $0xd70, %rax            # imm = 0xD70
movq %rax, 0x30(%rsp)
addq $0x2c70, %rdi           # imm = 0x2C70
movslq 0x160(%rsp), %rsi
callq 0x4fe90
movq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x43e0
jmp 0x59d73
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x249f(%rip), %rsi      # 0x5c228
callq 0x4430
jmp 0x59d90
jmp 0x59d92
movl $0x0, 0x15c(%rsp)
movl 0x15c(%rsp), %eax
cmpl 0x7f8(%rsp), %eax
jge 0x59f7b
movl $0x100, %edi            # imm = 0x100
callq 0x4030
movq %rax, 0x28(%rsp)
jmp 0x59dc2
movq 0x28(%rsp), %rax
movq %rax, 0x150(%rsp)
movq 0x150(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x800(%rsp), %rdi
addq $0x2da0, %rdi           # imm = 0x2DA0
movslq 0x7fc(%rsp), %rsi
callq 0x8ae0
movq %rax, %rdi
movslq 0x160(%rsp), %rsi
callq 0x8bc0
movq %rax, %rdi
movslq 0x15c(%rsp), %rsi
callq 0x8c20
movsd (%rax), %xmm0
movsd 0x485c(%rip), %xmm1     # 0x5e680
mulsd %xmm1, %xmm0
callq 0x33950
movl %eax, 0x24(%rsp)
jmp 0x59e33
movq 0x18(%rsp), %rdi
movl 0x24(%rsp), %eax
cvtsi2sd %eax, %xmm0
movsd 0x4838(%rip), %xmm1     # 0x5e680
divsd %xmm1, %xmm0
leaq 0x4b90(%rip), %rsi      # 0x5e9e3
movb $0x1, %al
callq 0x40b0
movq 0x150(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x12f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x4740
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x130(%rsp), %rdi
callq 0x4580
jmp 0x59e92
leaq 0x12f(%rsp), %rdi
callq 0x4490
movq 0x150(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x59eba
movq (%rsp), %rdi
callq 0x4530
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x130(%rsp), %rsi
callq 0x43e0
jmp 0x59ed8
movl 0x15c(%rsp), %eax
movl 0x7f8(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x59f58
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x2325(%rip), %rsi      # 0x5c228
callq 0x4430
jmp 0x59f0a
jmp 0x59f58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7b8(%rsp)
movl %eax, 0x7b4(%rsp)
leaq 0x12f(%rsp), %rdi
callq 0x4490
jmp 0x59fdb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7b8(%rsp)
movl %eax, 0x7b4(%rsp)
leaq 0x130(%rsp), %rdi
callq 0x4270
jmp 0x59fdb
leaq 0x130(%rsp), %rdi
callq 0x4270
movl 0x15c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x15c(%rsp)
jmp 0x59d9d
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
leaq 0x2901(%rip), %rsi      # 0x5c892
callq 0x4430
jmp 0x59f98
jmp 0x59f9a
movl 0x160(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x160(%rsp)
jmp 0x59c7c
movq 0x800(%rsp), %rdi
addq $0xd70, %rdi            # imm = 0xD70
callq 0x42b0
jmp 0x59fc6
leaq 0x438(%rsp), %rdi
callq 0x4270
addq $0x808, %rsp            # imm = 0x808
retq
leaq 0x438(%rsp), %rdi
callq 0x4270
movq 0x7b8(%rsp), %rdi
callq 0x4730
nopw %cs:(%rax,%rax)