//
// png_get_pCAL from 0xe442ec to 0xe4437c (144 bytes)
//
// 1 xrefs:
// > ??> @ 0x7ea60
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:10:04 +0000
//
__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;
}