//
// findNextHighestID from 0x65cbd8 to 0x65cc38 (96 bytes)
//
// 11 xrefs:
// > LevelEditorLayer::getNextFreeSFXID @ 0x673260
// > LevelEditorLayer::getNextFreeSFXGroupID @ 0x673388
// > LevelEditorLayer::getNextFreeGroupID @ 0x6735bc
// > LevelEditorLayer::getNextFreeItemID @ 0x6737d8
// > LevelEditorLayer::getNextFreeBlockID @ 0x67392c
// > LevelEditorLayer::getNextFreeOrderChannel @ 0x673af8
// > LevelEditorLayer::getNextFreeEditorLayer @ 0x673cc8
// > LevelEditorLayer::getNextFreeEnterChannel @ 0x673e34
// > LevelEditorLayer::getNextFreeAreaEffectID @ 0x673f58
// > LevelEditorLayer::getNextFreeGradientID @ 0x6740cc
// > ??> @ 0xc34f8
//
// 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 findNextHighestID(int a1, int a2, _QWORD *a3)
{
int v3; // w19
if ( a1 <= 0 )
v3 = 1;
else
v3 = a1;
if ( v3 <= a2 )
{
while ( sub_65B9F4(a3, v3) && a2 >= v3 + 1 )
++v3;
}
return (unsigned int)v3;
}