//
// png_get_valid from 0x651368 to 0x65137c (20 bytes)
//
// 1 xrefs:
// > cocos2d::CCImage::_initWithPngData @ 0x5e1b84
//
// 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_valid(int a1, int a2, int a3, int a4)
{
bool v4; // zf
int result; // r0
v4 = a1 == 0;
if ( a1 )
v4 = a2 == 0;
if ( v4 )
{
result = 0;
}
else
{
a4 = *(_DWORD *)(a2 + 8);
result = 1;
}
if ( !v4 )
return a3 & a4;
return result;
}