//
// alphaNumericallyLessThan from 0xb41a1c to 0xb41b2c (272 bytes)
//
// 12 xrefs:
// > DS_Dictionary::getIndexOfKeyWithClosestAlphaNumericalMatch @ 0xb430b4
// > DS_Dictionary::setBoolForKey @ 0xb43b7c
// > DS_Dictionary::setStringForKey @ 0xb43db4
// > DS_Dictionary::setVec2ForKey @ 0xb44054
// > DS_Dictionary::setRectForKey @ 0xb4474c
// > DS_Dictionary::setStringArrayForKey @ 0xb44d98
// > DS_Dictionary::setVec2ArrayForKey @ 0xb44ebc
// > DS_Dictionary::setRectArrayForKey @ 0xb4568c
// > DS_Dictionary::setSubDictForKey @ 0xb46258
// > DS_Dictionary::setFloatForKey @ 0xb48374
// > DS_Dictionary::setIntegerForKey @ 0xb4a274
// > ??> @ 0x3efb8
//
// 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
//
__int64 __fastcall alphaNumericallyLessThan(const char *a1, const char *a2)
{
const char *v3; // x20
int v4; // w21
int v5; // w0
int v6; // w4
int v7; // w1
int v8; // t1
int v9; // w2
int v10; // t1
v3 = a1;
v4 = ndigits(a1);
v5 = ndigits(a2);
if ( !(v5 | v4) )
return strcasecmp(v3, a2);
if ( !v4 )
return 1;
if ( !v5 )
return 0xFFFFFFFFLL;
if ( v5 <= 0 || (v6 = 0, v4 <= 0) )
{
v6 = 0;
LABEL_13:
if ( v4 <= v6 )
{
if ( v5 <= v6 )
return strcasecmp(v3, a2);
return 0xFFFFFFFFLL;
}
return 1;
}
while ( 1 )
{
v7 = *(unsigned __int8 *)v3;
if ( (unsigned int)(v7 - 48) > 9 )
{
do
{
v8 = *(unsigned __int8 *)++v3;
v7 = v8;
}
while ( (unsigned int)(v8 - 48) > 9 );
}
v9 = *(unsigned __int8 *)a2;
if ( (unsigned int)(v9 - 48) > 9 )
{
do
{
v10 = *(unsigned __int8 *)++a2;
v9 = v10;
}
while ( (unsigned int)(v10 - 48) > 9 );
}
if ( v7 != v9 )
return (unsigned int)(v7 - v9);
++v6;
++v3;
++a2;
if ( v5 <= v6 || v4 <= v6 )
goto LABEL_13;
}
}