// File: /workspace/github_c_makefile_star2_O0/mohuangrui[P]ArtraCFD/calculator.c
// Function: DoUnary
static int DoUnary(const char toprt, const Real oprdx, Real *pcoprd)
{
    const Real zero = 0.0;
    switch (toprt) {
        case 'e':
            *pcoprd = exp(oprdx);
            break;
        case 'n':
            if (zero >= oprdx) {
                ShowWarning("non-positive argument of ln(x)");
                *pcoprd = zero;
                return 1;
            }
            *pcoprd = log(oprdx);
            break;
        case 'g':
            if (zero >= oprdx) {
                ShowWarning("non-positive argument of lg(x)");
                *pcoprd = zero;
                return 1;
            }
            *pcoprd = log10(oprdx);
            break;
        case 'a':
            *pcoprd = fabs(oprdx);
            break;
        case 's':
            *pcoprd = sin(oprdx);
            break;
        case 'c':
            *pcoprd = cos(oprdx);
            break;
        case 't':
            if (zero == cos(oprdx)) {
                ShowWarning("illegal argument of tangent");
                *pcoprd = zero;
                return 1;
            }
            *pcoprd = sin(oprdx) / cos(oprdx);
            break;
        default:
            *pcoprd = zero;
            return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dil, %al
movb %al, -0x5(%rbp)
movsd %xmm0, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movsbl -0x5(%rbp), %eax
addl $-0x61, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x13, %eax
ja 0x45ad
movq -0x28(%rbp), %rax
leaq 0x1fd60(%rip), %rcx     # 0x241b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsd -0x10(%rbp), %xmm0
callq 0x2210
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x45c1
xorps %xmm0, %xmm0
ucomisd -0x10(%rbp), %xmm0
jb 0x449f
leaq 0x20491(%rip), %rdi     # 0x24912
movb $0x0, %al
callq 0xbb20
movq -0x18(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x45c8
movsd -0x10(%rbp), %xmm0
callq 0x20e0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x45c1
xorps %xmm0, %xmm0
ucomisd -0x10(%rbp), %xmm0
jb 0x44e5
leaq 0x2046a(%rip), %rdi     # 0x24931
movb $0x0, %al
callq 0xbb20
movq -0x18(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x45c8
movsd -0x10(%rbp), %xmm0
callq 0x2130
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x45c1
movsd -0x10(%rbp), %xmm0
movaps 0x20068(%rip), %xmm1    # 0x24570
pand %xmm1, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x45c1
movsd -0x10(%rbp), %xmm0
callq 0x21c0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x45c1
movsd -0x10(%rbp), %xmm0
callq 0x20f0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x45c1
movsd -0x10(%rbp), %xmm0
callq 0x20f0
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jne 0x457e
jp 0x457e
leaq 0x203ed(%rip), %rdi     # 0x24950
movb $0x0, %al
callq 0xbb20
movq -0x18(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x45c8
movsd -0x10(%rbp), %xmm0
callq 0x21c0
movsd %xmm0, -0x30(%rbp)
movsd -0x10(%rbp), %xmm0
callq 0x20f0
movaps %xmm0, %xmm1
movsd -0x30(%rbp), %xmm0
divsd %xmm1, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x45c1
movq -0x18(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x45c8
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)