//
// gzclose_r from 0xf3fd90 to 0xf3fe44 (180 bytes)
//
// 2 xrefs:
// > gzclose @ 0xf3e718
// > ??> @ 0xc1930
//
// 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:13:06 +0000
//
__int64 __fastcall gzclose_r(__int64 a1)
{
unsigned int v2; // w20
int v3; // w21
if ( !a1 || *(_DWORD *)(a1 + 24) != 7247 )
return 4294967294LL;
if ( *(_DWORD *)(a1 + 40) )
{
inflateEnd((_QWORD *)(a1 + 120));
free(*(void **)(a1 + 56));
free(*(void **)(a1 + 48));
}
if ( *(_DWORD *)(a1 + 108) == -5 )
v2 = -5;
else
v2 = 0;
sub_F3EF50(a1, 0, nullptr);
free(*(void **)(a1 + 32));
v3 = close(*(_DWORD *)(a1 + 28));
free((void *)a1);
if ( v3 )
return 0xFFFFFFFFLL;
else
return v2;
}