// File: readmapping[P]alfalfa/src/options.cpp
// Function: processParameters(int, char**, mapOptions_t&)
void processParameters(int argc, char* argv[], mapOptions_t& opt) {
    //parse command
    if (strcmp(argv[1], "index") == 0) {
        opt.command = INDEX;
        opt.saveIndex = true;
    } else if (strcmp(argv[1], "align") == 0) {
        opt.command = ALN;
    } else {
        fprintf(stderr, "[main] unrecognized command '%s'\n", argv[0]);
        option::printUsage(std::cerr, basicUsage);
    }

    cerr << "parsing options: ..." << endl;
    argc -= 2;
    argv++;
    argv++;
    option::Stats stats(fullUsage, argc, argv);
    //misc option parsing
    option::Option* options = new option::Option[stats.options_max];
    option::Option* buffer = new option::Option[stats.buffer_max];
    option::Parser parser(fullUsage, argc, argv, options, buffer);
    if (parser.error()) {
        cerr << "error during parsing of command line options" << endl;
        exit(1);
    }
    if (options[ARG_HELP]) {
        if (opt.command == INDEX) {
            option::printUsage(std::cerr, indexUsage);
        } else {
            option::printUsage(std::cerr, alignUsage);
        }
        option::printUsage(std::cerr, miscUsage);
        exit(0);
    }
    if (options[ARG_VERBOSE])
        opt.alnOptions.print = atoi(options[ARG_VERBOSE].arg);
    if (options[ARG_DEBUG])
        opt.alnOptions.debugFile = fopen(options[ARG_DEBUG].arg, "w");
    //index parsing options
    if(options[ARG_UNKNOWN] || parser.nonOptionsCount() > 0){
        cerr << "encountered illegal options:" << endl;
        for (option::Option* opt = options[ARG_UNKNOWN]; opt; opt = opt->next())
            std::cerr << "Unknown option: " << opt->name << "\n";
        for (int i = 0; i < parser.nonOptionsCount(); ++i)
            std::cerr << "Non-option #" << i << ": " << parser.nonOption(i) << "\n";
        cerr << "terminating ..." << endl;
        exit(1);
    }
    //index parsing options
    for (int i = 0; i < parser.optionsCount(); ++i) {
        option::Option& option = buffer[i];
        switch (option.index()) {
            case ARG_REFERENCE: opt.ref_fasta = option.arg;
                break;
            case ARG_SPARSENESS: opt.K = atoi(option.arg);
                break;
            case ARG_PREFIX: opt.index_prefix = option.arg;
                break;
            case ARG_NO_CHILD: opt.hasChild = false;
                break;
            case ARG_SUFLINK: opt.hasSuflink = true;
                break;
            case ARG_NO_KMER: opt.hasKmer = false;
                break;
            default: break;
                throw 1;
        }
    }
    //check needed options and correctness
    if (opt.command == INDEX && !options[ARG_REFERENCE]) {
        cerr << "ERROR: no reference file given." << endl;
        exit(1);
    }
    if (opt.command == INDEX) {
        if (opt.index_prefix.empty()) {
            opt.index_prefix = opt.ref_fasta;
        }
        if (opt.hasChild && opt.hasSuflink)
            fprintf(stderr, "WARNING: having both child array and suffix link support is marginally useful and requires more memory! \n");
        if (!opt.hasChild && opt.K >= 3)
            fprintf(stderr, "WARNING: no child array means much slower search times! \n");
    }
    if (opt.command == ALN && !(options[ARG_REFERENCE] || options[ARG_INDEX])) {
        cerr << "ERROR: no reference or index name given." << endl;
        exit(1);
    }
    //mapping options parsing
    if (opt.command == ALN) {
        for (int i = 0; i < parser.optionsCount(); ++i) {
            option::Option& option = buffer[i];
            switch (option.index()) {
                case ARG_INDEX: opt.indexLocation = option.arg;
                    break;
                case ARG_SAVE: opt.saveIndex = true;
                    break;
                case ARG_SINGLE: opt.unpairedQ = option.arg;
                    break;
                case ARG_MATES1: opt.pair1 = option.arg;
                    break;
                case ARG_MATES2: opt.pair2 = option.arg;
                    break;
                case ARG_OUTPUT: opt.outputName = option.arg;
                    break;
                case ARG_ALIGNMENTS: opt.alnOptions.alignmentCount = atoi(option.arg);
                    break;
                case ARG_NO_FORWARD: opt.alnOptions.noFW = 1;
                    break;
                case ARG_NO_REVERSE: opt.alnOptions.noRC = 1;
                    break;
                case ARG_EDIT_DISTANCE: opt.alnOptions.errorPercent = atof(option.arg) + 0.01;
                    break;
                case ARG_THREADS: opt.query_threads = atoi(option.arg);
                    break;
                case ARG_SEED: opt.alnOptions.memType = parseSeedType(option.arg);
                    break;
                case ARG_MIN_LENGTH: opt.alnOptions.minMemLength = atoi(option.arg);
                    opt.alnOptions.fixedMinLength = true;
                    break;
                case ARG_MAX_SEEDS: opt.alnOptions.maxSeedCandidates = atoi(option.arg);
                    break;
                case ARG_MAX_SMEM: opt.alnOptions.maxSmemMemStart = atoi(option.arg);
                    break;
                case ARG_MAX_MEM: opt.alnOptions.maxRegionMems = atoi(option.arg);
                    break;
                case ARG_MIN_MEML: opt.alnOptions.minMemRegLength = atoi(option.arg);
                    break;
                case ARG_NO_RESCUE: opt.alnOptions.rescue = false;
                    break;
                case ARG_NO_SPARSEQ: opt.alnOptions.noSparseQ = true;
                    break;
                case ARG_FULLDP: opt.alnOptions.fullDP = true;
                    break;
                case ARG_MAX_FAILURES: opt.alnOptions.maxTrial = atoi(option.arg);
                    break;
                case ARG_MAX_F_BEST: opt.alnOptions.maxTrialBest = false;
                    break;
                case ARG_MIN_ALIGN: opt.alnOptions.minTrial = atoi(option.arg);
                    break;
                case ARG_MIN_COVERAGE: opt.alnOptions.minCoverage = atof(option.arg);
                    break;
                case ARG_ALWAYS_UNIQUE: opt.alnOptions.alwaysUnique = false;
                    break;
                case ARG_LOCAL: opt.alnOptions.global = false;
                    break;
                case ARG_BANDWIDTH: opt.alnOptions.fixedBandSize = atoi(option.arg);
                    break;
                case ARG_MATCH: opt.alnOptions.match = atoi(option.arg);
                    opt.alnOptions.scoresSetByUser = true;
                    break;
                case ARG_MISMATCH: opt.alnOptions.mismatch = atoi(option.arg);
                    opt.alnOptions.scoresSetByUser = true;
                    break;
                case ARG_GAP_OPEN: opt.alnOptions.openGap = atoi(option.arg);
                    opt.alnOptions.scoresSetByUser = true;
                    break;
                case ARG_GAP_EXTEND: opt.alnOptions.extendGap = atoi(option.arg);
                    opt.alnOptions.scoresSetByUser = true;
                    break;
                case ARG_MIN_INSERT: opt.pairedOpt.minInsert = atoi(option.arg);
                    break;
                case ARG_MAX_INSERT: opt.pairedOpt.maxInsert = atoi(option.arg);
                    break;
                case ARG_ORIENTATION: opt.pairedOpt.orientation = parseOrientation(option.arg);
                    break;
                case ARG_NO_MIXED: opt.pairedOpt.mixed = false;
                    break;
                case ARG_NO_DISCORDANT: opt.pairedOpt.discordant = false;
                    break;
                case ARG_DOVETAIL: opt.pairedOpt.dovetail = true;
                    break;
                case ARG_NO_CONTAIN: opt.pairedOpt.contain = false;
                    break;
                case ARG_NO_OVERLAP: opt.pairedOpt.overlap = false;
                    break;
                case ARG_PAIRED_MODE: opt.pairedOpt.mode = atoi(option.arg);
                    break;
                case ARG_PAIRED_RESCUE: opt.pairedOpt.pairedRescue = true;
                    break;
                default: break;
                    throw 1;
            }
        }
        if (opt.indexLocation.empty() && opt.index_prefix.empty()) {
            opt.index_prefix = opt.ref_fasta;
        }
        if (opt.hasChild && opt.hasSuflink)
            fprintf(stderr, "WARNING: having both child array and suffix link support is marginally useful and requires more memory! \n");
        if (!opt.hasChild && opt.K >= 3)
            fprintf(stderr, "WARNING: no child array means much slower search times! \n");
        if (!opt.saveIndex && opt.indexLocation.empty())
            fprintf(stderr, "WARNING: index will not be saved to disk! \n");
        if (opt.unpairedQ.empty() && (opt.pair1.empty() || opt.pair2.empty())) {
            fprintf(stderr, "ERROR: ALFALFA requires query files. Specify query files with -0 or -1,-2 options.\n");
            exit(1);
        }
        if (opt.outputName.empty())
            opt.outputName = opt.ref_fasta.substr().append(".sam");
        if (opt.alnOptions.errorPercent < 0.0 || opt.alnOptions.errorPercent > 1.0) {
            fprintf(stderr, "ERROR: uncorrect value for edit distance. Value should lie in the interval [0,1[\n");
            exit(1);
        }
        if (opt.alnOptions.minCoverage < 0.0 || opt.alnOptions.minCoverage > 1.0) {
            fprintf(stderr, "ERROR: uncorrect value for minimum coverage. Value should lie in the interval [0,1[\n");
            exit(1);
        }
        if (opt.pairedOpt.minInsert > opt.pairedOpt.maxInsert) {
            fprintf(stderr, "ERROR: minimum insert size is larger than maximum insert size\n");
            exit(1);
        }
        if (opt.pairedOpt.mode < 1 || opt.pairedOpt.mode > 6) {
            fprintf(stderr, "ERROR: chosen paired-end mode not supported.\n");
            exit(1);
        }
        opt.alnOptions.maxAlnCount = max(opt.alnOptions.alignmentCount, opt.alnOptions.minTrial);
        opt.alnOptions.fill_m();
    }
    if (opt.alnOptions.print >= 1)
        opt.printOptions();
    delete[] options;
    delete[] buffer;
}

