// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2f8, %rsp            # imm = 0x2F8
movslq %esi, %rax
movq %rax, 0x98(%rsp)
addl 0x2bc8(%rdi), %esi
cmpb $0x1, 0x2c4d(%rdi)
leaq 0x88(%rsp), %rax
movslq %esi, %rbp
movq %rsi, 0x30(%rsp)
movl %esi, %ecx
movq %rcx, 0xa0(%rsp)
movq %rdi, (%rsp)
jne 0x34059
leaq 0x78(%rsp), %rbx
movq %rax, (%rbx)
movq 0x360(%rdi), %rsi
movq 0x368(%rdi), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xbe10
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
leaq -0x4(%rcx), %rdx
movq %rdx, 0x8(%rbx)
movb $0x0, -0x4(%rax,%rcx)
movq (%rbx), %rsi
leaq 0x68(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rdi
callq 0xbe10
leaq 0x5ea7(%rip), %rsi      # 0x3987e
leaq 0x58(%rsp), %rdi
callq 0x35e0
movq %rbp, %rbx
negq %rbx
cmovsq %rbp, %rbx
movl $0x1, %r15d
cmpq $0xa, %rbx
jb 0x33a4b
movl $0x4, %r15d
movabsq $0x346dc5d63886594b, %rsi # imm = 0x346DC5D63886594B
movq %rbx, %rcx
cmpq $0x63, %rcx
jbe 0x33a42
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0x33a48
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0x33a4b
movq %rcx, %rax
mulq %rsi
shrq $0xb, %rdx
addl $0x4, %r15d
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0x33a0a
addl $-0x3, %r15d
jmp 0x33a4b
addl $-0x2, %r15d
jmp 0x33a4b
decl %r15d
movq %rbp, %r14
shrq $0x3f, %r14
leal (%r14,%r15), %esi
leaq 0x48(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x38(%rsp), %rdi
movl $0x2d, %edx
callq 0x33a0
addq 0x38(%rsp), %r14
movq %r14, %rdi
movl %r15d, %esi
movq %rbx, %rdx
callq 0x6dda
movq 0x58(%rsp), %rcx
movq 0x60(%rsp), %r8
movq 0x40(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r12, %rcx
je 0x33aa3
movq 0x68(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x33abe
movl $0xf, %esi
cmpq %r13, 0x38(%rsp)
je 0x33ab9
movq 0x48(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x33acf
movq 0x38(%rsp), %rsi
leaq 0x58(%rsp), %rdi
callq 0x30e0
jmp 0x33add
leaq 0x38(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3370
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x33b01
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x33b09
movupd (%rcx), %xmm0
movupd %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x37c1(%rip), %rsi      # 0x372ee
leaq 0x8(%rsp), %rdi
callq 0x35e0
leaq 0x108(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x33b67
movq %rdx, 0xf8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x108(%rsp)
jmp 0x33b70
movupd (%rcx), %xmm0
movupd %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0xf8(%rsp), %rbx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x78(%rsp), %rdi
movq %rbx, %rsi
callq 0x33e0
movq (%rbx), %rdi
cmpq %r14, %rdi
je 0x33ba9
callq 0x3310
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
movq (%rsp), %rbx
je 0x33bc0
callq 0x3310
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x33bcf
callq 0x3310
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x33bde
callq 0x3310
leaq 0xe8(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
addq %rsi, %rdx
leaq 0xd8(%rsp), %rdi
callq 0xbe10
movzbl 0x2c3c(%rbx), %edx
leaq 0x970(%rbx), %rcx
leaq 0xf8(%rsp), %r15
leaq 0xd8(%rsp), %rsi
movq %r15, %rdi
callq 0x2f394
movq %rbp, 0xa8(%rsp)
leaq 0xd70(%rbx), %r12
movq 0xd70(%rbx), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movq %rbx, %r13
leaq 0x100(%rsp), %rbx
movq -0x8(%rbx), %rax
addq -0x18(%rax), %r15
movq %r15, %rsi
callq 0x35d0
leaq 0xd78(%r13), %rdi
movq %rbx, %rsi
callq 0x3340
movq 0xe325(%rip), %rax      # 0x41fa0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x1f0(%rsp), %r15
movq %rcx, -0xf8(%r15)
movq -0x18(%rcx), %rcx
movq %rax, 0xf8(%rsp,%rcx)
movq %rbx, %rdi
callq 0x32b0
movq %r15, %rdi
callq 0x30f0
movq 0xd8(%rsp), %rdi
cmpq %r14, %rdi
je 0x33cbf
callq 0x3310
movq (%rsp), %rbx
cmpl $0x0, 0x2d18(%rbx)
jle 0x3402f
xorl %r15d, %r15d
leaq 0x5da9(%rip), %r13      # 0x39a83
movq 0x98(%rsp), %rax
leaq (%rax,%rax,2), %rbp
cmpq $0x62, %r15
ja 0x33cfc
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x3390
cmpq $0x8, %r15
ja 0x33d12
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x3390
leaq 0x1(%r15), %rsi
movq %r12, %rdi
movq %rsi, 0xb0(%rsp)
callq 0x3550
movq 0x2c58(%rbx), %rax
movq %r15, %rcx
shlq $0x5, %rcx
movq %rcx, 0x28(%rsp)
movl 0x8(%rax,%rcx), %ebx
cmpl $0x7, %ebx
jg 0x33d6d
movl $0x8, %r14d
subl %ebx, %r14d
cmpl $0x2, %r14d
movl $0x1, %eax
cmovll %eax, %r14d
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x3390
decl %r14d
jne 0x33d58
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x3390
movq (%rsp), %rax
movq 0x2c58(%rax), %rax
leaq 0x108(%rsp), %rcx
movq %rcx, 0xf8(%rsp)
movq 0x28(%rsp), %rcx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
addq %rsi, %rdx
leaq 0xf8(%rsp), %rdi
callq 0xbe10
cmpl $0xc, %ebx
jl 0x33dd3
movq 0xf8(%rsp), %rax
movq $0xb, 0x100(%rsp)
movb $0x0, 0xb(%rax)
movq 0xf8(%rsp), %rsi
movq 0x100(%rsp), %rdx
movq %r12, %rdi
callq 0x3390
movq (%rsp), %rcx
movq 0x2ce8(%rcx), %rax
cvtsi2sdl (%rax,%r15,4), %xmm0
movq 0x2cd0(%rcx), %rax
cvtsi2sdl 0x2d1c(%rcx), %xmm1
divsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl (%rax,%r15,4), %xmm1
divsd %xmm1, %xmm0
mulsd 0x3d94(%rip), %xmm0     # 0x37bb8
callq 0x1aa2c
movl %eax, %ebx
cmpl $0x9, %eax
jg 0x33e40
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x3390
movl $0x3, %edx
movq %r12, %rdi
leaq 0x5c21(%rip), %rsi      # 0x39a70
callq 0x3390
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movq %r12, %rdi
callq 0x34a0
movl $0x4, %edx
movq %rax, %rdi
leaq 0x5c02(%rip), %rsi      # 0x39a74
callq 0x3390
movq (%rsp), %rax
cmpb $0x1, 0x2ba1(%rax)
jne 0x33eed
movq (%rsp), %rax
movq 0x2c70(%rax), %rax
movq 0x28(%rsp), %rcx
cmpq $0x1, 0x8(%rax,%rcx)
jne 0x33eac
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x3390
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x3390
movq (%rsp), %rax
movq 0x2c70(%rax), %rax
movq 0x28(%rsp), %rcx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq %r12, %rdi
callq 0x3390
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x3390
movl $0x2, %edx
movq %r12, %rdi
leaq 0x3be7(%rip), %rsi      # 0x37ae3
callq 0x3390
cmpl $0x0, 0x30(%rsp)
jle 0x33fe2
xorl %r14d, %r14d
movl $0x100, %edi            # imm = 0x100
callq 0x3030
movsd 0x57e7(%rip), %xmm1     # 0x39708
movq %rax, %rbx
movq (%rsp), %rax
movq 0x2da0(%rax), %rax
movq (%rax,%rbp,8), %rax
leaq (%r15,%r15,2), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax,%r14,8), %xmm0
mulsd %xmm1, %xmm0
callq 0x1aa2c
movsd 0x57b6(%rip), %xmm1     # 0x39708
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd %xmm1, %xmm0
movq %rbx, %rdi
leaq 0x5b04(%rip), %rsi      # 0x39a6b
movb $0x1, %al
callq 0x3080
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
callq 0x3140
movq %rbx, %rdx
addq %rax, %rdx
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x6e56
movq %rbx, %rdi
callq 0x33f0
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x3390
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r12, %rdi
callq 0x3390
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x33fd1
callq 0x3310
incq %r14
cmpq %r14, 0xa0(%rsp)
jne 0x33f0f
movl $0x1, %edx
movq %r12, %rdi
leaq 0x3931(%rip), %rsi      # 0x37922
callq 0x3390
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x34010
callq 0x3310
movq (%rsp), %rbx
movslq 0x2d18(%rbx), %rax
movq 0xb0(%rsp), %rcx
movq %rcx, %r15
cmpq %rax, %rcx
jl 0x33ce6
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x34046
callq 0x3310
leaq 0x88(%rsp), %rax
movq %rbx, %rdi
movq 0xa8(%rsp), %rbp
leaq 0x78(%rsp), %rbx
movq %rax, (%rbx)
movq 0x360(%rdi), %rsi
movq 0x368(%rdi), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xbe10
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
leaq -0x4(%rcx), %rdx
movq %rdx, 0x8(%rbx)
movb $0x0, -0x4(%rax,%rcx)
movq (%rbx), %rsi
leaq 0x68(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rdi
callq 0xbe10
leaq 0x57cc(%rip), %rsi      # 0x3987e
leaq 0x58(%rsp), %rdi
callq 0x35e0
movq %rbp, %rbx
negq %rbx
cmovsq %rbp, %rbx
movl $0x1, %r15d
cmpq $0xa, %rbx
jb 0x34126
movl $0x4, %r15d
movabsq $0x346dc5d63886594b, %rsi # imm = 0x346DC5D63886594B
movq %rbx, %rcx
cmpq $0x63, %rcx
jbe 0x3411d
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0x34123
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0x34126
movq %rcx, %rax
mulq %rsi
shrq $0xb, %rdx
addl $0x4, %r15d
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0x340e5
addl $-0x3, %r15d
jmp 0x34126
addl $-0x2, %r15d
jmp 0x34126
decl %r15d
shrq $0x3f, %rbp
leal (%r15,%rbp), %esi
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x38(%rsp), %rdi
movl $0x2d, %edx
callq 0x33a0
addq 0x38(%rsp), %rbp
movq %rbp, %rdi
movl %r15d, %esi
movq %rbx, %rdx
callq 0x6dda
movq 0x58(%rsp), %rcx
movq 0x60(%rsp), %r8
movq 0x40(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r14, %rcx
je 0x3417c
movq 0x68(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x34197
movl $0xf, %esi
cmpq %r12, 0x38(%rsp)
je 0x34192
movq 0x48(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x341a8
movq 0x38(%rsp), %rsi
leaq 0x58(%rsp), %rdi
callq 0x30e0
jmp 0x341b6
leaq 0x38(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3370
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x341da
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x341e2
movupd (%rcx), %xmm0
movupd %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x31df(%rip), %rsi      # 0x373e5
leaq 0x8(%rsp), %rdi
callq 0x35e0
leaq 0x108(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x34240
movq %rdx, 0xf8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x108(%rsp)
jmp 0x34249
movupd (%rcx), %xmm0
movupd %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0xf8(%rsp), %rbx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x78(%rsp), %rdi
movq %rbx, %rsi
callq 0x33e0
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x34282
callq 0x3310
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
movq (%rsp), %rbx
je 0x34299
callq 0x3310
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x342a8
callq 0x3310
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x342b7
callq 0x3310
leaq 0xc8(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
addq %rsi, %rdx
leaq 0xb8(%rsp), %rdi
callq 0xbe10
movzbl 0x2c3c(%rbx), %edx
leaq 0x970(%rbx), %rcx
leaq 0xf8(%rsp), %r15
leaq 0xb8(%rsp), %rsi
movq %r15, %rdi
callq 0x2f394
movq %rbx, %r13
addq $0xd70, %rbx            # imm = 0xD70
movq 0xd70(%r13), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
leaq 0x100(%rsp), %r14
movq -0x8(%r14), %rax
addq -0x18(%rax), %r15
movq %r15, %rsi
callq 0x35d0
leaq 0xd78(%r13), %rdi
movq %r14, %rsi
callq 0x3340
movq 0xdc53(%rip), %rax      # 0x41fa0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x1f0(%rsp), %r15
movq %rcx, -0xf8(%r15)
movq -0x18(%rcx), %rcx
movq %rax, 0xf8(%rsp,%rcx)
movq %r14, %rdi
callq 0x32b0
movq %r15, %rdi
callq 0x30f0
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
je 0x34391
callq 0x3310
leaq 0x569e(%rip), %rsi      # 0x39a36
movl $0xb, %edx
movq %rbx, %rdi
callq 0x3390
movq (%rsp), %rax
cmpb $0x1, 0x2ba1(%rax)
jne 0x343c6
leaq 0x5689(%rip), %rsi      # 0x39a42
movl $0x11, %edx
movq %rbx, %rdi
callq 0x3390
xorl %r12d, %r12d
movq 0x30(%rsp), %rax
testl %eax, %eax
cmovgl %eax, %r12d
negl %r12d
movl $0x1, %r15d
leaq 0x5681(%rip), %r14      # 0x39a65
leal (%r12,%r15), %eax
cmpl $0x1, %eax
je 0x34411
movl $0x5, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3390
leal 0x1(%r15), %ebp
movq %rbx, %rdi
movl %r15d, %esi
callq 0x3550
movl %ebp, %r15d
jmp 0x343e4
leaq 0x350a(%rip), %rsi      # 0x37922
movl $0x1, %edx
movq %rbx, %rdi
callq 0x3390
movq 0x30(%rsp), %rax
decl %eax
movslq %eax, %r15
xorl %r14d, %r14d
movq 0x98(%rsp), %rax
leaq (%rax,%rax,2), %rbp
movq (%rsp), %rax
movslq 0x2d18(%rax), %rax
cmpq %rax, %r14
jge 0x34608
leaq 0x1(%r14), %rsi
movq %rbx, %rdi
movq %rsi, 0x28(%rsp)
callq 0x3550
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x2e1e(%rip), %rsi      # 0x37290
callq 0x3390
movq (%rsp), %rax
movq 0x2c58(%rax), %rax
movq %r14, %r12
shlq $0x5, %r12
movq (%rax,%r12), %rsi
movq 0x8(%rax,%r12), %rdx
movq %rbx, %rdi
callq 0x3390
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x2de7(%rip), %rsi      # 0x37290
callq 0x3390
movq (%rsp), %rax
cmpb $0x1, 0x2ba1(%rax)
jne 0x344eb
movq (%rsp), %rax
movq 0x2c70(%rax), %rax
movq (%rax,%r12), %rsi
movq 0x8(%rax,%r12), %rdx
movq %rbx, %rdi
callq 0x3390
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x2daa(%rip), %rsi      # 0x37290
callq 0x3390
cmpl $0x0, 0x30(%rsp)
jle 0x345ea
leaq (%r14,%r14,2), %r12
xorl %r13d, %r13d
movl $0x100, %edi            # imm = 0x100
callq 0x3030
movsd 0x51f9(%rip), %xmm1     # 0x39708
movq %rax, %r14
movq (%rsp), %rax
movq 0x2da0(%rax), %rax
movq (%rax,%rbp,8), %rax
movq (%rax,%r12,8), %rax
movsd (%rax,%r13,8), %xmm0
mulsd %xmm1, %xmm0
callq 0x1aa2c
movsd 0x51cc(%rip), %xmm1     # 0x39708
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd %xmm1, %xmm0
movq %r14, %rdi
leaq 0x551a(%rip), %rsi      # 0x39a6b
movb $0x1, %al
callq 0x3080
leaq 0x108(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq %r14, %rdi
callq 0x3140
movq %r14, %rdx
addq %rax, %rdx
leaq 0xf8(%rsp), %rdi
movq %r14, %rsi
callq 0x6e56
movq %r14, %rdi
callq 0x33f0
movq 0xf8(%rsp), %rsi
movq 0x100(%rsp), %rdx
movq %rbx, %rdi
callq 0x3390
cmpq %r15, %r13
jge 0x345bf
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x2cd6(%rip), %rsi      # 0x37290
callq 0x3390
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x345d9
callq 0x3310
incq %r13
cmpq %r13, 0xa0(%rsp)
jne 0x344fd
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x3329(%rip), %rsi      # 0x37922
callq 0x3390
movq 0x28(%rsp), %r14
jmp 0x3443e
movq %rbx, %rdi
callq 0x31f0
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x34627
callq 0x3310
addq $0x2f8, %rsp            # imm = 0x2F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x3440
jmp 0x3464e
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
jmp 0x34703
jmp 0x3475c
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3467b
callq 0x3310
jmp 0x3467b
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x34691
callq 0x3310
jmp 0x34691
jmp 0x3468e
movq %rax, %rbx
movq 0x58(%rsp), %rdi
jmp 0x346ba
jmp 0x3475c
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x3440
jmp 0x346b2
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
jne 0x34755
jmp 0x3475f
jmp 0x3475c
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x346e8
callq 0x3310
jmp 0x346e8
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x346fe
callq 0x3310
jmp 0x346fe
jmp 0x346fb
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
jne 0x34755
jmp 0x3475f
jmp 0x3475c
jmp 0x3475c
jmp 0x3475c
jmp 0x3475c
jmp 0x3473d
jmp 0x3475c
jmp 0x3475c
jmp 0x3473d
jmp 0x3475c
jmp 0x3475c
jmp 0x3473d
jmp 0x3473d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x34740
callq 0x3310
jmp 0x34740
jmp 0x3475c
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x3475f
callq 0x3310
jmp 0x3475f
movq %rax, %rbx
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x34776
callq 0x3310
movq %rbx, %rdi
callq 0x3580