//
// inflateBackInit_ from 0x73ac94 to 0x73ad2a (150 bytes)
//
// 0 xrefs:
//
// 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
//
int __fastcall inflateBackInit_(_DWORD *a1, int a2, int a3, unsigned __int8 *a4, int a5)
{
int v5; // r3
bool v6; // zf
bool v7; // zf
int v8; // r4
int (*v9)(); // r3
int v10; // r7
_DWORD *v14; // r0
if ( !a4 )
return -6;
v5 = *a4;
v6 = a5 == 56;
if ( a5 == 56 )
v6 = v5 == 49;
if ( !v6 )
return -6;
v7 = a3 == 0;
if ( a3 )
v7 = a1 == nullptr;
v8 = v7;
if ( v7 || (unsigned int)(a2 - 8) > 7 )
return -2;
v9 = (int (*)())a1[8];
a1[6] = v8;
if ( v9 )
{
v10 = a1[10];
if ( a1[9] )
goto LABEL_15;
}
else
{
v10 = 0;
a1[10] = 0;
a1[8] = sub_74047C;
v9 = sub_74047C;
if ( a1[9] )
goto LABEL_15;
}
a1[9] = sub_740484;
LABEL_15:
v14 = (_DWORD *)((int (__fastcall *)(int, int, int))v9)(v10, 1, 7116);
if ( !v14 )
return -4;
a1[7] = v14;
v14[9] = a2;
v14[13] = a3;
v14[10] = 1 << a2;
v14[12] = 0;
v14[11] = 0;
v14[5] = 0x8000;
return 0;
}