//
// sub_1004C6A48 from 0x1004c6a48 to 0x1004c6aa0 (88 bytes)
//
// 0 xrefs:
//
// 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_1004C6A48(char *a1, size_t __size, const char *a3, va_list a4)
{
int v4; // w21
int v5; // w20
int v7; // w0
unsigned int v8; // w8
__int64 result; // x0
v4 = __size - 1;
if ( (int)__size < 1 )
return 0;
v5 = __size;
*a1 = 0;
v7 = vsnprintf(a1, (unsigned int)__size, a3, a4);
if ( v7 >= v5 )
v8 = v5;
else
v8 = v7;
if ( v7 >= 0 )
result = v8;
else
result = (unsigned int)v5;
a1[v4] = 0;
return result;
}