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

    string vocab_fname;
    string trans_fname;
    int maxlen;
    map<string, flt_type> vocab;
    StringSet *ss_vocab = NULL;
    transitions_t transitions;
    flt_type one_char_min_lp = -50.0;
    bool unigram = true;

    conf::Config config;
    config("usage: segtext [OPTION...] INPUT OUTPUT\n")
      ('h', "help", "", "", "display help")
      ('v', "vocabulary=FILE", "arg", "", "Unigram model file")
      ('t', "transitions=FILE", "arg", "", "Bigram model file")
      ('8', "utf-8", "", "", "Utf-8 character encoding in use");
    config.default_parse(argc, argv);
    if (config.arguments.size() != 2) config.print_help(stderr, 1);

    bool utf8_encoding = config["utf-8"].specified;
    string in_fname = config.arguments[0];
    string out_fname = config.arguments[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);
    }

    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);
        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["transitions"].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 size: " << transitions.size() << endl;
        cerr << "\t" << "transitions: " << retval << endl;
    }

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

    string line;
    while (infile.getline(line)) {

        vector<unsigned int> char_positions;
        get_character_positions(line, char_positions, utf8_encoding);
        for (unsigned int i=0; i<char_positions.size()-1; i++) {
            unsigned int start_pos = char_positions[i];
            unsigned int end_pos = char_positions[i+1];
            string currchr = line.substr(start_pos, end_pos-start_pos);
            if (!ss_vocab->includes(currchr))
                ss_vocab->add(currchr, one_char_min_lp);
        }

        vector<string> best_path;
        if (unigram)
            viterbi(*ss_vocab, line, best_path, true, utf8_encoding);
        else {
            FactorGraph fg(line, start_end_symbol, *ss_vocab);
            viterbi(transitions, fg, best_path);
            best_path.erase(best_path.begin());
            best_path.erase(best_path.end());
        }

        if (best_path.size() == 0) {
            cerr << "warning, no segmentation for line: " << line << endl;
            continue;
        }

        for (unsigned int i=0; i<best_path.size(); i++) {
            if (best_path[i] == " ")
                outfile << "\t";
            else {
                if (i>0) outfile << " ";
                outfile << best_path[i];
            }
        }
        outfile << "\n";
    }

    outfile.close();
    if (ss_vocab != NULL) delete ss_vocab;
    exit(EXIT_SUCCESS);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x638, %rsp            # imm = 0x638
