//
// compress2 from 0xcc836c to 0xcc8440 (212 bytes)
//
// 2 xrefs:
// > compress @ 0xcc8444
// > ??> @ 0x516f0
//
// 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
//
__int64 __fastcall compress2(__int64 a1, __int64 *a2, __int64 a3, int a4, unsigned int a5)
{
__int64 v5; // x19
bool v6; // zf
unsigned int v8; // w19
__int64 result; // x0
__int64 v10; // [xsp+30h] [xbp+30h] BYREF
int v11; // [xsp+38h] [xbp+38h]
__int64 v12; // [xsp+48h] [xbp+48h]
int v13; // [xsp+50h] [xbp+50h]
__int64 v14; // [xsp+58h] [xbp+58h]
__int64 v15; // [xsp+70h] [xbp+70h]
__int64 v16; // [xsp+78h] [xbp+78h]
__int64 v17; // [xsp+80h] [xbp+80h]
v5 = *a2;
v6 = *a2 == (unsigned int)*a2;
v10 = a3;
v11 = a4;
v12 = a1;
v13 = v5;
if ( !v6 )
return 4294967291LL;
v15 = 0;
v16 = 0;
v17 = 0;
result = deflateInit_(&v10, a5, "1.2.8", 112);
if ( !(_DWORD)result )
{
v8 = deflate((__int64)&v10, 4u);
if ( v8 == 1 )
{
*a2 = v14;
return deflateEnd((__int64)&v10);
}
else
{
deflateEnd((__int64)&v10);
if ( v8 )
return v8;
else
return 4294967291LL;
}
}
return result;
}