//
// sub_10065FF9C from 0x10065ff9c to 0x100660050 (180 bytes)
//
// 2 xrefs:
// > sub_10065FCF4 @ 0x10065fdc0
// > sub_100660A0C @ 0x1006610a4
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:10:58 +0000
//
__int64 __fastcall sub_10065FF9C(__int64 a1)
{
__int64 v2; // x8
unsigned int v3; // w9
__int64 v4; // x0
unsigned int v5; // w0
v2 = *(_QWORD *)(a1 + 136);
v3 = *(_DWORD *)(v2 + 840) + 1;
*(_DWORD *)(v2 + 840) = v3;
if ( v3 >= 3 )
{
if ( (sub_100664E8C(a1, 32, 0, 0) & 0x1000) != 0 )
{
v2 = *(_QWORD *)(a1 + 136);
}
else
{
v4 = sub_1006649A8(a1);
v5 = sub_100700CE0(v4, 47, 0, 0);
v2 = *(_QWORD *)(a1 + 136);
if ( v5 < *(_DWORD *)(v2 + 648) )
*(_DWORD *)(v2 + 648) = v5;
}
}
if ( *(_DWORD *)(v2 + 840) < 0xDu )
return 0;
sub_100706FB0(20, 316, 312, "d1_lib.c", 480);
return 0xFFFFFFFFLL;
}