// File: /workspace/github_c_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r13
movq %rdi, %rbx
movq 0x10(%rsi), %rsi
callq 0xfb9b
movl %eax, %r12d
testl %eax, %eax
jne 0x1a1f7
movq (%rbx), %r14
incl 0x10(%r14)
testl %r12d, %r12d
jne 0x1a239
movq 0x18(%r13), %rsi
movq %rbx, %rdi
callq 0xfb9b
movl %eax, %r12d
testl %eax, %eax
jne 0x1a216
movq (%rbx), %r15
incl 0x10(%r15)
testl %r12d, %r12d
je 0x1a24b
movl 0x10(%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r14)
movq %r14, %r15
cmpl $0x2, %eax
jge 0x1a239
movq %rbx, %rdi
movq %r15, %rsi
callq 0x759a
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c08e(%rip), %rax     # 0x362e0
cmpq %rax, 0x8(%r14)
je 0x1a270
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xd6d7
testl %eax, %eax
je 0x1a270
xorl %eax, %eax
jmp 0x1a27a
movq 0x18(%r14), %rax
movq %rax, -0x30(%rbp)
movb $0x1, %al
movl $0x1, %r12d
testb %al, %al
je 0x1a39c
leaq 0x1c051(%rip), %rax     # 0x362e0
cmpq %rax, 0x8(%r15)
je 0x1a2ad
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0xd6d7
testl %eax, %eax
je 0x1a2ad
xorl %eax, %eax
jmp 0x1a2b3
movq 0x18(%r15), %rcx
movb $0x1, %al
testb %al, %al
je 0x1a39c
movl (%r13), %eax
leal -0x16(%rax), %edx
cmpl $0xf, %edx
ja 0x1a419
leaq 0xe0e2(%rip), %rsi      # 0x283b4
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
movb $0x40, %dl
subb %cl, %dl
cmpl $0x1c, %eax
movzbl %dl, %eax
cmovel %eax, %ecx
rolq %cl, -0x30(%rbp)
jmp 0x1a353
andq %rcx, -0x30(%rbp)
jmp 0x1a353
sarq %cl, -0x30(%rbp)
jmp 0x1a353
shlq %cl, -0x30(%rbp)
jmp 0x1a353
testq %rcx, %rcx
movq -0x30(%rbp), %rdx
je 0x1a3d0
movq %rdx, %rax
negq %rax
testq %rcx, %rcx
cmovnsq %rdx, %rax
movq %rcx, %rsi
negq %rsi
cmovsq %rcx, %rsi
cqto
idivq %rsi
movq %rdx, %rax
sarq $0x3f, %rax
andq %rsi, %rax
addq %rdx, %rax
movq %rax, %rdx
negq %rdx
testq %rcx, %rcx
cmovnsq %rax, %rdx
movq %rdx, -0x30(%rbp)
jmp 0x1a353
orq %rcx, -0x30(%rbp)
jmp 0x1a353
xorq %rcx, -0x30(%rbp)
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0xae58
movq %rax, %r13
leaq 0x1bf78(%rip), %rax     # 0x362e0
movq %rax, 0x8(%r13)
movq $0x0, (%r13)
movq -0x30(%rbp), %rax
movq %rax, 0x18(%r13)
incl 0x10(%r13)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x1a399
movq %rbx, %rdi
callq 0x759a
movq %r13, (%rbx)
movl 0x10(%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r14)
cmpl $0x1, %eax
jg 0x1a3b7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x759a
movl 0x10(%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r15)
cmpl $0x1, %eax
jle 0x1a22e
jmp 0x1a239
leaq 0x12b78(%rip), %rsi     # 0x2cf4f
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7516
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 0x1a403
movq %rbx, %rdi
callq 0x759a
movq %r12, (%rbx)
movl $0x1, %r12d
movq $0x0, -0x30(%rbp)
jmp 0x1a356
callq 0x6070