// File: aalto-speech[P]ftk/src/Bigrams.cc
// Function: Bigrams::get_backpointers(MultiStringFactorGraph const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<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::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, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<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 int)
void
Bigrams::get_backpointers(const MultiStringFactorGraph &msfg,
                          map<string, set<string> > &backpointers,
                          unsigned int minlen)
{
    backpointers.clear();
    for (auto it = msfg.string_end_nodes.begin(); it != msfg.string_end_nodes.end(); ++it) {
        set<string> factors;
        msfg.collect_factors(it->first, factors);
        for (auto fit = factors.begin(); fit != factors.end(); ++fit) {
            if ((*fit).length() < minlen) continue;
            backpointers[*fit].insert(it->first);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x60b30
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
callq 0x49720
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
callq 0x30940
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x31430
testb $0x1, %al
jne 0x5fc67
jmp 0x5fd9a
leaq -0x58(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x6050
movq -0x8(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x31490
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rdx
movq %rax, %rsi
callq 0x2f530
jmp 0x5fca3
leaq -0x58(%rbp), %rdi
callq 0x60b50
movq %rax, -0x70(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x23610
movq %rax, -0x78(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x235b0
testb $0x1, %al
jne 0x5fcd3
jmp 0x5fd83
leaq -0x70(%rbp), %rdi
callq 0x491f0
movq %rax, %rdi
callq 0x45e0
movl -0x14(%rbp), %ecx
cmpq %rcx, %rax
jae 0x5fd0b
jmp 0x5fd75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x6070
jmp 0x5fda3
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x491f0
movq -0xa8(%rbp), %rdi
movq %rax, %rsi
callq 0x60b80
movq %rax, -0xa0(%rbp)
jmp 0x5fd37
leaq -0x20(%rbp), %rdi
callq 0x31490
movq -0xa0(%rbp), %rdi
movq %rax, %rsi
callq 0x31820
movb %dl, -0xb1(%rbp)
movq %rax, -0xb0(%rbp)
jmp 0x5fd5e
movb -0xb1(%rbp), %al
movq -0xb0(%rbp), %rcx
movq %rcx, -0x88(%rbp)
movb %al, -0x80(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x49260
jmp 0x5fcb0
leaq -0x58(%rbp), %rdi
callq 0x6070
leaq -0x20(%rbp), %rdi
callq 0x314b0
jmp 0x5fc40
addq $0xc0, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x46e0
nopl (%rax)