//
// png_get_tRNS from 0x651f4c to 0x651fa6 (90 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_get_tRNS(int a1, int a2, _DWORD *a3, _DWORD *a4, _DWORD *a5)
{
bool v5; // zf
int result; // r0
v5 = a1 == 0;
if ( a1 )
v5 = a2 == 0;
if ( v5 )
return 0;
result = *(_DWORD *)(a2 + 8) & 0x10;
if ( result )
{
if ( *(_BYTE *)(a2 + 25) == 3 )
{
result = (int)a3;
if ( a3 )
{
result = 16;
*a3 = *(_DWORD *)(a2 + 156);
}
if ( a5 )
*a5 = a2 + 160;
}
else
{
result = (int)a5;
if ( a5 )
{
result = 16;
*a5 = a2 + 160;
}
if ( a3 )
*a3 = 0;
}
if ( a4 )
{
result = 16;
*a4 = *(unsigned __int16 *)(a2 + 22);
}
}
return result;
}