//
// sub_1800D76D0 from 0x1800d76d0 to 0x1800d772c (92 bytes)
//
// 2 xrefs:
// > sub_1800D4AD0 @ 0x1800d4afc
// > ??> @ 0x1801baa04
//
// 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
//
int __fastcall sub_1800D76D0(__int64 a1, int a2, LONG a3)
{
LONG v6; // r8d
LONG v7; // edx
__int64 v9; // [rsp+30h] [rbp+8h]
v9 = sub_1800D81A0();
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_1800D7430(a1, v7, v6);
}