//
// sub_1004AC6FC from 0x1004ac6fc to 0x1004ac7b0 (180 bytes)
//
// 1 xrefs:
// > ??> @ 0x100828318
//
// 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_1004AC6FC(__int64 *a1, _QWORD *a2)
{
__int64 v5; // x20
__int64 *v6; // x8
__int64 *v7; // x9
__int64 *v8; // x10
__int64 **v9; // x11
if ( !a2 )
return 31;
if ( (_QWORD *)*a2 != a2 || (_QWORD *)a2[1] != a2 )
return 28;
v5 = a1[51];
if ( v5 )
sub_100442B5C(a1[51], 0xBu);
v6 = a1 + 66;
v7 = (__int64 *)a1[66];
v8 = (__int64 *)a1[67];
if ( v7 != a1 + 66 || v8 != v6 )
{
v9 = (__int64 **)a2[1];
*v8 = (__int64)*v9;
v7[1] = (__int64)v9;
*v9 = v7;
a1[66] = (__int64)v6;
a1[67] = (__int64)v6;
}
if ( v5 )
sub_100442B7C(v5, 0xBu);
return 0;
}