// File: /workspace/github_cpp_makefile_star2_O1/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 $0x478, %rsp            # imm = 0x478
callq 0x7b5d3
leaq 0x1c8(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x923d6(%rip), %rsi     # 0x10c628
movq 0x923d7(%rip), %rdx     # 0x10c630
addq %rsi, %rdx
leaq 0x1b8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2e45c
leaq 0x398(%rsp), %rdi
movq %rbx, %rsi
callq 0x50803
leaq 0x1a8(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x923b9(%rip), %rsi     # 0x10c648
movq 0x923ba(%rip), %rdx     # 0x10c650
addq %rsi, %rdx
leaq 0x198(%rsp), %rdi
callq 0x2e45c
leaq 0x188(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x923af(%rip), %rsi     # 0x10c668
movq 0x923b0(%rip), %rdx     # 0x10c670
addq %rsi, %rdx
leaq 0x178(%rsp), %rdi
callq 0x2e45c
movq 0x90d11(%rip), %rdi     # 0x10afe8
leaq 0x63b36(%rip), %rsi     # 0xdde14
movl $0x2f, %edx
callq 0x84e0
movq 0x1b8(%rsp), %rsi
movq 0x1c0(%rsp), %rdx
movq 0x90ce9(%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
movq 0x90cb3(%rip), %rdi     # 0x10afe8
leaq 0x60e7f(%rip), %rsi     # 0xdb1bb
movl $0x1a, %edx
callq 0x84e0
movq 0x198(%rsp), %rsi
movq 0x1a0(%rsp), %rdx
movq 0x90c8b(%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
movq 0x90c55(%rip), %rdi     # 0x10afe8
leaq 0x63aaa(%rip), %rsi     # 0xdde44
movl $0x26, %edx
callq 0x84e0
movq 0x178(%rsp), %rsi
movq 0x180(%rsp), %rdx
movq 0x90c2d(%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
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %rbx
movq 0x1b8(%rsp), %rsi
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r15
movq 0x198(%rsp), %rsi
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
movq %r15, 0x170(%rsp)
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r15
movq 0x178(%rsp), %rsi
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
movq %r15, 0x258(%rsp)
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %r15
leaq 0x639f7(%rip), %rsi     # 0xdde6b
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
movq %r15, 0x250(%rsp)
leaq 0xc0(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0xe0(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movq %rax, 0x160(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x150(%rsp)
leaq 0x1e8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0xa0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x57798(%rip), %rdx     # 0xd1c7f
leaq 0x90(%rsp), %rdi
movq %rdx, %rsi
callq 0x28952
xorps %xmm0, %xmm0
movaps %xmm0, 0xf0(%rsp)
movq $0x0, 0x100(%rsp)
leaq 0x3b8(%rsp), %rdi
leaq 0x258(%rsp), %rsi
xorl %edx, %edx
callq 0x3e250
leaq 0x2a0(%rsp), %r13
movl $0xffffffff, 0x2c(%rsp) # imm = 0xFFFFFFFF
leaq 0xb0(%rsp), %r14
leaq 0x90(%rsp), %r12
leaq 0x130(%rsp), %rbp
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x7b02d
movq 0xb0(%rsp), %rax
movb (%rax), %cl
cmpb $0x23, %cl
jne 0x7a6fe
cmpb $0x23, 0x1(%rax)
je 0x7a54d
cmpb $0x23, %cl
jne 0x7a6fe
cmpb $0x43, 0x1(%rax)
jne 0x7a6fe
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0x9, %edx
callq 0x50624
movq %r13, %r12
movl $0x5f5e100, %esi        # imm = 0x5F5E100
leaq 0x90(%rsp), %r15
movq %r15, %rdi
callq 0x86f0
movq 0x98(%rsp), %rdx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x57694(%rip), %rcx     # 0xd1c7f
xorl %r8d, %r8d
callq 0x86c0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rax
subq %rsi, %rax
cmpq $0x120, %rax            # imm = 0x120
je 0x7a6e4
movl $0x9, %r15d
movl $0x120, %r13d           # imm = 0x120
cmpq $0x0, 0x92070(%rip)     # 0x10c690
je 0x7a6b3
movq %rbp, %rdi
leaq 0x92058(%rip), %rsi     # 0x10c688
callq 0x52fb6
xorps %xmm0, %xmm0
movaps %xmm0, 0x290(%rsp)
movaps 0x150(%rsp), %xmm0
movq 0x160(%rsp), %rax
movups 0x130(%rsp), %xmm1
movaps %xmm1, 0x150(%rsp)
movq 0x140(%rsp), %rcx
movq %rcx, 0x160(%rsp)
movaps 0x290(%rsp), %xmm1
movaps %xmm0, 0x290(%rsp)
movq %rax, 0x2a0(%rsp)
movups %xmm1, 0x130(%rsp)
movq $0x0, 0x140(%rsp)
leaq 0x290(%rsp), %rdi
callq 0x3123c
movq %rbp, %rdi
callq 0x3123c
jmp 0x7a6c3
addq %r13, %rsi
leaq 0x150(%rsp), %rdi
callq 0x33db0
incq %r15
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
addq $0x20, %r13
cmpq %rax, %r15
jne 0x7a618
leaq 0x8(%rsp), %rdi
callq 0x3123c
movq %r12, %r13
leaq 0x90(%rsp), %r12
jmp 0x7a54d
leaq 0x78(%rsp), %rdi
movq %r14, %rsi
movl $0x9, %edx
callq 0x50624
movq 0x78(%rsp), %rsi
movl $0xe0, %eax
addq %rax, %rsi
leaq 0x278(%rsp), %rdi
movl $0x3b, %edx
callq 0x50624
movq 0x78(%rsp), %rsi
leaq 0x260(%rsp), %rdi
movl $0x5f, %edx
callq 0x50624
movq 0x260(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x86e0
movl 0x2c(%rsp), %ecx
cmpl %ecx, %eax
jle 0x7ad66
testl %ecx, %ecx
js 0x7a8a8
leaq 0x290(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq $-0x1, %rcx
callq 0x84a0
movq 0x290(%rsp), %rsi
movq 0x298(%rsp), %rdx
movq %r12, %rdi
callq 0x8180
movl 0x2c(%rsp), %ebp
movq 0x290(%rsp), %rdi
cmpq %r13, %rdi
je 0x7a7c5
movq 0x2a0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x98(%rsp), %rax
cmpq 0xd8(%rsp), %rax
je 0x7a854
movl $0x24, %edx
movq 0x90805(%rip), %rdi     # 0x10afe8
leaq 0x62794(%rip), %rsi     # 0xdcf7e
callq 0x84e0
movq 0xd8(%rsp), %rsi
movq 0x907ea(%rip), %rdi     # 0x10afe8
callq 0x82f0
movq %rax, %r15
movl $0x16, %edx
movq %rax, %rdi
leaq 0x60a3f(%rip), %rsi     # 0xdb254
callq 0x84e0
movq 0x98(%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
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl %ebp, %esi
callq 0x31297
movl $0x9, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x6386b(%rip), %rcx     # 0xde0e2
callq 0x84d0
movq %r13, 0x290(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x7a8dc
movq %rdx, 0x290(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x2a0(%rsp)
jmp 0x7a8e4
movq 0x170(%rsp), %r15
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %r15, %rdi
leaq 0x1d8(%rsp), %rsi
callq 0x8870
jmp 0x7ac9d
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x298(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x7a91b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0xa, %edx
movq 0x906c1(%rip), %rdi     # 0x10afe8
leaq 0x6354a(%rip), %rsi     # 0xdde78
callq 0x84e0
movq 0x290(%rsp), %rsi
movq 0x298(%rsp), %rdx
movq 0x9069e(%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 0x3b8(%rsp), %rdi
leaq 0x290(%rsp), %rsi
callq 0x323c8
leaq 0xf0(%rsp), %rdi
movq %rax, %rsi
callq 0x32444
movq 0xf0(%rsp), %rax
cmpq %rax, 0xf8(%rsp)
leaq 0x238(%rsp), %rbp
je 0x7ac4c
xorl %r15d, %r15d
xorl %r13d, %r13d
movq (%rax,%r15), %rsi
movq %rbp, %rdi
movl $0x9, %edx
callq 0x50624
movq 0xf0(%rsp), %rsi
addq %r15, %rsi
movq 0x238(%rsp), %rdx
addq $0x60, %rdx
leaq 0x8(%rsp), %rdi
movq %r12, %rcx
callq 0x57bc8
leaq 0x130(%rsp), %rbp
movq 0xf0(%rsp), %rsi
addq %r15, %rsi
movq 0x238(%rsp), %rdx
addq $0x60, %rdx
movq %rbp, %rdi
leaq 0xd0(%rsp), %rcx
callq 0x57e0c
movq 0x238(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x86e0
movl %eax, %r12d
leaq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x290(%rsp), %rsi
movq 0x298(%rsp), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0x2e45c
movq %r14, %rdi
leaq 0x60ace(%rip), %rsi     # 0xdb53c
callq 0x88c0
addl $-0x64, %r12d
leaq 0x110(%rsp), %rdi
movl %r12d, %esi
callq 0x31297
movq 0x38(%rsp), %rcx
movl $0xf, %esi
leaq 0x48(%rsp), %rax
cmpq %rax, %rcx
leaq 0x90(%rsp), %r12
je 0x7aaa8
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %r8
movq 0x118(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
jbe 0x7aae2
movl $0xf, %esi
leaq 0x120(%rsp), %rdi
cmpq %rdi, 0x110(%rsp)
je 0x7aadd
movq 0x120(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x7aaf6
movq 0x110(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x8180
jmp 0x7ab07
leaq 0x110(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
leaq 0x68(%rsp), %rsi
movq %rsi, 0x58(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x7ab2c
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
jmp 0x7ab32
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x60(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x7ab74
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x7ab90
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x8(%rsp), %rdi
movq %rbp, %rsi
leaq 0x58(%rsp), %rdx
leaq 0x250(%rsp), %rcx
callq 0x7b8a8
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x7abc6
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x130(%rsp), %rdi
leaq 0x140(%rsp), %rax
cmpq %rax, %rdi
je 0x7abeb
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x7ac07
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x238(%rsp), %rbp
movq %rbp, %rdi
callq 0x3123c
incq %r13
movq 0xf0(%rsp), %rax
movq 0xf8(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
addq $0x18, %r15
cmpq %rcx, %r13
jne 0x7a9c2
movq 0x98(%rsp), %rdx
movq %r12, %rdi
xorl %esi, %esi
leaq 0x5701f(%rip), %rcx     # 0xd1c7f
xorl %r8d, %r8d
callq 0x86c0
movq 0x290(%rsp), %rdi
leaq 0x2a0(%rsp), %r13
cmpq %r13, %rdi
je 0x7ac8d
movq 0x2a0(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x130(%rsp), %rbp
leaq 0xb0(%rsp), %r14
movl $0x11, %edx
movq 0x9033f(%rip), %rdi     # 0x10afe8
leaq 0x6066a(%rip), %rsi     # 0xdb31a
callq 0x84e0
movq 0x1d8(%rsp), %rsi
movq 0x1e0(%rsp), %rdx
movq 0x9031c(%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 0x290(%rsp), %r15
movq %r15, %rdi
leaq 0x170(%rsp), %rsi
leaq 0x1d8(%rsp), %rdx
callq 0x4956e
leaq 0xd0(%rsp), %rdi
movq %r15, %rsi
callq 0x8540
movq 0x290(%rsp), %rdi
cmpq %r13, %rdi
je 0x7ad48
movq 0x2a0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x260(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x86e0
movl %eax, 0x2c(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x278(%rsp), %rdi
leaq 0x547ad(%rip), %rsi     # 0xcf522
callq 0x8160
testl %eax, %eax
je 0x7b004
movq 0x78(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x86e0
decl %eax
movslq %eax, %rcx
movq 0x30(%rsp), %rdx
subq %rdx, %rcx
leaq 0x290(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x84a0
movq 0x290(%rsp), %rsi
movq 0x298(%rsp), %rdx
movq %r12, %rdi
callq 0x8180
movq 0x290(%rsp), %rdi
cmpq %r13, %rdi
je 0x7ade7
movq 0x2a0(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x290(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x51473
movslq 0x290(%rsp), %rcx
movq 0x78(%rsp), %rax
movq 0x80(%rsp), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
addq $-0x12, %rdx
cmpq %rcx, %rdx
jne 0x7ae39
movq 0x80(%rax), %rsi
movq 0x88(%rax), %rdx
movq %r12, %rdi
callq 0x8180
jmp 0x7af24
leaq 0x208(%rsp), %rcx
movq %rcx, 0x1f8(%rsp)
movq 0x60(%rax), %rsi
movq 0x68(%rax), %rdx
addq %rsi, %rdx
leaq 0x1f8(%rsp), %rdi
callq 0x2e45c
movq 0x78(%rsp), %rax
leaq 0x228(%rsp), %rcx
movq %rcx, 0x218(%rsp)
movq 0x80(%rax), %rsi
movq 0x88(%rax), %rdx
addq %rsi, %rdx
leaq 0x218(%rsp), %r15
movq %r15, %rdi
callq 0x2e45c
leaq 0x8(%rsp), %rdi
leaq 0x1f8(%rsp), %rsi
movq %r15, %rdx
callq 0x5790e
movq 0x218(%rsp), %rdi
leaq 0x228(%rsp), %rax
cmpq %rax, %rdi
je 0x7aed1
movq 0x228(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x1f8(%rsp), %rdi
leaq 0x208(%rsp), %rax
cmpq %rax, %rdi
je 0x7aef6
movq 0x208(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r12, %rdi
callq 0x8180
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x7af24
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x78(%rsp), %r15
movq 0x20(%r15), %rdi
callq 0x86e0
movslq %eax, %rdx
movq 0xd0(%rsp), %rax
movq %rdx, 0x30(%rsp)
movb -0x1(%rdx,%rax), %al
movq 0x60(%r15), %rcx
cmpb (%rcx), %al
je 0x7aff7
movl $0x13, %edx
movq 0x9008a(%rip), %rdi     # 0x10afe8
leaq 0x6211f(%rip), %rsi     # 0xdd084
callq 0x84e0
movq 0xd0(%rsp), %rax
movq 0x30(%rsp), %rcx
movb -0x1(%rax,%rcx), %al
movb %al, 0x8(%rsp)
movl $0x1, %edx
movq 0x9005d(%rip), %rdi     # 0x10afe8
leaq 0x8(%rsp), %rsi
callq 0x84e0
movq %rax, %r15
movl $0xa, %edx
movq %rax, %rdi
leaq 0x620f1(%rip), %rsi     # 0xdd098
callq 0x84e0
movq 0x78(%rsp), %rax
movq 0x60(%rax), %rax
movb (%rax), %al
movb %al, 0x8(%rsp)
movl $0x1, %edx
movq %r15, %rdi
leaq 0x8(%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 0x290(%rsp), %rdi
callq 0x31188
leaq 0x260(%rsp), %rdi
callq 0x3123c
leaq 0x278(%rsp), %rdi
callq 0x3123c
leaq 0x78(%rsp), %rdi
callq 0x3123c
jmp 0x7a54d
leaq 0x448(%rsp), %rdi
callq 0x3f49e
leaq 0x418(%rsp), %rdi
callq 0x3f522
leaq 0x3e8(%rsp), %rdi
callq 0x3f5a6
leaq 0x3b8(%rsp), %rdi
callq 0x33302
leaq 0xf0(%rsp), %rdi
callq 0x31aa2
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x7b093
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x1d8(%rsp), %rdi
leaq 0x1e8(%rsp), %rax
cmpq %rax, %rdi
leaq 0x1c8(%rsp), %rbx
leaq 0x1a8(%rsp), %r14
leaq 0x188(%rsp), %r15
je 0x7b0d0
movq 0x1e8(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x150(%rsp), %rdi
callq 0x3123c
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x7b102
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x7b127
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x178(%rsp), %rdi
cmpq %r15, %rdi
je 0x7b144
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x198(%rsp), %rdi
cmpq %r14, %rdi
je 0x7b161
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x3a8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7b182
movq 0x3a8(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x1b8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7b19f
movq 0x1c8(%rsp), %rsi
incq %rsi
callq 0x8480
xorl %eax, %eax
addq $0x478, %rsp            # imm = 0x478
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x7b33b
movq 0x18(%rsp), %rsi
jmp 0x7b243
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x7b440
movq 0x18(%rsp), %rsi
jmp 0x7b438
movq %rax, %r14
jmp 0x7b222
jmp 0x7b338
movq %rax, %r14
movq 0x218(%rsp), %rdi
leaq 0x228(%rsp), %rax
cmpq %rax, %rdi
je 0x7b222
movq 0x228(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x1f8(%rsp), %rdi
leaq 0x208(%rsp), %rax
cmpq %rax, %rdi
je 0x7b33b
movq 0x208(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x7b33b
jmp 0x7b266
jmp 0x7b34d
jmp 0x7b34d
jmp 0x7b34d
jmp 0x7b34d
movq %rax, %r14
movq 0x290(%rsp), %rdi
cmpq %r13, %rdi
jne 0x7b430
jmp 0x7b440
jmp 0x7b34d
jmp 0x7b47d
movq %rax, %r14
leaq 0x1c8(%rsp), %r12
leaq 0x1a8(%rsp), %r13
leaq 0x188(%rsp), %rbp
leaq 0xc0(%rsp), %rbx
jmp 0x7b4ad
movq %rax, %r14
leaq 0xc0(%rsp), %rbx
jmp 0x7b4df
movq %rax, %r14
movl $0x200, %esi            # imm = 0x200
jmp 0x7b2df
jmp 0x7b475
jmp 0x7b2d7
jmp 0x7b475
movq %rax, %r14
movl $0x208, %esi            # imm = 0x208
movq %r15, %rdi
jmp 0x7b54e
jmp 0x7b475
movq %rax, %r14
movl $0x208, %esi            # imm = 0x208
movq %rbx, %rdi
jmp 0x7b54e
jmp 0x7b475
movq %rax, %r14
jmp 0x7b570
movq %rax, %r14
jmp 0x7b58d
movq %rax, %r14
jmp 0x7b5ae
jmp 0x7b47d
movq %rax, %r14
jmp 0x7b45a
movq %rax, %r14
jmp 0x7b44d
jmp 0x7b46b
jmp 0x7b466
movq %rax, %r14
leaq 0x290(%rsp), %rdi
callq 0x31188
jmp 0x7b440
movq %rax, %r14
jmp 0x7b440
jmp 0x7b46b
movq %rax, %r14
jmp 0x7b3cd
jmp 0x7b3ae
movq %rax, %r14
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x7b3cd
movq 0x68(%rsp), %rsi
jmp 0x7b3c5
movq %rax, %r14
jmp 0x7b3f2
movq %rax, %r14
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x7b3b1
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x7b3b1
movq %rax, %r14
jmp 0x7b40e
movq %rax, %r14
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x7b3cd
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x130(%rsp), %rdi
leaq 0x140(%rsp), %rax
cmpq %rax, %rdi
je 0x7b3f2
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x7b40e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x238(%rsp), %rdi
callq 0x3123c
movq 0x290(%rsp), %rdi
leaq 0x2a0(%rsp), %rax
cmpq %rax, %rdi
je 0x7b440
movq 0x2a0(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x260(%rsp), %rdi
callq 0x3123c
leaq 0x278(%rsp), %rdi
callq 0x3123c
leaq 0x78(%rsp), %rdi
callq 0x3123c
jmp 0x7b480
movq %rax, %r14
jmp 0x7b41b
movq %rax, %r14
leaq 0x8(%rsp), %rdi
jmp 0x7b45f
movq %rax, %r14
jmp 0x7b553
movq %rax, %r14
leaq 0xc0(%rsp), %rbx
leaq 0x3b8(%rsp), %rdi
callq 0x7bc6a
leaq 0x1c8(%rsp), %r12
leaq 0x1a8(%rsp), %r13
leaq 0x188(%rsp), %rbp
leaq 0xf0(%rsp), %rdi
callq 0x31aa2
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x7b4df
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x1d8(%rsp), %rdi
leaq 0x1e8(%rsp), %rax
cmpq %rax, %rdi
je 0x7b504
movq 0x1e8(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x150(%rsp), %rdi
callq 0x3123c
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x7b536
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xb0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7b553
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x178(%rsp), %rdi
cmpq %rbp, %rdi
je 0x7b570
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x198(%rsp), %rdi
cmpq %r13, %rdi
je 0x7b58d
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x3a8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7b5ae
movq 0x3a8(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x1b8(%rsp), %rdi
cmpq %r12, %rdi
je 0x7b5cb
movq 0x1c8(%rsp), %rsi
incq %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840