// File: /workspace/github_cpp_makefile_star2_O3/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 0x7ccd(%rip), %rsi      # 0xc126
callq 0x30a0
testl %eax, %eax
jne 0x4473
movq 0x10(%r14), %rax
cmpq %rax, 0x18(%r14)
je 0x4664
movq (%rax), %r14
movq (%r14), %rax
cmpq $0x0, -0x18(%rax)
je 0x4645
leaq 0x9cc4(%rip), %rsi      # 0xe14c
movq %r14, %rdi
callq 0x30a0
xorl %ebx, %ebx
testl %eax, %eax
je 0x463b
leaq 0x7cfe(%rip), %rsi      # 0xc19f
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x463b
leaq 0x7cd9(%rip), %rsi      # 0xc191
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x463b
leaq 0x7ca8(%rip), %rsi      # 0xc177
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x463b
callq 0x4241
testb %al, %al
jne 0x44ff
leaq 0x9a08(%rip), %rsi      # 0xdef7
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x463b
callq 0x42d6
testb %al, %al
je 0x4536
leaq 0x7c71(%rip), %rsi      # 0xc180
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x463b
leaq 0x7c5c(%rip), %rsi      # 0xc182
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x463b
callq 0x436b
testb %al, %al
je 0x45ef
leaq 0x7c3a(%rip), %rsi      # 0xc184
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x463b
leaq 0x7c29(%rip), %rsi      # 0xc18a
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x463b
leaq 0x7c17(%rip), %rsi      # 0xc18f
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x463b
leaq 0x7c06(%rip), %rsi      # 0xc195
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x463b
leaq 0x7bf6(%rip), %rsi      # 0xc19c
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x463b
leaq 0x7be5(%rip), %rsi      # 0xc1a2
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x463b
leaq 0x7bd9(%rip), %rsi      # 0xc1a9
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x463b
leaq 0x7bcc(%rip), %rsi      # 0xc1af
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x463b
callq 0x43db
testb %al, %al
je 0x4636
leaq 0x7bb6(%rip), %rsi      # 0xc1b5
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x463b
leaq 0x7ba9(%rip), %rsi      # 0xc1bb
movq %r14, %rdi
callq 0x30a0
movl $0x1, %ebx
testl %eax, %eax
je 0x463b
leaq 0x7b98(%rip), %rsi      # 0xc1c2
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x463b
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7b20(%rip), %rdi      # 0xc16c
leaq 0x79da(%rip), %rsi      # 0xc02d
leaq 0x7ae6(%rip), %rcx      # 0xc140
movl $0x1c1, %edx            # imm = 0x1C1
callq 0x31a0
leaq 0x7abe(%rip), %rdi      # 0xc129
leaq 0x79bb(%rip), %rsi      # 0xc02d
leaq 0x7ac7(%rip), %rcx      # 0xc140
movl $0x1bd, %edx            # imm = 0x1BD
callq 0x31a0