movq %rsi, %rbx
movl %edi, %r14d
leaq -0x350(%rbp), %r13
movq %r13, -0x10(%r13)
xorl %eax, %eax
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq -0x3b0(%rbp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq -0x568(%rbp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0x598(%rbp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0x658(%rbp), %rdi
callq 0x775a
leaq -0x330(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21ee0(%rip), %rsi     # 0x27020
leaq 0x21f01(%rip), %rdx     # 0x27048
leaq -0x340(%rbp), %rdi
callq 0x6c20
leaq -0x658(%rbp), %rdi
leaq -0x340(%rbp), %rsi
callq 0x77c0
movq %rax, %r15
leaq -0x310(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21ed6(%rip), %rsi     # 0x27051
leaq 0x21ed3(%rip), %rdx     # 0x27055
leaq -0x320(%rbp), %rdi
callq 0x6c20
leaq -0x2f0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x22417(%rip), %rdx     # 0x275b7
leaq -0x300(%rbp), %rdi
movq %rdx, %rsi
callq 0x6c20
leaq -0x2d0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x223f6(%rip), %rdx     # 0x275b7
leaq -0x2e0(%rbp), %rdi
movq %rdx, %rsi
callq 0x6c20
leaq -0x2b0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21e67(%rip), %rsi     # 0x27049
leaq 0x21e6c(%rip), %rdx     # 0x27055
leaq -0x2c0(%rbp), %rdi
callq 0x6c20
leaq -0x320(%rbp), %rdx
leaq -0x300(%rbp), %rcx
leaq -0x2e0(%rbp), %r8
leaq -0x2c0(%rbp), %r9
movq %r15, %rdi
movl $0x68, %esi
callq 0x77d8
movq %rax, %r15
leaq -0x290(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21e23(%rip), %rsi     # 0x27056
leaq 0x21e2b(%rip), %rdx     # 0x27065
leaq -0x2a0(%rbp), %rdi
callq 0x6c20
leaq -0x270(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21e0e(%rip), %rsi     # 0x27066
leaq 0x21e0a(%rip), %rdx     # 0x27069
leaq -0x280(%rbp), %rdi
callq 0x6c20
leaq -0x250(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2233a(%rip), %rdx     # 0x275b7
leaq -0x260(%rbp), %rdi
movq %rdx, %rsi
callq 0x6c20
leaq -0x230(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21dcc(%rip), %rsi     # 0x2706a
leaq 0x21dd7(%rip), %rdx     # 0x2707c
leaq -0x240(%rbp), %rdi
callq 0x6c20
leaq -0x2a0(%rbp), %rdx
leaq -0x280(%rbp), %rcx
leaq -0x260(%rbp), %r8
leaq -0x240(%rbp), %r9
movq %r15, %rdi
movl $0x76, %esi
callq 0x77d8
movq %rax, %r15
leaq -0x210(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21d8e(%rip), %rsi     # 0x2707d
leaq 0x21d97(%rip), %rdx     # 0x2708d
leaq -0x220(%rbp), %rdi
callq 0x6c20
leaq -0x1f0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21d52(%rip), %rsi     # 0x27066
leaq 0x21d4e(%rip), %rdx     # 0x27069
leaq -0x200(%rbp), %rdi
callq 0x6c20
leaq -0x1d0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2227e(%rip), %rdx     # 0x275b7
leaq -0x1e0(%rbp), %rdi
movq %rdx, %rsi
callq 0x6c20
leaq -0x1b0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21d34(%rip), %rsi     # 0x2708e
leaq 0x21d3e(%rip), %rdx     # 0x2709f
leaq -0x1c0(%rbp), %rdi
callq 0x6c20
leaq -0x220(%rbp), %rdx
leaq -0x200(%rbp), %rcx
leaq -0x1e0(%rbp), %r8
leaq -0x1c0(%rbp), %r9
movq %r15, %rdi
movl $0x74, %esi
callq 0x77d8
movq %rax, %r15
leaq -0x190(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21cf5(%rip), %rsi     # 0x270a0
leaq 0x21cf3(%rip), %rdx     # 0x270a5
leaq -0x1a0(%rbp), %rdi
callq 0x6c20
leaq -0x170(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x221e7(%rip), %rdx     # 0x275b7
leaq -0x180(%rbp), %rdi
movq %rdx, %rsi
callq 0x6c20
leaq -0x150(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x221c6(%rip), %rdx     # 0x275b7
leaq -0x160(%rbp), %rdi
movq %rdx, %rsi
callq 0x6c20
leaq -0x130(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21c94(%rip), %rsi     # 0x270a6
leaq 0x21cac(%rip), %rdx     # 0x270c5
leaq -0x140(%rbp), %rdi
callq 0x6c20
leaq -0x1a0(%rbp), %rdx
leaq -0x180(%rbp), %rcx
leaq -0x160(%rbp), %r8
leaq -0x140(%rbp), %r9
movq %r15, %rdi
movl $0x38, %esi
callq 0x77d8
movq -0x140(%rbp), %rdi
leaq -0x130(%rbp), %rax
cmpq %rax, %rdi
je 0x5466
callq 0x4350
movq -0x160(%rbp), %rdi
leaq -0x150(%rbp), %rax
cmpq %rax, %rdi
je 0x547e
callq 0x4350
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
cmpq %rax, %rdi
je 0x5496
callq 0x4350
movq -0x1a0(%rbp), %rdi
leaq -0x190(%rbp), %rax
cmpq %rax, %rdi
je 0x54ae
callq 0x4350
movq -0x1c0(%rbp), %rdi
leaq -0x1b0(%rbp), %rax
cmpq %rax, %rdi
je 0x54c6
callq 0x4350
movq -0x1e0(%rbp), %rdi
leaq -0x1d0(%rbp), %rax
cmpq %rax, %rdi
je 0x54de
callq 0x4350
movq -0x200(%rbp), %rdi
leaq -0x1f0(%rbp), %rax
cmpq %rax, %rdi
je 0x54f6
callq 0x4350
movq -0x220(%rbp), %rdi
leaq -0x210(%rbp), %rax
cmpq %rax, %rdi
je 0x550e
callq 0x4350
movq -0x240(%rbp), %rdi
leaq -0x230(%rbp), %rax
cmpq %rax, %rdi
je 0x5526
callq 0x4350
movq -0x260(%rbp), %rdi
leaq -0x250(%rbp), %rax
cmpq %rax, %rdi
je 0x553e
callq 0x4350
movq -0x280(%rbp), %rdi
leaq -0x270(%rbp), %rax
cmpq %rax, %rdi
je 0x5556
callq 0x4350
movq -0x2a0(%rbp), %rdi
leaq -0x290(%rbp), %rax
cmpq %rax, %rdi
je 0x556e
callq 0x4350
movq -0x2c0(%rbp), %rdi
leaq -0x2b0(%rbp), %rax
cmpq %rax, %rdi
je 0x5586
callq 0x4350
movq -0x2e0(%rbp), %rdi
leaq -0x2d0(%rbp), %rax
cmpq %rax, %rdi
je 0x559e
callq 0x4350
movq -0x300(%rbp), %rdi
leaq -0x2f0(%rbp), %rax
cmpq %rax, %rdi
je 0x55b6
callq 0x4350
movq -0x320(%rbp), %rdi
leaq -0x310(%rbp), %rax
cmpq %rax, %rdi
je 0x55ce
callq 0x4350
movq -0x340(%rbp), %rdi
leaq -0x330(%rbp), %rax
cmpq %rax, %rdi
je 0x55e6
callq 0x4350
leaq -0x658(%rbp), %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0x8226
movq -0x5b8(%rbp), %rax
subq -0x5c0(%rbp), %rax
cmpq $0x40, %rax
je 0x5627
movq 0x2f9b5(%rip), %rax     # 0x34fc8
movq (%rax), %rsi
leaq -0x658(%rbp), %rdi
movl $0x1, %edx
callq 0x87c8
leaq -0x530(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x21a67(%rip), %rsi     # 0x270a0
leaq 0x21a65(%rip), %rdx     # 0x270a5
leaq -0x540(%rbp), %rdi
callq 0x6c20
leaq -0x658(%rbp), %rdi
leaq -0x540(%rbp), %rsi
callq 0x82e0
movb 0x4a(%rax), %al
movb %al, -0x3c(%rbp)
movq -0x540(%rbp), %rdi
cmpq %r14, %rdi
je 0x5676
callq 0x4350
movq -0x5c0(%rbp), %rax
leaq -0x390(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x3a0(%rbp), %rdi
callq 0x6b86
movq -0x5c0(%rbp), %rax
leaq -0x370(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x380(%rbp), %rdi
callq 0x6b86
leaq -0x510(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x21a7a(%rip), %rsi     # 0x27153
leaq 0x21a7d(%rip), %rdx     # 0x2715d
leaq -0x520(%rbp), %rdi
callq 0x6c20
leaq -0x658(%rbp), %rdi
leaq -0x520(%rbp), %rsi
callq 0x82e0
movb 0x4a(%rax), %bl
testb %bl, %bl
je 0x570b
xorl %r15d, %r15d
jmp 0x574b
leaq -0x4f0(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x219f9(%rip), %rsi     # 0x27116
leaq 0x219fd(%rip), %rdx     # 0x27121
leaq -0x500(%rbp), %rdi
callq 0x6c20
leaq -0x658(%rbp), %rdi
leaq -0x500(%rbp), %rsi
callq 0x82e0
movb 0x4a(%rax), %r15b
xorb $0x1, %r15b
testb %bl, %bl
jne 0x5764
leaq -0x4f0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5764
callq 0x4350
movq -0x520(%rbp), %rdi
cmpq %r14, %rdi
je 0x5775
callq 0x4350
testb %r15b, %r15b
je 0x57a8
movq 0x2f867(%rip), %rdi     # 0x34fe8
leaq 0x2193e(%rip), %rsi     # 0x270c6
movl $0x27, %edx
callq 0x4400
movq 0x2f84f(%rip), %rdi     # 0x34fe8
callq 0x4180
movl $0x1, %edi
callq 0x4420
leaq -0x4d0(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x21999(%rip), %rsi     # 0x27153
leaq 0x2199c(%rip), %rdx     # 0x2715d
leaq -0x4e0(%rbp), %rdi
callq 0x6c20
leaq -0x658(%rbp), %rdi
leaq -0x4e0(%rbp), %rsi
callq 0x82e0
movb 0x4a(%rax), %bl
cmpb $0x1, %bl
jne 0x5826
leaq -0x4b0(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x2191c(%rip), %rsi     # 0x27116
leaq 0x21920(%rip), %rdx     # 0x27121
leaq -0x4c0(%rbp), %rdi
callq 0x6c20
leaq -0x658(%rbp), %rdi
leaq -0x4c0(%rbp), %rsi
callq 0x82e0
movb 0x4a(%rax), %r15b
jmp 0x5829
xorl %r15d, %r15d
testb %bl, %bl
je 0x5842
leaq -0x4b0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5842
callq 0x4350
movq -0x4e0(%rbp), %rdi
cmpq %r14, %rdi
je 0x5853
callq 0x4350
testb %r15b, %r15b
je 0x5881
movq 0x2f789(%rip), %rdi     # 0x34fe8
leaq 0x21888(%rip), %rsi     # 0x270ee
movl $0x33, %edx
callq 0x4400
movq 0x2f771(%rip), %rdi     # 0x34fe8
callq 0x4180
jmp 0x579e
leaq -0x490(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x218c0(%rip), %rsi     # 0x27153
leaq 0x218c3(%rip), %rdx     # 0x2715d
leaq -0x4a0(%rbp), %rdi
callq 0x6c20
leaq -0x658(%rbp), %rdi
leaq -0x4a0(%rbp), %rsi
callq 0x82e0
movb 0x4a(%rax), %bl
movq -0x4a0(%rbp), %rdi
cmpq %r14, %rdi
je 0x58cd
callq 0x4350
testb %bl, %bl
je 0x59f6
leaq -0x470(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x2186c(%rip), %rsi     # 0x27153
leaq 0x2186f(%rip), %rdx     # 0x2715d
leaq -0x480(%rbp), %rdi
callq 0x6c20
leaq -0x658(%rbp), %rdi
leaq -0x480(%rbp), %rsi
callq 0x82e0
movq %rax, %rdi
callq 0x7746
leaq -0x360(%rbp), %rdi
movq %rax, %rsi
callq 0x41c0
movq -0x480(%rbp), %rdi
cmpq %r14, %rdi
je 0x5935
callq 0x4350
movq 0x2f6ac(%rip), %rdi     # 0x34fe8
leaq 0x217df(%rip), %rsi     # 0x27122
movl $0x13, %edx
callq 0x4400
movq -0x360(%rbp), %rsi
movq -0x358(%rbp), %rdx
movq 0x2f686(%rip), %rdi     # 0x34fe8
callq 0x4400
movq %rax, %rdi
callq 0x4180
leaq -0x450(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x360(%rbp), %rsi
movq -0x358(%rbp), %rdx
addq %rsi, %rdx
leaq -0x460(%rbp), %rdi
callq 0x6b86
movzbl -0x3c(%rbp), %ecx
leaq -0x460(%rbp), %rdi
leaq -0x570(%rbp), %rsi
leaq -0x64(%rbp), %rdx
callq 0x1e0a2
movl %eax, %ebx
movq -0x460(%rbp), %rdi
cmpq %r14, %rdi
je 0x59c5
callq 0x4350
testl %ebx, %ebx
jns 0x5b68
movq 0x2f614(%rip), %rdi     # 0x34fe8
leaq 0x2175b(%rip), %rsi     # 0x27136
movl $0x27, %edx
callq 0x4400
movq 0x2f5fc(%rip), %rdi     # 0x34fe8
callq 0x4180
jmp 0x579e
movq $0x0, -0x38(%rbp)
leaq -0x430(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x21706(%rip), %rsi     # 0x27116
leaq 0x2170a(%rip), %rdx     # 0x27121
leaq -0x440(%rbp), %rdi
callq 0x6c20
leaq -0x658(%rbp), %rdi
leaq -0x440(%rbp), %rsi
callq 0x82e0
movb 0x4a(%rax), %al
movb %al, -0x29(%rbp)
movq -0x440(%rbp), %rdi
cmpq %r14, %rdi
je 0x5a4d
callq 0x4350
cmpb $0x0, -0x29(%rbp)
je 0x5cae
leaq -0x410(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x216ad(%rip), %rsi     # 0x27116
leaq 0x216b1(%rip), %rdx     # 0x27121
leaq -0x420(%rbp), %rdi
callq 0x6c20
leaq -0x658(%rbp), %rdi
leaq -0x420(%rbp), %rsi
callq 0x82e0
movq %rax, %rdi
callq 0x7746
leaq -0x3c0(%rbp), %rdi
movq %rax, %rsi
callq 0x41c0
movq -0x420(%rbp), %rdi
cmpq %r14, %rdi
je 0x5ab7
callq 0x4350
movq 0x2f52a(%rip), %rdi     # 0x34fe8
leaq 0x216b1(%rip), %rsi     # 0x27176
movl $0x14, %edx
callq 0x4400
movq -0x3c0(%rbp), %rsi
movq -0x3b8(%rbp), %rdx
movq 0x2f504(%rip), %rdi     # 0x34fe8
callq 0x4400
movq %rax, %rdi
callq 0x4180
leaq -0x5a0(%rbp), %rdi
leaq -0x3c0(%rbp), %rsi
callq 0x23216
movl %eax, %ebx
leaq -0x5a0(%rbp), %rdi
leaq -0x570(%rbp), %rsi
callq 0x23a0e
movl $0x120, %edi            # imm = 0x120
callq 0x4390
movq %rax, -0x38(%rbp)
leaq -0x570(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0xd53c
testl %ebx, %ebx
jns 0x5c1d
movq 0x2f4a2(%rip), %rdi     # 0x34fe8
leaq 0x2163e(%rip), %rsi     # 0x2718b
movl $0x28, %edx
callq 0x4400
movq 0x2f48a(%rip), %rdi     # 0x34fe8
callq 0x4180
jmp 0x579e
movq 0x2f479(%rip), %rdi     # 0x34fe8
leaq 0x21a40(%rip), %rsi     # 0x275b6
movl $0x1, %edx
callq 0x4400
movq 0x2f461(%rip), %rdi     # 0x34fe8
leaq 0x21631(%rip), %rsi     # 0x271bf
movl $0x6, %edx
callq 0x4400
movq -0x548(%rbp), %rsi
movq 0x2f442(%rip), %rdi     # 0x34fe8
callq 0x4250
movq %rax, %rdi
callq 0x4180
movq 0x2f42e(%rip), %rdi     # 0x34fe8
leaq 0x219f5(%rip), %rsi     # 0x275b6
movl $0x1, %edx
callq 0x4400
movq 0x2f416(%rip), %rdi     # 0x34fe8
leaq 0x21585(%rip), %rsi     # 0x2715e
movl $0x17, %edx
callq 0x4400
movl -0x64(%rbp), %esi
movq 0x2f3fb(%rip), %rdi     # 0x34fe8
callq 0x4610
movq %rax, %rdi
callq 0x4180
movl $0x120, %edi            # imm = 0x120
callq 0x4390
movq %rax, -0x38(%rbp)
leaq -0x570(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0xd53c
jmp 0x59fe
movq 0x2f3c4(%rip), %rdi     # 0x34fe8
leaq 0x2198b(%rip), %rsi     # 0x275b6
movl $0x1, %edx
callq 0x4400
movq 0x2f3ac(%rip), %rdi     # 0x34fe8
leaq 0x21571(%rip), %rsi     # 0x271b4
movl $0x11, %edx
callq 0x4400
movq -0x578(%rbp), %rsi
movq 0x2f38d(%rip), %rdi     # 0x34fe8
callq 0x4250
movq %rax, %rdi
callq 0x4180
movq 0x2f379(%rip), %rdi     # 0x34fe8
leaq 0x21940(%rip), %rsi     # 0x275b6
movl $0x1, %edx
callq 0x4400
movq 0x2f361(%rip), %rdi     # 0x34fe8
leaq 0x21538(%rip), %rsi     # 0x271c6
movl $0xd, %edx
callq 0x4400
movq 0x2f349(%rip), %rdi     # 0x34fe8
movl %ebx, %esi
callq 0x4610
movq %rax, %rdi
callq 0x4180
movq 0x2f333(%rip), %rdi     # 0x34fe8
leaq 0x21518(%rip), %rsi     # 0x271d4
movl $0x11, %edx
callq 0x4400
movq 0x2f31b(%rip), %rdi     # 0x34fe8
callq 0x4180
leaq -0x3f0(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x3a0(%rbp), %rsi
movq -0x398(%rbp), %rdx
addq %rsi, %rdx
leaq -0x400(%rbp), %rdi
callq 0x6b86
leaq -0x88(%rbp), %rdi
leaq -0x400(%rbp), %rsi
callq 0x6d2c
movq -0x400(%rbp), %rdi
cmpq %r14, %rdi
je 0x5d1e
callq 0x4350
leaq -0x3d0(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x380(%rbp), %rsi
movq -0x378(%rbp), %rdx
addq %rsi, %rdx
leaq -0x3e0(%rbp), %rdi
callq 0x6b86
leaq -0x48(%rbp), %rdi
leaq -0x3e0(%rbp), %rsi
callq 0x6f7e
movq -0x3e0(%rbp), %rdi
cmpq %r14, %rdi
je 0x5d67
callq 0x4350
leaq -0x98(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movzbl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x88(%rbp), %rdi
movq (%rdi), %rax
leaq -0xa8(%rbp), %rsi
callq *(%rax)
testb %al, %al
je 0x60af
xorps %xmm0, %xmm0
movaps %xmm0, -0x80(%rbp)
movq $0x0, -0x70(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
movl -0x3c(%rbp), %edx
callq 0x6559
movq -0x80(%rbp), %rax
movq -0x78(%rbp), %rcx
subq %rax, %rcx
cmpq $0x4, %rcx
je 0x5e5b
movl $0x1, %ebx
xorl %r14d, %r14d
movl (%rax,%r14,4), %edx
movl %ebx, %r14d
movl (%rax,%r14,4), %ecx
subl %edx, %ecx
leaq -0x120(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x43b0
movq -0x38(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0xdb1e
testb %al, %al
jne 0x5e2a
movq -0x38(%rbp), %rdi
leaq -0x120(%rbp), %rsi
movsd 0x211e3(%rip), %xmm0    # 0x27008
callq 0xd7b4
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x5e42
callq 0x4350
movq -0x80(%rbp), %rax
movq -0x78(%rbp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
decq %rcx
incl %ebx
cmpq %r14, %rcx
ja 0x5dde
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
movq $0x0, -0x50(%rbp)
cmpb $0x0, -0x29(%rbp)
je 0x5ed5
leaq -0x120(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
leaq 0x2f523(%rip), %rdx     # 0x353a8
movq -0x38(%rbp), %rcx
xorl %r8d, %r8d
callq 0xf1d8
leaq -0x5a0(%rbp), %rdi
leaq -0x120(%rbp), %rsi
leaq -0x60(%rbp), %rdx
movl $0x1, %ecx
callq 0x18481
movq -0x60(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x6cba
movq -0x58(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x6cba
leaq -0x120(%rbp), %rdi
callq 0x10bc8
jmp 0x5ef2
movq -0x38(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
leaq -0x60(%rbp), %rdx
movl $0x1, %ecx
movl -0x3c(%rbp), %r8d
callq 0x17745
movq -0x58(%rbp), %rax
cmpq -0x60(%rbp), %rax
je 0x6055
movq -0x60(%rbp), %rdi
cmpq %rdi, -0x58(%rbp)
je 0x6003
movl $0x1, %r15d
xorl %ebx, %ebx
shlq $0x5, %rbx
addq %rbx, %rdi
leaq 0x214b8(%rip), %rsi     # 0x273dc
callq 0x40f0
testl %eax, %eax
je 0x5f95
cmpl $0x1, %r15d
je 0x5f83
leaq -0x110(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x120(%rbp), %rdi
leaq 0x2148d(%rip), %rsi     # 0x273dc
leaq 0x21487(%rip), %rdx     # 0x273dd
callq 0x6c20
leaq -0x48(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x7142
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x5f83
callq 0x4350
addq -0x60(%rbp), %rbx
leaq -0x48(%rbp), %rdi
movq %rbx, %rsi
callq 0x7142
jmp 0x5fe5
leaq -0x110(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x120(%rbp), %rdi
leaq 0x21605(%rip), %rsi     # 0x275b6
leaq 0x215ff(%rip), %rdx     # 0x275b7
callq 0x6c20
leaq -0x48(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x7142
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x5fe5
callq 0x4350
movl %r15d, %ebx
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rax
subq %rdi, %rax
sarq $0x5, %rax
incl %r15d
cmpq %rbx, %rax
ja 0x5f16
leaq -0x110(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x120(%rbp), %rdi
leaq 0x213a7(%rip), %rsi     # 0x273c6
leaq 0x213a1(%rip), %rdx     # 0x273c7
callq 0x6c20
leaq -0x48(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x7142
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x608f
callq 0x4350
jmp 0x608f
movl $0x23, %edx
movq 0x2ef87(%rip), %rdi     # 0x34fe8
leaq 0x2117e(%rip), %rsi     # 0x271e6
callq 0x4400
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
movq 0x2ef66(%rip), %rdi     # 0x34fe8
callq 0x4400
movq %rax, %rdi
callq 0x4180
leaq -0x60(%rbp), %rdi
callq 0x66be
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x5d84
callq 0x4350
jmp 0x5d84
leaq -0x48(%rbp), %rdi
callq 0x7110
cmpq $0x0, -0x38(%rbp)
je 0x60d3
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0xd888
movq %rbx, %rdi
callq 0x4350
xorl %edi, %edi
callq 0x4420
jmp 0x60fb
jmp 0x6131
jmp 0x6112
jmp 0x6131
jmp 0x60e6
jmp 0x60e6
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
callq 0x10bc8
jmp 0x6134
jmp 0x6131
jmp 0x613f
movq %rax, %rbx
jmp 0x616d
jmp 0x6102
movq %rax, %rbx
movq -0x38(%rbp), %rdi
jmp 0x6271
jmp 0x6112
jmp 0x6131
movq %rax, %rbx
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x6134
callq 0x4350
jmp 0x6134
jmp 0x6131
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x66be
jmp 0x615f
movq %rax, %rbx
jmp 0x615f
movq %rax, %rbx
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x615f
callq 0x4350
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x616d
callq 0x4350
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x6185
callq 0x4350
leaq -0x48(%rbp), %rdi
callq 0x70d6
jmp 0x61bd
jmp 0x6278
movq %rax, %rbx
movq -0x3e0(%rbp), %rdi
cmpq %r14, %rdi
je 0x61bd
callq 0x4350
jmp 0x61bd
movq %rax, %rbx
movq -0x460(%rbp), %rdi
jmp 0x626c
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x6e7e
jmp 0x627b
jmp 0x6278
movq %rax, %rbx
movq -0x400(%rbp), %rdi
jmp 0x626c
jmp 0x6278
movq %rax, %rbx
movq -0x420(%rbp), %rdi
jmp 0x626c
jmp 0x6278
movq %rax, %rbx
movq -0x440(%rbp), %rdi
jmp 0x626c
movq %rax, %rbx
movq -0x480(%rbp), %rdi
jmp 0x626c
jmp 0x6278
jmp 0x6278
movq %rax, %rbx
movq -0x4a0(%rbp), %rdi
jmp 0x626c
movq %rax, %rbx
movq -0x4c0(%rbp), %rdi
cmpq %r15, %rdi
je 0x623d
callq 0x4350
jmp 0x623d
jmp 0x6278
jmp 0x623a
movq %rax, %rbx
movq -0x4e0(%rbp), %rdi
jmp 0x626c
movq %rax, %rbx
movq -0x500(%rbp), %rdi
cmpq %r15, %rdi
je 0x6265
callq 0x4350
jmp 0x6265
jmp 0x6278
jmp 0x6262
jmp 0x6278
movq %rax, %rbx
movq -0x520(%rbp), %rdi
cmpq %r14, %rdi
je 0x627b
callq 0x4350
jmp 0x627b
movq %rax, %rbx
movq -0x380(%rbp), %rdi
leaq -0x370(%rbp), %rax
cmpq %rax, %rdi
je 0x6298
callq 0x4350
jmp 0x6298
movq %rax, %rbx
movq -0x3a0(%rbp), %rdi
leaq -0x390(%rbp), %rax
jmp 0x64bb
jmp 0x64c7
movq %rax, %rbx
movq -0x540(%rbp), %rdi
cmpq %r14, %rdi
jne 0x64c0
jmp 0x64ca
jmp 0x64c7
jmp 0x64c7
movq %rax, %rbx
movq -0x140(%rbp), %rdi
leaq -0x130(%rbp), %rax
cmpq %rax, %rdi
je 0x62f2
callq 0x4350
jmp 0x62f2
movq %rax, %rbx
movq -0x160(%rbp), %rdi
leaq -0x150(%rbp), %rax
cmpq %rax, %rdi
je 0x630f
callq 0x4350
jmp 0x630f
movq %rax, %rbx
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
cmpq %rax, %rdi
je 0x632c
callq 0x4350
jmp 0x632c
movq %rax, %rbx
movq -0x1a0(%rbp), %rdi
leaq -0x190(%rbp), %rax
cmpq %rax, %rdi
je 0x634b
callq 0x4350
jmp 0x634b
jmp 0x6348
movq %rax, %rbx
movq -0x1c0(%rbp), %rdi
leaq -0x1b0(%rbp), %rax
cmpq %rax, %rdi
je 0x6368
callq 0x4350
jmp 0x6368
movq %rax, %rbx
movq -0x1e0(%rbp), %rdi
leaq -0x1d0(%rbp), %rax
cmpq %rax, %rdi
je 0x6385
callq 0x4350
jmp 0x6385
movq %rax, %rbx
movq -0x200(%rbp), %rdi
leaq -0x1f0(%rbp), %rax
cmpq %rax, %rdi
je 0x63a2
callq 0x4350
jmp 0x63a2
movq %rax, %rbx
movq -0x220(%rbp), %rdi
leaq -0x210(%rbp), %rax
cmpq %rax, %rdi
je 0x63c1
callq 0x4350
jmp 0x63c1
jmp 0x63be
movq %rax, %rbx
movq -0x240(%rbp), %rdi
leaq -0x230(%rbp), %rax
cmpq %rax, %rdi
je 0x63de
callq 0x4350
jmp 0x63de
movq %rax, %rbx
movq -0x260(%rbp), %rdi
leaq -0x250(%rbp), %rax
cmpq %rax, %rdi
je 0x63fb
callq 0x4350
jmp 0x63fb
movq %rax, %rbx
movq -0x280(%rbp), %rdi
leaq -0x270(%rbp), %rax
cmpq %rax, %rdi
je 0x6418
callq 0x4350
jmp 0x6418
movq %rax, %rbx
movq -0x2a0(%rbp), %rdi
leaq -0x290(%rbp), %rax
cmpq %rax, %rdi
je 0x6437
callq 0x4350
jmp 0x6437
jmp 0x6434
movq %rax, %rbx
movq -0x2c0(%rbp), %rdi
leaq -0x2b0(%rbp), %rax
cmpq %rax, %rdi
je 0x6454
callq 0x4350
jmp 0x6454
movq %rax, %rbx
movq -0x2e0(%rbp), %rdi
leaq -0x2d0(%rbp), %rax
cmpq %rax, %rdi
je 0x6471
callq 0x4350
jmp 0x6471
movq %rax, %rbx
movq -0x300(%rbp), %rdi
leaq -0x2f0(%rbp), %rax
cmpq %rax, %rdi
je 0x648e
callq 0x4350
jmp 0x648e
movq %rax, %rbx
movq -0x320(%rbp), %rdi
leaq -0x310(%rbp), %rax
cmpq %rax, %rdi
je 0x64ad
callq 0x4350
jmp 0x64ad
jmp 0x64aa
movq %rax, %rbx
movq -0x340(%rbp), %rdi
leaq -0x330(%rbp), %rax
cmpq %rax, %rdi
je 0x64ca
callq 0x4350
jmp 0x64ca
movq %rax, %rbx
leaq -0x5c0(%rbp), %rdi
callq 0x66be
leaq -0x5f0(%rbp), %rdi
callq 0x695a
leaq -0x620(%rbp), %rdi
callq 0x69c4
leaq -0x638(%rbp), %r14
movq %r14, %rdi
callq 0x6926
movq -0x20(%r14), %rdi
leaq -0x648(%rbp), %rax
cmpq %rax, %rdi
je 0x6517
callq 0x4350
jmp 0x6517
movq %rax, %rbx
leaq -0x5a0(%rbp), %rdi
callq 0x6a8e
leaq -0x570(%rbp), %rdi
callq 0x6b1c
movq -0x3c0(%rbp), %rdi
cmpq %r12, %rdi
je 0x6540
callq 0x4350
movq -0x360(%rbp), %rdi
cmpq %r13, %rdi
je 0x6551
callq 0x4350
movq %rbx, %rdi
callq 0x4640