//
// sub_10065FE8C from 0x10065fe8c to 0x10065fefc (112 bytes)
//
// 13 xrefs:
// > sub_10065DE8C @ 0x10065e294
// > sub_10065DE8C @ 0x10065e4c8
// > sub_10065DE8C @ 0x10065e55c
// > sub_10065DE8C @ 0x10065e69c
// > sub_10065DE8C @ 0x10065e6e8
// > sub_10065DE8C @ 0x10065e7a4
// > sub_10065EBB0 @ 0x10065ee84
// > sub_10065EBB0 @ 0x10065ef68
// > sub_10065EBB0 @ 0x10065efa8
// > sub_10065EBB0 @ 0x10065f05c
// > sub_10065EBB0 @ 0x10065f1b0
// > sub_10065EBB0 @ 0x10065f35c
// > sub_1006634B8 @ 0x10066360c
//
// 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:57 +0000
//
__int64 __fastcall sub_10065FE8C(__int64 a1)
{
__int64 v2; // x8
__int64 v3; // x0
v2 = *(_QWORD *)(a1 + 136);
if ( !*(_QWORD *)(v2 + 848) && !*(_DWORD *)(v2 + 856) )
*(_WORD *)(v2 + 864) = 1;
gettimeofday((timeval *)(v2 + 848), nullptr);
*(_QWORD *)(*(_QWORD *)(a1 + 136) + 848LL) += *(unsigned __int16 *)(*(_QWORD *)(a1 + 136) + 864LL);
v3 = sub_1006649A0(a1);
return sub_100700CE0(v3, 45, 0, *(_QWORD *)(a1 + 136) + 848LL);
}