// File: /workspace/github_c_makefile_star2_O2/msteveb[P]autosetup/./jimsh0.c
// Function: JimExprOpNumUnary
static int JimExprOpNumUnary(Jim_Interp *interp, struct JimExprNode *node)
{
    int intresult = 1;
    int rc, bA = 0;
    double dA, dC = 0;
    jim_wide wA, wC = 0;
    Jim_Obj *A;

    if ((rc = JimExprGetTerm(interp, node->left, &A)) != JIM_OK) {
        return rc;
    }

    if ((A->typePtr != &doubleObjType || A->bytes) && JimGetWideNoErr(interp, A, &wA) == JIM_OK) {
        switch (node->type) {
            case JIM_EXPROP_FUNC_INT:
            case JIM_EXPROP_FUNC_WIDE:
            case JIM_EXPROP_FUNC_ROUND:
            case JIM_EXPROP_UNARYPLUS:
                wC = wA;
                break;
            case JIM_EXPROP_FUNC_DOUBLE:
                dC = wA;
                intresult = 0;
                break;
            case JIM_EXPROP_FUNC_ABS:
                wC = wA >= 0 ? wA : -wA;
                break;
            case JIM_EXPROP_UNARYMINUS:
                wC = -wA;
                break;
            case JIM_EXPROP_NOT:
                wC = !wA;
                break;
            default:
                abort();
        }
    }
    else if ((rc = Jim_GetDouble(interp, A, &dA)) == JIM_OK) {
        switch (node->type) {
            case JIM_EXPROP_FUNC_INT:
            case JIM_EXPROP_FUNC_WIDE:
                wC = dA;
                break;
            case JIM_EXPROP_FUNC_ROUND:
                wC = dA < 0 ? (dA - 0.5) : (dA + 0.5);
                break;
            case JIM_EXPROP_FUNC_DOUBLE:
            case JIM_EXPROP_UNARYPLUS:
                dC = dA;
                intresult = 0;
                break;
            case JIM_EXPROP_FUNC_ABS:
#ifdef JIM_MATH_FUNCTIONS
                dC = fabs(dA);
#else
                dC = dA >= 0 ? dA : -dA;
#endif
                intresult = 0;
                break;
            case JIM_EXPROP_UNARYMINUS:
                dC = -dA;
                intresult = 0;
                break;
            case JIM_EXPROP_NOT:
                wC = !dA;
                break;
            default:
                abort();
        }
    }
    else if ((rc = Jim_GetBoolean(interp, A, &bA)) == JIM_OK) {
        switch (node->type) {
            case JIM_EXPROP_NOT:
                wC = !bA;
                break;
            default:
                abort();
        }
    }

    if (rc == JIM_OK) {
        if (intresult) {
            Jim_SetResultInt(interp, wC);
        }
        else {
            Jim_SetResult(interp, Jim_NewDoubleObj(interp, dC));
        }
    }

    Jim_DecrRefCount(interp, A);

    return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r15
movq %rdi, %rbx
andl $0x0, -0x34(%rbp)
movq 0x10(%rsi), %rsi
leaq -0x40(%rbp), %rdx
callq 0x1818d
movl %eax, %r12d
testl %eax, %eax
jne 0x17fb5
movq -0x40(%rbp), %r14
leaq 0x19547(%rip), %rax     # 0x313e0
cmpq %rax, 0x8(%r14)
jne 0x17ea5
cmpq $0x0, (%r14)
je 0x17eb8
leaq -0x30(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1733a
testl %eax, %eax
je 0x17ee7
leaq -0x28(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd267
testl %eax, %eax
je 0x17f0c
leaq -0x34(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd397
testl %eax, %eax
je 0x17f35
pushq $0x1
popq %r12
jmp 0x17f9a
movl (%r15), %eax
addl $-0x33, %eax
cmpl $0x8, %eax
ja 0x18071
leaq 0xb493(%rip), %rcx      # 0x23390
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x30(%rbp), %rsi
jmp 0x17f6d
movl (%r15), %eax
addl $-0x33, %eax
cmpl $0x8, %eax
ja 0x18071
leaq 0xb492(%rip), %rcx      # 0x233b4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsd -0x28(%rbp), %xmm0
jmp 0x18049
cmpl $0x33, (%r15)
jne 0x18071
xorl %esi, %esi
cmpl $0x0, -0x34(%rbp)
jmp 0x17f69
cvttsd2si -0x28(%rbp), %rsi
jmp 0x17f6d
cvtsi2sdq -0x30(%rbp), %xmm0
jmp 0x18049
xorl %esi, %esi
subq -0x30(%rbp), %rsi
jmp 0x17f6d
xorl %esi, %esi
cmpq $0x0, -0x30(%rbp)
sete %sil
movq %rbx, %rdi
callq 0x8212
movq %rax, %r15
incl 0x10(%rax)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x2, %eax
jge 0x17f94
movq %rbx, %rdi
callq 0x73bf
movq %r15, (%rbx)
xorl %r12d, %r12d
movl 0x10(%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r14)
cmpl $0x1, %eax
jg 0x17fb5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x73bf
movl %r12d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq -0x30(%rbp), %rax
movq %rax, %rsi
negq %rsi
cmovsq %rax, %rsi
jmp 0x17f6d
movsd -0x28(%rbp), %xmm0
xorpd 0xb7ce(%rip), %xmm0     # 0x237b0
jmp 0x18049
xorpd %xmm0, %xmm0
cmpeqsd -0x28(%rbp), %xmm0
movq %xmm0, %rsi
andl $0x1, %esi
jmp 0x17f6d
movsd -0x28(%rbp), %xmm0
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0xb7ac(%rip), %rcx      # 0x237c0
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %rsi
jmp 0x17f6d
movsd -0x28(%rbp), %xmm1
movapd 0xb780(%rip), %xmm2     # 0x237b0
xorpd %xmm1, %xmm2
movapd %xmm2, %xmm0
cmplesd %xmm1, %xmm0
andpd %xmm0, %xmm1
andnpd %xmm2, %xmm0
orpd %xmm1, %xmm0
movq %rbx, %rdi
callq 0xd366
movq %rax, %r15
incl 0x10(%rax)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jle 0x17f8c
jmp 0x17f94
callq 0x6070