// File: /workspace/github_cpp_makefile_star2_O3/millanek[P]Dsuite/Dsuite_utils.cpp
// Function: GeneralSetCountsWithSplits::getSplitCountsNew(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::map<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&)
void GeneralSetCountsWithSplits::getSplitCountsNew(const std::vector<std::string>& genotypes, const std::map<size_t, string>& posToSpeciesMap) {
    
    getBasicCountsWithSplitsNew(genotypes, posToSpeciesMap);
    
    // If at least one of the outgroup individuals has non-missing data
    // Find out what is the "ancestral allele" - i.e. the one more common in the outgroup
    try {
        if (setAlleleCounts.at("Outgroup") > 0) {
            if ((double)vector_sum(setGenotypes.at("Outgroup"))/setGenotypes.at("Outgroup").size() < 0.5) { AAint = AncestralAlleleRef; }
            else { AAint = AncestralAlleleAlt; } 
        }
    } catch (std::out_of_range& e) { AAint = -1; }
    
    // Now fill in the allele frequencies
    double totalAAF = 0; int numNonZeroCounts = 0;
    for(std::map<string,std::vector<int>>::iterator it = setGenotypes.begin(); it != setGenotypes.end(); ++it) {
        if (it->first == "") {
            std::cerr << "it->first " << it->first << "\t"; print_vector(it->second, std::cerr); std::cerr << std::endl;
        }
        std::vector<int> thisSetGenotypes = setGenotypes.at(it->first);
        std::vector<double> thisSetIndividualAFs = setIndividualAFs.at(it->first);
        
        if (thisSetGenotypes.size() > 0) {
            numNonZeroCounts++;
            double thisAAF = (double)vector_sum(thisSetGenotypes)/thisSetGenotypes.size();
           // print_vector(thisSetGenotypes, std::cerr);
           // std::cerr << "thisAAF: " << thisAAF << std::endl;
            setAAFs[it->first] = thisAAF; totalAAF += thisAAF;
            
            // Take care of the splits by random sampling with replacement:
            std::random_device rd;     // only used once to initialise (seed) engine
            std::mt19937 rng(rd());    // random-number engine used (Mersenne-Twister in this case)
            std::uniform_int_distribution<int> uni(0,((int)thisSetGenotypes.size() - 1)); // guaranteed unbiased
            std::uniform_int_distribution<int> uniAFs(0,((int)thisSetIndividualAFs.size() - 1)); // guaranteed unbiased
            
         /*   std::vector<int> thisSetGenotypesSampledSplit1; std::vector<int> thisSetGenotypesSampledSplit2;
            for (int i = 0; i < thisSetGenotypes.size(); i++) {
                int random_pos_s1 = uni(rng);
                int random_pos_s2 = uni(rng);
                thisSetGenotypesSampledSplit1.push_back(thisSetGenotypes[random_pos_s1]);
                thisSetGenotypesSampledSplit2.push_back(thisSetGenotypes[random_pos_s2]);
            }
          */
            
            std::vector<double> thisSetIndividualAFsSampledSplit1; std::vector<double> thisSetIndividualAFsSampledSplit2;
            for (int i = 0; i < thisSetIndividualAFs.size(); i++) {
                int random_pos_s1 = uniAFs(rng);
                int random_pos_s2 = uniAFs(rng);
                thisSetIndividualAFsSampledSplit1.push_back(thisSetIndividualAFs[random_pos_s1]);
                thisSetIndividualAFsSampledSplit2.push_back(thisSetIndividualAFs[random_pos_s2]);
            }
            
          //  double thisAAFsplit1 = vector_average(thisSetGenotypesSampledSplit1);
          //  double thisAAFsplit2 = vector_average(thisSetGenotypesSampledSplit2);
            double thisAAFsplit1 = vector_average(thisSetIndividualAFsSampledSplit1);
            double thisAAFsplit2 = vector_average(thisSetIndividualAFsSampledSplit2);
            setAAFsplit1[it->first] = thisAAFsplit1; setAAFsplit2[it->first] = thisAAFsplit2;
            
            // Count correction as in admixtools
         //   double ya = vector_sum(thisSetGenotypes); double yb = thisSetGenotypes.size() - vector_sum(thisSetGenotypes);
         //   double yt = (double)thisSetGenotypes.size();
         //   double h = ya * yb / (yt * (yt - 1.0));
            //std::cerr << "it->first: " << it->first << std::endl;
            //std::cerr << "ya: " << ya << " ; yb: " << yb << " ; yt: " << yt << std::endl;
            //std::cerr << "h: " << h << " ; h / yt: " << h / yt << std::endl;
            
          //  setCorrectionFactors[it->first] = h / yt;
            
           // std::cerr << "it->first " << it->first << std::endl;
            try {
            if (AAint == AncestralAlleleRef) { // Ancestral allele seems to be the ref, so derived is alt
                setDAFs[it->first] = thisAAF;
                setDAFsplit1[it->first] = thisAAFsplit1; setDAFsplit2[it->first] = thisAAFsplit2;
            } else if (AAint == AncestralAlleleAlt) { // Ancestral allele seems to be alt, so derived is ref
                setDAFs[it->first] = (1 - thisAAF);
                setDAFsplit1[it->first] = 1 - thisAAFsplit1;
                setDAFsplit2[it->first] = 1 - thisAAFsplit2;
            }
                } catch (std::out_of_range& e) { std::cerr << "The trouble was here" << it->first << std::endl; }
        }
    }
    averageAAF = totalAAF/numNonZeroCounts;
    if (AAint == AncestralAlleleRef) averageDAF = averageAAF;
    else if (AAint == AncestralAlleleAlt) averageDAF = (1 - averageAAF);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2898, %rsp           # imm = 0x2898
movq %rdi, %r12
callq 0xb726
leaq 0x198(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x360b0(%rip), %rsi     # 0x41b02
leaq 0x360b1(%rip), %rdx     # 0x41b0a
leaq 0x188(%rsp), %rdi
callq 0x88ba
leaq 0xc8(%r12), %rdi
leaq 0x188(%rsp), %rsi
callq 0xd0dc
movl (%rax), %ebx
movq 0x188(%rsp), %rdi
cmpq %r14, %rdi
je 0xba9a
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x7420
testl %ebx, %ebx
jle 0xbc3e
leaq 0x188(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x3604e(%rip), %rsi     # 0x41b02
leaq 0x3604f(%rip), %rdx     # 0x41b0a
callq 0x88ba
leaq 0x8(%r12), %rbx
leaq 0x188(%rsp), %rsi
movq %rbx, %rdi
callq 0xd6ba
leaq 0xe0(%rsp), %rdi
movq %rax, %rsi
callq 0xd70e
movq 0xe0(%rsp), %rax
movq 0xe8(%rsp), %rcx
subq %rax, %rcx
je 0xbb22
sarq $0x2, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorpd %xmm1, %xmm1
xorl %edx, %edx
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%rdx,4), %xmm0
addsd %xmm0, %xmm1
incq %rdx
cmpq %rdx, %rcx
jne 0xbb0c
jmp 0xbb26
xorpd %xmm1, %xmm1
movsd %xmm1, 0x8(%rsp)
leaq 0x1520(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x35fc3(%rip), %rsi     # 0x41b02
leaq 0x35fc4(%rip), %rdx     # 0x41b0a
leaq 0x1510(%rsp), %rdi
callq 0x88ba
leaq 0x1510(%rsp), %rsi
movq %rbx, %rdi
callq 0xd6ba
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x2, %rcx
movq %rcx, %xmm0
punpckldq 0x35955(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x3595d(%rip), %xmm0    # 0x414e0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
movq 0x1510(%rsp), %rdi
cmpq %r15, %rdi
je 0xbbc0
movq 0x1520(%rsp), %rsi
incq %rsi
movapd %xmm1, 0x30(%rsp)
movapd %xmm0, 0x20(%rsp)
callq 0x7420
movapd 0x20(%rsp), %xmm0
movapd 0x30(%rsp), %xmm1
addsd %xmm0, %xmm1
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0xbbed
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
movapd %xmm1, 0x30(%rsp)
callq 0x7420
movapd 0x30(%rsp), %xmm1
movsd 0x8(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x188(%rsp), %rdi
cmpq %r14, %rdi
je 0xbc1a
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x7420
movsd 0x35856(%rip), %xmm0    # 0x41478
ucomisd 0x8(%rsp), %xmm0
jbe 0xbc35
movl $0x0, 0x4(%r12)
jmp 0xbc3e
movl $0x1, 0x4(%r12)
movq 0x20(%r12), %rax
leaq 0x10(%r12), %rcx
movq %rcx, 0x120(%rsp)
cmpq %rcx, %rax
je 0xc389
leaq 0x8(%r12), %rcx
movq %rcx, 0x118(%rsp)
leaq 0x38(%r12), %rcx
movq %rcx, 0x110(%rsp)
leaq 0x1e8(%r12), %rcx
movq %rcx, 0x108(%rsp)
leaq 0x3a8(%r12), %rcx
movq %rcx, 0x100(%rsp)
leaq 0x3d8(%r12), %rcx
movq %rcx, 0xf8(%rsp)
leaq 0x220(%r12), %rcx
movq %rcx, 0xc8(%rsp)
leaq 0x408(%r12), %rcx
movq %rcx, 0xc0(%rsp)
movq %r12, 0xd0(%rsp)
leaq 0x438(%r12), %rcx
movq %rcx, 0xb8(%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x48(%rsp)
leaq 0x1510(%rsp), %r15
leaq 0xd8(%rsp), %r12
movl $0x0, 0x14(%rsp)
movq %rax, 0x30(%rsp)
leaq 0x20(%rax), %rbp
movq %rbp, %rdi
leaq 0x38331(%rip), %rsi     # 0x44041
callq 0x70f0
testl %eax, %eax
jne 0xbdd5
movl $0xa, %edx
movq 0x4c2bf(%rip), %r14     # 0x57fe8
movq %r14, %rdi
leaq 0x359c7(%rip), %rsi     # 0x416fa
callq 0x74b0
movq 0x30(%rsp), %rbx
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq %r14, %rdi
callq 0x74b0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x382e4(%rip), %rsi     # 0x44040
callq 0x74b0
leaq 0x40(%rbx), %rsi
leaq 0x128(%rsp), %rbx
movq %rbx, %rdi
callq 0xd70e
movq %rbx, %rdi
movq %r14, %rsi
movl $0x9, %edx
movl $0x1, %ecx
callq 0xd78e
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0xbda7
movq 0x138(%rsp), %rsi
subq %rdi, %rsi
callq 0x7420
movq 0x4c23a(%rip), %rbx     # 0x57fe8
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x73f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x72e0
movq 0x118(%rsp), %rdi
movq %rbp, %rsi
callq 0xd6ba
leaq 0xa0(%rsp), %rdi
movq %rax, %rsi
callq 0xd70e
movq 0x110(%rsp), %rdi
movq %rbp, %rsi
callq 0xd840
leaq 0x88(%rsp), %rdi
movq %rax, %rsi
callq 0xd408
movq 0xa8(%rsp), %rax
cmpq 0xa0(%rsp), %rax
je 0xc2c1
leaq 0x170(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0xd70e
movq 0x170(%rsp), %rdi
movq 0x178(%rsp), %rax
subq %rdi, %rax
je 0xbe7d
sarq $0x2, %rax
cmpq $0x1, %rax
adcq $0x0, %rax
xorpd %xmm1, %xmm1
xorl %ecx, %ecx
xorps %xmm0, %xmm0
cvtsi2sdl (%rdi,%rcx,4), %xmm0
addsd %xmm0, %xmm1
incq %rcx
cmpq %rcx, %rax
jne 0xbe67
jmp 0xbe81
xorpd %xmm1, %xmm1
movsd %xmm1, 0x8(%rsp)
movq 0xa8(%rsp), %rax
subq 0xa0(%rsp), %rax
sarq $0x2, %rax
movq %rax, %xmm0
punpckldq 0x35628(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x35630(%rip), %xmm0    # 0x414e0
movapd %xmm0, 0x20(%rsp)
testq %rdi, %rdi
je 0xbecb
movq 0x180(%rsp), %rsi
subq %rdi, %rsi
callq 0x7420
movq 0x108(%rsp), %rdi
movq %rbp, %rsi
callq 0xd130
movapd 0x20(%rsp), %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd %xmm1, (%rax)
leaq 0x188(%rsp), %rbx
movq %rbx, %rdi
callq 0xd488
movq %rbx, %rdi
callq 0x75a0
incl 0x14(%rsp)
movsd 0x48(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x48(%rsp)
movl %eax, %eax
movq %rax, 0x1510(%rsp)
movl $0x1, %ecx
movq %rax, %rdx
shrq $0x1e, %rdx
xorl %eax, %edx
imull $0x6c078965, %edx, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, 0x1510(%rsp,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0xbf3e
movq 0x90(%rsp), %rax
movq 0x88(%rsp), %rcx
movq %rax, %rdx
subq %rcx, %rdx
shrq $0x3, %rdx
decl %edx
movq $0x270, 0x2890(%rsp) # imm = 0x270
movl $0x0, 0xd8(%rsp)
movl %edx, 0xdc(%rsp)
xorl %edx, %edx
movq %rdx, 0x80(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x70(%rsp)
movq %rdx, 0x60(%rsp)
movapd %xmm0, 0x50(%rsp)
cmpq %rcx, %rax
je 0xc07f
xorl %r14d, %r14d
movq %r12, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xf55e
movl %eax, %r13d
movq %r12, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xf55e
movl %eax, %ebx
movslq %r13d, %rcx
movq 0x88(%rsp), %rax
leaq (%rax,%rcx,8), %rdx
movq 0x78(%rsp), %rsi
cmpq 0x80(%rsp), %rsi
je 0xc01a
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x78(%rsp)
jmp 0xc02c
leaq 0x70(%rsp), %rdi
callq 0xf47e
movq 0x88(%rsp), %rax
movslq %ebx, %rcx
leaq (%rax,%rcx,8), %rdx
movq 0x58(%rsp), %rsi
cmpq 0x60(%rsp), %rsi
je 0xc052
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x58(%rsp)
jmp 0xc064
leaq 0x50(%rsp), %rdi
callq 0xf47e
movq 0x88(%rsp), %rax
incq %r14
movq 0x90(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
ja 0xbfc8
leaq 0x158(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xd408
movq 0x158(%rsp), %rdi
movq 0x160(%rsp), %rcx
movq %rcx, %rax
subq %rdi, %rax
sarq $0x3, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
cmpq %rdi, %rcx
je 0xc0df
cmpq $0x1, %rax
adcq $0x0, %rax
xorpd %xmm1, %xmm1
xorl %ecx, %ecx
addsd (%rdi,%rcx,8), %xmm1
incq %rcx
cmpq %rcx, %rax
jne 0xc0c6
divsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rsp)
jmp 0xc0f2
xorpd %xmm1, %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rsp)
testq %rcx, %rcx
je 0xc102
movq 0x168(%rsp), %rsi
subq %rdi, %rsi
callq 0x7420
leaq 0x140(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xd408
movq 0x140(%rsp), %rdi
movq 0x148(%rsp), %rcx
movq %rcx, %rax
subq %rdi, %rax
sarq $0x3, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
cmpq %rdi, %rcx
je 0xc162
cmpq $0x1, %rax
adcq $0x0, %rax
xorpd %xmm1, %xmm1
xorl %ecx, %ecx
addsd (%rdi,%rcx,8), %xmm1
incq %rcx
cmpq %rcx, %rax
jne 0xc149
divsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rsp)
jmp 0xc175
xorpd %xmm1, %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rsp)
testq %rcx, %rcx
je 0xc185
movq 0x150(%rsp), %rsi
subq %rdi, %rsi
callq 0x7420
movq 0x100(%rsp), %rdi
movq %rbp, %rsi
callq 0xd130
movsd 0x20(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0xf8(%rsp), %rdi
movq %rbp, %rsi
callq 0xd130
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0xd0(%rsp), %rax
movl 0x4(%rax), %eax
cmpl $0x1, %eax
je 0xc21d
testl %eax, %eax
jne 0xc283
movq 0xc8(%rsp), %rdi
movq %rbp, %rsi
callq 0xd130
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0xc0(%rsp), %rdi
movq %rbp, %rsi
callq 0xd130
movsd 0x20(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0xb8(%rsp), %rdi
movq %rbp, %rsi
callq 0xd130
movsd 0x18(%rsp), %xmm0
jmp 0xc27f
movq 0xc8(%rsp), %rdi
movq %rbp, %rsi
callq 0xd130
movsd 0x3523b(%rip), %xmm0    # 0x41470
subsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0xc0(%rsp), %rdi
movq %rbp, %rsi
callq 0xd130
movsd 0x35219(%rip), %xmm0    # 0x41470
subsd 0x20(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0xb8(%rsp), %rdi
movq %rbp, %rsi
callq 0xd130
movsd 0x351f7(%rip), %xmm0    # 0x41470
subsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0xc29a
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x7420
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0xc2b4
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x7420
leaq 0x188(%rsp), %rdi
callq 0x73d0
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0xc2de
movq 0x98(%rsp), %rsi
subq %rdi, %rsi
callq 0x7420
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xc2fb
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x7420
movq 0x30(%rsp), %rdi
callq 0x72f0
cmpq 0x120(%rsp), %rax
jne 0xbcfd
jmp 0xc36c
movq %rax, %rbp
cmpl $0x1, %edx
jne 0xc4cf
movq %rbp, %rdi
callq 0x7170
movl $0x14, %edx
movq 0x4bcb3(%rip), %rdi     # 0x57fe8
leaq 0x353c9(%rip), %rsi     # 0x41705
callq 0x74b0
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
movq 0x4bc93(%rip), %rdi     # 0x57fe8
callq 0x74b0
movq %rax, %rdi
callq 0x71b0
callq 0x76a0
jmp 0xc283
xorps %xmm0, %xmm0
cvtsi2sdl 0x14(%rsp), %xmm0
movsd 0x48(%rsp), %xmm2
divsd %xmm0, %xmm2
movq 0xd0(%rsp), %r12
jmp 0xc391
movsd 0x35107(%rip), %xmm2    # 0x41498
movapd %xmm2, %xmm1
movsd %xmm2, 0x218(%r12)
movl 0x4(%r12), %eax
testl %eax, %eax
je 0xc3bb
cmpl $0x1, %eax
jne 0xc3c9
movsd 0x350bb(%rip), %xmm0    # 0x41470
subsd %xmm1, %xmm0
jmp 0xc3bf
movapd %xmm1, %xmm0
movsd %xmm0, 0x250(%r12)
addq $0x2898, %rsp           # imm = 0x2898
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc4cc
movq %rax, %rbp
callq 0x76a0
jmp 0xc4cf
jmp 0xc54f
movq %rdx, %rbx
movq %rax, %rbp
movq 0x1510(%rsp), %rdi
cmpq %r15, %rdi
je 0xc41d
movq 0x1520(%rsp), %rsi
incq %rsi
callq 0x7420
jmp 0xc41d
movq %rdx, %rbx
movq %rax, %rbp
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0xc44e
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x7420
jmp 0xc44e
jmp 0xc440
jmp 0xc448
movq %rdx, %rbx
movq %rax, %rbp
jmp 0xc46b
movq %rdx, %rbx
movq %rax, %rbp
movq 0x188(%rsp), %rdi
cmpq %r14, %rdi
je 0xc46b
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x7420
cmpl $0x1, %ebx
jne 0xc547
movq %rbp, %rdi
callq 0x7170
movl $0xffffffff, 0x4(%r12)  # imm = 0xFFFFFFFF
callq 0x76a0
jmp 0xbc3e
movq %rax, %rbp
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0xc547
movq 0x138(%rsp), %rsi
jmp 0xc53f
jmp 0xc54f
jmp 0xc4cc
jmp 0xc4be
movq %rax, %rbp
jmp 0xc500
movq %rax, %rbp
jmp 0xc50d
jmp 0xc4cc
movq %rax, %rbp
jmp 0xc52a
jmp 0xc4cc
movq %rax, %rbp
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0xc4e6
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x7420
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0xc500
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x7420
leaq 0x188(%rsp), %rdi
callq 0x73d0
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0xc52a
movq 0x98(%rsp), %rsi
subq %rdi, %rsi
callq 0x7420
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xc547
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x7420
movq %rbp, %rdi
callq 0x7740
movq %rax, %rdi
callq 0xd5b6
nop