// File: readmapping[P]alfalfa/src/main.cpp
// Function: main
int main(int argc, char* argv[]) {
    cerr << "@PG\tID:" << PROG << "\tVN:" << PROG_VERSION << endl;
    //handle command structure and general help
    if (argc < 2 || strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0) {
        option::printUsage(std::cerr, basicUsage);
        exit(1);
    }
    if (strcmp(argv[1], "evaluate") == 0) {
        samCheckOptions_t opt;
        opt.initOptions();
        processCheckParameters(argc - 1, argv + 1, opt);
        cerr << "parsing options: done" << endl;
        if (opt.subcommand == ORACLE)
            checkOracle(opt);
        else if (opt.subcommand == SUMMARY)
            checkSummary(opt);
        else if (opt.subcommand == WGSIM)
            checkWgsim(opt);
    } else {
        mapOptions_t opt;
        opt.initOptions();
        processParameters(argc, argv, opt);
        //query name + read initialization
        cerr << "parsing options: done" << endl;
        sa = new sparseSA();
        if (opt.command == INDEX) {
            cerr << "loading ref sequences: ..." << endl;
            sa->loadRef(opt.ref_fasta);
            cerr << "loading ref sequences: done" << endl;
            cerr << "# ref sequence: " << opt.ref_fasta.data() << endl;
            //build index
            cerr << "building index with s = " << opt.K << " ... " << endl;
            clock_t start = clock();
            sa->init(opt.K, opt.hasSuflink, opt.hasChild, opt.hasKmer);
            sa->construct();
            cerr << "building index: done" << endl;
            if (opt.saveIndex) {
                cerr << "saving index to disk" << " ... " << endl;
                sa->save(opt.index_prefix);
                cerr << "saving index to disk: done" << endl;
            }
            clock_t end = clock();
            double cpu_time = (double) (end - start) / CLOCKS_PER_SEC;
            cerr << "time for building index structure: " << cpu_time << endl;
            cerr << "INDEX SIZE IN BYTES: " << sa->index_size_in_bytes() << endl;
            delete sa;
        } else if (opt.command == ALN) {
            //build or load index
            if (opt.indexLocation.empty() || !sa->load(opt.indexLocation)) {
                sa->loadRef(opt.ref_fasta);
                sa->init(opt.K, opt.hasSuflink, opt.hasChild, opt.hasKmer); //because S needs to be changed
                //TODO: set choice for kmer: situation yes or no
                cerr << "building index with s = " << opt.K << " ... " << endl;
                //adjust data structure to seed choice and sparseness
                clock_t start = clock();
                sa->construct();
                cerr << "building index: done" << endl;
                if (opt.saveIndex) {
                    cerr << "saving index to disk" << " ... " << endl;
                    sa->save(opt.index_prefix);
                    cerr << "saving index to disk: done" << endl;
                }
                clock_t end = clock();
                double cpu_time = (double) (end - start) / CLOCKS_PER_SEC;
                cerr << "time for building index structure: " << cpu_time << endl;
            } else {
                opt.K = sa->K;
                opt.hasChild = sa->hasChild;
                opt.hasSuflink = sa->hasSufLink;
                opt.hasKmer = sa->hasKmer;
            }
            if (opt.alnOptions.print >= 1) {
                cerr << "index has sparseness " << opt.K << endl;
                cerr << "index uses suffix links? " << (sa->hasSufLink ? "yes" : "no") << endl;
                cerr << "index uses child array? " << (sa->hasChild ? "yes" : "no") << endl;
                cerr << "INDEX SIZE IN BYTES: " << sa->index_size_in_bytes() << endl;
            }
#ifndef NDEBUG
            if (opt.alnOptions.debugFile != NULL) {
                fprintf(opt.alnOptions.debugFile, "#REF %s\n", opt.ref_fasta.c_str());
                fprintf(opt.alnOptions.debugFile, "%lu\n", sa->S.length());
                long sequenceCount = sa->descr.size();
                fprintf(opt.alnOptions.debugFile, "%ld\n", sequenceCount);
                if (sequenceCount == 1)
                    fprintf(opt.alnOptions.debugFile, "%d %s %lu %ld\n", 0, sa->descr[0].c_str(), sa->S.length(), sa->startpos[0]);
                else {
                    for (long i = 0; i < sequenceCount - 1; i++)
                        fprintf(opt.alnOptions.debugFile, "%ld %s %ld %ld\n", i, sa->descr[i].c_str(), sa->startpos[i + 1] - sa->startpos[i], sa->startpos[i]);
                    fprintf(opt.alnOptions.debugFile, "%ld %s %ld %ld\n", sequenceCount - 1, sa->descr[sequenceCount - 1].c_str(), (long) (sa->S.length() - sa->startpos[sequenceCount - 1]), sa->startpos[sequenceCount - 1]);
                }
            }
#endif
            //Print SAM Header, require refdescre, startpos and argc/argv
            outfile = fopen(opt.outputName.c_str(), "w");
            string header = createHeader(argc, argv, sa->S.length(), sa);
            fprintf(outfile, "%s", header.c_str());
            if (opt.alnOptions.print >= 1) cerr << "header printed to output" << endl;
            //FIRST: Unpaired reads
            if (!opt.unpairedQ.empty()) {
                if (opt.alnOptions.print >= 2) cerr << "#SE" << endl;
                cerr << "Mapping unpaired reads to the index using " << opt.query_threads << " threads ..." << endl;
                queryReader = new fastqInputReader(opt.unpairedQ, opt.nucleotidesOnly);
                clock_t start = clock();
                unpaired_thread(&opt);
                clock_t end = clock();
                double cpu_time = (double) (end - start) / CLOCKS_PER_SEC;
                cerr << endl;
                cerr << "mapping unpaired: done in " << cpu_time << " seconds." << endl;
                delete queryReader;
            }
            //SECOND: Paired reads
            if (!opt.pair1.empty() && !opt.pair2.empty()) {
                if (opt.alnOptions.print >= 2) cerr << "#PE" << endl;
                cerr << "Mapping paired reads to the index using " << opt.query_threads << " threads ..." << endl;
                mate1Reader = new fastqInputReader(opt.pair1, opt.nucleotidesOnly);
                mate2Reader = new fastqInputReader(opt.pair2, opt.nucleotidesOnly);
                clock_t start = clock();
                paired_thread1(&opt);
                clock_t end = clock();
                double cpu_time = (double) (end - start) / CLOCKS_PER_SEC;
                cerr << endl;
                cerr << "mapping paired: done in " << cpu_time << " seconds" << endl;
                delete mate1Reader;
                delete mate2Reader;
            } else if (!opt.pair1.empty() || !opt.pair2.empty()) {
                fprintf(stderr, "ALFALFA requires 2 separate mate pairs files \n");
                exit(1);
            }
            fclose(outfile);
#ifndef NDEBUG
            if (opt.alnOptions.debugFile != NULL) fclose(opt.alnOptions.debugFile);
#endif
            delete sa;
            cerr << "FINISHED" << endl;
        }
    }
    return 0;
}

