//
// inflatePrime from 0x73c474 to 0x73c4ba (70 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 inflatePrime(int a1, int a2, int a3)
{
int v3; // r3
int v4; // r5
int v5; // r4
int result; // r0
if ( !a1 )
return -2;
v3 = *(_DWORD *)(a1 + 28);
if ( !v3 )
return -2;
if ( a2 < 0 )
{
*(_DWORD *)(v3 + 56) = 0;
*(_DWORD *)(v3 + 60) = 0;
return 0;
}
if ( a2 > 16 )
return -2;
v4 = *(_DWORD *)(v3 + 60);
if ( (unsigned int)(a2 + v4) > 0x20 )
return -2;
v5 = *(_DWORD *)(v3 + 56);
result = 0;
*(_DWORD *)(v3 + 60) = a2 + v4;
*(_DWORD *)(v3 + 56) = ((a3 & ((1 << a2) - 1)) << v4) + v5;
return result;
}