// File: /workspace/github_c_makefile_star2_O2/msteveb[P]autosetup/./jimsh0.c
// Function: JimSubDivHelper
static int JimSubDivHelper(Jim_Interp *interp, int argc, Jim_Obj *const *argv, int op)
{
    jim_wide wideValue, res = 0;
    double doubleValue, doubleRes = 0;
    int i = 2;

    if (argc < 2) {
        Jim_WrongNumArgs(interp, 1, argv, "number ?number ... number?");
        return JIM_ERR;
    }
    else if (argc == 2) {
        if (Jim_GetWide(interp, argv[1], &wideValue) != JIM_OK) {
            if (Jim_GetDouble(interp, argv[1], &doubleValue) != JIM_OK) {
                return JIM_ERR;
            }
            else {
                if (op == JIM_EXPROP_SUB)
                    doubleRes = -doubleValue;
                else
                    doubleRes = 1.0 / doubleValue;
                Jim_SetResult(interp, Jim_NewDoubleObj(interp, doubleRes));
                return JIM_OK;
            }
        }
        if (op == JIM_EXPROP_SUB) {
            res = -wideValue;
            Jim_SetResultInt(interp, res);
        }
        else {
            doubleRes = 1.0 / wideValue;
            Jim_SetResult(interp, Jim_NewDoubleObj(interp, doubleRes));
        }
        return JIM_OK;
    }
    else {
        if (Jim_GetWide(interp, argv[1], &res) != JIM_OK) {
            if (Jim_GetDouble(interp, argv[1], &doubleRes)
                != JIM_OK) {
                return JIM_ERR;
            }
            else {
                goto trydouble;
            }
        }
    }
    for (i = 2; i < argc; i++) {
        if (Jim_GetWide(interp, argv[i], &wideValue) != JIM_OK) {
            doubleRes = (double)res;
            goto trydouble;
        }
        if (op == JIM_EXPROP_SUB)
            res -= wideValue;
        else {
            if (wideValue == 0) {
                Jim_SetResultString(interp, "Division by zero", -1);
                return JIM_ERR;
            }
            res /= wideValue;
        }
    }
    Jim_SetResultInt(interp, res);
    return JIM_OK;
  trydouble:
    for (; i < argc; i++) {
        if (Jim_GetDouble(interp, argv[i], &doubleValue) != JIM_OK)
            return JIM_ERR;
        if (op == JIM_EXPROP_SUB)
            doubleRes -= doubleValue;
        else
            doubleRes /= doubleValue;
    }
    Jim_SetResult(interp, Jim_NewDoubleObj(interp, doubleRes));
    return JIM_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, -0x2c(%rbp)
movq %rdx, %r12
movq %rdi, %rbx
andq $0x0, -0x58(%rbp)
andq $0x0, -0x50(%rbp)
cmpl $0x1, %esi
jg 0x1f093
leaq 0x93c8(%rip), %rcx      # 0x28444
pushq $0x1
popq %r15
movq %rbx, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x72a5
jmp 0x1f291
movl %esi, %r13d
movq 0x8(%r12), %rsi
cmpl $0x2, %r13d
jne 0x1f0d3
leaq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0xc979
testl %eax, %eax
je 0x1f113
movq 0x8(%r12), %rsi
leaq -0x38(%rbp), %rdx
movq %rbx, %rdi
callq 0xd267
testl %eax, %eax
je 0x1f197
pushq $0x1
popq %r15
jmp 0x1f291
leaq -0x58(%rbp), %rdx
movq %rbx, %rdi
callq 0xc979
pushq $0x1
popq %r15
movl %r13d, %r14d
testl %eax, %eax
je 0x1f14c
movq 0x8(%r12), %rsi
leaq -0x50(%rbp), %rdx
movq %rbx, %rdi
callq 0xd267
testl %eax, %eax
jne 0x1f291
movq %rbx, %r15
pushq $0x2
popq %rbx
movsd -0x50(%rbp), %xmm0
jmp 0x1f1e3
movq -0x40(%rbp), %rsi
cmpl $0x17, -0x2c(%rbp)
jne 0x1f1bb
negq %rsi
movq %rbx, %rdi
callq 0x8212
movq %rax, %r14
incl 0x10(%rax)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x2, %eax
jl 0x1f283
jmp 0x1f28b
movq %rbx, %r15
movq -0x58(%rbp), %r13
pushq $0x2
popq %rbx
cmpq %rbx, %r14
je 0x1f1d1
movq (%r12,%rbx,8), %rsi
movq %r15, %rdi
leaq -0x40(%rbp), %rdx
callq 0xc979
testl %eax, %eax
jne 0x1f1de
movq -0x40(%rbp), %rcx
cmpl $0x17, -0x2c(%rbp)
jne 0x1f17e
subq %rcx, %r13
jmp 0x1f192
testq %rcx, %rcx
je 0x1f2a3
movq %r13, %rax
cqto
idivq %rcx
movq %rax, %r13
incq %rbx
jmp 0x1f156
movsd -0x38(%rbp), %xmm0
cmpl $0x17, -0x2c(%rbp)
je 0x1f25c
movsd 0x45da(%rip), %xmm1     # 0x23788
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
jmp 0x1f264
cvtsi2sd %rsi, %xmm1
movsd 0x45c0(%rip), %xmm0     # 0x23788
divsd %xmm1, %xmm0
jmp 0x1f264
movq %r15, %rdi
movq %r13, %rsi
callq 0x8212
jmp 0x1f238
cvtsi2sd %r13, %xmm0
leaq -0x38(%rbp), %r13
cmpq %r14, %rbx
jae 0x1f230
movsd %xmm0, -0x48(%rbp)
movq (%r12,%rbx,8), %rsi
movq %r15, %rdi
movq %r13, %rdx
callq 0xd267
testl %eax, %eax
jne 0x1f0ca
movsd -0x38(%rbp), %xmm0
cmpl $0x17, -0x2c(%rbp)
je 0x1f21e
movsd -0x48(%rbp), %xmm1
divsd %xmm0, %xmm1
jmp 0x1f227
movsd -0x48(%rbp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
incq %rbx
jmp 0x1f1e7
movq %r15, %rdi
callq 0xd366
movq %rax, %r14
incl 0x10(%rax)
movq (%r15), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x1f257
movq %r15, %rdi
callq 0x73bf
movq %r14, (%r15)
jmp 0x1f28e
xorpd 0x454c(%rip), %xmm0     # 0x237b0
movq %rbx, %rdi
callq 0xd366
movq %rax, %r14
incl 0x10(%rax)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x1f28b
movq %rbx, %rdi
callq 0x73bf
movq %r14, (%rbx)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8c97(%rip), %rsi      # 0x27f41
pushq $-0x1
popq %rdx
movq %r15, %rbx
movq %r15, %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 0x1f2d7
movq %rbx, %rdi
callq 0x73bf
movq %r15, (%rbx)
jmp 0x1f0ca