//
// inflateInit2_ from 0x94bf9c to 0x94c01e (130 bytes)
//
// 10 xrefs:
// > cocos2d::ZipUtils::ccInflateMemoryWithHint @ 0x7fa8c4
// > cocos2d::unzOpenCurrentFile3 @ 0x7fd8e4
// > sub_841790 @ 0x8417f0
// > sub_8419F8 @ 0x841ab0
// > sub_8419F8 @ 0x841adc
// > lws_extension_callback_pm_deflate @ 0x85cd86
// > sub_86C25C @ 0x86c2b4
// > sub_86C418 @ 0x86c4d8
// > inflateInit_ @ 0x94c02e
// > sub_9507B8 @ 0x95083c
//
// 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:17 +0000
//
int __fastcall inflateInit2_(_DWORD *a1, int a2, __int64 a3)
{
bool v3; // zf
int v6; // r0
int v7; // r6
int result; // r0
int v9; // r5
if ( !(_DWORD)a3 )
return -6;
LODWORD(a3) = *(unsigned __int8 *)a3;
v3 = a3 == 0x3800000031LL;
LODWORD(a3) = a3 != 0x3800000031LL;
if ( !v3 )
return -6;
if ( !a1 )
return -2;
HIDWORD(a3) = a1[8];
a1[6] = a3;
if ( HIDWORD(a3) )
{
LODWORD(a3) = a1[10];
}
else
{
LODWORD(a3) = 0;
a1[10] = 0;
a1[8] = sub_95003C;
HIDWORD(a3) = sub_95003C;
}
if ( !a1[9] )
a1[9] = sub_950044;
v6 = ((int (__fastcall *)(_DWORD, int, int))HIDWORD(a3))(a3, 1, 7116);
v7 = v6;
if ( !v6 )
return -4;
a1[7] = v6;
*(_DWORD *)(v6 + 52) = 0;
result = inflateReset2((int)a1, a2);
v9 = result;
if ( result )
{
((void (__fastcall *)(_DWORD, int))a1[9])(a1[10], v7);
a1[7] = 0;
return v9;
}
return result;
}