//
// EditorUI::getNeighbor from 0x100015660 to 0x100015722 (194 bytes)
//
// 13 xrefs:
// > EditorUI::processSmartObjectsFromType @ 0x1000153d1
// > EditorUI::convertKeyBasedOnNeighbors @ 0x1006f04e6
// > EditorUI::convertKeyBasedOnNeighbors @ 0x1006f050d
// > EditorUI::convertKeyBasedOnNeighbors @ 0x1006f0534
// > EditorUI::convertKeyBasedOnNeighbors @ 0x1006f055b
// > EditorUI::createOutlines @ 0x1006f13f0
// > EditorUI::createOutlines @ 0x1006f141d
// > EditorUI::createOutlines @ 0x1006f144a
// > EditorUI::createOutlines @ 0x1006f1477
// > EditorUI::createOutlines @ 0x1006f14a8
// > EditorUI::createOutlines @ 0x1006f14d6
// > EditorUI::createOutlines @ 0x1006f1504
// > EditorUI::createOutlines @ 0x1006f1532
//
// 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 12:18:54 +0000
//
__int64 __fastcall EditorUI::getNeighbor(__int64 a1, unsigned int a2, __int64 a3, unsigned int a4, __int64 a5)
{
int v7; // r13d
__int64 v8; // r12
unsigned int v9; // r15d
int v10; // r14d
__int64 v11; // rax
_BYTE v13[8]; // [rsp+4h] [rbp-3Ch] BYREF
float v14[2]; // [rsp+Ch] [rbp-34h] BYREF
int v15; // [rsp+14h] [rbp-2Ch]
GJSmartTemplate::offsetForDir(v13, a4, a2);
sub_100278350(v14, a3, v13);
v7 = (int)v14[0];
v15 = (int)v14[1];
v8 = 0;
if ( (unsigned int)sub_1007FEF90(a5) )
{
v9 = 0;
while ( 1 )
{
v8 = sub_1007FEFE0(a5, v9);
v10 = (int)*(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 192LL))(v8);
v11 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 192LL))(v8);
if ( v7 == v10 && v15 == (int)*(float *)(v11 + 4) )
break;
if ( ++v9 >= (unsigned int)sub_1007FEF90(a5) )
return 0;
}
}
return v8;
}