// File: /workspace/github_c_makefile_star2_O0/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
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x38(%rbp), %rdx
callq 0x23a90
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
je 0x22dbb
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x23092
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
leaq -0x40(%rbp), %rdx
callq 0x23a90
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
je 0x22e02
movq -0x38(%rbp), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x22df7
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x7a10
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x23092
movl $0x1, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0xf640
cmpl $0x0, %eax
jne 0x2304e
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0xf640
cmpl $0x0, %eax
jne 0x2304e
movl $0x0, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
addl $-0x16, %eax
movl %eax, %ecx
movq %rcx, -0x80(%rbp)
subl $0xf, %eax
ja 0x22ff7
movq -0x80(%rbp), %rax
leaq 0x142dd(%rip), %rcx     # 0x37144
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
shlq %cl, %rax
movq %rax, -0x48(%rbp)
jmp 0x22ffc
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
sarq %cl, %rax
movq %rax, -0x48(%rbp)
jmp 0x22ffc
movq -0x20(%rbp), %rax
andq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x22ffc
movq -0x20(%rbp), %rax
xorq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x22ffc
movq -0x20(%rbp), %rax
orq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x22ffc
cmpq $0x0, -0x28(%rbp)
jne 0x22f39
movq $0x0, -0x48(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x193ce(%rip), %rsi     # 0x3c2b3
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7990
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x22f25
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x7a10
movq -0x50(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x2c(%rbp)
jmp 0x22f95
movl $0x0, -0x54(%rbp)
cmpq $0x0, -0x28(%rbp)
jge 0x22f62
xorl %eax, %eax
subq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
xorl %eax, %eax
subq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x1, -0x54(%rbp)
movq -0x20(%rbp), %rax
cqto
idivq -0x28(%rbp)
movq %rdx, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jge 0x22f83
movq -0x28(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0x22f93
xorl %eax, %eax
subq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x22f95
jmp 0x22ffc
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x40, -0x6c(%rbp)
movq -0x68(%rbp), %rax
andq $0x3f, %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x1c, (%rax)
jne 0x22fd0
movl $0x40, %eax
subq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movq -0x68(%rbp), %rcx
shlq %cl, %rax
movq -0x60(%rbp), %rdx
movl $0x40, %ecx
subq -0x68(%rbp), %rcx
shrq %cl, %rdx
movq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x48(%rbp)
jmp 0x22ffc
callq 0x6070
jmp 0x22ffe
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x8d60
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x23041
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x7a10
movq -0x78(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x2304e
movq -0x38(%rbp), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x2306d
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x7a10
movq -0x40(%rbp), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x2308c
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x7a10
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nop