//
// sub_1800980C0 from 0x1800980c0 to 0x180098133 (115 bytes)
//
// 3 xrefs:
// > sub_1800E8530 @ 0x1800e8537
// > ??> @ 0x1801477af
// > ??> @ 0x1801c09d8
//
// 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:10 +0000
//
__int64 __fastcall sub_1800980C0(__int64 a1)
{
unsigned __int64 v1; // rdx
_QWORD *v3; // rcx
v1 = *(_QWORD *)(a1 + 24);
if ( v1 > 7 )
{
v3 = *(_QWORD **)a1;
if ( 2 * v1 + 2 >= 0x1000 )
{
if ( (unsigned __int64)v3 - *(v3 - 1) - 8 > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
v3 = (_QWORD *)*(v3 - 1);
}
j_j_free_0(v3);
}
*(_QWORD *)(a1 + 24) = 7;
*(_QWORD *)(a1 + 16) = 0;
*(_WORD *)a1 = 0;
return 0;
}