//
// deflateParams from 0x94a37c to 0x94a430 (180 bytes)
//
// 2 xrefs:
// > gzsetparams @ 0x951a36
// > j_deflateParams @ 0xaf806c
//
// 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 12:05:15 +0000
//
int __fastcall deflateParams(int a1, unsigned int a2, unsigned int a3)
{
_DWORD *v3; // r4
int v5; // r5
int v6; // r3
int v7; // lr
int result; // r0
unsigned __int16 *v9; // r5
int v10; // r3
int v11; // r1
int v12; // r2
if ( !a1 )
return -2;
v3 = *(_DWORD **)(a1 + 28);
if ( !v3 )
return -2;
v5 = a2;
if ( a2 == -1 )
{
v6 = 0;
v5 = 6;
}
else
{
v6 = a2 > 9;
}
if ( a3 > 4 )
v6 |= 1u;
if ( v6 )
return -2;
v7 = v3[33];
if ( v3[34] == a3 && *((_DWORD *)&unk_C76030 + 3 * v5 + 2) == *((_DWORD *)&unk_C76030 + 3 * v7 + 2)
|| (v6 = *(_DWORD *)(a1 + 8)) == 0 )
{
result = v6;
}
else
{
result = deflate(a1, 5u);
if ( result == -5 && !v3[5] )
result = 0;
v7 = v3[33];
}
if ( v5 != v7 )
{
v3[33] = v5;
v9 = (unsigned __int16 *)((char *)&unk_C76030 + 12 * v5);
v10 = v9[3];
v11 = v9[1];
v12 = v9[2];
v3[35] = *v9;
v3[32] = v11;
v3[36] = v12;
v3[31] = v10;
}
v3[34] = a3;
return result;
}