//
// deflateParams from 0xf35b44 to 0xf35c58 (276 bytes)
//
// 2 xrefs:
// > gzsetparams @ 0xf40f50
// > ??> @ 0x102478
//
// 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:56 +0000
//
__int64 __fastcall deflateParams(__int64 a1, unsigned int a2, unsigned int a3)
{
int v3; // w20
_DWORD *v4; // x19
int v5; // w3
unsigned int v6; // w1
unsigned __int16 *v7; // x0
int v8; // w4
int v9; // w5
int v10; // w3
unsigned int v12; // [xsp+38h] [xbp+38h]
v3 = a2;
if ( !a1 )
return 4294967294LL;
v4 = *(_DWORD **)(a1 + 56);
if ( !v4 )
return 4294967294LL;
if ( a2 == -1 )
{
v3 = 6;
}
else if ( a2 > 9 )
{
return 4294967294LL;
}
if ( a3 > 4 )
return 4294967294LL;
v5 = v4[45];
if ( v4[46] == a3 && *((_QWORD *)&unk_13FD400 + 2 * v3 + 1) == *((_QWORD *)&unk_13FD400 + 2 * v5 + 1) )
{
v6 = 0;
}
else
{
v6 = 0;
if ( *(_QWORD *)(a1 + 16) )
{
v12 = a3;
v6 = deflate(a1, 5u);
a3 = v12;
if ( v6 == -5 )
{
v5 = v4[45];
if ( !v4[10] )
v6 = 0;
}
else
{
v5 = v4[45];
}
}
}
if ( v3 != v5 )
{
v7 = (unsigned __int16 *)((char *)&unk_13FD400 + 16 * v3);
v4[45] = v3;
v8 = *v7;
v9 = v7[1];
v10 = v7[2];
LODWORD(v7) = v7[3];
v4[44] = v9;
v4[47] = v8;
v4[48] = v10;
v4[43] = (_DWORD)v7;
}
v4[46] = a3;
return v6;
}