//
// sub_CFAD14 from 0xcfad14 to 0xcfad74 (96 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_CFAD14(__int64 result, _QWORD *a2)
{
__int64 v2; // x2
__int64 v3; // x3
__int64 v4; // x1
v2 = *(_QWORD *)(result + 16);
v3 = *(_QWORD *)(v2 + 24);
*(_QWORD *)(result + 16) = v3;
if ( v3 )
*(_QWORD *)(v3 + 8) = result;
*(_QWORD *)(v2 + 8) = *(_QWORD *)(result + 8);
if ( result == *a2 )
{
*a2 = v2;
*(_QWORD *)(v2 + 24) = result;
*(_QWORD *)(result + 8) = v2;
}
else
{
v4 = *(_QWORD *)(result + 8);
if ( result == *(_QWORD *)(v4 + 24) )
*(_QWORD *)(v4 + 24) = v2;
else
*(_QWORD *)(v4 + 16) = v2;
*(_QWORD *)(v2 + 24) = result;
*(_QWORD *)(result + 8) = v2;
}
return result;
}