// File: /workspace/github_c_makefile_star2_O0/heltilda[P]cicada/bytecd.c
// Function: callNumericFunction
void callNumericFunction(ccInt numType)  {
    
    variable *theVariable;
    ccInt *holdPCCodePtr = pcCodePtr;
    void(*loadNum)(variable *, ccInt);
    
    callBytecodeFunction();        // read in an argument
    if (errCode != passed)  return;
    
    
        // if it's stored in the registers, we're done
    
    if (numType == GL_Object.type)  return;
    
        // do a type conversion between registers if necessary
    
    else if ((numType == double_type) && (GL_Object.type == int_type))  {
        doubleRegister = (ccFloat) intRegister;
        return;     }
    else if ((numType == int_type) && (GL_Object.type == double_type))  {
        if (!((doubleRegister <= ccIntMax) && (doubleRegister >= ccIntMin)))  setWarning(out_of_range_err, holdPCCodePtr);
        intRegister = (ccInt) doubleRegister;
        return;     }
    
    
        // the number we want is stored in a variable; if it passes some quick checks then get it out
    
    if (GL_Object.type != var_type)  {  setError(not_a_variable_err, pcCodePtr-1);  return;  }
    if (searchView.windowPtr == NULL)  {  setError(void_member_err, pcCodePtr-1);  return;  }
    if (searchView.width != 1)  {  setError(multiple_indices_not_allowed_err, pcCodePtr-1);  return;  }
    
    theVariable = searchView.windowPtr->variable_ptr;
    if ((theVariable->type < char_type) || (theVariable->type > double_type))  {
        setError(not_a_number_err, pcCodePtr-1);
        return;         }    // must be numeric
    
    if (numType == int_type)  loadNum = loadIntRegister;
    else if (numType == double_type)  loadNum = loadDoubleRegister;
    else if (theVariable->type == double_type)  loadNum = loadDoubleRegister;
    else  loadNum = loadIntRegister;
    
    loadNum(searchView.windowPtr->variable_ptr, searchView.offset);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq 0x17a56(%rip), %rax     # 0x2c808
movq %rax, -0x18(%rbp)
callq 0x146f0
cmpl $0x0, 0x179a6(%rip)     # 0x2c768
je 0x14dc9
jmp 0x14f69
movl -0x4(%rbp), %eax
cmpl 0x17a56(%rip), %eax     # 0x2c828
jne 0x14dd9
jmp 0x14f69
cmpl $0x3, -0x4(%rbp)
jne 0x14dfd
cmpl $0x2, 0x17a42(%rip)     # 0x2c828
jne 0x14dfd
cvtsi2sdl 0x179cc(%rip), %xmm0 # 0x2c7bc
movsd %xmm0, 0x179c8(%rip)    # 0x2c7c0
jmp 0x14f69
cmpl $0x2, -0x4(%rbp)
jne 0x14e55
cmpl $0x3, 0x17a1e(%rip)     # 0x2c828
jne 0x14e55
movsd 0xde6c(%rip), %xmm0     # 0x22c80
ucomisd 0x179a4(%rip), %xmm0    # 0x2c7c0
jb 0x14e34
movsd 0x1799a(%rip), %xmm0    # 0x2c7c0
movsd 0xde5a(%rip), %xmm1     # 0x22c88
ucomisd %xmm1, %xmm0
jae 0x14e42
movq -0x18(%rbp), %rsi
movl $0x2, %edi
callq 0xf940
cvttsd2si 0x17976(%rip), %eax # 0x2c7c0
movl %eax, 0x1796c(%rip)     # 0x2c7bc
jmp 0x14f69
jmp 0x14e57
jmp 0x14e59
cmpl $-0x1, 0x179c8(%rip)    # 0x2c828
je 0x14e7c
movq 0x1799f(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
movl $0x22, %edi
callq 0xf740
jmp 0x14f69
cmpq $0x0, 0x17a24(%rip)     # 0x2c8a8
jne 0x14ea0
movq 0x1797b(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
movl $0x1a, %edi
callq 0xf740
jmp 0x14f69
cmpl $0x1, 0x17a0d(%rip)     # 0x2c8b4
je 0x14ec3
movq 0x17958(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
movl $0x1f, %edi
callq 0xf740
jmp 0x14f69
movq 0x179de(%rip), %rax     # 0x2c8a8
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0xc0(%rax)
jl 0x14eec
movq -0x10(%rbp), %rax
cmpl $0x3, 0xc0(%rax)
jle 0x14f03
movq 0x17915(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
movl $0x29, %edi
callq 0xf740
jmp 0x14f69
cmpl $0x2, -0x4(%rbp)
jne 0x14f16
leaq 0x5970(%rip), %rax      # 0x1a880
movq %rax, -0x20(%rbp)
jmp 0x14f52
cmpl $0x3, -0x4(%rbp)
jne 0x14f29
leaq 0x59ad(%rip), %rax      # 0x1a8d0
movq %rax, -0x20(%rbp)
jmp 0x14f50
movq -0x10(%rbp), %rax
cmpl $0x3, 0xc0(%rax)
jne 0x14f43
leaq 0x5993(%rip), %rax      # 0x1a8d0
movq %rax, -0x20(%rbp)
jmp 0x14f4e
leaq 0x5936(%rip), %rax      # 0x1a880
movq %rax, -0x20(%rbp)
jmp 0x14f50
jmp 0x14f52
movq -0x20(%rbp), %rax
movq 0x1794b(%rip), %rcx     # 0x2c8a8
movq 0x10(%rcx), %rdi
movl 0x17949(%rip), %esi     # 0x2c8b0
callq *%rax
addq $0x20, %rsp
popq %rbp
retq
nop