//
// png_write_gAMA_fixed from 0x664924 to 0x664994 (112 bytes)
//
// 1 xrefs:
// > png_write_info_before_PLTE @ 0x661960
//
// 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
//
_BYTE *__fastcall png_write_gAMA_fixed(_DWORD *a1, int a2)
{
_BYTE *result; // r0
_BYTE v4[4]; // [sp+4h] [bp-Ch] BYREF
_BYTE v5[4]; // [sp+8h] [bp-8h] BYREF
_BYTE v6[4]; // [sp+Ch] [bp-4h] BYREF
result = png_save_uint_32(v4, a2);
if ( a1 )
{
a1[225] = 34;
png_save_uint_32(v5, 4);
png_save_uint_32(v6, 1732332865);
png_write_data((int)a1);
a1[119] = 1732332865;
png_reset_crc((int)a1);
png_calculate_crc(a1, (int)v6, 4);
a1[225] = 66;
png_write_chunk_data(a1, (int)v4, 4);
return (_BYTE *)png_write_chunk_end((int)a1);
}
return result;
}