// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/evo_diversity_subsampling.cpp
// Function: subsamplingDxy(int, char**)
int subsamplingDxy(int argc, char** argv) {
    parseSubsamplingDxyOptions(argc, argv);
    
    // Load up the intervals file
    std::ifstream* bedFile = new std::ifstream(opt::bedFile.c_str());
    std::map<int, string> linearToGenomeMap;
    std::cerr << "Loading coordinates from the bed file " << opt::bedFile << std::endl;
    LinkedCoordsBed coords;
    if (!opt::bElements) {
        SimpleCoordsBed simpleCoords(bedFile, linearToGenomeMap);
    } else {
        coords = LinkedCoordsBed(bedFile);
    }
    std::cerr << "Done" << std::endl;
    
    // Load up the VCF file:
    std::istream* vcfFile = createReader(opt::vcfFile.c_str());
    string line; std::unordered_map<string, Counts> vcfCountsMap;
    std::unordered_map<string, double> vcfDxyMap;
    std::unordered_map<string, double> vcfInbreedingPvalMap;
    
    std::cerr << "Loading variants from the VCF file " << opt::vcfFile << std::endl;
    double totalDxySum = 0;
    while (getline(*vcfFile, line)) {
        if (line[0] == '#' && line[1] == '#') {
        
        } else if (line[0] == '#' && line[1] == 'C') {
        
        } else {
            // totalVariantNumber++;
            //std::cerr << "Variant N:" << totalVariantNumber << std::endl;
            std::vector<std::string> fields = split(line, '\t');
            string scaffold = fields[0]; string pos = fields[1];
            Counts* counts = new Counts();
            getThisVariantCountsSimple(fields, counts);
            counts->inbreedingCoefficient = calculateInbreedingCoefficient(counts->individualsWithVariant);
            counts->chiSqPvalForInbreeding = calculateChiSqPvalForInbreeding(counts->individualsWithVariant);
            if (counts->inbreedingCoefficient < 0 && counts->chiSqPvalForInbreeding < 0.05) {
                std::cerr << "filtering out:" << std::endl;
                std::cerr << scaffold+"\t"+pos << std::endl;
                std::cerr << "counts.chiSqPvalForInbreeding: " << counts->chiSqPvalForInbreeding << std::endl;
                std::cerr << "counts.inbreedingCoefficient: " << counts->inbreedingCoefficient << std::endl;
                std::cerr << std::endl;
            } else {
                vcfCountsMap[scaffold+"\t"+pos] = *counts;
                double thisVariantDxy = calculateOverallDxy(*counts);
                totalDxySum = totalDxySum + thisVariantDxy;
                vcfDxyMap[scaffold+"\t"+pos] = thisVariantDxy;
            }
            delete counts;
        }
    }
    std::cerr << "Done" << std::endl;
    
    if (!opt::bElements) {
        int totalIntervalsLength = (int)linearToGenomeMap.size();
        std::cout << "Average Dxy = " << totalDxySum/totalIntervalsLength << std::endl;
        // Prepare the output file for subsamples of Dxy values
        size_t suffixPos = opt::bedFile.find_last_of('.');
        string outDxyFileName;
        if (suffixPos != std::string::npos) {
            outDxyFileName = opt::outFolder + stripExtension(opt::bedFile) + "_DxyVals_l" + numToString(opt::subsampleLength) + ".txt";
        } else {
            outDxyFileName = opt::outFolder + opt::bedFile + "_DxyVals_l" + numToString(opt::subsampleLength) + ".txt";
        }
        //std::cerr << "into: " << AAFileName << std::endl;
        std::ofstream* outDxyFile = new std::ofstream(outDxyFileName.c_str());
        
        
        // Subsampling:
        int numSubsamplesToDo = totalIntervalsLength/opt::subsampleLength;
        std::mt19937_64 rng; // random number generator
        rng.seed();
        std::uniform_int_distribution<int> distribution(0,totalIntervalsLength);
        std::cerr << "Now running subsamples to be written into: " << outDxyFileName << std::endl;
        for (int i = 0; i < numSubsamplesToDo; i++) {
            if (i % 10000 == 0) {
                std::cerr << "Subsample " << i << " out of " << numSubsamplesToDo << std::endl;
            }
            double subsampleDxyTotal = 0;
            for (int j = 0; j < opt::subsampleLength; j++) {
                int linearIndex = distribution(rng);
                string genomeLocation = linearToGenomeMap[linearIndex];
                if (vcfDxyMap.count(genomeLocation) == 1) {
                    subsampleDxyTotal = subsampleDxyTotal + vcfDxyMap[genomeLocation];
                }
            }
            *outDxyFile << subsampleDxyTotal/opt::subsampleLength << std::endl;
        }
    } else {
        string outDxyFileName;
        size_t suffixPos = opt::bedFile.find_last_of('.');
        if (suffixPos != std::string::npos) {
            outDxyFileName = opt::outFolder + stripExtension(opt::bedFile) + "_DxyVals_perElement.txt";
        } else {
            outDxyFileName = opt::outFolder + opt::bedFile + "_DxyVals_perElement.txt";
        } std::ofstream* outDxyFile = new std::ofstream(outDxyFileName.c_str());
        
        std::cerr << "Now calculating Dxy values per element to be written out into: " << outDxyFileName << std::endl;
        std::vector<double> elementDxyValues = coords.getMeanPerElement(vcfDxyMap);
        std::cerr << "Calculations done" << std::endl;
        std::vector<string> elementNames = coords.getElementNames();
        std::vector<std::vector<string> > elementOuterBounds = coords.getElementOuterBoundaries();
        for (int i = 0; i < (int)elementDxyValues.size(); i++) {
            *outDxyFile << elementOuterBounds[i][0] << "\t" << elementOuterBounds[i][1] << "\t" << elementOuterBounds[i][2] << "\t" << elementNames[i] << "\t" << elementDxyValues[i] << std::endl;
        }
    }
    std::cerr << "Done" << std::endl;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xbc8, %rsp            # imm = 0xBC8
callq 0x30e1b
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r14
movq 0xdc702(%rip), %rsi     # 0x10b760
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
movq %r14, 0xd8(%rsp)
leaq 0x168(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0xdbf4e(%rip), %rdi     # 0x10afe8
leaq 0x9efaf(%rip), %rsi     # 0xce050
movl $0x26, %edx
callq 0x84e0
movq 0xdc6ae(%rip), %rsi     # 0x10b760
movq 0xdc6af(%rip), %rdx     # 0x10b768
movq 0xdbf28(%rip), %rdi     # 0x10afe8
callq 0x84e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
xorpd %xmm0, %xmm0
movapd %xmm0, 0xc0(%rsp)
movq $0x0, 0xd0(%rsp)
cmpb $0x0, 0xdc6b1(%rip)     # 0x10b7c0
je 0x2f18d
leaq 0x128(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x310e6
xorpd %xmm0, %xmm0
leaq 0x200(%rsp), %rdi
movapd %xmm0, (%rdi)
movapd 0xc0(%rsp), %xmm0
movq 0xd0(%rsp), %rax
leaq 0x128(%rsp), %rbx
movups (%rbx), %xmm1
movaps %xmm1, 0xc0(%rsp)
movq 0x10(%rbx), %rcx
movq %rcx, 0xd0(%rsp)
movapd (%rdi), %xmm1
movapd %xmm0, (%rdi)
movq %rax, 0x10(%rdi)
movupd %xmm1, (%rbx)
movq $0x0, 0x10(%rbx)
callq 0x33668
movq %rbx, %rdi
callq 0x33668
jmp 0x2f1bf
leaq 0x200(%rsp), %rdi
leaq 0x128(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
leaq 0x160(%rsp), %rcx
callq 0x31ae4
leaq 0x200(%rsp), %rdi
callq 0x33302
movq 0xdbe22(%rip), %rbx     # 0x10afe8
leaq 0x9eeaa(%rip), %rsi     # 0xce077
movl $0x4, %edx
movq %rbx, %rdi
callq 0x84e0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq 0xdbdf0(%rip), %rdi     # 0x10afe8
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0xdc574(%rip), %rsi     # 0x10b780
leaq 0x200(%rsp), %rdi
leaq 0x128(%rsp), %rdx
callq 0x286de
leaq 0x200(%rsp), %rdi
movl $0x8, %esi
callq 0x53224
movq %rax, %rbx
leaq 0x210(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x2f257
movq 0x210(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x110(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x158(%rsp), %rax
movq %rax, -0x30(%rax)
movl $0x1, %ecx
movq %rcx, -0x28(%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, -0x20(%rax)
movl $0x3f800000, %edx       # imm = 0x3F800000
movl %edx, -0x10(%rax)
movupd %xmm0, -0x8(%rax)
leaq 0x1c0(%rsp), %rax
movq %rax, -0x30(%rax)
movq %rcx, -0x28(%rax)
movupd %xmm0, -0x20(%rax)
movl %edx, -0x10(%rax)
movupd %xmm0, -0x8(%rax)
leaq 0x1f8(%rsp), %rax
movq %rax, -0x30(%rax)
movq %rcx, -0x28(%rax)
movupd %xmm0, -0x20(%rax)
movl %edx, -0x10(%rax)
movupd %xmm0, -0x8(%rax)
movq 0xdbd0e(%rip), %rdi     # 0x10afe8
leaq 0x9ed9b(%rip), %rsi     # 0xce07c
movl $0x23, %edx
callq 0x84e0
movq 0xdc48e(%rip), %rsi     # 0x10b780
movq 0xdc48f(%rip), %rdx     # 0x10b788
movq 0xdbce8(%rip), %rdi     # 0x10afe8
callq 0x84e0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r15, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0x28(%rsp), %r14
xorpd %xmm0, %xmm0
movsd %xmm0, 0x78(%rsp)
movq %r14, %r15
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %rbx, %rdi
leaq 0x100(%rsp), %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2fb2e
movq 0x100(%rsp), %rax
movb (%rax), %cl
cmpb $0x23, %cl
jne 0x2f39a
cmpb $0x23, 0x1(%rax)
je 0x2f341
cmpb $0x23, %cl
jne 0x2f39a
cmpb $0x43, 0x1(%rax)
je 0x2f341
leaq 0x80(%rsp), %rdi
leaq 0x100(%rsp), %rsi
movl $0x9, %edx
callq 0x50624
movq 0x80(%rsp), %rax
movq %r13, 0x200(%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x200(%rsp), %rdi
callq 0x2e45c
movq 0x80(%rsp), %rax
leaq 0x58(%rsp), %rcx
movq %rcx, 0x48(%rsp)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x2e45c
movl $0x100, %edi            # imm = 0x100
callq 0x8470
movq %rax, %rbp
movabsq $0x7fffffff00000000, %rax # imm = 0x7FFFFFFF00000000
movq %rax, (%rbp)
xorl %ecx, %ecx
movl %ecx, 0x8(%rbp)
leaq 0x20(%rbp), %rax
movq %rax, 0x10(%rbp)
movq %rcx, 0x18(%rbp)
movb %cl, 0x20(%rbp)
leaq 0x40(%rbp), %rax
movq %rax, 0x30(%rbp)
movq %rcx, 0x38(%rbp)
movb %cl, 0x40(%rbp)
movabsq $0x7fefffffffffffff, %rax # imm = 0x7FEFFFFFFFFFFFFF
movq %rax, 0x50(%rbp)
movq %rcx, 0x58(%rbp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x60(%rbp)
movb %cl, 0x68(%rbp)
movq %rcx, 0xe0(%rbp)
movl %ecx, 0xe8(%rbp)
movq %rcx, 0xf0(%rbp)
movw $0x0, 0xf8(%rbp)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x70(%rbp)
movupd %xmm0, 0x80(%rbp)
movupd %xmm0, 0x90(%rbp)
movupd %xmm0, 0xa0(%rbp)
movupd %xmm0, 0xb0(%rbp)
movupd %xmm0, 0xc0(%rbp)
movupd %xmm0, 0xcc(%rbp)
leaq 0x80(%rsp), %rdi
movq %rbp, %rsi
callq 0x5119f
leaq 0x70(%rbp), %r12
movq %r12, %rdi
callq 0x508d1
movsd %xmm0, 0x58(%rbp)
movq %r12, %rdi
callq 0x50981
movsd %xmm0, 0x60(%rbp)
movsd 0x9eb31(%rip), %xmm1    # 0xce020
ucomisd %xmm0, %xmm1
jbe 0x2f5c7
xorpd %xmm0, %xmm0
ucomisd 0x58(%rbp), %xmm0
jbe 0x2f5c7
movl $0xe, %edx
movq 0xdbad4(%rip), %rdi     # 0x10afe8
leaq 0x9eb85(%rip), %rsi     # 0xce0a0
callq 0x84e0
movq 0xdbac1(%rip), %rcx     # 0x10afe8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq 0xdbaa3(%rip), %rdi     # 0x10afe8
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x200(%rsp), %rsi
movq 0x208(%rsp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x2e45c
movq %r14, %rdi
leaq 0xa26fd(%rip), %rsi     # 0xd1c7e
callq 0x88c0
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r14, %rdi
callq 0x8180
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2f83a
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x2f842
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x200(%rsp), %rsi
movq 0x208(%rsp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x2e45c
movq %r14, %rdi
leaq 0xa2688(%rip), %rsi     # 0xd1c7e
callq 0x88c0
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r14, %rdi
callq 0x8180
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2f635
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x2f63d
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x128(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x3435a
movq %rax, %r13
leaq 0x10(%rbp), %rsi
movl 0x8(%rbp), %eax
movl %eax, 0x8(%r13)
movq (%rbp), %rax
movq %rax, (%r13)
leaq 0x10(%r13), %rdi
callq 0x8270
leaq 0x30(%rbp), %rsi
leaq 0x30(%r13), %rdi
callq 0x8270
leaq 0x50(%rbp), %rax
movupd (%rax), %xmm0
movupd 0x9(%rax), %xmm1
movupd %xmm1, 0x59(%r13)
movupd %xmm0, 0x50(%r13)
leaq 0x70(%r13), %rdi
movq %r12, %rsi
callq 0x33980
movl $0x88, %eax
leaq (%rax,%r13), %rdi
leaq (%rax,%rbp), %rsi
callq 0x33980
movl $0xa0, %eax
leaq (%rax,%r13), %rdi
leaq (%rax,%rbp), %rsi
callq 0x33980
movl $0xb8, %eax
leaq (%rax,%r13), %rdi
leaq (%rax,%rbp), %rsi
callq 0x33980
movq %r13, %rdi
movl $0xd0, %eax
addq %rax, %rdi
movq %rbp, %rsi
addq %rax, %rsi
callq 0x33a56
movzwl 0xf8(%rbp), %eax
movw %ax, 0xf8(%r13)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2f72f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2f74b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x70(%rbp), %rax
movq 0x78(%rbp), %r12
subq %rax, %r12
shrq $0x2, %r12
movl %r12d, %r13d
decl %r13d
je 0x2f9af
movslq %r13d, %rcx
movslq %r12d, %rdx
xorl %r8d, %r8d
movq %rdx, %rsi
movq %rax, %rdi
xorl %r9d, %r9d
movq %r8, %r10
incq %r8
cmpq %rdx, %r8
jne 0x2f794
addq $0x4, %rdi
decq %rsi
cmpq %rcx, %r8
jne 0x2f778
jmp 0x2f830
movl (%rax,%r10,4), %r10d
movl $0x1, %r11d
testl %r10d, %r10d
jne 0x2f7aa
cmpl $0x0, (%rdi,%r11,4)
je 0x2f7ee
cmpl $0x1, %r10d
jne 0x2f7b7
cmpl $0x0, (%rdi,%r11,4)
je 0x2f7ea
testl %r10d, %r10d
jne 0x2f7c3
cmpl $0x1, (%rdi,%r11,4)
je 0x2f7ea
cmpl $0x1, %r10d
jne 0x2f7d0
cmpl $0x1, (%rdi,%r11,4)
je 0x2f7ea
cmpl $0x2, %r10d
jne 0x2f7dd
cmpl $0x1, (%rdi,%r11,4)
je 0x2f7ea
cmpl $0x1, %r10d
jne 0x2f7f8
cmpl $0x2, (%rdi,%r11,4)
jne 0x2f7f8
addl $0x2, %r9d
incq %r11
cmpq %r11, %rsi
jne 0x2f79e
jmp 0x2f783
cmpl $0x2, %r10d
jne 0x2f816
movl (%rdi,%r11,4), %r14d
cmpl $0x2, %r14d
je 0x2f82b
testl %r14d, %r14d
movq %r15, %r14
jne 0x2f816
addl $0x4, %r9d
jmp 0x2f7ee
testl %r10d, %r10d
jne 0x2f7ee
cmpl $0x2, (%rdi,%r11,4)
leal 0x4(%r9), %r14d
cmovnel %r9d, %r14d
movl %r14d, %r9d
movq %r15, %r14
jmp 0x2f7ee
cvtsi2sd %r9d, %xmm0
jmp 0x2f9b3
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0xdb77d(%rip), %rdi     # 0x10afe8
callq 0x84e0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r12, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2f8b6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2f8d2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x1f, %edx
movq 0xdb70a(%rip), %rdi     # 0x10afe8
leaq 0x9e7ca(%rip), %rsi     # 0xce0af
callq 0x84e0
movsd 0x60(%rbp), %xmm0
movq 0xdb6f2(%rip), %rdi     # 0x10afe8
callq 0x8730
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r12, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movl $0x1e, %edx
movq 0xdb6b7(%rip), %rdi     # 0x10afe8
leaq 0x9e797(%rip), %rsi     # 0xce0cf
callq 0x84e0
movsd 0x58(%rbp), %xmm0
movq 0xdb69f(%rip), %rdi     # 0x10afe8
callq 0x8730
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r12, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0xdb669(%rip), %rcx     # 0x10afe8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq 0xdb64b(%rip), %rdi     # 0x10afe8
callq 0x8040
movq %rax, %rdi
callq 0x8300
jmp 0x2face
xorpd %xmm0, %xmm0
movsd %xmm0, 0x68(%rsp)
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x200(%rsp), %rsi
movq 0x208(%rsp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x2e45c
movq %r14, %rdi
leaq 0xa2296(%rip), %rsi     # 0xd1c7e
callq 0x88c0
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r14, %rdi
callq 0x8180
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2fa27
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x2fa2f
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x190(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x3485c
imull %r12d, %r13d
addl %r13d, %r13d
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
movsd 0x68(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x68(%rsp)
movsd %xmm1, (%rax)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2fa98
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
leaq 0x210(%rsp), %r13
je 0x2fabc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
movsd 0x78(%rsp), %xmm0
addsd 0x68(%rsp), %xmm0
movsd %xmm0, 0x78(%rsp)
movq %rbp, %rdi
callq 0x31188
movl $0x100, %esi            # imm = 0x100
movq %rbp, %rdi
callq 0x8480
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x2faff
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x200(%rsp), %rdi
cmpq %r13, %rdi
je 0x2fb1c
movq 0x210(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x80(%rsp), %rdi
callq 0x3123c
jmp 0x2f341
movq 0xdb4b3(%rip), %rbx     # 0x10afe8
leaq 0x9e53b(%rip), %rsi     # 0xce077
movl $0x4, %edx
movq %rbx, %rdi
callq 0x84e0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq 0xdb481(%rip), %rdi     # 0x10afe8
callq 0x8040
movq %rax, %rdi
callq 0x8300
cmpb $0x0, 0xdbc45(%rip)     # 0x10b7c0
leaq 0x38(%rsp), %r15
je 0x2fc20
movq %r13, 0x200(%rsp)
movq $0x0, 0x208(%rsp)
movb $0x0, 0x210(%rsp)
leaq 0xdbbb7(%rip), %rdi     # 0x10b760
movl $0x2e, %esi
movq $-0x1, %rdx
callq 0x88f0
cmpq $-0x1, %rax
je 0x2fd27
leaq 0xdbb95(%rip), %rsi     # 0x10b760
leaq 0x28(%rsp), %rdi
callq 0x50803
movq 0xdbbc4(%rip), %rcx     # 0x10b7a0
movq 0xdbbc5(%rip), %r8      # 0x10b7a8
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2fdd8
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x2fde0
movl 0x188(%rsp), %ebx
movq 0xdb38a(%rip), %rdi     # 0x10afb8
leaq 0x9e4b9(%rip), %rsi     # 0xce0ee
movl $0xe, %edx
callq 0x84e0
cvtsi2sd %ebx, %xmm1
movsd 0x78(%rsp), %xmm0
divsd %xmm1, %xmm0
movq 0xdb364(%rip), %rdi     # 0x10afb8
callq 0x8730
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r14, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0xdbad6(%rip), %rdi     # 0x10b760
movl $0x2e, %esi
movq $-0x1, %rdx
callq 0x88f0
leaq 0x58(%rsp), %rcx
movq %rcx, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
movb $0x0, 0x58(%rsp)
cmpq $-0x1, %rax
je 0x2fd7f
leaq 0xdba9c(%rip), %rsi     # 0x10b760
leaq 0xa0(%rsp), %rdi
callq 0x50803
movq 0xdbac8(%rip), %rcx     # 0x10b7a0
movq 0xdbac9(%rip), %r8      # 0x10b7a8
leaq 0xa0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
leaq 0x90(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2feae
movq %rdx, 0x80(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x90(%rsp)
jmp 0x2feb7
leaq 0xdba72(%rip), %rsi     # 0x10b7a0
leaq 0xdba2b(%rip), %rdx     # 0x10b760
leaq 0x8(%rsp), %rdi
callq 0x31379
leaq 0x9e402(%rip), %rsi     # 0xce148
leaq 0x8(%rsp), %rdi
callq 0x88c0
leaq 0x58(%rsp), %r14
movq %r14, 0x48(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3011e
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x30127
leaq 0xdba1a(%rip), %rsi     # 0x10b7a0
leaq 0xdb9d3(%rip), %rdx     # 0x10b760
leaq 0x80(%rsp), %rdi
callq 0x31379
leaq 0x9e35c(%rip), %rsi     # 0xce0fd
leaq 0x80(%rsp), %rdi
callq 0x88c0
movq %r15, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3040d
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x30416
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x9e345(%rip), %rsi     # 0xce148
callq 0x88c0
leaq 0x58(%rsp), %r14
movq %r14, 0x48(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2fe30
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x2fe39
movupd (%rcx), %xmm0
movupd %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %rbx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x200(%rsp), %rdi
movq %rbx, %rsi
callq 0x8540
movq (%rbx), %rdi
cmpq %r14, %rdi
je 0x2fe7a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2fe96
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x30184
movq 0x38(%rsp), %rsi
jmp 0x3017c
movupd (%rcx), %xmm0
movupd %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x80(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x9e220(%rip), %rsi     # 0xce0fd
callq 0x88c0
leaq 0x38(%rsp), %rsi
movq %rsi, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2ff0a
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x2ff12
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0xdb598(%rip), %esi     # 0x10b4c8
leaq 0xe0(%rsp), %rdi
callq 0x31297
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0xe8(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
leaq 0x38(%rsp), %rdi
cmpq %rdi, %rcx
je 0x2ff67
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x2ff8c
leaq 0xf0(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x2ff87
movq 0xf0(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x2ffa0
movq 0xe0(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x8180
jmp 0x2ffb1
leaq 0xe0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x2ffd6
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x2ffde
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0xb4b53(%rip), %rsi     # 0xe4b55
leaq 0x8(%rsp), %rdi
callq 0x88c0
movq %r13, 0x200(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x30038
movq %rdx, 0x200(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x210(%rsp)
jmp 0x30042
movupd (%rcx), %xmm0
movupd %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x200(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x8540
movq (%r14), %rdi
cmpq %r13, %rdi
je 0x30086
movq 0x210(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x300a2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0xf0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x300c3
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x300df
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x80(%rsp), %rdi
cmpq %r15, %rdi
je 0x300fc
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x305fa
movq 0xb0(%rsp), %rsi
jmp 0x305f2
movupd (%rcx), %xmm0
movupd %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %rbx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x200(%rsp), %rdi
movq %rbx, %rsi
callq 0x8540
movq (%rbx), %rdi
cmpq %r14, %rdi
je 0x30168
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x30184
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %r14
movq 0x200(%rsp), %rsi
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
movq 0xdae3b(%rip), %rdi     # 0x10afe8
leaq 0x9dfac(%rip), %rsi     # 0xce160
movl $0x3f, %edx
callq 0x84e0
movq 0x200(%rsp), %rsi
movq 0x208(%rsp), %rdx
movq 0xdae13(%rip), %rdi     # 0x10afe8
callq 0x84e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0x48(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
leaq 0x190(%rsp), %rdx
callq 0x31438
movq 0xdadc3(%rip), %rbx     # 0x10afe8
leaq 0x9df74(%rip), %rsi     # 0xce1a0
movl $0x11, %edx
movq %rbx, %rdi
callq 0x84e0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq 0xdad91(%rip), %rdi     # 0x10afe8
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0x8(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x318c0
leaq 0x28(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x31980
movq 0x50(%rsp), %rax
subq 0x48(%rsp), %rax
shrq $0x3, %rax
testl %eax, %eax
jle 0x303bc
movl $0x8, %r12d
xorl %r13d, %r13d
leaq 0xa19d0(%rip), %rbx     # 0xd1c7e
xorl %ebp, %ebp
movq 0x28(%rsp), %rax
movq (%rax,%r13), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r14, %rdi
callq 0x84e0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x84e0
movq 0x28(%rsp), %rax
movq (%rax,%r13), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
movq %r15, %rdi
callq 0x84e0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x84e0
movq 0x28(%rsp), %rax
movq (%rax,%r13), %rax
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
movq %r15, %rdi
callq 0x84e0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x84e0
movq 0x8(%rsp), %rax
movq -0x8(%rax,%r12), %rsi
movq (%rax,%r12), %rdx
movq %r15, %rdi
callq 0x84e0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x84e0
movq 0x48(%rsp), %rax
movsd (%rax,%rbp,8), %xmm0
movq %r15, %rdi
callq 0x8730
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r15, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
incq %rbp
movq 0x50(%rsp), %rax
subq 0x48(%rsp), %rax
shrq $0x3, %rax
cltq
addq $0x18, %r13
addq $0x20, %r12
cmpq %rax, %rbp
jl 0x302b0
leaq 0x28(%rsp), %rdi
callq 0x31aa2
leaq 0x8(%rsp), %rdi
callq 0x3123c
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x303e7
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x200(%rsp), %rdi
leaq 0x210(%rsp), %rax
cmpq %rax, %rdi
je 0x3091b
movq 0x210(%rsp), %rsi
jmp 0x30913
movupd (%rcx), %xmm0
movupd %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0xdb094(%rip), %esi     # 0x10b4c8
leaq 0xa0(%rsp), %rdi
callq 0x31297
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0xa8(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r15, %rcx
je 0x30466
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x3048b
leaq 0xb0(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x30486
movq 0xb0(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x3049f
movq 0xa0(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x8180
jmp 0x304b0
leaq 0xa0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x304d5
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x304dd
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0xb4654(%rip), %rsi     # 0xe4b55
leaq 0x8(%rsp), %rdi
callq 0x88c0
movq %r13, 0x200(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x30537
movq %rdx, 0x200(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x210(%rsp)
jmp 0x30541
movupd (%rcx), %xmm0
movupd %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x200(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x8540
movq (%r14), %rdi
cmpq %r13, %rdi
je 0x30585
movq 0x210(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x305a1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x305c2
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x305d9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x305fa
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %r14
movq 0x48(%rsp), %rsi
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
movabsq $0x5851f42d4c957f2d, %rax # imm = 0x5851F42D4C957F2D
movl 0xdae9f(%rip), %ecx     # 0x10b4c8
movq $0x1571, 0x200(%rsp) # imm = 0x1571
movl $0x1, %edx
movl $0x1571, %edi           # imm = 0x1571
movq %rdi, %rsi
shrq $0x3e, %rsi
xorq %rdi, %rsi
imulq %rax, %rsi
addq %rdx, %rsi
movq %rsi, 0x200(%rsp,%rdx,8)
incq %rdx
movq %rsi, %rdi
cmpq $0x138, %rdx            # imm = 0x138
jne 0x30642
movq $0x138, 0xbc0(%rsp) # imm = 0x138
movq $0x1571, 0x200(%rsp) # imm = 0x1571
movl $0x1, %edx
movl $0x1571, %edi           # imm = 0x1571
movq %rdi, %rsi
shrq $0x3e, %rsi
xorq %rdi, %rsi
imulq %rax, %rsi
addq %rdx, %rsi
movq %rsi, 0x200(%rsp,%rdx,8)
incq %rdx
movq %rsi, %rdi
cmpq $0x138, %rdx            # imm = 0x138
jne 0x3068c
movq %r14, 0x120(%rsp)
movl %ebx, %eax
cltd
idivl %ecx
movl %eax, 0x74(%rsp)
movq $0x138, 0xbc0(%rsp) # imm = 0x138
movl $0x0, 0x28(%rsp)
movl %ebx, 0x2c(%rsp)
movq 0xda907(%rip), %rdi     # 0x10afe8
leaq 0x9da20(%rip), %rsi     # 0xce108
movl $0x2b, %edx
callq 0x84e0
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0xda8e5(%rip), %rdi     # 0x10afe8
callq 0x84e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
cmpl $0x0, 0x74(%rsp)
jle 0x308ff
xorl %eax, %eax
leaq 0x28(%rsp), %r13
leaq 0x160(%rsp), %r15
leaq 0x80(%rsp), %r14
leaq 0x8(%rsp), %rbp
leaq 0x190(%rsp), %rbx
movl %eax, 0x78(%rsp)
imull $0x3afb7e91, %eax, %eax # imm = 0x3AFB7E91
rorl $0x4, %eax
cmpl $0x68db8, %eax          # imm = 0x68DB8
ja 0x307ea
movl $0xa, %edx
movq 0xda867(%rip), %rdi     # 0x10afe8
leaq 0x9d9ac(%rip), %rsi     # 0xce134
callq 0x84e0
movq 0xda854(%rip), %rdi     # 0x10afe8
movl 0x78(%rsp), %esi
callq 0x8810
movq %rax, %r12
movl $0x8, %edx
movq %rax, %rdi
leaq 0x9d990(%rip), %rsi     # 0xce13f
callq 0x84e0
movq %r12, %rdi
movl 0x74(%rsp), %esi
callq 0x8810
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r12, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movl 0xdacd8(%rip), %eax     # 0x10b4c8
xorpd %xmm0, %xmm0
testl %eax, %eax
jle 0x308a1
movsd %xmm0, 0x68(%rsp)
xorl %r12d, %r12d
movq %r13, %rdi
leaq 0x200(%rsp), %rsi
movq %r13, %rdx
callq 0x3497e
movl %eax, 0x80(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x313d4
leaq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0x2e45c
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x341da
testq %rax, %rax
je 0x30871
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x34214
movsd 0x68(%rsp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, 0x68(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3088d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
incl %r12d
movl 0xdac32(%rip), %eax     # 0x10b4c8
cmpl %eax, %r12d
jl 0x30805
jmp 0x308a7
movsd %xmm0, 0x68(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd 0x68(%rsp), %xmm0
divsd %xmm1, %xmm0
movq 0x120(%rsp), %rdi
callq 0x8730
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r12, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movl 0x78(%rsp), %eax
incl %eax
cmpl 0x74(%rsp), %eax
jne 0x30761
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3091b
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xda6c6(%rip), %rbx     # 0x10afe8
leaq 0x9d74e(%rip), %rsi     # 0xce077
movl $0x4, %edx
movq %rbx, %rdi
callq 0x84e0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq 0xda694(%rip), %rdi     # 0x10afe8
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0x1c8(%rsp), %rdi
callq 0x28816
leaq 0x190(%rsp), %rdi
callq 0x28816
leaq 0x128(%rsp), %rdi
callq 0x34016
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x309ad
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0xc0(%rsp), %rdi
callq 0x33668
leaq 0x160(%rsp), %rdi
callq 0x340dc
xorl %eax, %eax
addq $0xbc8, %rsp            # imm = 0xBC8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x309ff
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x309ff
movq %rax, %rbx
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x30a25
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x30a25
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x30a46
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x30a46
movq %rax, %rbx
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x30d91
movq 0x90(%rsp), %rsi
jmp 0x30d84
jmp 0x30d8e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x30d4c
movq 0x18(%rsp), %rsi
jmp 0x30b82
jmp 0x30bae
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x30ab6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x30ab6
movq %rax, %rbx
leaq 0xf0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x30adc
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x30adc
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x30afd
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x30afd
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r15, %rdi
je 0x30b1f
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x30b1f
movq %rax, %rbx
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x30d91
movq 0xb0(%rsp), %rsi
jmp 0x30d84
jmp 0x30d8e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x30b6a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x30b6a
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x30d4c
movq 0x38(%rsp), %rsi
incq %rsi
jmp 0x30d47
jmp 0x30bae
movq %rax, %rbx
jmp 0x30d2b
jmp 0x30c4c
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdi
jmp 0x30d87
jmp 0x30d8e
movq %rax, %rbx
jmp 0x30d4c
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdi
callq 0x8480
jmp 0x30d54
jmp 0x30c68
jmp 0x30c68
jmp 0x30c7d
jmp 0x30bf3
jmp 0x30bf3
jmp 0x30bf3
jmp 0x30bf3
jmp 0x30cbc
jmp 0x30cbc
jmp 0x30bf3
jmp 0x30cbc
movq %rax, %rbx
jmp 0x30c9c
movq %rax, %rbx
leaq 0x210(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x30df9
movq 0x210(%rsp), %rsi
jmp 0x30df1
jmp 0x30c68
movq %rax, %rbx
movl $0x208, %esi            # imm = 0x208
movq %r14, %rdi
callq 0x8480
jmp 0x30e13
movq %rax, %rbx
jmp 0x30cdb
movq %rax, %rbx
jmp 0x30d00
jmp 0x30d16
movq %rax, %rbx
jmp 0x30d35
jmp 0x30d8e
jmp 0x30d16
movq %rax, %rbx
jmp 0x30d54
jmp 0x30c7d
movq %rax, %rbx
jmp 0x30df9
jmp 0x30d16
movq %rax, %rbx
jmp 0x30e06
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x30c9c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x30cbf
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x30cbf
jmp 0x30d16
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x30cdb
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x200(%rsp), %rdi
leaq 0x210(%rsp), %rax
cmpq %rax, %rdi
je 0x30d00
movq 0x210(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x80(%rsp), %rdi
callq 0x3123c
jmp 0x30dad
jmp 0x30d8e
jmp 0x30d8e
movq %rax, %rbx
jmp 0x30dad
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x31aa2
leaq 0x8(%rsp), %rdi
callq 0x3123c
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x30d4c
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
leaq 0x210(%rsp), %r13
movq 0x200(%rsp), %rdi
cmpq %r13, %rdi
je 0x30dad
movq 0x210(%rsp), %rsi
jmp 0x30da5
jmp 0x30d8e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x30d91
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x30d91
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x30dad
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x1c8(%rsp), %rdi
callq 0x28816
leaq 0x190(%rsp), %rdi
callq 0x28816
leaq 0x128(%rsp), %rdi
callq 0x34016
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x30df9
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0xc0(%rsp), %rdi
callq 0x33668
leaq 0x160(%rsp), %rdi
callq 0x340dc
movq %rbx, %rdi
callq 0x8840