//
// CustomSongCell::loadFromObject from 0x1400b4690 to 0x1400b4847 (439 bytes)
//
// 3 xrefs:
// > CustomListView::loadCell @ 0x1400ab6c5
// > CustomListView::reloadAll @ 0x1400ac704
// > ??> @ 0x1406c7b00
//
// 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 CustomSongCell::loadFromObject(CustomSongCell *a1, SongInfoObject *a2)
{
SongInfoObject *v3; // rbx
CustomSongDelegate *v4; // rdx
CustomSongWidget *v5; // rdi
CustomSongWidget_vtbl *v6; // rbx
const cocos2d::CCPoint *v7; // rax
struct cocos2d::CCSprite *v8; // rbx
CCMenuItemSpriteExtra *v9; // rax
struct cocos2d::CCMenu *v10; // rdi
cocos2d::CCMenu_vtbl *v11; // rbx
const cocos2d::CCPoint *v12; // rax
cocos2d::CCPoint v13; // [rsp+70h] [rbp+8h] BYREF
v3 = a2;
LOBYTE(a2) = 1;
a1->m_mainLayer->removeAllChildrenWithCleanup(a1->m_mainLayer, (bool)a2);
a1->m_songInfoObject = v3;
v4 = &a1->CustomSongDelegate;
if ( !a1 )
v4 = nullptr;
v5 = CustomSongWidget::create(v3, v4, 1, 1, 0, 0, 0, 0, 0);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v5, 2);
v6 = v5->cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(&v13, a1->m_width * 0.5, a1->m_height * 0.5);
v6->setPosition_0(v5, v7);
v5->m_isInCell = 1;
v8 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_trashBtn_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v8->setScale_0)(v8);
v9 = CCMenuItemSpriteExtra::create(v8, nullptr, a1, (cocos2d::SEL_MenuHandler *)CustomSongCell::onDelete);
HIDWORD(v9->m_pfnSelector.adj) = 1069547520;
v10 = cocos2d::CCMenu::create(v9, 0);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v10, 3);
v11 = v10->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(&v13, (float)(a1->m_width * 0.5) + 90.0, (float)(a1->m_height * 0.5) - 24.0);
v11->setPosition_0(v10, v12);
a1->m_selected = a1->m_songInfoObject->m_songID == a1->getActiveSongID(&a1->CustomSongDelegate);
}