//
// GauntletSprite::addLockedSprite from 0xa77db4 to 0xa78018 (612 bytes)
//
// 2 xrefs:
// > GauntletSprite::toggleLockedSprite @ 0xa78048
// > ??> @ 0xabf28
//
// 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:00:27 +0000
//
__int64 __fastcall GauntletSprite::addLockedSprite(GauntletSprite *this)
{
char *v2; // x19
size_t v3; // x0
cocos2d::CCSprite *v4; // x19
void (__fastcall *v5)(cocos2d::CCSprite *, __int16 *); // x3
float v6; // s0
float v7; // s0
void (__fastcall *v8)(cocos2d::CCSprite *, __int16 *); // x23
float v9; // s8
__int64 v10; // x0
void (__fastcall *v11)(cocos2d::CCSprite *, __int16 *); // x20
__int64 v12; // x0
const char *v13; // x1
__int64 v14; // x20
void (__fastcall *v15)(__int64, __int16 *); // x23
float v16; // s8
__int64 v17; // x0
__int16 v19; // [xsp+40h] [xbp+40h] BYREF
char v20; // [xsp+42h] [xbp+42h]
__int64 v21[2]; // [xsp+48h] [xbp+48h] BYREF
void *v22; // [xsp+58h] [xbp+58h]
__int64 v23[2]; // [xsp+60h] [xbp+60h] BYREF
void *v24; // [xsp+70h] [xbp+70h]
v2 = (char *)v21 + 1;
GauntletNode::frameForType(*((_DWORD *)this + 79), v21);
if ( (v21[0] & 1) != 0 )
v2 = (char *)v22;
v23[0] = 0;
v23[1] = 0;
v24 = nullptr;
v3 = strlen(v2);
std::string::__init(v23, v2, v3);
v4 = CCSpriteGrayscale::createWithSpriteFrameName((char *)v23);
if ( (v23[0] & 1) != 0 )
operator delete(v24);
v5 = *(void (__fastcall **)(cocos2d::CCSprite *, __int16 *))(*(_QWORD *)v4 + 960LL);
v19 = -256;
v20 = -1;
v5(v4, &v19);
(*(void (__fastcall **)(GauntletSprite *, cocos2d::CCSprite *))(*(_QWORD *)this + 456LL))(this, v4);
v6 = GauntletSprite::luminanceForType((__int64)this, *((_DWORD *)this + 79));
v7 = CCSpriteWithHue::setLuminance(v4, v6);
v8 = *(void (__fastcall **)(cocos2d::CCSprite *, __int16 *))(*(_QWORD *)v4 + 184LL);
v9 = *(float *)(*(__int64 (__fastcall **)(GauntletSprite *, float))(*(_QWORD *)this + 328LL))(this, v7) * 0.5;
v10 = (*(__int64 (__fastcall **)(GauntletSprite *))(*(_QWORD *)this + 328LL))(this);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v19, v9, *(float *)(v10 + 4) * 0.5);
v8(v4, &v19);
v11 = *(void (__fastcall **)(cocos2d::CCSprite *, __int16 *))(*(_QWORD *)v4 + 960LL);
v12 = GauntletSprite::colorForType();
v19 = v12;
v20 = BYTE2(v12);
v11(v4, &v19);
v14 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"gauntletLock_001.png", v13);
(*(void (__fastcall **)(cocos2d::CCSprite *, __int64, __int64))(*(_QWORD *)v4 + 464LL))(v4, v14, 1);
v15 = *(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v14 + 184LL);
v16 = *(float *)(*(__int64 (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v4 + 328LL))(v4) * 0.5;
v17 = (*(__int64 (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v4 + 328LL))(v4);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v19, v16, *(float *)(v17 + 4) * 0.5);
v15(v14, &v19);
if ( (v21[0] & 1) != 0 )
operator delete(v22);
return _stack_chk_guard;
}