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

    conf::Config config;
    config("usage: llh [OPTION...] WORDLIST VOCABULARY\n")
      ('h', "help", "", "", "display help")
      ('f', "forward-backward", "", "", "Use Forward-backward segmentation instead of Viterbi")
      ('8', "utf-8", "", "", "Utf-8 character encoding in use");
    config.default_parse(argc, argv);
    if (config.arguments.size() != 2) config.print_help(stderr, 1);

    bool enable_forward_backward = config["forward-backward"].specified;
    bool utf8_encoding = config["utf-8"].specified;
    string wordlist_fname = config.arguments[0];
    string vocab_in_fname = config.arguments[1];

    cerr << "parameters, wordlist: " << wordlist_fname << endl;
    cerr << "parameters, vocabulary: " << vocab_in_fname << endl;
    cerr << "parameters, use forward-backward: " << enable_forward_backward << endl;
    cerr << "parameters, utf-8 encoding: " << utf8_encoding << endl;

    int maxlen, word_maxlen;
    map<string, flt_type> vocab;
    map<string, flt_type> freqs;
    map<string, flt_type> words;

    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;

    cerr << "Reading word list " << wordlist_fname << endl;
    retval = Unigrams::read_vocab(wordlist_fname, words, word_maxlen, utf8_encoding);
    if (retval < 0) {
        cerr << "something went wrong reading word list" << endl;
        exit(EXIT_FAILURE);
    }
    cerr << "\t" << "wordlist size: " << words.size() << endl;
    cerr << "\t" << "maximum word length: " << word_maxlen << endl;

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

    flt_type ll = ug.resegment_words(words, vocab, freqs);
    cerr << "cost: " << ll << endl;

    exit(EXIT_SUCCESS);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rsi, %rbx
