// File: /workspace/github_c_makefile_star2_O0/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
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
movl $0x0, -0x24(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x50(%rbp), %rdx
callq 0x23a90
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
je 0x23539
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2388d
movq -0x50(%rbp), %rax
leaq 0x22efc(%rip), %rcx     # 0x46440
cmpq %rcx, 0x8(%rax)
jne 0x23558
movq -0x50(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2360a
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x21920
cmpl $0x0, %eax
jne 0x2360a
movq -0x18(%rbp), %rax
movl (%rax), %eax
addl $-0x33, %eax
movl %eax, %ecx
movq %rcx, -0x68(%rbp)
subl $0x8, %eax
ja 0x23600
movq -0x68(%rbp), %rax
leaq 0x13c37(%rip), %rcx     # 0x371c8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x23605
cvtsi2sdq -0x40(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movl $0x0, -0x1c(%rbp)
jmp 0x23605
cmpq $0x0, -0x40(%rbp)
jl 0x235c9
movq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x235d3
xorl %eax, %eax
subq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x23605
xorl %eax, %eax
subq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x23605
cmpq $0x0, -0x40(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
movq %rax, -0x48(%rbp)
jmp 0x23605
callq 0x6070
jmp 0x237b1
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0xfa00
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jne 0x2376a
movq -0x18(%rbp), %rax
movl (%rax), %eax
addl $-0x33, %eax
movl %eax, %ecx
movq %rcx, -0x78(%rbp)
subl $0x8, %eax
ja 0x23763
movq -0x78(%rbp), %rax
leaq 0x13b5a(%rip), %rcx     # 0x371a4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cvttsd2si -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x23768
xorps %xmm0, %xmm0
ucomisd -0x30(%rbp), %xmm0
jbe 0x23684
movsd -0x30(%rbp), %xmm0
movsd 0x1421f(%rip), %xmm1    # 0x37898
subsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
jmp 0x23696
movsd 0x1420c(%rip), %xmm0    # 0x37898
addsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x80(%rbp), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, -0x48(%rbp)
jmp 0x23768
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movl $0x0, -0x1c(%rbp)
jmp 0x23768
movsd -0x30(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x236dc
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
jmp 0x23700
movsd -0x30(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x88(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movl $0x0, -0x1c(%rbp)
jmp 0x23768
movsd -0x30(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x38(%rbp)
movl $0x0, -0x1c(%rbp)
jmp 0x23768
movsd -0x30(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
setne %al
setp %cl
orb %cl, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
movq %rax, -0x48(%rbp)
jmp 0x23768
callq 0x6070
jmp 0x237af
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0x24(%rbp), %rdx
callq 0xfc30
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jne 0x237ad
movq -0x18(%rbp), %rax
movl (%rax), %eax
subl $0x33, %eax
jne 0x237a6
jmp 0x23790
cmpl $0x0, -0x24(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
movq %rax, -0x48(%rbp)
jmp 0x237ab
callq 0x6070
jmp 0x237ad
jmp 0x237af
jmp 0x237b1
cmpl $0x0, -0x20(%rbp)
jne 0x23868
cmpl $0x0, -0x1c(%rbp)
je 0x23813
jmp 0x237c3
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x8d60
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x23806
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x7a10
movq -0x58(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x23866
jmp 0x23815
movq -0x10(%rbp), %rdi
movsd -0x38(%rbp), %xmm0
callq 0xfbe0
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x23859
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x7a10
movq -0x60(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x23866
jmp 0x23868
movq -0x50(%rbp), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x23887
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x7a10
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)