//
// getItemVarName from 0x6b7ebc to 0x6b7f78 (188 bytes)
//
// 5 xrefs:
// > SetupItemEditTriggerPopup::updateFormulaLabel @ 0x6b8146
// > SetupItemEditTriggerPopup::updateFormulaLabel @ 0x6b8154
// > SetupItemEditTriggerPopup::updateFormulaLabel @ 0x6b815e
// > SetupItemCompareTriggerPopup::updateFormulaLabel @ 0x6b8976
// > SetupItemCompareTriggerPopup::updateFormulaLabel @ 0x6b8980
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:56:43 +0000
//
int *__fastcall getItemVarName(int *a1, int a2, int a3)
{
int v5; // r3
char *v7; // r1
char *v8; // r1
size_t v9; // r2
int *v10; // r0
char *v11; // r1
unsigned __int8 v13; // [sp+0h] [bp-14h] BYREF
char v14; // [sp+1h] [bp-13h] BYREF
size_t v15; // [sp+4h] [bp-10h]
char *v16; // [sp+8h] [bp-Ch]
int v17; // [sp+Ch] [bp-8h]
a1[1] = 0;
v5 = _stack_chk_guard;
*a1 = 0;
a1[2] = 0;
v17 = v5;
std::string::__init(a1, &unk_B6B226, 0);
switch ( a2 )
{
case 1:
case 2:
if ( a2 == 1 )
v7 = "I";
else
v7 = "T";
std::string::assign(a1, v7);
GameToolbox::intToString((GameToolbox *)&v13, a3);
if ( (v13 & 1) != 0 )
{
v8 = v16;
v9 = v15;
}
else
{
v9 = (int)v13 >> 1;
v8 = &v14;
}
std::string::append(a1, v8, v9);
std::string::~string((int)&v13);
return a1;
case 3:
v10 = a1;
v11 = "Points";
goto LABEL_12;
case 4:
v10 = a1;
v11 = "MainTime";
goto LABEL_12;
case 5:
v10 = a1;
v11 = "Attempts";
goto LABEL_12;
default:
v10 = a1;
v11 = "NA";
LABEL_12:
std::string::assign(v10, v11);
return a1;
}
}