//
// cocos2d::ZipUtils::ccInflateGZipFile from 0x7faa74 to 0x7faaf0 (124 bytes)
//
// 1 xrefs:
// > cocos2d::CCTexturePVR::initWithContentsOfFile @ 0x803580
//
// 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:01:14 +0000
//
int __fastcall cocos2d::ZipUtils::ccInflateGZipFile(cocos2d::ZipUtils *this, char *a2, unsigned __int8 **a3)
{
int v4; // r8
size_t v5; // r7
size_t v6; // r6
int v7; // r4
int v8; // r0
void *v9; // r0
v4 = gzopen(this, "rb", a3);
if ( !v4 )
return -1;
v5 = 0x80000;
v6 = 0x80000;
v7 = 0;
for ( *(_DWORD *)a2 = malloc(0x80000u); ; *(_DWORD *)a2 = v9 )
{
v8 = gzread(v4, (void *)(*(_DWORD *)a2 + v7), v6);
if ( v8 < 0 )
{
LABEL_4:
free(*(void **)a2);
*(_DWORD *)a2 = 0;
return -1;
}
if ( !v8 )
break;
v7 += v8;
if ( v8 < v6 )
break;
v6 *= 2;
v5 += v6;
v9 = realloc(*(void **)a2, v5);
if ( !v9 )
goto LABEL_4;
}
gzclose(v4);
return v7;
}