//
// EditorUI::getNeighbor from 0x7c315c to 0x7c3270 (276 bytes)
//
// 14 xrefs:
// > EditorUI::processSmartObjectsFromType @ 0x7c3384
// > EditorUI::convertKeyBasedOnNeighbors @ 0xb070bc
// > EditorUI::convertKeyBasedOnNeighbors @ 0xb070e8
// > EditorUI::convertKeyBasedOnNeighbors @ 0xb07114
// > EditorUI::convertKeyBasedOnNeighbors @ 0xb07140
// > EditorUI::createOutlines @ 0xb0871c
// > EditorUI::createOutlines @ 0xb08744
// > EditorUI::createOutlines @ 0xb0876c
// > EditorUI::createOutlines @ 0xb08794
// > EditorUI::createOutlines @ 0xb087bc
// > EditorUI::createOutlines @ 0xb087e4
// > EditorUI::createOutlines @ 0xb0880c
// > EditorUI::createOutlines @ 0xb08834
// > ??> @ 0xafc30
//
// 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:54:07 +0000
//
__int64 __fastcall EditorUI::getNeighbor(__int64 a1, __int64 a2, __int64 a3, unsigned int a4, cocos2d::CCArray *a5)
{
unsigned int v6; // w20
int v7; // w25
int v8; // w23
__int64 v9; // x19
int v10; // w21
__int64 v13; // [xsp+68h] [xbp+68h] BYREF
__int64 v14; // [xsp+70h] [xbp+70h] BYREF
v6 = 0;
GJSmartTemplate::offsetForDir(&v14, a4, a2);
cocos2d::CCPoint::operator+(&v13, a3);
v7 = (int)*(float *)&v13;
v8 = (int)*((float *)&v13 + 1);
if ( !(unsigned int)cocos2d::CCArray::count(a5) )
return 0;
while ( 1 )
{
v9 = cocos2d::CCArray::objectAtIndex(a5, v6);
v10 = (int)*(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 192LL))(v9);
if ( v8 == (int)*(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 192LL))(v9) + 4) && v7 == v10 )
break;
if ( ++v6 >= (unsigned int)cocos2d::CCArray::count(a5) )
return 0;
}
return v9;
}