// File: /workspace/github_cpp_makefile_star2_O2/millanek[P]Dsuite/Dsuite_fBranch.cpp
// Function: fBranchMain(int, char**)
int fBranchMain(int argc, char** argv) {
    parseFbranchOptions(argc, argv);
    std::istream* treeFile = new std::ifstream(opt::treeFile.c_str());
    if (!treeFile->good()) { std::cerr << "The file " << opt::treeFile << " could not be opened. Exiting..." << std::endl; exit(EXIT_FAILURE);}
    std::istream* DvalsFile = new std::ifstream(opt::DvalsFile.c_str());
    if (!DvalsFile->good()) { std::cerr << "The file " << opt::DvalsFile << " could not be opened. Exiting..." << std::endl; exit(EXIT_FAILURE);}
    if (opt::DvalsFile.substr(opt::DvalsFile.size()-9) != "_tree.txt") { std::cerr << "The name of the input file with the f4-ratio values should end in \"_tree.txt\".\nPlease make sure you run Dtrios with the --tree option and then feed the correct file into Fbranch. Exiting..." << std::endl; exit(EXIT_FAILURE); }
    std::map<string,std::vector<std::vector<string>>> acToBmap;
    string line; int l = 0;
    getline(*DvalsFile, line); // get the header
    std::vector<string> headerVec = split(line, '\t');
    int indexFg = -1; int indexZ = -1;
    if (headerVec[4] == "Z-score") { indexZ = 4; }
    if (headerVec[5] == F4HEADER || headerVec[5] == "f_G") { indexFg = 5; } else if (headerVec[6] == F4HEADER || headerVec[6] == "f_G") { indexFg = 6; }
    while (getline(*DvalsFile, line)) {
        line.erase(std::remove(line.begin(), line.end(), '\r'), line.end()); // Deal with any left over \r from files prepared on Windows
        l++; if (line == "") { std::cerr << "Please fix the format of the " << opt::DvalsFile << " file.\nLine " << l << " is empty. Exiting..." << std::endl; exit(EXIT_FAILURE); }
        std::vector<string> speciesAndVals = split(line, '\t');
        if (speciesAndVals.size() < 6 || indexFg == -1) {
            std::cerr << "Please fix the format of the " << opt::DvalsFile << " file." << std::endl;
            std::cerr << "Looks like the file does not contain f4-ratio statistics. Exiting..." << std::endl;
            exit(EXIT_FAILURE);
        }
        double f4ratio = stringToDouble(speciesAndVals[indexFg]); double Zscore = stringToDouble(speciesAndVals[indexZ]);
        double pval = 2 * (1 - normalCDF(Zscore));
        std::vector<string> bAndValLine;  bAndValLine.push_back(speciesAndVals[1]);
        if (pval < opt::pthresh) bAndValLine.push_back(speciesAndVals[indexFg]); else bAndValLine.push_back("0"); // Set non-significant f4-ratio statistics to 0
        if (indexZ != -1) bAndValLine.push_back(speciesAndVals[indexZ]);
        std::vector<string> aAndValLine;  aAndValLine.push_back(speciesAndVals[0]); aAndValLine.push_back("0");
        if (indexZ != -1) aAndValLine.push_back("0");
        acToBmap[speciesAndVals[0]+","+speciesAndVals[2]].push_back(bAndValLine);
        acToBmap[speciesAndVals[1]+","+speciesAndVals[2]].push_back(aAndValLine);
    }
    string treeString; getline(*treeFile, treeString);
    Tree* testTree = new Tree(treeString);
    testTree->updateProgenyIds();
    testTree->fillSisterBranches();
    for (std::vector<Branch*>::iterator b = testTree->branches.begin(); b != testTree->branches.end(); b++) {
        if ((*b)->parentId != "treeOrigin") {
            std::vector<string> Bs = (*b)->progenyIds;
            std::vector<string> As = (*b)->sisterBranch->progenyIds;
            //if((*b)->id == "b5") { print_vector(Bs, std::cout); }
            std::vector<double> Bmins; std::vector<double> vals;
            std::vector<double> ZBmins; std::vector<double> Zvals;
            for (std::vector<string>::iterator C = testTree->allSpecies.begin(); C != testTree->allSpecies.end(); C++) {
                for (std::vector<string>::iterator A = As.begin(); A != As.end(); A++) {
                    std::vector<std::vector<string>> bAndVal; std::vector<std::vector<string>> aAndVal;
                    try { bAndVal = acToBmap.at(*A+","+*C); } catch (const std::out_of_range& oor) {}
                    for (int i = 0; i < bAndVal.size(); i++) {
                        if (std::count(Bs.begin(), Bs.end(), bAndVal[i][0])) {
                            vals.push_back(stringToDouble(bAndVal[i][1]));
                            if (indexZ != -1) {
                                Zvals.push_back(stringToDouble(bAndVal[i][2]));
                               // std::cerr << "bAndVal[i]: "; print_vector(bAndVal[i],std::cerr);
                            }
                        }
                        //if((*b)->id == "b5") { std::cout << *A << "\t" << bAndVal[i][0] << "\t" << bAndVal[i][1] << "\tbAndVal.size():\t" << bAndVal.size() << "\ti:\t" << i << std::endl;
                            //
                        //}
                    }
                    if (!vals.empty()) { Bmins.push_back(*std::min_element(vals.begin(),vals.end())); vals.clear(); }
                    if (!Zvals.empty()) { ZBmins.push_back(*std::min_element(Zvals.begin(),Zvals.end())); Zvals.clear(); }
                    //
                }
                double fbC = NAN; double ZfbC = NAN;
                if (!Bmins.empty()) { fbC = median(Bmins.begin(),Bmins.end()); Bmins.clear(); }
                if (!ZBmins.empty()) { ZfbC = median(ZBmins.begin(),ZBmins.end()); ZBmins.clear(); }
                /* else { // There is no positive value; just find if any value is possible for this ABC combination
                    bool ACpossible = false;
                    for (std::vector<string>::iterator B = Bs.begin(); B != Bs.end(); B++) {
                        std::vector<std::vector<string>> bAndVal; std::vector<std::vector<string>> aAndVal;
                        try { bAndVal = acToBmap.at(*B+","+*C); } catch (const std::out_of_range& oor) {}
                        for (int i = 0; i < bAndVal.size(); i++) {
                            if (std::count(As.begin(), As.end(), bAndVal[i][0])) {
                                ACpossible = true; break;
                            }
                        }
                    }
                    if (ACpossible) fbC = 0;
                } */
                (*b)->fbCvals.push_back(fbC);
                (*b)->ZfbCvals.push_back(ZfbC);
                (*b)->PfbCvals.push_back(2 * (1 - normalCDF(ZfbC)));
               // std::cerr << "Here: (*b)->progenyIds: "; print_vector((*b)->progenyIds,std::cerr);
               // std::cerr << "Here: (*b)->ZfbCvals.size() " << (*b)->ZfbCvals.size() << std::endl;
               // std::cerr << "Here: (*b)->ZfbCvals: "; print_vector((*b)->ZfbCvals,std::cerr);
            }
        }
    }
    
    // Generate output
    std::cout << "branch\tbranch_descendants\t"; print_vector(testTree->allSpecies, std::cout);
    for (std::vector<Branch*>::iterator b = testTree->branches.begin(); b != testTree->branches.end(); b++) {
        if ((*b)->parentId != "treeOrigin") {
            std::cout << (*b)->id << "\t"; print_vector((*b)->progenyIds, std::cout, ',', false);
            std::cout << "\t"; print_vector((*b)->fbCvals, std::cout);
            //std::cout << "Sister branch:\t" <<  (*b)->sisterBranch->id << std::endl;
            //std::cout << "This branch progeny:\t"; print_vector((*b)->progenyIds, std::cout);
            //std::cout << "Sister branch progeny:\t"; print_vector((*b)->sisterBranch->progenyIds, std::cout);
            //std::cout << "fbCs:\t"; print_vector((*b)->fbCvals, std::cout);
            //std::cout << std::endl;
        }
    }
    if (indexZ != -1 && opt::printZb) {
        std::cout << "\n";
        std::cout << "# Z-scores:\n";
        std::cout << "branch\tbranch_descendants\t"; print_vector(testTree->allSpecies, std::cout);
        for (std::vector<Branch*>::iterator b = testTree->branches.begin(); b != testTree->branches.end(); b++) {
            if ((*b)->parentId != "treeOrigin") {
                std::cout << (*b)->id << "\t"; print_vector((*b)->progenyIds, std::cout, ',', false);
                std::cout << "\t"; print_vector((*b)->ZfbCvals, std::cout);
            }
        }
    }
    if (indexZ != -1 && opt::printPb) {
        std::cout << "\n";
        std::cout << "# p-values:\n";
        std::cout << "branch\tbranch_descendants\t"; print_vector(testTree->allSpecies, std::cout);
        for (std::vector<Branch*>::iterator b = testTree->branches.begin(); b != testTree->branches.end(); b++) {
            if ((*b)->parentId != "treeOrigin") {
                std::cout << (*b)->id << "\t"; print_vector((*b)->progenyIds, std::cout, ',', false);
                std::cout << "\t"; print_vector((*b)->PfbCvals, std::cout);
            }
        }
    }
    return 0;
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x388, %rsp            # imm = 0x388
callq 0x1f440
movl $0x208, %edi            # imm = 0x208
callq 0x7410
movq %rax, %r15
movq 0x3388a(%rip), %rsi     # 0x51b00
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x77a0
movq (%r15), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r15,%rax)
jne 0x1f13c
movl $0x208, %edi            # imm = 0x208
callq 0x7410
movq %rax, %r12
movq 0x33878(%rip), %rsi     # 0x51b20
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x77a0
movq (%r12), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r12,%rax)
jne 0x1f158
leaq 0x33852(%rip), %rsi     # 0x51b20
movq 0x33853(%rip), %rdx     # 0x51b28
addq $-0x9, %rdx
leaq 0x228(%rsp), %rbx
pushq $-0x1
popq %rcx
movq %rbx, %rdi
callq 0x7450
leaq 0x1a499(%rip), %rsi     # 0x3878c
movq %rbx, %rdi
callq 0x117d6
movl %eax, %ebp
movq %rbx, %rdi
callq 0x7898
testb %bpl, %bpl
jne 0x1f186
leaq 0x230(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x180(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x170(%rsp), %rsi
movq %r12, %rdi
callq 0x7090
leaq 0x158(%rsp), %rdi
leaq 0x170(%rsp), %rsi
pushq $0x9
popq %rdx
callq 0x88f1
movq 0x158(%rsp), %rdi
subq $-0x80, %rdi
leaq 0x1abbc(%rip), %rsi     # 0x38f36
callq 0x813d
movb %al, 0x7(%rsp)
movzbl %al, %eax
decq %rax
orq $0x4, %rax
movq %rax, 0x48(%rsp)
movl $0xa0, %r14d
movq 0x158(%rsp), %rdi
addq %r14, %rdi
leaq 0x1943d(%rip), %rsi     # 0x377e7
callq 0x813d
pushq $0x5
popq %rcx
movq %rcx, 0x10(%rsp)
testb %al, %al
movq %r15, 0x190(%rsp)
movq %r12, 0x8(%rsp)
jne 0x1e42b
addq 0x158(%rsp), %r14
leaq 0x1ab67(%rip), %rsi     # 0x38f3e
movq %r14, %rdi
callq 0x813d
testb %al, %al
jne 0x1e42b
movl $0xc0, %r14d
movq 0x158(%rsp), %rdi
addq %r14, %rdi
leaq 0x193ec(%rip), %rsi     # 0x377e7
callq 0x813d
testb %al, %al
jne 0x1e423
addq 0x158(%rsp), %r14
leaq 0x1ab2b(%rip), %rsi     # 0x38f3e
movq %r14, %rdi
callq 0x813d
testb %al, %al
je 0x1f07c
pushq $0x6
popq %rax
movq %rax, 0x10(%rsp)
xorl %ecx, %ecx
pushq $0x1
popq %rax
movl %eax, 0x1c(%rsp)
leaq 0x170(%rsp), %rbx
leaq 0x138(%rsp), %r13
notb %cl
movl %ecx, 0x40(%rsp)
shlq $0x5, 0x10(%rsp)
shlq $0x5, 0x48(%rsp)
leaq 0x348(%rsp), %r12
leaq 0x120(%rsp), %r14
leaq 0x1a0(%rsp), %rbp
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x7090
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1e75d
movq 0x170(%rsp), %rdi
movq 0x178(%rsp), %rsi
addq %rdi, %rsi
movb $0xd, 0x138(%rsp)
movq %r13, %rdx
callq 0x13671
movq 0x170(%rsp), %rdx
addq 0x178(%rsp), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x70a0
movq %rbx, %rdi
leaq 0x1aafc(%rip), %rsi     # 0x38fd1
callq 0x813d
testb %al, %al
jne 0x1f08d
leaq 0x20(%rsp), %rdi
movq %rbx, %r15
movq %rbx, %rsi
pushq $0x9
popq %rdx
callq 0x88f1
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rax
subq %rsi, %rax
cmpq $0xc0, %rax
setae %al
testb %al, 0x40(%rsp)
je 0x1f0e6
movq %r12, %rbx
addq 0x10(%rsp), %rsi
leaq 0x368(%rsp), %r12
movq %r12, %rdi
callq 0x7590
movq %r12, %rdi
callq 0xaf68
movq %r12, %rdi
callq 0x7898
movq 0x20(%rsp), %rsi
addq 0x48(%rsp), %rsi
movq %rbx, %r12
movq %rbx, %rdi
callq 0x7590
movq %r12, %rdi
callq 0xaf68
movsd %xmm0, 0x50(%rsp)
movq %r15, %rbx
movq %r12, %rdi
callq 0x7898
movsd 0x50(%rsp), %xmm0
callq 0x81e0
fstpt 0x50(%rsp)
andq $0x0, 0x70(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x60(%rsp)
movq 0x20(%rsp), %rsi
addq $0x20, %rsi
leaq 0x60(%rsp), %rdi
callq 0xbdc2
fld1
fldt 0x50(%rsp)
fsubrp %st, %st(1)
fadd %st, %st(0)
fstpl 0x198(%rsp)
movsd 0x32efa(%rip), %xmm0    # 0x514b0
ucomisd 0x198(%rsp), %xmm0
jbe 0x1e5d7
movq 0x20(%rsp), %rsi
addq 0x10(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0xbdc2
jmp 0x1e5fe
movq %r13, %rdi
leaq 0x18dd1(%rip), %rsi     # 0x373b2
movq %rbp, %rdx
callq 0x8102
leaq 0x60(%rsp), %rdi
movq %r13, %rsi
callq 0x1e154
movq %r13, %rdi
callq 0x7898
cmpb $0x0, 0x7(%rsp)
je 0x1e618
movq 0x20(%rsp), %rsi
subq $-0x80, %rsi
leaq 0x60(%rsp), %rdi
callq 0xbdc2
xorpd %xmm0, %xmm0
movapd %xmm0, 0x120(%rsp)
andq $0x0, 0x130(%rsp)
movq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0xbdc2
movq %r13, %rdi
leaq 0x18d6d(%rip), %rsi     # 0x373b2
movq %rbp, %rdx
callq 0x8102
movq %r14, %rdi
movq %r13, %rsi
callq 0x1e154
movq %r13, %rdi
callq 0x7898
cmpb $0x0, 0x7(%rsp)
je 0x1e68c
movq %r13, %rdi
leaq 0x18d41(%rip), %rsi     # 0x373b2
movq %rbp, %rdx
callq 0x8102
movq %r14, %rdi
movq %r13, %rsi
callq 0x1e154
movq %r13, %rdi
callq 0x7898
movq 0x20(%rsp), %rsi
movq %rbp, %rdi
leaq 0x1a90f(%rip), %rdx     # 0x38faa
callq 0x106e3
movq 0x20(%rsp), %rdx
addq $0x40, %rdx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x106c4
leaq 0x228(%rsp), %rdi
movq %r13, %rsi
callq 0x1f8b2
movq %rax, %rdi
leaq 0x60(%rsp), %rsi
callq 0x107d4
movq %r13, %rdi
callq 0x7898
movq %rbp, %rdi
callq 0x7898
movq 0x20(%rsp), %rsi
addq $0x20, %rsi
movq %rbp, %rdi
leaq 0x1a8b6(%rip), %rdx     # 0x38faa
callq 0x106e3
movq 0x20(%rsp), %rdx
addq $0x40, %rdx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x106c4
leaq 0x228(%rsp), %rdi
movq %r13, %rsi
callq 0x1f8b2
movq %rax, %rdi
movq %r14, %rsi
callq 0x107d4
movq %r13, %rdi
callq 0x7898
movq %rbp, %rdi
callq 0x7898
movq %r14, %rdi
callq 0xb80c
leaq 0x60(%rsp), %rdi
callq 0xb80c
leaq 0x20(%rsp), %rdi
callq 0xb80c
incl 0x1c(%rsp)
jmp 0x1e46e
leaq 0x148(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x138(%rsp), %rsi
movq 0x190(%rsp), %rdi
callq 0x7090
pushq $0x30
popq %rdi
callq 0x7410
movq %rax, %rbx
leaq 0x258(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0x7590
leaq 0x258(%rsp), %rsi
movq %rbx, %rdi
callq 0x1f918
leaq 0x258(%rsp), %rdi
callq 0x7898
movq %rbx, %rdi
callq 0x1f640
movq %rbx, %rdi
callq 0x1f7c2
movq %rbx, 0x8(%rsp)
movq 0x18(%rbx), %rbx
leaq 0x1a0(%rsp), %r14
pushq $0x18
popq %r12
leaq 0x328(%rsp), %r15
leaq 0x308(%rsp), %r13
movq 0x8(%rsp), %rax
cmpq 0x20(%rax), %rbx
je 0x1ec76
movq (%rbx), %rdi
addq $0x20, %rdi
leaq 0x1a797(%rip), %rsi     # 0x38fac
callq 0x117d6
testb %al, %al
je 0x1ec6d
movq (%rbx), %rsi
subq $-0x80, %rsi
leaq 0x60(%rsp), %rdi
callq 0xbe66
movq (%rbx), %rax
movq 0xc0(%rax), %rsi
subq $-0x80, %rsi
leaq 0x120(%rsp), %rdi
callq 0xbe66
xorpd %xmm0, %xmm0
movapd %xmm0, 0x100(%rsp)
andq $0x0, 0x110(%rsp)
movapd %xmm0, 0xe0(%rsp)
andq $0x0, 0xf0(%rsp)
movapd %xmm0, 0xc0(%rsp)
andq $0x0, 0xd0(%rsp)
movapd %xmm0, 0xa0(%rsp)
andq $0x0, 0xb0(%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rcx
movq %rbx, 0x48(%rsp)
movq 0x8(%rsp), %rax
cmpq 0x8(%rax), %rcx
je 0x1ec22
movq %rcx, 0x10(%rsp)
movq 0x120(%rsp), %rsi
cmpq 0x128(%rsp), %rsi
je 0x1eb28
xorpd %xmm0, %xmm0
movapd %xmm0, 0x80(%rsp)
andq $0x0, 0x90(%rsp)
movapd %xmm0, 0x1c0(%rsp)
andq $0x0, 0x1d0(%rsp)
leaq 0x20(%rsp), %rbp
movq %rbp, %rdi
movq %rsi, 0x50(%rsp)
leaq 0x1a69d(%rip), %rdx     # 0x38faa
callq 0x106e3
movq %r14, %rdi
movq %rbp, %rsi
movq 0x10(%rsp), %rdx
callq 0x106c4
leaq 0x228(%rsp), %rdi
movq %r14, %rsi
callq 0x2080e
leaq 0x80(%rsp), %rdi
movq %rax, %rsi
callq 0x20854
movq %r14, %rdi
callq 0x7898
leaq 0x20(%rsp), %rdi
callq 0x7898
xorl %ebx, %ebx
xorl %ebp, %ebp
movq 0x80(%rsp), %rcx
movq 0x88(%rsp), %rax
subq %rcx, %rax
cqto
idivq %r12
cmpq %rbp, %rax
jbe 0x1ea2a
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq (%rcx,%rbx), %rdx
callq 0x2d757
testq %rax, %rax
je 0x1ea1e
movq 0x80(%rsp), %rax
movq (%rax,%rbx), %rsi
addq $0x20, %rsi
movq %r15, %rdi
callq 0x7590
movq %r15, %rdi
callq 0xaf68
movsd %xmm0, 0x1a0(%rsp)
leaq 0xe0(%rsp), %rdi
movq %r14, %rsi
callq 0xd394
movq %r15, %rdi
callq 0x7898
cmpb $0x0, 0x7(%rsp)
je 0x1ea1e
movq 0x80(%rsp), %rax
movq (%rax,%rbx), %rsi
addq $0x40, %rsi
movq %r13, %rdi
callq 0x7590
movq %r13, %rdi
callq 0xaf68
movsd %xmm0, 0x1a0(%rsp)
leaq 0xa0(%rsp), %rdi
movq %r14, %rsi
callq 0xd394
movq %r13, %rdi
callq 0x7898
incq %rbp
addq $0x18, %rbx
jmp 0x1e958
movq 0xe0(%rsp), %rdi
movq 0xe8(%rsp), %rsi
cmpq %rsi, %rdi
movq 0x48(%rsp), %rbx
je 0x1ea73
callq 0x2cea5
leaq 0x100(%rsp), %rdi
movq %rax, %rsi
callq 0xb9de
movq 0xe0(%rsp), %rax
cmpq %rax, 0xe8(%rsp)
je 0x1ea73
movq %rax, 0xe8(%rsp)
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
cmpq %rsi, %rdi
je 0x1eab7
callq 0x2cea5
leaq 0xc0(%rsp), %rdi
movq %rax, %rsi
callq 0xb9de
movq 0xa0(%rsp), %rax
cmpq %rax, 0xa8(%rsp)
je 0x1eab7
movq %rax, 0xa8(%rsp)
leaq 0x1c0(%rsp), %rdi
callq 0x114b0
leaq 0x80(%rsp), %rdi
callq 0x114b0
movq 0x50(%rsp), %rsi
addq $0x20, %rsi
jmp 0x1e8c3
movq %rdx, 0x40(%rsp)
movq %rax, %rbp
jmp 0x1eafe
movq %rax, %rbp
jmp 0x1eb0d
movq %rdx, 0x40(%rsp)
movq %rax, %rbp
movq %r14, %rdi
callq 0x7898
leaq 0x20(%rsp), %rdi
callq 0x7898
movq 0x40(%rsp), %rdx
cmpl $0x1, %edx
jne 0x1f39f
movq %rbp, %rdi
callq 0x7190
callq 0x76a0
jmp 0x1e954
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
movq %rax, 0x1a0(%rsp)
movq %rax, 0x20(%rsp)
movq 0x100(%rsp), %rdi
movq 0x108(%rsp), %rsi
cmpq %rsi, %rdi
je 0x1eb7c
callq 0x20932
movsd %xmm0, 0x1a0(%rsp)
movq 0x100(%rsp), %rax
cmpq %rax, 0x108(%rsp)
je 0x1eb7c
movq %rax, 0x108(%rsp)
movq 0xc0(%rsp), %rdi
movq 0xc8(%rsp), %rsi
cmpq %rsi, %rdi
je 0x1ebb6
callq 0x20932
movsd %xmm0, 0x20(%rsp)
movq 0xc0(%rsp), %rax
cmpq %rax, 0xc8(%rsp)
je 0x1ebb6
movq %rax, 0xc8(%rsp)
movq (%rbx), %rdi
movl $0xc8, %eax
addq %rax, %rdi
movq %r14, %rsi
callq 0xb9de
movq (%rbx), %rdi
movl $0xe0, %eax
addq %rax, %rdi
leaq 0x20(%rsp), %rsi
callq 0xb9de
movq (%rbx), %rbp
movsd 0x20(%rsp), %xmm0
callq 0x81e0
addq $0xf8, %rbp
fld1
fsubp %st, %st(1)
fadd %st, %st(0)
fstpl 0x80(%rsp)
movq %rbp, %rdi
leaq 0x80(%rsp), %rsi
callq 0xd394
fldz
fstp %st(0)
movq 0x10(%rsp), %rcx
addq $0x20, %rcx
jmp 0x1e8a7
leaq 0xa0(%rsp), %rdi
callq 0xc17e
leaq 0xc0(%rsp), %rdi
callq 0xc17e
leaq 0xe0(%rsp), %rdi
callq 0xc17e
leaq 0x100(%rsp), %rdi
callq 0xc17e
leaq 0x120(%rsp), %rdi
callq 0xb80c
leaq 0x60(%rsp), %rdi
callq 0xb80c
addq $0x8, %rbx
jmp 0x1e7f8
movq 0x3231b(%rip), %rdi     # 0x50f98
leaq 0x1a333(%rip), %rsi     # 0x38fb7
callq 0x7400
movq 0x8(%rsp), %rbx
leaq 0x210(%rsp), %rdi
movq %rbx, %rsi
callq 0xbe66
movq 0x322f3(%rip), %rsi     # 0x50f98
leaq 0x210(%rsp), %rdi
pushq $0x9
popq %rdx
pushq $0x1
popq %rcx
callq 0xbdee
leaq 0x210(%rsp), %rdi
callq 0xb80c
movq 0x18(%rbx), %rbx
leaq 0x1a2dc(%rip), %r14     # 0x38fac
movq 0x322c1(%rip), %r15     # 0x50f98
leaq 0x1a2f2(%rip), %r12     # 0x38fd0
leaq 0x2f0(%rsp), %r13
leaq 0x2d8(%rsp), %rbp
movq 0x8(%rsp), %rax
cmpq 0x20(%rax), %rbx
je 0x1ed8d
movq (%rbx), %rdi
addq $0x20, %rdi
movq %r14, %rsi
callq 0x117d6
testb %al, %al
je 0x1ed84
movq (%rbx), %rsi
movq %r15, %rdi
callq 0x73c0
movq %rax, %rdi
movq %r12, %rsi
callq 0x7400
movq (%rbx), %rsi
subq $-0x80, %rsi
movq %r13, %rdi
callq 0xbe66
movq %r13, %rdi
movq %r15, %rsi
pushq $0x2c
popq %rdx
xorl %ecx, %ecx
callq 0xbdee
movq %r13, %rdi
callq 0xb80c
movq %r15, %rdi
movq %r12, %rsi
callq 0x7400
movq (%rbx), %rsi
movl $0xc8, %eax
addq %rax, %rsi
movq %rbp, %rdi
callq 0xba2e
movq %rbp, %rdi
movq %r15, %rsi
pushq $0x9
popq %rdx
pushq $0x1
popq %rcx
callq 0xbaea
movq %rbp, %rdi
callq 0xc17e
addq $0x8, %rbx
jmp 0x1ecee
cmpb $0x0, 0x7(%rsp)
je 0x1f034
cmpb $0x1, 0x32da1(%rip)     # 0x51b40
jne 0x1eee6
movq 0x321ec(%rip), %rdi     # 0x50f98
leaq 0x17687(%rip), %rsi     # 0x3643a
callq 0x7400
movq 0x8(%rsp), %rbx
movq 0x321d4(%rip), %rdi     # 0x50f98
leaq 0x1a207(%rip), %rsi     # 0x38fd2
callq 0x7400
movq 0x321c1(%rip), %rdi     # 0x50f98
leaq 0x1a1d9(%rip), %rsi     # 0x38fb7
callq 0x7400
leaq 0x1f8(%rsp), %rdi
movq %rbx, %rsi
callq 0xbe66
movq 0x3219e(%rip), %rsi     # 0x50f98
leaq 0x1f8(%rsp), %rdi
pushq $0x9
popq %rdx
pushq $0x1
popq %rcx
callq 0xbdee
leaq 0x1f8(%rsp), %rdi
callq 0xb80c
movq 0x18(%rbx), %rbp
leaq 0x1a187(%rip), %rbx     # 0x38fac
movq 0x3216c(%rip), %r14     # 0x50f98
leaq 0x1a19d(%rip), %r15     # 0x38fd0
leaq 0x2c0(%rsp), %r12
leaq 0x2a8(%rsp), %r13
movq 0x8(%rsp), %rax
cmpq 0x20(%rax), %rbp
je 0x1eee6
movq (%rbp), %rdi
addq $0x20, %rdi
movq %rbx, %rsi
callq 0x117d6
testb %al, %al
je 0x1eedd
movq (%rbp), %rsi
movq %r14, %rdi
callq 0x73c0
movq %rax, %rdi
movq %r15, %rsi
callq 0x7400
movq (%rbp), %rsi
subq $-0x80, %rsi
movq %r12, %rdi
callq 0xbe66
movq %r12, %rdi
movq %r14, %rsi
pushq $0x2c
popq %rdx
xorl %ecx, %ecx
callq 0xbdee
movq %r12, %rdi
callq 0xb80c
movq %r14, %rdi
movq %r15, %rsi
callq 0x7400
movq (%rbp), %rsi
movl $0xe0, %eax
addq %rax, %rsi
movq %r13, %rdi
callq 0xba2e
movq %r13, %rdi
movq %r14, %rsi
pushq $0x9
popq %rdx
pushq $0x1
popq %rcx
callq 0xbaea
movq %r13, %rdi
callq 0xc17e
addq $0x8, %rbp
jmp 0x1ee43
cmpb $0x1, 0x32c54(%rip)     # 0x51b41
jne 0x1f034
movq 0x3209e(%rip), %rdi     # 0x50f98
leaq 0x17539(%rip), %rsi     # 0x3643a
callq 0x7400
movq 0x8(%rsp), %rbx
movq 0x32086(%rip), %rdi     # 0x50f98
leaq 0x1a0c6(%rip), %rsi     # 0x38fdf
callq 0x7400
movq 0x32073(%rip), %rdi     # 0x50f98
leaq 0x1a08b(%rip), %rsi     # 0x38fb7
callq 0x7400
leaq 0x1e0(%rsp), %rdi
movq %rbx, %rsi
callq 0xbe66
movq 0x32050(%rip), %rsi     # 0x50f98
leaq 0x1e0(%rsp), %rdi
pushq $0x9
popq %rdx
pushq $0x1
popq %rcx
callq 0xbdee
leaq 0x1e0(%rsp), %rdi
callq 0xb80c
movq 0x18(%rbx), %rbp
leaq 0x1a039(%rip), %rbx     # 0x38fac
movq 0x3201e(%rip), %r14     # 0x50f98
leaq 0x1a04f(%rip), %r15     # 0x38fd0
leaq 0x290(%rsp), %r12
leaq 0x278(%rsp), %r13
movq 0x8(%rsp), %rax
cmpq 0x20(%rax), %rbp
je 0x1f034
movq (%rbp), %rdi
addq $0x20, %rdi
movq %rbx, %rsi
callq 0x117d6
testb %al, %al
je 0x1f02b
movq (%rbp), %rsi
movq %r14, %rdi
callq 0x73c0
movq %rax, %rdi
movq %r15, %rsi
callq 0x7400
movq (%rbp), %rsi
subq $-0x80, %rsi
movq %r12, %rdi
callq 0xbe66
movq %r12, %rdi
movq %r14, %rsi
pushq $0x2c
popq %rdx
xorl %ecx, %ecx
callq 0xbdee
movq %r12, %rdi
callq 0xb80c
movq %r14, %rdi
movq %r15, %rsi
callq 0x7400
movq (%rbp), %rsi
movl $0xf8, %eax
addq %rax, %rsi
movq %r13, %rdi
callq 0xba2e
movq %r13, %rdi
movq %r14, %rsi
pushq $0x9
popq %rdx
pushq $0x1
popq %rcx
callq 0xbaea
movq %r13, %rdi
callq 0xc17e
addq $0x8, %rbp
jmp 0x1ef91
leaq 0x138(%rsp), %rdi
callq 0x7898
leaq 0x158(%rsp), %rdi
callq 0xb80c
leaq 0x170(%rsp), %rdi
callq 0x7898
leaq 0x228(%rsp), %rdi
callq 0x2ced0
xorl %eax, %eax
addq $0x388, %rsp            # imm = 0x388
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x10(%rsp)
movb $0x1, %cl
jmp 0x1e42d
movq 0x31f54(%rip), %rdi     # 0x50fe8
leaq 0x17a0f(%rip), %rsi     # 0x36aaa
callq 0x7400
leaq 0x32a79(%rip), %rsi     # 0x51b20
movq %rax, %rdi
callq 0x73c0
leaq 0x19e8c(%rip), %rsi     # 0x38f42
movq %rax, %rdi
callq 0x7400
movq %rax, %rdi
movl 0x1c(%rsp), %esi
callq 0x7710
leaq 0x19e7e(%rip), %rsi     # 0x38f4f
movq %rax, %rdi
callq 0x7400
movq %rax, %rdi
callq 0x71e0
jmp 0x1f1a1
movq 0x31efb(%rip), %rdi     # 0x50fe8
leaq 0x179b6(%rip), %rsi     # 0x36aaa
callq 0x7400
leaq 0x32a20(%rip), %rsi     # 0x51b20
movq %rax, %rdi
callq 0x73c0
leaq 0x1c0b2(%rip), %rsi     # 0x3b1c1
movq %rax, %rdi
callq 0x7400
movq %rax, %rdi
callq 0x71e0
movq 0x31ec2(%rip), %rdi     # 0x50fe8
leaq 0x19e38(%rip), %rsi     # 0x38f65
callq 0x7400
movq %rax, %rdi
callq 0x71e0
jmp 0x1f1a1
movq 0x31ea5(%rip), %rdi     # 0x50fe8
leaq 0x17ae7(%rip), %rsi     # 0x36c31
callq 0x7400
leaq 0x329aa(%rip), %rsi     # 0x51b00
jmp 0x1f172
movq 0x31e89(%rip), %rdi     # 0x50fe8
leaq 0x17acb(%rip), %rsi     # 0x36c31
callq 0x7400
leaq 0x329ae(%rip), %rsi     # 0x51b20
movq %rax, %rdi
callq 0x73c0
leaq 0x17707(%rip), %rsi     # 0x36888
movq %rax, %rdi
jmp 0x1f194
movq 0x31e5b(%rip), %rdi     # 0x50fe8
leaq 0x19ce4(%rip), %rsi     # 0x38e78
callq 0x7400
movq %rax, %rdi
callq 0x71e0
pushq $0x1
popq %rdi
callq 0x74f0
movq %rax, %rbp
leaq 0x1e0(%rsp), %rdi
jmp 0x1f3ff
movq %rax, %rbp
leaq 0x1f8(%rsp), %rdi
jmp 0x1f3ff
jmp 0x1f38a
movq %rax, %rbp
leaq 0x210(%rsp), %rdi
jmp 0x1f3ff
movq %rax, %rbp
leaq 0x258(%rsp), %rdi
callq 0x7898
jmp 0x1f1f3
movq %rax, %rbp
pushq $0x30
popq %rsi
movq %rbx, %rdi
callq 0x7420
jmp 0x1f404
jmp 0x1f2c1
jmp 0x1f20a
movq %rax, %rbp
jmp 0x1f41e
movq %rax, %rbp
movl $0x208, %esi            # imm = 0x208
movq %r12, %rdi
jmp 0x1f22a
movq %rax, %rbp
movl $0x208, %esi            # imm = 0x208
movq %r15, %rdi
callq 0x7420
jmp 0x1f438
movq %rax, %rbp
leaq 0x290(%rsp), %rdi
jmp 0x1f3ff
movq %rax, %rbp
leaq 0x278(%rsp), %rdi
jmp 0x1f28b
movq %rax, %rbp
leaq 0x2c0(%rsp), %rdi
jmp 0x1f3ff
movq %rax, %rbp
leaq 0x2a8(%rsp), %rdi
jmp 0x1f28b
jmp 0x1f2c1
movq %rax, %rbp
leaq 0x2f0(%rsp), %rdi
jmp 0x1f3ff
movq %rax, %rbp
leaq 0x2d8(%rsp), %rdi
callq 0xc17e
jmp 0x1f404
movq %rax, %rbp
jmp 0x1f3fa
jmp 0x1f2c1
jmp 0x1f2c1
jmp 0x1f2c1
jmp 0x1f2d8
jmp 0x1f2e7
movq %rax, %rbp
leaq 0x138(%rsp), %rdi
callq 0x7898
jmp 0x1f34e
jmp 0x1f367
movq %rax, %rbp
jmp 0x1f404
jmp 0x1f30f
jmp 0x1f31a
jmp 0x1f2d1
jmp 0x1f2e7
movq %rax, %rbp
jmp 0x1f334
jmp 0x1f2e7
movq %rax, %rbp
leaq 0x138(%rsp), %rdi
jmp 0x1f33c
jmp 0x1f2e7
movq %rax, %rbp
jmp 0x1f341
jmp 0x1f30f
movq %rax, %rbp
leaq 0x348(%rsp), %rdi
jmp 0x1f308
jmp 0x1f30f
movq %rax, %rbp
leaq 0x368(%rsp), %rdi
callq 0x7898
jmp 0x1f358
movq %rax, %rbp
jmp 0x1f358
jmp 0x1f31a
jmp 0x1f31a
jmp 0x1f31a
movq %rax, %rbp
jmp 0x1f411
jmp 0x1f324
movq %rax, %rbp
leaq 0x138(%rsp), %rdi
callq 0x7898
leaq 0x1a0(%rsp), %rdi
callq 0x7898
leaq 0x120(%rsp), %rdi
callq 0xb80c
leaq 0x60(%rsp), %rdi
callq 0xb80c
leaq 0x20(%rsp), %rdi
callq 0xb80c
jmp 0x1f411
movq %rax, %rbp
jmp 0x1f34e
fstp %st(0)
jmp 0x1f370
movq %rax, %rbp
jmp 0x1f3b9
jmp 0x1f38a
jmp 0x1f38a
jmp 0x1f38a
jmp 0x1f38a
movq %rax, %rbp
leaq 0x308(%rsp), %rdi
jmp 0x1f39a
movq %rax, %rbp
jmp 0x1f39f
movq %rax, %rbp
leaq 0x328(%rsp), %rdi
callq 0x7898
leaq 0x1c0(%rsp), %rdi
callq 0x114b0
leaq 0x80(%rsp), %rdi
callq 0x114b0
leaq 0xa0(%rsp), %rdi
callq 0xc17e
leaq 0xc0(%rsp), %rdi
callq 0xc17e
leaq 0xe0(%rsp), %rdi
callq 0xc17e
leaq 0x100(%rsp), %rdi
callq 0xc17e
leaq 0x120(%rsp), %rdi
callq 0xb80c
leaq 0x60(%rsp), %rdi
callq 0xb80c
leaq 0x138(%rsp), %rdi
callq 0x7898
leaq 0x158(%rsp), %rdi
callq 0xb80c
leaq 0x170(%rsp), %rdi
callq 0x7898
leaq 0x228(%rsp), %rdi
callq 0x2ced0
movq %rbp, %rdi
callq 0x7750