//
// ObjectToolbox::intKeyToFrame from 0x94dde4 to 0x94df10 (300 bytes)
//
// 18 xrefs:
// > PlayLayer::setupHasCompleted @ 0x7080e0
// > GameObject::createWithKey @ 0x77fcd8
// > GameObject::objectFromVector @ 0x780934
// > LevelEditorLayer::createObject @ 0x7a13c4
// > GJBaseGameLayer::addGuideArt @ 0x9b9a30
// > GJBaseGameLayer::addGuideArt @ 0x9b9bb4
// > GJBaseGameLayer::addGuideArt @ 0x9b9dec
// > GameObject::setupCustomSprites @ 0xad1034
// > GameObject::setupCustomSprites @ 0xad1fdc
// > GameObject::setupCustomSprites @ 0xadd398
// > GameObject::playDestroyObjectAnim @ 0xaf3e94
// > GJSmartBlockPreview::addTemplateGuide @ 0xb0fb88
// > SelectArtLayer::init @ 0xb62e6c
// > EditorUI::updateDeleteButtons @ 0xbdf810
// > EditorUI::updateDeleteButtons @ 0xbdf928
// > EditorUI::updateDeleteButtons @ 0xbdf9bc
// > EditorUI::getCreateBtn @ 0xbe2270
// > ??> @ 0xbc560
//
// This function is hookable on this platform (idp: arm, 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 12:57:21 +0000
//
char *__fastcall ObjectToolbox::intKeyToFrame(ObjectToolbox *this, int a2)
{
__int64 *v2; // x23
char *v4; // x19
int v5; // w0
bool v6; // cc
char *v7; // x0
int v8; // w0
__int64 v9; // x0
__int64 *v10; // x1
__int64 v11; // x0
__int64 v12; // x22
char *result; // x0
char *v15; // [xsp+50h] [xbp+50h]
v2 = (__int64 *)((char *)this + 328);
v4 = *((char **)this + 41);
if ( v4 )
{
v5 = *((_DWORD *)v4 + 8);
v6 = v5 < a2;
if ( v5 <= a2 )
goto LABEL_5;
while ( 1 )
{
v7 = *(char **)v4;
if ( !*(_QWORD *)v4 )
break;
while ( 1 )
{
v4 = v7;
v8 = *((_DWORD *)v7 + 8);
v6 = v8 < a2;
if ( v8 > a2 )
break;
LABEL_5:
if ( !v6 )
{
v12 = (__int64)(v4 + 40);
goto LABEL_13;
}
v7 = *((char **)v4 + 1);
if ( !v7 )
{
v15 = v4;
v2 = (__int64 *)(v4 + 8);
goto LABEL_10;
}
}
}
v15 = v4;
v2 = (__int64 *)v4;
}
else
{
v15 = (char *)this + 328;
}
LABEL_10:
v9 = operator new(0x40u);
v12 = v9 + 40;
v4 = (char *)v9;
*(_DWORD *)(v9 + 32) = a2;
v10 = (__int64 *)v9;
*(_QWORD *)(v9 + 40) = 0;
*(_QWORD *)(v9 + 48) = 0;
*(_QWORD *)(v9 + 56) = 0;
*(_QWORD *)v9 = 0;
*(_QWORD *)(v9 + 8) = 0;
*(_QWORD *)(v9 + 16) = v15;
*v2 = v9;
v11 = **((_QWORD **)this + 40);
if ( v11 )
{
*((_QWORD *)this + 40) = v11;
v10 = (__int64 *)*v2;
}
std::__tree_balance_after_insert *>(*((__int64 **)this + 41), v10);
++*((_QWORD *)this + 42);
LABEL_13:
result = v4 + 41;
if ( (v4[40] & 1) != 0 )
return *(char **)(v12 + 16);
return result;
}