// File: /workspace/github_c_makefile_star2_O3/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, %r15
movq %rdi, %rbx
movl $0x0, -0x34(%rbp)
movq 0x10(%rsi), %rsi
callq 0xfb5a
movl %eax, %r12d
testl %eax, %eax
jne 0x1a326
movq (%rbx), %r14
incl 0x10(%r14)
movq 0x8(%r14), %rax
leaq 0x1b10d(%rip), %r12     # 0x35340
cmpq %r12, %rax
je 0x1a246
leaq 0x1b0b1(%rip), %rcx     # 0x352f0
cmpq %rcx, %rax
jne 0x1a24c
jmp 0x1a2a4
cmpq $0x0, (%r14)
je 0x1a25d
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xd6c3
testl %eax, %eax
je 0x1a2a4
leaq -0x30(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe040
testl %eax, %eax
je 0x1a338
leaq -0x34(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe195
movl $0x1, %r12d
testl %eax, %eax
jne 0x1a30b
cmpl $0x33, (%r15)
jne 0x1a456
xorl %r13d, %r13d
cmpl $0x0, -0x34(%rbp)
sete %r13b
jmp 0x1a2c7
movl (%r15), %eax
addl $-0x33, %eax
cmpl $0x8, %eax
ja 0x1a456
movq 0x18(%r14), %r13
leaq 0xd132(%rip), %rcx      # 0x273f0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0xae38
movq %rax, %r15
leaq 0x1b017(%rip), %rax     # 0x352f0
movq %rax, 0x8(%r15)
movq $0x0, (%r15)
movq %r13, 0x18(%r15)
incl 0x10(%r15)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x2, %eax
jge 0x1a305
movq %rbx, %rdi
callq 0x758c
movq %r15, (%rbx)
xorl %r12d, %r12d
movl 0x10(%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r14)
cmpl $0x1, %eax
jg 0x1a326
movq %rbx, %rdi
movq %r14, %rsi
callq 0x758c
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl (%r15), %eax
addl $-0x33, %eax
cmpl $0x8, %eax
ja 0x1a456
leaq 0xd0c6(%rip), %rcx      # 0x27414
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsd -0x30(%rbp), %xmm0
jmp 0x1a3a4
xorl %eax, %eax
testq %r13, %r13
sete %al
movq %rax, %r13
jmp 0x1a2c7
negq %r13
jmp 0x1a2c7
cvtsi2sd %r13, %xmm0
jmp 0x1a3a4
movq %r13, %rax
negq %rax
cmovnsq %rax, %r13
jmp 0x1a2c7
cvttsd2si -0x30(%rbp), %r13
jmp 0x1a2c7
movsd -0x30(%rbp), %xmm0
xorpd 0xcc8c(%rip), %xmm0     # 0x27030
movapd %xmm0, -0x50(%rbp)
movq %rbx, %rdi
callq 0xae38
movq %rax, %r15
movq %r12, 0x8(%rax)
movq $0x0, (%rax)
movapd -0x50(%rbp), %xmm0
movsd %xmm0, 0x18(%rax)
incl 0x10(%rax)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jle 0x1a2fd
jmp 0x1a305
xorpd %xmm0, %xmm0
cmpeqsd -0x30(%rbp), %xmm0
movq %xmm0, %r13
andl $0x1, %r13d
jmp 0x1a2c7
movsd -0x30(%rbp), %xmm0
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0xcc29(%rip), %rcx      # 0x27040
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %r13
jmp 0x1a2c7
movsd -0x30(%rbp), %xmm0
movapd 0xcbfd(%rip), %xmm1     # 0x27030
xorpd %xmm0, %xmm1
movapd %xmm1, %xmm2
cmplesd %xmm0, %xmm2
andpd %xmm2, %xmm0
andnpd %xmm1, %xmm2
orpd %xmm0, %xmm2
movapd %xmm2, -0x50(%rbp)
jmp 0x1a3a9
callq 0x6070