//
// png_get_pCAL from 0xbce12c to 0xbce1bc (144 bytes)
//
// 1 xrefs:
// > ??> @ 0x5c718
//
// 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
//
__int64 __fastcall png_get_pCAL(
__int64 a1,
__int64 a2,
_QWORD *a3,
_DWORD *a4,
_DWORD *a5,
_DWORD *a6,
_DWORD *a7,
_QWORD *a8,
_QWORD *a9)
{
int v9; // w8
__int64 result; // x0
__int64 v11; // x2
if ( !a1 || !a2 )
return 0;
v9 = *(_DWORD *)(a2 + 8);
result = v9 & 0x400;
if ( (v9 & 0x400) == 0 )
return result;
if ( !a3 || !a4 || !a5 || !a6 || a7 == nullptr || a8 == nullptr || !a9 )
return 0;
result = 1024;
*a3 = *(_QWORD *)(a2 + 248);
*a4 = *(_DWORD *)(a2 + 256);
v11 = *(_QWORD *)(a2 + 264);
*a5 = *(_DWORD *)(a2 + 260);
*a6 = *(unsigned __int8 *)(a2 + 280);
*a7 = *(unsigned __int8 *)(a2 + 281);
*a8 = v11;
*a9 = *(_QWORD *)(a2 + 272);
return result;
}