// File: /workspace/github_c_makefile_star2_O2/msteveb[P]autosetup/./jimsh0.c
// Function: JimExprOpIntBin
static int JimExprOpIntBin(Jim_Interp *interp, struct JimExprNode *node)
{
    jim_wide wA, wB;
    int rc;
    Jim_Obj *A, *B;

    if ((rc = JimExprGetTerm(interp, node->left, &A)) != JIM_OK) {
        return rc;
    }
    if ((rc = JimExprGetTerm(interp, node->right, &B)) != JIM_OK) {
        Jim_DecrRefCount(interp, A);
        return rc;
    }

    rc = JIM_ERR;

    if (Jim_GetWide(interp, A, &wA) == JIM_OK && Jim_GetWide(interp, B, &wB) == JIM_OK) {
        jim_wide wC;

        rc = JIM_OK;

        switch (node->type) {
            case JIM_EXPROP_LSHIFT:
                wC = wA << wB;
                break;
            case JIM_EXPROP_RSHIFT:
                wC = wA >> wB;
                break;
            case JIM_EXPROP_BITAND:
                wC = wA & wB;
                break;
            case JIM_EXPROP_BITXOR:
                wC = wA ^ wB;
                break;
            case JIM_EXPROP_BITOR:
                wC = wA | wB;
                break;
            case JIM_EXPROP_MOD:
                if (wB == 0) {
                    wC = 0;
                    Jim_SetResultString(interp, "Division by zero", -1);
                    rc = JIM_ERR;
                }
                else {
                    int negative = 0;

                    if (wB < 0) {
                        wB = -wB;
                        wA = -wA;
                        negative = 1;
                    }
                    wC = wA % wB;
                    if (wC < 0) {
                        wC += wB;
                    }
                    if (negative) {
                        wC = -wC;
                    }
                }
                break;
            case JIM_EXPROP_ROTL:
            case JIM_EXPROP_ROTR:{

                    unsigned long uA = (unsigned long)wA;
                    unsigned long uB = (unsigned long)wB;
                    const unsigned int S = sizeof(unsigned long) * 8;


                    uB %= S;

                    if (node->type == JIM_EXPROP_ROTR) {
                        uB = S - uB;
                    }
                    wC = (unsigned long)(uA << uB) | (uA >> (S - uB));
                    break;
                }
            default:
                abort();
        }
        Jim_SetResultInt(interp, wC);
    }

    Jim_DecrRefCount(interp, A);
    Jim_DecrRefCount(interp, B);

    return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r12
movq %rdi, %rbx
movq 0x10(%rsi), %rsi
leaq -0x40(%rbp), %rdx
callq 0x1818d
movl %eax, %r15d
testl %eax, %eax
jne 0x17a21
movq 0x18(%r12), %rsi
leaq -0x38(%rbp), %rdx
movq %rbx, %rdi
callq 0x1818d
movq -0x40(%rbp), %r14
testl %eax, %eax
je 0x17a31
movl %eax, %r15d
movl 0x10(%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r14)
cmpl $0x2, %eax
jge 0x17a21
movq %rbx, %rdi
movq %r14, %rsi
callq 0x73bf
movl %r15d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq -0x30(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc979
pushq $0x1
popq %r15
testl %eax, %eax
jne 0x17b47
movq -0x38(%rbp), %rsi
leaq -0x28(%rbp), %rdx
movq %rbx, %rdi
callq 0xc979
testl %eax, %eax
jne 0x17b47
movl (%r12), %eax
leal -0x16(%rax), %ecx
cmpl $0xf, %ecx
ja 0x17bbe
leaq 0xb8b5(%rip), %rdx      # 0x23330
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq -0x30(%rbp), %rsi
movl -0x28(%rbp), %edx
movb $0x40, %cl
subb %dl, %cl
cmpl $0x1c, %eax
movzbl %cl, %ecx
cmovnel %edx, %ecx
rolq %cl, %rsi
jmp 0x17b1a
movq -0x30(%rbp), %rsi
movb -0x28(%rbp), %cl
sarq %cl, %rsi
jmp 0x17b1a
movq -0x28(%rbp), %rsi
andq -0x30(%rbp), %rsi
jmp 0x17b1a
movq -0x30(%rbp), %rsi
movb -0x28(%rbp), %cl
shlq %cl, %rsi
jmp 0x17b1a
movq -0x28(%rbp), %rcx
testq %rcx, %rcx
je 0x17b7f
movq -0x30(%rbp), %rdx
movq %rdx, %rax
negq %rax
movq %rcx, %rsi
negq %rsi
cmovsq %rcx, %rsi
testq %rcx, %rcx
cmovnsq %rdx, %rax
cqto
idivq %rsi
movq %rdx, %rax
sarq $0x3f, %rax
andq %rsi, %rax
addq %rdx, %rax
movq %rax, %rsi
negq %rsi
testq %rcx, %rcx
cmovnsq %rax, %rsi
jmp 0x17b1a
movq -0x28(%rbp), %rsi
orq -0x30(%rbp), %rsi
jmp 0x17b1a
movq -0x28(%rbp), %rsi
xorq -0x30(%rbp), %rsi
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x8212
movq %rax, %r12
incl 0x10(%rax)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x17b44
movq %rbx, %rdi
callq 0x73bf
movq %r12, (%rbx)
movl 0x10(%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r14)
cmpl $0x1, %eax
jg 0x17b62
movq %rbx, %rdi
movq %r14, %rsi
callq 0x73bf
movq -0x38(%rbp), %r14
movl 0x10(%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r14)
cmpl $0x1, %eax
jle 0x17a16
jmp 0x17a21
leaq 0x103bb(%rip), %rsi     # 0x27f41
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x7363
movq %rax, %r15
incl 0x10(%rax)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x17bb0
movq %rbx, %rdi
callq 0x73bf
movq %r15, (%rbx)
pushq $0x1
popq %r15
xorl %esi, %esi
jmp 0x17b1d
callq 0x6070