//
// png_set_sBIT from 0x660004 to 0x660032 (46 bytes)
//
// 1 xrefs:
// > png_handle_sBIT @ 0x65cd34
//
// 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 __fastcall png_set_sBIT(int a1, int a2, int a3)
{
bool v3; // zf
int v4; // r3
int result; // r0
int v6; // r3
char v7; // r2
v3 = a3 == 0;
if ( a3 )
v3 = a2 == 0;
v4 = v3;
if ( a1 )
result = v4;
else
result = v4 | 1;
if ( !result )
{
result = *(_DWORD *)a3;
v6 = *(_DWORD *)(a2 + 8);
*(_DWORD *)(a2 + 148) = *(_DWORD *)a3;
v7 = *(_BYTE *)(a3 + 4);
*(_DWORD *)(a2 + 8) = v6 | 2;
*(_BYTE *)(a2 + 152) = v7;
}
return result;
}