//
// png_get_pHYs_dpi from 0x861768 to 0x8617ee (134 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:02:43 +0000
//
int __fastcall png_get_pHYs_dpi(int a1, int a2, unsigned int *a3, unsigned int *a4, _DWORD *a5)
{
bool v5; // zf
int result; // r0
int v7; // r1
v5 = a1 == 0;
if ( a1 )
v5 = a2 == 0;
if ( v5 )
return 0;
result = *(_DWORD *)(a2 + 8) & 0x80;
if ( result )
{
result = (int)a3;
if ( a3 )
{
result = 128;
*a3 = *(_DWORD *)(a2 + 192);
}
if ( a4 )
{
result = 128;
*a4 = *(_DWORD *)(a2 + 196);
}
if ( a5 )
{
v7 = *(unsigned __int8 *)(a2 + 200);
*a5 = v7;
if ( v7 != 1 )
return 128;
if ( a3 )
*a3 = (unsigned int)((double)*a3 * 0.0254 + 0.5);
if ( a4 )
{
*a4 = (unsigned int)((double)*a4 * 0.0254 + 0.5);
return 128;
}
else
{
return 128;
}
}
}
return result;
}