//
// sub_1004C9710 from 0x1004c9710 to 0x1004c97ac (156 bytes)
//
// 10 xrefs:
// > EditorSFXManager::deserializeAll @ 0x1004c7960
// > EditorSFXManager::deserializeAll @ 0x1004c7990
// > EditorSFXManager::deserializeAll @ 0x1004c7c3c
// > EditorSFXManager::decodeSound @ 0x1004c9378
// > EditorSFXManager::decodeSound @ 0x1004c93a8
// > sub_1004C9C38 @ 0x1004c9e8c
// > sub_1004C9C38 @ 0x1004c9ebc
// > sub_1004C9C38 @ 0x1004c9fd0
// > sub_1004C9C38 @ 0x1004ca014
// > sub_1004C9C38 @ 0x1004ca044
//
// 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:06:24 +0000
//
bool __fastcall sub_1004C9710(__int64 a1, std::string::size_type *a2, std::string *a3, std::string::value_type __c)
{
std::string::size_type v4; // x19
std::string::size_type v5; // x24
std::string::size_type v9; // x23
v4 = *a2;
if ( *(char *)(a1 + 23) >= 0 )
v5 = *(unsigned __int8 *)(a1 + 23);
else
v5 = *(_QWORD *)(a1 + 8);
if ( v4 <= v5 )
{
v9 = std::string::find((const std::string *)a1, __c, v4);
if ( v9 == -1 )
{
v9 = *(char *)(a1 + 23);
if ( (v9 & 0x8000000000000000LL) != 0 )
v9 = *(_QWORD *)(a1 + 8);
}
std::string::assign(a3, (const std::string *)a1, *a2, v9 - *a2);
*a2 = v9 + 1;
}
return v4 <= v5;
}