//
// sub_1005D267C from 0x1005d267c to 0x1005d270c (144 bytes)
//
// 1 xrefs:
// > sub_1005D4B44 @ 0x1005d4be4
//
// 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_1005D267C(char *a1, __int64 a2, __int64 a3)
{
__int64 v5; // x0
int v6; // w21
__int64 v7; // x20
int v8; // w0
int v9; // w8
int v10; // w8
size_t v11; // x22
v5 = (*(__int64 (**)(void))(*(_QWORD *)(a3 + 128) + 16LL))();
v6 = v5;
v7 = v5;
if ( (int)v5 >= 1 )
{
v8 = sub_1005AAC20(*(_QWORD *)(a3 + 8));
v9 = v8 + 7;
if ( v8 + 7 < 0 )
v9 = v8 + 14;
v7 = (unsigned int)(v9 >> 3);
v10 = v7 - v6;
if ( (int)v7 - v6 >= 1 )
{
v11 = v10;
memmove(&a1[v10], a1, v6);
bzero(a1, v11);
}
}
return v7;
}