//
// GameManager::colorForIdx from 0x1003b3a6c to 0x1003b3ed4 (1128 bytes)
//
// 41 xrefs:
// > CommentCell::loadFromComment @ 0x10012b1d0
// > CommentCell::loadFromComment @ 0x10012b204
// > GJScoreCell::loadFromScore @ 0x10012ce08
// > GJScoreCell::loadFromScore @ 0x10012ce38
// > GJLevelScoreCell::loadFromScore @ 0x10012e248
// > GJLevelScoreCell::loadFromScore @ 0x10012e278
// > GJThreadCell::loadFromThread @ 0x10012fe1c
// > GJThreadCell::loadFromThread @ 0x10012fe4c
// > GJCompactUserCell::buildUserRow @ 0x100139294
// > GJCompactUserCell::buildUserRow @ 0x1001392c0
// > PlayLayer::spawnFirework @ 0x100143c0c
// > PlayLayer::spawnFirework @ 0x100143c2c
// > CharacterColorPage::updateIconColors @ 0x100153308
// > CharacterColorPage::updateIconColors @ 0x100153334
// > CharacterColorPage::updateIconColors @ 0x10015335c
// > CharacterColorPage::createColorMenu @ 0x1001536c4
// > CharacterColorPage::onPlayerColor @ 0x100153b80
// > ProfilePage::loadPageFromUserInfo @ 0x10022bce4
// > ProfilePage::loadPageFromUserInfo @ 0x10022bd00
// > GJBaseGameLayer::createPlayer @ 0x100277de4
// > GJBaseGameLayer::createPlayer @ 0x100277e28
// > GJBaseGameLayer::createPlayer @ 0x100277e78
// > GJBaseGameLayer::createPlayer @ 0x100277fbc
// > GJBaseGameLayer::createPlayer @ 0x100278000
// > GJBaseGameLayer::createPlayer @ 0x100278050
// > GJBaseGameLayer::addDeathMarkerLayer @ 0x10028f290
// > GJGarageLayer::updatePlayerColors @ 0x1003a00a4
// > GJGarageLayer::updatePlayerColors @ 0x1003a00d0
// > GJGarageLayer::updatePlayerColors @ 0x1003a014c
// > sub_1003A426C @ 0x1003a428c
// > GJItemIcon::init @ 0x1003a4b20
// > MenuGameLayer::init @ 0x100441e00
// > MenuGameLayer::init @ 0x100441e44
// > MenuGameLayer::getBGColor @ 0x100442018
// > MenuGameLayer::resetPlayer @ 0x10044247c
// > MenuGameLayer::resetPlayer @ 0x1004424c0
// > sub_10048414C @ 0x1004841d4
// > ThreadViewPopup::mountVirtualRow @ 0x100500330
// > ThreadViewPopup::mountVirtualRow @ 0x10050035c
// > sub_1005101EC @ 0x10051022c
// > sub_1005101EC @ 0x100510258
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:03:55 +0000
//
__int64 __fastcall GameManager::colorForIdx(__int64 a1, int a2)
{
__int64 result; // x0
unsigned __int16 v3; // w0
unsigned __int16 v4; // w0
unsigned __int16 v5; // w0
unsigned __int16 v6; // w0
unsigned __int16 v7; // w0
unsigned __int16 v8; // w0
int v9; // w8
int v10; // w9
unsigned __int16 v11; // w0
unsigned __int16 v12; // w0
unsigned __int16 v13; // w0
unsigned __int16 v14; // w0
unsigned __int16 v15; // w0
unsigned __int16 v16; // w0
result = 65405;
switch ( a2 )
{
case 0:
return result;
case 1:
return 65280;
case 2:
v15 = -256;
return v15 | 0x7D0000u;
case 3:
return 16776960;
case 4:
v3 = 32000;
goto LABEL_102;
case 5:
return 16711680;
case 6:
v3 = 125;
goto LABEL_102;
case 7:
return 16711935;
case 8:
v9 = 130;
v10 = 8192125;
return v10 | (unsigned int)v9;
case 9:
return 255;
case 10:
return 32255;
case 11:
return 0xFFFF;
case 13:
v3 = 185;
goto LABEL_102;
case 14:
return 47615;
case 15:
return 0;
case 16:
v3 = -14336;
goto LABEL_102;
case 17:
v13 = -20561;
return v13 | 0xAF0000u;
case 18:
return 5921370;
case 19:
return 8224255;
case 20:
v14 = -20736;
return v14 | 0x4B0000u;
case 21:
v15 = 32000;
return v15 | 0x7D0000u;
case 22:
v13 = 19200;
return v13 | 0xAF0000u;
case 23:
v13 = 75;
return v13 | 0xAF0000u;
case 24:
v15 = 125;
return v15 | 0x7D0000u;
case 25:
v14 = 175;
return v14 | 0x4B0000u;
case 26:
return 19375;
case 27:
return 32125;
case 28:
return 44875;
case 29:
return 19455;
case 30:
return 12950;
case 31:
return 25750;
case 32:
return 38500;
case 33:
v11 = -27136;
return v11 | 0x640000u;
case 34:
return 9856000;
case 35:
v9 = 100;
v10 = -6946816;
return v10 | (unsigned int)v9;
case 36:
v11 = 150;
return v11 | 0x640000u;
case 37:
return 150;
case 38:
return 38400;
case 39:
return 9830400;
case 40:
v13 = -131;
return v13 | 0xAF0000u;
case 41:
v3 = 32125;
goto LABEL_102;
case 42:
v5 = -1281;
return v5 | 0x7F0000u;
case 43:
v3 = 32762;
goto LABEL_102;
case 44:
return 12648192;
case 45:
return 930384;
case 46:
return 7775693;
case 47:
v3 = -32586;
goto LABEL_102;
case 48:
return 3816191;
case 49:
return 9391437;
case 50:
v7 = 2560;
return v7 | 0x4C0000u;
case 51:
return 13554941;
case 52:
v3 = -19010;
goto LABEL_102;
case 53:
return 112;
case 54:
return 594;
case 55:
return 393528;
case 56:
return 5197696;
case 57:
return 3487098;
case 58:
return 2368593;
case 59:
return 4612771;
case 60:
return 3557749;
case 61:
return 2635094;
case 62:
return 7518719;
case 63:
v12 = -24321;
return v12 | 0x400000u;
case 64:
return 1978726;
case 65:
return 10075;
case 66:
return 8263;
case 67:
return 5077927;
case 68:
return 3756909;
case 69:
return 2768465;
case 70:
return 12648447;
case 71:
v8 = -7939;
return v8 | 0xA00000u;
case 72:
v8 = -64;
return v8 | 0xA00000u;
case 73:
v16 = -79;
return v16 | 0x6D0000u;
case 74:
v4 = -64;
return v4 | 0xE00000u;
case 75:
return 15007636;
case 76:
return 9085251;
case 77:
return 6253873;
case 78:
return 4805670;
case 79:
return 24576;
case 80:
return 0x4000;
case 81:
v6 = 24576;
return v6 | 0x600000u;
case 82:
v12 = 0x4000;
return v12 | 0x400000u;
case 83:
v3 = -96;
goto LABEL_102;
case 84:
return 7341825;
case 85:
v16 = 18688;
return v16 | 0x6D0000u;
case 86:
v7 = 12800;
return v7 | 0x4C0000u;
case 87:
return 3679744;
case 88:
return 11370576;
case 89:
return 7689011;
case 90:
return 5651491;
case 91:
v4 = -7968;
return v4 | 0xE00000u;
case 92:
return 9176637;
case 93:
v6 = 2103;
return v6 | 0x600000u;
case 94:
return 4210752;
case 95:
return 10766703;
case 96:
v5 = 13908;
return v5 | 0x7F0000u;
case 97:
return 6498882;
case 98:
v3 = -18948;
goto LABEL_102;
case 99:
return 4289681327LL;
case 100:
return 8536962;
case 101:
return 6173022;
case 102:
return 8421504;
case 103:
return 4064102;
case 104:
return 3408199;
case 105:
return 3342290;
case 106:
v3 = -17034;
LABEL_102:
result = v3 | 0xFF0000u;
break;
default:
result = 0xFFFFFF;
break;
}
return result;
}