//
// png_get_pHYs_dpi from 0xbcda40 to 0xbcdae0 (160 bytes)
//
// 1 xrefs:
// > ??> @ 0x55770
//
// 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
//
double __fastcall png_get_pHYs_dpi(__int64 a1, __int64 a2, unsigned int *a3, unsigned int *a4, _DWORD *a5)
{
int v5; // w0
double result; // d0
if ( a1 && a2 && (*(_DWORD *)(a2 + 8) & 0x80) != 0 )
{
if ( a3 )
*a3 = *(_DWORD *)(a2 + 224);
if ( a4 )
*a4 = *(_DWORD *)(a2 + 228);
if ( a5 )
{
v5 = *(unsigned __int8 *)(a2 + 232);
*a5 = v5;
if ( v5 == 1 )
{
if ( a3 )
{
result = (double)*a3 * 0.0254 + 0.5;
*a3 = (unsigned int)result;
}
if ( a4 )
{
result = (double)*a4 * 0.0254 + 0.5;
*a4 = (unsigned int)result;
}
}
}
}
return result;
}