// File: /workspace/github_cpp_makefile_star2_O1/SMT-COMP[P]scrambler/scrambler.cpp
// Function: scrambler::is_commutative(scrambler::node const*)
int is_commutative(const node *n)
{
    // *n might be a qualified identifier of the form ('as' identifier sort)
    const std::string *symbol = &(n->symbol);
    if (*symbol == "as") {
        assert(n->children.size() > 0);
        symbol = &(n->children[0]->symbol);
    }
    const std::string &s = *symbol;
    assert(!s.empty());

    // Core theory
    if (s == "and" || s == "or" || s == "xor" || s == "distinct") {
        return 0;
    }
    if (!logic_is_dl()) {
        if (s == "=") {
            return 0;
        }
    }

    // arithmetic (IA, RA, IRA) (but not difference logic)
    if (logic_is_arith()) {
        if (s == "*" || s == "+") {
            return 0;
        }
    }

    // BitVectors
    if (logic_is_bv()) {
        if (s == "bvand" || s == "bvor" || s == "bvxor" ||
            s == "bvnand" || s == "bvnor" || s == "bvcomp" ||
            s == "bvadd" || s == "bvmul") {
            return 0;
        }
    }

    // FloatingPoint
    if (logic_is_fp()) {
        if (s == "fp.eq") {
            return 0;
        }
        if (s == "fp.add" || s == "fp.mul") {
            return 1;
        }
    }

    return -1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x7cb4(%rip), %rsi      # 0xc126
callq 0x30a0
testl %eax, %eax
jne 0x448c
movq 0x10(%r14), %rax
cmpq %rax, 0x18(%r14)
je 0x467d
movq (%rax), %r14
movq (%r14), %rax
cmpq $0x0, -0x18(%rax)
je 0x465e
leaq 0x9cab(%rip), %rsi      # 0xe14c
movq %r14, %rdi
callq 0x30a0
xorl %ebx, %ebx
testl %eax, %eax
je 0x4654
leaq 0x7ce5(%rip), %rsi      # 0xc19f
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x4654
leaq 0x7cc0(%rip), %rsi      # 0xc191
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x4654
leaq 0x7c8f(%rip), %rsi      # 0xc177
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x4654
callq 0x4252
testb %al, %al
jne 0x4518
leaq 0x99ef(%rip), %rsi      # 0xdef7
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x4654
callq 0x42e9
testb %al, %al
je 0x454f
leaq 0x7c58(%rip), %rsi      # 0xc180
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x4654
leaq 0x7c43(%rip), %rsi      # 0xc182
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x4654
callq 0x4380
testb %al, %al
je 0x4608
leaq 0x7c21(%rip), %rsi      # 0xc184
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x4654
leaq 0x7c10(%rip), %rsi      # 0xc18a
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x4654
leaq 0x7bfe(%rip), %rsi      # 0xc18f
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x4654
leaq 0x7bed(%rip), %rsi      # 0xc195
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x4654
leaq 0x7bdd(%rip), %rsi      # 0xc19c
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x4654
leaq 0x7bcc(%rip), %rsi      # 0xc1a2
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x4654
leaq 0x7bc0(%rip), %rsi      # 0xc1a9
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x4654
leaq 0x7bb3(%rip), %rsi      # 0xc1af
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x4654
callq 0x43f2
testb %al, %al
je 0x464f
leaq 0x7b9d(%rip), %rsi      # 0xc1b5
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x4654
leaq 0x7b90(%rip), %rsi      # 0xc1bb
movq %r14, %rdi
callq 0x30a0
movl $0x1, %ebx
testl %eax, %eax
je 0x4654
leaq 0x7b7f(%rip), %rsi      # 0xc1c2
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x4654
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7b07(%rip), %rdi      # 0xc16c
leaq 0x79c1(%rip), %rsi      # 0xc02d
leaq 0x7acd(%rip), %rcx      # 0xc140
movl $0x1c1, %edx            # imm = 0x1C1
callq 0x3190
leaq 0x7aa5(%rip), %rdi      # 0xc129
leaq 0x79a2(%rip), %rsi      # 0xc02d
leaq 0x7aae(%rip), %rcx      # 0xc140
movl $0x1bd, %edx            # imm = 0x1BD
callq 0x3190