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

    conf::Config config;
    config("usage: counts [OPTION...] INPUT COUNTS1 COUNTS2\n")
      ('h', "help", "", "", "display help")
      ('v', "vocabulary=FILE", "arg", "", "Unigram model file")
      ('t', "transitions=FILE", "arg", "", "Bigram model file")
      ('f', "forward-backward", "", "", "Use Forward-backward segmentation instead of Viterbi")
      ('w', "weights", "", "", "Training examples are weighted")
      ('8', "utf-8", "", "", "Utf-8 character encoding in use");
    config.default_parse(argc, argv);
    if (config.arguments.size() != 3) config.print_help(stderr, 1);

    if (!config["vocabulary"].specified && !config["transitions"].specified) {
        cerr << "Please define vocabulary or transitions" << endl;
        exit(EXIT_FAILURE);
    }

    if (config["vocabulary"].specified && config["transitions"].specified) {
        cerr << "Please don't define both vocabulary and transitions" << endl;
        exit(EXIT_FAILURE);
    }

    string vocab_fname;
    string trans_fname;
    int maxlen;
    map<string, flt_type> vocab;
    StringSet *ss_vocab = NULL;
    transitions_t transitions;
    bool unigram = true;
    flt_type one_char_min_lp = -25.0;
    string in_fname = config.arguments[0];
    string out_fname_1 = config.arguments[1];
    string out_fname_2 = config.arguments[2];
    bool enable_forward_backward = config["forward-backward"].specified;
    bool weights = config["weights"].specified;
    bool utf8_encoding = config["utf-8"].specified;

    if (config["vocabulary"].specified) {
        vocab_fname = config["vocabulary"].get_str();
        cerr << "Reading vocabulary " << vocab_fname << endl;
        int retval = Unigrams::read_vocab(vocab_fname, vocab, maxlen, utf8_encoding);
        vocab[start_end_symbol] = 0.0;
        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;
        ss_vocab = new StringSet(vocab);
    }

    if (config["transitions"].specified) {
        unigram = false;
        trans_fname = config["vocabulary"].get_str();
        cerr << "Reading transitions " << trans_fname << endl;
        int retval = Bigrams::read_transitions(transitions, trans_fname);
        Bigrams::trans_to_vocab(transitions, vocab);
        ss_vocab = new StringSet(vocab);
        if (retval < 0) {
            cerr << "something went wrong reading transitions" << endl;
            exit(EXIT_FAILURE);
        }
        cerr << "\t" << "vocabulary: " << transitions.size() << endl;
        cerr << "\t" << "transitions: " << retval << endl;
    }

    cerr << "Segmenting corpus" << endl;
    SimpleFileInput infile(in_fname);

    map<string, flt_type> unigram_stats;
    transitions_t trans_stats;
    string line;
    int li = 1;
    while (infile.getline(line)) {

        if (li % 100000 == 0) cerr << "processing line number: " << li << endl;

        trim(line, '\n');

        flt_type curr_weight = 1.0;
        if (weights) {
            string remainder;
            std::istringstream iss(line);
            iss >> std::skipws >> curr_weight;
            getline(iss, remainder);
            trim(remainder, '\t'); trim(remainder,' ');
            line.assign(remainder);
        }

        for (unsigned int i=0; i<line.size(); i++) {
            string currchr {line[i]};
            if (!ss_vocab->includes(currchr))
                ss_vocab->add(currchr, one_char_min_lp);
        }

        transitions_t curr_stats;

        if (unigram)
            if (enable_forward_backward) {
                FactorGraph fg(line, start_end_symbol, *ss_vocab);
                forward_backward(vocab, fg, curr_stats);
            }
            else {
                viterbi(vocab, line, curr_stats, start_end_symbol);
            }
        else {
            FactorGraph fg(line, start_end_symbol, *ss_vocab);
            if (enable_forward_backward)
                forward_backward(transitions, fg, curr_stats);
            else
                viterbi(transitions, fg, curr_stats);
        }

        Bigrams::update_trans_stats(curr_stats, curr_weight,
                                    trans_stats, unigram_stats);

        li++;
    }

    if (ss_vocab != NULL) delete ss_vocab;

    Unigrams::write_vocab(out_fname_1, unigram_stats, true, 10);
    Bigrams::write_transitions(trans_stats, out_fname_2, true, 10);

    exit(EXIT_SUCCESS);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x8e8, %rsp            # imm = 0x8E8
