//
// _TIFFprintAscii from 0xc5ea24 to 0xc5eb28 (260 bytes)
//
// 2 xrefs:
// > _TIFFprintAsciiTag @ 0xc5eb58
// > ??> @ 0x39e70
//
// 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 TIFFprintAscii(FILE *a1, char *a2)
{
char *v3; // x25
__int64 result; // x0
int v5; // w24
char *v6; // x19
const char *i; // x0
unsigned __int8 *v8; // x0
v3 = a2;
result = strlen(a2);
if ( (int)result > 0 )
{
v5 = (unsigned __int8)*v3;
if ( *v3 )
{
v6 = &v3[(unsigned int)(result - 1) + 1];
while ( 1 )
{
if ( isprint(v5) )
{
result = fputc(v5, a1);
}
else
{
if ( v5 != 9 )
{
for ( i = "\tt\bb\rr\nn\vv"; i[2]; i += 2 )
{
if ( v5 == *((unsigned __int8 *)i + 2) )
{
v8 = (unsigned __int8 *)(i + 3);
goto LABEL_15;
}
}
LABEL_10:
result = fprintf(a1, "\\%03o", v5);
goto LABEL_11;
}
v8 = (unsigned __int8 *)"t\bb\rr\nn\vv";
LABEL_15:
if ( !*v8 )
goto LABEL_10;
result = fprintf(a1, "\\%c", *v8);
}
LABEL_11:
if ( ++v3 != v6 )
{
v5 = (unsigned __int8)*v3;
if ( *v3 )
continue;
}
return result;
}
}
}
return result;
}