//
// sub_1001DA080 from 0x1001da080 to 0x1001da184 (260 bytes)
//
// 2 xrefs:
// > MusicDownloadManager::encodeDataTo @ 0x1001d9ef4
// > MusicDownloadManager::encodeDataTo @ 0x1001d9f24
//
// 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 11:00:27 +0000
//
std::string *__usercall sub_1001DA080@(std::string *result@, __int64 a2@)
{
std::string::size_type *p_size; // x20
std::string::size_type *v4; // x23
__int64 v5; // x8
std::string::size_type *v6; // x9
std::string::size_type *v7; // x8
bool v8; // zf
std::string::value_type __s[32]; // [xsp+18h] [xbp-58h] BYREF
*(_QWORD *)a2 = 0;
*(_QWORD *)(a2 + 8) = 0;
*(_QWORD *)(a2 + 16) = 0;
p_size = &result->__r_.__value_.__l.__size_;
v4 = (std::string::size_type *)result->__r_.__value_.__r.__words[0];
if ( (std::string::size_type *)result->__r_.__value_.__l.__data_ != &result->__r_.__value_.__r.__words[1] )
{
do
{
sprintf(__s, "%i:%i", *((_DWORD *)v4 + 7), *((_DWORD *)v4 + 8));
v5 = *(unsigned __int8 *)(a2 + 23);
if ( (v5 & 0x80u) != 0LL )
v5 = *(_QWORD *)(a2 + 8);
if ( v5 )
std::string::append((std::string *)a2, ",");
result = std::string::append((std::string *)a2, __s);
v6 = (std::string::size_type *)v4[1];
if ( v6 )
{
do
{
v7 = v6;
v6 = (std::string::size_type *)*v6;
}
while ( v6 );
}
else
{
do
{
v7 = (std::string::size_type *)v4[2];
v8 = *v7 == (_QWORD)v4;
v4 = v7;
}
while ( !v8 );
}
v4 = v7;
}
while ( v7 != p_size );
}
return result;
}