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

    flt_type one_char_min_lp = -25.0;

    conf::Config config;
    config("usage: iterate-sents [OPTION...] CORPUS IN_VOCAB OUT_VOCAB\n")
      ('h', "help", "", "", "display help")
      ('i', "iterations=INT", "arg", "5", "Number of iterations")
      ('f', "forward-backward", "", "", "Use Forward-backward segmentation instead of Viterbi")
      ('t', "temp-vocabs", "", "", "Write out vocabulary after each iteration")
      ('8', "utf-8", "", "", "Utf-8 character encoding in use");
    config.default_parse(argc, argv);
    if (config.arguments.size() != 3) config.print_help(stderr, 1);

    int num_iterations = config["iterations"].get_int();
    bool enable_forward_backward = config["forward-backward"].specified;
    bool write_temp_vocabs = config["temp-vocabs"].specified;
    bool utf8_encoding = config["utf-8"].specified;
    string training_fname = config.arguments[0];
    string vocab_in_fname = config.arguments[1];
    string vocab_out_fname = config.arguments[2];

    cerr << std::boolalpha;
    cerr << "parameters, training data: " << training_fname << endl;
    cerr << "parameters, initial vocabulary: " << vocab_in_fname << endl;
    cerr << "parameters, final vocabulary: " << vocab_out_fname << endl;
    cerr << "parameters, use forward-backward: " << enable_forward_backward << endl;
    cerr << "parameters, number of iterations: " << num_iterations << endl;
    cerr << "parameters, write vocabulary after each iteration: " << write_temp_vocabs << endl;
    cerr << "parameters, utf-8 encoding: " << utf8_encoding << endl;

    int maxlen;
    set<string> all_chars;
    map<string, flt_type> vocab;
    map<string, flt_type> freqs;
    vector<string> sents;

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

    Unigrams ug;
    if (enable_forward_backward)
        ug.set_segmentation_method(forward_backward);
    else
        ug.set_segmentation_method(viterbi);
    ug.set_utf8(utf8_encoding);

    cerr << "Reading training corpus " << training_fname << endl;
    Unigrams::read_sents(training_fname, sents);

    cerr << "iterating.." << endl;
    for (int i=0; i<num_iterations; i++) {
        flt_type cost = ug.resegment_sents(sents, vocab, freqs);
        cerr << "likelihood: " << cost << endl;
        vocab = freqs;
        Unigrams::freqs_to_logprobs(vocab);
        assert_factors(vocab, all_chars, one_char_min_lp);

        if (write_temp_vocabs) {
            ostringstream tempfname;
            tempfname << vocab_out_fname << ".iter" << i+1;
            Unigrams::write_vocab(tempfname.str(), vocab);
        }
    }

    Unigrams::write_vocab(vocab_out_fname, vocab);

    exit(EXIT_SUCCESS);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x6f8, %rsp            # imm = 0x6F8
