// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5f8, %rsp            # imm = 0x5F8
movq %rsi, %rbx
movl %edi, %r14d
leaq -0x4f8(%rbp), %rdi
callq 0x8b92
leaq -0x400(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x21d42(%rip), %rsi     # 0x2705b
leaq 0x21d84(%rip), %rdx     # 0x270a4
leaq -0x410(%rbp), %rdi
callq 0x7a4e
leaq -0x4f8(%rbp), %rdi
leaq -0x410(%rbp), %rsi
callq 0x8bf8
movq %rax, %r15
leaq -0x3e0(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x21d59(%rip), %rsi     # 0x270ad
leaq 0x21d56(%rip), %rdx     # 0x270b1
leaq -0x3f0(%rbp), %rdi
callq 0x7a4e
leaq -0x2f0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2237e(%rip), %rdx     # 0x276f7
leaq -0x300(%rbp), %rdi
movq %rdx, %rsi
callq 0x7a4e
leaq -0x2d0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2235d(%rip), %rdx     # 0x276f7
leaq -0x2e0(%rbp), %rdi
movq %rdx, %rsi
callq 0x7a4e
leaq -0x2b0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21cea(%rip), %rsi     # 0x270a5
leaq 0x21cef(%rip), %rdx     # 0x270b1
leaq -0x2c0(%rbp), %rdi
callq 0x7a4e
leaq -0x3f0(%rbp), %rdx
leaq -0x300(%rbp), %rcx
leaq -0x2e0(%rbp), %r8
leaq -0x2c0(%rbp), %r9
movq %r15, %rdi
movl $0x68, %esi
callq 0x8c10
movq %rax, %r15
leaq -0x290(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21ca6(%rip), %rsi     # 0x270b2
leaq 0x21cad(%rip), %rdx     # 0x270c0
leaq -0x2a0(%rbp), %rdi
callq 0x7a4e
leaq -0x270(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21c90(%rip), %rsi     # 0x270c1
leaq 0x21c8c(%rip), %rdx     # 0x270c4
leaq -0x280(%rbp), %rdi
callq 0x7a4e
leaq -0x250(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21c6f(%rip), %rsi     # 0x270c5
leaq 0x21c69(%rip), %rdx     # 0x270c6
leaq -0x260(%rbp), %rdi
callq 0x7a4e
leaq -0x230(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21c4c(%rip), %rsi     # 0x270c7
leaq 0x21c59(%rip), %rdx     # 0x270db
leaq -0x240(%rbp), %rdi
callq 0x7a4e
leaq -0x2a0(%rbp), %rdx
leaq -0x280(%rbp), %rcx
leaq -0x260(%rbp), %r8
leaq -0x240(%rbp), %r9
movq %r15, %rdi
movl $0x69, %esi
callq 0x8c10
movq %rax, %r15
leaq -0x210(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21c10(%rip), %rsi     # 0x270dc
leaq 0x21c19(%rip), %rdx     # 0x270ec
leaq -0x220(%rbp), %rdi
callq 0x7a4e
leaq -0x1f0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x22206(%rip), %rdx     # 0x276f7
leaq -0x200(%rbp), %rdi
movq %rdx, %rsi
callq 0x7a4e
leaq -0x1d0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x221e5(%rip), %rdx     # 0x276f7
leaq -0x1e0(%rbp), %rdi
movq %rdx, %rsi
callq 0x7a4e
leaq -0x1b0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21bba(%rip), %rsi     # 0x270ed
leaq 0x21be7(%rip), %rdx     # 0x27121
leaq -0x1c0(%rbp), %rdi
callq 0x7a4e
leaq -0x220(%rbp), %rdx
leaq -0x200(%rbp), %rcx
leaq -0x1e0(%rbp), %r8
leaq -0x1c0(%rbp), %r9
movq %r15, %rdi
movl $0x66, %esi
callq 0x8c10
movq %rax, %r15
leaq -0x190(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21b9e(%rip), %rsi     # 0x27122
leaq 0x21b9c(%rip), %rdx     # 0x27127
leaq -0x1a0(%rbp), %rdi
callq 0x7a4e
leaq -0x170(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2214e(%rip), %rdx     # 0x276f7
leaq -0x180(%rbp), %rdi
movq %rdx, %rsi
callq 0x7a4e
leaq -0x150(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2212d(%rip), %rdx     # 0x276f7
leaq -0x160(%rbp), %rdi
movq %rdx, %rsi
callq 0x7a4e
leaq -0x130(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21b3d(%rip), %rsi     # 0x27128
leaq 0x21b55(%rip), %rdx     # 0x27147
leaq -0x140(%rbp), %rdi
callq 0x7a4e
leaq -0x1a0(%rbp), %rdx
leaq -0x180(%rbp), %rcx
leaq -0x160(%rbp), %r8
leaq -0x140(%rbp), %r9
movq %r15, %rdi
movl $0x38, %esi
callq 0x8c10
movq -0x140(%rbp), %rdi
leaq -0x130(%rbp), %rax
cmpq %rax, %rdi
je 0x563f
callq 0x4350
movq -0x160(%rbp), %rdi
leaq -0x150(%rbp), %rax
cmpq %rax, %rdi
je 0x5657
callq 0x4350
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
cmpq %rax, %rdi
je 0x566f
callq 0x4350
movq -0x1a0(%rbp), %rdi
leaq -0x190(%rbp), %rax
cmpq %rax, %rdi
je 0x5687
callq 0x4350
movq -0x1c0(%rbp), %rdi
leaq -0x1b0(%rbp), %rax
cmpq %rax, %rdi
je 0x569f
callq 0x4350
movq -0x1e0(%rbp), %rdi
leaq -0x1d0(%rbp), %rax
cmpq %rax, %rdi
je 0x56b7
callq 0x4350
movq -0x200(%rbp), %rdi
leaq -0x1f0(%rbp), %rax
cmpq %rax, %rdi
je 0x56cf
callq 0x4350
movq -0x220(%rbp), %rdi
leaq -0x210(%rbp), %rax
cmpq %rax, %rdi
je 0x56e7
callq 0x4350
movq -0x240(%rbp), %rdi
leaq -0x230(%rbp), %rax
cmpq %rax, %rdi
je 0x56ff
callq 0x4350
movq -0x260(%rbp), %rdi
leaq -0x250(%rbp), %rax
cmpq %rax, %rdi
je 0x5717
callq 0x4350
movq -0x280(%rbp), %rdi
leaq -0x270(%rbp), %rax
cmpq %rax, %rdi
je 0x572f
callq 0x4350
movq -0x2a0(%rbp), %rdi
leaq -0x290(%rbp), %rax
cmpq %rax, %rdi
je 0x5747
callq 0x4350
movq -0x2c0(%rbp), %rdi
leaq -0x2b0(%rbp), %rax
cmpq %rax, %rdi
je 0x575f
callq 0x4350
movq -0x2e0(%rbp), %rdi
leaq -0x2d0(%rbp), %rax
cmpq %rax, %rdi
je 0x5777
callq 0x4350
movq -0x300(%rbp), %rdi
leaq -0x2f0(%rbp), %rax
cmpq %rax, %rdi
je 0x578f
callq 0x4350
movq -0x3f0(%rbp), %rdi
cmpq %r13, %rdi
je 0x57a0
callq 0x4350
movq -0x410(%rbp), %rdi
cmpq %r12, %rdi
je 0x57b1
callq 0x4350
leaq -0x4f8(%rbp), %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0x9638
movq -0x458(%rbp), %rax
subq -0x460(%rbp), %rax
cmpq $0x80, %rax
je 0x57f4
movq 0x2f7e8(%rip), %rax     # 0x34fc8
movq (%rax), %rsi
leaq -0x4f8(%rbp), %rdi
movl $0x1, %edx
callq 0x9bda
leaq -0x3c0(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x218cb(%rip), %rsi     # 0x270d1
leaq 0x218ce(%rip), %rdx     # 0x270db
leaq -0x3d0(%rbp), %rdi
callq 0x7a4e
leaq -0x4f8(%rbp), %rdi
leaq -0x3d0(%rbp), %rsi
callq 0x96f2
movq %rax, %rdi
callq 0x8ab4
movl %eax, %ebx
movq -0x3d0(%rbp), %rdi
cmpq %r14, %rdi
je 0x5847
callq 0x4350
leaq -0x3a0(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x21883(%rip), %rsi     # 0x270dc
leaq 0x2188c(%rip), %rdx     # 0x270ec
leaq -0x3b0(%rbp), %rdi
callq 0x7a4e
leaq -0x4f8(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x96f2
movb 0x4a(%rax), %r15b
movq -0x3b0(%rbp), %rdi
cmpq %r14, %rdi
je 0x5894
callq 0x4350
leaq -0x380(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x2187b(%rip), %rsi     # 0x27122
leaq 0x21879(%rip), %rdx     # 0x27127
leaq -0x390(%rbp), %rdi
callq 0x7a4e
leaq -0x4f8(%rbp), %rdi
leaq -0x390(%rbp), %rsi
callq 0x96f2
movb 0x4a(%rax), %r14b
movq -0x390(%rbp), %rdi
cmpq %r12, %rdi
je 0x58e2
callq 0x4350
movq -0x460(%rbp), %rax
leaq -0xf0(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x100(%rbp), %rdi
callq 0x79b0
movq -0x460(%rbp), %rax
leaq -0xd0(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0xe0(%rbp), %rdi
callq 0x79b0
movq -0x460(%rbp), %rax
leaq -0xb0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq -0xc0(%rbp), %rdi
callq 0x79b0
movq -0x460(%rbp), %rax
leaq -0x110(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq 0x60(%rax), %rsi
movq 0x68(%rax), %rdx
addq %rsi, %rdx
leaq -0x120(%rbp), %rdi
callq 0x79b0
movq 0x2f65b(%rip), %rdi     # 0x34fe8
movq (%rdi), %rax
movq -0x18(%rax), %rax
orl $0x1, 0x18(%rdi,%rax)
leaq 0x217a8(%rip), %rsi     # 0x27148
movl $0x16, %edx
callq 0x4400
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rdx
movq 0x2f629(%rip), %rdi     # 0x34fe8
callq 0x4400
movq %rax, %rdi
callq 0x4180
movq 0x2f615(%rip), %rdi     # 0x34fe8
leaq 0x21785(%rip), %rsi     # 0x2715f
movl $0x20, %edx
callq 0x4400
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
movq 0x2f5ef(%rip), %rdi     # 0x34fe8
callq 0x4400
movq %rax, %rdi
callq 0x4180
movq 0x2f5db(%rip), %rdi     # 0x34fe8
leaq 0x2176c(%rip), %rsi     # 0x27180
movl $0x12, %edx
callq 0x4400
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
movq 0x2f5b5(%rip), %rdi     # 0x34fe8
callq 0x4400
movq %rax, %rdi
callq 0x4180
movq 0x2f5a1(%rip), %rdi     # 0x34fe8
leaq 0x21745(%rip), %rsi     # 0x27193
movl $0x19, %edx
callq 0x4400
movq -0x120(%rbp), %rsi
movq -0x118(%rbp), %rdx
movq 0x2f57b(%rip), %rdi     # 0x34fe8
callq 0x4400
movq %rax, %rdi
callq 0x4180
movq 0x2f567(%rip), %rdi     # 0x34fe8
leaq 0x21725(%rip), %rsi     # 0x271ad
movl $0x22, %edx
callq 0x4400
movzbl %r15b, %esi
movq 0x2f54b(%rip), %rdi     # 0x34fe8
movl %esi, -0x94(%rbp)
callq 0x45d0
movq %rax, %rdi
callq 0x4180
movq 0x2f531(%rip), %rdi     # 0x34fe8
leaq 0x21712(%rip), %rsi     # 0x271d0
movl $0x22, %edx
callq 0x4400
movq 0x2f519(%rip), %rdi     # 0x34fe8
movl %ebx, %esi
callq 0x4620
movq %rax, %rdi
callq 0x4180
movq 0x2f503(%rip), %rdi     # 0x34fe8
leaq 0x21707(%rip), %rsi     # 0x271f3
movl $0x1c, %edx
callq 0x4400
movzbl %r14b, %r15d
movq 0x2f4e7(%rip), %rdi     # 0x34fe8
movl %r15d, %esi
callq 0x45d0
movq %rax, %rdi
callq 0x4180
leaq -0x520(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq -0x58(%rbp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq -0x438(%rbp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0x2f486(%rip), %rdi     # 0x34fe8
leaq 0x216a7(%rip), %rsi     # 0x27210
movl $0x1b, %edx
callq 0x4400
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
movq 0x2f460(%rip), %rdi     # 0x34fe8
callq 0x4400
movq %rax, %rdi
callq 0x4180
leaq -0x360(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x370(%rbp), %rdi
callq 0x79b0
leaq -0x370(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x98(%rbp), %rdx
movl %r15d, %ecx
callq 0x1e1c2
movl %eax, -0x30(%rbp)
movq -0x370(%rbp), %rdi
cmpq %r14, %rdi
je 0x5beb
callq 0x4350
cmpl $0x0, -0x30(%rbp)
jns 0x5c1a
movq 0x2f3f0(%rip), %rdi     # 0x34fe8
leaq 0x2162d(%rip), %rsi     # 0x2722c
movl $0x2f, %edx
callq 0x4400
movq 0x2f3d8(%rip), %rdi     # 0x34fe8
callq 0x4180
jmp 0x5d7b
movq 0x2f3c7(%rip), %rdi     # 0x34fe8
leaq 0x21ace(%rip), %rsi     # 0x276f6
movl $0x1, %edx
callq 0x4400
movq 0x2f3af(%rip), %rdi     # 0x34fe8
leaq 0x21677(%rip), %rsi     # 0x272b7
movl $0x6, %edx
callq 0x4400
movq -0x38(%rbp), %rsi
movq 0x2f393(%rip), %rdi     # 0x34fe8
callq 0x4250
movq %rax, %rdi
callq 0x4180
movq 0x2f37f(%rip), %rdi     # 0x34fe8
leaq 0x21a86(%rip), %rsi     # 0x276f6
movl $0x1, %edx
callq 0x4400
movq 0x2f367(%rip), %rdi     # 0x34fe8
leaq 0x215d4(%rip), %rsi     # 0x2725c
movl $0x17, %edx
callq 0x4400
movl -0x98(%rbp), %esi
movq 0x2f349(%rip), %rdi     # 0x34fe8
callq 0x4620
movq %rax, %rdi
callq 0x4180
leaq -0x60(%rbp), %rdi
leaq -0x528(%rbp), %rsi
movl %r15d, %edx
callq 0x6575
movq 0x2f322(%rip), %rdi     # 0x34fe8
leaq 0x215a7(%rip), %rsi     # 0x27274
movl $0x12, %edx
callq 0x4400
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rdx
movq 0x2f2fc(%rip), %rdi     # 0x34fe8
callq 0x4400
movq %rax, %rdi
callq 0x4180
leaq -0x340(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x350(%rbp), %rdi
callq 0x79b0
leaq -0x350(%rbp), %rdi
leaq -0x440(%rbp), %rsi
leaq -0x9c(%rbp), %rdx
movl %r15d, %ecx
callq 0x1e1c2
movl %eax, %r15d
movq -0x350(%rbp), %rdi
cmpq %r14, %rdi
je 0x5d52
callq 0x4350
testl %r15d, %r15d
jns 0x5d85
movq 0x2f28a(%rip), %rdi     # 0x34fe8
leaq 0x21522(%rip), %rsi     # 0x27287
movl $0x26, %edx
callq 0x4400
movq 0x2f272(%rip), %rdi     # 0x34fe8
callq 0x4180
movl $0x1, %edi
callq 0x4420
movq 0x2f25c(%rip), %rdi     # 0x34fe8
leaq 0x21963(%rip), %rsi     # 0x276f6
movl $0x1, %edx
callq 0x4400
movq 0x2f244(%rip), %rdi     # 0x34fe8
leaq 0x21503(%rip), %rsi     # 0x272ae
movl $0xf, %edx
callq 0x4400
movq -0x418(%rbp), %rsi
movq 0x2f225(%rip), %rdi     # 0x34fe8
callq 0x4250
movq %rax, %rdi
callq 0x4180
movq 0x2f211(%rip), %rdi     # 0x34fe8
leaq 0x21918(%rip), %rsi     # 0x276f6
movl $0x1, %edx
callq 0x4400
movq 0x2f1f9(%rip), %rdi     # 0x34fe8
leaq 0x214c8(%rip), %rsi     # 0x272be
movl $0x15, %edx
callq 0x4400
movl -0x9c(%rbp), %esi
movq 0x2f1db(%rip), %rdi     # 0x34fe8
callq 0x4620
movq %rax, %rdi
callq 0x4180
movq 0x2f1c7(%rip), %rdi     # 0x34fe8
leaq 0x214ac(%rip), %rsi     # 0x272d4
movl $0xd, %edx
callq 0x4400
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
movq 0x2f1a1(%rip), %rdi     # 0x34fe8
movq %rdi, %r14
callq 0x4400
movq %rax, %rdi
callq 0x4180
leaq 0x2f54a(%rip), %rsi     # 0x353a8
leaq -0x620(%rbp), %rdi
callq 0x6804
leaq -0x620(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x1440e
leaq 0x2f524(%rip), %rsi     # 0x353a8
leaq -0x60(%rbp), %rdi
callq 0x7aec
leaq -0x58(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5eb3
leaq 0x2f50b(%rip), %rsi     # 0x353a8
leaq -0x60(%rbp), %rdi
callq 0x69b4
movabsq $-0x4019d1bd0105c611, %rcx # imm = 0xBFE62E42FEFA39EF
movq %rcx, (%rax)
leaq -0x60(%rbp), %rdi
leaq -0x620(%rbp), %rsi
callq 0x512e
movq (%r14), %rax
movq -0x18(%rax), %rax
movq $0xf, 0x8(%r14,%rax)
leaq -0x328(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq -0x88(%rbp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
xorl %r15d, %r15d
movl $0x12, %edx
movq %r14, %rdi
leaq 0x213c9(%rip), %rsi     # 0x272e2
callq 0x4400
movq %r14, %rdi
movl %r15d, %esi
callq 0x4620
movq %rax, %rdi
callq 0x4180
leaq -0x60(%rbp), %rdi
leaq -0x620(%rbp), %rsi
callq 0x1a380
leaq -0x440(%rbp), %rdi
leaq -0x620(%rbp), %rsi
leaq -0x330(%rbp), %rdx
leaq -0x90(%rbp), %rcx
movl $0x1, %r8d
callq 0x220ea
movsd %xmm0, -0x30(%rbp)
movq -0x50(%rbp), %rcx
movq -0x80(%rbp), %rax
testq %rcx, %rcx
je 0x5fc0
testq %rax, %rax
je 0x6005
movq %rax, -0x50(%rbp)
movq %rcx, -0x80(%rbp)
movups -0x48(%rbp), %xmm0
movups -0x78(%rbp), %xmm1
movups %xmm1, -0x48(%rbp)
movups %xmm0, -0x78(%rbp)
leaq -0x58(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x80(%rbp), %rax
leaq -0x88(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movq -0x68(%rbp), %rcx
movq %rcx, -0x38(%rbp)
jmp 0x5fff
testq %rax, %rax
je 0x6043
movl -0x88(%rbp), %ecx
movl %ecx, -0x58(%rbp)
movq %rax, -0x50(%rbp)
movups -0x78(%rbp), %xmm0
movups %xmm0, -0x48(%rbp)
leaq -0x58(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x68(%rbp), %rax
movq %rax, -0x38(%rbp)
xorl %eax, %eax
movq %rax, -0x80(%rbp)
leaq -0x88(%rbp), %rcx
movq %rcx, -0x78(%rbp)
movq %rcx, -0x70(%rbp)
movq %rax, -0x68(%rbp)
jmp 0x6043
movl -0x58(%rbp), %eax
movl %eax, -0x88(%rbp)
movq %rcx, -0x80(%rbp)
movups -0x48(%rbp), %xmm0
movups %xmm0, -0x78(%rbp)
leaq -0x88(%rbp), %rax
movq %rax, 0x8(%rcx)
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x50(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %rax, -0x40(%rbp)
movq %rcx, -0x38(%rbp)
leaq -0x60(%rbp), %rdi
movsd 0x20fb9(%rip), %xmm0    # 0x27008
callq 0x1ecf6
leaq -0x60(%rbp), %rdi
leaq -0x620(%rbp), %rsi
callq 0x512e
testl %r15d, %r15d
je 0x60ba
movl $0xd, %edx
movq %r14, %rdi
leaq 0x2127d(%rip), %rsi     # 0x272f5
callq 0x4400
movq %r14, %rdi
movsd -0x30(%rbp), %xmm0
callq 0x4590
movq %rax, %rdi
callq 0x4180
movl $0x12, %edx
movq %r14, %rdi
leaq 0x21262(%rip), %rsi     # 0x27303
callq 0x4400
movq -0x38(%rbp), %rsi
movq %r14, %rdi
callq 0x4250
movq %rax, %rdi
callq 0x4180
movl %r15d, %eax
incl %eax
movl %eax, %r15d
cmpl $0x3, %eax
jne 0x5f0a
leaq -0x330(%rbp), %rdi
movsd 0x20f2e(%rip), %xmm0    # 0x27008
callq 0x222b4
xorl %r14d, %r14d
testl %ebx, %ebx
cmovgl %ebx, %r14d
negl %r14d
movl $0x1, %ebx
movq 0x2eef1(%rip), %r15     # 0x34fe8
leal (%r14,%rbx), %eax
cmpl $0x1, %eax
je 0x61e2
movl $0x11, %edx
movq %r15, %rdi
leaq 0x21203(%rip), %rsi     # 0x27316
callq 0x4400
movq %r15, %rdi
movl %ebx, %esi
callq 0x4620
movq %rax, %rdi
callq 0x4180
leaq -0x440(%rbp), %rdi
leaq -0x620(%rbp), %rsi
leaq -0x330(%rbp), %rdx
movl -0x94(%rbp), %ecx
movl $0x1, %r8d
callq 0x21fe0
movsd %xmm0, -0x30(%rbp)
movl $0xd, %edx
movq %r15, %rdi
leaq 0x21191(%rip), %rsi     # 0x272f5
callq 0x4400
movq %r15, %rdi
movsd -0x30(%rbp), %xmm0
callq 0x4590
movq %rax, %rdi
callq 0x4180
movl $0x18, %edx
movq %r15, %rdi
leaq 0x2119b(%rip), %rsi     # 0x27328
callq 0x4400
leaq -0x330(%rbp), %rdi
callq 0x23a0a
movq %r15, %rdi
movl %eax, %esi
callq 0x4620
movq %rax, %rdi
callq 0x4180
movl $0x12, %edx
movq %r15, %rdi
leaq 0x21144(%rip), %rsi     # 0x27303
callq 0x4400
movq -0x308(%rbp), %rsi
movq %r15, %rdi
callq 0x4250
incl %ebx
movq %rax, %rdi
callq 0x4180
jmp 0x60f7
leaq -0x330(%rbp), %rdi
leaq -0x120(%rbp), %rsi
xorl %edx, %edx
movl $0x6, %ecx
callq 0x22ee6
xorl %edi, %edi
callq 0x4420
jmp 0x620b
jmp 0x620b
jmp 0x620b
jmp 0x620b
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x76bc
leaq -0x330(%rbp), %rdi
callq 0x7750
jmp 0x622d
jmp 0x622a
movq %rax, %rbx
leaq -0x620(%rbp), %rdi
callq 0x13258
jmp 0x6264
jmp 0x6261
jmp 0x6261
movq %rax, %rbx
movq -0x350(%rbp), %rdi
jmp 0x6255
movq %rax, %rbx
movq -0x370(%rbp), %rdi
cmpq %r14, %rdi
je 0x6264
callq 0x4350
jmp 0x6264
movq %rax, %rbx
leaq -0x440(%rbp), %rdi
callq 0x76bc
leaq -0x60(%rbp), %rdi
callq 0x76bc
leaq -0x528(%rbp), %rdi
callq 0x77de
jmp 0x628a
movq %rax, %rbx
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x62a7
callq 0x4350
jmp 0x62a7
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x62c4
callq 0x4350
jmp 0x62c4
movq %rax, %rbx
movq -0xe0(%rbp), %rdi
cmpq %r12, %rdi
je 0x62da
callq 0x4350
jmp 0x62da
movq %rax, %rbx
movq -0x100(%rbp), %rdi
cmpq %r13, %rdi
jne 0x651b
jmp 0x6525
jmp 0x6522
movq %rax, %rbx
movq -0x390(%rbp), %rdi
jmp 0x6516
jmp 0x6522
movq %rax, %rbx
movq -0x3b0(%rbp), %rdi
jmp 0x6323
jmp 0x6522
movq %rax, %rbx
movq -0x3d0(%rbp), %rdi
cmpq %r14, %rdi
jne 0x651b
jmp 0x6525
jmp 0x6522
jmp 0x6522
movq %rax, %rbx
movq -0x140(%rbp), %rdi
leaq -0x130(%rbp), %rax
cmpq %rax, %rdi
je 0x635b
callq 0x4350
jmp 0x635b
movq %rax, %rbx
movq -0x160(%rbp), %rdi
leaq -0x150(%rbp), %rax
cmpq %rax, %rdi
je 0x6378
callq 0x4350
jmp 0x6378
movq %rax, %rbx
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
cmpq %rax, %rdi
je 0x6395
callq 0x4350
jmp 0x6395
movq %rax, %rbx
movq -0x1a0(%rbp), %rdi
leaq -0x190(%rbp), %rax
cmpq %rax, %rdi
je 0x63b4
callq 0x4350
jmp 0x63b4
jmp 0x63b1
movq %rax, %rbx
movq -0x1c0(%rbp), %rdi
leaq -0x1b0(%rbp), %rax
cmpq %rax, %rdi
je 0x63d1
callq 0x4350
jmp 0x63d1
movq %rax, %rbx
movq -0x1e0(%rbp), %rdi
leaq -0x1d0(%rbp), %rax
cmpq %rax, %rdi
je 0x63ee
callq 0x4350
jmp 0x63ee
movq %rax, %rbx
movq -0x200(%rbp), %rdi
leaq -0x1f0(%rbp), %rax
cmpq %rax, %rdi
je 0x640b
callq 0x4350
jmp 0x640b
movq %rax, %rbx
movq -0x220(%rbp), %rdi
leaq -0x210(%rbp), %rax
cmpq %rax, %rdi
je 0x642a
callq 0x4350
jmp 0x642a
jmp 0x6427
movq %rax, %rbx
movq -0x240(%rbp), %rdi
leaq -0x230(%rbp), %rax
cmpq %rax, %rdi
je 0x6447
callq 0x4350
jmp 0x6447
movq %rax, %rbx
movq -0x260(%rbp), %rdi
leaq -0x250(%rbp), %rax
cmpq %rax, %rdi
je 0x6464
callq 0x4350
jmp 0x6464
movq %rax, %rbx
movq -0x280(%rbp), %rdi
leaq -0x270(%rbp), %rax
cmpq %rax, %rdi
je 0x6481
callq 0x4350
jmp 0x6481
movq %rax, %rbx
movq -0x2a0(%rbp), %rdi
leaq -0x290(%rbp), %rax
cmpq %rax, %rdi
je 0x64a0
callq 0x4350
jmp 0x64a0
jmp 0x649d
movq %rax, %rbx
movq -0x2c0(%rbp), %rdi
leaq -0x2b0(%rbp), %rax
cmpq %rax, %rdi
je 0x64bd
callq 0x4350
jmp 0x64bd
movq %rax, %rbx
movq -0x2e0(%rbp), %rdi
leaq -0x2d0(%rbp), %rax
cmpq %rax, %rdi
je 0x64da
callq 0x4350
jmp 0x64da
movq %rax, %rbx
movq -0x300(%rbp), %rdi
leaq -0x2f0(%rbp), %rax
cmpq %rax, %rdi
je 0x64f7
callq 0x4350
jmp 0x64f7
movq %rax, %rbx
movq -0x3f0(%rbp), %rdi
cmpq %r13, %rdi
je 0x650f
callq 0x4350
jmp 0x650f
jmp 0x650c
movq %rax, %rbx
movq -0x410(%rbp), %rdi
cmpq %r12, %rdi
je 0x6525
callq 0x4350
jmp 0x6525
movq %rax, %rbx
leaq -0x460(%rbp), %rdi
callq 0x67ac
leaq -0x490(%rbp), %rdi
callq 0x787c
leaq -0x4c0(%rbp), %rdi
callq 0x78e6
leaq -0x4d8(%rbp), %r14
movq %r14, %rdi
callq 0x7848
movq -0x20(%r14), %rdi
leaq -0x4e8(%rbp), %rax
cmpq %rax, %rdi
je 0x656d
callq 0x4350
movq %rbx, %rdi
callq 0x4650