//
// sub_1800D22E0 from 0x1800d22e0 to 0x1800d233a (90 bytes)
//
// 1 xrefs:
// > FMOD::Geometry::getPolygonVertex @ 0x1800a44f2
//
// 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_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;
}