//
// cocos2d::CCDirector::convertToUI from 0xd49404 to 0xd4952c (296 bytes)
//
// 2 xrefs:
// > cocos2d::CCNode::convertToWindowSpace @ 0xd3f644
// > ??> @ 0xec8a8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:07:36 +0000
//
float *__usercall cocos2d::CCDirector::convertToUI@(
cocos2d::CCDirector *this@,
const cocos2d::CCPoint *a2@,
float *a3@)
{
int v6; // w3
const cocos2d::CCSize *v7; // x0
float v8; // s0
float v9; // s1
float v11[2]; // [xsp+60h] [xbp+60h] BYREF
float v12[4]; // [xsp+68h] [xbp+68h] BYREF
_DWORD v13[4]; // [xsp+78h] [xbp+78h] BYREF
_BYTE v14[64]; // [xsp+88h] [xbp+88h] BYREF
_BYTE v15[64]; // [xsp+C8h] [xbp+C8h] BYREF
_BYTE v16[64]; // [xsp+108h] [xbp+108h] BYREF
kmGLGetMatrix(5889, v15);
kmGLGetMatrix(5888, v16);
kmMat4Multiply(v14, v15, v16);
v13[2] = 0;
v6 = *((_DWORD *)a2 + 1);
v13[0] = *(_DWORD *)a2;
v13[1] = v6;
kmVec3TransformCoord(v12, v13, v14);
v7 = (const cocos2d::CCSize *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 24) + 88LL))(*((_QWORD *)this + 24));
cocos2d::CCSize::CCSize(v11, v7);
v8 = v11[0] * (v12[0] * 0.5 + 0.5);
v9 = v11[1] * ((float)-v12[1] * 0.5 + 0.5);
cocos2d::CCPoint::CCPoint(a3, v8, v9);
return a3;
}