//
// gzclearerr from 0xcc8d04 to 0xcc8d90 (140 bytes)
//
// 1 xrefs:
// > ??> @ 0x6e160
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall gzclearerr(__int64 a1)
{
int v1; // w1
__int64 v2; // x19
void *v3; // x0
if ( a1 )
{
v1 = *(_DWORD *)(a1 + 24);
if ( v1 == 31153 || v1 == 7247 )
{
if ( v1 == 7247 )
{
*(_DWORD *)(a1 + 80) = 0;
v2 = a1;
*(_DWORD *)(a1 + 84) = 0;
v3 = *(void **)(a1 + 112);
if ( v3 )
goto LABEL_7;
}
else
{
v2 = a1;
v3 = *(void **)(a1 + 112);
if ( v3 )
{
LABEL_7:
if ( *(_DWORD *)(v2 + 108) != -4 )
free(v3);
*(_QWORD *)(v2 + 112) = 0;
}
}
*(_DWORD *)(v2 + 108) = 0;
}
}
}