//
// gzgetc from 0x950ce8 to 0x950d3e (86 bytes)
//
// 1 xrefs:
// > gzgetc_ @ 0x950d40
//
// 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 gzgetc(size_t *a1)
{
size_t v2; // r2
bool v3; // zf
size_t v4; // r2
unsigned __int8 *v5; // r0
size_t v6; // r1
unsigned __int8 v8; // [sp+4h] [bp-Ch] BYREF
if ( !a1 || a1[3] != 7247 )
return -1;
v2 = a1[19];
v3 = v2 == 0;
if ( v2 )
v3 = v2 == -5;
if ( !v3 )
return -1;
v4 = *a1;
if ( *a1 )
{
v5 = (unsigned __int8 *)a1[1];
v6 = a1[2];
*a1 = v4 - 1;
a1[1] = (size_t)(v5 + 1);
a1[2] = v6 + 1;
return *v5;
}
else if ( gzread(a1, (char *)&v8, 1) <= 0 )
{
return -1;
}
else
{
return v8;
}
}