LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/util/conf.cc
// Function: conf::Config::check_required() const
void
Config::check_required() const
{
    for (int i = 0; i < (int)options.size(); i++) {
        const Option &option = options[i];
        std::string option_name;
        if (option.short_name != 0) {
            option_name.append(" -");
            option_name.append(1, option.short_name);
        }
        if (option.long_name != "") {
            option_name.append(" --");
            option_name.append(option.long_name);
        }
        if (option.required && !option.specified) {
            fprintf(stderr, "option%s required\n", option_name.c_str());
            print_help(stderr, 1);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x20(%rdi), %r14
movq 0x28(%rdi), %rax
subq %r14, %rax
shrq $0x4, %rax
imull $0x38e38e39, %eax, %eax # imm = 0x38E38E39
testl %eax, %eax
jle 0x78fa
movq %rdi, %rbx
xorl %r13d, %r13d
leaq -0x48(%rbp), %r12
xorl %r15d, %r15d
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movb $0x0, -0x38(%rbp)
cmpb $0x0, (%r14,%r13)
je 0x7875
movq %r12, %rdi
leaq 0x1eae6(%rip), %rsi     # 0x2633e
callq 0x46b0
movsbl (%r14,%r13), %r8d
movq -0x40(%rbp), %rsi
movl $0x1, %ecx
movq %r12, %rdi
xorl %edx, %edx
callq 0x4690
leaq (%r14,%r13), %rdi
addq $0x8, %rdi
leaq 0x1ed13(%rip), %rsi     # 0x26597
callq 0x40f0
testl %eax, %eax
je 0x78ae
movq %r12, %rdi
leaq 0x1ea7a(%rip), %rsi     # 0x26311
callq 0x46b0
movq 0x8(%r14,%r13), %rsi
movq 0x10(%r14,%r13), %rdx
movq %r12, %rdi
callq 0x4100
cmpb $0x1, 0x48(%r14,%r13)
jne 0x78be
cmpb $0x0, 0x4a(%r14,%r13)
je 0x7909
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x78d0
callq 0x4350
incq %r15
movq 0x20(%rbx), %r14
movq 0x28(%rbx), %rax
subq %r14, %rax
shrq $0x4, %rax
imull $0x38e38e39, %eax, %eax # imm = 0x38E38E39
cltq
addq $0x90, %r13
cmpq %rax, %r15
jl 0x7833
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2c6b8(%rip), %r14     # 0x33fc8
movq (%r14), %rdi
movq -0x48(%rbp), %rdx
leaq 0x1ea5e(%rip), %rsi     # 0x2637c
xorl %eax, %eax
callq 0x44d0
movq (%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x7adc
jmp 0x7937
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x794c
callq 0x4350
movq %rbx, %rdi
callq 0x4650
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/util/conf.cc
// Function: conf::Config::read(_IO_FILE*, bool)
void
Config::read(FILE *file, bool override)
{
    // Read and split the file in fields
    std::string text;
    try {
        text = str::read_file(file);
    } catch (...) {
        std::cerr << "could not read config file" << std::endl;
        exit(1);
    }
    std::vector<std::string> fields;
    str::split_with_quotes(&text, " \t\n", true, &fields);

    // Prepare for parsing
    std::deque<std::string> argument_queue(fields.begin(), fields.end());
    parse_aux(argument_queue, override);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movl %edx, %r14d
movq %rdi, %rbx
leaq -0x50(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq -0xb0(%rbp), %rdi
xorl %edx, %edx
callq 0x8026
leaq -0x60(%rbp), %rdi
leaq -0xb0(%rbp), %r15
movq %r15, %rsi
callq 0x4430
movq (%r15), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x79b8
callq 0x4350
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %rcx
movaps %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
leaq 0x1e9a7(%rip), %rsi     # 0x26378
leaq -0x60(%rbp), %rdi
movl $0x1, %edx
callq 0x8121
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
leaq -0xb0(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x40(%rdi)
callq 0x9cae
movzbl %r14b, %edx
leaq -0xb0(%rbp), %rsi
movq %rbx, %rdi
callq 0x6ede
leaq -0xb0(%rbp), %rdi
callq 0x7fd8
leaq -0x40(%rbp), %rdi
callq 0x5d54
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x7a3f
callq 0x4350
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x7fd8
jmp 0x7a74
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x9a2e
jmp 0x7a74
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x5d54
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x7a8b
callq 0x4350
movq %rbx, %rdi
callq 0x4650
movq %rax, %rdi
callq 0x4160
movq 0x2c546(%rip), %rdi     # 0x33fe8
leaq 0x1e8b4(%rip), %rsi     # 0x2635d
movl $0x1a, %edx
callq 0x4400
movq 0x2c52e(%rip), %rdi     # 0x33fe8
callq 0x4180
movl $0x1, %edi
callq 0x4420
movq %rax, %rbx
callq 0x45c0
jmp 0x7a7d
movq %rax, %rdi
callq 0x5c72
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/util/conf.cc
// Function: conf::Config::operator[](unsigned char) const
const Option&
Config::operator[](unsigned char short_name) const
{
    ShortMap::const_iterator it = short_map.find(short_name);
    if (it == short_map.end()) {
        fprintf(stderr, "Config::get(): unknown option %c\n", short_name);
        abort();
    }
    return options[it->second];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x48(%rdi), %rdx
leaq 0x40(%rdi), %rax
movq %rax, %rcx
testq %rdx, %rdx
je 0x7b48
movq %rax, %rcx
xorl %r8d, %r8d
cmpb %sil, 0x20(%rdx)
setb %r8b
cmovaeq %rdx, %rcx
movq 0x10(%rdx,%r8,8), %rdx
testq %rdx, %rdx
jne 0x7b2f
movq %rax, %rdx
cmpq %rax, %rcx
je 0x7b5b
cmpb %sil, 0x20(%rcx)
cmovaq %rax, %rcx
movq %rcx, %rdx
cmpq %rax, %rdx
je 0x7b72
movslq 0x24(%rdx), %rax
leaq (%rax,%rax,8), %rax
shlq $0x4, %rax
addq 0x20(%rdi), %rax
popq %rbp
retq
movzbl %sil, %edi
callq 0x48d1
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/util/str.hh
// Function: str::read_file[abi:cxx11](_IO_FILE*, bool)
inline std::string
read_file(FILE *file = stdin, bool rewind = false)
{
    if (rewind)
        ::rewind(file);

    const size_t buf_size = 4096;
    char buf[buf_size];
    bool end = false;
    std::string str;
    while (!end) {
        size_t ret = fread(buf, 1, buf_size, file);
        if (ret < buf_size) {
            if (ferror(file))
                throw std::runtime_error("str::read_file() read error");
            end = true;
        }
        str.append(buf, ret);
    }
    return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
je 0x804c
movq %r14, %rdi
callq 0x4080
leaq 0x10(%rbx), %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
xorl %r13d, %r13d
leaq -0x1030(%rbp), %r15
testb $0x1, %r13b
jne 0x80b2
movl $0x1, %esi
movl $0x1000, %edx           # imm = 0x1000
movq %r15, %rdi
movq %r14, %rcx
callq 0x4520
movq %rax, %r12
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x80a2
movq %r14, %rdi
callq 0x46a0
movb $0x1, %r13b
testl %eax, %eax
jne 0x80c7
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4070
jmp 0x806d
movq %rbx, %rax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %r15
leaq 0x1e318(%rip), %rsi     # 0x263f3
movq %rax, %rdi
callq 0x4140
movq 0x2bf06(%rip), %rsi     # 0x33ff0
movq 0x2bec7(%rip), %rdx     # 0x33fb8
movq %r15, %rdi
callq 0x4610
jmp 0x8108
movq %rax, %r14
movq %r15, %rdi
callq 0x42b0
jmp 0x810b
movq %rax, %r14
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0x8119
callq 0x4350
movq %r14, %rdi
callq 0x4650
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/util/Ngram.cc
// Function: Ngram::score(int, int, double&)
int
Ngram::score(int node_idx, int word, double &score)
{
    while (true) {
        int tmp = find_node(node_idx, word);
        if (tmp != -1) {
            node_idx = tmp;
            score += nodes[node_idx].prob;
            if (nodes[node_idx].first_arc == -1)
                return nodes[node_idx].backoff_node;
            else
                return node_idx;
        }
        else {
            score += nodes[node_idx].backoff_prob;
            node_idx = nodes[node_idx].backoff_node;
        }
    }

    throw string("Problem in assigning an n-gram score.");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movl %edx, %r14d
movl %esi, %r13d
movq %rdi, %r15
movsd (%rcx), %xmm0
movq 0x78(%rdi), %r12
movsd %xmm0, -0x38(%rbp)
movq %r15, %rdi
movl %r13d, %esi
movl %r14d, %edx
callq 0x9f9c
cmpl $-0x1, %eax
je 0x9f4a
movslq %eax, %rcx
leaq (%rcx,%rcx,4), %rcx
xorps %xmm0, %xmm0
cvtss2sd (%r12,%rcx,4), %xmm0
movsd -0x38(%rbp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movsd %xmm1, (%rbx)
cmpl $-0x1, 0xc(%r12,%rcx,4)
je 0x9f73
movl %eax, %r13d
movl %eax, -0x2c(%rbp)
jmp 0x9f80
movslq %r13d, %rcx
leaq (%rcx,%rcx,4), %rcx
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r12,%rcx,4), %xmm0
movsd -0x38(%rbp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movsd %xmm1, (%rbx)
movl 0x8(%r12,%rcx,4), %r13d
jmp 0x9f80
leaq (%r12,%rcx,4), %rcx
movl 0x8(%rcx), %ecx
movl %ecx, -0x2c(%rbp)
movl %eax, %r13d
cmpl $-0x1, %eax
je 0x9f01
movl -0x2c(%rbp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/util/Ngram.cc
// Function: Ngram::find_node(int, int)
int
Ngram::find_node(int node_idx, int word)
{
    int first_arc = nodes[node_idx].first_arc;
    if (first_arc == -1) return -1;
    int last_arc = nodes[node_idx].last_arc+1;

    auto lower_b=lower_bound(arc_words.begin()+first_arc, arc_words.begin()+last_arc, word);
    int arc_idx = lower_b-arc_words.begin();
    if (arc_idx == last_arc || *lower_b != word) return -1;
    return arc_target_nodes[arc_idx];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq %esi, %rax
movq 0x78(%rdi), %rcx
leaq (%rax,%rax,4), %rsi
movslq 0xc(%rcx,%rsi,4), %r10
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $-0x1, %r10
je 0xa02d
leaq (%rcx,%rsi,4), %rcx
movslq 0x10(%rcx), %rcx
incq %rcx
movq 0x90(%rdi), %r8
leaq (%r8,%r10,4), %rsi
movq %rcx, %r9
subq %r10, %r9
jle 0xa004
movq %r9, %r10
shrq %r10
movq %r10, %r11
notq %r11
addq %r9, %r11
leaq (%rsi,%r10,4), %r9
addq $0x4, %r9
cmpl %edx, -0x4(%r9)
cmovlq %r9, %rsi
cmovgeq %r10, %r11
movq %r11, %r9
testq %r11, %r11
jg 0x9fd9
movq %rsi, %r9
subq %r8, %r9
movq %r9, %r8
shrq $0x2, %r8
cmpl %r8d, %ecx
je 0xa02d
cmpl %edx, (%rsi)
jne 0xa02d
movq 0xa8(%rdi), %rax
shlq $0x1e, %r9
sarq $0x1e, %r9
movl (%rax,%r9), %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/util/Ngram.cc
// Function: Ngram::score(int, int, float&)
int
Ngram::score(int node_idx, int word, float &score)
{
    while (true) {
        int tmp = find_node(node_idx, word);
        if (tmp != -1) {
            node_idx = tmp;
            score += nodes[node_idx].prob;
            if (nodes[node_idx].first_arc == -1)
                return nodes[node_idx].backoff_node;
            else
                return node_idx;
        }
        else {
            score += nodes[node_idx].backoff_prob;
            node_idx = nodes[node_idx].backoff_node;
        }
    }

    throw string("Problem in assigning an n-gram score.");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %r14d
movl %esi, %r13d
movq %rdi, %r15
movss (%rcx), %xmm0
movq 0x78(%rdi), %r12
movss %xmm0, -0x30(%rbp)
movq %r15, %rdi
movl %r13d, %esi
movl %r14d, %edx
callq 0x9f9c
cmpl $-0x1, %eax
je 0xa090
movslq %eax, %rcx
leaq (%rcx,%rcx,4), %rcx
movss -0x30(%rbp), %xmm0
addss (%r12,%rcx,4), %xmm0
movss %xmm0, (%rbx)
cmpl $-0x1, 0xc(%r12,%rcx,4)
je 0xa0ae
movl %eax, %r13d
movl %eax, -0x2c(%rbp)
jmp 0xa0bb
movslq %r13d, %rcx
leaq (%rcx,%rcx,4), %rcx
movss -0x30(%rbp), %xmm0
addss 0x4(%r12,%rcx,4), %xmm0
movss %xmm0, (%rbx)
movl 0x8(%r12,%rcx,4), %r13d
jmp 0xa0bb
leaq (%r12,%rcx,4), %rcx
movl 0x8(%rcx), %ecx
movl %ecx, -0x2c(%rbp)
movl %eax, %r13d
cmpl $-0x1, %eax
je 0xa052
movl -0x2c(%rbp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/util/Ngram.hh
// Function: Ngram::NgramInfo::operator<(Ngram::NgramInfo const&) const
bool operator<(const NgramInfo &ngri) const
        {
            if (ngram.size() != ngri.ngram.size())
                throw std::string("Comparing ngrams of different order");
            for (unsigned int i=0; i<ngram.size(); i++)
                if (ngram[i] < ngri.ngram[i]) return true;
                else if (ngri.ngram[i] < ngram[i]) return false;
            std::cerr << "Warning, comparing same n-grams" << std::endl;
            return false;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rdx
movq 0x8(%rdi), %rax
movq %rax, %rdi
subq %rdx, %rdi
movq (%rsi), %r8
movq 0x8(%rsi), %rcx
subq %r8, %rcx
cmpq %rcx, %rdi
jne 0xbf29
cmpq %rdx, %rax
setne %cl
je 0xbecf
movl (%rdx), %r9d
movl (%r8), %r10d
movb $0x1, %al
cmpl %r10d, %r9d
jl 0xbecf
sarq $0x2, %rdi
movl $0x1, %esi
cmpl %r9d, %r10d
jl 0xbf25
movl %esi, %r10d
cmpq %r10, %rdi
seta %cl
jbe 0xbecf
movl (%rdx,%r10,4), %r9d
movl (%r8,%r10,4), %r10d
incl %esi
cmpl %r10d, %r9d
jge 0xbeae
jmp 0xbecf
testb $0x1, %cl
jne 0xbf18
movq 0x2810d(%rip), %rbx     # 0x33fe8
leaq 0x1a72e(%rip), %rsi     # 0x26610
movl $0x1f, %edx
movq %rbx, %rdi
callq 0x4400
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4260
xorl %eax, %eax
andb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0xbecf
movl $0x20, %edi
callq 0x4190
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
movb $0x1, %r15b
leaq 0x1a6a5(%rip), %rsi     # 0x265ec
leaq 0x1a6c1(%rip), %rdx     # 0x2660f
movq %rbx, %rdi
callq 0x5fa4
xorl %r15d, %r15d
leaq 0x27df0(%rip), %rsi     # 0x33d50
movq 0x28039(%rip), %rdx     # 0x33fa0
movq %rbx, %rdi
callq 0x4610
movq %rax, %r14
testb %r15b, %r15b
je 0xbf7f
movq %rbx, %rdi
callq 0x42b0
movq %r14, %rdi
callq 0x4650
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/StringSet.cc
// Function: StringSet::StringSet(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>> const&)
StringSet::StringSet(const std::map<std::string, flt_type> &vocab)
{
    max_factor_length = 0;
    learn_map(vocab);
    root_node.arcs.resize(character_count, nullptr);
    for (auto it = vocab.cbegin(); it !=vocab.cend(); ++it)
        add(it->first, it->second);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %esi, %esi
callq 0xd3f6
movl $0x0, 0x18(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc8ea
movslq 0x11c(%rbx), %rsi
leaq -0x20(%rbp), %rdx
movq $0x0, (%rdx)
movq %rbx, %rdi
callq 0xd440
movq 0x18(%r14), %r15
addq $0x8, %r14
cmpq %r14, %r15
je 0xc8c2
leaq 0x20(%r15), %rsi
movsd 0x40(%r15), %xmm0
movq %rbx, %rdi
callq 0xcac8
movq %r15, %rdi
callq 0x4410
movq %rax, %r15
cmpq %r14, %rax
jne 0xc8a0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc8d1
jmp 0xc8d1
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xc8e1
callq 0x4350
movq %r14, %rdi
callq 0x4650
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/StringSet.cc
// Function: StringSet::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, double)
void
StringSet::add(const string &factor, flt_type cost)
{
    Node *node = &root_node;
    int i=0;
    for (; i < (int)factor.length()-1; i++)
        node = insert(factor[i], "" , 0.0, node);
    insert(factor[i], factor, cost, node);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movsd %xmm0, -0x40(%rbp)
movq %rsi, %rdx
movq %rdi, %r14
cmpl $0x2, 0x8(%rsi)
movq %rdi, -0x38(%rbp)
jl 0xcb58
leaq -0x50(%rbp), %r13
xorl %r12d, %r12d
movq %rdx, %r15
movq (%rdx), %rax
movsbl (%rax,%r12), %eax
movl %eax, -0x2c(%rbp)
movq %r13, -0x60(%rbp)
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
leaq 0x19a82(%rip), %rdx     # 0x26597
movq %rdx, %rsi
callq 0x5fa4
xorps %xmm0, %xmm0
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq %rbx, %rdx
movq %r14, %rcx
callq 0xcc4c
movq %rax, %r14
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0xcb43
callq 0x4350
incq %r12
movq %r15, %rdx
movl 0x8(%r15), %eax
decl %eax
cltq
cmpq %rax, %r12
jl 0xcaf5
jmp 0xcb5b
xorl %r12d, %r12d
movq (%rdx), %rax
movsbl (%rax,%r12), %esi
movq -0x38(%rbp), %rdi
movsd -0x40(%rbp), %xmm0
movq %r14, %rcx
callq 0xcc4c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0xcb94
callq 0x4350
movq %rbx, %rdi
callq 0x4650
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/StringSet.cc
// Function: StringSet::clear(StringSet::Node*)
void
StringSet::clear(Node *node)
{
    for (auto ait = node->arcs.begin(); ait != node->arcs.end(); ++ait) {
        if (*ait != nullptr) {
            clear((*ait)->target_node);
            delete (*ait)->target_node;
            delete *ait;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rsi), %r12
cmpq 0x8(%rsi), %r12
je 0xcc42
movq %rsi, %rbx
movq %rdi, %r14
movq (%r12), %rax
testq %rax, %rax
je 0xcc38
movq 0x28(%rax), %rsi
movq %r14, %rdi
callq 0xcbc4
movq (%r12), %rax
movq 0x28(%rax), %r15
testq %r15, %r15
je 0xcc15
movq (%r15), %rdi
testq %rdi, %rdi
je 0xcc0d
callq 0x4350
movq %r15, %rdi
callq 0x4350
movq (%r12), %r15
testq %r15, %r15
je 0xcc38
movq 0x8(%r15), %rdi
leaq 0x18(%r15), %rax
cmpq %rax, %rdi
je 0xcc30
callq 0x4350
movq %r15, %rdi
callq 0x4350
addq $0x8, %r12
cmpq 0x8(%rbx), %r12
jne 0xcbde
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/StringSet.cc
// Function: StringSet::includes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
bool
StringSet::includes(const string &factor) const
{
    const StringSet::Node *node = &root_node;
    StringSet::Arc *arc = nullptr;
    for (unsigned int i=0; i<factor.length(); i++) {
        arc = find_arc(factor[i], node);
        if (arc == nullptr) return false;
        node = arc->target_node;
    }
    if (arc->factor.length() == 0) return false;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rsi), %rcx
testq %rcx, %rcx
setne %al
je 0xce8f
movq (%rsi), %rdx
movl $0x1, %esi
xorl %r10d, %r10d
movq %rdi, %r9
movzbl (%rdx,%r10), %r8d
movzbl 0x1c(%rdi,%r8), %r8d
movq (%r9), %r10
movq 0x8(%r9), %r9
subq %r10, %r9
sarq $0x3, %r9
cmpq %r8, %r9
jbe 0xce74
movq (%r10,%r8,8), %r8
jmp 0xce77
xorl %r8d, %r8d
testq %r8, %r8
je 0xce8f
movq 0x28(%r8), %r9
movl %esi, %r10d
incl %esi
cmpq %r10, %rcx
seta %al
ja 0xce50
jmp 0xce92
xorl %r8d, %r8d
testb $0x1, %al
je 0xce9a
xorl %eax, %eax
jmp 0xcea2
cmpq $0x0, 0x10(%r8)
setne %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/StringSet.cc
// Function: StringSet::get_score(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
flt_type
StringSet::get_score(const string &factor) const
{
    const StringSet::Node *node = &root_node;
    StringSet::Arc *arc = nullptr;
    for (unsigned int i=0; i<factor.length(); i++) {
        arc = find_arc(factor[i], node);
        if (arc == nullptr) throw string("could not find factor");
        node = arc->target_node;
    }
    if (arc->factor.length() == 0) throw string("could not find factor");
    return arc->cost;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0xceff
movq (%rsi), %rcx
movl $0x1, %edx
xorl %r9d, %r9d
movq %rdi, %r8
movzbl (%rcx,%r9), %esi
movzbl 0x1c(%rdi,%rsi), %esi
movq (%r8), %r9
movq 0x8(%r8), %r8
subq %r9, %r8
sarq $0x3, %r8
cmpq %rsi, %r8
jbe 0xcee8
movq (%r9,%rsi,8), %rsi
jmp 0xceea
xorl %esi, %esi
testq %rsi, %rsi
je 0xcf18
movq 0x28(%rsi), %r8
movl %edx, %r9d
incl %edx
cmpq %r9, %rax
ja 0xcec5
jmp 0xcf01
xorl %esi, %esi
cmpq $0x0, 0x10(%rsi)
je 0xcf60
movsd 0x30(%rsi), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x4190
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
movb $0x1, %r15b
leaq 0x19730(%rip), %rsi     # 0x26666
leaq 0x1973e(%rip), %rdx     # 0x2667b
movq %rbx, %rdi
callq 0x5fa4
xorl %r15d, %r15d
leaq 0x26e01(%rip), %rsi     # 0x33d50
movq 0x2704a(%rip), %rdx     # 0x33fa0
movq %rbx, %rdi
callq 0x4610
jmp 0xcfa6
movl $0x20, %edi
callq 0x4190
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
movb $0x1, %r15b
leaq 0x196e8(%rip), %rsi     # 0x26666
leaq 0x196f6(%rip), %rdx     # 0x2667b
movq %rbx, %rdi
callq 0x5fa4
xorl %r15d, %r15d
leaq 0x26db9(%rip), %rsi     # 0x33d50
movq 0x27002(%rip), %rdx     # 0x33fa0
movq %rbx, %rdi
callq 0x4610
jmp 0xcfa8
movq %rax, %r14
testb %r15b, %r15b
je 0xcfb8
movq %rbx, %rdi
callq 0x42b0
movq %r14, %rdi
callq 0x4650
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/StringSet.cc
// Function: StringSet::remove(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
flt_type
StringSet::remove(const string &factor)
{
    StringSet::Node *node = &root_node;
    StringSet::Arc *arc = nullptr;

    for (unsigned int i=0; i<factor.length(); i++) {
        arc = find_arc(factor[i], node);
        if (arc == nullptr) throw string("could not remove factor");
        node = arc->target_node;
    }
    arc->factor.clear();
    flt_type cost = arc->cost;
    arc->cost = 0.0;
    return cost;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
movl $0x1, %edx
xorl %r9d, %r9d
movq %rdi, %r8
movzbl (%rax,%r9), %esi
movzbl 0x1c(%rdi,%rsi), %esi
movq (%r8), %r9
movq 0x8(%r8), %r8
subq %r9, %r8
sarq $0x3, %r8
cmpq %rsi, %r8
jbe 0xcfff
movq (%r9,%rsi,8), %rsi
jmp 0xd001
xorl %esi, %esi
testq %rsi, %rsi
je 0xd035
movq 0x28(%rsi), %r8
movl %edx, %r9d
incl %edx
cmpq %r9, %rcx
ja 0xcfdc
xorl %eax, %eax
movq %rax, 0x10(%rsi)
movq 0x8(%rsi), %rcx
movb $0x0, (%rcx)
movsd 0x30(%rsi), %xmm0
movq %rax, 0x30(%rsi)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x4190
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
movb $0x1, %r15b
leaq 0x19629(%rip), %rsi     # 0x2667c
leaq 0x19639(%rip), %rdx     # 0x26693
movq %rbx, %rdi
callq 0x5fa4
xorl %r15d, %r15d
leaq 0x26ce4(%rip), %rsi     # 0x33d50
movq 0x26f2d(%rip), %rdx     # 0x33fa0
movq %rbx, %rdi
callq 0x4610
movq %rax, %r14
testb %r15b, %r15b
je 0xd08b
movq %rbx, %rdi
callq 0x42b0
movq %r14, %rdi
callq 0x4650
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/StringSet.cc
// Function: StringSet::collect_arcs(std::vector<StringSet::Arc*, std::allocator<StringSet::Arc*>>&)
void
StringSet::collect_arcs(vector<Arc*> &arcs)
{
    vector<Node*> nodes_to_process;
    nodes_to_process.push_back(&root_node);

    while (nodes_to_process.size() > 0) {
        Node *node = nodes_to_process.back();
        nodes_to_process.pop_back();

        for (auto ait = node->arcs.begin(); ait != node->arcs.end(); ++ait) {
            if (*ait == nullptr) continue;
            arcs.push_back(*ait);
            nodes_to_process.push_back((*ait)->target_node);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
movq %rdi, -0x48(%rbp)
movq -0x38(%rbp), %rsi
testq %rsi, %rsi
je 0xd2a4
movq %rdi, (%rsi)
addq $0x8, -0x38(%rbp)
jmp 0xd2b1
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0xd79e
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rax
cmpq %rdi, %rax
je 0xd339
leaq -0x40(%rbp), %r14
movq -0x8(%rax), %r12
addq $-0x8, %rax
movq %rax, -0x38(%rbp)
movq (%r12), %r15
cmpq 0x8(%r12), %r15
je 0xd32c
movq (%r15), %rax
testq %rax, %rax
je 0xd326
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xd2f5
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0xd300
movq %rbx, %rdi
movq %r15, %rdx
callq 0xd8d8
movq (%r15), %rdx
addq $0x28, %rdx
movq -0x38(%rbp), %rsi
cmpq -0x30(%rbp), %rsi
je 0xd31e
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, -0x38(%rbp)
jmp 0xd326
movq %r14, %rdi
callq 0xd9ae
addq $0x8, %r15
jmp 0xd2d2
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rax
cmpq %rdi, %rax
jne 0xd2c2
testq %rdi, %rdi
je 0xd343
callq 0x4350
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd352
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0xd363
callq 0x4350
movq %rbx, %rdi
callq 0x4650
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/StringSet.cc
// Function: StringSet::string_count()
unsigned int
StringSet::string_count()
{
    vector<Arc*> arcs;
    collect_arcs(arcs);

    unsigned int count = 0;
    for (auto ait = arcs.begin(); ait != arcs.end(); ++ait) {
        if (*ait == nullptr) continue;
        if ((*ait)->factor.length() > 0) count++;
    }
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
xorps %xmm0, %xmm0
leaq -0x20(%rbp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
callq 0xd26c
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
xorl %ebx, %ebx
cmpq %rax, %rdi
je 0xd3b7
movq %rdi, %rcx
movq (%rcx), %rdx
testq %rdx, %rdx
je 0xd3ae
cmpq $0x1, 0x10(%rdx)
sbbl $-0x1, %ebx
addq $0x8, %rcx
cmpq %rax, %rcx
jne 0xd39e
testq %rdi, %rdi
je 0xd3c1
callq 0x4350
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0xd3db
callq 0x4350
movq %rbx, %rdi
callq 0x4650
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/FactorGraph.cc
// Function: FactorGraph::set_text(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>> const&, int)
void
FactorGraph::set_text(const string &text,
                      const string &start_end_symbol,
                      const map<string, flt_type> &vocab,
                      int maxlen)
{
    this->text.assign(text);
    this->start_end_symbol.assign(start_end_symbol);
    if (text.length() == 0) return;

    vector<unordered_set<fg_node_idx_t> > incoming(text.size()+1); // (pos in text, source pos)

    // Create all nodes
    incoming[0].insert(0);
    create_nodes(text, vocab, maxlen, incoming);

    // No possible segmentations
    if (incoming[text.size()].size() == 0) {
        nodes.clear();
        return;
    }

    prune_and_create_arcs(incoming);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %r12d
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
callq 0x41c0
leaq 0x20(%rbx), %rdi
movq %r13, %rsi
callq 0x41c0
movq 0x8(%r14), %rsi
testq %rsi, %rsi
je 0xe334
movq %r15, -0x38(%rbp)
incq %rsi
leaq -0x50(%rbp), %r13
leaq -0x58(%rbp), %r15
movq %r13, %rdi
movq %r15, %rdx
callq 0x100b2
movq (%r13), %rdi
leaq -0x2a(%rbp), %rsi
movw $0x0, (%rsi)
movq %rdi, (%r15)
leaq -0x58(%rbp), %rdx
callq 0x10a40
leaq -0x50(%rbp), %r8
movq %rbx, %rdi
movq %r14, %rsi
movq -0x38(%rbp), %rdx
movl %r12d, %ecx
callq 0xe674
movq -0x50(%rbp), %rax
imulq $0x38, 0x8(%r14), %rcx
cmpq $0x0, 0x18(%rax,%rcx)
je 0xe306
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0xeee6
jmp 0xe32b
movq 0x40(%rbx), %r15
movq 0x48(%rbx), %r12
cmpq %r15, %r12
je 0xe32b
movq %r15, %r14
movq %r14, %rdi
callq 0xff90
addq $0x38, %r14
cmpq %r12, %r14
jne 0xe316
movq %r15, 0x48(%rbx)
leaq -0x50(%rbp), %rdi
callq 0x1015c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xe345
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x1015c
movq %rbx, %rdi
callq 0x4650
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/FactorGraph.cc
// Function: FactorGraph::set_text(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, StringSet const&)
void
FactorGraph::set_text(const string &text,
                      const string &start_end_symbol,
                      const StringSet &vocab)
{
    this->text.assign(text);
    this->start_end_symbol.assign(start_end_symbol);
    if (text.length() == 0) return;

    vector<unordered_set<fg_node_idx_t> > incoming(text.size()+1); // (pos in text, source pos)

    // Create all nodes
    incoming[0].insert(0);
    create_nodes(text, vocab, incoming);

    // No possible segmentations
    if (incoming[text.size()].size() == 0) {
        nodes.clear();
        return;
    }

    prune_and_create_arcs(incoming);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
callq 0x41c0
leaq 0x20(%rbx), %rdi
movq %r12, %rsi
callq 0x41c0
movq 0x8(%r14), %rsi
testq %rsi, %rsi
je 0xe64e
incq %rsi
leaq -0x48(%rbp), %r12
leaq -0x50(%rbp), %r13
movq %r12, %rdi
movq %r13, %rdx
callq 0x100b2
movq (%r12), %rdi
leaq -0x2a(%rbp), %rsi
movw $0x0, (%rsi)
movq %rdi, (%r13)
leaq -0x50(%rbp), %rdx
callq 0x10a40
leaq -0x48(%rbp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xecd4
movq -0x48(%rbp), %rax
imulq $0x38, 0x8(%r14), %rcx
cmpq $0x0, 0x18(%rax,%rcx)
je 0xe620
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0xeee6
jmp 0xe645
movq 0x40(%rbx), %r15
movq 0x48(%rbx), %r12
cmpq %r15, %r12
je 0xe645
movq %r15, %r14
movq %r14, %rdi
callq 0xff90
addq $0x38, %r14
cmpq %r12, %r14
jne 0xe630
movq %r15, 0x48(%rbx)
leaq -0x48(%rbp), %rdi
callq 0x1015c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xe65f
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x1015c
movq %rbx, %rdi
callq 0x4650
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/defs.hh
// Function: get_character_positions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<unsigned int, std::allocator<unsigned int>>&, bool)
static void get_character_positions(const std::string &word,
                                    std::vector<unsigned int> &positions,
                                    bool utf8=false)
{
    if (utf8)
        get_character_positions_utf8(word, positions);
    else
        get_character_positions_onebyte(word, positions);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
testl %edx, %edx
je 0xe93e
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0xe916
movq %rax, 0x8(%rbx)
movl $0x0, -0x1c(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xe9bf
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xe9cb
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x40(%rbp), %rdi
callq 0x5f0a
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0xe966
movq %rax, 0x8(%rbx)
movl $0x0, -0x1c(%rbp)
cmpq $-0x1, -0x38(%rbp)
je 0xe9af
xorl %eax, %eax
leaq -0x1c(%rbp), %r14
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xe990
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xe99b
movq %rbx, %rdi
movq %r14, %rdx
callq 0x1057c
movl -0x1c(%rbp), %eax
incl %eax
movl %eax, -0x1c(%rbp)
movq -0x38(%rbp), %rcx
incq %rcx
cmpq %rax, %rcx
ja 0xe97a
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0xea32
callq 0x4350
jmp 0xea32
leaq -0x1c(%rbp), %rdx
movq %rbx, %rdi
callq 0x103ce
movl $0x0, -0x1c(%rbp)
cmpq $0x0, 0x8(%r14)
je 0xea32
xorl %eax, %eax
leaq -0x1c(%rbp), %r15
movq (%r14), %rcx
movb (%rcx,%rax), %dl
movl $0x1, %ecx
testb %dl, %dl
jns 0xea03
movl $0x4, %ecx
cmpb $-0x11, %dl
ja 0xea03
cmpb $-0x20, %dl
movl $0x2, %ecx
sbbl $-0x1, %ecx
addl %eax, %ecx
movl %ecx, -0x1c(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xea1e
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xea29
movq %rbx, %rdi
movq %r15, %rdx
callq 0x1057c
movl -0x1c(%rbp), %eax
cmpq %rax, 0x8(%r14)
ja 0xe9df
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0xea4e
callq 0x4350
movq %rbx, %rdi
callq 0x4650
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/FactorGraph.cc
// Function: FactorGraph::num_paths() const
int
FactorGraph::num_paths() const
{

    if (nodes.size() == 0) return 0;
    vector<int> path_counts(nodes.size());
    path_counts[0] = 1;

    for (unsigned int i=0; i<nodes.size(); i++) {
        const FactorGraph::Node &node = nodes[i];
        for (auto arc = node.outgoing.begin(); arc != node.outgoing.end(); ++arc)
            path_counts[(**arc).target_node] += path_counts[i];
    }

    return path_counts.back();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq 0x48(%rdi), %rsi
subq 0x40(%rdi), %rsi
je 0xf5e3
movq %rdi, %rbx
sarq $0x3, %rsi
movabsq $0x6db6db6db6db6db7, %r15 # imm = 0x6DB6DB6DB6DB6DB7
imulq %r15, %rsi
leaq -0x38(%rbp), %r14
leaq -0x19(%rbp), %rdx
movq %r14, %rdi
callq 0x101a2
movq (%r14), %rdi
movl $0x1, (%rdi)
movq 0x40(%rbx), %rax
movq 0x48(%rbx), %rcx
subq %rax, %rcx
je 0xf5d5
sarq $0x3, %rcx
imulq %r15, %rcx
xorl %edx, %edx
imulq $0x38, %rdx, %r8
movq 0x20(%rax,%r8), %rsi
movq 0x28(%rax,%r8), %r8
cmpq %r8, %rsi
je 0xf5cb
movl (%rdi,%rdx,4), %r9d
movq (%rsi), %r10
movzwl 0x2(%r10), %r10d
addl %r9d, (%rdi,%r10,4)
addq $0x8, %rsi
jmp 0xf5b0
incq %rdx
movl %edx, %esi
cmpq %rsi, %rcx
ja 0xf5a2
movq -0x30(%rbp), %rax
movl -0x4(%rax), %ebx
callq 0x4350
jmp 0xf5e5
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/FactorGraph.cc
// Function: FactorGraph::advance(std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, unsigned short) const
void
FactorGraph::advance(vector<vector<string> > &paths,
                     vector<string> &curr_string,
                     fg_node_idx_t node_idx) const
{
    const FactorGraph::Node &node = nodes[node_idx];

    std::string tmp;
    get_factor(node, tmp);
    curr_string.push_back(tmp);

    if (node_idx == nodes.size()-1) {
        paths.push_back(curr_string);
        return;
    }

    for (auto arc  = node.outgoing.begin(); arc != node.outgoing.end(); ++arc) {
        vector<string> curr_copy(curr_string);
        advance(paths, curr_copy, (**arc).target_node);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, -0x30(%rbp)
movq %rdi, %r15
movl %ecx, %r14d
imulq $0x38, %r14, %r12
addq 0x40(%rdi), %r12
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x50(%rbp), %rdx
movq %r12, %rsi
callq 0x10236
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x7f8c
movq 0x48(%r15), %rax
subq 0x40(%r15), %rax
sarq $0x3, %rax
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rax, %rcx
decq %rcx
cmpq %r14, %rcx
jne 0xf6b9
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x10268
jmp 0xf6fd
movq 0x20(%r12), %r14
cmpq 0x28(%r12), %r14
je 0xf6fd
leaq -0x68(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x102a4
movq (%r14), %rax
movzwl 0x2(%rax), %ecx
movq %r15, %rdi
movq -0x30(%rbp), %rsi
movq %r13, %rdx
callq 0xf638
movq %r13, %rdi
callq 0x5d54
addq $0x8, %r14
cmpq 0x28(%r12), %r14
jne 0xf6c9
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xf70f
callq 0x4350
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf720
movq %rax, %rbx
jmp 0xf731
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x5d54
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xf743
callq 0x4350
movq %rbx, %rdi
callq 0x4650
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/FactorGraph.cc
// Function: FactorGraph::remove_arc(FactorGraph::Arc*)
void
FactorGraph::remove_arc(Arc *arc)
{
    auto ait = find(arcs.begin(), arcs.end(), arc);
    arcs.erase(ait);

    Node &src_node = nodes[(*arc).source_node];
    auto sit = find(src_node.outgoing.begin(), src_node.outgoing.end(), arc);
    src_node.outgoing.erase(sit);

    Node &tgt_node = nodes[(*arc).target_node];
    auto tit = find(tgt_node.incoming.begin(), tgt_node.incoming.end(), arc);
    tgt_node.incoming.erase(tit);

    delete arc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x18(%rbp), %rdx
movq %rsi, (%rdx)
movq 0x58(%rdi), %rdi
movq 0x60(%rbx), %rsi
callq 0x116c9
leaq 0x8(%rax), %rsi
movq 0x60(%rbx), %rdx
cmpq %rdx, %rsi
je 0xf786
subq %rsi, %rdx
movq %rax, %rdi
callq 0x45b0
addq $-0x8, 0x60(%rbx)
leaq -0x18(%rbp), %rdx
movq (%rdx), %rax
movzwl (%rax), %eax
movq 0x40(%rbx), %rcx
imulq $0x38, %rax, %rax
leaq (%rcx,%rax), %r14
addq $0x20, %r14
movq (%r14), %rdi
movq 0x8(%r14), %rsi
callq 0x116c9
leaq 0x8(%rax), %rsi
movq 0x8(%r14), %rdx
cmpq %rdx, %rsi
je 0xf7c9
subq %rsi, %rdx
movq %rax, %rdi
callq 0x45b0
addq $-0x8, 0x8(%r14)
leaq -0x18(%rbp), %rdx
movq (%rdx), %rax
movzwl 0x2(%rax), %eax
movq 0x40(%rbx), %rcx
imulq $0x38, %rax, %rax
leaq (%rcx,%rax), %rbx
addq $0x8, %rbx
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x116c9
leaq 0x8(%rax), %rsi
movq 0x8(%rbx), %rdx
cmpq %rdx, %rsi
je 0xf80d
subq %rsi, %rdx
movq %rax, %rdi
callq 0x45b0
addq $-0x8, 0x8(%rbx)
movq -0x18(%rbp), %rdi
testq %rdi, %rdi
je 0xf820
callq 0x4350
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/FactorGraph.cc
// Function: FactorGraph::remove_arcs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void
FactorGraph::remove_arcs(const std::string &remstr)
{
    for (auto node = nodes.begin(); node != nodes.end(); ++node) {
        if (this->get_factor(*node) != remstr) continue;
        while (node->incoming.size() > 0)
            remove_arc(node->incoming[0]);
        while (node->outgoing.size() > 0)
            remove_arc(node->outgoing[0]);
    }

    // Prune all transitions from non-reachable nodes
    for (auto it = nodes.begin(); it != nodes.end(); it++) {
        if (it->incoming.size() == 0 && it->len > 0) {
            while (it->outgoing.size() > 0)
                remove_arc(it->outgoing[0]);
            continue;
        }
        if (it->outgoing.size() == 0 && it->len > 0) {
            while (it->incoming.size() > 0)
                remove_arc(it->incoming[0]);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x40(%rdi), %r15
cmpq 0x48(%rdi), %r15
je 0xfa7b
movq %rsi, %r14
leaq -0x48(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x10332
movq -0x40(%rbp), %rdx
movb $0x1, %r13b
cmpq 0x8(%r14), %rdx
jne 0xfa2a
testq %rdx, %rdx
je 0xfa27
movq (%r14), %rsi
movq -0x48(%rbp), %rdi
callq 0x43a0
testl %eax, %eax
setne %r13b
jmp 0xfa2a
xorl %r13d, %r13d
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xfa3c
callq 0x4350
testb %r13b, %r13b
jne 0xfa6d
movq 0x8(%r15), %rax
cmpq %rax, 0x10(%r15)
je 0xfa63
movq (%rax), %rsi
movq %rbx, %rdi
callq 0xf74c
jmp 0xfa41
movq (%rax), %rsi
movq %rbx, %rdi
callq 0xf74c
movq 0x20(%r15), %rax
cmpq %rax, 0x28(%r15)
jne 0xfa58
addq $0x38, %r15
cmpq 0x48(%rbx), %r15
jne 0xf9f3
movq 0x40(%rbx), %r14
cmpq 0x48(%rbx), %r14
je 0xfadb
movq 0x10(%r14), %rax
cmpq 0x8(%r14), %rax
je 0xfa9f
movq 0x28(%r14), %rax
cmpq 0x20(%r14), %rax
je 0xfabd
addq $0x38, %r14
jmp 0xfa7f
cmpb $0x0, 0x2(%r14)
je 0xfa8f
movq 0x20(%r14), %rax
cmpq %rax, 0x28(%r14)
je 0xfa99
movq (%rax), %rsi
movq %rbx, %rdi
callq 0xf74c
jmp 0xfaa6
cmpb $0x0, 0x2(%r14)
je 0xfa99
movq 0x8(%r14), %rax
cmpq %rax, 0x10(%r14)
je 0xfa99
movq (%rax), %rsi
movq %rbx, %rdi
callq 0xf74c
jmp 0xfac4
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/MSFG.cc
// Function: MultiStringFactorGraph::~MultiStringFactorGraph()
MultiStringFactorGraph::~MultiStringFactorGraph() {
    vector<Arc*> arcs;
    collect_arcs(arcs);
    for (auto it = arcs.begin(); it != arcs.end(); ++it)
        delete *it;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
callq 0x1181a
movq -0x30(%rbp), %r14
cmpq -0x28(%rbp), %r14
je 0x117b6
movq (%r14), %rdi
testq %rdi, %rdi
je 0x117b0
callq 0x4350
addq $0x8, %r14
jmp 0x1179d
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x117c4
callq 0x4350
leaq 0xc8(%rbx), %rdi
callq 0x13c82
leaq 0x98(%rbx), %rdi
callq 0x13ce4
leaq 0x68(%rbx), %rdi
callq 0x13d7a
leaq 0x38(%rbx), %rdi
callq 0x13e0e
leaq 0x20(%rbx), %rdi
callq 0x1366e
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0x11808
callq 0x4350
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rdi
callq 0x5c72
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/MSFG.cc
// Function: MultiStringFactorGraph::num_paths(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
int
MultiStringFactorGraph::num_paths(const std::string &text) const
{
    if (nodes.size() == 0) return 0;
    if (string_end_nodes.find(text) == string_end_nodes.end()) return 0;
    msfg_node_idx_t end_node = string_end_nodes.at(text);
    map<msfg_node_idx_t, int> path_counts; path_counts[end_node] = 1;
    set<msfg_node_idx_t> nodes_to_process; nodes_to_process.insert(end_node);

    while(nodes_to_process.size() > 0) {

        msfg_node_idx_t i = *(nodes_to_process.rbegin());

        const Node &node = nodes[i];
        for (auto arc = node.incoming.begin(); arc != node.incoming.end(); ++arc) {
            path_counts[(**arc).source_node] += path_counts[i];
            nodes_to_process.insert((**arc).source_node);
        }

        nodes_to_process.erase(i);
    }

    return path_counts[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq 0x28(%rdi), %rax
xorl %r14d, %r14d
cmpq 0x20(%rdi), %rax
je 0x11ff4
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x38(%rdi), %r12
movq %r12, %rdi
callq 0x15424
leaq 0x40(%rbx), %rcx
cmpq %rcx, %rax
je 0x11ff4
movq %r12, %rdi
movq %r15, %rsi
callq 0x139bc
movl (%rax), %eax
leaq -0x30(%rbp), %rsi
movl %eax, (%rsi)
leaq -0x90(%rbp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq -0x98(%rbp), %rdi
callq 0x13a1a
movl $0x1, (%rax)
leaq -0x60(%rbp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0x68(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x156ce
cmpq $0x0, -0x40(%rbp)
je 0x11fc6
leaq -0x68(%rbp), %r15
leaq -0x98(%rbp), %r13
movq %rbx, -0x38(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x4210
movl 0x20(%rax), %eax
movl %eax, -0x2c(%rbp)
movq 0x20(%rbx), %rcx
shlq $0x7, %rax
leaq (%rcx,%rax), %rbx
addq $0x28, %rbx
movq 0x10(%rbx), %r14
cmpq %rbx, %r14
je 0x11fa0
movq %r13, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x13a1a
movl (%rax), %r12d
movq 0x20(%r14), %rsi
movq %r13, %rdi
callq 0x13a1a
addl %r12d, (%rax)
movq 0x20(%r14), %rsi
movq %r15, %rdi
callq 0x156ce
movq %r14, %rdi
callq 0x4410
movq %rax, %r14
cmpq %rbx, %rax
jne 0x11f66
movq %r15, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x157f6
movq %r15, %rdi
movq %rax, %rsi
callq 0x15872
cmpq $0x0, -0x40(%rbp)
movq -0x38(%rbp), %rbx
jne 0x11f3e
leaq -0x2c(%rbp), %rsi
movl $0x0, (%rsi)
leaq -0x98(%rbp), %rdi
callq 0x13a82
movl (%rax), %r14d
leaq -0x68(%rbp), %rdi
callq 0x13fe2
leaq -0x98(%rbp), %rdi
callq 0x1403a
movl %r14d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x12011
jmp 0x12011
movq %rax, %rbx
jmp 0x1201d
jmp 0x12011
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x13fe2
leaq -0x98(%rbp), %rdi
callq 0x1403a
movq %rbx, %rdi
callq 0x4650
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/MSFG.cc
// Function: MultiStringFactorGraph::get_paths(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>&) const
void
MultiStringFactorGraph::get_paths(const string &text,
                                  vector<vector<string> > &paths) const
{
    if (string_end_nodes.find(text) == string_end_nodes.end()) return;
    msfg_node_idx_t end_node = string_end_nodes.at(text);
    vector<string> curr_string;
    advance(paths, curr_string, end_node);
    for (auto it = paths.begin(); it != paths.end(); ++it)
        std::reverse(it->begin(), it->end());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x38(%rdi), %r12
movq %r12, %rdi
callq 0x15424
leaq 0x40(%r14), %rcx
cmpq %rcx, %rax
je 0x120d9
movq %r12, %rdi
movq %r15, %rsi
callq 0x139bc
movl (%rax), %ecx
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %rdx
movaps %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x120fa
movq (%rbx), %r12
cmpq 0x8(%rbx), %r12
je 0x120d0
movq (%r12), %r14
movq 0x8(%r12), %r15
cmpq %r15, %r14
setne %al
addq $-0x20, %r15
cmpq %r14, %r15
seta %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x120ca
movq %r14, %rdi
movq %r15, %rsi
callq 0x42a0
addq $0x20, %r14
addq $-0x20, %r15
cmpq %r15, %r14
jb 0x120b2
addq $0x18, %r12
jmp 0x1208c
leaq -0x40(%rbp), %rdi
callq 0x5d54
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x5d54
movq %rbx, %rdi
callq 0x4650