//
// sub_1800D9060 from 0x1800d9060 to 0x1800d90bc (92 bytes)
//
// 2 xrefs:
// > sub_1800DC800 @ 0x1800dc82c
// > ??> @ 0x1801c4ac4
//
// This function is hookable on this platform (idp: pc, 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:22:33 +0000
//
int __fastcall sub_1800D9060(__int64 a1, int a2, LONG a3)
{
LONG v6; // r8d
LONG v7; // edx
__int64 v9; // [rsp+30h] [rbp+8h]
v9 = sub_1800D9B30();
v6 = HIDWORD(v9) - *(_DWORD *)(a1 + 728);
if ( a2 > (int)v9 - *(_DWORD *)(a1 + 724) || a3 > v6 )
{
v7 = v9 - *(_DWORD *)(a1 + 724);
}
else
{
v6 = a3;
v7 = a2;
}
return sub_1800D8DC0(a1, v7, v6);
}