// Assembly:
subq $0x1e8, %rsp            # imm = 0x1E8
movl %edi, 0x1e4(%rsp)
movq %rsi, 0x1d8(%rsp)
movq %rdx, 0x1d0(%rsp)
movq 0x1d8(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x66816(%rip), %rsi     # 0x79e77
callq 0x85a0
cmpl $0x0, %eax
jne 0x1368a
movq 0x1d0(%rsp), %rax
movl $0x0, (%rax)
movq 0x1d0(%rsp), %rax
movb $0x1, 0xb0(%rax)
jmp 0x136ff
movq 0x1d8(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x667e0(%rip), %rsi     # 0x79e7d
callq 0x85a0
cmpl $0x0, %eax
jne 0x136b7
movq 0x1d0(%rsp), %rax
movl $0x2, (%rax)
jmp 0x136fd
movq 0x83912(%rip), %rax     # 0x96fd0
movq (%rax), %rdi
movq 0x1d8(%rsp), %rax
movq (%rax), %rdx
leaq 0x667b0(%rip), %rsi     # 0x79e83
movb $0x0, %al
callq 0x85c0
movq 0x8390f(%rip), %rdi     # 0x96ff0
leaq 0x81c98(%rip), %rsi     # 0x95380
movl $0x50, %edx
movl $0x32, %ecx
movl $0x4b, %r8d
callq 0xcd10
jmp 0x136ff
movq 0x838ea(%rip), %rdi     # 0x96ff0
leaq 0x66798(%rip), %rsi     # 0x79ea5
callq 0x8360
movq %rax, %rdi
movq 0x83894(%rip), %rsi     # 0x96fb0
callq 0x83b0
movl 0x1e4(%rsp), %eax
subl $0x2, %eax
movl %eax, 0x1e4(%rsp)
movq 0x1d8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x1d8(%rsp)
movq 0x1d8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x1d8(%rsp)
movl 0x1e4(%rsp), %edx
movq 0x1d8(%rsp), %rcx
leaq 0x1c8(%rsp), %rdi
leaq 0x81cf8(%rip), %rsi     # 0x95470
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0x14aa0
movl 0x1cc(%rsp), %eax
movq %rax, 0xe8(%rsp)
movl $0x30, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, 0xe0(%rsp)
callq 0x8030
movq %rax, %rcx
movq 0xe8(%rsp), %rax
movq %rcx, 0xf0(%rsp)
cmpq $0x0, %rax
je 0x13836
movq 0xf0(%rsp), %rax
movq 0xe8(%rsp), %rcx
imulq $0x30, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, 0xd0(%rsp)
movq %rax, 0xd8(%rsp)
movq 0xd8(%rsp), %rdi
movq %rdi, 0xc8(%rsp)
callq 0x14b10
jmp 0x13815
movq 0xd0(%rsp), %rcx
movq 0xc8(%rsp), %rax
addq $0x30, %rax
cmpq %rcx, %rax
movq %rax, 0xd8(%rsp)
jne 0x137fe
movq 0xf0(%rsp), %rax
movq %rax, 0x1c0(%rsp)
movl 0x1c8(%rsp), %eax
movq %rax, 0xb8(%rsp)
movl $0x30, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, 0xb0(%rsp)
callq 0x8030
movq %rax, %rcx
movq 0xb8(%rsp), %rax
movq %rcx, 0xc0(%rsp)
cmpq $0x0, %rax
je 0x138f9
movq 0xc0(%rsp), %rax
movq 0xb8(%rsp), %rcx
imulq $0x30, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, 0xa0(%rsp)
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rdi
movq %rdi, 0x98(%rsp)
callq 0x14b10
jmp 0x138d8
movq 0xa0(%rsp), %rcx
movq 0x98(%rsp), %rax
addq $0x30, %rax
cmpq %rcx, %rax
movq %rax, 0xa8(%rsp)
jne 0x138c1
movq 0xc0(%rsp), %rax
movq %rax, 0x1a8(%rsp)
movl 0x1e4(%rsp), %edx
movq 0x1d8(%rsp), %rcx
movq 0x1c0(%rsp), %r8
movq 0x1a8(%rsp), %r9
leaq 0x190(%rsp), %rdi
leaq 0x81b39(%rip), %rsi     # 0x95470
xorl %eax, %eax
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0xffffffff, 0x10(%rsp) # imm = 0xFFFFFFFF
callq 0x14b70
leaq 0x190(%rsp), %rdi
callq 0x14c20
testb $0x1, %al
jne 0x1396b
jmp 0x139f3
movq 0x8367e(%rip), %rdi     # 0x96ff0
leaq 0x66541(%rip), %rsi     # 0x79eba
callq 0x8360
movq %rax, %rdi
movq 0x83628(%rip), %rsi     # 0x96fb0
callq 0x83b0
movl $0x1, %edi
callq 0x84a0
movq 0xe0(%rsp), %rsi
movq 0xf0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
callq 0x8800
jmp 0x14a8d
movq 0xb0(%rsp), %rsi
movq 0xc0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
callq 0x8800
jmp 0x14a8d
movq 0x1c0(%rsp), %rdi
addq $0x960, %rdi            # imm = 0x960
callq 0x14c30
cmpq $0x0, %rax
je 0x13a8c
movq 0x1d0(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x13a3f
movq 0x835cf(%rip), %rdi     # 0x96ff0
leaq 0x82298(%rip), %rsi     # 0x95cc0
movl $0x50, %edx
movl $0x32, %ecx
movl $0x4b, %r8d
callq 0xcd10
jmp 0x13a62
movq 0x835aa(%rip), %rdi     # 0x96ff0
leaq 0x823b3(%rip), %rsi     # 0x95e00
movl $0x50, %edx
movl $0x32, %ecx
movl $0x4b, %r8d
callq 0xcd10
movq 0x83587(%rip), %rdi     # 0x96ff0
leaq 0x82b60(%rip), %rsi     # 0x965d0
movl $0x50, %edx
movl $0x32, %ecx
movl $0x4b, %r8d
callq 0xcd10
xorl %edi, %edi
callq 0x84a0
movq 0x1c0(%rsp), %rdi
addq $0x900, %rdi            # imm = 0x900
callq 0x14c30
cmpq $0x0, %rax
je 0x13aca
movq 0x1c0(%rsp), %rax
movq 0x920(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x178(%rax)
movq 0x1c0(%rsp), %rdi
addq $0x930, %rdi            # imm = 0x930
callq 0x14c30
cmpq $0x0, %rax
je 0x13b11
movq 0x1c0(%rsp), %rax
movq 0x950(%rax), %rdi
leaq 0x6c877(%rip), %rsi     # 0x80371
callq 0x8460
movq %rax, %rcx
movq 0x1d0(%rsp), %rax
movq %rcx, 0x180(%rax)
movq 0x1c0(%rsp), %rdi
callq 0x14c30
cmpq $0x0, %rax
jne 0x13b3a
leaq 0x190(%rsp), %rdi
callq 0x14c70
cmpl $0x0, %eax
jle 0x13cae
movq 0x834af(%rip), %rdi     # 0x96ff0
leaq 0x6639f(%rip), %rsi     # 0x79ee7
callq 0x8360
movq %rax, %rdi
movq 0x83459(%rip), %rsi     # 0x96fb0
callq 0x83b0
movq 0x1c0(%rsp), %rdi
callq 0x14c30
movq %rax, 0x188(%rsp)
cmpq $0x0, 0x188(%rsp)
je 0x13bc9
movq 0x8346d(%rip), %rdi     # 0x96ff0
leaq 0x6637a(%rip), %rsi     # 0x79f04
callq 0x8360
movq %rax, %rdi
movq 0x188(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0x8360
movq %rax, %rdi
leaq 0x6649c(%rip), %rsi     # 0x7a049
callq 0x8360
movq 0x188(%rsp), %rdi
callq 0x14c80
movq %rax, 0x188(%rsp)
jmp 0x13b71
movl $0x0, 0x184(%rsp)
movl 0x184(%rsp), %eax
movl %eax, 0x94(%rsp)
leaq 0x190(%rsp), %rdi
callq 0x14c70
movl %eax, %ecx
movl 0x94(%rsp), %eax
cmpl %ecx, %eax
jge 0x13c82
movq 0x833e9(%rip), %rdi     # 0x96ff0
leaq 0x66307(%rip), %rsi     # 0x79f15
callq 0x8360
movq %rax, %rdi
movl 0x184(%rsp), %esi
callq 0x8710
movq %rax, %rdi
leaq 0x6a238(%rip), %rsi     # 0x7de64
callq 0x8360
movq %rax, 0x88(%rsp)
movl 0x184(%rsp), %esi
leaq 0x190(%rsp), %rdi
callq 0x14cc0
movq 0x88(%rsp), %rdi
movq %rax, %rsi
callq 0x8360
movq %rax, %rdi
leaq 0x663e2(%rip), %rsi     # 0x7a049
callq 0x8360
movl 0x184(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x184(%rsp)
jmp 0x13bd4
movq 0x83367(%rip), %rdi     # 0x96ff0
leaq 0x66292(%rip), %rsi     # 0x79f22
callq 0x8360
movq %rax, %rdi
movq 0x83311(%rip), %rsi     # 0x96fb0
callq 0x83b0
movl $0x1, %edi
callq 0x84a0
movl $0x0, 0x180(%rsp)
movl 0x180(%rsp), %eax
movl %eax, 0x84(%rsp)
leaq 0x190(%rsp), %rdi
callq 0x14cf0
movl %eax, %ecx
movl 0x84(%rsp), %eax
cmpl %ecx, %eax
jge 0x13dea
movq 0x1a8(%rsp), %rax
movslq 0x180(%rsp), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x178(%rsp)
movq 0x178(%rsp), %rdi
callq 0x14d00
decl %eax
movl %eax, %ecx
movq %rcx, 0x78(%rsp)
subl $0x5, %eax
ja 0x13dd0
movq 0x78(%rsp), %rax
leaq 0x65c61(%rip), %rcx     # 0x79994
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x178(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x1d0(%rsp), %rdi
addq $0x70, %rdi
callq 0x8570
jmp 0x13dd2
movq 0x178(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x4(%rax)
jmp 0x13dd2
movq 0x178(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x1d0(%rsp), %rdi
addq $0x90, %rdi
callq 0x8570
jmp 0x13dd2
movq 0x1d0(%rsp), %rax
movb $0x0, 0xb1(%rax)
jmp 0x13dd2
movq 0x1d0(%rsp), %rax
movb $0x1, 0xb2(%rax)
jmp 0x13dd2
movq 0x1d0(%rsp), %rax
movb $0x0, 0xb3(%rax)
jmp 0x13dd2
jmp 0x13dd2
jmp 0x13dd4
movl 0x180(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x180(%rsp)
jmp 0x13cb9
movq 0x1d0(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x13e3a
movq 0x1c0(%rsp), %rdi
addq $0x30, %rdi
callq 0x14c30
cmpq $0x0, %rax
jne 0x13e3a
movq 0x831db(%rip), %rdi     # 0x96ff0
leaq 0x66116(%rip), %rsi     # 0x79f32
callq 0x8360
movq %rax, %rdi
movq 0x83185(%rip), %rsi     # 0x96fb0
callq 0x83b0
movl $0x1, %edi
callq 0x84a0
movq 0x1d0(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x13ef8
movq 0x1d0(%rsp), %rdi
addq $0x90, %rdi
callq 0x86e0
testb $0x1, %al
jne 0x13e65
jmp 0x13e85
movq 0x1d0(%rsp), %rsi
addq $0x70, %rsi
movq 0x1d0(%rsp), %rdi
addq $0x90, %rdi
callq 0x8060
movq 0x1d0(%rsp), %rax
testb $0x1, 0xb1(%rax)
je 0x13ebf
movq 0x1d0(%rsp), %rax
testb $0x1, 0xb2(%rax)
je 0x13ebf
movq 0x83122(%rip), %rax     # 0x96fd0
movq (%rax), %rdi
leaq 0x6609a(%rip), %rsi     # 0x79f52
movb $0x0, %al
callq 0x85c0
movq 0x1d0(%rsp), %rax
testb $0x1, 0xb1(%rax)
jne 0x13ef6
movq 0x1d0(%rsp), %rax
cmpl $0x3, 0x4(%rax)
jl 0x13ef6
movq 0x830eb(%rip), %rax     # 0x96fd0
movq (%rax), %rdi
leaq 0x660cd(%rip), %rsi     # 0x79fbc
movb $0x0, %al
callq 0x85c0
jmp 0x13ef8
movq 0x1d0(%rsp), %rax
cmpl $0x2, (%rax)
jne 0x13f62
movq 0x1c0(%rsp), %rdi
addq $0x30, %rdi
callq 0x14c30
cmpq $0x0, %rax
jne 0x13f62
movq 0x1c0(%rsp), %rdi
addq $0x150, %rdi            # imm = 0x150
callq 0x14c30
cmpq $0x0, %rax
jne 0x13f62
movq 0x830b3(%rip), %rdi     # 0x96ff0
leaq 0x660b2(%rip), %rsi     # 0x79ff6
callq 0x8360
movq %rax, %rdi
movq 0x8305d(%rip), %rsi     # 0x96fb0
callq 0x83b0
movl $0x1, %edi
callq 0x84a0
movq 0x1d0(%rsp), %rax
cmpl $0x2, (%rax)
jne 0x14a2d
movl $0x0, 0x174(%rsp)
movl 0x174(%rsp), %eax
movl %eax, 0x74(%rsp)
leaq 0x190(%rsp), %rdi
callq 0x14cf0
movl %eax, %ecx
movl 0x74(%rsp), %eax
cmpl %ecx, %eax
jge 0x14695
movq 0x1a8(%rsp), %rax
movslq 0x174(%rsp), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x168(%rsp)
movq 0x168(%rsp), %rdi
callq 0x14d00
addl $-0x7, %eax
movl %eax, %ecx
movq %rcx, 0x68(%rsp)
subl $0x28, %eax
ja 0x1467b
movq 0x68(%rsp), %rax
leaq 0x658fd(%rip), %rcx     # 0x798f0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x1d0(%rsp), %rdi
addq $0xb8, %rdi
callq 0x8570
jmp 0x1467d
movq 0x1d0(%rsp), %rax
movb $0x1, 0xb0(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x1d0(%rsp), %rdi
addq $0x10, %rdi
callq 0x8570
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x1d0(%rsp), %rdi
addq $0x30, %rdi
callq 0x8570
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x1d0(%rsp), %rdi
addq $0x50, %rdi
callq 0x8570
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x1d0(%rsp), %rdi
addq $0xd8, %rdi
callq 0x8570
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x150(%rax)
jmp 0x1467d
movq 0x1d0(%rsp), %rax
movb $0x1, 0x174(%rax)
jmp 0x1467d
movq 0x1d0(%rsp), %rax
movb $0x1, 0x175(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x84e0
movsd 0x657c1(%rip), %xmm1    # 0x798e8
addsd %xmm1, %xmm0
movq 0x1d0(%rsp), %rax
movsd %xmm0, 0x130(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x8(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x58(%rsp)
leaq 0x147(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x8750
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
leaq 0x148(%rsp), %rdi
callq 0xb8b0
jmp 0x1419f
leaq 0x148(%rsp), %rdi
callq 0x13490
movl %eax, 0x54(%rsp)
jmp 0x141b2
movl 0x54(%rsp), %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x188(%rax)
leaq 0x148(%rsp), %rdi
callq 0x8858
leaq 0x147(%rsp), %rdi
callq 0x83e0
jmp 0x1467d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
jmp 0x1421a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
leaq 0x148(%rsp), %rdi
callq 0x8858
leaq 0x147(%rsp), %rdi
callq 0x83e0
jmp 0x14a8d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x138(%rax)
movq 0x1d0(%rsp), %rax
movb $0x1, 0x13c(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x140(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x144(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x14c(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x148(%rax)
jmp 0x1467d
movq 0x1d0(%rsp), %rax
movb $0x0, 0x171(%rax)
jmp 0x1467d
movq 0x1d0(%rsp), %rax
movb $0x1, 0x172(%rax)
jmp 0x1467d
movq 0x1d0(%rsp), %rax
movb $0x1, 0x173(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x154(%rax)
jmp 0x1467d
movq 0x1d0(%rsp), %rax
movb $0x0, 0x15c(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x158(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x84e0
movq 0x1d0(%rsp), %rax
movsd %xmm0, 0x168(%rax)
jmp 0x1467d
movq 0x1d0(%rsp), %rax
movb $0x0, 0x170(%rax)
jmp 0x1467d
movq 0x1d0(%rsp), %rax
movb $0x0, 0x12a(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x190(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x100(%rax)
movq 0x1d0(%rsp), %rax
movb $0x1, 0x129(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x104(%rax)
movq 0x1d0(%rsp), %rax
movb $0x1, 0x129(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x108(%rax)
movq 0x1d0(%rsp), %rax
movb $0x1, 0x129(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x10c(%rax)
movq 0x1d0(%rsp), %rax
movb $0x1, 0x129(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x198(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x19c(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x40(%rsp)
leaq 0x11f(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x8750
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
leaq 0x120(%rsp), %rdi
callq 0xb8b0
jmp 0x14565
leaq 0x120(%rsp), %rdi
callq 0x13590
movl %eax, 0x3c(%rsp)
jmp 0x14578
movl 0x3c(%rsp), %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x1b0(%rax)
leaq 0x120(%rsp), %rdi
callq 0x8858
leaq 0x11f(%rsp), %rdi
callq 0x83e0
jmp 0x1467d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
jmp 0x145e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
leaq 0x120(%rsp), %rdi
callq 0x8858
leaq 0x11f(%rsp), %rdi
callq 0x83e0
jmp 0x14a8d
movq 0x1d0(%rsp), %rax
movb $0x0, 0x1a0(%rax)
jmp 0x1467d
movq 0x1d0(%rsp), %rax
movb $0x0, 0x1a1(%rax)
jmp 0x1467d
movq 0x1d0(%rsp), %rax
movb $0x1, 0x1a2(%rax)
jmp 0x1467d
movq 0x1d0(%rsp), %rax
movb $0x0, 0x1a3(%rax)
jmp 0x1467d
movq 0x1d0(%rsp), %rax
movb $0x0, 0x1a4(%rax)
jmp 0x1467d
movq 0x168(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x8670
movl %eax, %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x1a8(%rax)
jmp 0x1467d
movq 0x1d0(%rsp), %rax
movb $0x1, 0x1ac(%rax)
jmp 0x1467d
jmp 0x1467d
jmp 0x1467f
movl 0x174(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x174(%rsp)
jmp 0x13f7e
movq 0x1d0(%rsp), %rdi
addq $0xb8, %rdi
callq 0x86e0
testb $0x1, %al
jne 0x146af
jmp 0x146e9
movq 0x1d0(%rsp), %rdi
addq $0x90, %rdi
callq 0x86e0
testb $0x1, %al
jne 0x146c9
jmp 0x146e9
movq 0x1d0(%rsp), %rsi
addq $0x70, %rsi
movq 0x1d0(%rsp), %rdi
addq $0x90, %rdi
callq 0x8060
movq 0x1d0(%rsp), %rax
testb $0x1, 0xb1(%rax)
je 0x14723
movq 0x1d0(%rsp), %rax
testb $0x1, 0xb2(%rax)
je 0x14723
movq 0x828be(%rip), %rax     # 0x96fd0
movq (%rax), %rdi
leaq 0x65836(%rip), %rsi     # 0x79f52
movb $0x0, %al
callq 0x85c0
movq 0x1d0(%rsp), %rax
testb $0x1, 0xb1(%rax)
jne 0x1475a
movq 0x1d0(%rsp), %rax
cmpl $0x3, 0x4(%rax)
jl 0x1475a
movq 0x82887(%rip), %rax     # 0x96fd0
movq (%rax), %rdi
leaq 0x65869(%rip), %rsi     # 0x79fbc
movb $0x0, %al
callq 0x85c0
movq 0x1d0(%rsp), %rax
testb $0x1, 0xb0(%rax)
jne 0x1479d
movq 0x1d0(%rsp), %rdi
addq $0xb8, %rdi
callq 0x86e0
testb $0x1, %al
jne 0x14785
jmp 0x1479d
movq 0x82844(%rip), %rax     # 0x96fd0
movq (%rax), %rdi
leaq 0x65889(%rip), %rsi     # 0x7a01f
movb $0x0, %al
callq 0x85c0
movq 0x1d0(%rsp), %rdi
addq $0x10, %rdi
callq 0x86e0
testb $0x1, %al
jne 0x147b4
jmp 0x14802
movq 0x1d0(%rsp), %rdi
addq $0x30, %rdi
callq 0x86e0
testb $0x1, %al
jne 0x147e0
movq 0x1d0(%rsp), %rdi
addq $0x50, %rdi
callq 0x86e0
testb $0x1, %al
jne 0x147e0
jmp 0x14802
movq 0x827e9(%rip), %rax     # 0x96fd0
movq (%rax), %rdi
leaq 0x6585a(%rip), %rsi     # 0x7a04b
movb $0x0, %al
callq 0x85c0
movl $0x1, %edi
callq 0x84a0
movq 0x1d0(%rsp), %rdi
addq $0xd8, %rdi
callq 0x86e0
testb $0x1, %al
jne 0x1481f
jmp 0x148b0
movq 0x1d0(%rsp), %rsi
addq $0x70, %rsi
xorl %eax, %eax
movl %eax, %edx
leaq 0xf8(%rsp), %rdi
movq %rdi, 0x28(%rsp)
movq $-0x1, %rcx
callq 0x83a0
movq 0x28(%rsp), %rdi
leaq 0x6584b(%rip), %rsi     # 0x7a09f
callq 0x87f0
movq %rax, 0x30(%rsp)
jmp 0x14860
movq 0x30(%rsp), %rsi
movq 0x1d0(%rsp), %rdi
addq $0xd8, %rdi
callq 0x8060
jmp 0x1487b
leaq 0xf8(%rsp), %rdi
callq 0x8858
jmp 0x148b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x8858
jmp 0x14a8d
movq 0x1d0(%rsp), %rax
xorps %xmm0, %xmm0
ucomisd 0x130(%rax), %xmm0
ja 0x148e3
movq 0x1d0(%rsp), %rax
movsd 0x130(%rax), %xmm0
movsd 0x65003(%rip), %xmm1    # 0x798e0
ucomisd %xmm1, %xmm0
jbe 0x14905
movq 0x826e6(%rip), %rax     # 0x96fd0
movq (%rax), %rdi
leaq 0x657b0(%rip), %rsi     # 0x7a0a4
movb $0x0, %al
callq 0x85c0
movl $0x1, %edi
callq 0x84a0
movq 0x1d0(%rsp), %rax
xorps %xmm0, %xmm0
ucomisd 0x168(%rax), %xmm0
ja 0x14938
movq 0x1d0(%rsp), %rax
movsd 0x168(%rax), %xmm0
movsd 0x64fae(%rip), %xmm1    # 0x798e0
ucomisd %xmm1, %xmm0
jbe 0x1495a
movq 0x82691(%rip), %rax     # 0x96fd0
movq (%rax), %rdi
leaq 0x657ad(%rip), %rsi     # 0x7a0f6
movb $0x0, %al
callq 0x85c0
movl $0x1, %edi
callq 0x84a0
movq 0x1d0(%rsp), %rax
movl 0x198(%rax), %eax
movq 0x1d0(%rsp), %rcx
cmpl 0x19c(%rcx), %eax
jle 0x1499a
movq 0x82651(%rip), %rax     # 0x96fd0
movq (%rax), %rdi
leaq 0x657c2(%rip), %rsi     # 0x7a14b
movb $0x0, %al
callq 0x85c0
movl $0x1, %edi
callq 0x84a0
movq 0x1d0(%rsp), %rax
cmpl $0x1, 0x1a8(%rax)
jl 0x149bc
movq 0x1d0(%rsp), %rax
cmpl $0x6, 0x1a8(%rax)
jle 0x149de
movq 0x8260d(%rip), %rax     # 0x96fd0
movq (%rax), %rdi
leaq 0x657bd(%rip), %rsi     # 0x7a18a
movb $0x0, %al
callq 0x85c0
movl $0x1, %edi
callq 0x84a0
movq 0x1d0(%rsp), %rdi
addq $0x100, %rdi            # imm = 0x100
addq $0x50, %rdi
movq 0x1d0(%rsp), %rsi
addq $0x100, %rsi            # imm = 0x100
addq $0x58, %rsi
callq 0x14d40
movl (%rax), %ecx
movq 0x1d0(%rsp), %rax
movl %ecx, 0x160(%rax)
movq 0x1d0(%rsp), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x12580
movq 0x1d0(%rsp), %rax
cmpl $0x1, 0x178(%rax)
jl 0x14a4b
movq 0x1d0(%rsp), %rdi
callq 0x128b0
movq 0x1c0(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, %rax
je 0x14a68
movq 0x20(%rsp), %rdi
callq 0x8520
movq 0x1a8(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x14a85
movq 0x18(%rsp), %rdi
callq 0x8520
addq $0x1e8, %rsp            # imm = 0x1E8
retq
movq 0x1b8(%rsp), %rdi
callq 0x8730
nopw (%rax,%rax)