// File: /workspace/github_c_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r12
movq %rdi, %rbx
movl $0x0, -0x34(%rbp)
movq 0x10(%rsi), %rsi
callq 0xfb9b
movl %eax, %r15d
testl %eax, %eax
jne 0x1a74e
movq (%rbx), %r14
incl 0x10(%r14)
testl %r15d, %r15d
jne 0x1a93d
movq 0x8(%r14), %rax
leaq 0x1bbce(%rip), %rcx     # 0x36330
cmpq %rcx, %rax
jne 0x1a76d
cmpq $0x0, (%r14)
je 0x1a7d7
leaq 0x1bb6c(%rip), %rcx     # 0x362e0
cmpq %rcx, %rax
je 0x1a78f
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xd6d7
testl %eax, %eax
je 0x1a78f
jmp 0x1a796
movq 0x18(%r14), %rsi
movb $0x1, %r15b
testb %r15b, %r15b
je 0x1a7d7
movl (%r12), %ecx
addl $-0x33, %ecx
cmpl $0x8, %ecx
ja 0x1a9d6
xorpd %xmm2, %xmm2
xorl %r15d, %r15d
movb $0x1, %al
leaq 0xdc59(%rip), %rdx      # 0x28414
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
xorl %ecx, %ecx
testq %rsi, %rsi
sete %cl
xorl %r15d, %r15d
movq %rcx, %rsi
jmp 0x1a888
leaq -0x30(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe057
testl %eax, %eax
je 0x1a80d
leaq -0x34(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe1bf
xorpd %xmm2, %xmm2
testl %eax, %eax
je 0x1a83c
movl $0x1, %r15d
xorl %eax, %eax
xorl %esi, %esi
jmp 0x1a888
movl (%r12), %eax
addl $-0x33, %eax
cmpl $0x8, %eax
ja 0x1a9d6
leaq 0xdc14(%rip), %rcx      # 0x28438
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %r15d, %r15d
movb $0x1, %al
movsd -0x30(%rbp), %xmm2
jmp 0x1a9cc
cmpl $0x33, (%r12)
jne 0x1a9d6
xorl %esi, %esi
cmpl $0x0, -0x34(%rbp)
sete %sil
xorl %r15d, %r15d
movb $0x1, %al
jmp 0x1a888
negq %rsi
jmp 0x1a874
xorps %xmm2, %xmm2
cvtsi2sd %rsi, %xmm2
jmp 0x1a9c7
movq %rsi, %rcx
negq %rcx
cmovnsq %rcx, %rsi
xorl %r15d, %r15d
jmp 0x1a888
xorpd %xmm2, %xmm2
xorl %r15d, %r15d
movb $0x1, %al
cvttsd2si -0x30(%rbp), %rsi
xorl %r13d, %r13d
testb %al, %al
je 0x1a922
movq %rsi, -0x40(%rbp)
movapd %xmm2, -0x50(%rbp)
movq %rbx, %rdi
callq 0xae58
movq %rax, %r12
testb %r13b, %r13b
je 0x1a8e4
leaq 0x1ba7d(%rip), %rax     # 0x36330
movq %rax, 0x8(%r12)
movq $0x0, (%r12)
movapd -0x50(%rbp), %xmm0
movsd %xmm0, 0x18(%r12)
incl 0x10(%r12)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jle 0x1a917
jmp 0x1a91f
leaq 0x1b9f5(%rip), %rax     # 0x362e0
movq %rax, 0x8(%r12)
movq $0x0, (%r12)
movq -0x40(%rbp), %rax
movq %rax, 0x18(%r12)
incl 0x10(%r12)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x2, %eax
jge 0x1a91f
movq %rbx, %rdi
callq 0x759a
movq %r12, (%rbx)
movl 0x10(%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r14)
cmpl $0x1, %eax
jg 0x1a93d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x759a
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsd -0x30(%rbp), %xmm2
xorpd 0xd6d4(%rip), %xmm2     # 0x28030
jmp 0x1a9c7
xorpd %xmm2, %xmm2
movsd -0x30(%rbp), %xmm0
cmpeqsd %xmm2, %xmm0
movq %xmm0, %rsi
andl $0x1, %esi
jmp 0x1a851
movsd -0x30(%rbp), %xmm0
xorpd %xmm2, %xmm2
xorl %eax, %eax
ucomisd %xmm0, %xmm2
seta %al
leaq 0xd6ae(%rip), %rcx      # 0x28040
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %rsi
jmp 0x1a851
movsd -0x30(%rbp), %xmm0
movapd 0xd682(%rip), %xmm1     # 0x28030
xorpd %xmm0, %xmm1
movapd %xmm1, %xmm2
cmplesd %xmm0, %xmm2
andpd %xmm2, %xmm0
andnpd %xmm1, %xmm2
orpd %xmm0, %xmm2
xorl %r15d, %r15d
movb $0x1, %al
xorl %esi, %esi
movb $0x1, %r13b
jmp 0x1a88b
callq 0x6070