// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x14ca2(%rip), %r14     # 0x24818
movslq (%r14), %rax
leaq 0x4(%r14), %rcx
movq %rcx, 0x14c94(%rip)     # 0x24818
leaq 0x139d5(%rip), %rcx     # 0x23560
callq *(%rcx,%rax,8)
cmpl $0x0, 0x14be3(%rip)     # 0x24778
jne 0xfc0c
movl 0x14c9b(%rip), %eax     # 0x24838
cmpl %ebx, %eax
je 0xfc0c
movl %ebx, %ecx
xorl $0x3, %ecx
movl %eax, %edx
xorl $0x2, %edx
orl %ecx, %edx
jne 0xfbc1
cvtsi2sdl 0x14c15(%rip), %xmm0 # 0x247cc
movsd %xmm0, 0x14c11(%rip)    # 0x247d0
jmp 0xfc0c
movl %ebx, %ecx
xorl $0x2, %ecx
movl %eax, %edx
xorl $0x3, %edx
orl %ecx, %edx
jne 0xfc14
movsd 0x14bf9(%rip), %xmm0    # 0x247d0
movsd 0xa0b1(%rip), %xmm1     # 0x19c90
ucomisd %xmm0, %xmm1
jb 0xfbef
ucomisd 0xa0ab(%rip), %xmm0     # 0x19c98
jae 0xfc02
pushq $0x2
popq %rdi
movq %r14, %rsi
callq 0xc87d
movsd 0x14bce(%rip), %xmm0    # 0x247d0
cvttsd2si %xmm0, %eax
movl %eax, 0x14bc0(%rip)     # 0x247cc
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpl $-0x1, %eax
je 0xfc33
movq 0x14bf8(%rip), %rsi     # 0x24818
addq $-0x4, %rsi
pushq $0x22
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc7c2
movq 0x14c7e(%rip), %rax     # 0x248b8
testq %rax, %rax
je 0xfc69
cmpl $0x1, 0x14c7e(%rip)     # 0x248c4
jne 0xfc78
movq 0x10(%rax), %rdi
movl 0xc0(%rdi), %eax
leal -0x4(%rax), %ecx
cmpl $-0x4, %ecx
ja 0xfc87
movq 0x14bb7(%rip), %rsi     # 0x24818
addq $-0x4, %rsi
pushq $0x29
jmp 0xfc26
movq 0x14ba8(%rip), %rsi     # 0x24818
addq $-0x4, %rsi
pushq $0x1a
jmp 0xfc26
movq 0x14b99(%rip), %rsi     # 0x24818
addq $-0x4, %rsi
pushq $0x1f
jmp 0xfc26
movl %ebx, %ecx
andl $-0x2, %ecx
cmpl $0x2, %ebx
leaq 0x3e58(%rip), %rdx      # 0x13aee
leaq 0x3e78(%rip), %rsi      # 0x13b15
movq %rsi, %r8
cmoveq %rdx, %r8
cmpl $0x3, %eax
cmoveq %rsi, %rdx
cmpl $0x2, %ecx
cmoveq %r8, %rdx
movl 0x14c08(%rip), %esi     # 0x248c0
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rdx