//
// cocos2d::ZipUtils::ccInflateGZipFile from 0xd9a23c to 0xd9a318 (220 bytes)
//
// 2 xrefs:
// > cocos2d::CCTexturePVR::initWithContentsOfFile @ 0xdaa51c
// > ??> @ 0xaaed8
//
// 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:08:23 +0000
//
__int64 __fastcall cocos2d::ZipUtils::ccInflateGZipFile(cocos2d::ZipUtils *this, char *a2, unsigned __int8 **a3)
{
__int64 v4; // x23
unsigned int v5; // w21
unsigned int v6; // w19
unsigned int v7; // w20
char *v8; // x0
char *v9; // x1
bool v10; // cc
int v11; // w0
v4 = gzopen(this, "rb", a3);
if ( !v4 )
return 0xFFFFFFFFLL;
v5 = 0x80000;
v6 = 0x80000;
v7 = 0;
v8 = (char *)malloc(0x80000u);
v9 = v8;
while ( 1 )
{
*(_QWORD *)a2 = v8;
v11 = gzread(v4, &v9[v7]);
if ( v11 < 0 )
{
LABEL_7:
free(*(void **)a2);
*(_QWORD *)a2 = 0;
return 0xFFFFFFFFLL;
}
if ( !v11 )
break;
v10 = v6 > v11;
v6 *= 2;
v5 += v6;
v7 += v11;
if ( v10 )
break;
v8 = (char *)realloc(*(void **)a2, v5);
v9 = v8;
if ( !v8 )
goto LABEL_7;
}
gzclose(v4);
return v7;
}