movl %edi, %r14d
leaq -0x3e8(%rbp), %rdi
callq 0x6a7a
leaq -0x288(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x20f1f(%rip), %rsi     # 0x26004
leaq 0x20f43(%rip), %rdx     # 0x2602f
leaq -0x298(%rbp), %rdi
callq 0x5fac
leaq -0x3e8(%rbp), %rdi
leaq -0x298(%rbp), %rsi
callq 0x6ae0
movq %rax, %r15
leaq -0x268(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x20f18(%rip), %rsi     # 0x26038
leaq 0x20f15(%rip), %rdx     # 0x2603c
leaq -0x278(%rbp), %rdi
callq 0x5fac
leaq -0x208(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21452(%rip), %rdx     # 0x26597
leaq -0x218(%rbp), %rdi
movq %rdx, %rsi
callq 0x5fac
leaq -0x1e8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21431(%rip), %rdx     # 0x26597
leaq -0x1f8(%rbp), %rdi
movq %rdx, %rsi
callq 0x5fac
leaq -0x1c8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x20ea9(%rip), %rsi     # 0x26030
leaq 0x20eae(%rip), %rdx     # 0x2603c
leaq -0x1d8(%rbp), %rdi
callq 0x5fac
leaq -0x278(%rbp), %rdx
leaq -0x218(%rbp), %rcx
leaq -0x1f8(%rbp), %r8
leaq -0x1d8(%rbp), %r9
movq %r15, %rdi
movl $0x68, %esi
callq 0x6af8
movq %rax, %r15
leaq -0x1a8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x20e65(%rip), %rsi     # 0x2603d
leaq 0x20e6e(%rip), %rdx     # 0x2604d
leaq -0x1b8(%rbp), %rdi
callq 0x5fac
leaq -0x188(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2139a(%rip), %rdx     # 0x26597
leaq -0x198(%rbp), %rdi
movq %rdx, %rsi
callq 0x5fac
leaq -0x168(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21379(%rip), %rdx     # 0x26597
leaq -0x178(%rbp), %rdi
movq %rdx, %rsi
callq 0x5fac
leaq -0x148(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x20e0f(%rip), %rsi     # 0x2604e
leaq 0x20e3c(%rip), %rdx     # 0x26082
leaq -0x158(%rbp), %rdi
callq 0x5fac
leaq -0x1b8(%rbp), %rdx
leaq -0x198(%rbp), %rcx
leaq -0x178(%rbp), %r8
leaq -0x158(%rbp), %r9
movq %r15, %rdi
movl $0x66, %esi
callq 0x6af8
movq %rax, %r15
leaq -0x128(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x20df3(%rip), %rsi     # 0x26083
leaq 0x20df1(%rip), %rdx     # 0x26088
leaq -0x138(%rbp), %rdi
callq 0x5fac
leaq -0x108(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x212e2(%rip), %rdx     # 0x26597
leaq -0x118(%rbp), %rdi
movq %rdx, %rsi
callq 0x5fac
leaq -0xe8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x212c1(%rip), %rdx     # 0x26597
leaq -0xf8(%rbp), %rdi
movq %rdx, %rsi
callq 0x5fac
leaq -0xc8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x20d92(%rip), %rsi     # 0x26089
leaq 0x20daa(%rip), %rdx     # 0x260a8
leaq -0xd8(%rbp), %rdi
callq 0x5fac
leaq -0x138(%rbp), %rdx
leaq -0x118(%rbp), %rcx
leaq -0xf8(%rbp), %r8
leaq -0xd8(%rbp), %r9
movq %r15, %rdi
movl $0x38, %esi
callq 0x6af8
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x534b
callq 0x4350
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x5363
callq 0x4350
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x537b
callq 0x4350
movq -0x138(%rbp), %rdi
leaq -0x128(%rbp), %rax
cmpq %rax, %rdi
je 0x5393
callq 0x4350
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
cmpq %rax, %rdi
je 0x53ab
callq 0x4350
movq -0x178(%rbp), %rdi
leaq -0x168(%rbp), %rax
cmpq %rax, %rdi
je 0x53c3
callq 0x4350
movq -0x198(%rbp), %rdi
leaq -0x188(%rbp), %rax
cmpq %rax, %rdi
je 0x53db
callq 0x4350
movq -0x1b8(%rbp), %rdi
leaq -0x1a8(%rbp), %rax
cmpq %rax, %rdi
je 0x53f3
callq 0x4350
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
cmpq %rax, %rdi
je 0x540b
callq 0x4350
movq -0x1f8(%rbp), %rdi
leaq -0x1e8(%rbp), %rax
cmpq %rax, %rdi
je 0x5423
callq 0x4350
movq -0x218(%rbp), %rdi
leaq -0x208(%rbp), %rax
cmpq %rax, %rdi
je 0x543b
callq 0x4350
movq -0x278(%rbp), %rdi
cmpq %r13, %rdi
je 0x544c
callq 0x4350
movq -0x298(%rbp), %rdi
cmpq %r12, %rdi
je 0x545d
callq 0x4350
leaq -0x3e8(%rbp), %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0x7520
movq -0x348(%rbp), %rax
subq -0x350(%rbp), %rax
cmpq $0x40, %rax
je 0x549e
movq 0x2eb3e(%rip), %rax     # 0x33fc8
movq (%rax), %rsi
leaq -0x3e8(%rbp), %rdi
movl $0x1, %edx
callq 0x7ac2
leaq -0x248(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x20b8d(%rip), %rsi     # 0x2603d
leaq 0x20b96(%rip), %rdx     # 0x2604d
leaq -0x258(%rbp), %rdi
callq 0x5fac
leaq -0x3e8(%rbp), %rdi
leaq -0x258(%rbp), %rsi
callq 0x75da
movb 0x4a(%rax), %r13b
movq -0x258(%rbp), %rdi
cmpq %r14, %rdi
je 0x54eb
callq 0x4350
leaq -0x228(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x20b86(%rip), %rsi     # 0x26083
leaq 0x20b84(%rip), %rdx     # 0x26088
leaq -0x238(%rbp), %rdi
callq 0x5fac
leaq -0x3e8(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x75da
movb 0x4a(%rax), %r14b
movq -0x238(%rbp), %rdi
cmpq %r15, %rdi
je 0x5538
callq 0x4350
movq -0x350(%rbp), %rax
leaq -0x68(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x78(%rbp), %rdi
callq 0x5f0e
movq -0x350(%rbp), %rax
leaq -0x48(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x58(%rbp), %rdi
callq 0x5f0e
movq 0x2ea63(%rip), %rdi     # 0x33fe8
leaq 0x20b1d(%rip), %rsi     # 0x260a9
movl $0x16, %edx
callq 0x4400
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq 0x2ea43(%rip), %rdi     # 0x33fe8
callq 0x4400
movq %rax, %rdi
callq 0x4180
movq 0x2ea2f(%rip), %rdi     # 0x33fe8
leaq 0x20b00(%rip), %rsi     # 0x260c0
movl $0x18, %edx
callq 0x4400
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq 0x2ea0f(%rip), %rdi     # 0x33fe8
callq 0x4400
movq %rax, %rdi
callq 0x4180
movq 0x2e9fb(%rip), %rdi     # 0x33fe8
leaq 0x20ae5(%rip), %rsi     # 0x260d9
movl $0x22, %edx
callq 0x4400
movzbl %r13b, %esi
movq 0x2e9df(%rip), %rdi     # 0x33fe8
callq 0x45d0
movq %rax, %rdi
callq 0x4180
movq 0x2e9cb(%rip), %rdi     # 0x33fe8
leaq 0x20ad8(%rip), %rsi     # 0x260fc
movl $0x1c, %edx
callq 0x4400
movzbl %r14b, %ebx
movq 0x2e9af(%rip), %rdi     # 0x33fe8
movl %ebx, %esi
callq 0x45d0
movq %rax, %rdi
callq 0x4180
leaq -0x2f0(%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 -0x420(%rbp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq -0x2c0(%rbp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0x2e94c(%rip), %rdi     # 0x33fe8
leaq 0x20a76(%rip), %rsi     # 0x26119
movl $0x13, %edx
callq 0x4400
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq 0x2e92c(%rip), %rdi     # 0x33fe8
callq 0x4400
movq %rax, %rdi
callq 0x4180
leaq -0xa8(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
addq %rsi, %rdx
leaq -0xb8(%rbp), %rdi
callq 0x5f0e
leaq -0xb8(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
leaq -0x38(%rbp), %rdx
movl %ebx, %ecx
callq 0x1d51e
movl %eax, -0x30(%rbp)
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x571f
callq 0x4350
cmpl $0x0, -0x30(%rbp)
jns 0x5753
movq 0x2e8bc(%rip), %rdi     # 0x33fe8
leaq 0x209fa(%rip), %rsi     # 0x2612d
movl $0x27, %edx
callq 0x4400
movq 0x2e8a4(%rip), %rdi     # 0x33fe8
callq 0x4180
movl $0x1, %edi
callq 0x4420
movq 0x2e88e(%rip), %rdi     # 0x33fe8
leaq 0x20e35(%rip), %rsi     # 0x26596
movl $0x1, %edx
callq 0x4400
movq 0x2e876(%rip), %rdi     # 0x33fe8
leaq 0x20a37(%rip), %rsi     # 0x261b0
movl $0x6, %edx
callq 0x4400
movq -0x2d0(%rbp), %rsi
movq 0x2e857(%rip), %rdi     # 0x33fe8
callq 0x4250
movq %rax, %rdi
callq 0x4180
movq 0x2e843(%rip), %rdi     # 0x33fe8
leaq 0x20dea(%rip), %rsi     # 0x26596
movl $0x1, %edx
callq 0x4400
movq 0x2e82b(%rip), %rdi     # 0x33fe8
leaq 0x20991(%rip), %rsi     # 0x26155
movl $0x17, %edx
callq 0x4400
movl -0x38(%rbp), %esi
movq 0x2e810(%rip), %rdi     # 0x33fe8
callq 0x4620
movq %rax, %rdi
callq 0x4180
movq 0x2e7fc(%rip), %rdi     # 0x33fe8
leaq 0x2097a(%rip), %rsi     # 0x2616d
movl $0x12, %edx
callq 0x4400
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq 0x2e7dc(%rip), %rdi     # 0x33fe8
callq 0x4400
movq %rax, %rdi
callq 0x4180
leaq -0x88(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
addq %rsi, %rdx
leaq -0x98(%rbp), %rdi
callq 0x5f0e
leaq -0x98(%rbp), %rdi
leaq -0x2c8(%rbp), %rsi
leaq -0x34(%rbp), %rdx
movl %ebx, %ecx
callq 0x1d51e
movl %eax, %ebx
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x586e
callq 0x4350
testl %ebx, %ebx
jns 0x589b
movq 0x2e76f(%rip), %rdi     # 0x33fe8
leaq 0x20900(%rip), %rsi     # 0x26180
movl $0x26, %edx
callq 0x4400
movq 0x2e757(%rip), %rdi     # 0x33fe8
callq 0x4180
jmp 0x5749
movq 0x2e746(%rip), %rdi     # 0x33fe8
leaq 0x20ced(%rip), %rsi     # 0x26596
movl $0x1, %edx
callq 0x4400
movq 0x2e72e(%rip), %rdi     # 0x33fe8
leaq 0x208e6(%rip), %rsi     # 0x261a7
movl $0xf, %edx
callq 0x4400
movq -0x2a0(%rbp), %rsi
movq 0x2e70f(%rip), %rdi     # 0x33fe8
callq 0x4250
movq %rax, %rdi
callq 0x4180
movq 0x2e6fb(%rip), %rdi     # 0x33fe8
leaq 0x20ca2(%rip), %rsi     # 0x26596
movl $0x1, %edx
callq 0x4400
movq 0x2e6e3(%rip), %rdi     # 0x33fe8
leaq 0x208ab(%rip), %rsi     # 0x261b7
movl $0x15, %edx
callq 0x4400
movl -0x34(%rbp), %esi
movq 0x2e6c8(%rip), %rdi     # 0x33fe8
callq 0x4620
movq %rax, %rdi
callq 0x4180
testb %r13b, %r13b
je 0x593b
leaq 0x11a62(%rip), %rax     # 0x1739b
jmp 0x5942
leaq 0x11495(%rip), %rax     # 0x16dd7
leaq -0x3f8(%rbp), %rdi
movq %rax, (%rdi)
movb %r14b, 0x8(%rdi)
leaq -0x328(%rbp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq -0x2c8(%rbp), %rsi
leaq -0x2f8(%rbp), %rdx
leaq -0x428(%rbp), %rcx
leaq -0x330(%rbp), %r8
callq 0x1dfac
movsd %xmm0, -0x30(%rbp)
leaq -0x330(%rbp), %rdi
callq 0x5c7a
movq 0x2e63f(%rip), %rdi     # 0x33fe8
leaq 0x2081d(%rip), %rsi     # 0x261cd
movl $0x6, %edx
callq 0x4400
movq 0x2e627(%rip), %rdi     # 0x33fe8
movsd -0x30(%rbp), %xmm0
callq 0x4590
movq %rax, %rdi
callq 0x4180
xorl %edi, %edi
callq 0x4420
jmp 0x5a1f
movq %rax, %rbx
leaq -0x330(%rbp), %rdi
callq 0x5c7a
jmp 0x5a22
movq %rax, %rbx
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
jmp 0x5a11
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x5a22
callq 0x4350
jmp 0x5a22
jmp 0x5a1f
movq %rax, %rbx
leaq -0x2c8(%rbp), %rdi
callq 0x5ce4
leaq -0x428(%rbp), %rdi
callq 0x5ce4
leaq -0x2f8(%rbp), %rdi
callq 0x5ce4
jmp 0x5a4b
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x5a5e
callq 0x4350
jmp 0x5a5e
movq %rax, %rbx
movq -0x78(%rbp), %rdi
jmp 0x5a73
jmp 0x5c19
movq %rax, %rbx
movq -0x238(%rbp), %rdi
cmpq %r15, %rdi
jne 0x5c12
jmp 0x5c1c
jmp 0x5c19
movq %rax, %rbx
movq -0x258(%rbp), %rdi
cmpq %r14, %rdi
jne 0x5c12
jmp 0x5c1c
jmp 0x5c19
jmp 0x5c19
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x5ac8
callq 0x4350
jmp 0x5ac8
movq %rax, %rbx
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x5ae5
callq 0x4350
jmp 0x5ae5
movq %rax, %rbx
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x5b02
callq 0x4350
jmp 0x5b02
movq %rax, %rbx
movq -0x138(%rbp), %rdi
leaq -0x128(%rbp), %rax
cmpq %rax, %rdi
je 0x5b21
callq 0x4350
jmp 0x5b21
jmp 0x5b1e
movq %rax, %rbx
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
cmpq %rax, %rdi
je 0x5b3e
callq 0x4350
jmp 0x5b3e
movq %rax, %rbx
movq -0x178(%rbp), %rdi
leaq -0x168(%rbp), %rax
cmpq %rax, %rdi
je 0x5b5b
callq 0x4350
jmp 0x5b5b
movq %rax, %rbx
movq -0x198(%rbp), %rdi
leaq -0x188(%rbp), %rax
cmpq %rax, %rdi
je 0x5b78
callq 0x4350
jmp 0x5b78
movq %rax, %rbx
movq -0x1b8(%rbp), %rdi
leaq -0x1a8(%rbp), %rax
cmpq %rax, %rdi
je 0x5b97
callq 0x4350
jmp 0x5b97
jmp 0x5b94
movq %rax, %rbx
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
cmpq %rax, %rdi
je 0x5bb4
callq 0x4350
jmp 0x5bb4
movq %rax, %rbx
movq -0x1f8(%rbp), %rdi
leaq -0x1e8(%rbp), %rax
cmpq %rax, %rdi
je 0x5bd1
callq 0x4350
jmp 0x5bd1
movq %rax, %rbx
movq -0x218(%rbp), %rdi
leaq -0x208(%rbp), %rax
cmpq %rax, %rdi
je 0x5bee
callq 0x4350
jmp 0x5bee
movq %rax, %rbx
movq -0x278(%rbp), %rdi
cmpq %r13, %rdi
je 0x5c06
callq 0x4350
jmp 0x5c06
jmp 0x5c03
movq %rax, %rbx
movq -0x298(%rbp), %rdi
cmpq %r12, %rdi
je 0x5c1c
callq 0x4350
jmp 0x5c1c
movq %rax, %rbx
leaq -0x350(%rbp), %rdi
callq 0x5d4e
leaq -0x380(%rbp), %rdi
callq 0x5dda
leaq -0x3b0(%rbp), %rdi
callq 0x5e44
leaq -0x3c8(%rbp), %r14
movq %r14, %rdi
callq 0x5da6
movq -0x20(%r14), %rdi
leaq -0x3d8(%rbp), %rax
cmpq %rax, %rdi
je 0x5c64
callq 0x4350
movq %rbx, %rdi
callq 0x4650