//
// RateLevelLayer::selectRating from 0x8c3340 to 0x8c347c (316 bytes)
//
// 4 xrefs:
// > RateLevelLayer::init @ 0x8c384c
// > ??> @ 0xe33c8
// > RateLevelLayer::init @ 0x8c36b4
// > ??> @ 0x1546d20
//
// 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:56:32 +0000
//
__int64 __fastcall RateLevelLayer::selectRating(RateLevelLayer *this, cocos2d::CCObject *a2)
{
unsigned int v3; // w19
__int64 v4; // x2
void (*v5)(void); // x2
__int64 (*v6)(void); // x1
_QWORD *v7; // x0
_QWORD *v9; // x0
_BYTE v10[3]; // [xsp+50h] [xbp+50h] BYREF
if ( a2 )
*((_DWORD *)this + 171) = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);
else
*((_DWORD *)this + 171) = -1;
v3 = 0;
while ( v3 < (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 84)) )
{
v4 = *(_QWORD *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 84), v3);
if ( *((_DWORD *)this + 171) == v3 )
{
++v3;
(*(void (**)(void))(v4 + 960))();
}
else
{
v5 = *(void (**)(void))(v4 + 960);
memset(v10, 125, sizeof(v10));
++v3;
v5();
}
}
v6 = *(__int64 (**)(void))(**((_QWORD **)this + 83) + 1072LL);
if ( *((_DWORD *)this + 171) == -1 )
{
v9 = (_QWORD *)v6();
ButtonSprite::setColor(v9, 10921638);
}
else
{
v7 = (_QWORD *)v6();
ButtonSprite::setColor(v7, 0xFFFFFF);
}
return _stack_chk_guard;
}