// File: /workspace/github_cpp_makefile_star2_O3/pfnet-research[P]pml/src/logic.cpp
// Function: logic::operator==(logic::formula_t const&, logic::formula_t const&)
bool operator==(formula_t const& lhs, formula_t const& rhs) {
    if (lhs.kind() != rhs.kind())
        return false;
    switch (lhs.kind()) {
    case formula_kind_t::Var:
        return cast<var_formula_t>(lhs).name == cast<var_formula_t>(rhs).name;
    case formula_kind_t::Bot:
    case formula_kind_t::Top:
        return true;
    case formula_kind_t::Neg:
        return *cast<neg_formula_t>(lhs).inner == *cast<neg_formula_t>(rhs).inner;
    case formula_kind_t::And:
        return *cast<and_formula_t>(lhs).lhs == *cast<and_formula_t>(rhs).lhs &&
            *cast<and_formula_t>(lhs).rhs == *cast<and_formula_t>(rhs).rhs;
    case formula_kind_t::Or:
        return *cast<or_formula_t>(lhs).lhs == *cast<or_formula_t>(rhs).lhs &&
            *cast<or_formula_t>(lhs).rhs == *cast<or_formula_t>(rhs).rhs;
    case formula_kind_t::Impl:
        return *cast<impl_formula_t>(lhs).lhs == *cast<impl_formula_t>(rhs).lhs &&
            *cast<impl_formula_t>(lhs).rhs == *cast<impl_formula_t>(rhs).rhs;
    case formula_kind_t::Eq:
        return *cast<eq_formula_t>(lhs).lhs == *cast<eq_formula_t>(rhs).lhs &&
            *cast<eq_formula_t>(lhs).rhs == *cast<eq_formula_t>(rhs).rhs;
    case formula_kind_t::Lt:
        return *cast<less_formula_t>(lhs).lhs == *cast<less_formula_t>(rhs).lhs &&
            *cast<less_formula_t>(lhs).rhs == *cast<less_formula_t>(rhs).rhs;
    case formula_kind_t::Leq:
        return *cast<leq_formula_t>(lhs).lhs == *cast<leq_formula_t>(rhs).lhs &&
            *cast<leq_formula_t>(lhs).rhs == *cast<leq_formula_t>(rhs).rhs;
    case formula_kind_t::Geq:
        return *cast<geq_formula_t>(lhs).lhs == *cast<geq_formula_t>(rhs).lhs &&
            *cast<geq_formula_t>(lhs).rhs == *cast<geq_formula_t>(rhs).rhs;
    case formula_kind_t::Gt:
        return *cast<greater_formula_t>(lhs).lhs == *cast<greater_formula_t>(rhs).lhs &&
            *cast<greater_formula_t>(lhs).rhs == *cast<greater_formula_t>(rhs).rhs;
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
callq *(%rax)
movl %eax, %ebp
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
cmpl %eax, %ebp
jne 0x18360
leaq 0x2f353(%rip), %rbp     # 0x47438
leaq 0x47f7c(%rip), %r15     # 0x60068
leaq 0x480a5(%rip), %r12     # 0x60198
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
movb $0x1, %r13b
cmpl $0xb, %eax
ja 0x18363
movl %eax, %eax
movslq (%rbp,%rax,4), %rax
addq %rbp, %rax
jmpq *%rax
movq %r14, %rdi
movq %r15, %rsi
leaq 0x47f58(%rip), %r13     # 0x60078
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
addq $0x8, %r14
addq $0x8, %rax
jmp 0x1833e
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq %rax, %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq 0x8(%r13), %rdi
movq 0x8(%rax), %rsi
callq 0x180b6
testb %al, %al
je 0x18360
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
jne 0x18336
jmp 0x186d7
movq %r12, %rbp
movq %r14, %rdi
movq %r15, %rsi
leaq 0x47f18(%rip), %r12     # 0x60108
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq %rax, %r13
movq %rbx, (%rsp)
movq %rbx, %rdi
movq %r15, %rbx
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq 0x8(%r13), %rdi
movq 0x8(%rax), %rsi
callq 0x180b6
testb %al, %al
je 0x18360
movq %rbp, %r12
movq %r14, %rdi
movq %rbx, %r15
movq %rbx, %rsi
leaq 0x47eba(%rip), %r13     # 0x60108
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq %rax, %r14
movq (%rsp), %rdi
movq %r15, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
leaq 0x2f1b9(%rip), %rbp     # 0x47438
je 0x186d7
addq $0x18, %r14
addq $0x18, %rax
movq %rbx, %r15
jmp 0x1833e
movq %r12, %rbp
movq %r14, %rdi
movq %r15, %rsi
leaq 0x47f83(%rip), %r12     # 0x60228
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq %rax, %r13
movq %rbx, (%rsp)
movq %rbx, %rdi
movq %r15, %rbx
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq 0x8(%r13), %rdi
movq 0x8(%rax), %rsi
callq 0x180b6
testb %al, %al
je 0x18360
movq %rbp, %r12
movq %r14, %rdi
movq %rbx, %r15
movq %rbx, %rsi
leaq 0x47f29(%rip), %r13     # 0x60228
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq %rax, %r14
movq (%rsp), %rdi
movq %r15, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
leaq 0x2f108(%rip), %rbp     # 0x47438
je 0x186d7
addq $0x18, %r14
addq $0x18, %rax
movq (%rax), %rbx
movq (%r14), %r14
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
movl %eax, %r13d
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
cmpl %eax, %r13d
je 0x180f3
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x47cec(%rip), %rsi     # 0x60068
leaq 0x48005(%rip), %rdx     # 0x60388
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq %rax, %r15
leaq 0x47cc8(%rip), %rsi     # 0x60068
leaq 0x47fe1(%rip), %rdx     # 0x60388
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq 0x8(%r15), %rdi
movq 0x8(%rax), %rsi
callq 0x17cbe
testb %al, %al
je 0x18360
leaq 0x47c96(%rip), %rsi     # 0x60068
leaq 0x47faf(%rip), %rdx     # 0x60388
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq %rax, %r14
leaq 0x47c72(%rip), %rsi     # 0x60068
leaq 0x47f8b(%rip), %rdx     # 0x60388
jmp 0x186ad
leaq 0x47c5f(%rip), %rsi     # 0x60068
leaq 0x48008(%rip), %rdx     # 0x60418
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq %rax, %r15
leaq 0x47c3b(%rip), %rsi     # 0x60068
leaq 0x47fe4(%rip), %rdx     # 0x60418
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq 0x8(%r15), %rdi
movq 0x8(%rax), %rsi
callq 0x17cbe
testb %al, %al
je 0x18360
leaq 0x47c05(%rip), %rsi     # 0x60068
leaq 0x47fae(%rip), %rdx     # 0x60418
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq %rax, %r14
leaq 0x47be1(%rip), %rsi     # 0x60068
leaq 0x47f8a(%rip), %rdx     # 0x60418
jmp 0x186ad
leaq 0x47bce(%rip), %rsi     # 0x60068
leaq 0x47e2f(%rip), %rdx     # 0x602d0
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq %rax, %r15
leaq 0x47baa(%rip), %rsi     # 0x60068
leaq 0x47e0b(%rip), %rdx     # 0x602d0
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq 0x8(%r15), %rdi
movq 0x8(%rax), %rsi
callq 0x17cbe
testb %al, %al
je 0x18360
leaq 0x47b74(%rip), %rsi     # 0x60068
leaq 0x47dd5(%rip), %rdx     # 0x602d0
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq %rax, %r14
leaq 0x47b50(%rip), %rsi     # 0x60068
leaq 0x47db1(%rip), %rdx     # 0x602d0
jmp 0x186ad
leaq 0x47b3d(%rip), %rsi     # 0x60068
leaq 0x47f76(%rip), %rdx     # 0x604a8
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq %rax, %r15
leaq 0x47b19(%rip), %rsi     # 0x60068
leaq 0x47f52(%rip), %rdx     # 0x604a8
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq 0x8(%r15), %rdi
movq 0x8(%rax), %rsi
callq 0x17cbe
testb %al, %al
je 0x18360
leaq 0x47ae3(%rip), %rsi     # 0x60068
leaq 0x47f1c(%rip), %rdx     # 0x604a8
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq %rax, %r14
leaq 0x47abf(%rip), %rsi     # 0x60068
leaq 0x47ef8(%rip), %rdx     # 0x604a8
jmp 0x186ad
leaq 0x47aac(%rip), %rsi     # 0x60068
leaq 0x47f8d(%rip), %rdx     # 0x60550
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq %rax, %r14
leaq 0x47a88(%rip), %rsi     # 0x60068
leaq 0x47f69(%rip), %rdx     # 0x60550
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq 0x10(%r14), %rdx
cmpq 0x10(%rax), %rdx
jne 0x18360
testq %rdx, %rdx
je 0x18363
movq 0x8(%rax), %rsi
movq 0x8(%r14), %rdi
callq 0x9300
testl %eax, %eax
sete %r13b
jmp 0x18363
leaq 0x47a38(%rip), %rsi     # 0x60068
leaq 0x47f01(%rip), %rdx     # 0x60538
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq %rax, %r15
leaq 0x47a14(%rip), %rsi     # 0x60068
leaq 0x47edd(%rip), %rdx     # 0x60538
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq 0x8(%r15), %rdi
movq 0x8(%rax), %rsi
callq 0x17cbe
testb %al, %al
je 0x18360
leaq 0x479e2(%rip), %rsi     # 0x60068
leaq 0x47eab(%rip), %rdx     # 0x60538
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq %rax, %r14
leaq 0x479c2(%rip), %rsi     # 0x60068
leaq 0x47e8b(%rip), %rdx     # 0x60538
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x9340
testq %rax, %rax
je 0x186d7
movq 0x18(%r14), %rdi
movq 0x18(%rax), %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x17cbe
callq 0x9530