//
// png_set_compression_window_bits from 0xbe8d0c to 0xbe8d68 (92 bytes)
//
// 1 xrefs:
// > ??> @ 0xb0a90
//
// 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_compression_window_bits(__int64 result, int a2)
{
__int64 v2; // x19
v2 = result;
if ( result )
{
if ( a2 > 15 )
{
result = png_warning(result, "Only compression windows <= 32k supported by PNG");
a2 = 15;
}
else if ( a2 <= 7 )
{
result = png_warning(result, "Only compression windows >= 256 supported by PNG");
a2 = 8;
}
*(_DWORD *)(v2 + 508) = a2;
}
return result;
}