//
// sub_1800D22E0 from 0x1800d22e0 to 0x1800d233a (90 bytes)
//
// 1 xrefs:
// > FMOD::Geometry::getPolygonVertex @ 0x1800a44f2
//
// 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 10:54:09 +0000
//
__int64 __fastcall sub_1800D22E0(__int64 a1, int a2, int a3, __int64 a4)
{
__int64 v4; // r10
if ( a2 < 0 )
return 31;
if ( a2 >= *(_DWORD *)(a1 + 44) )
return 31;
if ( !a4 )
return 31;
if ( a3 < 0 )
return 31;
v4 = *(_QWORD *)(a1 + 64) + *(int *)(*(_QWORD *)(a1 + 48) + 4LL * a2);
if ( a3 >= *(unsigned __int16 *)(v4 + 184) )
return 31;
*(_QWORD *)a4 = *(_QWORD *)(v4 + 12LL * a3 + 188);
*(_DWORD *)(a4 + 8) = *(_DWORD *)(v4 + 12LL * a3 + 196);
return 0;
}