//
// TIFFInitSGILog from 0x8ec258 to 0x8ec4a4 (588 bytes)
//
// 3 xrefs:
// > ??> @ 0x6ac5c
// > ??> @ 0xd205c0
// > ??> @ 0xd205cc
//
// 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:04:12 +0000
//
int __fastcall TIFFInitSGILog(const char **a1, int a2)
{
char *v6; // [sp+Ch] [bp-8h]
if ( a2 != 34677 && a2 != 34676 )
_assert2();
if ( TIFFMergeFields(a1, (int)&unk_C75F34, 2u) )
{
a1[144] = (const char *)TIFFmalloc(32);
if ( a1[144] )
{
v6 = (char *)a1[144];
TIFFmemset(v6, 0, 32);
*(_DWORD *)v6 = -1;
*((_DWORD *)v6 + 1) = a2 == 34677;
*((_DWORD *)v6 + 5) = sub_8EB180;
a1[126] = (const char *)sub_8EB92C;
a1[127] = (const char *)sub_8EB950;
a1[135] = (const char *)sub_8E77A8;
a1[137] = (const char *)sub_8E78A0;
a1[129] = (const char *)sub_8EBBD0;
a1[136] = (const char *)sub_8E8900;
a1[138] = (const char *)sub_8E89F8;
a1[139] = (const char *)sub_8EBE6C;
a1[141] = (const char *)sub_8EBED4;
*((_DWORD *)v6 + 6) = a1[168];
a1[168] = (const char *)sub_8EC1D4;
*((_DWORD *)v6 + 7) = a1[167];
a1[167] = (const char *)sub_8EBF94;
return 1;
}
else
{
TIFFErrorExt((int)a1[157], (int)"TIFFInitSGILog", "%s: No space for LogLuv state block", *a1);
return 0;
}
}
else
{
TIFFErrorExt((int)a1[157], (int)"TIFFInitSGILog", "Merging SGILog codec-specific tags failed");
return 0;
}
}