//
// _TIFFCheckRealloc from 0x69ff3c to 0x6a0014 (216 bytes)
//
// 5 xrefs:
// > _TIFFCheckMalloc @ 0x6a004c
// > _TIFFMergeFields @ 0x6a851c
// > TIFFMergeFieldInfo @ 0x6a95a8
// > sub_6B35D4 @ 0x6b36d0
// > ??> @ 0x57acc
//
// 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
//
int __fastcall TIFFCheckRealloc(_DWORD *a1, int a2, int a3, int a4, const char *a5)
{
int v9; // [sp+18h] [bp-Ch]
int v10; // [sp+1Ch] [bp-8h]
v9 = 0;
v10 = a4 * a3;
if ( a3 && a4 && v10 / a4 == a3 )
v9 = TIFFrealloc(a2, v10);
if ( !v9 )
TIFFErrorExt(a1[157], *a1, "Failed to allocate memory for %s (%ld elements of %ld bytes each)", a5, a3, a4);
return v9;
}