// File: /workspace/github_cpp_makefile_star2_O3/millanek[P]evo/process_vcf_sequenom.cpp
// Function: sequenomMain(int, char**)
int sequenomMain(int argc, char** argv) {
    parseSequenomOptions(argc, argv);
    std::ios_base::openmode mode = std::ios_base::in;
    string vcfFileName = opt::vcfFile;
    string vcfFileRoot = stripExtension(vcfFileName);
    string genomeFileName = opt::genomeFile;
    string geneFileName = opt::geneFile;
    
    
    std::cerr << "Generating a txt file for sequenom assay from: " << vcfFileName << std::endl;
    std::cerr << "and the reference genome: " << genomeFileName << std::endl;
    std::cerr << "with SNP flanking regions defined in: " << geneFileName << std::endl;
    
    // Open connections to read from the vcf and reference genome files
    std::ifstream* vcfFile = new std::ifstream(vcfFileName.c_str(), mode);
    std::ifstream* genomeFile = new std::ifstream(genomeFileName.c_str(), mode);
    std::ifstream* geneFile = new std::ifstream(geneFileName.c_str(), mode);
    std::ofstream* sequenomDesignFile = new std::ofstream("sequenom.txt");
    
    string line;
    int currentScaffoldNum = -1;
    string currentScaffoldReference;
    string::size_type inStrPos;
    std::vector<string> sampleNames;
    string thisScaffoldName;
    std::string sequenomString = "";
    
    // Load up the annotation file with SNP flanking regions
    std::vector<std::vector<string> > annotation;
    Annotation wgAnnotation(geneFile, false);
    
    while (getline(*vcfFile, line)) {
        if (line[0] == '#' && line[1] == '#')
            continue;
        else if (line[0] == '#' && line[1] == 'C') {
            
            std::vector<std::string> fields = split(line, '\t');
            // Initialize vectors
            sequenomString.reserve(100000000);
            sequenomString = "";
            
            for (std::vector<std::string>::size_type i = NUM_NON_GENOTYPE_COLUMNS; i != fields.size(); i++) {
                if (opt::sampleNameFile.empty())
                    sampleNames.push_back(fields[i]);
                else
                    sampleNames = readSampleNamesFromTextFile(opt::sampleNameFile);
            }
        } else {
            std::vector<std::string> fields = split(line, '\t');
            // Also get overall depth for this variant
            std::vector<std::string> info = split(fields[7], ';');
            std::vector<std::string> sc = split(fields[0], '_');
            if (atoi(sc[1].c_str()) > currentScaffoldNum) {
                if (currentScaffoldNum >= 0) {
                    // Fill in the rest of the scaffold sequence (after the last variant)
                    sequenomString.append(currentScaffoldReference.substr(inStrPos, string::npos));
                    
#ifdef DEBUG
                    if (sequenomString.length() != currentScaffoldReference.length()) {
                        std::cerr << "Error!!! Reference scaffold length: " << currentScaffoldReference.length() << " vcf scaffold length: " << sequenomString.length() << std::endl;
                    }
#endif
                    
                    string sc = "scaffold_" + numToString(currentScaffoldNum);
                    std::cerr << "Scaffold: " << sc << std::endl;
                    annotation = wgAnnotation.annotationMap[sc]; // Get the SNP surrounding regions on this scaffold
                    for (std::vector<std::vector<string> >::size_type k = 0; k != annotation.size(); k++) {
                        std::vector<string> annotLineVec = split(annotation[k][0], '\t');
                        // std::cerr << "Gene:" << annotLineVec[4] << std::endl;
                        
                        string regionSeq = getIndividualSequenceForThisRegion(annotation[k], annotLineVec[3], sequenomString);
                        string refSeq = getReferenceForThisRegion(annotation[k], annotLineVec[3], currentScaffoldReference);
                        int coordinate = atoi(annotLineVec[2].c_str()) - 100;
                        string location = sc + "_" + numToString(coordinate);
                        
                        writeSequenomOutput(regionSeq, refSeq, location, sequenomDesignFile);
                    }
                    
                    sequenomString = "";
                } else {
                    getline(*genomeFile, thisScaffoldName);
                }
                
                std::cerr << "Starting to read " << thisScaffoldName << std::endl;
                currentScaffoldReference = readScaffold(genomeFile, thisScaffoldName);
#ifdef DEBUG2
                std::cerr << "Finished reading. Next scaffold will be: " << thisScaffoldName << std::endl;
#endif
                inStrPos = 0;
                currentScaffoldNum = atoi(sc[1].c_str());
            }
            if (info[0] != "INDEL") {
                sequenomString.append(currentScaffoldReference.substr(inStrPos, (atoi(fields[1].c_str()) - 1)-inStrPos));
                Counts thisVariantCounts = getThisVariantCounts(fields);
                if (thisVariantCounts.overall != ((fields.size()-NUM_NON_GENOTYPE_COLUMNS)*2)) {
                    string ambiguityBase = getAmbiguityCode(fields[3], fields[4]);
                    sequenomString.append(ambiguityBase);
                } else {
                    sequenomString.append(fields[4]);
                }
                inStrPos = atoi(fields[1].c_str());
                
#ifdef DEBUG
                if (currentScaffoldReference[inStrPos-1] != fields[3][0]) {
                    std::cerr << "Error!!! Sequence: " << currentScaffoldReference[inStrPos-1] << " vcf-ref: " << fields[3][0] << std::endl;
                }
#endif
            }
        }
    }
    
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x468, %rsp            # imm = 0x468
callq 0x7b1bc
leaq 0x110(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x89782(%rip), %rsi     # 0x103630
movq 0x89783(%rip), %rdx     # 0x103638
addq %rsi, %rdx
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
callq 0x2ba06
leaq 0x388(%rsp), %rdi
movq %rbx, %rsi
callq 0x4d82f
leaq 0xf0(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x89765(%rip), %rsi     # 0x103650
movq 0x89766(%rip), %rdx     # 0x103658
addq %rsi, %rdx
leaq 0xe0(%rsp), %rdi
callq 0x2ba06
leaq 0xd0(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x8975b(%rip), %rsi     # 0x103670
movq 0x8975c(%rip), %rdx     # 0x103678
addq %rsi, %rdx
leaq 0xc0(%rsp), %rdi
callq 0x2ba06
movq 0x880b5(%rip), %rdi     # 0x101fe8
leaq 0x5cf6a(%rip), %rsi     # 0xd6ea4
movl $0x2f, %edx
callq 0x84e0
movq 0x100(%rsp), %rsi
movq 0x108(%rsp), %rdx
movq 0x8808d(%rip), %rdi     # 0x101fe8
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
movq 0x88057(%rip), %rdi     # 0x101fe8
leaq 0x5ad63(%rip), %rsi     # 0xd4cfb
movl $0x1a, %edx
callq 0x84e0
movq 0xe0(%rsp), %rsi
movq 0xe8(%rsp), %rdx
movq 0x8802f(%rip), %rdi     # 0x101fe8
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
movq 0x87ff9(%rip), %rdi     # 0x101fe8
leaq 0x5cede(%rip), %rsi     # 0xd6ed4
movl $0x26, %edx
callq 0x84e0
movq 0xc0(%rsp), %rsi
movq 0xc8(%rsp), %rdx
movq 0x87fd1(%rip), %rdi     # 0x101fe8
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
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %rbx
movq 0x100(%rsp), %rsi
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r15
movq 0xe0(%rsp), %rsi
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
movq %r15, 0x198(%rsp)
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r15
movq 0xc0(%rsp), %rsi
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
movq %r15, 0x248(%rsp)
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %r15
leaq 0x5ce2b(%rip), %rsi     # 0xd6efb
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
movq %r15, 0x240(%rsp)
leaq 0x98(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x130(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movq %rax, 0x170(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x160(%rsp)
leaq 0x1d8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x5388b(%rip), %rdx     # 0xcd9cb
leaq 0x28(%rsp), %rdi
movq %rdx, %rsi
callq 0x28a52
xorps %xmm0, %xmm0
movaps %xmm0, 0x140(%rsp)
movq $0x0, 0x150(%rsp)
leaq 0x3a8(%rsp), %rdi
leaq 0x248(%rsp), %rsi
xorl %edx, %edx
callq 0x3b332
leaq 0x290(%rsp), %r12
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
leaq 0x1a0(%rsp), %rbp
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %rbx, %rdi
leaq 0x88(%rsp), %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x7ac2a
movq 0x88(%rsp), %rax
cmpb $0x23, (%rax)
jne 0x7a31d
movzbl 0x1(%rax), %eax
cmpl $0x23, %eax
je 0x7a193
cmpl $0x43, %eax
jne 0x7a31d
movq %rsp, %rdi
leaq 0x88(%rsp), %rsi
movl $0x9, %edx
callq 0x4d650
movq %r12, %r14
movl $0x5f5e100, %esi        # imm = 0x5F5E100
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x86f0
movq 0x30(%rsp), %rdx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x537a1(%rip), %rcx     # 0xcd9cb
xorl %r8d, %r8d
callq 0x86c0
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x120, %rax            # imm = 0x120
je 0x7a30d
movl $0x9, %r15d
movl $0x120, %r12d           # imm = 0x120
cmpq $0x0, 0x8943a(%rip)     # 0x103698
je 0x7a2dd
movq %rbp, %rdi
leaq 0x89426(%rip), %rsi     # 0x103690
callq 0x4fe41
movq 0x170(%rsp), %rax
movaps 0x1a0(%rsp), %xmm0
movq 0x1b0(%rsp), %rcx
movq %rcx, 0x170(%rsp)
movaps 0x160(%rsp), %xmm1
movaps %xmm0, 0x160(%rsp)
movaps %xmm1, 0x280(%rsp)
movq %rax, 0x290(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x1a0(%rsp)
movq $0x0, 0x1b0(%rsp)
leaq 0x280(%rsp), %rdi
callq 0x2e784
movq %rbp, %rdi
callq 0x2e784
jmp 0x7a2ed
addq %r12, %rsi
leaq 0x160(%rsp), %rdi
callq 0x3133c
incq %r15
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
addq $0x20, %r12
cmpq %rax, %r15
jne 0x7a256
movq %rsp, %rdi
callq 0x2e784
movq %r14, %r12
jmp 0x7a193
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
movl $0x9, %edx
callq 0x4d650
movq 0xa8(%rsp), %rsi
movl $0xe0, %eax
addq %rax, %rsi
leaq 0x268(%rsp), %rdi
movl $0x3b, %edx
callq 0x4d650
movq 0xa8(%rsp), %rsi
leaq 0x250(%rsp), %rdi
movl $0x5f, %edx
callq 0x4d650
movq 0x250(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x86e0
movl 0x24(%rsp), %ecx
cmpl %ecx, %eax
jle 0x7a95c
testl %ecx, %ecx
js 0x7a4cb
leaq 0x280(%rsp), %rdi
leaq 0x120(%rsp), %rsi
movq %r13, %rdx
movq $-0x1, %rcx
callq 0x84a0
movq 0x280(%rsp), %rsi
movq 0x288(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x8180
movq 0x280(%rsp), %rdi
cmpq %r12, %rdi
je 0x7a3ee
movq 0x290(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x30(%rsp), %rax
cmpq 0x128(%rsp), %rax
je 0x7a477
movl $0x24, %edx
movq 0x87bdf(%rip), %rdi     # 0x101fe8
leaq 0x5bbfe(%rip), %rsi     # 0xd600e
callq 0x84e0
movq 0x128(%rsp), %rsi
movq 0x87bc4(%rip), %rdi     # 0x101fe8
callq 0x82f0
movq %rax, %r15
movl $0x16, %edx
movq %rax, %rdi
leaq 0x5a959(%rip), %rsi     # 0xd4d94
callq 0x84e0
movq 0x30(%rsp), %rsi
movq %r15, %rdi
callq 0x82f0
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
movq %rsp, %r14
movq %r14, %rdi
movl 0x24(%rsp), %esi
callq 0x2e7e2
movl $0x9, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x5ccd8(%rip), %rcx     # 0xd7172
callq 0x84d0
movq %r12, 0x280(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x7a4ff
movq %rdx, 0x280(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x290(%rsp)
jmp 0x7a507
movq 0x198(%rsp), %r15
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %r15, %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x8870
jmp 0x7a899
movups (%rcx), %xmm0
movups %xmm0, (%r12)
leaq 0x280(%rsp), %r14
movq 0x8(%rax), %rdx
movq %rdx, 0x288(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x7a545
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0xa, %edx
movq 0x87a97(%rip), %rdi     # 0x101fe8
leaq 0x5c9b0(%rip), %rsi     # 0xd6f08
callq 0x84e0
movq 0x280(%rsp), %rsi
movq 0x288(%rsp), %rdx
movq 0x87a74(%rip), %rdi     # 0x101fe8
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 0x3a8(%rsp), %rdi
movq %r14, %rsi
callq 0x2f908
leaq 0x140(%rsp), %rdi
movq %rax, %rsi
callq 0x2f984
movq 0x140(%rsp), %rax
cmpq %rax, 0x148(%rsp)
leaq 0x228(%rsp), %r14
je 0x7a859
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%rax,%r15), %rsi
movq %r14, %rdi
movl $0x9, %edx
callq 0x4d650
movq 0x140(%rsp), %rsi
addq %r15, %rsi
movq 0x228(%rsp), %rdx
addq $0x60, %rdx
movq %rsp, %rdi
leaq 0x28(%rsp), %rcx
callq 0x57d34
movq 0x140(%rsp), %rsi
addq %r15, %rsi
movq 0x228(%rsp), %rdx
addq $0x60, %rdx
movq %rbp, %rdi
leaq 0x120(%rsp), %rcx
callq 0x57f78
movq 0x228(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x86e0
movl %eax, %r13d
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x280(%rsp), %rsi
movq 0x288(%rsp), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x2ba06
movq %r14, %rdi
leaq 0x5a9f1(%rip), %rsi     # 0xd507c
callq 0x88c0
addl $-0x64, %r13d
leaq 0x178(%rsp), %rdi
movl %r13d, %esi
callq 0x2e7e2
movq 0x48(%rsp), %rcx
movl $0xf, %edi
leaq 0x58(%rsp), %rax
cmpq %rax, %rcx
je 0x7a6bd
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %r8
movq 0x178(%rsp), %rsi
movq 0x180(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
jbe 0x7a6fa
movl $0xf, %edi
leaq 0x188(%rsp), %r9
cmpq %r9, %rsi
je 0x7a6f5
movq 0x188(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x7a706
leaq 0x48(%rsp), %rdi
callq 0x8180
jmp 0x7a717
leaq 0x178(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
leaq 0x78(%rsp), %rsi
movq %rsi, 0x68(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x7a73c
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x7a742
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x70(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x178(%rsp), %rdi
leaq 0x188(%rsp), %rax
cmpq %rax, %rdi
je 0x7a784
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x7a7a0
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x8480
movq %rsp, %rdi
movq %rbp, %rsi
leaq 0x68(%rsp), %rdx
leaq 0x240(%rsp), %rcx
callq 0x7b48e
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x7a7d4
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x1a0(%rsp), %rdi
leaq 0x1b0(%rsp), %rax
cmpq %rax, %rdi
je 0x7a7f9
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x8480
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x7a814
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x228(%rsp), %r14
movq %r14, %rdi
callq 0x2e784
incq %r12
movq 0x140(%rsp), %rax
movq 0x148(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
addq $0x18, %r15
cmpq %rcx, %r12
jne 0x7a5e7
movq 0x30(%rsp), %rdx
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
leaq 0x5315f(%rip), %rcx     # 0xcd9cb
xorl %r8d, %r8d
callq 0x86c0
movq 0x280(%rsp), %rdi
leaq 0x290(%rsp), %r12
cmpq %r12, %rdi
je 0x7a899
movq 0x290(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x11, %edx
movq 0x87743(%rip), %rdi     # 0x101fe8
leaq 0x5a5ae(%rip), %rsi     # 0xd4e5a
callq 0x84e0
movq 0x1c8(%rsp), %rsi
movq 0x1d0(%rsp), %rdx
movq 0x87720(%rip), %rdi     # 0x101fe8
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 0x280(%rsp), %r14
movq %r14, %rdi
leaq 0x198(%rsp), %rsi
leaq 0x1c8(%rsp), %rdx
callq 0x465f2
leaq 0x120(%rsp), %rdi
movq %r14, %rsi
callq 0x8540
movq 0x280(%rsp), %rdi
cmpq %r12, %rdi
je 0x7a944
movq 0x290(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x250(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x86e0
movl %eax, 0x24(%rsp)
xorl %r13d, %r13d
movq 0x268(%rsp), %rdi
leaq 0x51e6f(%rip), %rsi     # 0xcc7da
callq 0x8160
testl %eax, %eax
je 0x7abfe
movq 0xa8(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x86e0
decl %eax
movslq %eax, %rcx
subq %r13, %rcx
leaq 0x280(%rsp), %rdi
leaq 0x120(%rsp), %rsi
movq %r13, %rdx
callq 0x84a0
movq 0x280(%rsp), %rsi
movq 0x288(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x8180
movq 0x280(%rsp), %rdi
cmpq %r12, %rdi
je 0x7a9e0
movq 0x290(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x280(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x4e40d
movslq 0x280(%rsp), %rcx
movq 0xa8(%rsp), %rax
movq 0xb0(%rsp), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
addq $-0x12, %rdx
cmpq %rcx, %rdx
jne 0x7aa3a
movq 0x80(%rax), %rsi
movq 0x88(%rax), %rdx
leaq 0x28(%rsp), %rdi
callq 0x8180
jmp 0x7ab26
leaq 0x1f8(%rsp), %rcx
movq %rcx, 0x1e8(%rsp)
movq 0x60(%rax), %rsi
movq 0x68(%rax), %rdx
addq %rsi, %rdx
leaq 0x1e8(%rsp), %rdi
callq 0x2ba06
movq 0xa8(%rsp), %rax
leaq 0x218(%rsp), %rcx
movq %rcx, 0x208(%rsp)
movq 0x80(%rax), %rsi
movq 0x88(%rax), %rdx
addq %rsi, %rdx
leaq 0x208(%rsp), %r14
movq %r14, %rdi
callq 0x2ba06
movq %rsp, %rdi
leaq 0x1e8(%rsp), %rsi
movq %r14, %rdx
callq 0x57a7a
movq 0x208(%rsp), %rdi
leaq 0x218(%rsp), %rax
cmpq %rax, %rdi
je 0x7aad3
movq 0x218(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x1e8(%rsp), %rdi
leaq 0x1f8(%rsp), %rax
cmpq %rax, %rdi
je 0x7aaf8
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x8480
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x8180
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x7ab26
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xa8(%rsp), %r15
movq 0x20(%r15), %rdi
callq 0x86e0
movslq %eax, %r13
movq 0x120(%rsp), %rax
movb -0x1(%r13,%rax), %al
movq 0x60(%r15), %rcx
cmpb (%rcx), %al
je 0x7abf1
movl $0x13, %edx
movq 0x87489(%rip), %rdi     # 0x101fe8
leaq 0x5b5ae(%rip), %rsi     # 0xd6114
callq 0x84e0
movq 0x120(%rsp), %rax
movb -0x1(%rax,%r13), %al
movb %al, (%rsp)
movl $0x1, %edx
movq 0x87461(%rip), %rdi     # 0x101fe8
movq %rsp, %rsi
callq 0x84e0
movq %rax, %r15
movl $0xa, %edx
movq %rax, %rdi
leaq 0x5b587(%rip), %rsi     # 0xd6128
callq 0x84e0
movq 0xa8(%rsp), %rax
movq 0x60(%rax), %rax
movb (%rax), %al
movb %al, (%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %rsp, %rsi
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 0x280(%rsp), %rdi
callq 0x2e6d0
leaq 0x250(%rsp), %rdi
callq 0x2e784
leaq 0x268(%rsp), %rdi
callq 0x2e784
leaq 0xa8(%rsp), %rdi
callq 0x2e784
jmp 0x7a193
leaq 0x438(%rsp), %rdi
callq 0x3c57e
leaq 0x408(%rsp), %rdi
callq 0x3c602
leaq 0x3d8(%rsp), %rdi
callq 0x3c686
leaq 0x3a8(%rsp), %rdi
callq 0x30870
leaq 0x140(%rsp), %rdi
callq 0x2efec
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x7ac87
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x1c8(%rsp), %rdi
leaq 0x1d8(%rsp), %rax
cmpq %rax, %rdi
leaq 0x110(%rsp), %rbx
leaq 0xf0(%rsp), %r14
leaq 0xd0(%rsp), %r15
je 0x7acc4
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x160(%rsp), %rdi
callq 0x2e784
movq 0x120(%rsp), %rdi
leaq 0x130(%rsp), %rax
cmpq %rax, %rdi
je 0x7acf6
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x7ad1b
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0x7ad38
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xe0(%rsp), %rdi
cmpq %r14, %rdi
je 0x7ad55
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x398(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7ad76
movq 0x398(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x100(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7ad93
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x8480
xorl %eax, %eax
addq $0x468, %rsp            # imm = 0x468
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7af3b
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x7b039
movq 0x10(%rsp), %rsi
jmp 0x7b031
jmp 0x7aeed
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x7af22
movq 0x10(%rsp), %rsi
jmp 0x7ae3f
jmp 0x7af1f
movq %rax, %r14
jmp 0x7ae1e
movq %rax, %r14
movq 0x208(%rsp), %rdi
leaq 0x218(%rsp), %rax
cmpq %rax, %rdi
je 0x7ae1e
movq 0x218(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x1e8(%rsp), %rdi
leaq 0x1f8(%rsp), %rax
cmpq %rax, %rdi
je 0x7af22
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x7af22
jmp 0x7af3b
jmp 0x7b06f
jmp 0x7af3b
movq %rax, %r14
leaq 0x110(%rsp), %r12
leaq 0xf0(%rsp), %r13
leaq 0xd0(%rsp), %rbp
leaq 0x98(%rsp), %rbx
jmp 0x7b09f
movq %rax, %r14
leaq 0x98(%rsp), %rbx
jmp 0x7b0c8
movq %rax, %r14
movl $0x200, %esi            # imm = 0x200
jmp 0x7aeb1
jmp 0x7b067
jmp 0x7aea9
jmp 0x7b067
movq %rax, %r14
movl $0x208, %esi            # imm = 0x208
movq %r15, %rdi
jmp 0x7b137
jmp 0x7b067
movq %rax, %r14
movl $0x208, %esi            # imm = 0x208
movq %rbx, %rdi
jmp 0x7b137
jmp 0x7b067
movq %rax, %r14
jmp 0x7b159
movq %rax, %r14
jmp 0x7b176
movq %rax, %r14
jmp 0x7b197
jmp 0x7af3b
movq %rax, %r14
movq 0x280(%rsp), %rdi
cmpq %r12, %rdi
jne 0x7b029
jmp 0x7b039
jmp 0x7af3b
jmp 0x7af43
movq %rax, %r14
jmp 0x7b046
jmp 0x7b06f
movq %rax, %r14
jmp 0x7b053
movq %rax, %r14
leaq 0x280(%rsp), %rdi
callq 0x2e6d0
jmp 0x7b039
jmp 0x7b062
jmp 0x7af43
movq %rax, %r14
jmp 0x7b039
movq %rax, %r14
movq %rsp, %rdi
jmp 0x7b05b
movq %rax, %r14
jmp 0x7afec
jmp 0x7af76
movq %rax, %r14
jmp 0x7afc7
movq %rax, %r14
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x7afc7
movq 0x78(%rsp), %rsi
jmp 0x7afbf
movq %rax, %r14
jmp 0x7afab
movq %rax, %r14
jmp 0x7b007
movq %rax, %r14
movq 0x178(%rsp), %rdi
leaq 0x188(%rsp), %rax
cmpq %rax, %rdi
je 0x7afab
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x7afc7
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x1a0(%rsp), %rdi
leaq 0x1b0(%rsp), %rax
cmpq %rax, %rdi
je 0x7afec
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x8480
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x7b007
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x228(%rsp), %rdi
callq 0x2e784
movq 0x280(%rsp), %rdi
leaq 0x290(%rsp), %rax
cmpq %rax, %rdi
je 0x7b039
movq 0x290(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x250(%rsp), %rdi
callq 0x2e784
leaq 0x268(%rsp), %rdi
callq 0x2e784
leaq 0xa8(%rsp), %rdi
callq 0x2e784
jmp 0x7b072
movq %rax, %r14
jmp 0x7b014
movq %rax, %r14
jmp 0x7b13c
movq %rax, %r14
leaq 0x110(%rsp), %r12
leaq 0xf0(%rsp), %r13
leaq 0xd0(%rsp), %rbp
leaq 0x98(%rsp), %rbx
leaq 0x3a8(%rsp), %rdi
callq 0x7b83e
leaq 0x140(%rsp), %rdi
callq 0x2efec
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x7b0c8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x1c8(%rsp), %rdi
leaq 0x1d8(%rsp), %rax
cmpq %rax, %rdi
je 0x7b0ed
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x160(%rsp), %rdi
callq 0x2e784
movq 0x120(%rsp), %rdi
leaq 0x130(%rsp), %rax
cmpq %rax, %rdi
je 0x7b11f
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x88(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7b13c
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xc0(%rsp), %rdi
cmpq %rbp, %rdi
je 0x7b159
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xe0(%rsp), %rdi
cmpq %r13, %rdi
je 0x7b176
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x398(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7b197
movq 0x398(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x7b1b4
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840