movq %rsi, %rbx
movl %edi, %r14d
leaq -0x730(%rbp), %rdi
callq 0x7c4e
leaq -0x638(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x21f13(%rip), %rsi     # 0x27018
leaq 0x21f3c(%rip), %rdx     # 0x27048
leaq -0x648(%rbp), %rdi
callq 0x6e06
leaq -0x730(%rbp), %rdi
leaq -0x648(%rbp), %rsi
callq 0x7cb4
movq %rax, %r15
leaq -0x618(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x21f11(%rip), %rsi     # 0x27051
leaq 0x21f0e(%rip), %rdx     # 0x27055
leaq -0x628(%rbp), %rdi
callq 0x6e06
leaq -0x388(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x224d2(%rip), %rdx     # 0x27637
leaq -0x398(%rbp), %rdi
movq %rdx, %rsi
callq 0x6e06
leaq -0x368(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x224b1(%rip), %rdx     # 0x27637
leaq -0x378(%rbp), %rdi
movq %rdx, %rsi
callq 0x6e06
leaq -0x348(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21ea2(%rip), %rsi     # 0x27049
leaq 0x21ea7(%rip), %rdx     # 0x27055
leaq -0x358(%rbp), %rdi
callq 0x6e06
leaq -0x628(%rbp), %rdx
leaq -0x398(%rbp), %rcx
leaq -0x378(%rbp), %r8
leaq -0x358(%rbp), %r9
movq %r15, %rdi
movl $0x68, %esi
callq 0x7ccc
movq %rax, %r15
leaq -0x328(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21e5e(%rip), %rsi     # 0x27056
leaq 0x21e66(%rip), %rdx     # 0x27065
leaq -0x338(%rbp), %rdi
callq 0x6e06
leaq -0x308(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21e49(%rip), %rsi     # 0x27066
leaq 0x21e45(%rip), %rdx     # 0x27069
leaq -0x318(%rbp), %rdi
callq 0x6e06
leaq -0x2e8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x223f5(%rip), %rdx     # 0x27637
leaq -0x2f8(%rbp), %rdi
movq %rdx, %rsi
callq 0x6e06
leaq -0x2c8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21e07(%rip), %rsi     # 0x2706a
leaq 0x21e12(%rip), %rdx     # 0x2707c
leaq -0x2d8(%rbp), %rdi
callq 0x6e06
leaq -0x338(%rbp), %rdx
leaq -0x318(%rbp), %rcx
leaq -0x2f8(%rbp), %r8
leaq -0x2d8(%rbp), %r9
movq %r15, %rdi
movl $0x76, %esi
callq 0x7ccc
movq %rax, %r15
leaq -0x2a8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21dc9(%rip), %rsi     # 0x2707d
leaq 0x21dd2(%rip), %rdx     # 0x2708d
leaq -0x2b8(%rbp), %rdi
callq 0x6e06
leaq -0x288(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21d8d(%rip), %rsi     # 0x27066
leaq 0x21d89(%rip), %rdx     # 0x27069
leaq -0x298(%rbp), %rdi
callq 0x6e06
leaq -0x268(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x22339(%rip), %rdx     # 0x27637
leaq -0x278(%rbp), %rdi
movq %rdx, %rsi
callq 0x6e06
leaq -0x248(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21d6f(%rip), %rsi     # 0x2708e
leaq 0x21d79(%rip), %rdx     # 0x2709f
leaq -0x258(%rbp), %rdi
callq 0x6e06
leaq -0x2b8(%rbp), %rdx
leaq -0x298(%rbp), %rcx
leaq -0x278(%rbp), %r8
leaq -0x258(%rbp), %r9
movq %r15, %rdi
movl $0x74, %esi
callq 0x7ccc
movq %rax, %r15
leaq -0x228(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21d30(%rip), %rsi     # 0x270a0
leaq 0x21d39(%rip), %rdx     # 0x270b0
leaq -0x238(%rbp), %rdi
callq 0x6e06
leaq -0x208(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x222a2(%rip), %rdx     # 0x27637
leaq -0x218(%rbp), %rdi
movq %rdx, %rsi
callq 0x6e06
leaq -0x1e8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x22281(%rip), %rdx     # 0x27637
leaq -0x1f8(%rbp), %rdi
movq %rdx, %rsi
callq 0x6e06
leaq -0x1c8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21cda(%rip), %rsi     # 0x270b1
leaq 0x21d07(%rip), %rdx     # 0x270e5
leaq -0x1d8(%rbp), %rdi
callq 0x6e06
leaq -0x238(%rbp), %rdx
leaq -0x218(%rbp), %rcx
leaq -0x1f8(%rbp), %r8
leaq -0x1d8(%rbp), %r9
movq %r15, %rdi
movl $0x66, %esi
callq 0x7ccc
movq %rax, %r15
leaq -0x1a8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21cbe(%rip), %rsi     # 0x270e6
leaq 0x21cbe(%rip), %rdx     # 0x270ed
leaq -0x1b8(%rbp), %rdi
callq 0x6e06
leaq -0x188(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x221ea(%rip), %rdx     # 0x27637
leaq -0x198(%rbp), %rdi
movq %rdx, %rsi
callq 0x6e06
leaq -0x168(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x221c9(%rip), %rdx     # 0x27637
leaq -0x178(%rbp), %rdi
movq %rdx, %rsi
callq 0x6e06
leaq -0x148(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21c5f(%rip), %rsi     # 0x270ee
leaq 0x21c76(%rip), %rdx     # 0x2710c
leaq -0x158(%rbp), %rdi
callq 0x6e06
leaq -0x1b8(%rbp), %rdx
leaq -0x198(%rbp), %rcx
leaq -0x178(%rbp), %r8
leaq -0x158(%rbp), %r9
movq %r15, %rdi
movl $0x77, %esi
callq 0x7ccc
movq %rax, %r15
leaq -0x128(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21c2d(%rip), %rsi     # 0x2710d
leaq 0x21c2b(%rip), %rdx     # 0x27112
leaq -0x138(%rbp), %rdi
callq 0x6e06
leaq -0x108(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x22132(%rip), %rdx     # 0x27637
leaq -0x118(%rbp), %rdi
movq %rdx, %rsi
callq 0x6e06
leaq -0xe8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x22111(%rip), %rdx     # 0x27637
leaq -0xf8(%rbp), %rdi
movq %rdx, %rsi
callq 0x6e06
leaq -0xc8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21bcc(%rip), %rsi     # 0x27113
leaq 0x21be4(%rip), %rdx     # 0x27132
leaq -0xd8(%rbp), %rdi
callq 0x6e06
leaq -0x138(%rbp), %rdx
leaq -0x118(%rbp), %rcx
leaq -0xf8(%rbp), %r8
leaq -0xd8(%rbp), %r9
movq %r15, %rdi
movl $0x38, %esi
callq 0x7ccc
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x559b
callq 0x4360
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x55b3
callq 0x4360
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x55cb
callq 0x4360
movq -0x138(%rbp), %rdi
leaq -0x128(%rbp), %rax
cmpq %rax, %rdi
je 0x55e3
callq 0x4360
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
cmpq %rax, %rdi
je 0x55fb
callq 0x4360
movq -0x178(%rbp), %rdi
leaq -0x168(%rbp), %rax
cmpq %rax, %rdi
je 0x5613
callq 0x4360
movq -0x198(%rbp), %rdi
leaq -0x188(%rbp), %rax
cmpq %rax, %rdi
je 0x562b
callq 0x4360
movq -0x1b8(%rbp), %rdi
leaq -0x1a8(%rbp), %rax
cmpq %rax, %rdi
je 0x5643
callq 0x4360
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
cmpq %rax, %rdi
je 0x565b
callq 0x4360
movq -0x1f8(%rbp), %rdi
leaq -0x1e8(%rbp), %rax
cmpq %rax, %rdi
je 0x5673
callq 0x4360
movq -0x218(%rbp), %rdi
leaq -0x208(%rbp), %rax
cmpq %rax, %rdi
je 0x568b
callq 0x4360
movq -0x238(%rbp), %rdi
leaq -0x228(%rbp), %rax
cmpq %rax, %rdi
je 0x56a3
callq 0x4360
movq -0x258(%rbp), %rdi
leaq -0x248(%rbp), %rax
cmpq %rax, %rdi
je 0x56bb
callq 0x4360
movq -0x278(%rbp), %rdi
leaq -0x268(%rbp), %rax
cmpq %rax, %rdi
je 0x56d3
callq 0x4360
movq -0x298(%rbp), %rdi
leaq -0x288(%rbp), %rax
cmpq %rax, %rdi
je 0x56eb
callq 0x4360
movq -0x2b8(%rbp), %rdi
leaq -0x2a8(%rbp), %rax
cmpq %rax, %rdi
je 0x5703
callq 0x4360
movq -0x2d8(%rbp), %rdi
leaq -0x2c8(%rbp), %rax
cmpq %rax, %rdi
je 0x571b
callq 0x4360
movq -0x2f8(%rbp), %rdi
leaq -0x2e8(%rbp), %rax
cmpq %rax, %rdi
je 0x5733
callq 0x4360
movq -0x318(%rbp), %rdi
leaq -0x308(%rbp), %rax
cmpq %rax, %rdi
je 0x574b
callq 0x4360
movq -0x338(%rbp), %rdi
leaq -0x328(%rbp), %rax
cmpq %rax, %rdi
je 0x5763
callq 0x4360
movq -0x358(%rbp), %rdi
leaq -0x348(%rbp), %rax
cmpq %rax, %rdi
je 0x577b
callq 0x4360
movq -0x378(%rbp), %rdi
leaq -0x368(%rbp), %rax
cmpq %rax, %rdi
je 0x5793
callq 0x4360
movq -0x398(%rbp), %rdi
leaq -0x388(%rbp), %rax
cmpq %rax, %rdi
je 0x57ab
callq 0x4360
movq -0x628(%rbp), %rdi
cmpq %r13, %rdi
je 0x57bc
callq 0x4360
movq -0x648(%rbp), %rdi
cmpq %r12, %rdi
je 0x57cd
callq 0x4360
leaq -0x730(%rbp), %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0x86f4
movq -0x690(%rbp), %rax
subq -0x698(%rbp), %rax
cmpq $0x60, %rax
je 0x580e
movq 0x2f7ce(%rip), %rax     # 0x34fc8
movq (%rax), %rsi
leaq -0x730(%rbp), %rdi
movl $0x1, %edx
callq 0x8c96
leaq -0x5f8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x219a0(%rip), %rsi     # 0x271c0
leaq 0x219a3(%rip), %rdx     # 0x271ca
leaq -0x608(%rbp), %rdi
callq 0x6e06
leaq -0x730(%rbp), %rdi
leaq -0x608(%rbp), %rsi
callq 0x87ae
cmpb $0x0, 0x4a(%rax)
je 0x5895
xorl %ebx, %ebx
movq -0x608(%rbp), %rdi
cmpq %r14, %rdi
je 0x585f
callq 0x4360
testb %bl, %bl
je 0x58ed
movq 0x2f77a(%rip), %rdi     # 0x34fe8
leaq 0x218be(%rip), %rsi     # 0x27133
movl $0x27, %edx
callq 0x4410
movq 0x2f762(%rip), %rdi     # 0x34fe8
callq 0x4190
movl $0x1, %edi
callq 0x4430
leaq -0x5d8(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x218dc(%rip), %rsi     # 0x27183
leaq 0x218e0(%rip), %rdx     # 0x2718e
leaq -0x5e8(%rbp), %rdi
callq 0x6e06
leaq -0x730(%rbp), %rdi
leaq -0x5e8(%rbp), %rsi
callq 0x87ae
movb 0x4a(%rax), %bl
xorb $0x1, %bl
movq -0x5e8(%rbp), %rdi
cmpq %r15, %rdi
je 0x584e
callq 0x4360
jmp 0x584e
leaq -0x5b8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x218c1(%rip), %rsi     # 0x271c0
leaq 0x218c4(%rip), %rdx     # 0x271ca
leaq -0x5c8(%rbp), %rdi
callq 0x6e06
leaq -0x730(%rbp), %rdi
leaq -0x5c8(%rbp), %rsi
callq 0x87ae
cmpb $0x1, 0x4a(%rax)
jne 0x5979
leaq -0x598(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x21846(%rip), %rsi     # 0x27183
leaq 0x2184a(%rip), %rdx     # 0x2718e
leaq -0x5a8(%rbp), %rdi
callq 0x6e06
leaq -0x730(%rbp), %rdi
leaq -0x5a8(%rbp), %rsi
callq 0x87ae
movb 0x4a(%rax), %bl
movq -0x5a8(%rbp), %rdi
cmpq %r15, %rdi
je 0x597b
callq 0x4360
jmp 0x597b
xorl %ebx, %ebx
movq -0x5c8(%rbp), %rdi
cmpq %r14, %rdi
je 0x598c
callq 0x4360
testb %bl, %bl
je 0x59b9
movq 0x2f651(%rip), %rdi     # 0x34fe8
leaq 0x217bd(%rip), %rsi     # 0x2715b
movl $0x33, %edx
callq 0x4410
movq 0x2f639(%rip), %rdi     # 0x34fe8
callq 0x4190
jmp 0x588b
leaq -0xa8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x418(%rbp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq -0x3c0(%rbp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0x670(%rbp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq -0x698(%rbp), %rax
leaq -0x3f8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x408(%rbp), %rdi
callq 0x6d68
movq -0x698(%rbp), %rax
leaq -0x3d8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x3e8(%rbp), %rdi
callq 0x6d68
movq -0x698(%rbp), %rax
leaq -0x578(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq -0x588(%rbp), %rdi
callq 0x6d68
leaq -0x558(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x21603(%rip), %rsi     # 0x270a0
leaq 0x2160c(%rip), %rdx     # 0x270b0
leaq -0x568(%rbp), %rdi
callq 0x6e06
leaq -0x730(%rbp), %rdi
leaq -0x568(%rbp), %rsi
callq 0x87ae
movb 0x4a(%rax), %al
movb %al, -0x2a(%rbp)
movq -0x568(%rbp), %rdi
cmpq %r14, %rdi
je 0x5ada
callq 0x4360
leaq -0x538(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x215fa(%rip), %rsi     # 0x270e6
leaq 0x215fa(%rip), %rdx     # 0x270ed
leaq -0x548(%rbp), %rdi
callq 0x6e06
leaq -0x730(%rbp), %rdi
leaq -0x548(%rbp), %rsi
callq 0x87ae
movb 0x4a(%rax), %al
movb %al, -0x2b(%rbp)
movq -0x548(%rbp), %rdi
cmpq %r14, %rdi
je 0x5b29
callq 0x4360
leaq -0x518(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x215d2(%rip), %rsi     # 0x2710d
leaq 0x215d0(%rip), %rdx     # 0x27112
leaq -0x528(%rbp), %rdi
callq 0x6e06
leaq -0x730(%rbp), %rdi
leaq -0x528(%rbp), %rsi
callq 0x87ae
movb 0x4a(%rax), %bl
movq -0x528(%rbp), %rdi
cmpq %r14, %rdi
je 0x5b75
callq 0x4360
leaq -0x4f8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x21639(%rip), %rsi     # 0x271c0
leaq 0x2163c(%rip), %rdx     # 0x271ca
leaq -0x508(%rbp), %rdi
callq 0x6e06
leaq -0x730(%rbp), %rdi
leaq -0x508(%rbp), %rsi
callq 0x87ae
movb 0x4a(%rax), %r15b
movq -0x508(%rbp), %rdi
cmpq %r14, %rdi
je 0x5bc2
callq 0x4360
testb %r15b, %r15b
je 0x5d01
leaq -0x4d8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x215e3(%rip), %rsi     # 0x271c0
leaq 0x215e6(%rip), %rdx     # 0x271ca
leaq -0x4e8(%rbp), %rdi
callq 0x6e06
leaq -0x730(%rbp), %rdi
leaq -0x4e8(%rbp), %rsi
callq 0x87ae
movq %rax, %rdi
callq 0x7c3a
leaq -0xb8(%rbp), %rdi
movq %rax, %rsi
callq 0x41d0
movq -0x4e8(%rbp), %rdi
cmpq %r14, %rdi
je 0x5c2b
callq 0x4360
movq 0x2f3b6(%rip), %rdi     # 0x34fe8
leaq 0x21556(%rip), %rsi     # 0x2718f
movl $0x13, %edx
callq 0x4410
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
movq 0x2f390(%rip), %rdi     # 0x34fe8
callq 0x4410
movq %rax, %rdi
callq 0x4190
leaq -0x4b8(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x4c8(%rbp), %rdi
callq 0x6d68
movzbl %bl, %ecx
leaq -0x4c8(%rbp), %rdi
leaq -0x3c8(%rbp), %rsi
leaq -0x64(%rbp), %rdx
callq 0x1e242
movl %eax, %ebx
movq -0x4c8(%rbp), %rdi
cmpq %r14, %rdi
je 0x5cba
callq 0x4360
leaq 0x2f6ff(%rip), %rsi     # 0x353c0
leaq -0x3c8(%rbp), %rdi
callq 0x69f8
movq $0x0, (%rax)
testl %ebx, %ebx
jns 0x5d09
movq 0x2f309(%rip), %rdi     # 0x34fe8
leaq 0x214bd(%rip), %rsi     # 0x271a3
movl $0x27, %edx
callq 0x4410
movq 0x2f2f1(%rip), %rdi     # 0x34fe8
callq 0x4190
jmp 0x588b
xorl %r14d, %r14d
jmp 0x5db7
movq 0x2f2d8(%rip), %rdi     # 0x34fe8
leaq 0x2191f(%rip), %rsi     # 0x27636
movl $0x1, %edx
callq 0x4410
movq 0x2f2c0(%rip), %rdi     # 0x34fe8
leaq 0x2149c(%rip), %rsi     # 0x271cb
movl $0x6, %edx
callq 0x4410
movq -0x3a0(%rbp), %rsi
movq 0x2f2a1(%rip), %rdi     # 0x34fe8
callq 0x4260
movq %rax, %rdi
callq 0x4190
movq 0x2f28d(%rip), %rdi     # 0x34fe8
leaq 0x218d4(%rip), %rsi     # 0x27636
movl $0x1, %edx
callq 0x4410
movq 0x2f275(%rip), %rdi     # 0x34fe8
leaq 0x21458(%rip), %rsi     # 0x271d2
movl $0x17, %edx
callq 0x4410
movl -0x64(%rbp), %esi
movq 0x2f25a(%rip), %rdi     # 0x34fe8
callq 0x4640
movq %rax, %rdi
callq 0x4190
movl $0x120, %edi            # imm = 0x120
callq 0x43a0
movq %rax, %r14
leaq -0x3c8(%rbp), %rsi
movq %rax, %rdi
callq 0xd984
leaq -0x498(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x213ba(%rip), %rsi     # 0x27183
leaq 0x213be(%rip), %rdx     # 0x2718e
leaq -0x4a8(%rbp), %rdi
callq 0x6e06
leaq -0x730(%rbp), %rdi
leaq -0x4a8(%rbp), %rsi
callq 0x87ae
movb 0x4a(%rax), %al
movb %al, -0x29(%rbp)
movq -0x4a8(%rbp), %rdi
cmpq %r15, %rdi
je 0x5e06
callq 0x4360
cmpb $0x0, -0x29(%rbp)
je 0x5fac
leaq -0x478(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x2139e(%rip), %rsi     # 0x271c0
leaq 0x213a1(%rip), %rdx     # 0x271ca
leaq -0x488(%rbp), %rdi
callq 0x6e06
leaq -0x730(%rbp), %rdi
leaq -0x488(%rbp), %rsi
callq 0x87ae
movq %rax, %rdi
callq 0x7c3a
leaq -0x428(%rbp), %rdi
movq %rax, %rsi
callq 0x41d0
movq -0x488(%rbp), %rdi
cmpq %r14, %rdi
je 0x5e70
callq 0x4360
movq 0x2f171(%rip), %rdi     # 0x34fe8
leaq 0x2136c(%rip), %rsi     # 0x271ea
movl $0x14, %edx
callq 0x4410
movq -0x428(%rbp), %rsi
movq -0x420(%rbp), %rdx
movq 0x2f14b(%rip), %rdi     # 0x34fe8
callq 0x4410
movq %rax, %rdi
callq 0x4190
leaq -0x678(%rbp), %rdi
leaq -0x428(%rbp), %rsi
callq 0x2330a
movl %eax, %ebx
leaq -0x678(%rbp), %rdi
leaq -0x3c8(%rbp), %rsi
callq 0x23b46
movl $0x120, %edi            # imm = 0x120
callq 0x43a0
movq %rax, %r14
leaq -0x3c8(%rbp), %rsi
movq %rax, %rdi
callq 0xd984
testl %ebx, %ebx
jns 0x5f1b
movq 0x2f0ef(%rip), %rdi     # 0x34fe8
leaq 0x212ff(%rip), %rsi     # 0x271ff
movl $0x28, %edx
callq 0x4410
movq 0x2f0d7(%rip), %rdi     # 0x34fe8
callq 0x4190
jmp 0x588b
movq 0x2f0c6(%rip), %rdi     # 0x34fe8
leaq 0x2170d(%rip), %rsi     # 0x27636
movl $0x1, %edx
callq 0x4410
movq 0x2f0ae(%rip), %rdi     # 0x34fe8
leaq 0x212e7(%rip), %rsi     # 0x27228
movl $0xc, %edx
callq 0x4410
movq -0x650(%rbp), %rsi
movq 0x2f08f(%rip), %rdi     # 0x34fe8
callq 0x4260
movq %rax, %rdi
callq 0x4190
movq 0x2f07b(%rip), %rdi     # 0x34fe8
leaq 0x216c2(%rip), %rsi     # 0x27636
movl $0x1, %edx
callq 0x4410
movq 0x2f063(%rip), %rdi     # 0x34fe8
leaq 0x212a9(%rip), %rsi     # 0x27235
movl $0xd, %edx
callq 0x4410
movq 0x2f04b(%rip), %rdi     # 0x34fe8
movl %ebx, %esi
callq 0x4640
movq %rax, %rdi
callq 0x4190
movq 0x2f035(%rip), %rdi     # 0x34fe8
leaq 0x21289(%rip), %rsi     # 0x27243
movl $0x11, %edx
callq 0x4410
movq 0x2f01d(%rip), %rdi     # 0x34fe8
callq 0x4190
leaq -0x458(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x408(%rbp), %rsi
movq -0x400(%rbp), %rdx
addq %rsi, %rdx
leaq -0x468(%rbp), %rdi
callq 0x6d68
leaq -0x98(%rbp), %rdi
leaq -0x468(%rbp), %rsi
callq 0x7220
movq -0x468(%rbp), %rdi
cmpq %r15, %rdi
je 0x601c
callq 0x4360
leaq -0x788(%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 -0x758(%rbp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq -0x78(%rbp), %rax
movq %rax, -0x10(%rax)
movq %rcx, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x900(%rbp), %r12
movl $0x1, -0x30(%rbp)
leaq -0x910(%rbp), %r15
movq -0x98(%rbp), %rdi
movq (%rdi), %rax
leaq -0x88(%rbp), %rsi
callq *(%rax)
testb %al, %al
je 0x6338
imull $0xbcbe61d, -0x30(%rbp), %eax # imm = 0xBCBE61D
rorl $0x5, %eax
cmpl $0xa7c5, %eax           # imm = 0xA7C5
ja 0x60cf
movl $0x18, %edx
movq 0x2ef3c(%rip), %rdi     # 0x34fe8
leaq 0x211a2(%rip), %rsi     # 0x27255
callq 0x4410
movq 0x2ef29(%rip), %rdi     # 0x34fe8
movl -0x30(%rbp), %esi
callq 0x4640
movq %rax, %rdi
callq 0x4190
leaq -0x88(%rbp), %rdi
movl $0xa, %esi
callq 0x6973
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, -0x90(%rbp)
cmpb $0x0, -0x2b(%rbp)
je 0x61ad
leaq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x58(%rbp)
movb $0x0, -0x50(%rbp)
movq %r15, %rdi
leaq -0x88(%rbp), %rsi
movl $0x8, %edx
callq 0x45f0
movq -0x910(%rbp), %rax
movq -0x18(%rax), %rax
orl $0x1000, -0x8f8(%rbp,%rax) # imm = 0x1000
movq %r15, %rdi
leaq -0x90(%rbp), %rsi
callq 0x4250
movq %r15, %rdi
leaq -0x60(%rbp), %rsi
callq 0x40a0
leaq -0x60(%rbp), %rdi
movl $0x9, %esi
callq 0x6973
leaq -0x60(%rbp), %rdi
movl $0x20, %esi
callq 0x6973
leaq -0x88(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x41d0
movq %r15, %rdi
movq 0x2ee26(%rip), %rsi     # 0x34fb0
callq 0x44e0
leaq -0x898(%rbp), %rdi
callq 0x4120
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x61ad
callq 0x4360
cmpq $0x0, -0x80(%rbp)
je 0x6221
movl $0x1, %ebx
xorl %eax, %eax
movq -0x88(%rbp), %rcx
movb (%rcx,%rax), %al
movq %r12, -0x910(%rbp)
movb %al, -0x900(%rbp)
movq $0x1, -0x908(%rbp)
movb $0x0, -0x8ff(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xdf96
testb %al, %al
jne 0x6206
movq %r14, %rdi
movq %r15, %rsi
movsd 0x20e07(%rip), %xmm0    # 0x27008
callq 0xdc30
movq -0x910(%rbp), %rdi
cmpq %r12, %rdi
je 0x6217
callq 0x4360
movl %ebx, %eax
incl %ebx
cmpq %rax, -0x80(%rbp)
ja 0x61bb
movl $0x0, -0x58(%rbp)
xorl %eax, %eax
movq %rax, -0x50(%rbp)
leaq -0x58(%rbp), %rcx
movq %rcx, -0x48(%rbp)
movq %rcx, -0x40(%rbp)
movq %rax, -0x38(%rbp)
cmpb $0x0, -0x29(%rbp)
je 0x627b
movq %r15, %rdi
leaq -0x88(%rbp), %rsi
leaq 0x2f16b(%rip), %rdx     # 0x353c0
movq %r14, %rcx
xorl %r8d, %r8d
callq 0xf5d0
cmpb $0x0, -0x2a(%rbp)
je 0x62b2
leaq -0x678(%rbp), %rdi
movq %r15, %rsi
leaq -0x60(%rbp), %rdx
callq 0x1933e
jmp 0x62cd
cmpb $0x0, -0x2a(%rbp)
je 0x62d7
movq %r15, %rdi
leaq -0x88(%rbp), %rsi
leaq 0x2f12e(%rip), %rdx     # 0x353c0
movq %r14, %rcx
xorl %r8d, %r8d
callq 0xf5d0
leaq -0x3c8(%rbp), %rdi
movq %r15, %rsi
leaq -0x60(%rbp), %rdx
callq 0x19ad7
jmp 0x62cd
leaq -0x678(%rbp), %rdi
movq %r15, %rsi
leaq -0x60(%rbp), %rdx
movsd 0x20d48(%rip), %xmm0    # 0x27010
callq 0x18e04
movq %r15, %rdi
callq 0x10fbc
jmp 0x6308
movq %r15, %rdi
leaq -0x3c8(%rbp), %rsi
callq 0xd984
movq %r15, %rdi
leaq -0x88(%rbp), %rsi
leaq -0x60(%rbp), %rdx
leaq 0x2f0c5(%rip), %rcx     # 0x353c0
callq 0x188e7
movq %r15, %rdi
callq 0xdd04
movsd -0x90(%rbp), %xmm0
leaq -0x60(%rbp), %rdi
leaq -0x760(%rbp), %rsi
leaq -0x790(%rbp), %rdx
callq 0x22a26
incl -0x30(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x6a86
jmp 0x6074
testq %r14, %r14
je 0x634d
movq %r14, %rdi
callq 0xdd04
movq %r14, %rdi
callq 0x4360
leaq -0x438(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x3e8(%rbp), %rsi
movq -0x3e0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x448(%rbp), %rdi
callq 0x6d68
leaq -0x448(%rbp), %rdi
leaq -0x790(%rbp), %rsi
movl $0x1, %edx
movl $0xa, %ecx
callq 0x1e6a2
movq -0x448(%rbp), %rdi
cmpq %r14, %rdi
je 0x63a3
callq 0x4360
leaq -0x760(%rbp), %rdi
leaq -0x588(%rbp), %rsi
movl $0x1, %edx
movl $0xa, %ecx
callq 0x22fce
xorl %edi, %edi
callq 0x4430
jmp 0x6468
movq %rax, %rbx
movq -0x448(%rbp), %rdi
cmpq %r14, %rdi
jne 0x6461
jmp 0x646b
jmp 0x640e
movq %rax, %rbx
leaq -0x910(%rbp), %rdi
callq 0xdd04
jmp 0x6411
jmp 0x640e
jmp 0x63fb
movq %rax, %rbx
leaq -0x910(%rbp), %rdi
callq 0x10fbc
jmp 0x6411
jmp 0x640e
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x6a86
jmp 0x646b
movq %rax, %rbx
movq -0x910(%rbp), %rdi
cmpq %r12, %rdi
jne 0x6461
jmp 0x646b
movq %rax, %rbx
movq 0x2eb79(%rip), %rsi     # 0x34fb0
leaq -0x910(%rbp), %rdi
callq 0x44e0
leaq -0x898(%rbp), %rdi
callq 0x4120
jmp 0x6454
movq %rax, %rbx
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x646b
callq 0x4360
jmp 0x646b
movq %rax, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x6480
callq 0x4360
leaq -0x760(%rbp), %rdi
callq 0x6a86
leaq -0x790(%rbp), %rdi
callq 0x6b14
leaq -0x98(%rbp), %rdi
callq 0x7372
jmp 0x654e
movq %rax, %rbx
movq -0x468(%rbp), %rdi
jmp 0x64de
jmp 0x654b
jmp 0x654b
jmp 0x654b
jmp 0x64e7
movq %rax, %rbx
movq -0x488(%rbp), %rdi
jmp 0x653f
jmp 0x654b
movq %rax, %rbx
movq -0x4a8(%rbp), %rdi
cmpq %r15, %rdi
jne 0x6544
jmp 0x654e
jmp 0x654b
movq %rax, %rbx
movq %r14, %rdi
jmp 0x6544
jmp 0x654b
movq %rax, %rbx
movq -0x4c8(%rbp), %rdi
jmp 0x653f
movq %rax, %rbx
movq -0x4e8(%rbp), %rdi
jmp 0x653f
jmp 0x654b
movq %rax, %rbx
movq -0x508(%rbp), %rdi
jmp 0x653f
jmp 0x654b
movq %rax, %rbx
movq -0x528(%rbp), %rdi
jmp 0x653f
jmp 0x654b
movq %rax, %rbx
movq -0x548(%rbp), %rdi
jmp 0x653f
jmp 0x654b
movq %rax, %rbx
movq -0x568(%rbp), %rdi
cmpq %r14, %rdi
je 0x654e
callq 0x4360
jmp 0x654e
movq %rax, %rbx
movq -0x588(%rbp), %rdi
leaq -0x578(%rbp), %rax
cmpq %rax, %rdi
je 0x656b
callq 0x4360
jmp 0x656b
movq %rax, %rbx
movq -0x3e8(%rbp), %rdi
leaq -0x3d8(%rbp), %rax
cmpq %rax, %rdi
je 0x6588
callq 0x4360
jmp 0x6588
movq %rax, %rbx
movq -0x408(%rbp), %rdi
leaq -0x3f8(%rbp), %rax
cmpq %rax, %rdi
je 0x65bb
callq 0x4360
jmp 0x65bb
movq %rax, %rbx
movq -0x5a8(%rbp), %rdi
cmpq %r15, %rdi
je 0x6605
callq 0x4360
jmp 0x6605
movq %rax, %rbx
leaq -0x678(%rbp), %rdi
callq 0x6a86
leaq -0x3c8(%rbp), %rdi
callq 0x6b14
movq -0x428(%rbp), %rdi
cmpq %r13, %rdi
je 0x65e4
callq 0x4360
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
jne 0x6919
jmp 0x6923
jmp 0x6602
movq %rax, %rbx
movq -0x5c8(%rbp), %rdi
jmp 0x6635
movq %rax, %rbx
movq -0x5e8(%rbp), %rdi
cmpq %r15, %rdi
je 0x662e
callq 0x4360
jmp 0x662e
jmp 0x6920
jmp 0x662b
movq %rax, %rbx
movq -0x608(%rbp), %rdi
cmpq %r14, %rdi
jne 0x6919
jmp 0x6923
jmp 0x6920
jmp 0x6920
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x666d
callq 0x4360
jmp 0x666d
movq %rax, %rbx
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x668a
callq 0x4360
jmp 0x668a
movq %rax, %rbx
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x66a7
callq 0x4360
jmp 0x66a7
movq %rax, %rbx
movq -0x138(%rbp), %rdi
leaq -0x128(%rbp), %rax
cmpq %rax, %rdi
je 0x66c6
callq 0x4360
jmp 0x66c6
jmp 0x66c3
movq %rax, %rbx
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
cmpq %rax, %rdi
je 0x66e3
callq 0x4360
jmp 0x66e3
movq %rax, %rbx
movq -0x178(%rbp), %rdi
leaq -0x168(%rbp), %rax
cmpq %rax, %rdi
je 0x6700
callq 0x4360
jmp 0x6700
movq %rax, %rbx
movq -0x198(%rbp), %rdi
leaq -0x188(%rbp), %rax
cmpq %rax, %rdi
je 0x671d
callq 0x4360
jmp 0x671d
movq %rax, %rbx
movq -0x1b8(%rbp), %rdi
leaq -0x1a8(%rbp), %rax
cmpq %rax, %rdi
je 0x673c
callq 0x4360
jmp 0x673c
jmp 0x6739
movq %rax, %rbx
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
cmpq %rax, %rdi
je 0x6759
callq 0x4360
jmp 0x6759
movq %rax, %rbx
movq -0x1f8(%rbp), %rdi
leaq -0x1e8(%rbp), %rax
cmpq %rax, %rdi
je 0x6776
callq 0x4360
jmp 0x6776
movq %rax, %rbx
movq -0x218(%rbp), %rdi
leaq -0x208(%rbp), %rax
cmpq %rax, %rdi
je 0x6793
callq 0x4360
jmp 0x6793
movq %rax, %rbx
movq -0x238(%rbp), %rdi
leaq -0x228(%rbp), %rax
cmpq %rax, %rdi
je 0x67b2
callq 0x4360
jmp 0x67b2
jmp 0x67af
movq %rax, %rbx
movq -0x258(%rbp), %rdi
leaq -0x248(%rbp), %rax
cmpq %rax, %rdi
je 0x67cf
callq 0x4360
jmp 0x67cf
movq %rax, %rbx
movq -0x278(%rbp), %rdi
leaq -0x268(%rbp), %rax
cmpq %rax, %rdi
je 0x67ec
callq 0x4360
jmp 0x67ec
movq %rax, %rbx
movq -0x298(%rbp), %rdi
leaq -0x288(%rbp), %rax
cmpq %rax, %rdi
je 0x6809
callq 0x4360
jmp 0x6809
movq %rax, %rbx
movq -0x2b8(%rbp), %rdi
leaq -0x2a8(%rbp), %rax
cmpq %rax, %rdi
je 0x6828
callq 0x4360
jmp 0x6828
jmp 0x6825
movq %rax, %rbx
movq -0x2d8(%rbp), %rdi
leaq -0x2c8(%rbp), %rax
cmpq %rax, %rdi
je 0x6845
callq 0x4360
jmp 0x6845
movq %rax, %rbx
movq -0x2f8(%rbp), %rdi
leaq -0x2e8(%rbp), %rax
cmpq %rax, %rdi
je 0x6862
callq 0x4360
jmp 0x6862
movq %rax, %rbx
movq -0x318(%rbp), %rdi
leaq -0x308(%rbp), %rax
cmpq %rax, %rdi
je 0x687f
callq 0x4360
jmp 0x687f
movq %rax, %rbx
movq -0x338(%rbp), %rdi
leaq -0x328(%rbp), %rax
cmpq %rax, %rdi
je 0x689e
callq 0x4360
jmp 0x689e
jmp 0x689b
movq %rax, %rbx
movq -0x358(%rbp), %rdi
leaq -0x348(%rbp), %rax
cmpq %rax, %rdi
je 0x68bb
callq 0x4360
jmp 0x68bb
movq %rax, %rbx
movq -0x378(%rbp), %rdi
leaq -0x368(%rbp), %rax
cmpq %rax, %rdi
je 0x68d8
callq 0x4360
jmp 0x68d8
movq %rax, %rbx
movq -0x398(%rbp), %rdi
leaq -0x388(%rbp), %rax
cmpq %rax, %rdi
je 0x68f5
callq 0x4360
jmp 0x68f5
movq %rax, %rbx
movq -0x628(%rbp), %rdi
cmpq %r13, %rdi
je 0x690d
callq 0x4360
jmp 0x690d
jmp 0x690a
movq %rax, %rbx
movq -0x648(%rbp), %rdi
cmpq %r12, %rdi
je 0x6923
callq 0x4360
jmp 0x6923
movq %rax, %rbx
leaq -0x698(%rbp), %rdi
callq 0x6ba8
leaq -0x6c8(%rbp), %rdi
callq 0x6c34
leaq -0x6f8(%rbp), %rdi
callq 0x6c9e
leaq -0x710(%rbp), %r14
movq %r14, %rdi
callq 0x6c00
movq -0x20(%r14), %rdi
leaq -0x720(%rbp), %rax
cmpq %rax, %rdi
je 0x696b
callq 0x4360
movq %rbx, %rdi
callq 0x4670