//
// gzclose_r from 0x950fac to 0x951010 (100 bytes)
//
// 1 xrefs:
// > gzclose @ 0x950158
//
// 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:24 +0000
//
int __fastcall gzclose_r(int a1)
{
int v2; // r5
int v3; // r6
if ( !a1 || *(_DWORD *)(a1 + 12) != 7247 )
return -2;
if ( *(_DWORD *)(a1 + 24) )
{
inflateEnd((_DWORD *)(a1 + 84));
free(*(void **)(a1 + 36));
free(*(void **)(a1 + 32));
}
if ( *(_DWORD *)(a1 + 76) == -5 )
v2 = -5;
else
v2 = 0;
sub_950728((_DWORD *)a1, 0, nullptr);
free(*(void **)(a1 + 20));
v3 = close(*(_DWORD *)(a1 + 16));
free((void *)a1);
if ( v3 )
return -1;
else
return v2;
}