//
// SongInfoObject::addTags from 0x100159300 to 0x100159424 (292 bytes)
//
// 1 xrefs:
// > MusicDownloadManager::parseMusicLibrary @ 0x10015899c
//
// 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
//
void __fastcall SongInfoObject::addTags(__int64 a1, __int64 a2)
{
bool v4; // w0
bool v5; // w21
_BYTE *v6; // x22
char *v7; // x24
__int64 v8; // x20
unsigned __int64 v9; // x21
const char *v10; // x0
void *__p; // [xsp+0h] [xbp-50h] BYREF
_BYTE *v12; // [xsp+8h] [xbp-48h]
__int64 v13; // [xsp+10h] [xbp-40h]
void **p_p; // [xsp+18h] [xbp-38h] BYREF
if ( (*(char *)(a2 + 23) & 0x8000000000000000LL) != 0 )
{
if ( !*(_QWORD *)(a2 + 8) )
return;
}
else if ( !*(_BYTE *)(a2 + 23) )
{
return;
}
sub_100009900(&__p, ".");
v4 = sub_1000045BC((_QWORD *)a2, &__p);
v5 = v4;
if ( SHIBYTE(v13) < 0 )
{
operator delete(__p);
if ( v5 )
return;
}
else if ( v4 )
{
return;
}
__p = nullptr;
v12 = nullptr;
v13 = 0;
sub_100155A98((std::string *)a2, ".", (__int64)&__p);
v7 = (char *)__p;
v6 = v12;
if ( v12 != __p )
{
v8 = 0;
v9 = 0;
do
{
v10 = &v7[v8];
if ( v7[v8 + 23] < 0 )
v10 = *(const char **)v10;
LODWORD(p_p) = atoi(v10);
if ( (int)p_p >= 1 )
{
sub_1000B4D20(a1 + 600, (int *)&p_p, &p_p);
v7 = (char *)__p;
v6 = v12;
}
++v9;
v8 += 24;
}
while ( 0xAAAAAAAAAAAAAAABLL * ((v6 - v7) >> 3) > v9 );
}
p_p = &__p;
sub_1000177FC(&p_p);
}