//
// cocos2d::CCFileUtils::setSearchResolutionsOrder from 0x1001d0720 to 0x1001d0888 (360 bytes)
//
// 2 xrefs:
// > ??> @ 0x1008ef878
// > ??> @ 0x100920340
//
// 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:22 +0000
//
void __fastcall cocos2d::CCFileUtils::setSearchResolutionsOrder(__int64 a1, __int128 **a2)
{
void ***v3; // x21
const void **v4; // x19
__int128 *v5; // x22
char v6; // w24
__int128 v7; // q0
std::string::size_type size; // x8
int v9; // w9
std::string *p_p; // x9
std::string __p; // [xsp+0h] [xbp-50h] BYREF
v3 = (void ***)(a1 + 96);
sub_100018980(a1 + 88, *(_QWORD **)(a1 + 96));
*v3 = nullptr;
v3[1] = nullptr;
v4 = (const void **)(v3 - 10);
*(v3 - 1) = (void **)v3;
sub_100018290(v3 - 10);
v5 = *a2;
if ( *a2 == a2[1] )
{
LABEL_25:
sub_100009900(&__p, "");
sub_10006D9F8(v4, (__int128 *)&__p);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
return;
}
v6 = 0;
do
{
if ( *((char *)v5 + 23) < 0 )
{
sub_1000097D0(&__p, *(void **)v5, *((_QWORD *)v5 + 1));
}
else
{
v7 = *v5;
__p.__r_.__value_.__r.__words[2] = *((_QWORD *)v5 + 2);
*(_OWORD *)&__p.__r_.__value_.__l.__data_ = v7;
}
size = HIBYTE(__p.__r_.__value_.__r.__words[2]);
if ( (v6 & 1) != 0 )
{
if ( (*((_BYTE *)&__p.__r_.__value_.__s + 23) & 0x80) != 0 )
{
size = __p.__r_.__value_.__l.__size_;
v9 = 1;
v6 = 1;
if ( !__p.__r_.__value_.__l.__size_ )
goto LABEL_21;
goto LABEL_15;
}
}
else if ( (*((_BYTE *)&__p.__r_.__value_.__s + 23) & 0x80) != 0 )
{
size = __p.__r_.__value_.__l.__size_;
v9 = 1;
if ( !__p.__r_.__value_.__l.__size_ )
{
LABEL_20:
v6 = 1;
goto LABEL_21;
}
v6 = 0;
goto LABEL_15;
}
if ( !*((_BYTE *)&__p.__r_.__value_.__s + 23) )
goto LABEL_20;
v9 = 0;
LABEL_15:
if ( v9 )
p_p = (std::string *)__p.__r_.__value_.__r.__words[0];
else
p_p = &__p;
if ( p_p->__r_.__value_.__s.__data_[size - 1] != 47 )
std::string::append(&__p, "/");
LABEL_21:
sub_100017C70((__int64)v4);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
v5 = (__int128 *)((char *)v5 + 24);
}
while ( v5 != a2[1] );
if ( (v6 & 1) == 0 )
goto LABEL_25;
}