//
// sub_D1078 from 0xd1078 to 0xd10c2 (74 bytes)
//
// 1 xrefs:
// > sub_72710 @ 0x727c2
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:41:59 +0000
//
int __fastcall sub_D1078(int a1, _DWORD *a2)
{
int v2; // r5
int v4; // r6
int v6; // r1
int v7; // r0
v2 = *(_DWORD *)(a1 + 28);
v4 = *(_DWORD *)(v2 + 8);
if ( sub_CFB1E(a2, 1) )
return -135;
v6 = 0;
while ( v4 >= 2 )
{
v4 = (unsigned int)v4 >> 1;
++v6;
}
v7 = sub_CFB1E(a2, v6);
if ( v7 == -1 )
return -136;
else
return *(_DWORD *)(v2 + 4 * *(unsigned __int8 *)(*(_DWORD *)(v2 + 28) + 2 * v7));
}