//
// sub_100153354 from 0x100153354 to 0x10015342c (216 bytes)
//
// 2 xrefs:
// > MusicDownloadManager::getAllMusicTags @ 0x1001595bc
// > MusicDownloadManager::getAllMusicArtists @ 0x1001596c8
//
// 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 sub_100153354(__int64 a1, __int64 *a2)
{
__int64 v2; // x19
__int64 v3; // x25
void *v4; // x19
unsigned __int8 v5; // w23
size_t v6; // x21
void **v7; // x0
size_t v8; // x22
_QWORD *v9; // x1
size_t v10; // x2
unsigned int v11; // w20
unsigned int v12; // w8
_QWORD v14[2]; // [xsp+0h] [xbp-70h] BYREF
char v15; // [xsp+17h] [xbp-59h]
void *__p[2]; // [xsp+18h] [xbp-58h] BYREF
unsigned __int8 v17; // [xsp+2Fh] [xbp-41h]
v2 = *a2;
sub_100153024((void *)(*(_QWORD *)a1 + 64LL), (unsigned __int8 *)__p);
sub_100153024((void *)(v2 + 64), (unsigned __int8 *)v14);
v3 = v15;
v4 = (void *)v14[0];
v5 = v17;
if ( (v17 & 0x80u) == 0 )
v6 = v17;
else
v6 = (size_t)__p[1];
if ( (v17 & 0x80u) == 0 )
v7 = __p;
else
v7 = (void **)__p[0];
if ( v15 >= 0 )
v8 = v15;
else
v8 = v14[1];
if ( v15 >= 0 )
v9 = v14;
else
v9 = (_QWORD *)v14[0];
if ( v8 >= v6 )
v10 = v6;
else
v10 = v8;
v11 = memcmp(v7, v9, v10);
if ( v3 < 0 )
{
operator delete(v4);
if ( (v17 & 0x80) == 0 )
goto LABEL_18;
}
else if ( (v5 & 0x80) == 0 )
{
goto LABEL_18;
}
operator delete(__p[0]);
LABEL_18:
v12 = v8 < v6;
if ( v6 < v8 )
v12 = -1;
if ( v11 )
return v11;
else
return v12;
}