//
// artIconForKey from 0x57dd7c to 0x57dde8 (108 bytes)
//
// 2 xrefs:
// > SetupArtSwitchPopup::selectArtClosed @ 0x57de3e
// > SetupArtSwitchPopup::init @ 0x57e04e
//
// 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
//
int __fastcall artIconForKey(int a1, const char *a2, int a3)
{
int v3; // r6
char *v4; // r0
cocos2d::CCString *v5; // r0
char *CString; // r1
v3 = a1;
if ( a3 == 1 )
{
v4 = "gIcon_%02d_001.png";
if ( (int)a2 >= 22 )
a2 = (_BYTE *)(&dword_14 + 2);
LABEL_9:
if ( (int)a2 < 1 )
a2 = (_BYTE *)(&dword_0 + 1);
goto LABEL_13;
}
if ( a3 != 2 )
{
if ( a3 )
{
CString = "mgIcon_00_001.png";
goto LABEL_15;
}
if ( (int)a2 >= 59 )
a2 = (_BYTE *)(&dword_38 + 3);
v4 = "bgIcon_%02d_001.png";
goto LABEL_9;
}
a2 = (const char *)__usat(2u, (unsigned int)a2);
v4 = "mgIcon_%02d_001.png";
LABEL_13:
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)v4, a2);
CString = (char *)cocos2d::CCString::getCString(v5);
a1 = v3;
LABEL_15:
sub_776584(a1, CString);
return v3;
}