//
// png_set_option from 0xbcc7b0 to 0xbcc818 (104 bytes)
//
// 1 xrefs:
// > ??> @ 0xa89d8
//
// 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
//
__int64 __fastcall png_set_option(__int64 a1, unsigned int a2, int a3)
{
__int64 result; // x0
int v5; // w4
int v6; // w5
int v7; // w0
result = 1;
if ( a1 && a2 <= 5 && (a2 & 1) == 0 )
{
v5 = 3 << a2;
v6 = 3 << a2;
v7 = *(unsigned __int8 *)(a1 + 1024);
if ( !a3 )
v6 = 2 << a2;
*(_BYTE *)(a1 + 1024) = v6 | v7 & ~(_BYTE)v5;
return (v5 & v7) >> a2;
}
return result;
}