// File: 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
subq $0xa30, %rsp            # imm = 0xA30
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movabsq $-0x3fc7000000000000, %rax # imm = 0xC039000000000000
movq %rax, -0x18(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0xd880
leaq -0xf1(%rbp), %rdi
movq %rdi, -0x800(%rbp)
callq 0x5730
movq -0x800(%rbp), %rdx
leaq 0x6207e(%rip), %rsi     # 0x68012
leaq -0xf0(%rbp), %rdi
callq 0x5590
jmp 0x5fa2
leaq -0xd0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xd8f0
movq %rax, -0x808(%rbp)
jmp 0x5fbe
leaq -0x129(%rbp), %rdi
movq %rdi, -0x810(%rbp)
callq 0x5730
movq -0x810(%rbp), %rdx
leaq 0x62077(%rip), %rsi     # 0x68056
leaq -0x128(%rbp), %rdi
callq 0x5590
jmp 0x5fed
leaq -0x151(%rbp), %rdi
movq %rdi, -0x818(%rbp)
callq 0x5730
movq -0x818(%rbp), %rdx
leaq 0x625bd(%rip), %rsi     # 0x685cb
leaq -0x150(%rbp), %rdi
callq 0x5590
jmp 0x601c
leaq -0x179(%rbp), %rdi
movq %rdi, -0x820(%rbp)
callq 0x5730
movq -0x820(%rbp), %rdx
leaq 0x6258e(%rip), %rsi     # 0x685cb
leaq -0x178(%rbp), %rdi
callq 0x5590
jmp 0x604b
leaq -0x1a1(%rbp), %rdi
movq %rdi, -0x828(%rbp)
callq 0x5730
movq -0x828(%rbp), %rdx
leaq 0x61fe2(%rip), %rsi     # 0x6804e
leaq -0x1a0(%rbp), %rdi
callq 0x5590
jmp 0x607a
movq -0x808(%rbp), %rdi
movl $0x68, %esi
leaq -0x128(%rbp), %rdx
leaq -0x150(%rbp), %rcx
leaq -0x178(%rbp), %r8
leaq -0x1a0(%rbp), %r9
callq 0xd920
movq %rax, -0x830(%rbp)
jmp 0x60b0
leaq -0x1c9(%rbp), %rdi
movq %rdi, -0x838(%rbp)
callq 0x5730
movq -0x838(%rbp), %rdx
leaq 0x61f8a(%rip), %rsi     # 0x6805b
leaq -0x1c8(%rbp), %rdi
callq 0x5590
jmp 0x60df
leaq -0x1f1(%rbp), %rdi
movq %rdi, -0x840(%rbp)
callq 0x5730
movq -0x840(%rbp), %rdx
leaq 0x61f6a(%rip), %rsi     # 0x6806a
leaq -0x1f0(%rbp), %rdi
callq 0x5590
jmp 0x610e
leaq -0x219(%rbp), %rdi
movq %rdi, -0x848(%rbp)
callq 0x5730
movq -0x848(%rbp), %rdx
leaq 0x61f3f(%rip), %rsi     # 0x6806e
leaq -0x218(%rbp), %rdi
callq 0x5590
jmp 0x613d
leaq -0x241(%rbp), %rdi
movq %rdi, -0x850(%rbp)
callq 0x5730
movq -0x850(%rbp), %rdx
leaq 0x61f12(%rip), %rsi     # 0x68070
leaq -0x240(%rbp), %rdi
callq 0x5590
jmp 0x616c
movq -0x830(%rbp), %rdi
movl $0x69, %esi
leaq -0x1c8(%rbp), %rdx
leaq -0x1f0(%rbp), %rcx
leaq -0x218(%rbp), %r8
leaq -0x240(%rbp), %r9
callq 0xd920
movq %rax, -0x858(%rbp)
jmp 0x61a2
leaq -0x269(%rbp), %rdi
movq %rdi, -0x860(%rbp)
callq 0x5730
movq -0x860(%rbp), %rdx
leaq 0x61ec2(%rip), %rsi     # 0x68085
leaq -0x268(%rbp), %rdi
callq 0x5590
jmp 0x61d1
leaq -0x291(%rbp), %rdi
movq %rdi, -0x868(%rbp)
callq 0x5730
movq -0x868(%rbp), %rdx
leaq 0x623d9(%rip), %rsi     # 0x685cb
leaq -0x290(%rbp), %rdi
callq 0x5590
jmp 0x6200
leaq -0x2b9(%rbp), %rdi
movq %rdi, -0x870(%rbp)
callq 0x5730
movq -0x870(%rbp), %rdx
leaq 0x623aa(%rip), %rsi     # 0x685cb
leaq -0x2b8(%rbp), %rdi
callq 0x5590
jmp 0x622f
leaq -0x2e1(%rbp), %rdi
movq %rdi, -0x878(%rbp)
callq 0x5730
movq -0x878(%rbp), %rdx
leaq 0x61e46(%rip), %rsi     # 0x68096
leaq -0x2e0(%rbp), %rdi
callq 0x5590
jmp 0x625e
movq -0x858(%rbp), %rdi
movl $0x66, %esi
leaq -0x268(%rbp), %rdx
leaq -0x290(%rbp), %rcx
leaq -0x2b8(%rbp), %r8
leaq -0x2e0(%rbp), %r9
callq 0xd920
movq %rax, -0x880(%rbp)
jmp 0x6294
leaq -0x309(%rbp), %rdi
movq %rdi, -0x888(%rbp)
callq 0x5730
movq -0x888(%rbp), %rdx
leaq 0x61e16(%rip), %rsi     # 0x680cb
leaq -0x308(%rbp), %rdi
callq 0x5590
jmp 0x62c3
leaq -0x331(%rbp), %rdi
movq %rdi, -0x890(%rbp)
callq 0x5730
movq -0x890(%rbp), %rdx
leaq 0x622e7(%rip), %rsi     # 0x685cb
leaq -0x330(%rbp), %rdi
callq 0x5590
jmp 0x62f2
leaq -0x359(%rbp), %rdi
movq %rdi, -0x898(%rbp)
callq 0x5730
movq -0x898(%rbp), %rdx
leaq 0x622b8(%rip), %rsi     # 0x685cb
leaq -0x358(%rbp), %rdi
callq 0x5590
jmp 0x6321
leaq -0x381(%rbp), %rdi
movq %rdi, -0x8a0(%rbp)
callq 0x5730
movq -0x8a0(%rbp), %rdx
leaq 0x61d95(%rip), %rsi     # 0x680d7
leaq -0x380(%rbp), %rdi
callq 0x5590
jmp 0x6350
movq -0x880(%rbp), %rdi
movl $0x74, %esi
leaq -0x308(%rbp), %rdx
leaq -0x330(%rbp), %rcx
leaq -0x358(%rbp), %r8
leaq -0x380(%rbp), %r9
callq 0xd920
movq %rax, -0x8a8(%rbp)
jmp 0x6386
leaq -0x3a9(%rbp), %rdi
movq %rdi, -0x8b0(%rbp)
callq 0x5730
movq -0x8b0(%rbp), %rdx
leaq 0x61d5a(%rip), %rsi     # 0x68101
leaq -0x3a8(%rbp), %rdi
callq 0x5590
jmp 0x63b5
leaq -0x3d1(%rbp), %rdi
movq %rdi, -0x8b8(%rbp)
callq 0x5730
movq -0x8b8(%rbp), %rdx
leaq 0x621f5(%rip), %rsi     # 0x685cb
leaq -0x3d0(%rbp), %rdi
callq 0x5590
jmp 0x63e4
leaq -0x3f9(%rbp), %rdi
movq %rdi, -0x8c0(%rbp)
callq 0x5730
movq -0x8c0(%rbp), %rdx
leaq 0x621c6(%rip), %rsi     # 0x685cb
leaq -0x3f8(%rbp), %rdi
callq 0x5590
jmp 0x6413
leaq -0x421(%rbp), %rdi
movq %rdi, -0x8c8(%rbp)
callq 0x5730
movq -0x8c8(%rbp), %rdx
leaq 0x61cd3(%rip), %rsi     # 0x68107
leaq -0x420(%rbp), %rdi
callq 0x5590
jmp 0x6442
movq -0x8a8(%rbp), %rdi
movl $0x38, %esi
leaq -0x3a8(%rbp), %rdx
leaq -0x3d0(%rbp), %rcx
leaq -0x3f8(%rbp), %r8
leaq -0x420(%rbp), %r9
callq 0xd920
jmp 0x6471
leaq -0x420(%rbp), %rdi
callq 0x5868
leaq -0x421(%rbp), %rdi
callq 0x5450
leaq -0x3f8(%rbp), %rdi
callq 0x5868
leaq -0x3f9(%rbp), %rdi
callq 0x5450
leaq -0x3d0(%rbp), %rdi
callq 0x5868
leaq -0x3d1(%rbp), %rdi
callq 0x5450
leaq -0x3a8(%rbp), %rdi
callq 0x5868
leaq -0x3a9(%rbp), %rdi
callq 0x5450
leaq -0x380(%rbp), %rdi
callq 0x5868
leaq -0x381(%rbp), %rdi
callq 0x5450
leaq -0x358(%rbp), %rdi
callq 0x5868
leaq -0x359(%rbp), %rdi
callq 0x5450
leaq -0x330(%rbp), %rdi
callq 0x5868
leaq -0x331(%rbp), %rdi
callq 0x5450
leaq -0x308(%rbp), %rdi
callq 0x5868
leaq -0x309(%rbp), %rdi
callq 0x5450
leaq -0x2e0(%rbp), %rdi
callq 0x5868
leaq -0x2e1(%rbp), %rdi
callq 0x5450
leaq -0x2b8(%rbp), %rdi
callq 0x5868
leaq -0x2b9(%rbp), %rdi
callq 0x5450
leaq -0x290(%rbp), %rdi
callq 0x5868
leaq -0x291(%rbp), %rdi
callq 0x5450
leaq -0x268(%rbp), %rdi
callq 0x5868
leaq -0x269(%rbp), %rdi
callq 0x5450
leaq -0x240(%rbp), %rdi
callq 0x5868
leaq -0x241(%rbp), %rdi
callq 0x5450
leaq -0x218(%rbp), %rdi
callq 0x5868
leaq -0x219(%rbp), %rdi
callq 0x5450
leaq -0x1f0(%rbp), %rdi
callq 0x5868
leaq -0x1f1(%rbp), %rdi
callq 0x5450
leaq -0x1c8(%rbp), %rdi
callq 0x5868
leaq -0x1c9(%rbp), %rdi
callq 0x5450
leaq -0x1a0(%rbp), %rdi
callq 0x5868
leaq -0x1a1(%rbp), %rdi
callq 0x5450
leaq -0x178(%rbp), %rdi
callq 0x5868
leaq -0x179(%rbp), %rdi
callq 0x5450
leaq -0x150(%rbp), %rdi
callq 0x5868
leaq -0x151(%rbp), %rdi
callq 0x5450
leaq -0x128(%rbp), %rdi
callq 0x5868
leaq -0x129(%rbp), %rdi
callq 0x5450
leaq -0xf0(%rbp), %rdi
callq 0x5868
leaq -0xf1(%rbp), %rdi
callq 0x5450
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq -0xd0(%rbp), %rdi
callq 0xe770
jmp 0x667e
leaq -0xd0(%rbp), %rdi
addq $0x98, %rdi
callq 0x7b40
cmpq $0x3, %rax
je 0x6b30
movq 0x8f91e(%rip), %rax     # 0x95fc0
movq (%rax), %rsi
leaq -0xd0(%rbp), %rdi
movl $0x1, %edx
callq 0xef30
jmp 0x66b8
jmp 0x6b30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6b08
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6afc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6af0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6ad8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6ac0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6aa8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6a9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6a90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6a78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6a60
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6a48
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6a3c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6a30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6a18
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6a00
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x69e8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x69dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x69d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x69b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x69a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6988
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x697c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6970
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6958
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6940
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x6928
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0x420(%rbp), %rdi
callq 0x5868
leaq -0x421(%rbp), %rdi
callq 0x5450
leaq -0x3f8(%rbp), %rdi
callq 0x5868
leaq -0x3f9(%rbp), %rdi
callq 0x5450
leaq -0x3d0(%rbp), %rdi
callq 0x5868
leaq -0x3d1(%rbp), %rdi
callq 0x5450
leaq -0x3a8(%rbp), %rdi
callq 0x5868
leaq -0x3a9(%rbp), %rdi
callq 0x5450
leaq -0x380(%rbp), %rdi
callq 0x5868
leaq -0x381(%rbp), %rdi
callq 0x5450
leaq -0x358(%rbp), %rdi
callq 0x5868
leaq -0x359(%rbp), %rdi
callq 0x5450
leaq -0x330(%rbp), %rdi
callq 0x5868
leaq -0x331(%rbp), %rdi
callq 0x5450
leaq -0x308(%rbp), %rdi
callq 0x5868
leaq -0x309(%rbp), %rdi
callq 0x5450
leaq -0x2e0(%rbp), %rdi
callq 0x5868
leaq -0x2e1(%rbp), %rdi
callq 0x5450
leaq -0x2b8(%rbp), %rdi
callq 0x5868
leaq -0x2b9(%rbp), %rdi
callq 0x5450
leaq -0x290(%rbp), %rdi
callq 0x5868
leaq -0x291(%rbp), %rdi
callq 0x5450
leaq -0x268(%rbp), %rdi
callq 0x5868
leaq -0x269(%rbp), %rdi
callq 0x5450
leaq -0x240(%rbp), %rdi
callq 0x5868
leaq -0x241(%rbp), %rdi
callq 0x5450
leaq -0x218(%rbp), %rdi
callq 0x5868
leaq -0x219(%rbp), %rdi
callq 0x5450
leaq -0x1f0(%rbp), %rdi
callq 0x5868
leaq -0x1f1(%rbp), %rdi
callq 0x5450
leaq -0x1c8(%rbp), %rdi
callq 0x5868
leaq -0x1c9(%rbp), %rdi
callq 0x5450
leaq -0x1a0(%rbp), %rdi
callq 0x5868
leaq -0x1a1(%rbp), %rdi
callq 0x5450
leaq -0x178(%rbp), %rdi
callq 0x5868
leaq -0x179(%rbp), %rdi
callq 0x5450
leaq -0x150(%rbp), %rdi
callq 0x5868
leaq -0x151(%rbp), %rdi
callq 0x5450
leaq -0x128(%rbp), %rdi
callq 0x5868
leaq -0x129(%rbp), %rdi
callq 0x5450
leaq -0xf0(%rbp), %rdi
callq 0x5868
leaq -0xf1(%rbp), %rdi
callq 0x5450
jmp 0x774e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x774e
leaq -0x449(%rbp), %rdi
movq %rdi, -0x8d0(%rbp)
callq 0x5730
movq -0x8d0(%rbp), %rdx
leaq 0x61529(%rip), %rsi     # 0x6807a
leaq -0x448(%rbp), %rdi
callq 0x5590
jmp 0x6b5f
leaq -0xd0(%rbp), %rdi
leaq -0x448(%rbp), %rsi
callq 0xe8b0
movq %rax, -0x8d8(%rbp)
jmp 0x6b7b
movq -0x8d8(%rbp), %rdi
callq 0xd600
movl %eax, -0x8dc(%rbp)
jmp 0x6b8f
leaq -0x448(%rbp), %rdi
callq 0x5868
leaq -0x449(%rbp), %rdi
callq 0x5450
movl -0x8dc(%rbp), %eax
movl %eax, -0x428(%rbp)
leaq -0x471(%rbp), %rdi
movq %rdi, -0x8e8(%rbp)
callq 0x5730
movq -0x8e8(%rbp), %rdx
leaq 0x614b1(%rip), %rsi     # 0x68085
leaq -0x470(%rbp), %rdi
callq 0x5590
jmp 0x6be2
leaq -0xd0(%rbp), %rdi
leaq -0x470(%rbp), %rsi
callq 0xe8b0
movq %rax, -0x8f0(%rbp)
jmp 0x6bfe
movq -0x8f0(%rbp), %rax
movb 0x4a(%rax), %al
movb %al, -0x8f9(%rbp)
leaq -0x470(%rbp), %rdi
callq 0x5868
leaq -0x471(%rbp), %rdi
callq 0x5450
movb -0x8f9(%rbp), %al
andb $0x1, %al
movb %al, -0x44a(%rbp)
leaq -0x499(%rbp), %rdi
movq %rdi, -0x8f8(%rbp)
callq 0x5730
movq -0x8f8(%rbp), %rdx
leaq 0x61476(%rip), %rsi     # 0x680cb
leaq -0x498(%rbp), %rdi
callq 0x5590
jmp 0x6c63
leaq -0xd0(%rbp), %rdi
leaq -0x498(%rbp), %rsi
callq 0xe8b0
movq %rax, -0x908(%rbp)
jmp 0x6c7f
movq -0x908(%rbp), %rax
movb 0x4a(%rax), %al
movb %al, -0x911(%rbp)
leaq -0x498(%rbp), %rdi
callq 0x5868
leaq -0x499(%rbp), %rdi
callq 0x5450
movb -0x911(%rbp), %al
andb $0x1, %al
movb %al, -0x472(%rbp)
leaq -0x4c1(%rbp), %rdi
movq %rdi, -0x910(%rbp)
callq 0x5730
movq -0x910(%rbp), %rdx
leaq 0x6142b(%rip), %rsi     # 0x68101
leaq -0x4c0(%rbp), %rdi
callq 0x5590
jmp 0x6ce4
leaq -0xd0(%rbp), %rdi
leaq -0x4c0(%rbp), %rsi
callq 0xe8b0
movq %rax, -0x920(%rbp)
jmp 0x6d00
movq -0x920(%rbp), %rax
movb 0x4a(%rax), %al
movb %al, -0x921(%rbp)
leaq -0x4c0(%rbp), %rdi
callq 0x5868
leaq -0x4c1(%rbp), %rdi
callq 0x5450
movb -0x921(%rbp), %al
andb $0x1, %al
movb %al, -0x49a(%rbp)
leaq -0x38(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x7b60
movq %rax, %rsi
leaq -0x4e8(%rbp), %rdi
callq 0x51c0
jmp 0x6d54
leaq -0x38(%rbp), %rdi
movl $0x1, %esi
callq 0x7b60
movq %rax, %rsi
leaq -0x508(%rbp), %rdi
callq 0x51c0
jmp 0x6d73
leaq -0x38(%rbp), %rdi
movl $0x2, %esi
callq 0x7b60
movq %rax, %rsi
leaq -0x528(%rbp), %rdi
callq 0x51c0
jmp 0x6d92
movq 0x8f24f(%rip), %rdi     # 0x95fe8
leaq 0xde0(%rip), %rsi       # 0x7b80
callq 0x5150
jmp 0x6da7
movq 0x8f23a(%rip), %rdi     # 0x95fe8
leaq 0x61372(%rip), %rsi     # 0x68127
callq 0x53e0
movq %rax, -0x930(%rbp)
jmp 0x6dc3
movq -0x930(%rbp), %rdi
leaq -0x4e8(%rbp), %rsi
callq 0x53a0
movq %rax, -0x938(%rbp)
jmp 0x6ddf
movq -0x938(%rbp), %rdi
movq 0x8f1ab(%rip), %rsi     # 0x95f98
callq 0x5430
jmp 0x6df4
movq 0x8f1ed(%rip), %rdi     # 0x95fe8
leaq 0x61341(%rip), %rsi     # 0x68143
callq 0x53e0
movq %rax, -0x940(%rbp)
jmp 0x6e10
movq -0x940(%rbp), %rdi
leaq -0x508(%rbp), %rsi
callq 0x53a0
movq %rax, -0x948(%rbp)
jmp 0x6e2c
movq -0x948(%rbp), %rdi
movq 0x8f15e(%rip), %rsi     # 0x95f98
callq 0x5430
jmp 0x6e41
movq 0x8f1a0(%rip), %rdi     # 0x95fe8
leaq 0x61315(%rip), %rsi     # 0x68164
callq 0x53e0
movq %rax, -0x950(%rbp)
jmp 0x6e5d
movq -0x950(%rbp), %rdi
leaq -0x528(%rbp), %rsi
callq 0x53a0
movq %rax, -0x958(%rbp)
jmp 0x6e79
movq -0x958(%rbp), %rdi
movq 0x8f111(%rip), %rsi     # 0x95f98
callq 0x5430
jmp 0x6e8e
movq 0x8f153(%rip), %rdi     # 0x95fe8
leaq 0x612e7(%rip), %rsi     # 0x68183
callq 0x53e0
movq %rax, -0x960(%rbp)
jmp 0x6eaa
movq -0x960(%rbp), %rdi
movzbl -0x44a(%rbp), %esi
andl $0x1, %esi
callq 0x5740
movq %rax, -0x968(%rbp)
jmp 0x6ec9
movq -0x968(%rbp), %rdi
movq 0x8f0c1(%rip), %rsi     # 0x95f98
callq 0x5430
jmp 0x6ede
movq 0x8f103(%rip), %rdi     # 0x95fe8
leaq 0x612ba(%rip), %rsi     # 0x681a6
callq 0x53e0
movq %rax, -0x970(%rbp)
jmp 0x6efa
movq -0x970(%rbp), %rdi
movl -0x428(%rbp), %esi
callq 0x5710
movq %rax, -0x978(%rbp)
jmp 0x6f15
movq -0x978(%rbp), %rdi
movq 0x8f075(%rip), %rsi     # 0x95f98
callq 0x5430
jmp 0x6f2a
movq 0x8f0b7(%rip), %rdi     # 0x95fe8
leaq 0x61291(%rip), %rsi     # 0x681c9
callq 0x53e0
movq %rax, -0x980(%rbp)
jmp 0x6f46
movq -0x980(%rbp), %rdi
movzbl -0x472(%rbp), %esi
andl $0x1, %esi
callq 0x5740
movq %rax, -0x988(%rbp)
jmp 0x6f65
movq -0x988(%rbp), %rdi
movq 0x8f025(%rip), %rsi     # 0x95f98
callq 0x5430
jmp 0x6f7a
movq 0x8f067(%rip), %rdi     # 0x95fe8
leaq 0x61275(%rip), %rsi     # 0x681fd
callq 0x53e0
movq %rax, -0x990(%rbp)
jmp 0x6f96
movq -0x990(%rbp), %rdi
movzbl -0x49a(%rbp), %esi
andl $0x1, %esi
callq 0x5740
movq %rax, -0x998(%rbp)
jmp 0x6fb5
movq -0x998(%rbp), %rdi
movq 0x8efd5(%rip), %rsi     # 0x95f98
callq 0x5430
jmp 0x6fca
leaq -0x560(%rbp), %rdi
callq 0x7bb0
leaq -0x590(%rbp), %rdi
callq 0x7bd0
leaq -0x5c0(%rbp), %rdi
callq 0x7bd0
leaq -0x5d8(%rbp), %rdi
callq 0x7bf0
movq 0x8efe7(%rip), %rdi     # 0x95fe8
leaq 0x61212(%rip), %rsi     # 0x6821a
callq 0x53e0
movq %rax, -0x9a0(%rbp)
jmp 0x7016
movq -0x9a0(%rbp), %rdi
leaq -0x508(%rbp), %rsi
callq 0x53a0
movq %rax, -0x9a8(%rbp)
jmp 0x7032
movq -0x9a8(%rbp), %rdi
movq 0x8ef58(%rip), %rsi     # 0x95f98
callq 0x5430
jmp 0x7047
leaq -0x600(%rbp), %rdi
leaq -0x508(%rbp), %rsi
callq 0x51c0
jmp 0x705c
movzbl -0x49a(%rbp), %ecx
andl $0x1, %ecx
leaq -0x600(%rbp), %rdi
leaq -0x590(%rbp), %rsi
leaq -0x52c(%rbp), %rdx
callq 0x56fc0
movl %eax, -0x9ac(%rbp)
jmp 0x7088
leaq -0x600(%rbp), %rdi
callq 0x5868
movl -0x9ac(%rbp), %eax
movl %eax, -0x5dc(%rbp)
cmpl $0x0, -0x5dc(%rbp)
jge 0x7273
movq 0x8ef34(%rip), %rdi     # 0x95fe8
leaq 0x61173(%rip), %rsi     # 0x6822e
callq 0x53e0
movq %rax, -0x9b8(%rbp)
jmp 0x70c9
movq -0x9b8(%rbp), %rdi
movq 0x8eec1(%rip), %rsi     # 0x95f98
callq 0x5430
jmp 0x70de
movl $0x1, %edi
callq 0x54a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x711a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0x448(%rbp), %rdi
callq 0x5868
leaq -0x449(%rbp), %rdi
callq 0x5450
jmp 0x774e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x715d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0x470(%rbp), %rdi
callq 0x5868
leaq -0x471(%rbp), %rdi
callq 0x5450
jmp 0x774e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x71a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0x498(%rbp), %rdi
callq 0x5868
leaq -0x499(%rbp), %rdi
callq 0x5450
jmp 0x774e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x71e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0x4c0(%rbp), %rdi
callq 0x5868
leaq -0x4c1(%rbp), %rdi
callq 0x5450
jmp 0x774e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x7742
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x7736
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x772a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x76fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0x600(%rbp), %rdi
callq 0x5868
jmp 0x76fa
movq 0x8ed6e(%rip), %rdi     # 0x95fe8
leaq 0x61349(%rip), %rsi     # 0x685ca
callq 0x53e0
movq %rax, -0x9c0(%rbp)
jmp 0x728f
movq -0x9c0(%rbp), %rdi
leaq 0x60fb9(%rip), %rsi     # 0x68256
callq 0x53e0
movq %rax, -0x9c8(%rbp)
jmp 0x72ab
leaq -0x590(%rbp), %rdi
callq 0x7c10
movq -0x9c8(%rbp), %rdi
movq %rax, %rsi
callq 0x50f0
movq %rax, -0x9d0(%rbp)
jmp 0x72cf
movq -0x9d0(%rbp), %rdi
movq 0x8ecbb(%rip), %rsi     # 0x95f98
callq 0x5430
jmp 0x72e4
movq 0x8ecfd(%rip), %rdi     # 0x95fe8
leaq 0x612d8(%rip), %rsi     # 0x685ca
callq 0x53e0
movq %rax, -0x9d8(%rbp)
jmp 0x7300
movq -0x9d8(%rbp), %rdi
leaq 0x60f4f(%rip), %rsi     # 0x6825d
callq 0x53e0
movq %rax, -0x9e0(%rbp)
jmp 0x731c
movq -0x9e0(%rbp), %rdi
movl -0x52c(%rbp), %esi
callq 0x5710
movq %rax, -0x9e8(%rbp)
jmp 0x7337
movq -0x9e8(%rbp), %rdi
movq 0x8ec53(%rip), %rsi     # 0x95f98
callq 0x5430
jmp 0x734c
movzbl -0x49a(%rbp), %ecx
andl $0x1, %ecx
leaq -0x590(%rbp), %rdi
leaq -0x560(%rbp), %rsi
movl $0x2, %edx
callq 0x7770
jmp 0x7370
leaq -0x610(%rbp), %rdi
callq 0x7c30
jmp 0x737e
testb $0x1, -0x44a(%rbp)
je 0x739e
leaq 0x3d6d2(%rip), %rsi     # 0x44a60
leaq -0x610(%rbp), %rdi
callq 0x7c50
jmp 0x739c
jmp 0x73b5
leaq 0x3cd1b(%rip), %rsi     # 0x440c0
leaq -0x610(%rbp), %rdi
callq 0x7c50
jmp 0x73b3
jmp 0x73b5
movzbl -0x49a(%rbp), %esi
andl $0x1, %esi
leaq -0x610(%rbp), %rdi
callq 0x7c70
jmp 0x73cd
movq 0x8ec14(%rip), %rdi     # 0x95fe8
leaq 0x60e9a(%rip), %rsi     # 0x68275
callq 0x53e0
movq %rax, -0x9f0(%rbp)
jmp 0x73e9
movq -0x9f0(%rbp), %rdi
leaq -0x4e8(%rbp), %rsi
callq 0x53a0
movq %rax, -0x9f8(%rbp)
jmp 0x7405
movq -0x9f8(%rbp), %rdi
movq 0x8eb85(%rip), %rsi     # 0x95f98
callq 0x5430
jmp 0x741a
leaq -0x630(%rbp), %rdi
leaq -0x4e8(%rbp), %rsi
callq 0x51c0
jmp 0x742f
leaq -0x630(%rbp), %rdi
leaq -0x5d8(%rbp), %rsi
callq 0x57b30
jmp 0x7444
leaq -0x630(%rbp), %rdi
callq 0x5868
movq 0x8eb91(%rip), %rdi     # 0x95fe8
leaq 0x60e30(%rip), %rsi     # 0x6828e
callq 0x53e0
movq %rax, -0xa00(%rbp)
jmp 0x746c
movq -0xa00(%rbp), %rdi
movq 0x8eb1e(%rip), %rsi     # 0x95f98
callq 0x5430
jmp 0x7481
movl $0x0, -0x634(%rbp)
movl -0x634(%rbp), %eax
cmpl -0x428(%rbp), %eax
jge 0x7698
leaq -0x610(%rbp), %rdi
leaq -0x5d8(%rbp), %rsi
leaq -0x590(%rbp), %rdx
leaq -0x5c0(%rbp), %rcx
callq 0x58190
movsd %xmm0, -0xa08(%rbp)
jmp 0x74c8
movsd -0xa08(%rbp), %xmm0
movsd %xmm0, -0x640(%rbp)
movq 0x8eb09(%rip), %rdi     # 0x95fe8
leaq 0x60db4(%rip), %rsi     # 0x6829a
callq 0x53e0
movq %rax, -0xa10(%rbp)
jmp 0x74f4
movq -0xa10(%rbp), %rdi
movsd -0x640(%rbp), %xmm0
callq 0x57c0
movq %rax, -0xa18(%rbp)
jmp 0x7511
movq -0xa18(%rbp), %rdi
movq 0x8ea79(%rip), %rsi     # 0x95f98
callq 0x5430
jmp 0x7526
leaq -0x590(%rbp), %rdi
leaq -0x5c0(%rbp), %rsi
callq 0x7c90
jmp 0x753b
leaq -0x590(%rbp), %rdi
movsd 0x60abe(%rip), %xmm0    # 0x68008
callq 0x57fa0
jmp 0x7551
movsd -0x18(%rbp), %xmm0
leaq -0x590(%rbp), %rdi
leaq -0x560(%rbp), %rsi
callq 0x7880
jmp 0x756b
testb $0x1, -0x472(%rbp)
je 0x7682
leaq -0x7b8(%rbp), %rdi
callq 0x5580
jmp 0x7586
leaq -0x7b8(%rbp), %rdi
leaq -0x528(%rbp), %rsi
callq 0x53a0
movq %rax, -0xa20(%rbp)
jmp 0x75a2
movq -0xa20(%rbp), %rdi
leaq 0x60cf7(%rip), %rsi     # 0x682a7
callq 0x53e0
movq %rax, -0xa28(%rbp)
jmp 0x75be
movq -0xa28(%rbp), %rdi
movl -0x634(%rbp), %esi
incl %esi
callq 0x5710
jmp 0x75d4
leaq -0x7d8(%rbp), %rdi
leaq -0x7b8(%rbp), %rsi
callq 0x5400
jmp 0x75e9
leaq -0x7d8(%rbp), %rdi
leaq -0x590(%rbp), %rsi
xorl %edx, %edx
movl $0x6, %ecx
callq 0x575a0
jmp 0x7605
leaq -0x7d8(%rbp), %rdi
callq 0x5868
leaq -0x7b8(%rbp), %rdi
callq 0x5100
jmp 0x7682
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0x630(%rbp), %rdi
callq 0x5868
jmp 0x76fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x7674
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0x7d8(%rbp), %rdi
callq 0x5868
leaq -0x7b8(%rbp), %rdi
callq 0x5100
jmp 0x76fa
jmp 0x7684
movl -0x634(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x634(%rbp)
jmp 0x748b
leaq -0x7f8(%rbp), %rdi
leaq -0x528(%rbp), %rsi
callq 0x51c0
jmp 0x76ad
leaq -0x7f8(%rbp), %rdi
leaq -0x590(%rbp), %rsi
xorl %edx, %edx
movl $0x6, %ecx
callq 0x575a0
jmp 0x76c9
leaq -0x7f8(%rbp), %rdi
callq 0x5868
xorl %edi, %edi
callq 0x54a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0x7f8(%rbp), %rdi
callq 0x5868
leaq -0x5d8(%rbp), %rdi
callq 0x7cc0
leaq -0x5c0(%rbp), %rdi
callq 0x7d20
leaq -0x590(%rbp), %rdi
callq 0x7d20
leaq -0x560(%rbp), %rdi
callq 0x7d40
leaq -0x528(%rbp), %rdi
callq 0x5868
leaq -0x508(%rbp), %rdi
callq 0x5868
leaq -0x4e8(%rbp), %rdi
callq 0x5868
leaq -0xd0(%rbp), %rdi
callq 0x7d60
movq -0x100(%rbp), %rdi
callq 0x5720
nopw %cs:(%rax,%rax)