//
// GameToolbox::addBackButton from 0x140065040 to 0x140065113 (211 bytes)
//
// 22 xrefs:
// > CreatorLayer::init @ 0x14009d1f0
// > EditLevelLayer::init @ 0x1400d6746
// > GauntletLayer::init @ 0x1401f658f
// > GauntletSelectLayer::init @ 0x1401f9415
// > GJDropDownLayer::init @ 0x140257294
// > GJGarageLayer::init @ 0x1402749ed
// > GJShopLayer::init @ 0x1402aab22
// > LeaderboardsLayer::init @ 0x1402c2627
// > LevelAreaLayer::init @ 0x1402c45f7
// > LevelAreaInnerLayer::init @ 0x1402c6685
// > LevelBrowserLayer::init @ 0x1402c9fd5
// > LevelInfoLayer::init @ 0x1402f9785
// > LevelListLayer::init @ 0x140305000
// > LevelSearchLayer::init @ 0x14030dc4f
// > LevelSelectLayer::init @ 0x140319168
// > SecretRewardsLayer::init @ 0x1403d2c25
// > SecretLayer::init @ 0x1403ddcd8
// > SecretLayer2::init @ 0x1403e3093
// > SecretLayer3::init @ 0x1403eb4b7
// > SecretLayer4::init @ 0x1403f0812
// > SecretLayer5::init @ 0x1403f4818
// > ??> @ 0x1406c5d78
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void GameToolbox::addBackButton(cocos2d::CCLayer *a1, cocos2d::CCMenuItem *a2)
{
struct cocos2d::CCSprite *v4; // r14
cocos2d::CCNode *v5; // rax
struct cocos2d::CCPoint v6; // [rsp+40h] [rbp+8h] BYREF
struct cocos2d::CCPoint v7; // [rsp+48h] [rbp+10h] BYREF
cocos2d::CCPoint v8; // [rsp+50h] [rbp+18h] BYREF
v4 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_B_001.png");
a1->addChild_1(a1, v4);
a2->getPosition_0(a2);
v5 = a2->getParent(a2);
cocos2d::CCNode::convertToWorldSpace(v5, &v7);
cocos2d::CCNode::convertToNodeSpace(a1, &v6);
cocos2d::CCPoint::CCPoint(&v8, 28.0, 10.0);
cocos2d::CCPoint::operator+(&v6, &v7);
v4->setPosition_0(v4, &v7);
((void (__fastcall *)(struct cocos2d::CCSprite *))v4->setScale_0)(v4);
}