// File: /workspace/github_cpp_makefile_star2_O1/bobverity[P]MavericK/writeOut.cpp
// Function: openFileStreams(globals&)
void openFileStreams(globals &globals) {
    
    // Likelihood
    if (globals.outputLikelihood_on) {
        // open file stream
        globals.outputLikelihood_fileStream = safe_ofstream(globals.outputLikelihood_filePath, globals.outputLog_on, globals.outputLog_fileStream);
        // fixed headers
        globals.outputLikelihood_fileStream << "K,mainRep,MCMCsample,loglike_marginal,loglike_joint";
        // alpha if admixture model
        if (globals.admix_on)
            globals.outputLikelihood_fileStream << ",alpha";
        
        globals.outputLikelihood_fileStream << "\n";
        globals.outputLikelihood_fileStream.flush();
    }
    
    // Evidence
    if (globals.outputEvidence_on) {
        // open file stream
        globals.outputEvidence_fileStream = safe_ofstream(globals.outputEvidence_filePath, globals.outputLog_on, globals.outputLog_fileStream);
        // exhaustive
        globals.outputEvidence_fileStream << "K,logEvidence_exhaustive";
        // harmonic
        for (int mainRep=0; mainRep<globals.mainRepeats; mainRep++) {
            globals.outputEvidence_fileStream << ",logEvidence_harmonic_rep" << mainRep+1;
        }
        globals.outputEvidence_fileStream << ",logEvidence_harmonic_grandMean,logEvidence_harmonic_grandSE";
        // structure
        for (int mainRep=0; mainRep<globals.mainRepeats; mainRep++) {
            globals.outputEvidence_fileStream << ",logEvidence_structure_rep" << mainRep+1;
        }
        globals.outputEvidence_fileStream << ",logEvidence_structure_grandMean,logEvidence_structure_grandSE";
        // TI
        globals.outputEvidence_fileStream << ",logEvidence_TI,logEvidence_TI_SE";
        
        globals.outputEvidence_fileStream << "\n";
        globals.outputEvidence_fileStream.flush();
        
    }
    
    // ComparisonStatistics
    if (globals.outputComparisonStatistics_on) {
        // open file stream
        globals.outputComparisonStatistics_fileStream = safe_ofstream(globals.outputComparisonStatistics_filePath, globals.outputLog_on, globals.outputLog_fileStream);
        // fixed headers
        globals.outputComparisonStatistics_fileStream << "K,AIC,BIC,DIC_S,DIC_G";
        
        globals.outputComparisonStatistics_fileStream << "\n";
        globals.outputComparisonStatistics_fileStream.flush();
        
    }
    
    // Evanno
    if (globals.outputEvanno_on) {
        // open file stream
        globals.outputEvanno_fileStream = safe_ofstream(globals.outputEvanno_filePath, globals.outputLog_on, globals.outputLog_fileStream);
        // fixed headers
        globals.outputEvanno_fileStream << "K,delta_K";
        
        globals.outputEvanno_fileStream << "\n";
        globals.outputEvanno_fileStream.flush();
        
    }
    
    // EvidenceDetails
    if (globals.outputEvidenceDetails_on) {
        // open file stream
        globals.outputEvidenceDetails_fileStream = safe_ofstream(globals.outputEvidenceDetails_filePath, globals.outputLog_on, globals.outputLog_fileStream);
        // fixed headers
        globals.outputEvidenceDetails_fileStream << "K";
        // structure mean and variance
        for (int mainRep=0; mainRep<globals.mainRepeats; mainRep++) {
            globals.outputEvidenceDetails_fileStream << ",structure_loglike_mean_rep" << mainRep+1;
        }
        for (int mainRep=0; mainRep<globals.mainRepeats; mainRep++) {
            globals.outputEvidenceDetails_fileStream << ",structure_loglike_var_rep" << mainRep+1;
        }
        // TI mean and standard error
        if (globals.thermodynamic_on) {
            for (int TIrep=0; TIrep<globals.thermodynamicRungs; TIrep++) {
                globals.outputEvidenceDetails_fileStream << ",TIpoint_mean_rung" << TIrep+1;
            }
            for (int TIrep=0; TIrep<globals.thermodynamicRungs; TIrep++) {
                globals.outputEvidenceDetails_fileStream << ",TIpoint_SE_rung" << TIrep+1;
            }
        }
        
        globals.outputEvidenceDetails_fileStream << "\n";
        globals.outputEvidenceDetails_fileStream.flush();
        
    }
    
    // PosteriorGrouping
    if (globals.outputPosteriorGrouping_on) {
        // open file stream
        globals.outputPosteriorGrouping_fileStream = safe_ofstream(globals.outputPosteriorGrouping_filePath, globals.outputLog_on, globals.outputLog_fileStream);
        // fixed headers
        globals.outputPosteriorGrouping_fileStream << "K,mainRep,MCMCsample";
        // non-admixture version
        if (!globals.admix_on) {
            for (int i=0; i<globals.n; i++) {
                globals.outputPosteriorGrouping_fileStream << ",ind" << i+1;
            }
        }
        // admixture version
        if (globals.admix_on) {
            for (int i=0; i<globals.n; i++) {
                for (int l=0; l<globals.loci; l++) {
                    for (int p=0; p<globals.ploidy_vec[i]; p++) {
                        globals.outputPosteriorGrouping_fileStream << ",ind" << i+1 << "_loc" << l+1 << "_copy" << p+1;
                    }
                }
            }
        }
        globals.outputPosteriorGrouping_fileStream << "\n";
        globals.outputPosteriorGrouping_fileStream.flush();
    }
    
    // MaxLike_alleleFreqs
    if (globals.outputMaxLike_alleleFreqs_on) {
        // open file stream
        globals.outputMaxLike_alleleFreqs_fileStream = safe_ofstream(globals.outputMaxLike_alleleFreqs_filePath, globals.outputLog_on, globals.outputLog_fileStream);
        // fixed headers
        globals.outputMaxLike_alleleFreqs_fileStream << "K,deme,locus,allele,frequency";
        
        globals.outputMaxLike_alleleFreqs_fileStream << "\n";
        globals.outputMaxLike_alleleFreqs_fileStream.flush();
    }
    
    // MaxLike_admixFreqs
    if (globals.outputMaxLike_admixFreqs_on) {
        // open file stream
        globals.outputMaxLike_admixFreqs_fileStream = safe_ofstream(globals.outputMaxLike_admixFreqs_filePath, globals.outputLog_on, globals.outputLog_fileStream);
        // fixed headers
        globals.outputMaxLike_admixFreqs_fileStream << "K,ind,deme,admixture_proportion";
        
        globals.outputMaxLike_admixFreqs_fileStream << "\n";
        globals.outputMaxLike_admixFreqs_fileStream.flush();
    }
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x328, %rsp            # imm = 0x328
movq %rdi, %r12
cmpb $0x1, 0x2c3d(%rdi)
movq %rdi, 0x8(%rsp)
jne 0x307f1
movq %r12, %r13
leaq 0x118(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x340(%r13), %rsi
movq 0x348(%r13), %rdx
addq %rsi, %rdx
leaq 0x108(%rsp), %rbx
movq %rbx, %rdi
callq 0xbe10
movzbl 0x2c3c(%r13), %edx
leaq 0x970(%r13), %rcx
leaq 0x128(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2f394
leaq 0xb70(%r13), %r14
movq 0xb70(%r13), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
leaq 0x130(%rsp), %rbx
movq -0x8(%rbx), %rax
addq -0x18(%rax), %r15
movq %r15, %rsi
callq 0x35d0
leaq 0xb78(%r13), %rdi
movq %rbx, %rsi
callq 0x3340
movq 0x11847(%rip), %rax     # 0x41fa0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x220(%rsp), %r15
movq %rcx, -0xf8(%r15)
movq -0x18(%rcx), %rcx
movq %rax, 0x128(%rsp,%rcx)
movq %rbx, %rdi
callq 0x32b0
movq %r15, %rdi
callq 0x30f0
movq 0x108(%rsp), %rdi
cmpq %r12, %rdi
je 0x3079d
callq 0x3310
leaq 0x8f96(%rip), %rsi      # 0x3973a
movl $0x33, %edx
movq %r14, %rdi
callq 0x3390
movq 0x8(%rsp), %r12
cmpb $0x1, 0x2bd0(%r12)
jne 0x307d5
leaq 0x8fa6(%rip), %rsi      # 0x3976e
movl $0x6, %edx
movq %r14, %rdi
callq 0x3390
leaq 0x7146(%rip), %rsi      # 0x37922
movl $0x1, %edx
movq %r14, %rdi
callq 0x3390
movq %r14, %rdi
callq 0x31f0
cmpb $0x1, 0x2c45(%r12)
jne 0x309bf
movq %r12, %r13
leaq 0xf8(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x440(%r13), %rsi
movq 0x448(%r13), %rdx
addq %rsi, %rdx
leaq 0xe8(%rsp), %rbx
movq %rbx, %rdi
callq 0xbe10
movzbl 0x2c3c(%r13), %edx
leaq 0x970(%r13), %rcx
leaq 0x128(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2f394
leaq 0x1970(%r13), %r14
movq 0x1970(%r13), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
leaq 0x130(%rsp), %rbx
movq -0x8(%rbx), %rax
addq -0x18(%rax), %r15
movq %r15, %rsi
callq 0x35d0
leaq 0x1978(%r13), %rdi
movq %rbx, %rsi
callq 0x3340
movq 0x1170a(%rip), %rax     # 0x41fa0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x220(%rsp), %r15
movq %rcx, -0xf8(%r15)
movq -0x18(%rcx), %rcx
movq %rax, 0x128(%rsp,%rcx)
movq %rbx, %rdi
callq 0x32b0
movq %r15, %rdi
callq 0x30f0
movq 0xe8(%rsp), %rdi
cmpq %r12, %rdi
je 0x308da
callq 0x3310
leaq 0x8e94(%rip), %rsi      # 0x39775
movl $0x18, %edx
movq %r14, %rdi
callq 0x3390
movq 0x8(%rsp), %r12
cmpl $0x0, 0x2c0c(%r12)
jle 0x3092d
xorl %ebx, %ebx
leaq 0x8e87(%rip), %r15      # 0x3978e
movl $0x19, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3390
incl %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x3550
cmpl 0x2c0c(%r12), %ebx
jl 0x30907
leaq 0x8e74(%rip), %rsi      # 0x397a8
movl $0x3c, %edx
movq %r14, %rdi
callq 0x3390
cmpl $0x0, 0x2c0c(%r12)
jle 0x3097b
xorl %ebx, %ebx
leaq 0x8e90(%rip), %r15      # 0x397e5
movl $0x1a, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3390
incl %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x3550
cmpl 0x2c0c(%r12), %ebx
jl 0x30955
leaq 0x8e7e(%rip), %rsi      # 0x39800
movl $0x3e, %edx
movq %r14, %rdi
callq 0x3390
leaq 0x8ea9(%rip), %rsi      # 0x3983f
movl $0x21, %edx
movq %r14, %rdi
callq 0x3390
leaq 0x6f78(%rip), %rsi      # 0x37922
movl $0x1, %edx
movq %r14, %rdi
callq 0x3390
movq %r14, %rdi
callq 0x31f0
cmpb $0x1, 0x2c49(%r12)
jne 0x30add
movq %r12, %r13
leaq 0xd8(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x4c0(%r13), %rsi
movq 0x4c8(%r13), %rdx
addq %rsi, %rdx
leaq 0xc8(%rsp), %rbx
movq %rbx, %rdi
callq 0xbe10
movzbl 0x2c3c(%r13), %edx
leaq 0x970(%r13), %rcx
leaq 0x128(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2f394
leaq 0x2170(%r13), %r14
movq 0x2170(%r13), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
leaq 0x130(%rsp), %rbx
movq -0x8(%rbx), %rax
addq -0x18(%rax), %r15
movq %r15, %rsi
callq 0x35d0
leaq 0x2178(%r13), %rdi
movq %rbx, %rsi
callq 0x3340
movq 0x1153c(%rip), %rax     # 0x41fa0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x220(%rsp), %r15
movq %rcx, -0xf8(%r15)
movq -0x18(%rcx), %rcx
movq %rax, 0x128(%rsp,%rcx)
movq %rbx, %rdi
callq 0x32b0
movq %r15, %rdi
callq 0x30f0
movq 0xc8(%rsp), %rdi
cmpq %r12, %rdi
je 0x30aa8
callq 0x3310
leaq 0x8db2(%rip), %rsi      # 0x39861
movl $0x15, %edx
movq %r14, %rdi
callq 0x3390
leaq 0x6e5f(%rip), %rsi      # 0x37922
movl $0x1, %edx
movq %r14, %rdi
callq 0x3390
movq %r14, %rdi
callq 0x31f0
movq 0x8(%rsp), %r12
cmpb $0x1, 0x2c4a(%r12)
jne 0x30bfb
movq %r12, %r13
leaq 0xb8(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x4e0(%r13), %rsi
movq 0x4e8(%r13), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %rbx
movq %rbx, %rdi
callq 0xbe10
movzbl 0x2c3c(%r13), %edx
leaq 0x970(%r13), %rcx
leaq 0x128(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2f394
leaq 0x2370(%r13), %r14
movq 0x2370(%r13), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
leaq 0x130(%rsp), %rbx
movq -0x8(%rbx), %rax
addq -0x18(%rax), %r15
movq %r15, %rsi
callq 0x35d0
leaq 0x2378(%r13), %rdi
movq %rbx, %rsi
callq 0x3340
movq 0x1141e(%rip), %rax     # 0x41fa0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x220(%rsp), %r15
movq %rcx, -0xf8(%r15)
movq -0x18(%rcx), %rcx
movq %rax, 0x128(%rsp,%rcx)
movq %rbx, %rdi
callq 0x32b0
movq %r15, %rdi
callq 0x30f0
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x30bc6
callq 0x3310
leaq 0x8caa(%rip), %rsi      # 0x39877
movl $0x9, %edx
movq %r14, %rdi
callq 0x3390
leaq 0x6d41(%rip), %rsi      # 0x37922
movl $0x1, %edx
movq %r14, %rdi
callq 0x3390
movq %r14, %rdi
callq 0x31f0
movq 0x8(%rsp), %r12
cmpb $0x1, 0x2c47(%r12)
jne 0x30e0c
movq %r12, %r13
leaq 0x98(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x480(%r13), %rsi
movq 0x488(%r13), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
callq 0xbe10
movzbl 0x2c3c(%r13), %edx
leaq 0x970(%r13), %rcx
leaq 0x128(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2f394
leaq 0x1d70(%r13), %r14
movq 0x1d70(%r13), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
leaq 0x130(%rsp), %rbx
movq -0x8(%rbx), %rax
addq -0x18(%rax), %r15
movq %r15, %rsi
callq 0x35d0
leaq 0x1d78(%r13), %rdi
movq %rbx, %rsi
callq 0x3340
movq 0x11300(%rip), %rax     # 0x41fa0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x220(%rsp), %r15
movq %rcx, -0xf8(%r15)
movq -0x18(%rcx), %rcx
movq %rax, 0x128(%rsp,%rcx)
movq %rbx, %rdi
callq 0x32b0
movq %r15, %rdi
callq 0x30f0
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x30ce4
callq 0x3310
leaq 0x8b94(%rip), %rsi      # 0x3987f
movl $0x1, %edx
movq %r14, %rdi
callq 0x3390
movq 0x8(%rsp), %r12
cmpl $0x0, 0x2c0c(%r12)
jle 0x30d37
xorl %ebx, %ebx
leaq 0x8b70(%rip), %r15      # 0x39881
movl $0x1b, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3390
incl %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x3550
cmpl 0x2c0c(%r12), %ebx
jl 0x30d11
cmpl $0x0, 0x2c0c(%r12)
jle 0x30d71
xorl %ebx, %ebx
leaq 0x8b52(%rip), %r15      # 0x3989d
movl $0x1a, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3390
incl %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x3550
cmpl 0x2c0c(%r12), %ebx
jl 0x30d4b
cmpb $0x1, 0x2c1c(%r12)
jne 0x30df0
cmpl $0x0, 0x2c20(%r12)
jle 0x30db6
xorl %ebx, %ebx
leaq 0x8b28(%rip), %r15      # 0x398b8
movl $0x12, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3390
incl %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x3550
cmpl 0x2c20(%r12), %ebx
jl 0x30d90
cmpl $0x0, 0x2c20(%r12)
jle 0x30df0
xorl %ebx, %ebx
leaq 0x8b01(%rip), %r15      # 0x398cb
movl $0x10, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3390
incl %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x3550
cmpl 0x2c20(%r12), %ebx
jl 0x30dca
leaq 0x6b2b(%rip), %rsi      # 0x37922
movl $0x1, %edx
movq %r14, %rdi
callq 0x3390
movq %r14, %rdi
callq 0x31f0
cmpb $0x1, 0x2c48(%r12)
jne 0x3107b
movq %r12, %r13
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x4a0(%r13), %rsi
movq 0x4a8(%r13), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
callq 0xbe10
movzbl 0x2c3c(%r13), %edx
leaq 0x970(%r13), %rcx
leaq 0x128(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2f394
leaq 0x1f70(%r13), %r14
movq 0x1f70(%r13), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
leaq 0x130(%rsp), %rbx
movq -0x8(%rbx), %rax
addq -0x18(%rax), %r15
movq %r15, %rsi
callq 0x35d0
leaq 0x1f78(%r13), %rdi
movq %rbx, %rsi
callq 0x3340
movq 0x110f5(%rip), %rax     # 0x41fa0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x220(%rsp), %r15
movq %rcx, -0xf8(%r15)
movq -0x18(%rcx), %rcx
movq %rax, 0x128(%rsp,%rcx)
movq %rbx, %rdi
callq 0x32b0
movq %r15, %rdi
callq 0x30f0
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x30eec
callq 0x3310
leaq 0x89e9(%rip), %rsi      # 0x398dc
movl $0x14, %edx
movq %r14, %rdi
callq 0x3390
movq 0x8(%rsp), %r12
cmpb $0x0, 0x2bd0(%r12)
jne 0x30f4a
cmpl $0x0, 0x2d18(%r12)
jle 0x30f4a
xorl %ebx, %ebx
leaq 0x89cd(%rip), %r15      # 0x398f1
movl $0x4, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3390
incl %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x3550
cmpl 0x2d18(%r12), %ebx
jl 0x30f24
movq %r14, 0x20(%rsp)
cmpb $0x1, 0x2bd0(%r12)
jne 0x3105a
cmpl $0x0, 0x2d18(%r12)
jle 0x3105a
xorl %ebp, %ebp
leaq 0x897b(%rip), %r14      # 0x398f1
movq 0x20(%rsp), %r13
cmpl $0x0, 0x2d1c(%r12)
jle 0x31046
leal 0x1(%rbp), %eax
movl %eax, 0x1c(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x2cd0(%r12), %rax
cmpl $0x0, (%rax,%rbp,4)
jle 0x3102c
movq 0x10(%rsp), %rax
leal 0x1(%rax), %ebx
xorl %r15d, %r15d
movl $0x4, %edx
movq %r13, %rdi
movq %r14, %rsi
callq 0x3390
movq %r13, %rdi
movl 0x1c(%rsp), %esi
callq 0x3550
movq %rax, %r12
movl $0x4, %edx
movq %rax, %rdi
leaq 0x8911(%rip), %rsi      # 0x398f6
callq 0x3390
movq %r12, %rdi
movl %ebx, %esi
callq 0x3550
movq %rax, %r12
movl $0x5, %edx
movq %rax, %rdi
leaq 0x8a59(%rip), %rsi      # 0x39a5f
callq 0x3390
incl %r15d
movq %r12, %rdi
movq 0x8(%rsp), %r12
movl %r15d, %esi
callq 0x3550
movq 0x2cd0(%r12), %rax
cmpl (%rax,%rbp,4), %r15d
jl 0x30fb7
movq 0x10(%rsp), %rax
incl %eax
movq %rax, 0x10(%rsp)
cmpl 0x2d1c(%r12), %eax
jl 0x30f9a
incq %rbp
movslq 0x2d18(%r12), %rax
cmpq %rax, %rbp
jl 0x30f7b
leaq 0x68c1(%rip), %rsi      # 0x37922
movl $0x1, %edx
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x3390
movq %rbx, %rdi
callq 0x31f0
cmpb $0x1, 0x2c4b(%r12)
jne 0x31190
movq %r12, %r13
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x500(%r13), %rsi
movq 0x508(%r13), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0xbe10
movzbl 0x2c3c(%r13), %edx
leaq 0x970(%r13), %rcx
leaq 0x128(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2f394
leaq 0x2570(%r13), %r14
movq 0x2570(%r13), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
leaq 0x130(%rsp), %rbx
movq -0x8(%rbx), %rax
addq -0x18(%rax), %r15
movq %r15, %rsi
callq 0x35d0
leaq 0x2578(%r13), %rdi
movq %rbx, %rsi
callq 0x3340
movq 0x10e86(%rip), %rax     # 0x41fa0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x220(%rsp), %r15
movq %rcx, -0xf8(%r15)
movq -0x18(%rcx), %rcx
movq %rax, 0x128(%rsp,%rcx)
movq %rbx, %rdi
callq 0x32b0
movq %r15, %rdi
callq 0x30f0
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x3115b
callq 0x3310
leaq 0x8799(%rip), %rsi      # 0x398fb
movl $0x1d, %edx
movq %r14, %rdi
callq 0x3390
leaq 0x67ac(%rip), %rsi      # 0x37922
movl $0x1, %edx
movq %r14, %rdi
callq 0x3390
movq %r14, %rdi
callq 0x31f0
movq 0x8(%rsp), %r12
cmpb $0x1, 0x2c4c(%r12)
jne 0x312a3
movq %r12, %r13
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x520(%r13), %rsi
movq 0x528(%r13), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0xbe10
movzbl 0x2c3c(%r13), %edx
leaq 0x970(%r13), %rcx
leaq 0x128(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2f394
leaq 0x2770(%r13), %r14
movq 0x2770(%r13), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
leaq 0x130(%rsp), %rbx
movq -0x8(%rbx), %rax
addq -0x18(%rax), %r15
movq %r15, %rsi
callq 0x35d0
addq $0x2778, %r13           # imm = 0x2778
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3340
movq 0x10d6e(%rip), %rax     # 0x41fa0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x220(%rsp), %r15
movq %rcx, -0xf8(%r15)
movq -0x18(%rcx), %rcx
movq %rax, 0x128(%rsp,%rcx)
movq %rbx, %rdi
callq 0x32b0
movq %r15, %rdi
callq 0x30f0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x31273
callq 0x3310
leaq 0x869f(%rip), %rsi      # 0x39919
movl $0x1f, %edx
movq %r14, %rdi
callq 0x3390
leaq 0x6694(%rip), %rsi      # 0x37922
movl $0x1, %edx
movq %r14, %rdi
callq 0x3390
movq %r14, %rdi
callq 0x31f0
addq $0x328, %rsp            # imm = 0x328
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x3440
jmp 0x312ca
movq %rax, %rbx
movq 0x28(%rsp), %rdi
jmp 0x313ab
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x3440
jmp 0x312e9
movq %rax, %rbx
movq 0x48(%rsp), %rdi
jmp 0x313ab
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x3440
jmp 0x31308
movq %rax, %rbx
movq 0x68(%rsp), %rdi
jmp 0x313ab
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x3440
jmp 0x31327
movq %rax, %rbx
movq 0x88(%rsp), %rdi
jmp 0x313ab
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x3440
jmp 0x31346
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
jmp 0x313ab
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x3440
jmp 0x31365
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
jmp 0x313ab
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x3440
jmp 0x31384
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
jmp 0x313ab
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x3440
jmp 0x313a3
movq %rax, %rbx
movq 0x108(%rsp), %rdi
cmpq %r12, %rdi
je 0x313b5
callq 0x3310
movq %rbx, %rdi
callq 0x3580