// File: /workspace/github_c_makefile_star2_O1/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 0x14d94(%rip), %r14     # 0x25818
movslq (%r14), %rax
leaq 0x4(%r14), %rcx
movq %rcx, 0x14d86(%rip)     # 0x25818
leaq 0x13ac7(%rip), %rcx     # 0x24560
callq *(%rcx,%rax,8)
cmpl $0x0, 0x14cd5(%rip)     # 0x25778
jne 0x10b18
movl 0x14d8d(%rip), %eax     # 0x25838
cmpl %ebx, %eax
je 0x10b18
movl %ebx, %ecx
xorl $0x3, %ecx
movl %eax, %edx
xorl $0x2, %edx
orl %ecx, %edx
jne 0x10acf
cvtsi2sdl 0x14d07(%rip), %xmm0 # 0x257cc
movsd %xmm0, 0x14d03(%rip)    # 0x257d0
jmp 0x10b18
movl %ebx, %ecx
xorl $0x2, %ecx
movl %eax, %edx
xorl $0x3, %edx
orl %ecx, %edx
jne 0x10b20
movsd 0x14ceb(%rip), %xmm0    # 0x257d0
movsd 0xb20b(%rip), %xmm1     # 0x1bcf8
ucomisd %xmm0, %xmm1
jb 0x10afd
ucomisd 0xb205(%rip), %xmm0     # 0x1bd00
jae 0x10b0a
movl $0x2, %edi
movq %r14, %rsi
callq 0xd275
cvttsd2si 0x14cbe(%rip), %eax # 0x257d0
movl %eax, 0x14cb4(%rip)     # 0x257cc
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpl $-0x1, %eax
je 0x10b41
movq 0x14cec(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl $0x22, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xd1a9
movq 0x14d70(%rip), %rax     # 0x258b8
testq %rax, %rax
je 0x10b7a
cmpl $0x1, 0x14d70(%rip)     # 0x258c4
jne 0x10b8c
movq 0x10(%rax), %rdi
movl 0xc0(%rdi), %eax
leal -0x4(%rax), %ecx
cmpl $-0x4, %ecx
ja 0x10b9e
movq 0x14ca9(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl $0x29, %edi
jmp 0x10b35
movq 0x14c97(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl $0x1a, %edi
jmp 0x10b35
movq 0x14c85(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl $0x1f, %edi
jmp 0x10b35
movl %ebx, %ecx
andl $-0x2, %ecx
cmpl $0x2, %ebx
leaq 0x4c4e(%rip), %rdx      # 0x157fb
leaq 0x4c6e(%rip), %rsi      # 0x15822
movq %rsi, %r8
cmoveq %rdx, %r8
cmpl $0x3, %eax
cmoveq %rsi, %rdx
cmpl $0x2, %ecx
cmoveq %r8, %rdx
movl 0x14cf1(%rip), %esi     # 0x258c0
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rdx