//
// TIFFSetClientInfo from 0x6bffc0 to 0x6c0124 (356 bytes)
//
// 1 xrefs:
// > ??> @ 0x5834c
//
// 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
//
char *__fastcall TIFFSetClientInfo(char *result, int *a2, const char *a3)
{
size_t v3; // r0
char *v6; // [sp+Ch] [bp-10h]
int **i; // [sp+14h] [bp-8h]
int v8; // [sp+14h] [bp-8h]
v6 = result;
for ( i = *((int ***)result + 170); i; i = (int **)*i )
{
result = (char *)strcmp((const char *)i[2], a3);
if ( !result )
break;
}
if ( i )
{
i[1] = a2;
}
else
{
v8 = TIFFmalloc(12);
if ( !v8 )
_assert2();
*(_DWORD *)v8 = *((_DWORD *)v6 + 170);
v3 = strlen(a3);
*(_DWORD *)(v8 + 8) = TIFFmalloc(v3 + 1);
if ( !*(_DWORD *)(v8 + 8) )
_assert2();
result = strcpy(*(char **)(v8 + 8), a3);
*(_DWORD *)(v8 + 4) = a2;
*((_DWORD *)v6 + 170) = v8;
}
return result;
}