//
// sub_C5B8EC from 0xc5b8ec to 0xc5b974 (136 bytes)
//
// 2 xrefs:
// > TIFFPredictorInit @ 0xc5d2dc
// > TIFFPredictorInit @ 0xc5d2e4
//
// 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 sub_C5B8EC(__int64 a1, int a2, unsigned __int16 **a3)
{
__int64 v4; // x5
int v5; // w1
unsigned __int16 *v6; // x0
int v7; // w4
__int64 v9; // x2
int v10; // w1
__int64 v11; // x8
unsigned __int16 *v12; // x9
unsigned __int16 *v13; // x7
__int64 v14; // [xsp+10h] [xbp+10h]
unsigned __int16 *v15; // [xsp+18h] [xbp+18h]
unsigned __int16 *v16; // [xsp+20h] [xbp+20h]
unsigned __int16 *v17; // [xsp+28h] [xbp+28h]
v4 = *(_QWORD *)(a1 + 848);
if ( a2 == 317 )
{
v5 = *((_DWORD *)a3 + 6);
v6 = *a3;
if ( v5 < -7 )
v6 = (unsigned __int16 *)((char *)a3[1] + v5);
v7 = *v6;
v9 = *(_QWORD *)(a1 + 72);
v10 = *(_DWORD *)(a1 + 16);
*(_DWORD *)v4 = v7;
*(_QWORD *)(a1 + 72) = v9 | 4;
*(_DWORD *)(a1 + 16) = v10 | 8;
return 1;
}
else
{
v11 = (__int64)*a3;
v12 = a3[1];
v13 = a3[3];
v16 = a3[2];
v17 = v13;
v14 = v11;
v15 = v12;
return (*(__int64 (**)(void))(v4 + 96))();
}
}