// File: aalto-speech[P]ftk/src/MSFG.cc
// Function: MultiStringFactorGraph::prune_unused(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>>>, 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::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>>>>>>&)
void
MultiStringFactorGraph::prune_unused(transitions_t &transitions)
{
    if (transitions.size() < factor_node_map.size()) {
        vector<string> to_remove;
        cerr << "Pruning " << factor_node_map.size()-transitions.size() << " unused factors from msfg." << endl;
        for (auto it = factor_node_map.begin(); it != factor_node_map.end(); ++it)
            if (transitions.find(it->first) == transitions.end())
                to_remove.push_back(it->first);
        for (auto it = to_remove.begin(); it != to_remove.end(); ++it)
            remove_arcs(*it);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
callq 0x31210
movq -0x78(%rbp), %rdi
movq %rax, -0x70(%rbp)
addq $0x98, %rdi
callq 0x31230
movq %rax, %rcx
movq -0x70(%rbp), %rax
cmpq %rcx, %rax
jae 0x2e6a6
leaq -0x28(%rbp), %rdi
callq 0xa160
movq 0x65af0(%rip), %rdi     # 0x93fe8
leaq 0x381fa(%rip), %rsi     # 0x666f9
callq 0x43c0
movq %rax, -0x80(%rbp)
jmp 0x2e50a
movq -0x78(%rbp), %rdi
addq $0x98, %rdi
callq 0x31230
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rdi
callq 0x31210
movq -0x90(%rbp), %rsi
movq -0x80(%rbp), %rdi
subq %rax, %rsi
callq 0x40f0
movq %rax, -0x88(%rbp)
jmp 0x2e546
movq -0x88(%rbp), %rdi
leaq 0x381ae(%rip), %rsi     # 0x66702
callq 0x43c0
movq %rax, -0x98(%rbp)
jmp 0x2e562
movq -0x98(%rbp), %rdi
movq 0x65a28(%rip), %rsi     # 0x93f98
callq 0x4400
jmp 0x2e577
movq -0x78(%rbp), %rdi
addq $0x98, %rdi
callq 0x31250
movq %rax, -0x40(%rbp)
movq -0x78(%rbp), %rdi
addq $0x98, %rdi
callq 0x312b0
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x31280
testb $0x1, %al
jne 0x2e5b5
jmp 0x2e64c
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x31340
movq -0xa8(%rbp), %rdi
movq %rax, %rsi
callq 0x31310
movq %rax, -0xa0(%rbp)
jmp 0x2e5e1
movq -0xa0(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x31360
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x312e0
testb $0x1, %al
jne 0x2e60c
jmp 0x2e63c
leaq -0x40(%rbp), %rdi
callq 0x31340
movq %rax, %rsi
leaq -0x28(%rbp), %rdi
callq 0xabb0
jmp 0x2e623
jmp 0x2e63c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x6970
jmp 0x2e6af
jmp 0x2e63e
leaq -0x40(%rbp), %rdi
callq 0x31390
jmp 0x2e58b
leaq -0x28(%rbp), %rdi
callq 0xb2f0
movq %rax, -0x60(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xb320
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x11960
testb $0x1, %al
jne 0x2e679
jmp 0x2e69d
leaq -0x60(%rbp), %rdi
callq 0x119d0
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x2e1c0
jmp 0x2e690
jmp 0x2e692
leaq -0x60(%rbp), %rdi
callq 0x117f0
jmp 0x2e659
leaq -0x28(%rbp), %rdi
callq 0x6970
addq $0xb0, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x46e0
nopl (%rax,%rax)