// File: /workspace/github_cpp_makefile_star2_O2/millanek[P]evo/process_vcf_fill_aa.cpp
// Function: fillAaMain(int, char**)
int fillAaMain(int argc, char** argv) {
    parseFillAaOptions(argc, argv);
    string line; // for reading the input files
    
    std::istream* vcfFile = createReader(opt::vcfFile.c_str());
    std::ifstream* ancSeqFile = new std::ifstream(opt::ancSeqFile.c_str());
    
    string refFastaFileRoot;
    if (opt::out.empty()) {
        refFastaFileRoot = stripExtension(opt::vcfFile);
    } else {
        refFastaFileRoot = opt::out;
    }
    // the output file
    std::ostream* outFile;
    if (opt::out == "") {
        outFile = &std::cout;
    } else {
        string outFN = refFastaFileRoot + "_AAfilled.vcf.gz";
        outFile = createWriter(outFN.c_str());
    }
    
    // Read in the whole ancestral sequence
    std::map<string, string> ancSeqs;
    getline(*ancSeqFile, line);
    string currentScaffold = line.substr(1,string::npos);
    ancSeqs[currentScaffold] = ""; ancSeqs[currentScaffold].reserve(50000000);
    while (getline(*ancSeqFile, line)) {
        if (line[0] != '>') {
            ancSeqs[currentScaffold].append(line);
        } else {
            // std::cerr << currentScaffold << " length: " << ancSeqs[currentScaffold].length() << std::endl;
            currentScaffold = line.substr(1,string::npos);
            ancSeqs[currentScaffold] = ""; ancSeqs[currentScaffold].reserve(50000000);
        }
    }
    
    // Now go through the vcf and add the AA fields
    int totalVariantNumber = 0;
    int aaDashCount = 0; int aaRefCount = 0; int aaAltCount = 0; int aaDiffCount = 0; int aaNcount = 0; int aaHetCount = 0;
    while (getline(*vcfFile, line)) {
        if (line[0] == '#' && line[1] == '#')
            *outFile << line << std::endl;
        else if (line[0] == '#' && line[1] == 'C') {
            if (opt::IndividualName == "") {
                *outFile << "##INFO=<ID=AA,Number=1,Type=String,Description=\"Ancestral allele\">" << std::endl;
                *outFile << line << std::endl;
            } else {
                *outFile << line << "\t" << opt::IndividualName << std::endl;
            }
        } else {
            totalVariantNumber++; string genotypeToAdd;
            std::vector<std::string> fields = split(line, '\t');
            std::vector<std::string> info = split(fields[7], ';');
            if (info[0] != "INDEL") {
                assert(ancSeqs.find(fields[0]) != ancSeqs.end());
                char AA;
                if (ancSeqs[fields[0]].length() == 0) {
                    AA = 'N';
                } else {
                    AA = std::toupper(ancSeqs[fields[0]][atoi(fields[1].c_str())-1]);
                    if (AA == '-') { aaDashCount++; genotypeToAdd = "./."; }
                    else if (AA == 'N') { aaNcount++; genotypeToAdd = "./."; }
                    else if (isDNAonly(AA)) {
                         if (AA == fields[3][0]) { aaRefCount++; genotypeToAdd = "0/0"; }
                        else if (AA == fields[4][0]) { aaAltCount++; genotypeToAdd = "1/1"; }
                        else if (!((AA == fields[3][0]) || (AA == fields[4][0]))) {
                            aaDiffCount++; genotypeToAdd = "./.";
                        }
                    } else {
                        aaHetCount++; string AAhetBases = returnHetIUPAC(AA);
                        if ((AAhetBases[0] == fields[3][0]) && (AAhetBases[1] == fields[4][0])) {
                            genotypeToAdd = "1/0";
                        } else if ((AAhetBases[1] == fields[3][0]) && (AAhetBases[0] == fields[4][0])) {
                            genotypeToAdd = "1/0";
                        } else {
                            genotypeToAdd = "./.";
                        }
                    }
                    // std::cerr << fields[0] << "\t" << fields[1] << "\t" << fields[3] << "\t" << fields[4] << "\t" << AA << std::endl;
                    // assert((AA == fields[3][0]) || (AA == fields[4][0]));
                }
                if (opt::IndividualName == "") {
                    fields[7] += ";AA="; fields[7] += AA;
                    print_vector(fields, *outFile, '\t');
                } else {
                    fields.push_back(genotypeToAdd);
                    print_vector(fields, *outFile, '\t');
                }
            } else {
                if (opt::IndividualName == "") {
                    *outFile << line << std::endl;
                } else {
                    fields.push_back("./.");
                    print_vector(fields, *outFile, '\t');
                }
            }
            if (totalVariantNumber % 100000 == 0) {
                double totalAAfilled = aaRefCount + aaAltCount + aaDashCount + aaDiffCount + aaNcount;
                std::cerr << totalVariantNumber << " variants processed. AA=Ref:" << aaRefCount << "("<< 100*(aaRefCount/totalAAfilled) <<"%); AA=Alt:" << aaAltCount << "("<< 100*(aaAltCount/totalAAfilled) <<"%); AA='-':" << aaDashCount << "("<< 100*(aaDashCount/totalAAfilled) << "%); AA=?(Neither Ref nor Alt):" << aaDiffCount << "("<< 100*(aaDiffCount/totalAAfilled) <<"%); AA=N:" << aaNcount << "("<< 100*(aaNcount/totalAAfilled) << "%)" << std::endl;
            }
        }
    }
    // Final summary
    double totalAAfilled = aaRefCount + aaAltCount + aaDashCount + aaDiffCount;
    std::cerr << std::endl;
    std::cerr << "All " << totalVariantNumber << " variants processed. AA=Ref:" << aaRefCount << "("<< 100*(aaRefCount/totalAAfilled) <<"%); AA=Alt:" << aaAltCount << "("<< 100*(aaAltCount/totalAAfilled) <<"%); AA='-':" << aaDashCount << "("<< 100*(aaDashCount/totalAAfilled) << "%); AA=?(Neither Ref nor Alt):" << aaDiffCount << "("<< 100*(aaDiffCount/totalAAfilled) <<"%)" << std::endl;
    
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
callq 0x3f604
leaq 0xe8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x9f77f(%rip), %rsi     # 0xde160
leaq 0x88(%rsp), %rdi
leaq 0xf8(%rsp), %rdx
callq 0x21904
leaq 0x88(%rsp), %rdi
pushq $0x8
popq %rsi
callq 0x42587
movq %rax, %r14
leaq 0x88(%rsp), %rdi
callq 0x8978
movl $0x208, %edi            # imm = 0x208
callq 0x8490
movq %rax, %r15
movq 0x9f756(%rip), %rsi     # 0xde180
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x8890
leaq 0x108(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
cmpq $0x0, 0x9f757(%rip)     # 0xde1a8
je 0x3ea69
leaq 0x9f746(%rip), %rsi     # 0xde1a0
leaq 0xf8(%rsp), %rdi
callq 0x82a0
jmp 0x3ea9d
leaq 0x9f6f0(%rip), %rsi     # 0xde160
leaq 0x88(%rsp), %rdi
callq 0x404d7
leaq 0xf8(%rsp), %rdi
leaq 0x88(%rsp), %rbx
movq %rbx, %rsi
callq 0x8550
movq %rbx, %rdi
callq 0x8978
leaq 0x9f6fc(%rip), %rdi     # 0xde1a0
leaq 0x5b374(%rip), %rsi     # 0x99e1f
callq 0x2193f
testb %al, %al
je 0x3eac2
movq 0x9e4fd(%rip), %rax     # 0xdcfb8
movq %rax, 0x8(%rsp)
jmp 0x3eb27
leaq 0x5fff7(%rip), %rdx     # 0x9eac0
leaq 0x88(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x28806
movq 0x88(%rsp), %rsi
leaq 0xb8(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x21904
leaq 0xb8(%rsp), %rdi
pushq $0x10
popq %rsi
callq 0x42616
movq %rax, 0x8(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x8978
leaq 0x88(%rsp), %rdi
callq 0x8978
leaq 0x90(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0xd8(%rsp), %rsi
movq %r15, %rdi
callq 0x80a0
leaq 0xb8(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
pushq $0x1
popq %rdx
pushq $-0x1
popq %rcx
callq 0x84b0
movq %r14, 0x18(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x3210e
leaq 0x5b28f(%rip), %rsi     # 0x99e1f
movq %rax, %rdi
callq 0x88f0
leaq 0x88(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x3210e
movl $0x2faf080, %esi        # imm = 0x2FAF080
movq %rax, %rdi
callq 0x8700
leaq 0xd8(%rsp), %r13
leaq 0x68(%rsp), %r12
leaq 0xb8(%rsp), %r14
leaq 0x88(%rsp), %rbp
leaq 0x5b241(%rip), %rbx     # 0x99e1f
movq %r15, %rdi
movq %r13, %rsi
callq 0x80a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3ec73
movq 0xd8(%rsp), %rax
cmpb $0x3e, (%rax)
jne 0x3ec58
movq %r12, %rdi
movq %r13, %rsi
pushq $0x1
popq %rdx
pushq $-0x1
popq %rcx
callq 0x84b0
movq %r14, %rdi
movq %r12, %rsi
callq 0x8550
movq %r12, %rdi
callq 0x8978
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3210e
movq %rax, %rdi
movq %rbx, %rsi
callq 0x88f0
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3210e
movl $0x2faf080, %esi        # imm = 0x2FAF080
movq %rax, %rdi
callq 0x8700
jmp 0x3ebde
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3210e
movq %rax, %rdi
movq %r13, %rsi
callq 0x8920
jmp 0x3ebde
movl $0x0, 0x4(%rsp)
leaq 0x9f53e(%rip), %r12     # 0xde1c0
movq $0x0, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
movl $0x0, 0x10(%rsp)
movq 0x18(%rsp), %rbx
movq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r13, %rsi
callq 0x80a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3f302
movq 0xd8(%rsp), %rax
cmpb $0x23, (%rax)
jne 0x3ed5a
movzbl 0x1(%rax), %eax
movq %r14, %rdi
movq %r13, %rsi
cmpl $0x23, %eax
je 0x3ed48
cmpl $0x43, %eax
jne 0x3ed5a
movq %r12, %rdi
leaq 0x5b11f(%rip), %rsi     # 0x99e1f
callq 0x2193f
testb %al, %al
je 0x3ed28
movq %r14, %rdi
leaq 0x5fdbe(%rip), %rsi     # 0x9ead1
callq 0x8480
movq %rax, %rdi
callq 0x8230
movq %r14, %rdi
movq %r13, %rsi
jmp 0x3ed48
movq %r14, %rdi
movq %r13, %rsi
callq 0x8430
movq %rax, %rdi
leaq 0x5b0e1(%rip), %rsi     # 0x99e1e
callq 0x8480
movq %rax, %rdi
movq %r12, %rsi
callq 0x8430
movq %rax, %rdi
callq 0x8230
jmp 0x3ecb8
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
andq $0x0, 0x70(%rsp)
movb $0x0, 0x78(%rsp)
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
pushq $0x9
popq %rdx
callq 0x40349
movq 0x50(%rsp), %rsi
movl $0xe0, %eax
addq %rax, %rsi
leaq 0x138(%rsp), %rdi
pushq $0x3b
popq %rdx
callq 0x40349
movq 0x138(%rsp), %rdi
leaq 0x5890f(%rip), %rsi     # 0x976ba
callq 0x2ea9b
testb %al, %al
je 0x3ee71
movq 0x50(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0x3f866
leaq 0x90(%rsp), %rcx
cmpq %rcx, %rax
je 0x3f4c0
movq 0x50(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0x3210e
cmpq $0x0, 0x8(%rax)
je 0x3eefe
movq 0x50(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0x3210e
movq %rax, %rbx
movq 0x50(%rsp), %r14
movq 0x20(%r14), %rdi
callq 0x86f0
movq (%rbx), %rcx
cltq
movsbl -0x1(%rcx,%rax), %edi
callq 0x88b0
movl %eax, %ebp
shll $0x18, %eax
cmpl $0x4e000000, %eax       # imm = 0x4E000000
je 0x3ef06
cmpl $0x2d000000, %eax       # imm = 0x2D000000
jne 0x3ef2a
leaq 0x68(%rsp), %rdi
leaq 0x5fd21(%rip), %rsi     # 0x9eb72
callq 0x88f0
movq 0x18(%rsp), %rbx
movq 0x8(%rsp), %r14
movq 0x38(%rsp), %rax
incl %eax
movq %rax, 0x38(%rsp)
jmp 0x3f063
movq %r12, %rdi
leaq 0x5afa4(%rip), %rsi     # 0x99e1f
callq 0x2193f
testb %al, %al
je 0x3ee9c
movq %r14, %rdi
movq %r13, %rsi
callq 0x8430
movq %rax, %rdi
callq 0x8230
jmp 0x3f114
leaq 0x118(%rsp), %rbp
movq %rbp, %rdi
leaq 0x5fcc4(%rip), %rsi     # 0x9eb72
leaq 0x27(%rsp), %rdx
callq 0x21904
leaq 0x50(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
callq 0x3490e
movq %rbp, %rdi
callq 0x8978
leaq 0x150(%rsp), %rdi
movq %r15, %rsi
callq 0x297dc
leaq 0x150(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
pushq $0x9
popq %rdx
pushq $0x1
popq %rcx
callq 0x2ea24
jmp 0x3f10c
movb $0x4e, %bpl
jmp 0x3f063
leaq 0x68(%rsp), %rdi
leaq 0x5fc60(%rip), %rsi     # 0x9eb72
callq 0x88f0
movq 0x18(%rsp), %rbx
movq 0x8(%rsp), %r14
incl 0x4(%rsp)
jmp 0x3f063
movsbl %bpl, %esi
movzbl %sil, %eax
addl $-0x41, %eax
cmpl $0x13, %eax
ja 0x3efe6
movl $0x80045, %ecx          # imm = 0x80045
btl %eax, %ecx
jae 0x3efe6
movq 0x60(%r14), %rax
movsbl (%rax), %eax
cmpl %eax, %esi
jne 0x3ef83
leaq 0x68(%rsp), %rdi
leaq 0x5fc13(%rip), %rsi     # 0x9eb76
callq 0x88f0
movq 0x18(%rsp), %rbx
movq 0x8(%rsp), %r14
movq 0x40(%rsp), %rax
incl %eax
movq %rax, 0x40(%rsp)
jmp 0x3f063
movq 0x80(%r14), %rax
movsbl (%rax), %eax
cmpl %eax, %esi
jne 0x3efbd
leaq 0x68(%rsp), %rdi
leaq 0x5fbdd(%rip), %rsi     # 0x9eb7a
callq 0x88f0
movq 0x18(%rsp), %rbx
movq 0x8(%rsp), %r14
movq 0x30(%rsp), %rax
incl %eax
movq %rax, 0x30(%rsp)
jmp 0x3f063
leaq 0x68(%rsp), %rdi
leaq 0x5fba9(%rip), %rsi     # 0x9eb72
callq 0x88f0
movq 0x18(%rsp), %rbx
movq 0x8(%rsp), %r14
movq 0x28(%rsp), %rax
incl %eax
movq %rax, 0x28(%rsp)
jmp 0x3f063
leaq 0x118(%rsp), %rdi
callq 0x3f7cb
movq 0x118(%rsp), %rcx
movb (%rcx), %al
movb 0x1(%rcx), %dl
movq 0x50(%rsp), %rcx
movq 0x60(%rcx), %rsi
movb (%rsi), %dil
cmpb %dil, %al
movq 0x18(%rsp), %rbx
movq 0x8(%rsp), %r14
jne 0x3f02e
movq 0x80(%rcx), %r8
leaq 0x5fb55(%rip), %rsi     # 0x9eb7e
cmpb (%r8), %dl
je 0x3f04c
cmpb %dil, %dl
jne 0x3f045
movq 0x80(%rcx), %rcx
leaq 0x5fb3d(%rip), %rsi     # 0x9eb7e
cmpb (%rcx), %al
je 0x3f04c
leaq 0x5fb26(%rip), %rsi     # 0x9eb72
leaq 0x68(%rsp), %rdi
callq 0x88f0
leaq 0x118(%rsp), %rdi
callq 0x8978
movq %r12, %rdi
leaq 0x5adb2(%rip), %rsi     # 0x99e1f
callq 0x2193f
testb %al, %al
je 0x3f0d2
movq 0x50(%rsp), %rdi
movl $0xe0, %eax
addq %rax, %rdi
leaq 0x5faf8(%rip), %rsi     # 0x9eb82
callq 0x88e0
movq 0x50(%rsp), %rdi
movl $0xe0, %eax
addq %rax, %rdi
movsbl %bpl, %esi
callq 0x8400
leaq 0x180(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x297dc
leaq 0x180(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
pushq $0x9
popq %rdx
pushq $0x1
popq %rcx
callq 0x2ea24
jmp 0x3f10c
leaq 0x50(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x2b0a4
leaq 0x168(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x297dc
leaq 0x168(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
pushq $0x9
popq %rdx
pushq $0x1
popq %rcx
callq 0x2ea24
movq %r15, %rdi
callq 0x28a08
movl 0x10(%rsp), %eax
incl %eax
movl %eax, 0x10(%rsp)
xorl %edx, %edx
movl $0x186a0, %ecx          # imm = 0x186A0
divl %ecx
testl %edx, %edx
jne 0x3f2dc
movq 0x9deb2(%rip), %rdi     # 0xdcfe8
movl 0x10(%rsp), %esi
callq 0x8840
movq %rax, %rdi
leaq 0x5fa3e(%rip), %rsi     # 0x9eb87
callq 0x8480
movq %rax, %rdi
movq 0x40(%rsp), %rsi
callq 0x8840
movq %rax, %rdi
leaq 0x626df(%rip), %rsi     # 0xa1844
callq 0x8480
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %rdi
addl %edi, %ecx
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rsi
addl %esi, %edx
addl %ecx, %edx
addl 0x4(%rsp), %edx
cvtsi2sd %edx, %xmm1
cvtsi2sd %edi, %xmm0
movsd %xmm1, 0x48(%rsp)
divsd %xmm1, %xmm0
mulsd 0x5f916(%rip), %xmm0    # 0x9eab8
movq %rax, %rdi
callq 0x8750
movq %rax, %rdi
leaq 0x5f9f0(%rip), %rsi     # 0x9eba4
callq 0x8480
movq %rax, %rdi
movq 0x30(%rsp), %rsi
callq 0x8840
movq %rax, %rdi
leaq 0x62674(%rip), %rsi     # 0xa1844
callq 0x8480
cvtsi2sdl 0x30(%rsp), %xmm0
divsd 0x48(%rsp), %xmm0
mulsd 0x5f8cf(%rip), %xmm0    # 0x9eab8
movq %rax, %rdi
callq 0x8750
movq %rax, %rdi
leaq 0x5f9b5(%rip), %rsi     # 0x9ebb0
callq 0x8480
movq %rax, %rdi
movq 0x38(%rsp), %rsi
callq 0x8840
movq %rax, %rdi
leaq 0x6262d(%rip), %rsi     # 0xa1844
callq 0x8480
cvtsi2sdl 0x38(%rsp), %xmm0
divsd 0x48(%rsp), %xmm0
mulsd 0x5f888(%rip), %xmm0    # 0x9eab8
movq %rax, %rdi
callq 0x8750
movq %rax, %rdi
leaq 0x5f97a(%rip), %rsi     # 0x9ebbc
callq 0x8480
movq %rax, %rdi
movq 0x28(%rsp), %rsi
callq 0x8840
movq %rax, %rdi
leaq 0x625e6(%rip), %rsi     # 0xa1844
callq 0x8480
cvtsi2sdl 0x28(%rsp), %xmm0
divsd 0x48(%rsp), %xmm0
mulsd 0x5f841(%rip), %xmm0    # 0x9eab8
movq %rax, %rdi
callq 0x8750
movq %rax, %rdi
leaq 0x5f952(%rip), %rsi     # 0x9ebdb
callq 0x8480
movq %rax, %rdi
movl 0x4(%rsp), %esi
callq 0x8840
movq %rax, %rdi
leaq 0x625a0(%rip), %rsi     # 0xa1844
callq 0x8480
cvtsi2sdl 0x4(%rsp), %xmm0
divsd 0x48(%rsp), %xmm0
mulsd 0x5f7fb(%rip), %xmm0    # 0x9eab8
movq %rax, %rdi
callq 0x8750
movq %rax, %rdi
leaq 0x6874d(%rip), %rsi     # 0xa7a1c
callq 0x8480
movq %rax, %rdi
callq 0x8230
leaq 0x138(%rsp), %rdi
callq 0x28a08
leaq 0x50(%rsp), %rdi
callq 0x28a08
leaq 0x68(%rsp), %rdi
callq 0x8978
jmp 0x3ecb8
movq 0x9dcdf(%rip), %rdi     # 0xdcfe8
callq 0x8230
movq 0x28(%rsp), %rbx
movq 0x38(%rsp), %r14
movq 0x30(%rsp), %r12
movq 0x9dcc4(%rip), %rdi     # 0xdcfe8
leaq 0x5f8ba(%rip), %rsi     # 0x9ebe5
callq 0x8480
movq %rax, %rdi
movl 0x10(%rsp), %esi
callq 0x8840
leaq 0x5f844(%rip), %rsi     # 0x9eb87
movq %rax, %rdi
callq 0x8480
movq %rax, %rdi
movq 0x40(%rsp), %rsi
callq 0x8840
leaq 0x624e5(%rip), %rsi     # 0xa1844
movq %rax, %rdi
callq 0x8480
movq 0x40(%rsp), %rsi
leal (%r12,%rbx), %edx
addl %esi, %edx
addl %r14d, %edx
cvtsi2sd %edx, %xmm1
cvtsi2sd %esi, %xmm0
movsd %xmm1, 0x10(%rsp)
divsd %xmm1, %xmm0
mulsd 0x5f729(%rip), %xmm0    # 0x9eab8
movq %rax, %rdi
callq 0x8750
leaq 0x5f806(%rip), %rsi     # 0x9eba4
movq %rax, %rdi
callq 0x8480
movq %rax, %rdi
movl %r12d, %esi
callq 0x8840
leaq 0x6248c(%rip), %rsi     # 0xa1844
movq %rax, %rdi
callq 0x8480
cvtsi2sd %r12d, %xmm0
divsd 0x10(%rsp), %xmm0
mulsd 0x5f6e5(%rip), %xmm0    # 0x9eab8
movq %rax, %rdi
callq 0x8750
leaq 0x5f7ce(%rip), %rsi     # 0x9ebb0
movq %rax, %rdi
callq 0x8480
movq %rax, %rdi
movl %r14d, %esi
callq 0x8840
leaq 0x62448(%rip), %rsi     # 0xa1844
movq %rax, %rdi
callq 0x8480
cvtsi2sd %r14d, %xmm0
divsd 0x10(%rsp), %xmm0
mulsd 0x5f6a1(%rip), %xmm0    # 0x9eab8
movq %rax, %rdi
callq 0x8750
leaq 0x5f796(%rip), %rsi     # 0x9ebbc
movq %rax, %rdi
callq 0x8480
movq %rax, %rdi
movl %ebx, %esi
callq 0x8840
leaq 0x62405(%rip), %rsi     # 0xa1844
movq %rax, %rdi
callq 0x8480
cvtsi2sd %ebx, %xmm0
divsd 0x10(%rsp), %xmm0
mulsd 0x5f65f(%rip), %xmm0    # 0x9eab8
movq %rax, %rdi
callq 0x8750
leaq 0x685b4(%rip), %rsi     # 0xa7a1c
movq %rax, %rdi
callq 0x8480
movq %rax, %rdi
callq 0x8230
leaq 0xb8(%rsp), %rdi
callq 0x8978
leaq 0x88(%rsp), %rdi
callq 0x33008
leaq 0xf8(%rsp), %rdi
callq 0x8978
leaq 0xd8(%rsp), %rdi
callq 0x8978
xorl %eax, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5f64d(%rip), %rdi     # 0x9eb14
leaq 0x5f66f(%rip), %rsi     # 0x9eb3d
leaq 0x5f680(%rip), %rcx     # 0x9eb55
pushq $0x67
popq %rdx
callq 0x82f0
jmp 0x3f599
jmp 0x3f4fe
movq %rax, %rbx
leaq 0x180(%rsp), %rdi
jmp 0x3f51e
movq %rax, %rbx
leaq 0x168(%rsp), %rdi
jmp 0x3f51e
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
callq 0x8978
jmp 0x3f59c
movq %rax, %rbx
leaq 0x150(%rsp), %rdi
callq 0x28a08
jmp 0x3f59c
jmp 0x3f599
jmp 0x3f552
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x8978
jmp 0x3f53e
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x8978
jmp 0x3f5e2
jmp 0x3f552
movq %rax, %rbx
jmp 0x3f5e2
jmp 0x3f599
jmp 0x3f55e
movq %rax, %rbx
jmp 0x3f5d5
movq %rax, %rbx
movl $0x208, %esi            # imm = 0x208
movq %r15, %rdi
callq 0x84a0
jmp 0x3f5ef
jmp 0x3f584
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
jmp 0x3f5ea
movq %rax, %rbx
jmp 0x3f5ef
jmp 0x3f599
movq %rax, %rbx
jmp 0x3f5a9
movq %rax, %rbx
jmp 0x3f5b3
jmp 0x3f599
jmp 0x3f5c5
movq %rax, %rbx
leaq 0x138(%rsp), %rdi
callq 0x28a08
leaq 0x50(%rsp), %rdi
callq 0x28a08
leaq 0x68(%rsp), %rdi
callq 0x8978
jmp 0x3f5c8
jmp 0x3f5c5
jmp 0x3f5c5
jmp 0x3f5c5
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x8978
leaq 0x88(%rsp), %rdi
callq 0x33008
leaq 0xf8(%rsp), %rdi
callq 0x8978
leaq 0xd8(%rsp), %rdi
callq 0x8978
movq %rbx, %rdi
callq 0x8870