//
// sub_1001987F0 from 0x1001987f0 to 0x100198bdc (1004 bytes)
//
// 1 xrefs:
// > processFMODAudioState @ 0x10019eea8
//
// 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 10:59:57 +0000
//
void __fastcall sub_1001987F0(std::string *a1, __int64 a2)
{
signed int v4; // w8
const char *v5; // x0
int v6; // w20
int i; // w24
signed int v8; // w8
const char *v9; // x0
std::string *v10; // x0
std::string *v11; // x22
signed int v12; // w8
__int64 v13; // x0
signed int v14; // w8
const char *v15; // x0
int v16; // w0
float *v17; // x23
__int64 v18; // x27
unsigned __int64 *v19; // x23
__int64 v20; // x27
signed int v21; // w8
const char *v22; // x0
int data; // w0
int v24; // [xsp+4h] [xbp-CCh] BYREF
__int64 v25; // [xsp+8h] [xbp-C8h] BYREF
__int64 v26; // [xsp+10h] [xbp-C0h]
signed int v27; // [xsp+20h] [xbp-B0h]
std::string __p; // [xsp+30h] [xbp-A0h] BYREF
char v29; // [xsp+4Fh] [xbp-81h] BYREF
__int128 v30; // [xsp+50h] [xbp-80h] BYREF
std::string::size_type v31; // [xsp+60h] [xbp-70h]
std::string v32; // [xsp+68h] [xbp-68h] BYREF
memset(&__p, 0, sizeof(__p));
sub_100194F54(a1, &__p);
sub_100194880((__int64)&v25, &__p, ":", a1[1].__r_.__value_.__l.__size_);
v4 = v27;
if ( v27 >= (int)(-1431655765 * ((unsigned __int64)(v26 - v25) >> 3)) )
{
sub_1001A3160(a2);
}
else
{
++v27;
v5 = (const char *)(v25 + 24LL * v4);
if ( v5[23] < 0 )
v5 = *(const char **)v5;
v6 = atoi(v5);
sub_1001A3160(a2);
if ( v6 >= 1 )
{
for ( i = 0; i != v6; ++i )
{
v24 = 0;
v8 = v27;
if ( v27 < (int)(-1431655765 * ((unsigned __int64)(v26 - v25) >> 3)) )
{
++v27;
v9 = (const char *)(v25 + 24LL * v8);
if ( v9[23] < 0 )
v9 = *(const char **)v9;
v24 = atoi(v9);
}
*(_QWORD *)&v30 = &v24;
v10 = (std::string *)sub_1001A34C8(a2, &v24, &unk_10075EF86, &v30, &v29);
v11 = v10;
memset(&v32, 0, sizeof(v32));
v12 = v27;
if ( v27 < (int)(-1431655765 * ((unsigned __int64)(v26 - v25) >> 3)) )
{
++v27;
v10 = std::string::operator=(&v32, (const std::string *)(v25 + 24LL * v12));
}
v13 = cocos2d::CCFileUtils::sharedFileUtils(v10);
(*(void (__fastcall **)(__int128 *__return_ptr))(*(_QWORD *)v13 + 48LL))(&v30);
if ( SHIBYTE(v11[1].__r_.__value_.__r.__words[2]) < 0 )
operator delete(v11[1].__r_.__value_.__l.__data_);
*(_OWORD *)&v11[1].__r_.__value_.__l.__data_ = v30;
v11[1].__r_.__value_.__r.__words[2] = v31;
if ( SHIBYTE(v32.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v32.__r_.__value_.__l.__data_);
sub_100194A74(&v25, (float *)&v11[2]);
sub_100194A74(&v25, (float *)v11[2].__r_.__value_.__r.__words + 1);
sub_100194A74(&v25, (float *)&v11[2].__r_.__value_.__r.__words[1]);
sub_100194BA8(&v25, (bool *)&v11[2].__r_.__value_.__s.__data_[12]);
sub_100194B44((__int64)&v25, &v11[2].__r_.__value_.__r.__words[2]);
v14 = v27;
if ( v27 >= (int)(-1431655765 * ((unsigned __int64)(v26 - v25) >> 3)) )
{
v16 = 0;
}
else
{
++v27;
v15 = (const char *)(v25 + 24LL * v14);
if ( v15[23] < 0 )
v15 = *(const char **)v15;
v16 = atoi(v15);
}
LODWORD(v11[3].__r_.__value_.__l.__data_) = v16;
v17 = (float *)v11[3].__r_.__value_.__r.__words + 1;
v18 = 4;
do
{
sub_100194A74(&v25, v17++);
--v18;
}
while ( v18 );
v19 = (unsigned __int64 *)&v11[4];
v20 = 4;
do
{
sub_100194C1C(&v25, v19++);
--v20;
}
while ( v20 );
sub_100194C1C(&v25, &v11[5].__r_.__value_.__l.__size_);
LODWORD(v32.__r_.__value_.__l.__data_) = 0;
sub_100194B44((__int64)&v25, &v32);
LODWORD(v11[5].__r_.__value_.__r.__words[2]) = v32.__r_.__value_.__l.__data_;
LODWORD(v32.__r_.__value_.__l.__data_) = 0;
sub_100194B44((__int64)&v25, &v32);
HIDWORD(v11[5].__r_.__value_.__r.__words[2]) = v32.__r_.__value_.__l.__data_;
LODWORD(v32.__r_.__value_.__l.__data_) = 0;
sub_100194B44((__int64)&v25, &v32);
LODWORD(v11[6].__r_.__value_.__l.__data_) = v32.__r_.__value_.__l.__data_;
sub_100194C1C(&v25, &v11[6].__r_.__value_.__l.__size_);
sub_100194C1C(&v25, &v11[6].__r_.__value_.__r.__words[2]);
v21 = v27;
if ( v27 >= (int)(-1431655765 * ((unsigned __int64)(v26 - v25) >> 3)) )
{
data = (int)v11[7].__r_.__value_.__l.__data_;
}
else
{
++v27;
v22 = (const char *)(v25 + 24LL * v21);
if ( v22[23] < 0 )
v22 = *(const char **)v22;
data = atoi(v22);
}
LODWORD(v11[7].__r_.__value_.__l.__data_) = data;
sub_100194B44((__int64)&v25, &v11[7].__r_.__value_.__r.__words[1]);
sub_100194B44((__int64)&v25, (_DWORD *)&v11[7].__r_.__value_.__r.__words[1] + 1);
sub_100194A74(&v25, (float *)&v11[7].__r_.__value_.__r.__words[2]);
sub_100194BA8(&v25, (bool *)&v11[7].__r_.__value_.__s.__data_[20]);
sub_100194BA8(&v25, (bool *)&v11[7].__r_.__value_.__s.__data_[21]);
sub_100194B44((__int64)&v25, &v11[8]);
sub_100194BA8(&v25, (bool *)&v11[8].__r_.__value_.__s.__data_[4]);
sub_100194B44((__int64)&v25, &v11[8].__r_.__value_.__r.__words[1]);
sub_100194BA8(&v25, (bool *)&v11[8].__r_.__value_.__s.__data_[12]);
}
}
}
v32.__r_.__value_.__r.__words[0] = (std::string::size_type)&v25;
sub_100018250((void ***)&v32);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
}