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

    conf::Config config;
    config("usage: iterate12 [OPTION...] WORDLIST VOCAB_INIT MSFG_IN TRANSITIONS_OUT\n")
      ('h', "help", "", "", "display help")
      ('i', "iterations=INT", "arg", "5", "Number of iterations")
      ('f', "forward-backward", "", "", "Use Forward-backward segmentation instead of Viterbi")
      ('8', "utf-8", "", "", "Utf-8 character encoding in use");
    config.default_parse(argc, argv);
    if (config.arguments.size() != 4) config.print_help(stderr, 1);

    int num_iterations = config["iterations"].get_int();
    bool enable_forward_backward = config["forward-backward"].specified;
    bool utf8_encoding = config["utf-8"].specified;
    string wordlist_fname = config.arguments[0];
    string vocab_in_fname = config.arguments[1];
    string msfg_fname = config.arguments[2];
    string transitions_out_fname = config.arguments[3];

    cerr << std::boolalpha;
    cerr << "parameters, wordlist: " << wordlist_fname << endl;
    cerr << "parameters, initial vocabulary: " << vocab_in_fname << endl;
    cerr << "parameters, msfg: " << msfg_fname << endl;
    cerr << "parameters, final model: " << transitions_out_fname << endl;
    cerr << "parameters, use forward-backward: " << enable_forward_backward << endl;
    cerr << "parameters, number of iterations: " << num_iterations << endl;
    cerr << "parameters, utf-8 encoding: " << utf8_encoding << endl;

    int word_maxlen, subword_maxlen;
    set<string> all_chars;
    map<string, flt_type> vocab;
    map<string, flt_type> words;

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

    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;

    cerr << "Reading msfg " << msfg_fname << endl;
    MultiStringFactorGraph msfg(start_end_symbol);
    msfg.read(msfg_fname);

    if (vocab.find(start_end_symbol) == vocab.end()) vocab[start_end_symbol] = log(0.5);
    prune_msfg(vocab, msfg);

    std::cerr << std::setprecision(15);
    transitions_t transitions;
    map<string, flt_type> unigram_stats;

    for (int i=0; i<3; i++) {
        cerr << "Unigram iteration " << i << endl;
        assign_scores(vocab, msfg);
        flt_type lp = Bigrams::collect_trans_stats(words, msfg, transitions, unigram_stats, true);
        vocab.swap(unigram_stats);
        Unigrams::freqs_to_logprobs(vocab);
        prune_msfg(vocab, msfg);
        if (i>0) {
            cerr << "\tlikelihood: " << lp << endl;
            cerr << "\tvocabulary size: " << vocab.size() << endl;
        }
    }

    Bigrams::freqs_to_logprobs(transitions);
    for (int i=0; i<num_iterations; i++) {
        cerr << "Bigram iteration " << i+1 << endl;
        flt_type lp = Bigrams::iterate(words, msfg, transitions, enable_forward_backward, 1);
        cerr << "\tlikelihood: " << lp << endl;
        cerr << "\tnumber of transitions: " << Bigrams::transition_count(transitions) << endl;
        cerr << "\tvocabulary size: " << transitions.size() << endl;
    }

    // Write transitions
    Bigrams::write_transitions(transitions, transitions_out_fname);

    exit(EXIT_SUCCESS);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x9b0, %rsp            # imm = 0x9B0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x114e0
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x6f0(%rbp)
callq 0x5710
movq -0x6f0(%rbp), %rdx
leaq 0x61dcf(%rip), %rsi     # 0x68055
leaq -0xe8(%rbp), %rdi
callq 0x5560
jmp 0x6294
leaq -0xc8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x11550
movq %rax, -0x6f8(%rbp)
jmp 0x62b0
leaq -0x121(%rbp), %rdi
movq %rdi, -0x700(%rbp)
callq 0x5710
movq -0x700(%rbp), %rdx
leaq 0x61dd6(%rip), %rsi     # 0x680a7
leaq -0x120(%rbp), %rdi
callq 0x5560
jmp 0x62df
leaq -0x149(%rbp), %rdi
movq %rdi, -0x708(%rbp)
callq 0x5710
movq -0x708(%rbp), %rdx
leaq 0x62359(%rip), %rsi     # 0x68659
leaq -0x148(%rbp), %rdi
callq 0x5560
jmp 0x630e
leaq -0x171(%rbp), %rdi
movq %rdi, -0x710(%rbp)
callq 0x5710
movq -0x710(%rbp), %rdx
leaq 0x6232a(%rip), %rsi     # 0x68659
leaq -0x170(%rbp), %rdi
callq 0x5560
jmp 0x633d
leaq -0x199(%rbp), %rdi
movq %rdi, -0x718(%rbp)
callq 0x5710
movq -0x718(%rbp), %rdx
leaq 0x61d41(%rip), %rsi     # 0x6809f
leaq -0x198(%rbp), %rdi
callq 0x5560
jmp 0x636c
movq -0x6f8(%rbp), %rdi
movl $0x68, %esi
leaq -0x120(%rbp), %rdx
leaq -0x148(%rbp), %rcx
leaq -0x170(%rbp), %r8
leaq -0x198(%rbp), %r9
callq 0x11580
movq %rax, -0x720(%rbp)
jmp 0x63a2
leaq -0x1c1(%rbp), %rdi
movq %rdi, -0x728(%rbp)
callq 0x5710
movq -0x728(%rbp), %rdx
leaq 0x61ce9(%rip), %rsi     # 0x680ac
leaq -0x1c0(%rbp), %rdi
callq 0x5560
jmp 0x63d1
leaq -0x1e9(%rbp), %rdi
movq %rdi, -0x730(%rbp)
callq 0x5710
movq -0x730(%rbp), %rdx
leaq 0x61cc9(%rip), %rsi     # 0x680bb
leaq -0x1e8(%rbp), %rdi
callq 0x5560
jmp 0x6400
leaq -0x211(%rbp), %rdi
movq %rdi, -0x738(%rbp)
callq 0x5710
movq -0x738(%rbp), %rdx
leaq 0x61c9e(%rip), %rsi     # 0x680bf
leaq -0x210(%rbp), %rdi
callq 0x5560
jmp 0x642f
leaq -0x239(%rbp), %rdi
movq %rdi, -0x740(%rbp)
callq 0x5710
movq -0x740(%rbp), %rdx
leaq 0x61c71(%rip), %rsi     # 0x680c1
leaq -0x238(%rbp), %rdi
callq 0x5560
jmp 0x645e
movq -0x720(%rbp), %rdi
movl $0x69, %esi
leaq -0x1c0(%rbp), %rdx
leaq -0x1e8(%rbp), %rcx
leaq -0x210(%rbp), %r8
leaq -0x238(%rbp), %r9
callq 0x11580
movq %rax, -0x748(%rbp)
jmp 0x6494
leaq -0x261(%rbp), %rdi
movq %rdi, -0x750(%rbp)
callq 0x5710
movq -0x750(%rbp), %rdx
leaq 0x61c21(%rip), %rsi     # 0x680d6
leaq -0x260(%rbp), %rdi
callq 0x5560
jmp 0x64c3
leaq -0x289(%rbp), %rdi
movq %rdi, -0x758(%rbp)
callq 0x5710
movq -0x758(%rbp), %rdx
leaq 0x62175(%rip), %rsi     # 0x68659
leaq -0x288(%rbp), %rdi
callq 0x5560
jmp 0x64f2
leaq -0x2b1(%rbp), %rdi
movq %rdi, -0x760(%rbp)
callq 0x5710
movq -0x760(%rbp), %rdx
leaq 0x62146(%rip), %rsi     # 0x68659
leaq -0x2b0(%rbp), %rdi
callq 0x5560
jmp 0x6521
leaq -0x2d9(%rbp), %rdi
movq %rdi, -0x768(%rbp)
callq 0x5710
movq -0x768(%rbp), %rdx
leaq 0x61ba5(%rip), %rsi     # 0x680e7
leaq -0x2d8(%rbp), %rdi
callq 0x5560
jmp 0x6550
movq -0x748(%rbp), %rdi
movl $0x66, %esi
leaq -0x260(%rbp), %rdx
leaq -0x288(%rbp), %rcx
leaq -0x2b0(%rbp), %r8
leaq -0x2d8(%rbp), %r9
callq 0x11580
movq %rax, -0x770(%rbp)
jmp 0x6586
leaq -0x301(%rbp), %rdi
movq %rdi, -0x778(%rbp)
callq 0x5710
movq -0x778(%rbp), %rdx
leaq 0x61b75(%rip), %rsi     # 0x6811c
leaq -0x300(%rbp), %rdi
callq 0x5560
jmp 0x65b5
leaq -0x329(%rbp), %rdi
movq %rdi, -0x780(%rbp)
callq 0x5710
movq -0x780(%rbp), %rdx
leaq 0x62083(%rip), %rsi     # 0x68659
leaq -0x328(%rbp), %rdi
callq 0x5560
jmp 0x65e4
leaq -0x351(%rbp), %rdi
movq %rdi, -0x788(%rbp)
callq 0x5710
movq -0x788(%rbp), %rdx
leaq 0x62054(%rip), %rsi     # 0x68659
leaq -0x350(%rbp), %rdi
callq 0x5560
jmp 0x6613
leaq -0x379(%rbp), %rdi
movq %rdi, -0x790(%rbp)
callq 0x5710
movq -0x790(%rbp), %rdx
leaq 0x61aee(%rip), %rsi     # 0x68122
leaq -0x378(%rbp), %rdi
callq 0x5560
jmp 0x6642
movq -0x770(%rbp), %rdi
movl $0x38, %esi
leaq -0x300(%rbp), %rdx
leaq -0x328(%rbp), %rcx
leaq -0x350(%rbp), %r8
leaq -0x378(%rbp), %r9
callq 0x11580
jmp 0x6671
leaq -0x378(%rbp), %rdi
callq 0x5848
leaq -0x379(%rbp), %rdi
callq 0x5430
leaq -0x350(%rbp), %rdi
callq 0x5848
leaq -0x351(%rbp), %rdi
callq 0x5430
leaq -0x328(%rbp), %rdi
callq 0x5848
leaq -0x329(%rbp), %rdi
callq 0x5430
leaq -0x300(%rbp), %rdi
callq 0x5848
leaq -0x301(%rbp), %rdi
callq 0x5430
leaq -0x2d8(%rbp), %rdi
callq 0x5848
leaq -0x2d9(%rbp), %rdi
callq 0x5430
leaq -0x2b0(%rbp), %rdi
callq 0x5848
leaq -0x2b1(%rbp), %rdi
callq 0x5430
leaq -0x288(%rbp), %rdi
callq 0x5848
leaq -0x289(%rbp), %rdi
callq 0x5430
leaq -0x260(%rbp), %rdi
callq 0x5848
leaq -0x261(%rbp), %rdi
callq 0x5430
leaq -0x238(%rbp), %rdi
callq 0x5848
leaq -0x239(%rbp), %rdi
callq 0x5430
leaq -0x210(%rbp), %rdi
callq 0x5848
leaq -0x211(%rbp), %rdi
callq 0x5430
leaq -0x1e8(%rbp), %rdi
callq 0x5848
leaq -0x1e9(%rbp), %rdi
callq 0x5430
leaq -0x1c0(%rbp), %rdi
callq 0x5848
leaq -0x1c1(%rbp), %rdi
callq 0x5430
leaq -0x198(%rbp), %rdi
callq 0x5848
leaq -0x199(%rbp), %rdi
callq 0x5430
leaq -0x170(%rbp), %rdi
callq 0x5848
leaq -0x171(%rbp), %rdi
callq 0x5430
leaq -0x148(%rbp), %rdi
callq 0x5848
leaq -0x149(%rbp), %rdi
callq 0x5430
leaq -0x120(%rbp), %rdi
callq 0x5848
leaq -0x121(%rbp), %rdi
callq 0x5430
leaq -0xe8(%rbp), %rdi
callq 0x5848
leaq -0xe9(%rbp), %rdi
callq 0x5430
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq -0xc8(%rbp), %rdi
callq 0x123d0
jmp 0x681e
leaq -0xc8(%rbp), %rdi
addq $0x98, %rdi
callq 0x8280
cmpq $0x4, %rax
je 0x6bfd
movq 0x9077e(%rip), %rax     # 0x96fc0
movq (%rax), %rsi
leaq -0xc8(%rbp), %rdi
movl $0x1, %edx
callq 0x12b90
jmp 0x6858
jmp 0x6bfd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6bd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6bc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6bbd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6ba5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6b8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6b75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6b69
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6b5d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6b45
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6b2d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6b15
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6b09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6afd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6ae5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6acd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6ab5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6aa9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6a9d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6a85
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6a6d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x6a55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x378(%rbp), %rdi
callq 0x5848
leaq -0x379(%rbp), %rdi
callq 0x5430
leaq -0x350(%rbp), %rdi
callq 0x5848
leaq -0x351(%rbp), %rdi
callq 0x5430
leaq -0x328(%rbp), %rdi
callq 0x5848
leaq -0x329(%rbp), %rdi
callq 0x5430
leaq -0x300(%rbp), %rdi
callq 0x5848
leaq -0x301(%rbp), %rdi
callq 0x5430
leaq -0x2d8(%rbp), %rdi
callq 0x5848
leaq -0x2d9(%rbp), %rdi
callq 0x5430
leaq -0x2b0(%rbp), %rdi
callq 0x5848
leaq -0x2b1(%rbp), %rdi
callq 0x5430
leaq -0x288(%rbp), %rdi
callq 0x5848
leaq -0x289(%rbp), %rdi
callq 0x5430
leaq -0x260(%rbp), %rdi
callq 0x5848
leaq -0x261(%rbp), %rdi
callq 0x5430
leaq -0x238(%rbp), %rdi
callq 0x5848
leaq -0x239(%rbp), %rdi
callq 0x5430
leaq -0x210(%rbp), %rdi
callq 0x5848
leaq -0x211(%rbp), %rdi
callq 0x5430
leaq -0x1e8(%rbp), %rdi
callq 0x5848
leaq -0x1e9(%rbp), %rdi
callq 0x5430
leaq -0x1c0(%rbp), %rdi
callq 0x5848
leaq -0x1c1(%rbp), %rdi
callq 0x5430
leaq -0x198(%rbp), %rdi
callq 0x5848
leaq -0x199(%rbp), %rdi
callq 0x5430
leaq -0x170(%rbp), %rdi
callq 0x5848
leaq -0x171(%rbp), %rdi
callq 0x5430
leaq -0x148(%rbp), %rdi
callq 0x5848
leaq -0x149(%rbp), %rdi
callq 0x5430
leaq -0x120(%rbp), %rdi
callq 0x5848
leaq -0x121(%rbp), %rdi
callq 0x5430
leaq -0xe8(%rbp), %rdi
callq 0x5848
leaq -0xe9(%rbp), %rdi
callq 0x5430
jmp 0x7b64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7b64
leaq -0x3a1(%rbp), %rdi
movq %rdi, -0x798(%rbp)
callq 0x5710
movq -0x798(%rbp), %rdx
leaq 0x614ad(%rip), %rsi     # 0x680cb
leaq -0x3a0(%rbp), %rdi
callq 0x5560
jmp 0x6c2c
leaq -0xc8(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x12510
movq %rax, -0x7a0(%rbp)
jmp 0x6c48
movq -0x7a0(%rbp), %rdi
callq 0x11260
movl %eax, -0x7a4(%rbp)
jmp 0x6c5c
leaq -0x3a0(%rbp), %rdi
callq 0x5848
leaq -0x3a1(%rbp), %rdi
callq 0x5430
movl -0x7a4(%rbp), %eax
movl %eax, -0x380(%rbp)
leaq -0x3c9(%rbp), %rdi
movq %rdi, -0x7b0(%rbp)
callq 0x5710
movq -0x7b0(%rbp), %rdx
leaq 0x61435(%rip), %rsi     # 0x680d6
leaq -0x3c8(%rbp), %rdi
callq 0x5560
jmp 0x6caf
leaq -0xc8(%rbp), %rdi
leaq -0x3c8(%rbp), %rsi
callq 0x12510
movq %rax, -0x7b8(%rbp)
jmp 0x6ccb
movq -0x7b8(%rbp), %rax
movb 0x4a(%rax), %al
movb %al, -0x7c1(%rbp)
leaq -0x3c8(%rbp), %rdi
callq 0x5848
leaq -0x3c9(%rbp), %rdi
callq 0x5430
movb -0x7c1(%rbp), %al
andb $0x1, %al
movb %al, -0x3a2(%rbp)
leaq -0x3f1(%rbp), %rdi
movq %rdi, -0x7c0(%rbp)
callq 0x5710
movq -0x7c0(%rbp), %rdx
leaq 0x613fa(%rip), %rsi     # 0x6811c
leaq -0x3f0(%rbp), %rdi
callq 0x5560
jmp 0x6d30
leaq -0xc8(%rbp), %rdi
leaq -0x3f0(%rbp), %rsi
callq 0x12510
movq %rax, -0x7d0(%rbp)
jmp 0x6d4c
movq -0x7d0(%rbp), %rax
movb 0x4a(%rax), %al
movb %al, -0x7d1(%rbp)
leaq -0x3f0(%rbp), %rdi
callq 0x5848
leaq -0x3f1(%rbp), %rdi
callq 0x5430
movb -0x7d1(%rbp), %al
andb $0x1, %al
movb %al, -0x3ca(%rbp)
leaq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x8300
movq %rax, %rsi
leaq -0x418(%rbp), %rdi
callq 0x51b0
jmp 0x6da0
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0x8300
movq %rax, %rsi
leaq -0x438(%rbp), %rdi
callq 0x51b0
jmp 0x6dbf
leaq -0x30(%rbp), %rdi
movl $0x2, %esi
callq 0x8300
movq %rax, %rsi
leaq -0x458(%rbp), %rdi
callq 0x51b0
jmp 0x6dde
leaq -0x30(%rbp), %rdi
movl $0x3, %esi
callq 0x8300
movq %rax, %rsi
leaq -0x478(%rbp), %rdi
callq 0x51b0
jmp 0x6dfd
movq 0x901e4(%rip), %rdi     # 0x96fe8
leaq 0x1515(%rip), %rsi      # 0x8320
callq 0x5140
jmp 0x6e12
movq 0x901cf(%rip), %rdi     # 0x96fe8
leaq 0x61322(%rip), %rsi     # 0x68142
callq 0x53d0
movq %rax, -0x7e0(%rbp)
jmp 0x6e2e
movq -0x7e0(%rbp), %rdi
leaq -0x418(%rbp), %rsi
callq 0x5390
movq %rax, -0x7e8(%rbp)
jmp 0x6e4a
movq -0x7e8(%rbp), %rdi
movq 0x90140(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x6e5f
movq 0x90182(%rip), %rdi     # 0x96fe8
leaq 0x612ec(%rip), %rsi     # 0x68159
callq 0x53d0
movq %rax, -0x7f0(%rbp)
jmp 0x6e7b
movq -0x7f0(%rbp), %rdi
leaq -0x438(%rbp), %rsi
callq 0x5390
movq %rax, -0x7f8(%rbp)
jmp 0x6e97
movq -0x7f8(%rbp), %rdi
movq 0x900f3(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x6eac
movq 0x90135(%rip), %rdi     # 0x96fe8
leaq 0x612c0(%rip), %rsi     # 0x6817a
callq 0x53d0
movq %rax, -0x800(%rbp)
jmp 0x6ec8
movq -0x800(%rbp), %rdi
leaq -0x458(%rbp), %rsi
callq 0x5390
movq %rax, -0x808(%rbp)
jmp 0x6ee4
movq -0x808(%rbp), %rdi
movq 0x900a6(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x6ef9
movq 0x900e8(%rip), %rdi     # 0x96fe8
leaq 0x61286(%rip), %rsi     # 0x6818d
callq 0x53d0
movq %rax, -0x810(%rbp)
jmp 0x6f15
movq -0x810(%rbp), %rdi
leaq -0x478(%rbp), %rsi
callq 0x5390
movq %rax, -0x818(%rbp)
jmp 0x6f31
movq -0x818(%rbp), %rdi
movq 0x90059(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x6f46
movq 0x9009b(%rip), %rdi     # 0x96fe8
leaq 0x61253(%rip), %rsi     # 0x681a7
callq 0x53d0
movq %rax, -0x820(%rbp)
jmp 0x6f62
movq -0x820(%rbp), %rdi
movzbl -0x3a2(%rbp), %esi
andl $0x1, %esi
callq 0x5720
movq %rax, -0x828(%rbp)
jmp 0x6f81
movq -0x828(%rbp), %rdi
movq 0x90009(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x6f96
movq 0x9004b(%rip), %rdi     # 0x96fe8
leaq 0x61226(%rip), %rsi     # 0x681ca
callq 0x53d0
movq %rax, -0x830(%rbp)
jmp 0x6fb2
movq -0x830(%rbp), %rdi
movl -0x380(%rbp), %esi
callq 0x56f0
movq %rax, -0x838(%rbp)
jmp 0x6fcd
movq -0x838(%rbp), %rdi
movq 0x8ffbd(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x6fe2
movq 0x8ffff(%rip), %rdi     # 0x96fe8
leaq 0x611fd(%rip), %rsi     # 0x681ed
callq 0x53d0
movq %rax, -0x840(%rbp)
jmp 0x6ffe
movq -0x840(%rbp), %rdi
movzbl -0x3ca(%rbp), %esi
andl $0x1, %esi
callq 0x5720
movq %rax, -0x848(%rbp)
jmp 0x701d
movq -0x848(%rbp), %rdi
movq 0x8ff6d(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x7032
leaq -0x4b0(%rbp), %rdi
callq 0x8350
leaq -0x4e0(%rbp), %rdi
callq 0x8370
leaq -0x510(%rbp), %rdi
callq 0x8370
movq 0x8ff8b(%rip), %rdi     # 0x96fe8
leaq 0x611a6(%rip), %rsi     # 0x6820a
callq 0x53d0
movq %rax, -0x850(%rbp)
jmp 0x7072
movq -0x850(%rbp), %rdi
leaq -0x438(%rbp), %rsi
callq 0x5390
movq %rax, -0x858(%rbp)
jmp 0x708e
movq -0x858(%rbp), %rdi
movq 0x8fefc(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x70a3
leaq -0x538(%rbp), %rdi
leaq -0x438(%rbp), %rsi
callq 0x51b0
jmp 0x70b8
movzbl -0x3ca(%rbp), %ecx
andl $0x1, %ecx
leaq -0x538(%rbp), %rdi
leaq -0x4e0(%rbp), %rsi
leaq -0x480(%rbp), %rdx
callq 0x57360
movl %eax, -0x85c(%rbp)
jmp 0x70e4
leaq -0x538(%rbp), %rdi
callq 0x5848
movl -0x85c(%rbp), %eax
movl %eax, -0x514(%rbp)
cmpl $0x0, -0x514(%rbp)
jge 0x72a3
movq 0x8fed8(%rip), %rdi     # 0x96fe8
leaq 0x6110f(%rip), %rsi     # 0x68226
callq 0x53d0
movq %rax, -0x868(%rbp)
jmp 0x7125
movq -0x868(%rbp), %rdi
movq 0x8fe65(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x713a
movl $0x1, %edi
callq 0x5480
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7176
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x3a0(%rbp), %rdi
callq 0x5848
leaq -0x3a1(%rbp), %rdi
callq 0x5430
jmp 0x7b64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x71b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x3c8(%rbp), %rdi
callq 0x5848
leaq -0x3c9(%rbp), %rdi
callq 0x5430
jmp 0x7b64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x71fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x3f0(%rbp), %rdi
callq 0x5848
leaq -0x3f1(%rbp), %rdi
callq 0x5430
jmp 0x7b64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7b58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7b4c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7b40
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7b34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7b10
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x538(%rbp), %rdi
callq 0x5848
jmp 0x7b10
movq 0x8fd3e(%rip), %rdi     # 0x96fe8
leaq 0x613a7(%rip), %rsi     # 0x68658
callq 0x53d0
movq %rax, -0x870(%rbp)
jmp 0x72bf
movq -0x870(%rbp), %rdi
leaq 0x60fe4(%rip), %rsi     # 0x682b1
callq 0x53d0
movq %rax, -0x878(%rbp)
jmp 0x72db
leaq -0x4e0(%rbp), %rdi
callq 0x7f60
movq -0x878(%rbp), %rdi
movq %rax, %rsi
callq 0x50f0
movq %rax, -0x880(%rbp)
jmp 0x72ff
movq -0x880(%rbp), %rdi
movq 0x8fc8b(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x7314
movq 0x8fccd(%rip), %rdi     # 0x96fe8
leaq 0x61336(%rip), %rsi     # 0x68658
callq 0x53d0
movq %rax, -0x888(%rbp)
jmp 0x7330
movq -0x888(%rbp), %rdi
leaq 0x60f18(%rip), %rsi     # 0x68256
callq 0x53d0
movq %rax, -0x890(%rbp)
jmp 0x734c
movq -0x890(%rbp), %rdi
movl -0x480(%rbp), %esi
callq 0x56f0
movq %rax, -0x898(%rbp)
jmp 0x7367
movq -0x898(%rbp), %rdi
movq 0x8fc23(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x737c
movzbl -0x3ca(%rbp), %ecx
andl $0x1, %ecx
leaq -0x4e0(%rbp), %rdi
leaq -0x4b0(%rbp), %rsi
movl $0x2, %edx
callq 0x7b80
jmp 0x73a0
movq 0x8fc41(%rip), %rdi     # 0x96fe8
leaq 0x60ec0(%rip), %rsi     # 0x6826e
callq 0x53d0
movq %rax, -0x8a0(%rbp)
jmp 0x73bc
movq -0x8a0(%rbp), %rdi
leaq -0x418(%rbp), %rsi
callq 0x5390
movq %rax, -0x8a8(%rbp)
jmp 0x73d8
movq -0x8a8(%rbp), %rdi
movq 0x8fbb2(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x73ed
leaq -0x558(%rbp), %rdi
leaq -0x418(%rbp), %rsi
callq 0x51b0
jmp 0x7402
movzbl -0x3ca(%rbp), %ecx
andl $0x1, %ecx
leaq -0x558(%rbp), %rdi
leaq -0x510(%rbp), %rsi
leaq -0x47c(%rbp), %rdx
callq 0x57360
movl %eax, -0x8ac(%rbp)
jmp 0x742e
movl -0x8ac(%rbp), %eax
movl %eax, -0x514(%rbp)
leaq -0x558(%rbp), %rdi
callq 0x5848
cmpl $0x0, -0x514(%rbp)
jge 0x74ad
movq 0x8fb92(%rip), %rdi     # 0x96fe8
leaq 0x60e24(%rip), %rsi     # 0x68281
callq 0x53d0
movq %rax, -0x8b8(%rbp)
jmp 0x746b
movq -0x8b8(%rbp), %rdi
movq 0x8fb1f(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x7480
movl $0x1, %edi
callq 0x5480
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x558(%rbp), %rdi
callq 0x5848
jmp 0x7b10
movq 0x8fb34(%rip), %rdi     # 0x96fe8
leaq 0x6119d(%rip), %rsi     # 0x68658
callq 0x53d0
movq %rax, -0x8c0(%rbp)
jmp 0x74c9
movq -0x8c0(%rbp), %rdi
leaq 0x60dd1(%rip), %rsi     # 0x682a8
callq 0x53d0
movq %rax, -0x8c8(%rbp)
jmp 0x74e5
leaq -0x510(%rbp), %rdi
callq 0x7f60
movq -0x8c8(%rbp), %rdi
movq %rax, %rsi
callq 0x50f0
movq %rax, -0x8d0(%rbp)
jmp 0x7509
movq -0x8d0(%rbp), %rdi
movq 0x8fa81(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x751e
movq 0x8fac3(%rip), %rdi     # 0x96fe8
leaq 0x6112c(%rip), %rsi     # 0x68658
callq 0x53d0
movq %rax, -0x8d8(%rbp)
jmp 0x753a
movq -0x8d8(%rbp), %rdi
leaq 0x60d70(%rip), %rsi     # 0x682b8
callq 0x53d0
movq %rax, -0x8e0(%rbp)
jmp 0x7556
movq -0x8e0(%rbp), %rdi
movl -0x47c(%rbp), %esi
callq 0x56f0
movq %rax, -0x8e8(%rbp)
jmp 0x7571
movq -0x8e8(%rbp), %rdi
movq 0x8fa19(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x7586
movq 0x8fa5b(%rip), %rdi     # 0x96fe8
leaq 0x60d3a(%rip), %rsi     # 0x682ce
callq 0x53d0
movq %rax, -0x8f0(%rbp)
jmp 0x75a2
movq -0x8f0(%rbp), %rdi
leaq -0x458(%rbp), %rsi
callq 0x5390
movq %rax, -0x8f8(%rbp)
jmp 0x75be
movq -0x8f8(%rbp), %rdi
movq 0x8f9cc(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x75d3
leaq 0x8fe6e(%rip), %rsi     # 0x97448
leaq -0x650(%rbp), %rdi
callq 0x8390
jmp 0x75e8
leaq -0x650(%rbp), %rdi
leaq -0x458(%rbp), %rsi
callq 0x357f0
jmp 0x75fd
leaq 0x8fe44(%rip), %rsi     # 0x97448
leaq -0x4e0(%rbp), %rdi
callq 0x8570
movq %rax, -0x900(%rbp)
jmp 0x7619
movq -0x900(%rbp), %rax
movq %rax, -0x658(%rbp)
leaq -0x4e0(%rbp), %rdi
callq 0x7ee0
movq %rax, -0x660(%rbp)
leaq -0x658(%rbp), %rdi
leaq -0x660(%rbp), %rsi
callq 0x8540
testb $0x1, %al
jne 0x7653
jmp 0x76b0
movsd 0x609ad(%rip), %xmm0    # 0x68008
callq 0x5350
movsd %xmm0, -0x910(%rbp)
leaq 0x8fdd9(%rip), %rsi     # 0x97448
leaq -0x4e0(%rbp), %rdi
callq 0x85a0
movq %rax, -0x908(%rbp)
jmp 0x7684
movq -0x908(%rbp), %rax
movsd -0x910(%rbp), %xmm0
movsd %xmm0, (%rax)
jmp 0x76b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x7b04
leaq -0x4e0(%rbp), %rdi
leaq -0x650(%rbp), %rsi
callq 0x5fb0
jmp 0x76c5
movl $0xf, %edi
callq 0x8680
movl %eax, -0x914(%rbp)
jmp 0x76d7
movl -0x914(%rbp), %eax
movl %eax, -0x664(%rbp)
movl -0x664(%rbp), %esi
movq 0x8f8f8(%rip), %rdi     # 0x96fe8
callq 0x5640
jmp 0x76f7
leaq -0x698(%rbp), %rdi
callq 0x86a0
leaq -0x6c8(%rbp), %rdi
callq 0x8370
movl $0x0, -0x6cc(%rbp)
cmpl $0x3, -0x6cc(%rbp)
jge 0x7904
movq 0x8f8bb(%rip), %rdi     # 0x96fe8
leaq 0x60ba8(%rip), %rsi     # 0x682dc
callq 0x53d0
movq %rax, -0x920(%rbp)
jmp 0x7742
movq -0x920(%rbp), %rdi
movl -0x6cc(%rbp), %esi
callq 0x56f0
movq %rax, -0x928(%rbp)
jmp 0x775d
movq -0x928(%rbp), %rdi
movq 0x8f82d(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x7772
leaq -0x4e0(%rbp), %rdi
leaq -0x650(%rbp), %rsi
callq 0x48400
jmp 0x7787
leaq -0x510(%rbp), %rdi
leaq -0x650(%rbp), %rsi
leaq -0x698(%rbp), %rdx
leaq -0x6c8(%rbp), %rcx
movl $0x1, %r8d
callq 0x5f0a0
movsd %xmm0, -0x930(%rbp)
jmp 0x77b8
movsd -0x930(%rbp), %xmm0
movsd %xmm0, -0x6d8(%rbp)
leaq -0x4e0(%rbp), %rdi
movq %rdi, -0x938(%rbp)
leaq -0x6c8(%rbp), %rsi
callq 0x86c0
movq -0x938(%rbp), %rdi
movsd 0x6081f(%rip), %xmm0    # 0x68010
callq 0x58340
jmp 0x77f8
leaq -0x4e0(%rbp), %rdi
leaq -0x650(%rbp), %rsi
callq 0x5fb0
jmp 0x780d
cmpl $0x0, -0x6cc(%rbp)
jle 0x78ee
movq 0x8f7c7(%rip), %rdi     # 0x96fe8
leaq 0x60ac7(%rip), %rsi     # 0x682ef
callq 0x53d0
movq %rax, -0x940(%rbp)
jmp 0x7836
movq -0x940(%rbp), %rdi
movsd -0x6d8(%rbp), %xmm0
callq 0x57a0
movq %rax, -0x948(%rbp)
jmp 0x7853
movq -0x948(%rbp), %rdi
movq 0x8f737(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x7868
movq 0x8f779(%rip), %rdi     # 0x96fe8
leaq 0x60a87(%rip), %rsi     # 0x682fd
callq 0x53d0
movq %rax, -0x950(%rbp)
jmp 0x7884
leaq -0x4e0(%rbp), %rdi
callq 0x7f60
movq -0x950(%rbp), %rdi
movq %rax, %rsi
callq 0x50f0
movq %rax, -0x958(%rbp)
jmp 0x78a8
movq -0x958(%rbp), %rdi
movq 0x8f6e2(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x78bd
jmp 0x78ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x6c8(%rbp), %rdi
callq 0x8710
leaq -0x698(%rbp), %rdi
callq 0x8730
jmp 0x7b04
jmp 0x78f0
movl -0x6cc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6cc(%rbp)
jmp 0x7719
leaq -0x698(%rbp), %rdi
movsd 0x606fd(%rip), %xmm0    # 0x68010
callq 0x5f390
jmp 0x791a
movl $0x0, -0x6dc(%rbp)
movl -0x6dc(%rbp), %eax
cmpl -0x380(%rbp), %eax
jge 0x7ae1
movq 0x8f6ab(%rip), %rdi     # 0x96fe8
leaq 0x609cc(%rip), %rsi     # 0x68310
callq 0x53d0
movq %rax, -0x960(%rbp)
jmp 0x7952
movq -0x960(%rbp), %rdi
movl -0x6dc(%rbp), %esi
incl %esi
callq 0x56f0
movq %rax, -0x968(%rbp)
jmp 0x796f
movq -0x968(%rbp), %rdi
movq 0x8f61b(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x7984
movzbl -0x3a2(%rbp), %ecx
andl $0x1, %ecx
leaq -0x510(%rbp), %rdi
leaq -0x650(%rbp), %rsi
leaq -0x698(%rbp), %rdx
movl $0x1, %r8d
callq 0x5ef70
movsd %xmm0, -0x970(%rbp)
jmp 0x79b8
movsd -0x970(%rbp), %xmm0
movsd %xmm0, -0x6e8(%rbp)
movq 0x8f619(%rip), %rdi     # 0x96fe8
leaq 0x60919(%rip), %rsi     # 0x682ef
callq 0x53d0
movq %rax, -0x978(%rbp)
jmp 0x79e4
movq -0x978(%rbp), %rdi
movsd -0x6e8(%rbp), %xmm0
callq 0x57a0
movq %rax, -0x980(%rbp)
jmp 0x7a01
movq -0x980(%rbp), %rdi
movq 0x8f589(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x7a16
movq 0x8f5cb(%rip), %rdi     # 0x96fe8
leaq 0x608fe(%rip), %rsi     # 0x68322
callq 0x53d0
movq %rax, -0x988(%rbp)
jmp 0x7a32
leaq -0x698(%rbp), %rdi
callq 0x61840
movl %eax, -0x98c(%rbp)
jmp 0x7a46
movl -0x98c(%rbp), %esi
movq -0x988(%rbp), %rdi
callq 0x56f0
movq %rax, -0x998(%rbp)
jmp 0x7a61
movq -0x998(%rbp), %rdi
movq 0x8f529(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x7a76
movq 0x8f56b(%rip), %rdi     # 0x96fe8
leaq 0x60879(%rip), %rsi     # 0x682fd
callq 0x53d0
movq %rax, -0x9a0(%rbp)
jmp 0x7a92
leaq -0x698(%rbp), %rdi
callq 0x86f0
movq -0x9a0(%rbp), %rdi
movq %rax, %rsi
callq 0x50f0
movq %rax, -0x9a8(%rbp)
jmp 0x7ab6
movq -0x9a8(%rbp), %rdi
movq 0x8f4d4(%rip), %rsi     # 0x96f98
callq 0x5410
jmp 0x7acb
jmp 0x7acd
movl -0x6dc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6dc(%rbp)
jmp 0x7924
leaq -0x698(%rbp), %rdi
leaq -0x478(%rbp), %rsi
xorl %edx, %edx
movl $0x6, %ecx
callq 0x607c0
jmp 0x7afd
xorl %edi, %edi
callq 0x5480
leaq -0x650(%rbp), %rdi
callq 0x33990
leaq -0x510(%rbp), %rdi
callq 0x8710
leaq -0x4e0(%rbp), %rdi
callq 0x8710
leaq -0x4b0(%rbp), %rdi
callq 0x8750
leaq -0x478(%rbp), %rdi
callq 0x5848
leaq -0x458(%rbp), %rdi
callq 0x5848
leaq -0x438(%rbp), %rdi
callq 0x5848
leaq -0x418(%rbp), %rdi
callq 0x5848
leaq -0xc8(%rbp), %rdi
callq 0x8770
movq -0xf8(%rbp), %rdi
callq 0x5700
nopl (%rax)