movq %rsi, %rbx
movl %edi, %r14d
leaq -0x548(%rbp), %rdi
callq 0x7e4e
leaq -0x480(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x21efb(%rip), %rsi     # 0x27020
leaq 0x21f2f(%rip), %rdx     # 0x2705b
leaq -0x490(%rbp), %rdi
callq 0x7380
leaq -0x548(%rbp), %rdi
leaq -0x490(%rbp), %rsi
callq 0x7eb4
movq %rax, %r15
leaq -0x460(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x21f04(%rip), %rsi     # 0x27064
leaq 0x21f01(%rip), %rdx     # 0x27068
leaq -0x470(%rbp), %rdi
callq 0x7380
leaq -0x338(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x224e2(%rip), %rdx     # 0x27667
leaq -0x348(%rbp), %rdi
movq %rdx, %rsi
callq 0x7380
leaq -0x318(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x224c1(%rip), %rdx     # 0x27667
leaq -0x328(%rbp), %rdi
movq %rdx, %rsi
callq 0x7380
leaq -0x2f8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21e95(%rip), %rsi     # 0x2705c
leaq 0x21e9a(%rip), %rdx     # 0x27068
leaq -0x308(%rbp), %rdi
callq 0x7380
leaq -0x470(%rbp), %rdx
leaq -0x348(%rbp), %rcx
leaq -0x328(%rbp), %r8
leaq -0x308(%rbp), %r9
movq %r15, %rdi
movl $0x68, %esi
callq 0x7ecc
movq %rax, %r15
leaq -0x2d8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21e51(%rip), %rsi     # 0x27069
leaq 0x21e58(%rip), %rdx     # 0x27077
leaq -0x2e8(%rbp), %rdi
callq 0x7380
leaq -0x2b8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21e3b(%rip), %rsi     # 0x27078
leaq 0x21e37(%rip), %rdx     # 0x2707b
leaq -0x2c8(%rbp), %rdi
callq 0x7380
leaq -0x298(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21e1a(%rip), %rsi     # 0x2707c
leaq 0x21e14(%rip), %rdx     # 0x2707d
leaq -0x2a8(%rbp), %rdi
callq 0x7380
leaq -0x278(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21df7(%rip), %rsi     # 0x2707e
leaq 0x21e04(%rip), %rdx     # 0x27092
leaq -0x288(%rbp), %rdi
callq 0x7380
leaq -0x2e8(%rbp), %rdx
leaq -0x2c8(%rbp), %rcx
leaq -0x2a8(%rbp), %r8
leaq -0x288(%rbp), %r9
movq %r15, %rdi
movl $0x69, %esi
callq 0x7ecc
movq %rax, %r15
leaq -0x258(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21dbb(%rip), %rsi     # 0x27093
leaq 0x21dc4(%rip), %rdx     # 0x270a3
leaq -0x268(%rbp), %rdi
callq 0x7380
leaq -0x238(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2236a(%rip), %rdx     # 0x27667
leaq -0x248(%rbp), %rdi
movq %rdx, %rsi
callq 0x7380
leaq -0x218(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x22349(%rip), %rdx     # 0x27667
leaq -0x228(%rbp), %rdi
movq %rdx, %rsi
callq 0x7380
leaq -0x1f8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21d65(%rip), %rsi     # 0x270a4
leaq 0x21d92(%rip), %rdx     # 0x270d8
leaq -0x208(%rbp), %rdi
callq 0x7380
leaq -0x268(%rbp), %rdx
leaq -0x248(%rbp), %rcx
leaq -0x228(%rbp), %r8
leaq -0x208(%rbp), %r9
movq %r15, %rdi
movl $0x66, %esi
callq 0x7ecc
movq %rax, %r15
leaq -0x1d8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21d49(%rip), %rsi     # 0x270d9
leaq 0x21d4d(%rip), %rdx     # 0x270e4
leaq -0x1e8(%rbp), %rdi
callq 0x7380
leaq -0x1b8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x222b2(%rip), %rdx     # 0x27667
leaq -0x1c8(%rbp), %rdi
movq %rdx, %rsi
callq 0x7380
leaq -0x198(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x22291(%rip), %rdx     # 0x27667
leaq -0x1a8(%rbp), %rdi
movq %rdx, %rsi
callq 0x7380
leaq -0x178(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21cee(%rip), %rsi     # 0x270e5
leaq 0x21d10(%rip), %rdx     # 0x2710e
leaq -0x188(%rbp), %rdi
callq 0x7380
leaq -0x1e8(%rbp), %rdx
leaq -0x1c8(%rbp), %rcx
leaq -0x1a8(%rbp), %r8
leaq -0x188(%rbp), %r9
movq %r15, %rdi
movl $0x74, %esi
callq 0x7ecc
movq %rax, %r15
leaq -0x158(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21cc7(%rip), %rsi     # 0x2710f
leaq 0x21cc5(%rip), %rdx     # 0x27114
leaq -0x168(%rbp), %rdi
callq 0x7380
leaq -0x138(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x221fa(%rip), %rdx     # 0x27667
leaq -0x148(%rbp), %rdi
movq %rdx, %rsi
callq 0x7380
leaq -0x118(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x221d9(%rip), %rdx     # 0x27667
leaq -0x128(%rbp), %rdi
movq %rdx, %rsi
callq 0x7380
leaq -0xf8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21c66(%rip), %rsi     # 0x27115
leaq 0x21c7e(%rip), %rdx     # 0x27134
leaq -0x108(%rbp), %rdi
callq 0x7380
leaq -0x168(%rbp), %rdx
leaq -0x148(%rbp), %rcx
leaq -0x128(%rbp), %r8
leaq -0x108(%rbp), %r9
movq %r15, %rdi
movl $0x38, %esi
callq 0x7ecc
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x5503
callq 0x4360
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x551b
callq 0x4360
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x5533
callq 0x4360
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x554b
callq 0x4360
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x5563
callq 0x4360
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x557b
callq 0x4360
movq -0x1c8(%rbp), %rdi
leaq -0x1b8(%rbp), %rax
cmpq %rax, %rdi
je 0x5593
callq 0x4360
movq -0x1e8(%rbp), %rdi
leaq -0x1d8(%rbp), %rax
cmpq %rax, %rdi
je 0x55ab
callq 0x4360
movq -0x208(%rbp), %rdi
leaq -0x1f8(%rbp), %rax
cmpq %rax, %rdi
je 0x55c3
callq 0x4360
movq -0x228(%rbp), %rdi
leaq -0x218(%rbp), %rax
cmpq %rax, %rdi
je 0x55db
callq 0x4360
movq -0x248(%rbp), %rdi
leaq -0x238(%rbp), %rax
cmpq %rax, %rdi
je 0x55f3
callq 0x4360
movq -0x268(%rbp), %rdi
leaq -0x258(%rbp), %rax
cmpq %rax, %rdi
je 0x560b
callq 0x4360
movq -0x288(%rbp), %rdi
leaq -0x278(%rbp), %rax
cmpq %rax, %rdi
je 0x5623
callq 0x4360
movq -0x2a8(%rbp), %rdi
leaq -0x298(%rbp), %rax
cmpq %rax, %rdi
je 0x563b
callq 0x4360
movq -0x2c8(%rbp), %rdi
leaq -0x2b8(%rbp), %rax
cmpq %rax, %rdi
je 0x5653
callq 0x4360
movq -0x2e8(%rbp), %rdi
leaq -0x2d8(%rbp), %rax
cmpq %rax, %rdi
je 0x566b
callq 0x4360
movq -0x308(%rbp), %rdi
leaq -0x2f8(%rbp), %rax
cmpq %rax, %rdi
je 0x5683
callq 0x4360
movq -0x328(%rbp), %rdi
leaq -0x318(%rbp), %rax
cmpq %rax, %rdi
je 0x569b
callq 0x4360
movq -0x348(%rbp), %rdi
leaq -0x338(%rbp), %rax
cmpq %rax, %rdi
je 0x56b3
callq 0x4360
movq -0x470(%rbp), %rdi
cmpq %r13, %rdi
je 0x56c4
callq 0x4360
movq -0x490(%rbp), %rdi
cmpq %r12, %rdi
je 0x56d5
callq 0x4360
leaq -0x548(%rbp), %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0x88f4
movq -0x4a8(%rbp), %rax
subq -0x4b0(%rbp), %rax
cmpq $0x60, %rax
je 0x5716
movq 0x2f8c6(%rip), %rax     # 0x34fc8
movq (%rax), %rsi
leaq -0x548(%rbp), %rdi
movl $0x1, %edx
callq 0x8e96
leaq -0x440(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x21960(%rip), %rsi     # 0x27088
leaq 0x21963(%rip), %rdx     # 0x27092
leaq -0x450(%rbp), %rdi
callq 0x7380
leaq -0x548(%rbp), %rdi
leaq -0x450(%rbp), %rsi
callq 0x89ae
movq %rax, %rdi
callq 0x7d70
movl %eax, %ebx
movq -0x450(%rbp), %rdi
cmpq %r14, %rdi
je 0x5769
callq 0x4360
leaq -0x420(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x21918(%rip), %rsi     # 0x27093
leaq 0x21921(%rip), %rdx     # 0x270a3
leaq -0x430(%rbp), %rdi
callq 0x7380
leaq -0x548(%rbp), %rdi
leaq -0x430(%rbp), %rsi
callq 0x89ae
movb 0x4a(%rax), %r12b
movq -0x430(%rbp), %rdi
cmpq %r14, %rdi
je 0x57b6
callq 0x4360
leaq -0x400(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x21911(%rip), %rsi     # 0x270d9
leaq 0x21915(%rip), %rdx     # 0x270e4
leaq -0x410(%rbp), %rdi
callq 0x7380
leaq -0x548(%rbp), %rdi
leaq -0x410(%rbp), %rsi
callq 0x89ae
movb 0x4a(%rax), %r13b
movq -0x410(%rbp), %rdi
cmpq %r14, %rdi
je 0x5803
callq 0x4360
leaq -0x3e0(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x218fa(%rip), %rsi     # 0x2710f
leaq 0x218f8(%rip), %rdx     # 0x27114
leaq -0x3f0(%rbp), %rdi
callq 0x7380
leaq -0x548(%rbp), %rdi
leaq -0x3f0(%rbp), %rsi
callq 0x89ae
movb 0x4a(%rax), %r15b
movq -0x3f0(%rbp), %rdi
cmpq %r14, %rdi
je 0x5850
callq 0x4360
movq -0x4b0(%rbp), %rax
leaq -0x88(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x98(%rbp), %rdi
callq 0x72e2
movq -0x4b0(%rbp), %rax
leaq -0x68(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x78(%rbp), %rdi
callq 0x72e2
movq -0x4b0(%rbp), %rax
leaq -0x48(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq -0x58(%rbp), %rdi
callq 0x72e2
movq 0x2f723(%rip), %rdi     # 0x34fe8
movq (%rdi), %rax
movq -0x18(%rax), %rax
orl $0x1, 0x18(%rdi,%rax)
leaq 0x2185d(%rip), %rsi     # 0x27135
movl $0x1b, %edx
callq 0x4410
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
movq 0x2f6f1(%rip), %rdi     # 0x34fe8
callq 0x4410
movq %rax, %rdi
callq 0x4180
movq 0x2f6dd(%rip), %rdi     # 0x34fe8
leaq 0x2183f(%rip), %rsi     # 0x27151
movl $0x20, %edx
callq 0x4410
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq 0x2f6bd(%rip), %rdi     # 0x34fe8
callq 0x4410
movq %rax, %rdi
callq 0x4180
movq 0x2f6a9(%rip), %rdi     # 0x34fe8
leaq 0x2182c(%rip), %rsi     # 0x27172
movl $0x1e, %edx
callq 0x4410
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq 0x2f689(%rip), %rdi     # 0x34fe8
callq 0x4410
movq %rax, %rdi
callq 0x4180
movq 0x2f675(%rip), %rdi     # 0x34fe8
leaq 0x21817(%rip), %rsi     # 0x27191
movl $0x22, %edx
callq 0x4410
movzbl %r12b, %esi
movq 0x2f659(%rip), %rdi     # 0x34fe8
callq 0x4600
movq %rax, %rdi
callq 0x4180
movq 0x2f645(%rip), %rdi     # 0x34fe8
leaq 0x2180a(%rip), %rsi     # 0x271b4
movl $0x22, %edx
callq 0x4410
movq 0x2f62d(%rip), %rdi     # 0x34fe8
movl %ebx, %esi
callq 0x4650
movq %rax, %rdi
callq 0x4180
movq 0x2f617(%rip), %rdi     # 0x34fe8
leaq 0x217ff(%rip), %rsi     # 0x271d7
movl $0x33, %edx
callq 0x4410
movzbl %r13b, %esi
movq 0x2f5fb(%rip), %rdi     # 0x34fe8
callq 0x4600
movq %rax, %rdi
callq 0x4180
movq 0x2f5e7(%rip), %rdi     # 0x34fe8
leaq 0x21803(%rip), %rsi     # 0x2720b
movl $0x1c, %edx
callq 0x4410
movzbl %r15b, %esi
movq 0x2f5cb(%rip), %rdi     # 0x34fe8
movl %esi, -0x30(%rbp)
callq 0x4600
movq %rax, %rdi
callq 0x4180
leaq -0x5a0(%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 -0xc0(%rbp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq -0x570(%rbp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq %rcx, -0x350(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x360(%rbp)
movq 0x2f556(%rip), %rdi     # 0x34fe8
leaq 0x2178f(%rip), %rsi     # 0x27228
movl $0x13, %edx
callq 0x4410
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq 0x2f536(%rip), %rdi     # 0x34fe8
callq 0x4410
movq %rax, %rdi
callq 0x4180
leaq -0xd8(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
addq %rsi, %rdx
leaq -0xe8(%rbp), %rdi
callq 0x72e2
leaq -0xe8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0x38(%rbp), %rdx
movl -0x30(%rbp), %ecx
callq 0x1e0b2
movl %eax, -0x34(%rbp)
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x5b16
callq 0x4360
cmpl $0x0, -0x34(%rbp)
jns 0x5b4a
movq 0x2f4c5(%rip), %rdi     # 0x34fe8
leaq 0x21712(%rip), %rsi     # 0x2723c
movl $0x27, %edx
callq 0x4410
movq 0x2f4ad(%rip), %rdi     # 0x34fe8
callq 0x4180
movl $0x1, %edi
callq 0x4430
movq 0x2f497(%rip), %rdi     # 0x34fe8
leaq 0x21b0e(%rip), %rsi     # 0x27666
movl $0x1, %edx
callq 0x4410
movq 0x2f47f(%rip), %rdi     # 0x34fe8
leaq 0x216f4(%rip), %rsi     # 0x27264
movl $0x6, %edx
callq 0x4410
movq -0xa0(%rbp), %rsi
movq 0x2f460(%rip), %rdi     # 0x34fe8
callq 0x4260
movq %rax, %rdi
callq 0x4180
movq 0x2f44c(%rip), %rdi     # 0x34fe8
leaq 0x21ac3(%rip), %rsi     # 0x27666
movl $0x1, %edx
callq 0x4410
movq 0x2f434(%rip), %rdi     # 0x34fe8
leaq 0x216b0(%rip), %rsi     # 0x2726b
movl $0x17, %edx
callq 0x4410
movl -0x38(%rbp), %esi
movq 0x2f419(%rip), %rdi     # 0x34fe8
callq 0x4650
movq %rax, %rdi
callq 0x4180
leaq -0xc8(%rbp), %rdi
leaq -0x5a8(%rbp), %rsi
movl -0x30(%rbp), %edx
callq 0x6264
testb %r12b, %r12b
je 0x5c00
leaq 0x127a5(%rip), %rax     # 0x183a3
jmp 0x5c07
leaq 0x121d8(%rip), %rax     # 0x17ddf
movq %rax, -0x370(%rbp)
movb %r15b, -0x368(%rbp)
movq 0x2f3cc(%rip), %rdi     # 0x34fe8
leaq 0x21660(%rip), %rsi     # 0x27283
movl $0x18, %edx
callq 0x4410
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
movq 0x2f3a6(%rip), %rdi     # 0x34fe8
callq 0x4410
movq %rax, %rdi
callq 0x4180
leaq -0x3c0(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
addq %rsi, %rdx
leaq -0x3d0(%rbp), %rdi
callq 0x72e2
leaq -0x3d0(%rbp), %rdi
leaq -0x360(%rbp), %rsi
callq 0x1e8d4
movq -0x3d0(%rbp), %rdi
cmpq %r15, %rdi
je 0x5c9b
callq 0x4360
movq 0x2f346(%rip), %rdi     # 0x34fe8
leaq 0x215f3(%rip), %rsi     # 0x2729c
movl $0xb, %edx
callq 0x4410
movq 0x2f32e(%rip), %rdi     # 0x34fe8
callq 0x4180
testl %ebx, %ebx
jle 0x5e20
leaq -0x3a0(%rbp), %r15
xorl %r12d, %r12d
leaq -0x370(%rbp), %rdi
leaq -0x360(%rbp), %rsi
leaq -0xc8(%rbp), %rdx
leaq -0x578(%rbp), %rcx
callq 0x1ed50
movsd %xmm0, -0x30(%rbp)
movl $0xc, %edx
movq 0x2f2e5(%rip), %rdi     # 0x34fe8
leaq 0x2159e(%rip), %rsi     # 0x272a8
callq 0x4410
movq 0x2f2d2(%rip), %rdi     # 0x34fe8
movsd -0x30(%rbp), %xmm0
callq 0x45c0
movq %rax, %rdi
callq 0x4180
leaq -0xc8(%rbp), %rdi
leaq -0x578(%rbp), %rsi
callq 0x68f2
leaq -0xc8(%rbp), %rdi
movsd 0x212be(%rip), %xmm0    # 0x27008
callq 0x1ebe6
leaq -0xc8(%rbp), %rdi
leaq -0x5a8(%rbp), %rsi
callq 0x644f
testb %r13b, %r13b
je 0x5e14
leaq -0x720(%rbp), %rdi
callq 0x44c0
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
leaq -0x720(%rbp), %rdi
callq 0x4410
movq %rax, -0x30(%rbp)
movl $0x5, %edx
movq -0x30(%rbp), %rdi
leaq 0x21516(%rip), %rsi     # 0x272b5
callq 0x4410
movl %r12d, %esi
incl %esi
movq -0x30(%rbp), %rdi
movl %esi, %r12d
callq 0x4650
leaq -0x3b0(%rbp), %rdi
leaq -0x718(%rbp), %rsi
callq 0x45a0
leaq -0x3b0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
xorl %edx, %edx
movl $0x6, %ecx
callq 0x1e512
movq -0x3b0(%rbp), %rdi
cmpq %r15, %rdi
je 0x5df3
callq 0x4360
leaq -0x720(%rbp), %rdi
movq 0x2f1b7(%rip), %rsi     # 0x34fb8
callq 0x41c0
leaq -0x6b0(%rbp), %rdi
callq 0x4110
jmp 0x5e17
incl %r12d
cmpl %ebx, %r12d
jne 0x5cd1
leaq -0x380(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
addq %rsi, %rdx
leaq -0x390(%rbp), %rdi
callq 0x72e2
leaq -0x390(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
xorl %edx, %edx
movl $0x6, %ecx
callq 0x1e512
leaq -0x390(%rbp), %rdi
callq 0x4738
xorl %edi, %edi
callq 0x4430
movq %rax, %rbx
movq -0x390(%rbp), %rdi
jmp 0x5ec5
jmp 0x5eeb
movq %rax, %rbx
movq -0x3b0(%rbp), %rdi
cmpq %r15, %rdi
je 0x5e96
callq 0x4360
jmp 0x5e96
movq %rax, %rbx
movq 0x2f11b(%rip), %rsi     # 0x34fb8
leaq -0x720(%rbp), %rdi
callq 0x41c0
leaq -0x6b0(%rbp), %rdi
callq 0x4110
jmp 0x5eee
jmp 0x5eeb
jmp 0x5eeb
movq %rax, %rbx
movq -0x3d0(%rbp), %rdi
cmpq %r15, %rdi
jne 0x5ee4
jmp 0x5eee
jmp 0x5eeb
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x5eee
callq 0x4360
jmp 0x5eee
movq %rax, %rbx
leaq -0x360(%rbp), %rdi
callq 0x64c0
leaq -0x578(%rbp), %rdi
callq 0x70f8
leaq -0xc8(%rbp), %rdi
callq 0x70f8
leaq -0x5a8(%rbp), %rdi
callq 0x7110
jmp 0x5f23
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5f3a
callq 0x4360
jmp 0x5f3a
movq %rax, %rbx
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x5f51
callq 0x4360
jmp 0x5f51
movq %rax, %rbx
movq -0x98(%rbp), %rdi
jmp 0x5f9c
jmp 0x6211
movq %rax, %rbx
movq -0x3f0(%rbp), %rdi
jmp 0x5f9c
jmp 0x6211
movq %rax, %rbx
movq -0x410(%rbp), %rdi
jmp 0x5f9c
jmp 0x6211
movq %rax, %rbx
movq -0x430(%rbp), %rdi
jmp 0x5f9c
jmp 0x6211
movq %rax, %rbx
movq -0x450(%rbp), %rdi
cmpq %r14, %rdi
jne 0x620a
jmp 0x6214
jmp 0x6211
jmp 0x6211
movq %rax, %rbx
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x5fd4
callq 0x4360
jmp 0x5fd4
movq %rax, %rbx
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x5ff1
callq 0x4360
jmp 0x5ff1
movq %rax, %rbx
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x600e
callq 0x4360
jmp 0x600e
movq %rax, %rbx
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x602d
callq 0x4360
jmp 0x602d
jmp 0x602a
movq %rax, %rbx
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x604a
callq 0x4360
jmp 0x604a
movq %rax, %rbx
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x6067
callq 0x4360
jmp 0x6067
movq %rax, %rbx
movq -0x1c8(%rbp), %rdi
leaq -0x1b8(%rbp), %rax
cmpq %rax, %rdi
je 0x6084
callq 0x4360
jmp 0x6084
movq %rax, %rbx
movq -0x1e8(%rbp), %rdi
leaq -0x1d8(%rbp), %rax
cmpq %rax, %rdi
je 0x60a3
callq 0x4360
jmp 0x60a3
jmp 0x60a0
movq %rax, %rbx
movq -0x208(%rbp), %rdi
leaq -0x1f8(%rbp), %rax
cmpq %rax, %rdi
je 0x60c0
callq 0x4360
jmp 0x60c0
movq %rax, %rbx
movq -0x228(%rbp), %rdi
leaq -0x218(%rbp), %rax
cmpq %rax, %rdi
je 0x60dd
callq 0x4360
jmp 0x60dd
movq %rax, %rbx
movq -0x248(%rbp), %rdi
leaq -0x238(%rbp), %rax
cmpq %rax, %rdi
je 0x60fa
callq 0x4360
jmp 0x60fa
movq %rax, %rbx
movq -0x268(%rbp), %rdi
leaq -0x258(%rbp), %rax
cmpq %rax, %rdi
je 0x6119
callq 0x4360
jmp 0x6119
jmp 0x6116
movq %rax, %rbx
movq -0x288(%rbp), %rdi
leaq -0x278(%rbp), %rax
cmpq %rax, %rdi
je 0x6136
callq 0x4360
jmp 0x6136
movq %rax, %rbx
movq -0x2a8(%rbp), %rdi
leaq -0x298(%rbp), %rax
cmpq %rax, %rdi
je 0x6153
callq 0x4360
jmp 0x6153
movq %rax, %rbx
movq -0x2c8(%rbp), %rdi
leaq -0x2b8(%rbp), %rax
cmpq %rax, %rdi
je 0x6170
callq 0x4360
jmp 0x6170
movq %rax, %rbx
movq -0x2e8(%rbp), %rdi
leaq -0x2d8(%rbp), %rax
cmpq %rax, %rdi
je 0x618f
callq 0x4360
jmp 0x618f
jmp 0x618c
movq %rax, %rbx
movq -0x308(%rbp), %rdi
leaq -0x2f8(%rbp), %rax
cmpq %rax, %rdi
je 0x61ac
callq 0x4360
jmp 0x61ac
movq %rax, %rbx
movq -0x328(%rbp), %rdi
leaq -0x318(%rbp), %rax
cmpq %rax, %rdi
je 0x61c9
callq 0x4360
jmp 0x61c9
movq %rax, %rbx
movq -0x348(%rbp), %rdi
leaq -0x338(%rbp), %rax
cmpq %rax, %rdi
je 0x61e6
callq 0x4360
jmp 0x61e6
movq %rax, %rbx
movq -0x470(%rbp), %rdi
cmpq %r13, %rdi
je 0x61fe
callq 0x4360
jmp 0x61fe
jmp 0x61fb
movq %rax, %rbx
movq -0x490(%rbp), %rdi
cmpq %r12, %rdi
je 0x6214
callq 0x4360
jmp 0x6214
movq %rax, %rbx
leaq -0x4b0(%rbp), %rdi
callq 0x64c0
leaq -0x4e0(%rbp), %rdi
callq 0x71ae
leaq -0x510(%rbp), %rdi
callq 0x7218
leaq -0x528(%rbp), %r14
movq %r14, %rdi
callq 0x717a
movq -0x20(%r14), %rdi
leaq -0x538(%rbp), %rax
cmpq %rax, %rdi
je 0x625c
callq 0x4360
movq %rbx, %rdi
callq 0x4680