//
// png_set_sBIT from 0x870084 to 0x8700b2 (46 bytes)
//
// 1 xrefs:
// > png_handle_sBIT @ 0x86cdb4
//
// 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:02:57 +0000
//
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;
}