//
// sub_180078BA0 from 0x180078ba0 to 0x180078c6f (207 bytes)
//
// 7 xrefs:
// > sub_1800784E0 @ 0x1800784e9
// > cocos2d::CCEGLView::~CCEGLView @ 0x180078667
// > cocos2d::CCEGLView::pumpRawInput @ 0x18007b44b
// > sub_1800E9190 @ 0x1800e91f2
// > ??> @ 0x180144b6c
// > ??> @ 0x180144b7c
// > ??> @ 0x1801beae8
//
// 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 11:21:59 +0000
//
void __fastcall sub_180078BA0(_QWORD *a1)
{
__int64 v2; // rcx
__int64 v3; // rbx
void *v4; // rcx
_QWORD *v5; // rcx
v2 = a1[4];
if ( v2 )
{
do
a1[4] = --v2;
while ( v2 );
a1[3] = 0;
}
if ( a1[1] )
{
v3 = a1[2];
while ( v3 > 0 )
{
--v3;
v4 = *(void **)(a1[1] + 8 * v3);
if ( v4 )
j_j_free_0(v4);
}
v5 = (_QWORD *)a1[1];
if ( (unsigned __int64)(8LL * a1[2]) >= 0x1000 )
{
if ( (unsigned __int64)v5 - *(v5 - 1) - 8 > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
v5 = (_QWORD *)*(v5 - 1);
}
j_j_free_0(v5);
a1[1] = 0;
a1[2] = 0;
}
}