// Assembly:
subq $0x598, %rsp            # imm = 0x598
movl $0x0, 0x594(%rsp)
movl %edi, 0x590(%rsp)
movq %rsi, 0x588(%rsp)
movq 0x8c968(%rip), %rdi     # 0x96ff0
leaq 0x6ead1(%rip), %rsi     # 0x79160
callq 0x8360
movq %rax, %rdi
leaq 0x8cdb2(%rip), %rsi     # 0x97450
callq 0x8330
movq %rax, %rdi
leaq 0x6eaa1(%rip), %rsi     # 0x7914e
callq 0x8360
movq %rax, %rdi
leaq 0x8cdd4(%rip), %rsi     # 0x97490
callq 0x8330
movq %rax, %rdi
movq 0x8c8e5(%rip), %rsi     # 0x96fb0
callq 0x83b0
cmpl $0x2, 0x590(%rsp)
jl 0xa714
movq 0x588(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x6ea80(%rip), %rsi     # 0x7916d
callq 0x85a0
cmpl $0x0, %eax
je 0xa714
movq 0x588(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x6ea66(%rip), %rsi     # 0x79170
callq 0x85a0
cmpl $0x0, %eax
jne 0xa741
movq 0x8c8d5(%rip), %rdi     # 0x96ff0
leaq 0x8ab0e(%rip), %rsi     # 0x95230
movl $0x50, %edx
movl $0x32, %ecx
movl $0x4b, %r8d
callq 0xcd10
movl $0x1, %edi
callq 0x84a0
movq 0x588(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x6ea23(%rip), %rsi     # 0x79177
callq 0x85a0
cmpl $0x0, %eax
jne 0xa86a
leaq 0x468(%rsp), %rdi
movq %rdi, 0x218(%rsp)
callq 0xcd60
movq 0x218(%rsp), %rdi
callq 0xceb0
jmp 0xa786
movl 0x590(%rsp), %edi
decl %edi
movq 0x588(%rsp), %rsi
addq $0x8, %rsi
leaq 0x468(%rsp), %rdx
callq 0x65380
jmp 0xa7aa
movq 0x8c83f(%rip), %rdi     # 0x96ff0
leaq 0x6e9c8(%rip), %rsi     # 0x79180
callq 0x8360
movq %rax, 0x210(%rsp)
jmp 0xa7c7
movq 0x210(%rsp), %rdi
movq 0x8c7da(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xa7dd
cmpl $0x0, 0x468(%rsp)
jne 0xa81e
leaq 0x468(%rsp), %rdi
callq 0x682c0
jmp 0xa7f6
jmp 0xa858
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x460(%rsp)
movl %eax, 0x45c(%rsp)
leaq 0x468(%rsp), %rdi
callq 0xcf70
jmp 0xb895
cmpl $0x1, 0x468(%rsp)
jne 0xa839
leaq 0x468(%rsp), %rdi
callq 0x6ebd0
jmp 0xa837
jmp 0xa856
cmpl $0x3, 0x468(%rsp)
jne 0xa854
leaq 0x468(%rsp), %rdi
callq 0x6b660
jmp 0xa852
jmp 0xa854
jmp 0xa856
jmp 0xa858
leaq 0x468(%rsp), %rdi
callq 0xcf70
jmp 0xb88b
leaq 0x2a0(%rsp), %rdi
movq %rdi, 0x208(%rsp)
callq 0xd010
movq 0x208(%rsp), %rdi
callq 0x12670
jmp 0xa88e
movl 0x590(%rsp), %edi
movq 0x588(%rsp), %rsi
leaq 0x2a0(%rsp), %rdx
callq 0x13630
jmp 0xa8ac
movq 0x8c73d(%rip), %rdi     # 0x96ff0
leaq 0x6e8c6(%rip), %rsi     # 0x79180
callq 0x8360
movq %rax, 0x200(%rsp)
jmp 0xa8c9
movq 0x200(%rsp), %rdi
movq 0x8c6d8(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xa8df
movl $0x118, %edi            # imm = 0x118
callq 0x8380
movq %rax, 0x1f8(%rsp)
jmp 0xa8f3
movq 0x1f8(%rsp), %rdi
callq 0xd120
jmp 0xa902
movq 0x1f8(%rsp), %rax
movq %rax, 0x8cbc7(%rip)     # 0x974d8
cmpl $0x0, 0x2a0(%rsp)
jne 0xad07
movq 0x8c6ca(%rip), %rdi     # 0x96ff0
leaq 0x6e869(%rip), %rsi     # 0x79196
callq 0x8360
movq %rax, 0x1f0(%rsp)
jmp 0xa93c
movq 0x1f0(%rsp), %rdi
movq 0x8c665(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xa952
movq 0x8cb7f(%rip), %rdi     # 0x974d8
leaq 0x310(%rsp), %rsi
callq 0x168e0
jmp 0xa968
movq 0x8c681(%rip), %rdi     # 0x96ff0
leaq 0x6e83b(%rip), %rsi     # 0x791b1
callq 0x8360
movq %rax, 0x1e8(%rsp)
jmp 0xa985
movq 0x1e8(%rsp), %rdi
movq 0x8c61c(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xa99b
movq 0x8c64e(%rip), %rdi     # 0x96ff0
leaq 0x6e824(%rip), %rsi     # 0x791cd
callq 0x8360
movq %rax, 0x1e0(%rsp)
jmp 0xa9b8
leaq 0x310(%rsp), %rdi
callq 0x81d0
movq 0x1e0(%rsp), %rdi
movq %rax, %rsi
callq 0x8360
movq %rax, 0x1d8(%rsp)
jmp 0xa9df
movq 0x1d8(%rsp), %rdi
movq 0x8c5c2(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xa9f5
movq 0x8c5f4(%rip), %rdi     # 0x96ff0
leaq 0x6e7db(%rip), %rsi     # 0x791de
callq 0x8360
movq %rax, 0x1d0(%rsp)
jmp 0xaa12
movq 0x1d0(%rsp), %rdi
movl 0x2a4(%rsp), %esi
callq 0x8710
movq %rax, 0x1c8(%rsp)
jmp 0xaa30
movq 0x1c8(%rsp), %rdi
leaq 0x731ee(%rip), %rsi     # 0x7dc2d
callq 0x8360
movq %rax, 0x1c0(%rsp)
jmp 0xaa4e
movq 0x1c0(%rsp), %rdi
movq 0x8c553(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xaa64
callq 0x8230
movq %rax, 0x298(%rsp)
movq 0x8ca60(%rip), %rdi     # 0x974d8
movslq 0x2a4(%rsp), %rsi
movzbl 0x353(%rsp), %r8d
movzbl 0x351(%rsp), %ecx
movzbl 0x352(%rsp), %edx
andl $0x1, %edx
andl $0x1, %ecx
andl $0x1, %r8d
callq 0x16620
jmp 0xaaaa
movq 0x8ca27(%rip), %rdi     # 0x974d8
callq 0x19ea0
jmp 0xaab8
movq 0x8c531(%rip), %rdi     # 0x96ff0
leaq 0x6e731(%rip), %rsi     # 0x791f7
callq 0x8360
movq %rax, 0x1b8(%rsp)
jmp 0xaad5
movq 0x1b8(%rsp), %rdi
movq 0x8c4cc(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xaaeb
testb $0x1, 0x350(%rsp)
je 0xabd9
movq 0x8c4f0(%rip), %rdi     # 0x96ff0
leaq 0x6e705(%rip), %rsi     # 0x7920c
callq 0x8360
movq %rax, 0x1b0(%rsp)
jmp 0xab16
movq 0x1b0(%rsp), %rdi
leaq 0x73108(%rip), %rsi     # 0x7dc2d
callq 0x8360
movq %rax, 0x1a8(%rsp)
jmp 0xab34
movq 0x1a8(%rsp), %rdi
movq 0x8c46d(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xab4a
movq 0x8c987(%rip), %rdi     # 0x974d8
leaq 0x330(%rsp), %rsi
callq 0x185f0
jmp 0xab60
movq 0x8c489(%rip), %rdi     # 0x96ff0
leaq 0x6e6b3(%rip), %rsi     # 0x79221
callq 0x8360
movq %rax, 0x1a0(%rsp)
jmp 0xab7d
movq 0x1a0(%rsp), %rdi
movq 0x8c424(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xab93
jmp 0xabd9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x460(%rsp)
movl %eax, 0x45c(%rsp)
jmp 0xb87c
movq 0x1f8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x460(%rsp)
movl %eax, 0x45c(%rsp)
movl $0x118, %esi            # imm = 0x118
callq 0x8390
jmp 0xb87c
callq 0x8230
movq %rax, 0x290(%rsp)
movq 0x290(%rsp), %rax
movq 0x298(%rsp), %rcx
subq %rcx, %rax
cvtsi2sd %rax, %xmm0
movsd 0x6e402(%rip), %xmm1    # 0x79008
divsd %xmm1, %xmm0
movsd %xmm0, 0x288(%rsp)
movq 0x8c3d6(%rip), %rdi     # 0x96ff0
leaq 0x6e61b(%rip), %rsi     # 0x7923c
callq 0x8360
movq %rax, 0x198(%rsp)
jmp 0xac30
movq 0x198(%rsp), %rdi
movsd 0x288(%rsp), %xmm0
callq 0x87e0
movq %rax, 0x190(%rsp)
jmp 0xac50
movq 0x190(%rsp), %rdi
movq 0x8c351(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xac66
movq 0x8c383(%rip), %rdi     # 0x96ff0
leaq 0x6e5ec(%rip), %rsi     # 0x79260
callq 0x8360
movq %rax, 0x188(%rsp)
jmp 0xac83
movq 0x8c84e(%rip), %rdi     # 0x974d8
callq 0x16430
movq %rax, 0x180(%rsp)
jmp 0xac99
movq 0x180(%rsp), %rsi
movq 0x188(%rsp), %rdi
callq 0x8790
movq %rax, 0x178(%rsp)
jmp 0xacb8
movq 0x178(%rsp), %rdi
movq 0x8c2e9(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xacce
movq 0x8c803(%rip), %rax     # 0x974d8
movq %rax, 0x170(%rsp)
cmpq $0x0, %rax
je 0xad02
movq 0x170(%rsp), %rdi
callq 0xd1c0
movq 0x170(%rsp), %rdi
movl $0x118, %esi            # imm = 0x118
callq 0x8390
jmp 0xb86d
cmpl $0x2, 0x2a0(%rsp)
jne 0xb86b
leaq 0x2a0(%rsp), %rdi
addq $0xb8, %rdi
callq 0x86e0
testb $0x1, %al
jne 0xad5b
movq 0x8c7a4(%rip), %rdi     # 0x974d8
leaq 0x358(%rsp), %rsi
callq 0x19240
movb %al, 0x16f(%rsp)
jmp 0xad4a
movb 0x16f(%rsp), %al
testb $0x1, %al
jne 0xafa0
jmp 0xad5b
movq 0x8c776(%rip), %rdi     # 0x974d8
leaq 0x310(%rsp), %rsi
callq 0x168e0
jmp 0xad71
movq 0x8c760(%rip), %rdi     # 0x974d8
movslq 0x2a4(%rsp), %rsi
movzbl 0x353(%rsp), %r8d
movzbl 0x351(%rsp), %ecx
movzbl 0x352(%rsp), %edx
andl $0x1, %edx
andl $0x1, %ecx
andl $0x1, %r8d
callq 0x16620
jmp 0xadaa
movq 0x8c23f(%rip), %rdi     # 0x96ff0
leaq 0x6e426(%rip), %rsi     # 0x791de
callq 0x8360
movq %rax, 0x160(%rsp)
jmp 0xadc7
movq 0x160(%rsp), %rdi
movl 0x2a4(%rsp), %esi
callq 0x8710
movq %rax, 0x158(%rsp)
jmp 0xade5
movq 0x158(%rsp), %rdi
leaq 0x72e39(%rip), %rsi     # 0x7dc2d
callq 0x8360
movq %rax, 0x150(%rsp)
jmp 0xae03
movq 0x150(%rsp), %rdi
movq 0x8c19e(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xae19
callq 0x8230
movq %rax, 0x280(%rsp)
movq 0x8c6ab(%rip), %rdi     # 0x974d8
callq 0x19ea0
jmp 0xae34
movq 0x8c1b5(%rip), %rdi     # 0x96ff0
leaq 0x6e3b5(%rip), %rsi     # 0x791f7
callq 0x8360
movq %rax, 0x148(%rsp)
jmp 0xae51
movq 0x148(%rsp), %rdi
movq 0x8c150(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xae67
testb $0x1, 0x350(%rsp)
je 0xaf11
movq 0x8c174(%rip), %rdi     # 0x96ff0
leaq 0x6e389(%rip), %rsi     # 0x7920c
callq 0x8360
movq %rax, 0x140(%rsp)
jmp 0xae92
movq 0x140(%rsp), %rdi
leaq 0x72d8c(%rip), %rsi     # 0x7dc2d
callq 0x8360
movq %rax, 0x138(%rsp)
jmp 0xaeb0
movq 0x138(%rsp), %rdi
movq 0x8c0f1(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xaec6
movq 0x8c60b(%rip), %rdi     # 0x974d8
leaq 0x330(%rsp), %rsi
callq 0x185f0
jmp 0xaedc
movq 0x8c10d(%rip), %rdi     # 0x96ff0
leaq 0x6e337(%rip), %rsi     # 0x79221
callq 0x8360
movq %rax, 0x130(%rsp)
jmp 0xaef9
movq 0x130(%rsp), %rdi
movq 0x8c0a8(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xaf0f
jmp 0xaf11
callq 0x8230
movq %rax, 0x278(%rsp)
movq 0x278(%rsp), %rax
movq 0x280(%rsp), %rcx
subq %rcx, %rax
cvtsi2sd %rax, %xmm0
movsd 0x6e0ca(%rip), %xmm1    # 0x79008
divsd %xmm1, %xmm0
movsd %xmm0, 0x270(%rsp)
movq 0x8c09e(%rip), %rdi     # 0x96ff0
leaq 0x6e2e3(%rip), %rsi     # 0x7923c
callq 0x8360
movq %rax, 0x128(%rsp)
jmp 0xaf68
movq 0x128(%rsp), %rdi
movsd 0x270(%rsp), %xmm0
callq 0x87e0
movq %rax, 0x120(%rsp)
jmp 0xaf88
movq 0x120(%rsp), %rdi
movq 0x8c019(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xaf9e
jmp 0xaff7
movq 0x8c531(%rip), %rax     # 0x974d8
movq 0xe8(%rax), %rax
movl %eax, 0x2a4(%rsp)
movq 0x8c51c(%rip), %rax     # 0x974d8
movb 0xf0(%rax), %al
andb $0x1, %al
movb %al, 0x351(%rsp)
movq 0x8c506(%rip), %rax     # 0x974d8
movb 0xf1(%rax), %al
andb $0x1, %al
movb %al, 0x352(%rsp)
movq 0x8c4f0(%rip), %rax     # 0x974d8
movb 0xf8(%rax), %al
andb $0x1, %al
movb %al, 0x353(%rsp)
cmpl $0x1, 0x418(%rsp)
jl 0xb198
movq 0x8bfe4(%rip), %rdi     # 0x96ff0
leaq 0x6e263(%rip), %rsi     # 0x79276
callq 0x8360
movq %rax, 0x118(%rsp)
jmp 0xb022
movq 0x118(%rsp), %rdi
movl 0x2a4(%rsp), %esi
callq 0x8710
movq %rax, 0x110(%rsp)
jmp 0xb040
movq 0x110(%rsp), %rdi
movq 0x8bf61(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xb056
movq 0x8bf93(%rip), %rdi     # 0x96ff0
leaq 0x6e228(%rip), %rsi     # 0x7928c
callq 0x8360
movq %rax, 0x108(%rsp)
jmp 0xb073
movq 0x108(%rsp), %rdi
movq 0x8c456(%rip), %rax     # 0x974d8
movb 0xf1(%rax), %cl
leaq 0x6e217(%rip), %rax     # 0x792a6
leaq 0x6e214(%rip), %rsi     # 0x792aa
testb $0x1, %cl
cmovneq %rax, %rsi
callq 0x8360
movq %rax, 0x100(%rsp)
jmp 0xb0ac
movq 0x100(%rsp), %rdi
movq 0x8bef5(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xb0c2
movq 0x8bf27(%rip), %rdi     # 0x96ff0
leaq 0x6e1dd(%rip), %rsi     # 0x792ad
callq 0x8360
movq %rax, 0xf8(%rsp)
jmp 0xb0df
movq 0xf8(%rsp), %rdi
movq 0x8c3ea(%rip), %rax     # 0x974d8
movb 0xf0(%rax), %cl
leaq 0x6e1ab(%rip), %rax     # 0x792a6
leaq 0x6e1a8(%rip), %rsi     # 0x792aa
testb $0x1, %cl
cmovneq %rax, %rsi
callq 0x8360
movq %rax, 0xf0(%rsp)
jmp 0xb118
movq 0xf0(%rsp), %rdi
movq 0x8be89(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xb12e
movq 0x8bebb(%rip), %rdi     # 0x96ff0
leaq 0x6e124(%rip), %rsi     # 0x79260
callq 0x8360
movq %rax, 0xe8(%rsp)
jmp 0xb14b
movq 0x8c386(%rip), %rdi     # 0x974d8
callq 0x16430
movq %rax, 0xe0(%rsp)
jmp 0xb161
movq 0xe0(%rsp), %rsi
movq 0xe8(%rsp), %rdi
callq 0x8790
movq %rax, 0xd8(%rsp)
jmp 0xb180
movq 0xd8(%rsp), %rdi
movq 0x8be21(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xb196
jmp 0xb198
leaq 0x378(%rsp), %rdi
callq 0x8170
movq %rax, %rdi
leaq 0x751c2(%rip), %rsi     # 0x80371
callq 0x8460
movq %rax, 0xd0(%rsp)
jmp 0xb1be
movq 0xd0(%rsp), %rax
movq %rax, 0x8c313(%rip)     # 0x974e0
movl 0x590(%rsp), %eax
movl %eax, 0xc4(%rsp)
movq 0x588(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0x8c2e6(%rip), %rdi     # 0x974d8
addq $0x50, %rdi
callq 0x8630
movl 0xc4(%rsp), %esi
movq 0xc8(%rsp), %rdx
movq %rax, %rcx
movq 0x8c2c4(%rip), %r8      # 0x974d8
leaq 0x250(%rsp), %rdi
callq 0xa240
jmp 0xb223
movq 0x8c2b6(%rip), %rax     # 0x974e0
movq %rax, 0xb8(%rsp)
leaq 0x250(%rsp), %rdi
callq 0x8170
movq 0xb8(%rsp), %rdi
movq %rax, %rdx
leaq 0x6de18(%rip), %rsi     # 0x79069
movb $0x0, %al
callq 0x85c0
cmpl $0x1, 0x418(%rsp)
jl 0xb2b0
movq 0x8bd87(%rip), %rdi     # 0x96ff0
leaq 0x6e056(%rip), %rsi     # 0x792c6
callq 0x8360
movq %rax, 0xb0(%rsp)
jmp 0xb27f
movq 0xb0(%rsp), %rdi
movq 0x8bd22(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xb295
jmp 0xb2b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x460(%rsp)
movl %eax, 0x45c(%rsp)
jmp 0xb85c
leaq 0x2a0(%rsp), %rdi
addq $0x10, %rdi
callq 0x86e0
testb $0x1, %al
jne 0xb4e4
cmpl $0x2, 0x418(%rsp)
jl 0xb308
movq 0x8bd16(%rip), %rdi     # 0x96ff0
leaq 0x6dffe(%rip), %rsi     # 0x792df
callq 0x8360
movq %rax, 0xa8(%rsp)
jmp 0xb2f0
movq 0xa8(%rsp), %rdi
movq 0x8bcb1(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xb306
jmp 0xb308
movq 0x8bce1(%rip), %rdi     # 0x96ff0
leaq 0x6dfcd(%rip), %rsi     # 0x792e3
callq 0x8360
movq %rax, 0xa0(%rsp)
jmp 0xb325
movq 0xa0(%rsp), %rdi
movl 0x2a8(%rsp), %esi
callq 0x8710
movq %rax, 0x98(%rsp)
jmp 0xb343
movq 0x98(%rsp), %rdi
leaq 0x6dfbc(%rip), %rsi     # 0x7930e
callq 0x8360
movq %rax, 0x90(%rsp)
jmp 0xb361
movq 0x90(%rsp), %rdi
movq 0x8bc40(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xb377
movl $0x60, %edi
callq 0x8380
movq %rax, 0x88(%rsp)
jmp 0xb38b
movq 0x88(%rsp), %rdi
leaq 0x2b0(%rsp), %rsi
movzbl 0x398(%rsp), %edx
andl $0x1, %edx
callq 0x30440
jmp 0xb3ad
movq 0x88(%rsp), %rax
movq %rax, 0x8c114(%rip)     # 0x974d0
callq 0x8230
movq %rax, 0x248(%rsp)
leaq 0x2a0(%rsp), %rdi
callq 0x8e40
jmp 0xb3d8
callq 0x8230
movq %rax, 0x240(%rsp)
movq 0x240(%rsp), %rax
movq 0x248(%rsp), %rcx
subq %rcx, %rax
cvtsi2sd %rax, %xmm0
movsd 0x6dc03(%rip), %xmm1    # 0x79008
divsd %xmm1, %xmm0
movsd %xmm0, 0x238(%rsp)
movq 0x8bbd7(%rip), %rdi     # 0x96ff0
movq 0x8bb90(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xb427
movq 0x8bbc2(%rip), %rdi     # 0x96ff0
leaq 0x6dee6(%rip), %rsi     # 0x7931b
callq 0x8360
movq %rax, 0x80(%rsp)
jmp 0xb444
movq 0x80(%rsp), %rdi
movsd 0x238(%rsp), %xmm0
callq 0x87e0
movq %rax, 0x78(%rsp)
jmp 0xb461
movq 0x78(%rsp), %rdi
leaq 0x6dec9(%rip), %rsi     # 0x79336
callq 0x8360
movq %rax, 0x70(%rsp)
jmp 0xb479
movq 0x70(%rsp), %rdi
movq 0x8bb2b(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xb48c
movq 0x8c03d(%rip), %rax     # 0x974d0
movq %rax, 0x68(%rsp)
cmpq $0x0, %rax
je 0xb4b7
movq 0x68(%rsp), %rdi
callq 0x30650
movq 0x68(%rsp), %rdi
movl $0x60, %esi
callq 0x8390
jmp 0xb4e4
movq 0x88(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x460(%rsp)
movl %eax, 0x45c(%rsp)
movl $0x60, %esi
callq 0x8390
jmp 0xb85c
leaq 0x2a0(%rsp), %rdi
addq $0x30, %rdi
callq 0x86e0
testb $0x1, %al
jne 0xb799
leaq 0x2a0(%rsp), %rdi
addq $0x50, %rdi
callq 0x86e0
testb $0x1, %al
jne 0xb799
cmpl $0x2, 0x418(%rsp)
jl 0xb54f
movq 0x8bac9(%rip), %rdi     # 0x96ff0
leaq 0x6de12(%rip), %rsi     # 0x79340
callq 0x8360
movq %rax, 0x60(%rsp)
jmp 0xb53a
movq 0x60(%rsp), %rdi
movq 0x8ba6a(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xb54d
jmp 0xb54f
movq 0x8ba9a(%rip), %rdi     # 0x96ff0
leaq 0x6dde7(%rip), %rsi     # 0x79344
callq 0x8360
movq %rax, 0x58(%rsp)
jmp 0xb569
movq 0x58(%rsp), %rdi
movl 0x2a8(%rsp), %esi
callq 0x8710
movq %rax, 0x50(%rsp)
jmp 0xb581
movq 0x50(%rsp), %rdi
leaq 0x6dd81(%rip), %rsi     # 0x7930e
callq 0x8360
movq %rax, 0x48(%rsp)
jmp 0xb599
movq 0x48(%rsp), %rdi
movq 0x8ba0b(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xb5ac
movl $0x60, %edi
callq 0x8380
movq %rax, 0x40(%rsp)
jmp 0xb5bd
movq 0x40(%rsp), %rdi
leaq 0x2d0(%rsp), %rsi
movzbl 0x398(%rsp), %edx
andl $0x1, %edx
callq 0x30440
jmp 0xb5dc
movq 0x40(%rsp), %rax
movq %rax, 0x8bf00(%rip)     # 0x974e8
movl $0x60, %edi
callq 0x8380
movq %rax, 0x38(%rsp)
jmp 0xb5f9
movq 0x38(%rsp), %rdi
leaq 0x2f0(%rsp), %rsi
movzbl 0x398(%rsp), %edx
andl $0x1, %edx
callq 0x30440
jmp 0xb618
movq 0x38(%rsp), %rax
movq %rax, 0x8becc(%rip)     # 0x974f0
callq 0x8230
movq %rax, 0x230(%rsp)
leaq 0x2a0(%rsp), %rdi
callq 0x96e0
jmp 0xb640
callq 0x8230
movq %rax, 0x228(%rsp)
movq 0x228(%rsp), %rax
movq 0x230(%rsp), %rcx
subq %rcx, %rax
cvtsi2sd %rax, %xmm0
movsd 0x6d99b(%rip), %xmm1    # 0x79008
divsd %xmm1, %xmm0
movsd %xmm0, 0x220(%rsp)
movq 0x8b96f(%rip), %rdi     # 0x96ff0
movq 0x8b928(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xb68f
movq 0x8b95a(%rip), %rdi     # 0x96ff0
leaq 0x6dcd0(%rip), %rsi     # 0x7936d
callq 0x8360
movq %rax, 0x30(%rsp)
jmp 0xb6a9
movq 0x30(%rsp), %rdi
movsd 0x220(%rsp), %xmm0
callq 0x87e0
movq %rax, 0x28(%rsp)
jmp 0xb6c3
movq 0x28(%rsp), %rdi
leaq 0x6d9ae(%rip), %rsi     # 0x7907d
callq 0x8360
movq %rax, 0x20(%rsp)
jmp 0xb6db
movq 0x20(%rsp), %rdi
movq 0x8b8c9(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xb6ee
movq 0x8bdf3(%rip), %rax     # 0x974e8
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0xb719
movq 0x18(%rsp), %rdi
callq 0x30650
movq 0x18(%rsp), %rdi
movl $0x60, %esi
callq 0x8390
movq 0x8bdd0(%rip), %rax     # 0x974f0
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0xb744
movq 0x10(%rsp), %rdi
callq 0x30650
movq 0x10(%rsp), %rdi
movl $0x60, %esi
callq 0x8390
jmp 0xb7e9
movq 0x40(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x460(%rsp)
movl %eax, 0x45c(%rsp)
movl $0x60, %esi
callq 0x8390
jmp 0xb85c
movq 0x38(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x460(%rsp)
movl %eax, 0x45c(%rsp)
movl $0x60, %esi
callq 0x8390
jmp 0xb85c
leaq 0x2a0(%rsp), %rdi
addq $0x30, %rdi
callq 0x86e0
testb $0x1, %al
jne 0xb7b0
jmp 0xb7c5
leaq 0x2a0(%rsp), %rdi
addq $0x50, %rdi
callq 0x86e0
testb $0x1, %al
jne 0xb7e7
movq 0x8b804(%rip), %rax     # 0x96fd0
movq (%rax), %rdi
leaq 0x6dbb0(%rip), %rsi     # 0x79386
movb $0x0, %al
callq 0x85c0
movl $0x1, %edi
callq 0x84a0
jmp 0xb7e9
movq 0x8bcf0(%rip), %rdi     # 0x974e0
callq 0x8370
jmp 0xb7f7
movq 0x8bcda(%rip), %rax     # 0x974d8
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0xb822
movq 0x8(%rsp), %rdi
callq 0xd1c0
movq 0x8(%rsp), %rdi
movl $0x118, %esi            # imm = 0x118
callq 0x8390
movq 0x8b7c7(%rip), %rdi     # 0x96ff0
leaq 0x6db85(%rip), %rsi     # 0x793b5
callq 0x8360
movq %rax, (%rsp)
jmp 0xb83b
movq (%rsp), %rdi
movq 0x8b76a(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0xb84d
leaq 0x250(%rsp), %rdi
callq 0x8858
jmp 0xb86b
leaq 0x250(%rsp), %rdi
callq 0x8858
jmp 0xb87c
jmp 0xb86d
leaq 0x2a0(%rsp), %rdi
callq 0xd250
jmp 0xb88b
leaq 0x2a0(%rsp), %rdi
callq 0xd250
jmp 0xb895
xorl %eax, %eax
addq $0x598, %rsp            # imm = 0x598
retq
movq 0x460(%rsp), %rdi
callq 0x8730
nopw %cs:(%rax,%rax)
nopl (%rax)