// File: /workspace/github_c_makefile_star2_O3/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 0xfb5a
movl %eax, %r12d
testl %eax, %eax
jne 0x19d2d
movq (%rbx), %r15
incl 0x10(%r15)
movq 0x18(%r13), %rsi
movq %rbx, %rdi
callq 0xfb5a
testl %eax, %eax
je 0x19d3f
movl %eax, %r12d
movl 0x10(%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r15)
movq %r15, %r14
cmpl $0x2, %eax
jge 0x19d2d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x758c
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %r14
incl 0x10(%r14)
leaq 0x1b5a3(%rip), %rax     # 0x352f0
cmpq %rax, 0x8(%r15)
je 0x19d71
movl $0x1, %r12d
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0xd6c3
testl %eax, %eax
jne 0x19e87
movq 0x18(%r15), %rdi
leaq 0x1b574(%rip), %rax     # 0x352f0
cmpq %rax, 0x8(%r14)
je 0x19da8
movl $0x1, %r12d
movq %rdi, -0x30(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xd6c3
movq -0x30(%rbp), %rdi
testl %eax, %eax
jne 0x19e87
movl (%r13), %eax
leal -0x16(%rax), %edx
cmpl $0xf, %edx
ja 0x19f04
movq 0x18(%r14), %rcx
leaq 0xd5cd(%rip), %rsi      # 0x27390
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, %rdi
jmp 0x19e3a
andq %rcx, %rdi
jmp 0x19e3a
sarq %cl, %rdi
jmp 0x19e3a
shlq %cl, %rdi
jmp 0x19e3a
testq %rcx, %rcx
je 0x19ebb
movq %rdi, %rax
negq %rax
testq %rcx, %rcx
cmovnsq %rdi, %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 0x19e3e
orq %rcx, %rdi
jmp 0x19e3a
xorq %rcx, %rdi
movq %rdi, -0x30(%rbp)
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0xae38
movq %rax, %r13
leaq 0x1b49d(%rip), %rax     # 0x352f0
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 0x19e84
movq %rbx, %rdi
callq 0x758c
movq %r13, (%rbx)
movl 0x10(%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r15)
cmpl $0x1, %eax
jg 0x19ea2
movq %rbx, %rdi
movq %r15, %rsi
callq 0x758c
movl 0x10(%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r14)
cmpl $0x1, %eax
jle 0x19d22
jmp 0x19d2d
leaq 0x1202f(%rip), %rsi     # 0x2bef1
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7508
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 0x19eee
movq %rbx, %rdi
callq 0x758c
movq %r12, (%rbx)
movl $0x1, %r12d
movq $0x0, -0x30(%rbp)
jmp 0x19e41
callq 0x6070