//
// getItemVarName from 0xb7afc8 to 0xb7b138 (368 bytes)
//
// 6 xrefs:
// > SetupItemEditTriggerPopup::updateFormulaLabel @ 0xb7b3b4
// > SetupItemEditTriggerPopup::updateFormulaLabel @ 0xb7b3d8
// > SetupItemEditTriggerPopup::updateFormulaLabel @ 0xb7b3f0
// > SetupItemCompareTriggerPopup::updateFormulaLabel @ 0xb7bf1c
// > SetupItemCompareTriggerPopup::updateFormulaLabel @ 0xb7bf2c
// > ??> @ 0xca6d8
//
// 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 13:02:25 +0000
//
__int64 *__usercall getItemVarName@(int a1@, unsigned int a2@, __int64 *a3@)
{
char *v6; // x1
char *v7; // x1
size_t v8; // x2
unsigned __int64 v9[2]; // [xsp+30h] [xbp+30h] BYREF
void *v10; // [xsp+40h] [xbp+40h]
a3[1] = 0;
a3[2] = 0;
*a3 = 0;
switch ( a1 )
{
case 1:
case 2:
if ( a1 == 1 )
v6 = "I";
else
v6 = "T";
std::string::assign(a3, v6);
GameToolbox::intToString(v9, (GameToolbox *)a2);
if ( (v9[0] & 1) != 0 )
{
v7 = (char *)v10;
v8 = v9[1];
}
else
{
v8 = LOBYTE(v9[0]) >> 1;
v7 = (char *)v9 + 1;
}
std::string::append((__int64)a3, v7, v8);
if ( (v9[0] & 1) != 0 )
operator delete(v10);
break;
case 3:
std::string::assign(a3, "Points");
break;
case 4:
std::string::assign(a3, "MainTime");
break;
case 5:
std::string::assign(a3, "Attempts");
break;
default:
std::string::assign(a3, "NA");
break;
}
return a3;
}