//
// deflatePrime from 0xf34198 to 0xf3424c (180 bytes)
//
// 1 xrefs:
// > ??> @ 0xcc490
//
// This function is hookable on this platform (idp: arm, 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 13:12:55 +0000
//
__int64 __fastcall deflatePrime(__int64 a1, int a2, int a3)
{
__int64 v5; // x20
int v6; // w3
__int16 v7; // w1
int v8; // w19
int v9; // w4
if ( !a1 )
return 4294967294LL;
v5 = *(_QWORD *)(a1 + 56);
if ( !v5 )
return 4294967294LL;
if ( *(_QWORD *)(v5 + 5888) < (unsigned __int64)(*(_QWORD *)(v5 + 32) + 2LL) )
return 4294967291LL;
do
{
v6 = *(_DWORD *)(v5 + 5924);
v7 = *(_WORD *)(v5 + 5920);
v8 = 16 - v6;
if ( a2 <= 16 - v6 )
v8 = a2;
*(_DWORD *)(v5 + 5924) = v6 + v8;
v9 = ((1 << v8) - 1) & a3;
a3 >>= v8;
*(_WORD *)(v5 + 5920) = ((_WORD)v9 << v6) | v7;
sub_F3D85C(v5);
a2 -= v8;
}
while ( a2 );
return 0;
}