//
// sub_1800D0E50 from 0x1800d0e50 to 0x1800d0e9f (79 bytes)
//
// 3 xrefs:
// > sub_180020140 @ 0x180020e1c
// > sub_1800BE170 @ 0x1800be289
// > sub_1800BEC70 @ 0x1800bed6e
//
// 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_1800D0E50(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v3; // r9
if ( !a3 || (int)a2 < 0 || (int)a2 >= *(_DWORD *)a1 )
return 31;
v3 = 8LL * (int)a2;
*(_QWORD *)(v3 + *(_QWORD *)(a1 + 24)) = a3;
*(_QWORD *)(*(_QWORD *)(v3 + *(_QWORD *)(a1 + 24)) + 16LL) = a1;
return (*(__int64 (__fastcall **)(_QWORD, __int64, _QWORD, _QWORD))(**(_QWORD **)(v3 + *(_QWORD *)(a1 + 24)) + 16LL))(
*(_QWORD *)(v3 + *(_QWORD *)(a1 + 24)),
a2,
*(_QWORD *)(a1 + 8),
*(_QWORD *)(a1 + 16));
}