//
// sub_10058165C from 0x10058165c to 0x1005816d4 (120 bytes)
//
// 1 xrefs:
// > sub_10056DB30 @ 0x10056dcf0
//
// 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_10058165C(__int64 a1, __int64 a2)
{
__int64 *v3; // x21
__int64 v4; // x22
__int64 v5; // x20
__int64 **v6; // x8
v3 = *(__int64 **)(a2 + 920);
v4 = *v3;
if ( (unsigned int)sub_10056BAE8(v3, v3[1], a1) )
v5 = 0;
else
v5 = 27;
v6 = *(__int64 ***)(a2 + 920);
if ( v3 == (__int64 *)v6 && v4 != *v3 )
{
*(_BYTE *)(a2 + 913) = 0;
sub_10056C89C(**v6, 1);
}
return v5;
}