// File: aalto-speech[P]ftk/src/cmsfg.cc
// Function: main
int main(int argc, char* argv[]) {

    conf::Config config;
    config("usage: cmsfg [OPTION...] WORDLIST VOCAB MSFG\n")
      ('h', "help", "", "", "display help")
      ('n', "no-lookahead", "", "", "don't use lookahead, uses less memory but much slower")
      ('t', "temp-graphs=INT", "arg", "0", "Write out intermediate graphs for #G mod INT == 0")
      ('8', "utf-8", "", "", "Utf-8 character encoding in use");
    config.default_parse(argc, argv);
    if (config.arguments.size() != 3) config.print_help(stderr, 1);

    string wordlist_fname = config.arguments[0];
    string vocab_fname = config.arguments[1];
    string msfg_fname = config.arguments[2];
    unsigned int temp_graph_interval = config["temp-graphs"].get_int();
    bool lookahead = !config["no-lookahead"].specified;
    bool utf8_encoding = config["utf-8"].specified;

    cerr << std::boolalpha;
    cerr << "parameters, wordlist: " << wordlist_fname << endl;
    cerr << "parameters, initial vocabulary: " << vocab_fname << endl;
    cerr << "parameters, msfg to write: " << msfg_fname << endl;
    cerr << "parameters, lookahead: " << lookahead << endl;
    if (temp_graph_interval > 0)
        cerr << "parameters, write intermediate graphs whenever #V modulo " << temp_graph_interval << " == 0" << endl;
    else
        cerr << "parameters, write intermediate graphs: NO" << endl;
    cerr << "parameters, utf-8 encoding: " << utf8_encoding << endl;

    int maxlen, word_maxlen;
    map<string, flt_type> vocab;
    map<string, flt_type> words;

    cerr << "Reading vocabulary " << vocab_fname << endl;
    int retval = Unigrams::read_vocab(vocab_fname, vocab, maxlen, utf8_encoding);
    if (retval < 0) {
        cerr << "something went wrong reading vocabulary" << endl;
        exit(EXIT_FAILURE);
    }
    cerr << "\t" << "vocabulary size: " << vocab.size() << endl;
    cerr << "\t" << "maximum string length: " << maxlen << endl;

    cerr << "Reading word list " << wordlist_fname << endl;
    retval = Unigrams::read_vocab(wordlist_fname, words, word_maxlen, utf8_encoding);
    if (retval < 0) {
        cerr << "something went wrong reading word list" << endl;
        exit(EXIT_FAILURE);
    }
    cerr << "\t" << "wordlist size: " << words.size() << endl;
    cerr << "\t" << "maximum word length: " << word_maxlen << endl;

    StringSet ss_vocab(vocab);
    MultiStringFactorGraph msfg(start_end_symbol);
    vocab[start_end_symbol] = 0.0;

    unsigned int num_separate_nodes = 0;
    unsigned int num_separate_arcs = 0;
    unsigned int curr_word_idx = 0;
    for (auto it = words.cbegin(); it != words.cend(); ++it) {
        FactorGraph fg(it->first, start_end_symbol, ss_vocab);
        msfg.add(fg, lookahead);
        num_separate_nodes += fg.nodes.size();
        num_separate_arcs += fg.arcs.size();
        curr_word_idx++;
        if (curr_word_idx % 10000 == 0) cerr << "... processing word " << curr_word_idx << endl;
        if (temp_graph_interval > 0 && curr_word_idx % temp_graph_interval == 0) {
            stringstream tempfname;
            tempfname << msfg_fname << "." << curr_word_idx;
            cerr << "... writing intermediate graph to file " << tempfname.str() << endl;
            msfg.write(tempfname.str());
        }
    }

    msfg.write(msfg_fname);

    cerr << "factor graph strings: " << msfg.string_end_nodes.size() << endl;
    cerr << "factor graph nodes: " << msfg.nodes.size() << endl;
    cerr << "nodes for separate fgs: " << num_separate_nodes << endl;
    cerr << "arcs for separate fgs: " << num_separate_arcs << endl;

    exit(EXIT_SUCCESS);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc00, %rsp            # imm = 0xC00
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0xe080
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x990(%rbp)
callq 0x5720
movq -0x990(%rbp), %rdx
leaq 0x62090(%rip), %rsi     # 0x68006
leaq -0xe8(%rbp), %rdi
callq 0x5580
jmp 0x5f84
leaq -0xc8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0xe0f0
movq %rax, -0x998(%rbp)
jmp 0x5fa0
leaq -0x121(%rbp), %rdi
movq %rdi, -0x9a0(%rbp)
callq 0x5720
movq -0x9a0(%rbp), %rdx
leaq 0x6207b(%rip), %rsi     # 0x6803c
leaq -0x120(%rbp), %rdi
callq 0x5580
jmp 0x5fcf
leaq -0x149(%rbp), %rdi
movq %rdi, -0x9a8(%rbp)
callq 0x5720
movq -0x9a8(%rbp), %rdx
leaq 0x62677(%rip), %rsi     # 0x68667
leaq -0x148(%rbp), %rdi
callq 0x5580
jmp 0x5ffe
leaq -0x171(%rbp), %rdi
movq %rdi, -0x9b0(%rbp)
callq 0x5720
movq -0x9b0(%rbp), %rdx
leaq 0x62648(%rip), %rsi     # 0x68667
leaq -0x170(%rbp), %rdi
callq 0x5580
jmp 0x602d
leaq -0x199(%rbp), %rdi
movq %rdi, -0x9b8(%rbp)
callq 0x5720
movq -0x9b8(%rbp), %rdx
leaq 0x61fe6(%rip), %rsi     # 0x68034
leaq -0x198(%rbp), %rdi
callq 0x5580
jmp 0x605c
movq -0x998(%rbp), %rdi
movl $0x68, %esi
leaq -0x120(%rbp), %rdx
leaq -0x148(%rbp), %rcx
leaq -0x170(%rbp), %r8
leaq -0x198(%rbp), %r9
callq 0xe120
movq %rax, -0x9c0(%rbp)
jmp 0x6092
leaq -0x1c1(%rbp), %rdi
movq %rdi, -0x9c8(%rbp)
callq 0x5720
movq -0x9c8(%rbp), %rdx
leaq 0x61f8e(%rip), %rsi     # 0x68041
leaq -0x1c0(%rbp), %rdi
callq 0x5580
jmp 0x60c1
leaq -0x1e9(%rbp), %rdi
movq %rdi, -0x9d0(%rbp)
callq 0x5720
movq -0x9d0(%rbp), %rdx
leaq 0x62585(%rip), %rsi     # 0x68667
leaq -0x1e8(%rbp), %rdi
callq 0x5580
jmp 0x60f0
leaq -0x211(%rbp), %rdi
movq %rdi, -0x9d8(%rbp)
callq 0x5720
movq -0x9d8(%rbp), %rdx
leaq 0x62556(%rip), %rsi     # 0x68667
leaq -0x210(%rbp), %rdi
callq 0x5580
jmp 0x611f
leaq -0x239(%rbp), %rdi
movq %rdi, -0x9e0(%rbp)
callq 0x5720
movq -0x9e0(%rbp), %rdx
leaq 0x61f0e(%rip), %rsi     # 0x6804e
leaq -0x238(%rbp), %rdi
callq 0x5580
jmp 0x614e
movq -0x9c0(%rbp), %rdi
movl $0x6e, %esi
leaq -0x1c0(%rbp), %rdx
leaq -0x1e8(%rbp), %rcx
leaq -0x210(%rbp), %r8
leaq -0x238(%rbp), %r9
callq 0xe120
movq %rax, -0x9e8(%rbp)
jmp 0x6184
leaq -0x261(%rbp), %rdi
movq %rdi, -0x9f0(%rbp)
callq 0x5720
movq -0x9f0(%rbp), %rdx
leaq 0x61edf(%rip), %rsi     # 0x68084
leaq -0x260(%rbp), %rdi
callq 0x5580
jmp 0x61b3
leaq -0x289(%rbp), %rdi
movq %rdi, -0x9f8(%rbp)
callq 0x5720
movq -0x9f8(%rbp), %rdx
leaq 0x61ec0(%rip), %rsi     # 0x68094
leaq -0x288(%rbp), %rdi
callq 0x5580
jmp 0x61e2
leaq -0x2b1(%rbp), %rdi
movq %rdi, -0xa00(%rbp)
callq 0x5720
movq -0xa00(%rbp), %rdx
leaq 0x61ec5(%rip), %rsi     # 0x680c8
leaq -0x2b0(%rbp), %rdi
callq 0x5580
jmp 0x6211
leaq -0x2d9(%rbp), %rdi
movq %rdi, -0xa08(%rbp)
callq 0x5720
movq -0xa08(%rbp), %rdx
leaq 0x61e66(%rip), %rsi     # 0x68098
leaq -0x2d8(%rbp), %rdi
callq 0x5580
jmp 0x6240
movq -0x9e8(%rbp), %rdi
movl $0x74, %esi
leaq -0x260(%rbp), %rdx
leaq -0x288(%rbp), %rcx
leaq -0x2b0(%rbp), %r8
leaq -0x2d8(%rbp), %r9
callq 0xe120
movq %rax, -0xa10(%rbp)
jmp 0x6276
leaq -0x301(%rbp), %rdi
movq %rdi, -0xa18(%rbp)
callq 0x5720
movq -0xa18(%rbp), %rdx
leaq 0x61e33(%rip), %rsi     # 0x680ca
leaq -0x300(%rbp), %rdi
callq 0x5580
jmp 0x62a5
leaq -0x329(%rbp), %rdi
movq %rdi, -0xa20(%rbp)
callq 0x5720
movq -0xa20(%rbp), %rdx
leaq 0x623a1(%rip), %rsi     # 0x68667
leaq -0x328(%rbp), %rdi
callq 0x5580
jmp 0x62d4
leaq -0x351(%rbp), %rdi
movq %rdi, -0xa28(%rbp)
callq 0x5720
movq -0xa28(%rbp), %rdx
leaq 0x62372(%rip), %rsi     # 0x68667
leaq -0x350(%rbp), %rdi
callq 0x5580
jmp 0x6303
leaq -0x379(%rbp), %rdi
movq %rdi, -0xa30(%rbp)
callq 0x5720
movq -0xa30(%rbp), %rdx
leaq 0x61dac(%rip), %rsi     # 0x680d0
leaq -0x378(%rbp), %rdi
callq 0x5580
jmp 0x6332
movq -0xa10(%rbp), %rdi
movl $0x38, %esi
leaq -0x300(%rbp), %rdx
leaq -0x328(%rbp), %rcx
leaq -0x350(%rbp), %r8
leaq -0x378(%rbp), %r9
callq 0xe120
jmp 0x6361
leaq -0x378(%rbp), %rdi
callq 0x5858
leaq -0x379(%rbp), %rdi
callq 0x5450
leaq -0x350(%rbp), %rdi
callq 0x5858
leaq -0x351(%rbp), %rdi
callq 0x5450
leaq -0x328(%rbp), %rdi
callq 0x5858
leaq -0x329(%rbp), %rdi
callq 0x5450
leaq -0x300(%rbp), %rdi
callq 0x5858
leaq -0x301(%rbp), %rdi
callq 0x5450
leaq -0x2d8(%rbp), %rdi
callq 0x5858
leaq -0x2d9(%rbp), %rdi
callq 0x5450
leaq -0x2b0(%rbp), %rdi
callq 0x5858
leaq -0x2b1(%rbp), %rdi
callq 0x5450
leaq -0x288(%rbp), %rdi
callq 0x5858
leaq -0x289(%rbp), %rdi
callq 0x5450
leaq -0x260(%rbp), %rdi
callq 0x5858
leaq -0x261(%rbp), %rdi
callq 0x5450
leaq -0x238(%rbp), %rdi
callq 0x5858
leaq -0x239(%rbp), %rdi
callq 0x5450
leaq -0x210(%rbp), %rdi
callq 0x5858
leaq -0x211(%rbp), %rdi
callq 0x5450
leaq -0x1e8(%rbp), %rdi
callq 0x5858
leaq -0x1e9(%rbp), %rdi
callq 0x5450
leaq -0x1c0(%rbp), %rdi
callq 0x5858
leaq -0x1c1(%rbp), %rdi
callq 0x5450
leaq -0x198(%rbp), %rdi
callq 0x5858
leaq -0x199(%rbp), %rdi
callq 0x5450
leaq -0x170(%rbp), %rdi
callq 0x5858
leaq -0x171(%rbp), %rdi
callq 0x5450
leaq -0x148(%rbp), %rdi
callq 0x5858
leaq -0x149(%rbp), %rdi
callq 0x5450
leaq -0x120(%rbp), %rdi
callq 0x5858
leaq -0x121(%rbp), %rdi
callq 0x5450
leaq -0xe8(%rbp), %rdi
callq 0x5858
leaq -0xe9(%rbp), %rdi
callq 0x5450
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq -0xc8(%rbp), %rdi
callq 0xef70
jmp 0x650e
leaq -0xc8(%rbp), %rdi
addq $0x98, %rdi
callq 0x77b0
cmpq $0x3, %rax
je 0x68ed
movq 0x90a8e(%rip), %rax     # 0x96fc0
movq (%rax), %rsi
leaq -0xc8(%rbp), %rdi
movl $0x1, %edx
callq 0xf730
jmp 0x6548
jmp 0x68ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x68c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x68b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x68ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6895
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x687d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6865
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6859
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x684d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6835
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x681d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6805
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x67f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x67ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x67d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x67bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x67a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6799
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x678d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6775
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x675d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6745
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x378(%rbp), %rdi
callq 0x5858
leaq -0x379(%rbp), %rdi
callq 0x5450
leaq -0x350(%rbp), %rdi
callq 0x5858
leaq -0x351(%rbp), %rdi
callq 0x5450
leaq -0x328(%rbp), %rdi
callq 0x5858
leaq -0x329(%rbp), %rdi
callq 0x5450
leaq -0x300(%rbp), %rdi
callq 0x5858
leaq -0x301(%rbp), %rdi
callq 0x5450
leaq -0x2d8(%rbp), %rdi
callq 0x5858
leaq -0x2d9(%rbp), %rdi
callq 0x5450
leaq -0x2b0(%rbp), %rdi
callq 0x5858
leaq -0x2b1(%rbp), %rdi
callq 0x5450
leaq -0x288(%rbp), %rdi
callq 0x5858
leaq -0x289(%rbp), %rdi
callq 0x5450
leaq -0x260(%rbp), %rdi
callq 0x5858
leaq -0x261(%rbp), %rdi
callq 0x5450
leaq -0x238(%rbp), %rdi
callq 0x5858
leaq -0x239(%rbp), %rdi
callq 0x5450
leaq -0x210(%rbp), %rdi
callq 0x5858
leaq -0x211(%rbp), %rdi
callq 0x5450
leaq -0x1e8(%rbp), %rdi
callq 0x5858
leaq -0x1e9(%rbp), %rdi
callq 0x5450
leaq -0x1c0(%rbp), %rdi
callq 0x5858
leaq -0x1c1(%rbp), %rdi
callq 0x5450
leaq -0x198(%rbp), %rdi
callq 0x5858
leaq -0x199(%rbp), %rdi
callq 0x5450
leaq -0x170(%rbp), %rdi
callq 0x5858
leaq -0x171(%rbp), %rdi
callq 0x5450
leaq -0x148(%rbp), %rdi
callq 0x5858
leaq -0x149(%rbp), %rdi
callq 0x5450
leaq -0x120(%rbp), %rdi
callq 0x5858
leaq -0x121(%rbp), %rdi
callq 0x5450
leaq -0xe8(%rbp), %rdi
callq 0x5858
leaq -0xe9(%rbp), %rdi
callq 0x5450
jmp 0x7791
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7791
leaq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x77d0
movq %rax, %rsi
leaq -0x3a0(%rbp), %rdi
callq 0x51b0
jmp 0x690b
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0x77d0
movq %rax, %rsi
leaq -0x3c0(%rbp), %rdi
callq 0x51b0
jmp 0x692a
leaq -0x30(%rbp), %rdi
movl $0x2, %esi
callq 0x77d0
movq %rax, %rsi
leaq -0x3e0(%rbp), %rdi
callq 0x51b0
jmp 0x6949
leaq -0x409(%rbp), %rdi
movq %rdi, -0xa38(%rbp)
callq 0x5720
movq -0xa38(%rbp), %rdx
leaq 0x61786(%rip), %rsi     # 0x680f0
leaq -0x408(%rbp), %rdi
callq 0x5580
jmp 0x6978
leaq -0xc8(%rbp), %rdi
leaq -0x408(%rbp), %rsi
callq 0xf0b0
movq %rax, -0xa40(%rbp)
jmp 0x6994
movq -0xa40(%rbp), %rdi
callq 0xde00
movl %eax, -0xa44(%rbp)
jmp 0x69a8
leaq -0x408(%rbp), %rdi
callq 0x5858
leaq -0x409(%rbp), %rdi
callq 0x5450
movl -0xa44(%rbp), %eax
movl %eax, -0x3e4(%rbp)
leaq -0x431(%rbp), %rdi
movq %rdi, -0xa50(%rbp)
callq 0x5720
movq -0xa50(%rbp), %rdx
leaq 0x61654(%rip), %rsi     # 0x68041
leaq -0x430(%rbp), %rdi
callq 0x5580
jmp 0x69fb
leaq -0xc8(%rbp), %rdi
leaq -0x430(%rbp), %rsi
callq 0xf0b0
movq %rax, -0xa58(%rbp)
jmp 0x6a17
movq -0xa58(%rbp), %rax
movb 0x4a(%rax), %al
notb %al
movb %al, -0xa61(%rbp)
leaq -0x430(%rbp), %rdi
callq 0x5858
leaq -0x431(%rbp), %rdi
callq 0x5450
movb -0xa61(%rbp), %al
andb $0x1, %al
movb %al, -0x40a(%rbp)
leaq -0x459(%rbp), %rdi
movq %rdi, -0xa60(%rbp)
callq 0x5720
movq -0xa60(%rbp), %rdx
leaq 0x6165a(%rip), %rsi     # 0x680ca
leaq -0x458(%rbp), %rdi
callq 0x5580
jmp 0x6a7e
leaq -0xc8(%rbp), %rdi
leaq -0x458(%rbp), %rsi
callq 0xf0b0
movq %rax, -0xa70(%rbp)
jmp 0x6a9a
movq -0xa70(%rbp), %rax
movb 0x4a(%rax), %al
movb %al, -0xa71(%rbp)
leaq -0x458(%rbp), %rdi
callq 0x5858
leaq -0x459(%rbp), %rdi
callq 0x5450
movb -0xa71(%rbp), %al
andb $0x1, %al
movb %al, -0x432(%rbp)
movq 0x90511(%rip), %rdi     # 0x96fe8
leaq 0xd12(%rip), %rsi       # 0x77f0
callq 0x5140
jmp 0x6ae5
movq 0x904fc(%rip), %rdi     # 0x96fe8
leaq 0x61609(%rip), %rsi     # 0x680fc
callq 0x53f0
movq %rax, -0xa80(%rbp)
jmp 0x6b01
movq -0xa80(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x53a0
movq %rax, -0xa88(%rbp)
jmp 0x6b1d
movq -0xa88(%rbp), %rdi
movq 0x9046d(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x6b32
movq 0x904af(%rip), %rdi     # 0x96fe8
leaq 0x615d3(%rip), %rsi     # 0x68113
callq 0x53f0
movq %rax, -0xa90(%rbp)
jmp 0x6b4e
movq -0xa90(%rbp), %rdi
leaq -0x3c0(%rbp), %rsi
callq 0x53a0
movq %rax, -0xa98(%rbp)
jmp 0x6b6a
movq -0xa98(%rbp), %rdi
movq 0x90420(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x6b7f
movq 0x90462(%rip), %rdi     # 0x96fe8
leaq 0x615a7(%rip), %rsi     # 0x68134
callq 0x53f0
movq %rax, -0xaa0(%rbp)
jmp 0x6b9b
movq -0xaa0(%rbp), %rdi
leaq -0x3e0(%rbp), %rsi
callq 0x53a0
movq %rax, -0xaa8(%rbp)
jmp 0x6bb7
movq -0xaa8(%rbp), %rdi
movq 0x903d3(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x6bcc
movq 0x90415(%rip), %rdi     # 0x96fe8
leaq 0x61576(%rip), %rsi     # 0x68150
callq 0x53f0
movq %rax, -0xab0(%rbp)
jmp 0x6be8
movq -0xab0(%rbp), %rdi
movzbl -0x40a(%rbp), %esi
andl $0x1, %esi
callq 0x5730
movq %rax, -0xab8(%rbp)
jmp 0x6c07
movq -0xab8(%rbp), %rdi
movq 0x90383(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x6c1c
cmpl $0x0, -0x3e4(%rbp)
jbe 0x6da4
movq 0x903b8(%rip), %rdi     # 0x96fe8
leaq 0x61531(%rip), %rsi     # 0x68168
callq 0x53f0
movq %rax, -0xac0(%rbp)
jmp 0x6c45
movq -0xac0(%rbp), %rdi
movl -0x3e4(%rbp), %esi
callq 0x5570
movq %rax, -0xac8(%rbp)
jmp 0x6c60
movq -0xac8(%rbp), %rdi
leaq 0x61456(%rip), %rsi     # 0x680c4
callq 0x53f0
movq %rax, -0xad0(%rbp)
jmp 0x6c7c
movq -0xad0(%rbp), %rdi
movq 0x9030e(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x6c91
jmp 0x6dd7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7785
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7779
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6cf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x408(%rbp), %rdi
callq 0x5858
leaq -0x409(%rbp), %rdi
callq 0x5450
jmp 0x776d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6d39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x430(%rbp), %rdi
callq 0x5858
leaq -0x431(%rbp), %rdi
callq 0x5450
jmp 0x776d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6d7c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x458(%rbp), %rdi
callq 0x5858
leaq -0x459(%rbp), %rdi
callq 0x5450
jmp 0x776d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x776d
movq 0x9023d(%rip), %rdi     # 0x96fe8
leaq 0x613f0(%rip), %rsi     # 0x681a2
callq 0x53f0
movq %rax, -0xad8(%rbp)
jmp 0x6dc0
movq -0xad8(%rbp), %rdi
movq 0x901ca(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x6dd5
jmp 0x6dd7
movq 0x9020a(%rip), %rdi     # 0x96fe8
leaq 0x613e7(%rip), %rsi     # 0x681cc
callq 0x53f0
movq %rax, -0xae0(%rbp)
jmp 0x6df3
movq -0xae0(%rbp), %rdi
movzbl -0x432(%rbp), %esi
andl $0x1, %esi
callq 0x5730
movq %rax, -0xae8(%rbp)
jmp 0x6e12
movq -0xae8(%rbp), %rdi
movq 0x90178(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x6e27
leaq -0x498(%rbp), %rdi
callq 0x7820
leaq -0x4c8(%rbp), %rdi
callq 0x7820
movq 0x901a2(%rip), %rdi     # 0x96fe8
leaq 0x6139c(%rip), %rsi     # 0x681e9
callq 0x53f0
movq %rax, -0xaf0(%rbp)
jmp 0x6e5b
movq -0xaf0(%rbp), %rdi
leaq -0x3c0(%rbp), %rsi
callq 0x53a0
movq %rax, -0xaf8(%rbp)
jmp 0x6e77
movq -0xaf8(%rbp), %rdi
movq 0x90113(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x6e8c
leaq -0x4f0(%rbp), %rdi
leaq -0x3c0(%rbp), %rsi
callq 0x51b0
jmp 0x6ea1
movzbl -0x432(%rbp), %ecx
andl $0x1, %ecx
leaq -0x4f0(%rbp), %rdi
leaq -0x498(%rbp), %rsi
leaq -0x460(%rbp), %rdx
callq 0x56660
movl %eax, -0xafc(%rbp)
jmp 0x6ecd
leaq -0x4f0(%rbp), %rdi
callq 0x5858
movl -0xafc(%rbp), %eax
movl %eax, -0x4cc(%rbp)
cmpl $0x0, -0x4cc(%rbp)
jge 0x6f63
movq 0x900f3(%rip), %rdi     # 0x96fe8
leaq 0x61301(%rip), %rsi     # 0x681fd
callq 0x53f0
movq %rax, -0xb08(%rbp)
jmp 0x6f0a
movq -0xb08(%rbp), %rdi
movq 0x90080(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x6f1f
movl $0x1, %edi
callq 0x54a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7755
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x4f0(%rbp), %rdi
callq 0x5858
jmp 0x7755
movq 0x9007e(%rip), %rdi     # 0x96fe8
leaq 0x616f5(%rip), %rsi     # 0x68666
callq 0x53f0
movq %rax, -0xb10(%rbp)
jmp 0x6f7f
movq -0xb10(%rbp), %rdi
leaq 0x61298(%rip), %rsi     # 0x68225
callq 0x53f0
movq %rax, -0xb18(%rbp)
jmp 0x6f9b
leaq -0x498(%rbp), %rdi
callq 0x7840
movq -0xb18(%rbp), %rdi
movq %rax, %rsi
callq 0x50f0
movq %rax, -0xb20(%rbp)
jmp 0x6fbf
movq -0xb20(%rbp), %rdi
movq 0x8ffcb(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x6fd4
movq 0x9000d(%rip), %rdi     # 0x96fe8
leaq 0x61684(%rip), %rsi     # 0x68666
callq 0x53f0
movq %rax, -0xb28(%rbp)
jmp 0x6ff0
movq -0xb28(%rbp), %rdi
leaq 0x61239(%rip), %rsi     # 0x68237
callq 0x53f0
movq %rax, -0xb30(%rbp)
jmp 0x700c
movq -0xb30(%rbp), %rdi
movl -0x460(%rbp), %esi
callq 0x5700
movq %rax, -0xb38(%rbp)
jmp 0x7027
movq -0xb38(%rbp), %rdi
movq 0x8ff63(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x703c
movq 0x8ffa5(%rip), %rdi     # 0x96fe8
leaq 0x61205(%rip), %rsi     # 0x6824f
callq 0x53f0
movq %rax, -0xb40(%rbp)
jmp 0x7058
movq -0xb40(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x53a0
movq %rax, -0xb48(%rbp)
jmp 0x7074
movq -0xb48(%rbp), %rdi
movq 0x8ff16(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x7089
leaq -0x510(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x51b0
jmp 0x709e
movzbl -0x432(%rbp), %ecx
andl $0x1, %ecx
leaq -0x510(%rbp), %rdi
leaq -0x4c8(%rbp), %rsi
leaq -0x464(%rbp), %rdx
callq 0x56660
movl %eax, -0xb4c(%rbp)
jmp 0x70ca
movl -0xb4c(%rbp), %eax
movl %eax, -0x4cc(%rbp)
leaq -0x510(%rbp), %rdi
callq 0x5858
cmpl $0x0, -0x4cc(%rbp)
jge 0x7149
movq 0x8fef6(%rip), %rdi     # 0x96fe8
leaq 0x61169(%rip), %rsi     # 0x68262
callq 0x53f0
movq %rax, -0xb58(%rbp)
jmp 0x7107
movq -0xb58(%rbp), %rdi
movq 0x8fe83(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x711c
movl $0x1, %edi
callq 0x54a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x510(%rbp), %rdi
callq 0x5858
jmp 0x7755
movq 0x8fe98(%rip), %rdi     # 0x96fe8
leaq 0x6150f(%rip), %rsi     # 0x68666
callq 0x53f0
movq %rax, -0xb60(%rbp)
jmp 0x7165
movq -0xb60(%rbp), %rdi
leaq 0x61116(%rip), %rsi     # 0x68289
callq 0x53f0
movq %rax, -0xb68(%rbp)
jmp 0x7181
leaq -0x4c8(%rbp), %rdi
callq 0x7840
movq -0xb68(%rbp), %rdi
movq %rax, %rsi
callq 0x50f0
movq %rax, -0xb70(%rbp)
jmp 0x71a5
movq -0xb70(%rbp), %rdi
movq 0x8fde5(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x71ba
movq 0x8fe27(%rip), %rdi     # 0x96fe8
leaq 0x6149e(%rip), %rsi     # 0x68666
callq 0x53f0
movq %rax, -0xb78(%rbp)
jmp 0x71d6
movq -0xb78(%rbp), %rdi
leaq 0x610b5(%rip), %rsi     # 0x68299
callq 0x53f0
movq %rax, -0xb80(%rbp)
jmp 0x71f2
movq -0xb80(%rbp), %rdi
movl -0x464(%rbp), %esi
callq 0x5700
movq %rax, -0xb88(%rbp)
jmp 0x720d
movq -0xb88(%rbp), %rdi
movq 0x8fd7d(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x7222
leaq -0x630(%rbp), %rdi
leaq -0x498(%rbp), %rsi
callq 0x1f2e0
jmp 0x7237
leaq 0x90212(%rip), %rsi     # 0x97450
leaq -0x728(%rbp), %rdi
callq 0x7860
jmp 0x724c
leaq 0x901fd(%rip), %rsi     # 0x97450
leaq -0x498(%rbp), %rdi
callq 0x7a10
movq %rax, -0xb90(%rbp)
jmp 0x7268
movq -0xb90(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movl $0x0, -0x72c(%rbp)
movl $0x0, -0x730(%rbp)
movl $0x0, -0x734(%rbp)
leaq -0x4c8(%rbp), %rdi
callq 0x7af0
movq %rax, -0x740(%rbp)
leaq -0x4c8(%rbp), %rdi
callq 0x7b50
movq %rax, -0x748(%rbp)
leaq -0x740(%rbp), %rdi
leaq -0x748(%rbp), %rsi
callq 0x7b20
testb $0x1, %al
jne 0x72d6
jmp 0x75df
leaq -0x740(%rbp), %rdi
callq 0x7b80
movq %rax, %rsi
leaq 0x90164(%rip), %rdx     # 0x97450
leaq -0x7c0(%rbp), %rdi
leaq -0x630(%rbp), %rcx
xorl %r8d, %r8d
callq 0x25d50
jmp 0x7304
movzbl -0x40a(%rbp), %edx
andl $0x1, %edx
leaq -0x728(%rbp), %rdi
leaq -0x7c0(%rbp), %rsi
callq 0x31ed0
jmp 0x7323
leaq -0x7c0(%rbp), %rdi
addq $0x40, %rdi
callq 0x7bb0
movq %rax, %rcx
movl -0x72c(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x72c(%rbp)
leaq -0x7c0(%rbp), %rdi
addq $0x58, %rdi
callq 0x7be0
movq %rax, %rcx
movl -0x730(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x730(%rbp)
movl -0x734(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x734(%rbp)
movl -0x734(%rbp), %eax
movl $0x2710, %ecx           # imm = 0x2710
xorl %edx, %edx
divl %ecx
cmpl $0x0, %edx
jne 0x7421
movq 0x8fc53(%rip), %rdi     # 0x96fe8
leaq 0x60f13(%rip), %rsi     # 0x682af
callq 0x53f0
movq %rax, -0xb98(%rbp)
jmp 0x73aa
movq -0xb98(%rbp), %rdi
movl -0x734(%rbp), %esi
callq 0x5570
movq %rax, -0xba0(%rbp)
jmp 0x73c5
movq -0xba0(%rbp), %rdi
movq 0x8fbc5(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x73da
jmp 0x7421
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7749
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x773d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x75ce
cmpl $0x0, -0x3e4(%rbp)
jbe 0x75b1
movl -0x734(%rbp), %eax
xorl %edx, %edx
divl -0x3e4(%rbp)
cmpl $0x0, %edx
jne 0x75b1
leaq -0x948(%rbp), %rdi
callq 0x52f0
jmp 0x7453
leaq -0x938(%rbp), %rdi
leaq -0x3e0(%rbp), %rsi
callq 0x53a0
movq %rax, -0xba8(%rbp)
jmp 0x746f
movq -0xba8(%rbp), %rdi
leaq 0x611bb(%rip), %rsi     # 0x68638
callq 0x53f0
movq %rax, -0xbb0(%rbp)
jmp 0x748b
movq -0xbb0(%rbp), %rdi
movl -0x734(%rbp), %esi
callq 0x5570
jmp 0x749f
movq 0x8fb42(%rip), %rdi     # 0x96fe8
leaq 0x60e17(%rip), %rsi     # 0x682c4
callq 0x53f0
movq %rax, -0xbb8(%rbp)
jmp 0x74bb
leaq -0x968(%rbp), %rdi
leaq -0x948(%rbp), %rsi
callq 0x53e0
jmp 0x74d0
movq -0xbb8(%rbp), %rdi
leaq -0x968(%rbp), %rsi
callq 0x53a0
movq %rax, -0xbc0(%rbp)
jmp 0x74ec
movq -0xbc0(%rbp), %rdi
movq 0x8fa9e(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x7501
leaq -0x968(%rbp), %rdi
callq 0x5858
leaq -0x988(%rbp), %rdi
leaq -0x948(%rbp), %rsi
callq 0x53e0
jmp 0x7522
leaq -0x728(%rbp), %rdi
leaq -0x988(%rbp), %rsi
callq 0x336a0
jmp 0x7537
leaq -0x988(%rbp), %rdi
callq 0x5858
leaq -0x948(%rbp), %rdi
callq 0x5330
jmp 0x75b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x75a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x968(%rbp), %rdi
callq 0x5858
jmp 0x75a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x988(%rbp), %rdi
callq 0x5858
leaq -0x948(%rbp), %rdi
callq 0x5330
jmp 0x75ce
leaq -0x7c0(%rbp), %rdi
callq 0x282c0
leaq -0x740(%rbp), %rdi
callq 0x7c00
jmp 0x72a7
leaq -0x7c0(%rbp), %rdi
callq 0x282c0
jmp 0x773d
leaq -0x728(%rbp), %rdi
leaq -0x3e0(%rbp), %rsi
callq 0x336a0
jmp 0x75f4
movq 0x8f9ed(%rip), %rdi     # 0x96fe8
leaq 0x60cea(%rip), %rsi     # 0x682ec
callq 0x53f0
movq %rax, -0xbc8(%rbp)
jmp 0x7610
leaq -0x6f0(%rbp), %rdi
callq 0x7c30
movq -0xbc8(%rbp), %rdi
movq %rax, %rsi
callq 0x50f0
movq %rax, -0xbd0(%rbp)
jmp 0x7634
movq -0xbd0(%rbp), %rdi
movq 0x8f956(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x7649
movq 0x8f998(%rip), %rdi     # 0x96fe8
leaq 0x60cac(%rip), %rsi     # 0x68303
callq 0x53f0
movq %rax, -0xbd8(%rbp)
jmp 0x7665
leaq -0x708(%rbp), %rdi
callq 0x7c50
movq -0xbd8(%rbp), %rdi
movq %rax, %rsi
callq 0x50f0
movq %rax, -0xbe0(%rbp)
jmp 0x7689
movq -0xbe0(%rbp), %rdi
movq 0x8f901(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x769e
movq 0x8f943(%rip), %rdi     # 0x96fe8
leaq 0x60c6c(%rip), %rsi     # 0x68318
callq 0x53f0
movq %rax, -0xbe8(%rbp)
jmp 0x76ba
movq -0xbe8(%rbp), %rdi
movl -0x72c(%rbp), %esi
callq 0x5570
movq %rax, -0xbf0(%rbp)
jmp 0x76d5
movq -0xbf0(%rbp), %rdi
movq 0x8f8b5(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x76ea
movq 0x8f8f7(%rip), %rdi     # 0x96fe8
leaq 0x60c39(%rip), %rsi     # 0x68331
callq 0x53f0
movq %rax, -0xbf8(%rbp)
jmp 0x7706
movq -0xbf8(%rbp), %rdi
movl -0x730(%rbp), %esi
callq 0x5570
movq %rax, -0xc00(%rbp)
jmp 0x7721
movq -0xc00(%rbp), %rdi
movq 0x8f869(%rip), %rsi     # 0x96f98
callq 0x5430
jmp 0x7736
xorl %edi, %edi
callq 0x54a0
leaq -0x728(%rbp), %rdi
callq 0x31cf0
leaq -0x630(%rbp), %rdi
callq 0x1f850
leaq -0x4c8(%rbp), %rdi
callq 0x7c70
leaq -0x498(%rbp), %rdi
callq 0x7c70
leaq -0x3e0(%rbp), %rdi
callq 0x5858
leaq -0x3c0(%rbp), %rdi
callq 0x5858
leaq -0x3a0(%rbp), %rdi
callq 0x5858
leaq -0xc8(%rbp), %rdi
callq 0x7c90
movq -0xf8(%rbp), %rdi
callq 0x5710
nopl (%rax)