// File: /workspace/github_c_makefile_star2_O3/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, -0x50(%rbp)
movq %rdx, %r15
movq %rdi, %r14
movq $0x0, -0x60(%rbp)
cmpl $0x1, %esi
jg 0x21ef0
leaq 0xa51f(%rip), %rcx      # 0x2c3f4
movl $0x1, %r13d
movq %r14, %rdi
movl $0x1, %esi
movq %r15, %rdx
callq 0x7446
jmp 0x22227
movl %esi, %r12d
movq 0x8(%r15), %rbx
movq 0x8(%rbx), %rax
cmpl $0x2, %esi
jne 0x21f6b
leaq 0x133e9(%rip), %r12     # 0x352f0
cmpq %r12, %rax
je 0x21fc1
movl $0x1, %r13d
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xd6c3
testl %eax, %eax
je 0x21fc1
movq 0x8(%r15), %rsi
leaq -0x58(%rbp), %rdx
movq %r14, %rdi
callq 0xe040
testl %eax, %eax
jne 0x22227
movsd -0x58(%rbp), %xmm1
cmpl $0x17, -0x50(%rbp)
je 0x221d1
movsd 0x583b(%rip), %xmm0     # 0x27798
divsd %xmm1, %xmm0
movapd %xmm0, -0x50(%rbp)
jmp 0x221de
leaq 0x1337e(%rip), %rcx     # 0x352f0
cmpq %rcx, %rax
je 0x2200c
movl $0x1, %r13d
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xd6c3
testl %eax, %eax
je 0x2200c
movq 0x8(%r15), %rsi
leaq -0x60(%rbp), %rdx
movq %r14, %rdi
callq 0xe040
testl %eax, %eax
jne 0x22227
movq %r14, -0x38(%rbp)
movl $0x2, %r14d
movsd -0x60(%rbp), %xmm0
jmp 0x2210f
movq 0x18(%rbx), %rbx
cmpl $0x17, -0x50(%rbp)
jne 0x220a0
negq %rbx
movq %r14, %rdi
callq 0xae38
movq %r14, %r15
movq %rax, %r14
movq %r12, 0x8(%rax)
movq $0x0, (%rax)
movq %rbx, 0x18(%rax)
incl 0x10(%rax)
movq (%r15), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x2, %eax
jl 0x220f6
jmp 0x220fe
movq %r14, -0x38(%rbp)
movq 0x18(%rbx), %r13
movl %r12d, -0x30(%rbp)
movl %r12d, %r12d
movl $0x2, %r14d
movq (%r15,%r14,8), %rbx
leaq 0x132c4(%rip), %rax     # 0x352f0
cmpq %rax, 0x8(%rbx)
je 0x2204b
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xd6c3
testl %eax, %eax
jne 0x22106
movq 0x18(%rbx), %rcx
cmpl $0x17, -0x50(%rbp)
jne 0x2205a
subq %rcx, %r13
jmp 0x2206e
testq %rcx, %rcx
je 0x2218f
movq %r13, %rax
cqto
idivq %rcx
movq %rax, %r13
incq %r14
cmpq %r14, %r12
jne 0x22021
movq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0xae38
movq %rax, %rbx
leaq 0x13264(%rip), %rax     # 0x352f0
movq %rax, 0x8(%rbx)
movq $0x0, (%rbx)
movq %r13, 0x18(%rbx)
jmp 0x22205
cvtsi2sd %rbx, %xmm0
movsd 0x56eb(%rip), %xmm1     # 0x27798
divsd %xmm0, %xmm1
movsd %xmm1, -0x50(%rbp)
movq %r14, %rdi
callq 0xae38
movq %r14, %r15
movq %rax, %r14
leaq 0x13275(%rip), %rax     # 0x35340
movq %rax, 0x8(%r14)
movq $0x0, (%r14)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, 0x18(%r14)
incl 0x10(%r14)
movq (%r15), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x220fe
movq %r15, %rdi
callq 0x758c
movq %r14, (%r15)
jmp 0x22224
cvtsi2sd %r13, %xmm0
movl -0x30(%rbp), %r12d
cmpl %r12d, %r14d
movsd %xmm0, -0x30(%rbp)
jge 0x22167
movl %r14d, %r14d
movl %r12d, %r12d
leaq -0x58(%rbp), %rbx
movq (%r15,%r14,8), %rsi
movq -0x38(%rbp), %rdi
movq %rbx, %rdx
callq 0xe040
testl %eax, %eax
jne 0x221c9
movsd -0x58(%rbp), %xmm0
cmpl $0x17, -0x50(%rbp)
je 0x22151
movsd -0x30(%rbp), %xmm1
divsd %xmm0, %xmm1
jmp 0x2215a
movsd -0x30(%rbp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, -0x30(%rbp)
incq %r14
cmpq %r14, %r12
jne 0x22123
movq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0xae38
movq %rax, %rbx
leaq 0x131c3(%rip), %rax     # 0x35340
movq %rax, 0x8(%rbx)
movq $0x0, (%rbx)
movsd -0x30(%rbp), %xmm0
jmp 0x22200
leaq 0x9d5b(%rip), %rsi      # 0x2bef1
movq -0x38(%rbp), %r14
movq %r14, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7508
movq %rax, %rbx
incl 0x10(%rax)
movq (%r14), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x221c6
movq %r14, %rdi
callq 0x758c
movq %rbx, (%r14)
movl $0x1, %r13d
jmp 0x22227
xorpd 0x4e57(%rip), %xmm1     # 0x27030
movapd %xmm1, -0x50(%rbp)
movq %r14, %rdi
callq 0xae38
movq %rax, %rbx
leaq 0x13150(%rip), %rax     # 0x35340
movq %rax, 0x8(%rbx)
movq $0x0, (%rbx)
movapd -0x50(%rbp), %xmm0
movsd %xmm0, 0x18(%rbx)
incl 0x10(%rbx)
movq (%r14), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x22221
movq %r14, %rdi
callq 0x758c
movq %rbx, (%r14)
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq