//
// CustomSongWidget::loadSongInfoFailed from 0x7495b8 to 0x74969c (228 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'CustomSongWidget::loadSongInfoFailed @ 0x7496a0
// > ??> @ 0x4e840
// > ??> @ 0x1161908
//
// 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 CustomSongWidget::loadSongInfoFailed(CustomSongWidget *a1, int a2, GJSongError a3)
{
std::_Rb_tree_node_base *p_M_header; // x4
std::set *p_m_nextSongIDs; // x20
std::_Rb_tree_node_base::_Base_ptr M_parent; // x0
std::_Rb_tree_node_base *v8; // x3
_QWORD *v9; // x0
_QWORD *v10; // x1
int v11; // [xsp+3Ch] [xbp+3Ch] BYREF
p_M_header = &a1->m_nextSongIDs._M_t._M_impl._M_header;
p_m_nextSongIDs = &a1->m_nextSongIDs;
M_parent = a1->m_nextSongIDs._M_t._M_impl._M_header._M_parent;
v11 = a2;
if ( !M_parent )
goto LABEL_15;
v8 = p_M_header;
do
{
while ( (int)M_parent[1]._M_color >= a2 )
{
v8 = M_parent;
M_parent = M_parent->_M_left;
if ( !M_parent )
goto LABEL_5;
}
M_parent = M_parent->_M_right;
}
while ( M_parent );
LABEL_5:
if ( p_M_header == v8 || (int)v8[1]._M_color > a2 )
{
LABEL_15:
if ( CustomSongWidget::verifySongID(a1, a2) )
{
CustomSongWidget::updateError(a1, a3);
CustomSongWidget::downloadFailed(a1);
}
}
else
{
v9 = (_QWORD *)std::_Rb_tree,std::less,std::allocator>::equal_range(
(__int64)p_m_nextSongIDs,
&v11);
std::_Rb_tree,std::less,std::allocator>::_M_erase_aux(
p_m_nextSongIDs,
v9,
v10);
a1->downloadSongFailed(a1, v11, a3);
}
}