//
// std::__ndk1::collate_byname::collate_byname from 0x96f5e4 to 0x96f69c (184 bytes)
//
// 2 xrefs:
// > sub_96D650 @ 0x96d6f6
// > sub_96DDD0 @ 0x96de84
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:05:51 +0000
//
// Alternative name is '_ZNSt6__ndk114collate_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj'
_DWORD *__fastcall std::collate_byname::collate_byname(_DWORD *a1, int a2, int a3)
{
unsigned __int8 v5; // r0
char *v6; // r1
int v7; // r0
void *exception; // r5
int v10[3]; // [sp+0h] [bp-1Ch] BYREF
*a1 = &off_D13EEC;
a1[1] = a3 - 1;
v5 = *(_BYTE *)a2;
v6 = *(char **)(a2 + 8);
if ( (v5 & 1) == 0 )
v6 = (char *)(a2 + 1);
v7 = sub_992EBC(8127, v6);
a1[2] = v7;
if ( !v7 )
{
exception = _cxa_allocate_exception(8u);
std::operator+(
v10,
"collate_byname::collate_byname(size_t refs) failed to construct for ",
(unsigned __int8 *)a2);
std::runtime_error::runtime_error(exception, v10);
_cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))std::runtime_error::~runtime_error);
}
return a1;
}