//
// sub_1009796C0 from 0x1009796c0 to 0x10097976f (175 bytes)
//
// 0 xrefs:
//
// 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:38:56 +0000
//
__int64 __fastcall sub_1009796C0(_QWORD *a1)
{
__int64 result; // rax
unsigned __int64 v2; // r14
__int64 v3; // rcx
unsigned __int64 v4; // r14
result = a1[153];
if ( a1[154] != result )
{
v2 = 0;
do
{
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(result + 8 * v2) + 520LL))(*(_QWORD *)(result + 8 * v2));
++v2;
result = a1[153];
}
while ( v2 < (a1[154] - result) >> 3 );
}
v3 = a1[157];
if ( a1[158] != v3 )
{
v4 = 0;
do
{
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(v3 + 8 * v4) + 520LL))(*(_QWORD *)(v3 + 8 * v4));
++v4;
v3 = a1[157];
}
while ( v4 < (a1[158] - v3) >> 3 );
result = a1[153];
}
a1[154] = result;
a1[158] = v3;
a1[156] = 0;
return result;
}