//
// GJBaseGameLayer::resetGroupCounters from 0x476544 to 0x47661a (214 bytes)
//
// 3 xrefs:
// > LevelEditorLayer::onStopPlaytest @ 0x36942e
// > LevelEditorLayer::onPlaytest @ 0x36eba4
// > LevelEditorLayer::init @ 0x376c24
//
// 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 GJBaseGameLayer::resetGroupCounters(GJBaseGameLayer *a1, bool a2)
{
std::__detail::_Hash_node_base *M_nxt; // r4
_BOOL4 v4; // r7
std::__detail::_Hash_node_base *v5; // r10
std::__detail::_Hash_node_base *i; // r6
LabelGameObject *v7; // r3
LabelGameObject *v8; // t1
std::__detail::_Hash_node_base *j; // r4
std::__detail::_Hash_node_base *v10; // r10
std::__detail::_Hash_node_base *k; // r6
LabelGameObject *v12; // r11
LabelGameObject *v13; // t1
char *v14; // r1
int v15; // [sp+4h] [bp-8h]
int v16; // [sp+10h] [bp+4h] BYREF
M_nxt = a1->m_labelObjects._M_h._M_before_begin._M_nxt;
v4 = a2;
while ( M_nxt )
{
v5 = M_nxt[3]._M_nxt;
for ( i = M_nxt[2]._M_nxt; i != v5; ++i )
{
v8 = (LabelGameObject *)i->_M_nxt;
v7 = v8;
if ( v4 )
{
v15 = (int)v7;
sub_776584((int)&v16, "0");
LabelGameObject::updateLabel(v15, &v16);
sub_774008(&v16);
}
else
{
LabelGameObject::updatePreviewLabel(v7);
}
}
M_nxt = M_nxt->_M_nxt;
}
for ( j = a1->m_timeLabelObjects._M_h._M_before_begin._M_nxt; j; j = j->_M_nxt )
{
v10 = j[3]._M_nxt;
for ( k = j[2]._M_nxt; k != v10; ++k )
{
v13 = (LabelGameObject *)k->_M_nxt;
v12 = v13;
if ( v4 )
{
if ( v12->m_showSecondsOnly )
v14 = "0";
else
v14 = "0.00";
sub_776584((int)&v16, v14);
LabelGameObject::updateLabel((int)v12, &v16);
sub_774008(&v16);
}
else
{
LabelGameObject::updatePreviewLabel(v12);
}
}
}
}