//
// sub_10056AC20 from 0x10056ac20 to 0x10056ad2a (266 bytes)
//
// 2 xrefs:
// > sub_10056AD30 @ 0x10056ad3c
// > ??> @ 0x100963e90
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_10056AC20(float *a1)
{
cocos2d::CCDirector *v1; // rax
cocos2d::CCDirector *v2; // rax
double *v3; // rax
float v4; // xmm0_4
double v6; // [rsp+8h] [rbp-48h] BYREF
__int64 v7; // [rsp+10h] [rbp-40h] BYREF
__int64 v8; // [rsp+18h] [rbp-38h] BYREF
double v9; // [rsp+20h] [rbp-30h] BYREF
_QWORD v10[5]; // [rsp+28h] [rbp-28h] BYREF
cocos2d::CCTouch::getLocationInView((cocos2d::CCTouch *)&v7);
cocos2d::CCTouch::getPreviousLocationInView((cocos2d::CCTouch *)&v8);
v1 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::convertToGL((cocos2d::CCDirector *)&v9, (const cocos2d::CCPoint *)v1);
sub_10028CC90(&v7, &v9);
v2 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::convertToGL((cocos2d::CCDirector *)&v9, (const cocos2d::CCPoint *)v2);
sub_10028CC90(&v8, &v9);
sub_10028CBE0((float *)&v9, *(float *)&v7 - *(float *)&v8, *((float *)&v7 + 1) - *((float *)&v8 + 1));
v3 = (double *)(*(__int64 (__fastcall **)(float *))(*(_QWORD *)a1 + 192LL))(a1);
sub_10028CC60(v10, v3);
sub_10028CBE0((float *)&v6, *(float *)v10, *((float *)v10 + 1) + *((float *)&v9 + 1));
sub_10028CC90(v10, &v6);
v4 = a1[108];
if ( *((float *)v10 + 1) > v4 || (v4 = 0.0, *((float *)v10 + 1) < 0.0) )
*((float *)v10 + 1) = v4;
return (*(__int64 (__fastcall **)(float *, _QWORD *))(*(_QWORD *)a1 + 184LL))(a1, v10);
}