// File: aalto-speech[P]ftk/src/FactorGraph.cc
// Function: FactorGraph::assert_equal(FactorGraph const&) const
bool
FactorGraph::assert_equal(const FactorGraph &other) const
{
    if (nodes.size() != other.nodes.size()) return false;

    auto it = nodes.begin();
    auto it2 = other.nodes.begin();
    for (; it != nodes.end(); ) {
        if (it->start_pos != it2->start_pos) return false;
        if (it->len != it2->len) return false;
        if (it->incoming.size() != it2->incoming.size()) return false;
        if (it->outgoing.size() != it2->outgoing.size()) return false;
        for (unsigned int i=0; i<it->incoming.size(); i++)
            if (*(it->incoming[i]) != *(it2->incoming[i])) return false;
        for (unsigned int i=0; i<it->outgoing.size(); i++)
            if (*(it->outgoing[i]) != *(it2->outgoing[i])) return false;
        it++;
        it2++;
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x58(%rbp)
addq $0x40, %rdi
callq 0x23a90
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
addq $0x40, %rdi
callq 0x23a90
movq %rax, %rcx
movq -0x50(%rbp), %rax
cmpq %rcx, %rax
je 0x21ffa
movb $0x0, -0x1(%rbp)
jmp 0x22281
movq -0x58(%rbp), %rdi
addq $0x40, %rdi
callq 0x23dd0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
addq $0x40, %rdi
callq 0x23dd0
movq %rax, -0x28(%rbp)
movq -0x58(%rbp), %rdi
addq $0x40, %rdi
callq 0x23e40
movq %rax, -0x30(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x23e00
testb $0x1, %al
jne 0x22043
jmp 0x2227d
leaq -0x20(%rbp), %rdi
callq 0x23e70
movzwl (%rax), %eax
movl %eax, -0x5c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x23e70
movq %rax, %rcx
movl -0x5c(%rbp), %eax
movzwl (%rcx), %ecx
cmpl %ecx, %eax
je 0x22071
movb $0x0, -0x1(%rbp)
jmp 0x22281
leaq -0x20(%rbp), %rdi
callq 0x23e70
movzbl 0x2(%rax), %eax
movl %eax, -0x60(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x23e70
movq %rax, %rcx
movl -0x60(%rbp), %eax
movzbl 0x2(%rcx), %ecx
cmpl %ecx, %eax
je 0x220a1
movb $0x0, -0x1(%rbp)
jmp 0x22281
leaq -0x20(%rbp), %rdi
callq 0x23e70
movq %rax, %rdi
addq $0x8, %rdi
callq 0x23e90
movq %rax, -0x68(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x23e70
movq %rax, %rdi
addq $0x8, %rdi
callq 0x23e90
movq %rax, %rcx
movq -0x68(%rbp), %rax
cmpq %rcx, %rax
je 0x220e4
movb $0x0, -0x1(%rbp)
jmp 0x22281
leaq -0x20(%rbp), %rdi
callq 0x23e70
movq %rax, %rdi
addq $0x20, %rdi
callq 0x23e90
movq %rax, -0x70(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x23e70
movq %rax, %rdi
addq $0x20, %rdi
callq 0x23e90
movq %rax, %rcx
movq -0x70(%rbp), %rax
cmpq %rcx, %rax
je 0x22127
movb $0x0, -0x1(%rbp)
jmp 0x22281
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq %rax, -0x78(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x23e70
movq %rax, %rdi
addq $0x8, %rdi
callq 0x23e90
movq %rax, %rcx
movq -0x78(%rbp), %rax
cmpq %rcx, %rax
jae 0x221bc
leaq -0x20(%rbp), %rdi
callq 0x23e70
movq %rax, %rdi
addq $0x8, %rdi
movl -0x34(%rbp), %eax
movl %eax, %esi
callq 0x23eb0
movq (%rax), %rax
movq %rax, -0x80(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x23e70
movq %rax, %rdi
addq $0x8, %rdi
movl -0x34(%rbp), %eax
movl %eax, %esi
callq 0x23eb0
movq -0x80(%rbp), %rdi
movq (%rax), %rsi
callq 0x23ed0
testb $0x1, %al
jne 0x221a3
jmp 0x221ac
movb $0x0, -0x1(%rbp)
jmp 0x22281
jmp 0x221ae
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x2212e
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
movq %rax, -0x88(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x23e70
movq %rax, %rdi
addq $0x20, %rdi
callq 0x23e90
movq %rax, %rcx
movq -0x88(%rbp), %rax
cmpq %rcx, %rax
jae 0x2225a
leaq -0x20(%rbp), %rdi
callq 0x23e70
movq %rax, %rdi
addq $0x20, %rdi
movl -0x38(%rbp), %eax
movl %eax, %esi
callq 0x23eb0
movq (%rax), %rax
movq %rax, -0x90(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x23e70
movq %rax, %rdi
addq $0x20, %rdi
movl -0x38(%rbp), %eax
movl %eax, %esi
callq 0x23eb0
movq -0x90(%rbp), %rdi
movq (%rax), %rsi
callq 0x23ed0
testb $0x1, %al
jne 0x22244
jmp 0x2224a
movb $0x0, -0x1(%rbp)
jmp 0x22281
jmp 0x2224c
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x221c3
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x23f40
movq %rax, -0x40(%rbp)
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x23f40
movq %rax, -0x48(%rbp)
jmp 0x2201c
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
nop