//
// cocos2d::CCTouchDispatcher::ownerLevelOf from 0x807d7c to 0x807e32 (182 bytes)
//
// 5 xrefs:
// > FLAlertLayer::ownedTouchPrio @ 0x3cb972
// > ProfilePage::setupCommentsBrowser @ 0x5f64c4
// > MessageThreadsPage::setupThreadBrowser @ 0x746c78
// > cocos2d::CCTouchDispatcher::ownerLevelOf @ 0x807dfc
// > cocos2d::CCTouchDispatcher::ownerLevelFor @ 0x807e62
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:01:26 +0000
//
int __fastcall cocos2d::CCTouchDispatcher::ownerLevelOf(cocos2d::CCDictionary **this, cocos2d::CCNode *a2, int *a3)
{
int *v4; // r4
int v6; // r6
int v7; // r0
int v8; // r2
int v9; // r0
int v10; // r10
cocos2d::CCNode *v11; // r0
int v12; // r1
cocos2d::CCInteger *v13; // r0
cocos2d::CCDictionary *v14; // r5
cocos2d::CCObject *v15; // r0
int v17[2]; // [sp+0h] [bp-8h] BYREF
v17[0] = (int)this;
v17[1] = (int)a2;
v4 = (int *)a2;
if ( cocos2d::CCDictionary::count(*(this + 27)) )
{
while ( v4 )
{
v9 = cocos2d::CCDictionary::objectForKey(*(this + 27), v4[1]);
if ( v9 )
{
v6 = 1;
*a3 = *(_DWORD *)(v9 + 52);
return v6;
}
v7 = cocos2d::CCDictionary::objectForKey(*(this + 28), v4[1]);
if ( v7 )
{
v10 = *(_DWORD *)(v7 + 52);
cocos2d::CCDictionary::removeObjectForKey(*(this + 28), v4[1], v8);
v17[0] = 0;
v11 = (cocos2d::CCNode *)(*(int (__fastcall **)(int *))(*v4 + 256))(v4);
v6 = cocos2d::CCTouchDispatcher::ownerLevelOf((cocos2d::CCTouchDispatcher *)this, v11, v17);
if ( v6 )
{
v13 = (cocos2d::CCInteger *)(v17[0] - v10);
*a3 = v17[0] - v10;
v14 = *(this + 27);
v15 = cocos2d::CCInteger::create(v13, v12);
cocos2d::CCDictionary::setObject(v14, v15, v4[1]);
}
return v6;
}
if ( cocos2d::CCDictionary::objectForKey(*(this + 26), v4[1]) )
return 0;
v4 = (int *)(*(int (__fastcall **)(int *))(*v4 + 256))(v4);
}
}
return 0;
}