//
// png_set_option from 0x650a6c to 0x650aae (66 bytes)
//
// 0 xrefs:
//
// 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_option(int a1, unsigned int a2, int a3)
{
int v3; // r3
int v4; // r4
int v5; // r5
int v6; // r2
v3 = a1;
if ( a1 )
v3 = 1;
if ( a2 > 5 )
v3 = 0;
if ( !v3 || (a2 & 1) != 0 )
return 1;
v4 = 3 << a2;
v5 = 3 << a2;
if ( !a3 )
v5 = 2 << a2;
v6 = *(unsigned __int8 *)(a1 + 744);
*(_BYTE *)(a1 + 744) = v6 & ~(_BYTE)v4 | v5;
return (v4 & v6) >> a2;
}