// File: /workspace/github_cpp_makefile_star2_O3/aalto-speech[P]ftk/src/FactorGraph.cc
// Function: FactorGraph::print_dot_digraph(std::ostream&)
void FactorGraph::print_dot_digraph(ostream &fstr)
{
    fstr << "digraph {" << endl << endl;
    fstr << "\tnode [shape=ellipse,fontsize=30,fixedsize=false,width=0.95];" << endl;
    fstr << "\tedge [fontsize=12];" << endl;
    fstr << "\trankdir=LR;" << endl << endl;

    for (fg_node_idx_t ni=0; ni<nodes.size(); ++ni) {
        fstr << "\t" << ni;
        fstr << " [label=\"" << get_factor(ni) << "\"]" << endl;
    }
    fstr << endl;

    for (fg_node_idx_t ni=0; ni<nodes.size(); ++ni) {
        Node &nd = nodes[ni];
        for (auto ait = nd.outgoing.begin(); ait != nd.outgoing.end(); ++ait) {
            fstr << "\t" << (*ait)->source_node << " -> " << (*ait)->target_node;
            fstr << "[label=\"" << (*ait)->cost << "\"];" << endl;
        }
    }
    fstr << "}" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x16cc0(%rip), %rsi     # 0x266ac
movl $0x9, %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
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4260
leaq 0x16c65(%rip), %rsi     # 0x266b6
movl $0x3d, %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
leaq 0x16c68(%rip), %rsi     # 0x266f4
movl $0x14, %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
leaq 0x16c42(%rip), %rsi     # 0x26709
movl $0xc, %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
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4260
movq 0x48(%r12), %rax
cmpq 0x40(%r12), %rax
movq %r12, -0x40(%rbp)
je 0xfc15
xorl %r14d, %r14d
leaq 0x16bdd(%rip), %r13     # 0x26720
xorl %r15d, %r15d
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x16a41(%rip), %rsi     # 0x26596
callq 0x4400
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4250
movl $0x9, %edx
movq %rbx, %rdi
leaq 0x16ba2(%rip), %rsi     # 0x26716
callq 0x4400
movzwl %r15w, %edx
leaq -0x68(%rbp), %rdi
movq %r12, %rsi
callq 0x10288
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %rbx, %rdi
callq 0x4400
movq %rax, %r14
movl $0x2, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x4400
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4260
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xfbe5
callq 0x4350
incl %r15d
movq -0x40(%rbp), %r12
movq 0x48(%r12), %rax
subq 0x40(%r12), %rax
movzwl %r15w, %r14d
sarq $0x3, %rax
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rax
cmpq %r14, %rax
ja 0xfb46
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %rbx, -0x38(%rbp)
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4260
movq 0x40(%r12), %rax
movq 0x48(%r12), %rcx
cmpq %rax, %rcx
je 0xfd7c
xorl %edx, %edx
leaq 0x1693a(%rip), %r14     # 0x26596
leaq 0x16ab4(%rip), %rbx     # 0x26717
xorl %r11d, %r11d
movq -0x38(%rbp), %r13
imulq $0x38, %rdx, %rdx
movq 0x20(%rax,%rdx), %r12
cmpq 0x28(%rax,%rdx), %r12
je 0xfd54
movl %r11d, -0x2c(%rbp)
addq %rdx, %rax
addq $0x20, %rax
movq %rax, -0x48(%rbp)
movl $0x1, %edx
movq %r13, %rdi
movq %r14, %rsi
callq 0x4400
movq (%r12), %rax
movzwl (%rax), %esi
movq %r13, %rdi
callq 0x4250
movq %rax, %r15
movl $0x4, %edx
movq %rax, %rdi
leaq 0x16a65(%rip), %rsi     # 0x26723
callq 0x4400
movq (%r12), %rax
movzwl 0x2(%rax), %esi
movq %r15, %rdi
callq 0x4250
movl $0x8, %edx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4400
movq (%r12), %rax
movsd 0x8(%rax), %xmm0
movq %r13, %rdi
callq 0x4590
movq %rax, %r15
movl $0x3, %edx
movq %rax, %rdi
leaq 0x16a22(%rip), %rsi     # 0x26728
callq 0x4400
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %r15, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4260
addq $0x8, %r12
movq -0x48(%rbp), %rax
cmpq 0x8(%rax), %r12
jne 0xfc8d
movq -0x40(%rbp), %rcx
movq 0x40(%rcx), %rax
movq 0x48(%rcx), %rcx
movl -0x2c(%rbp), %r11d
incl %r11d
movzwl %r11w, %edx
movq %rcx, %r8
subq %rax, %r8
sarq $0x3, %r8
movabsq $0x6db6db6db6db6db7, %rdi # imm = 0x6DB6DB6DB6DB6DB7
imulq %rdi, %r8
cmpq %rdx, %r8
ja 0xfc6a
leaq 0x169a9(%rip), %rsi     # 0x2672c
movl $0x1, %edx
movq -0x38(%rbp), %rbx
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
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xfddf
callq 0x4350
movq %rbx, %rdi
callq 0x4650
nop