//
// SelectArtLayer::selectArt from 0xb61728 to 0xb6182c (260 bytes)
//
// 4 xrefs:
// > SelectArtLayer::init @ 0xb6307c
// > ??> @ 0x8a5f8
// > SelectArtLayer::init @ 0xb62eac
// > ??> @ 0x1543a30
//
// 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 13:02:12 +0000
//
__int64 __fastcall SelectArtLayer::selectArt(SelectArtLayer *this, cocos2d::CCObject *a2)
{
unsigned int v3; // w19
_BOOL4 v4; // w22
__int64 v5; // x2
void (*v6)(void); // x2
_BYTE v8[3]; // [xsp+50h] [xbp+50h] BYREF
if ( a2 )
*((_DWORD *)this + 170) = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);
v3 = 0;
v4 = *((_DWORD *)this + 172) <= 1u;
while ( v3 < (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 83)) )
{
v5 = *(_QWORD *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 83), v3);
if ( v3 + v4 == *((_DWORD *)this + 170) )
{
++v3;
(*(void (**)(void))(v5 + 960))();
}
else
{
v6 = *(void (**)(void))(v5 + 960);
memset(v8, 125, sizeof(v8));
++v3;
v6();
}
}
return _stack_chk_guard;
}