//
// GJSmartTemplate::getVerySimplifiedKey from 0xb0d25c to 0xb0d35c (256 bytes)
//
// 7 xrefs:
// > GJSmartTemplate::saveRemap @ 0xb0f334
// > GJSmartTemplate::saveRemap @ 0xb0f48c
// > GJSmartTemplate::getPrefab @ 0xb10d7c
// > GJSmartTemplate::getPrefab @ 0xb10ebc
// > GJSmartTemplate::getPrefab @ 0xb10fc0
// > GJSmartTemplate::getPrefab @ 0xb11070
// > ??> @ 0x784f0
//
// 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:01:26 +0000
//
__int64 *__usercall GJSmartTemplate::getVerySimplifiedKey@(__int64 a1@, __int64 *a2@)
{
unsigned __int8 v2; // w2
__int64 v3; // x1
unsigned __int8 *v4; // x1
int v5; // w7
_BYTE *v6; // x4
unsigned __int64 v7; // x3
__int64 v8; // x3
v2 = *(_BYTE *)a1;
v3 = *(_BYTE *)a1 >> 1;
if ( (*(_BYTE *)a1 & 1) != 0 )
v3 = *(_QWORD *)(a1 + 8);
if ( !v3 )
goto LABEL_16;
v4 = (unsigned __int8 *)(a1 + 2);
v5 = 0;
while ( 1 )
{
v7 = (unsigned __int64)&v4[~a1];
if ( (v2 & 1) != 0 )
{
if ( *(_QWORD *)(a1 + 8) <= v7 )
goto LABEL_17;
v6 = (_BYTE *)(*(_QWORD *)(a1 + 16) + v7);
if ( (unsigned int)(unsigned __int8)*v6 - 48 > 1 )
goto LABEL_7;
}
else
{
if ( v2 >> 1 <= v7 )
LABEL_17:
sub_B0BD50();
if ( (unsigned int)*v4 - 48 > 1 )
{
v6 = v4;
LABEL_7:
*v6 = 49;
v5 = 1;
}
}
if ( ++v4 == (unsigned __int8 *)(a1 + 10) )
break;
v2 = *(_BYTE *)a1;
}
if ( v5 )
{
v8 = *(_QWORD *)(a1 + 8);
*a2 = *(_QWORD *)a1;
a2[1] = v8;
a2[2] = *(_QWORD *)(a1 + 16);
*(_QWORD *)a1 = 0;
*(_QWORD *)(a1 + 8) = 0;
*(_QWORD *)(a1 + 16) = 0;
return a2;
}
LABEL_16:
*a2 = 0;
a2[1] = 0;
a2[2] = 0;
std::string::__init(a2, &byte_11B8890, 0);
return a2;
}