//
// sub_7816FC from 0x7816fc to 0x78174a (78 bytes)
//
// 2 xrefs:
// > sub_78145C @ 0x7816fa
// > sub_782EFC @ 0x782f04
//
// 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
//
int sub_7816FC()
{
int v0; // r4
int v1; // r6
int v2; // r7
_DWORD *v3; // r11
int v4; // r0
int v5; // r2
*(_DWORD *)(v0 + 284) = 0;
v4 = sub_78145C(v0, v1, v3);
if ( v2 - 1 <= 0 )
JUMPOUT(0x781756);
v5 = *(_DWORD *)(v0 + 256);
if ( v5 == 255 )
sub_782A82(v4);
*(_DWORD *)(v0 + 256) = v5 + 1;
*(_BYTE *)(v0 + v5) = 44;
*(_BYTE *)(v0 + 260) = 44;
if ( v5 == 254 )
sub_782998(v4);
return sub_78174A(v4);
}