//
// sub_1000B8150 from 0x1000b8150 to 0x1000b8284 (308 bytes)
//
// 1 xrefs:
// > sub_10009E7C0 @ 0x10009e95c
//
// 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:58:42 +0000
//
__int64 __fastcall sub_1000B8150(__int64 a1, char *a2)
{
__int64 v3; // x19
__int64 v4; // x20
__int64 v5; // x21
__int64 v6; // x0
char *CString; // x0
__int64 v8; // x0
__int64 v9; // x0
__int64 v10; // x22
std::string v12; // [xsp+0h] [xbp-50h] BYREF
std::string __p; // [xsp+18h] [xbp-38h] BYREF
v3 = sub_1002E736C(a1);
if ( a2[23] < 0 )
a2 = *(char **)a2;
sub_100009900(&__p, a2);
v4 = sub_1000A72B8(&__p, "|");
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
if ( (unsigned int)sub_1002E757C(v4) )
{
v5 = 0;
while ( 1 )
{
v6 = sub_1002E75A0(v4, v5);
CString = (char *)cocos2d::CCString::getCString(v6);
sub_100009900(&__p, CString);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
{
if ( !__p.__r_.__value_.__l.__size_ )
goto LABEL_18;
sub_1000097D0(&v12, __p.__r_.__value_.__l.__data_, __p.__r_.__value_.__l.__size_);
}
else
{
if ( !*((_BYTE *)&__p.__r_.__value_.__s + 23) )
goto LABEL_19;
v12 = __p;
}
v8 = sub_1000A8FB4((char *)&v12, 0);
v9 = GJEditorSoundConfig::create(v8);
v10 = v9;
if ( SHIBYTE(v12.__r_.__value_.__r.__words[2]) < 0 )
break;
if ( v9 )
goto LABEL_16;
LABEL_17:
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
LABEL_18:
operator delete(__p.__r_.__value_.__l.__data_);
LABEL_19:
v5 = (unsigned int)(v5 + 1);
if ( (unsigned int)v5 >= (unsigned int)sub_1002E757C(v4) )
return v3;
}
operator delete(v12.__r_.__value_.__l.__data_);
if ( !v10 )
goto LABEL_17;
LABEL_16:
sub_1002E74E0(v3, v10);
goto LABEL_17;
}
return v3;
}