// File: /workspace/github_c_makefile_star2_O3/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 0x14ff7(%rip), %r14     # 0x25818
movslq (%r14), %rax
leaq 0x4(%r14), %rcx
movq %rcx, 0x14fe9(%rip)     # 0x25818
leaq 0x13d2a(%rip), %rcx     # 0x24560
callq *(%rcx,%rax,8)
cmpl $0x0, 0x14f38(%rip)     # 0x25778
jne 0x108b9
movl 0x14ff0(%rip), %eax     # 0x25838
cmpl %ebx, %eax
je 0x108b9
movl %ebx, %ecx
xorl $0x3, %ecx
movl %eax, %edx
xorl $0x2, %edx
orl %ecx, %edx
jne 0x1086c
cvtsi2sdl 0x14f6a(%rip), %xmm0 # 0x257cc
movsd %xmm0, 0x14f66(%rip)    # 0x257d0
jmp 0x108b9
movl %ebx, %ecx
xorl $0x2, %ecx
movl %eax, %edx
xorl $0x3, %edx
orl %ecx, %edx
jne 0x108c1
movsd 0x14f4e(%rip), %xmm0    # 0x257d0
movsd 0xb446(%rip), %xmm1     # 0x1bcd0
ucomisd %xmm0, %xmm1
jb 0x1089a
ucomisd 0xb440(%rip), %xmm0     # 0x1bcd8
jae 0x108af
movl $0x2, %edi
movq %r14, %rsi
callq 0xd06f
movsd 0x14f21(%rip), %xmm0    # 0x257d0
cvttsd2si %xmm0, %eax
movl %eax, 0x14f13(%rip)     # 0x257cc
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpl $-0x1, %eax
je 0x108e2
movq 0x14f4b(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl $0x22, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xcfa3
movq 0x14fcf(%rip), %rax     # 0x258b8
testq %rax, %rax
je 0x1091b
cmpl $0x1, 0x14fcf(%rip)     # 0x258c4
jne 0x1092d
movq 0x10(%rax), %rdi
movl 0xc0(%rdi), %eax
leal -0x4(%rax), %ecx
cmpl $-0x4, %ecx
ja 0x1093f
movq 0x14f08(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl $0x29, %edi
jmp 0x108d6
movq 0x14ef6(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl $0x1a, %edi
jmp 0x108d6
movq 0x14ee4(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl $0x1f, %edi
jmp 0x108d6
movl %ebx, %ecx
andl $-0x2, %ecx
cmpl $0x2, %ebx
leaq 0x4e81(%rip), %rdx      # 0x157cf
leaq 0x4ea1(%rip), %rsi      # 0x157f6
movq %rsi, %r8
cmoveq %rdx, %r8
cmpl $0x3, %eax
cmoveq %rsi, %rdx
cmpl $0x2, %ecx
cmoveq %r8, %rdx
movl 0x14f50(%rip), %esi     # 0x258c0
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rdx