//
// sub_100597CE0 from 0x100597ce0 to 0x100597dea (266 bytes)
//
// 2 xrefs:
// > sub_100597DF0 @ 0x100597dfc
// > ??> @ 0x100b713b0
//
// This function is hookable on this platform (idp: pc, 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 12:32:29 +0000
//
__int64 __fastcall sub_100597CE0(float *a1, __int64 a2)
{
__int64 v2; // rax
__int64 v3; // rax
_QWORD *v4; // rax
float v5; // xmm0_4
__int64 v7; // [rsp+8h] [rbp-48h] BYREF
unsigned __int64 v8; // [rsp+10h] [rbp-40h] BYREF
unsigned __int64 v9; // [rsp+18h] [rbp-38h] BYREF
__int64 v10; // [rsp+20h] [rbp-30h] BYREF
_QWORD v11[5]; // [rsp+28h] [rbp-28h] BYREF
cocos2d::CCTouch::getLocationInView((__int64)&v8, a2);
cocos2d::CCTouch::getPreviousLocationInView((__int64)&v9, a2);
v2 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::convertToGL((float *)&v10, v2, &v8);
sub_100278300(&v8, &v10);
v3 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::convertToGL((float *)&v10, v3, &v9);
sub_100278300(&v9, &v10);
sub_100278250((float *)&v10, *(float *)&v8 - *(float *)&v9, *((float *)&v8 + 1) - *((float *)&v9 + 1));
v4 = (_QWORD *)(*(__int64 (__fastcall **)(float *))(*(_QWORD *)a1 + 192LL))(a1);
sub_1002782D0(v11, v4);
sub_100278250((float *)&v7, *(float *)v11, *((float *)v11 + 1) + *((float *)&v10 + 1));
sub_100278300(v11, &v7);
v5 = a1[108];
if ( *((float *)v11 + 1) > v5 || (v5 = 0.0, *((float *)v11 + 1) < 0.0) )
*((float *)v11 + 1) = v5;
return (*(__int64 (__fastcall **)(float *, _QWORD *))(*(_QWORD *)a1 + 184LL))(a1, v11);
}