//
// GJDifficultySprite::updateDifficultyFrame from 0xa31568 to 0xa316d4 (364 bytes)
//
// 8 xrefs:
// > LevelInfoLayer::updateLabelValues @ 0x7e88d8
// > GJRateLevelLayer::selectRating @ 0x9508a0
// > GJRateLevelLayer::selectRating @ 0x9508c0
// > RateStarsLayer::selectRating @ 0x9574a0
// > RateStarsLayer::selectRating @ 0x9574c0
// > RateStarsModLayer::updateDSprite @ 0xcfcbc0
// > RateStarsModLayer::updateDSprite @ 0xcfcbd0
// > ??> @ 0xe0ba8
//
// 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:59:47 +0000
//
__int64 __fastcall GJDifficultySprite::updateDifficultyFrame(cocos2d::CCArray **a1, unsigned int a2, int a3)
{
cocos2d::CCArray *v4; // x0
void (__fastcall *v5)(cocos2d::CCArray **, __int64); // x21
cocos2d::CCSpriteFrameCache *v6; // x23
char *v7; // x1
__int64 v8; // x0
unsigned int v9; // w19
__int64 v10; // x0
unsigned int v11; // w1
__int64 v12; // x0
float v16; // [xsp+50h] [xbp+50h]
_BYTE v17[8]; // [xsp+68h] [xbp+68h] BYREF
__int64 v18[2]; // [xsp+70h] [xbp+70h] BYREF
char *v19; // [xsp+80h] [xbp+80h]
v4 = *a1;
v5 = *((void (__fastcall **)(cocos2d::CCArray **, __int64))v4 + 145);
v6 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v4);
GJDifficultySprite::getDifficultyFrame((char *)a2, a3, v18);
v7 = (char *)v18 + 1;
if ( (v18[0] & 1) != 0 )
v7 = v19;
v8 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v6, v7);
v5(a1, v8);
if ( (v18[0] & 1) != 0 )
operator delete(v19);
if ( a1[26] )
{
v9 = 0;
v16 = *(float *)(*((__int64 (__fastcall **)(cocos2d::CCArray **))*a1 + 41))(a1) * 0.5;
v10 = (*((__int64 (__fastcall **)(cocos2d::CCArray **))*a1 + 41))(a1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, v16, *(float *)(v10 + 4) * 0.5);
while ( v9 < (unsigned int)cocos2d::CCArray::count(a1[26]) )
{
v11 = v9++;
v12 = cocos2d::CCArray::objectAtIndex(a1[26], v11);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v12 + 184LL))(v12, v17);
}
}
return _stack_chk_guard;
}