// File: /workspace/github_c_makefile_star2_O1/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, %r8
movq %rdi, %r15
movq $0x0, -0x38(%rbp)
cmpl $0x1, %esi
jg 0x2263e
leaq 0xae2f(%rip), %rcx      # 0x2d452
movl $0x1, %r13d
movq %r15, %rdi
movl $0x1, %esi
movq %r8, %rdx
callq 0x7454
jmp 0x229f8
movl %esi, %r12d
movq 0x8(%r8), %r13
movq 0x8(%r13), %rax
cmpl $0x2, %esi
movq %r8, -0x40(%rbp)
jne 0x2267d
leaq 0x13c87(%rip), %rbx     # 0x362e0
cmpq %rbx, %rax
je 0x226a8
movq %r15, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0xd6d7
movq -0x40(%rbp), %r8
testl %eax, %eax
je 0x226a8
movq %r15, %r12
xorl %eax, %eax
jmp 0x226b1
leaq 0x13c5c(%rip), %rcx     # 0x362e0
cmpq %rcx, %rax
je 0x226fe
movq %r15, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0xd6d7
movq -0x40(%rbp), %r8
testl %eax, %eax
je 0x226fe
xorl %r13d, %r13d
xorl %eax, %eax
jmp 0x22704
movq %r15, %r12
movq 0x18(%r13), %r15
movb $0x1, %al
testb %al, %al
je 0x227d7
cmpl $0x17, -0x50(%rbp)
jne 0x22845
negq %r15
movq %r12, %rdi
callq 0xae58
movq %rax, %r14
movq %rbx, 0x8(%rax)
movq $0x0, (%rax)
movq %r15, 0x18(%rax)
incl 0x10(%rax)
movq (%r12), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x2, %eax
jl 0x229e9
jmp 0x229f1
movq 0x18(%r13), %r13
movb $0x1, %al
testb %al, %al
je 0x22819
movq %r15, -0x30(%rbp)
cmpl $0x4, %r12d
movl %r12d, %eax
movl $0x3, %r12d
movl %eax, -0x5c(%rbp)
cmovgel %eax, %r12d
movl $0x2, %r14d
movq (%r8,%r14,8), %rbx
leaq 0x13bab(%rip), %rax     # 0x362e0
cmpq %rax, 0x8(%rbx)
je 0x22758
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xd6d7
movq -0x40(%rbp), %r8
testl %eax, %eax
je 0x22758
xorl %eax, %eax
jmp 0x2275e
movq 0x18(%rbx), %r15
movb $0x1, %al
testb %al, %al
je 0x22887
cmpl $0x17, -0x50(%rbp)
jne 0x22771
subq %r15, %r13
jmp 0x22785
testq %r15, %r15
je 0x22957
movq %r13, %rax
cqto
idivq %r15
movq %rax, %r13
incq %r14
cmpq %r14, %r12
jne 0x2272a
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0xae58
movq %rax, %r14
leaq 0x13b3d(%rip), %rax     # 0x362e0
movq %rax, 0x8(%r14)
movq $0x0, (%r14)
movq %r13, 0x18(%r14)
incl 0x10(%r14)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x227cf
movq %rbx, %rdi
callq 0x759a
movq %r14, (%rbx)
jmp 0x229f5
movq 0x8(%r8), %rsi
leaq -0x58(%rbp), %rdx
movq %r12, %rdi
callq 0xe057
movl $0x1, %r13d
testl %eax, %eax
jne 0x229f8
movsd -0x58(%rbp), %xmm1
cmpl $0x17, -0x50(%rbp)
je 0x22999
movsd 0x5fe4(%rip), %xmm0     # 0x287f0
divsd %xmm1, %xmm0
movapd %xmm0, %xmm1
jmp 0x229a1
movq 0x8(%r8), %rsi
leaq -0x38(%rbp), %rdx
movq %r15, %rdi
movq %r8, %rbx
callq 0xe057
movl $0x1, %r13d
testl %eax, %eax
jne 0x229f8
movl $0x2, %r14d
movq %rbx, %r8
jmp 0x22899
cvtsi2sd %r15, %xmm0
movsd 0x5f9e(%rip), %xmm1     # 0x287f0
divsd %xmm0, %xmm1
movsd %xmm1, -0x50(%rbp)
movsd %xmm1, -0x38(%rbp)
movq %r12, %rdi
callq 0xae58
movq %rax, %r14
leaq 0x13abe(%rip), %rax     # 0x36330
movq %rax, 0x8(%r14)
movq $0x0, (%r14)
movsd -0x50(%rbp), %xmm0
jmp 0x229cd
cvtsi2sd %r13, %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x30(%rbp), %r15
movl -0x5c(%rbp), %r12d
movsd -0x38(%rbp), %xmm1
cmpl %r12d, %r14d
jge 0x228f4
movl %r14d, %ebx
movl %r12d, %r14d
leaq -0x58(%rbp), %r12
movsd %xmm1, -0x30(%rbp)
movq (%r8,%rbx,8), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0xe057
testl %eax, %eax
jne 0x2294b
movsd -0x58(%rbp), %xmm0
cmpl $0x17, -0x50(%rbp)
je 0x228df
movsd -0x30(%rbp), %xmm1
divsd %xmm0, %xmm1
jmp 0x228e8
movsd -0x30(%rbp), %xmm1
subsd %xmm0, %xmm1
movq -0x40(%rbp), %r8
incq %rbx
cmpq %rbx, %r14
jne 0x228ad
movsd %xmm1, -0x30(%rbp)
movsd %xmm1, -0x38(%rbp)
movq %r15, %rdi
callq 0xae58
movq %rax, %r14
leaq 0x13a20(%rip), %rax     # 0x36330
movq %rax, 0x8(%r14)
movq $0x0, (%r14)
movsd -0x30(%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 0x22943
movq %r15, %rdi
callq 0x759a
movq %r14, (%r15)
jmp 0x229f5
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
jmp 0x22991
leaq 0xa5f1(%rip), %rsi      # 0x2cf4f
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7516
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 0x2298e
movq %rbx, %rdi
callq 0x759a
movq %r14, (%rbx)
movl $0x1, %r13d
jmp 0x229f8
xorpd 0x568f(%rip), %xmm1     # 0x28030
movapd %xmm1, -0x50(%rbp)
movsd %xmm1, -0x38(%rbp)
movq %r12, %rdi
callq 0xae58
movq %rax, %r14
leaq 0x13973(%rip), %rax     # 0x36330
movq %rax, 0x8(%r14)
movq $0x0, (%r14)
movapd -0x50(%rbp), %xmm0
movsd %xmm0, 0x18(%r14)
incl 0x10(%r14)
movq (%r12), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x229f1
movq %r12, %rdi
callq 0x759a
movq %r14, (%r12)
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq