//
// FriendsProfilePage::sortUsers from 0x140214b20 to 0x140214b98 (120 bytes)
//
// 4 xrefs:
// > FriendsProfilePage::onToggleSort @ 0x140214c0c
// > FriendsProfilePage::onToggleSortDir @ 0x140214d10
// > FriendsProfilePage::getUserListFinished @ 0x140214e1a
// > ??> @ 0x14091b65c
//
// This function is hookable on this platform (idp: pc, 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:28:20 +0000
//
void __fastcall FriendsProfilePage::sortUsers(__int64 a1)
{
cocos2d::CCArray *v2; // rcx
int (__cdecl *v3)(const void *, const void *); // r9
v2 = *(cocos2d::CCArray **)(a1 + 856);
if ( v2 && cocos2d::CCArray::count(v2) >= 2 )
{
v3 = (int (__cdecl *)(const void *, const void *))sub_1402130E0;
if ( *(_BYTE *)(a1 + 952) )
v3 = (int (__cdecl *)(const void *, const void *))sub_140213180;
qsort(
*(void **)(*(_QWORD *)(*(_QWORD *)(a1 + 856) + 56LL) + 16LL),
**(unsigned int **)(*(_QWORD *)(a1 + 856) + 56LL),
8u,
v3);
if ( *(_BYTE *)(a1 + 976) )
cocos2d::CCArray::reverseObjects(*(cocos2d::CCArray **)(a1 + 856));
}
}