//
// std::__ndk1::locale::global from 0x96eedc to 0x96efb8 (220 bytes)
//
// 0 xrefs:
//
// 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
//
int __fastcall std::locale::global(std::locale *this, std::__shared_count **a2)
{
std::__shared_count **v4; // r5
std::__shared_count *v5; // r8
std::__shared_count *v6; // r0
int v7; // r0
int v8; // r6
int *v9; // r0
const char *v10; // r1
int v12[3]; // [sp+4h] [bp-28h] BYREF
int v13[4]; // [sp+10h] [bp-1Ch] BYREF
v4 = (std::__shared_count **)std::locale::__global(_stack_chk_guard);
v5 = *v4;
*(_DWORD *)this = *v4;
std::__shared_count::__add_shared(v5);
std::__shared_count::__add_shared(*a2);
std::__shared_count::__release_shared(*v4);
v6 = *a2;
*v4 = *a2;
std::string::basic_string(v13, (int)v6 + 144);
v7 = v13[1];
if ( (v13[0] & 1) == 0 )
v7 = LOBYTE(v13[0]) >> 1;
if ( v7 == 1 )
{
v8 = std::string::compare((unsigned __int8 *)v13, 0, 0xFFFFFFFF, "*", 1u);
std::string::~string((int)v13);
if ( !v8 )
return _stack_chk_guard - v13[3];
}
else
{
std::string::~string((int)v13);
}
v9 = std::string::basic_string(v12, (int)*v4 + 144);
v10 = (const char *)v12[2];
if ( (v12[0] & 1) == 0 )
v10 = (const char *)((unsigned int)v9 | 1);
setlocale(6, v10);
std::string::~string((int)v12);
return _stack_chk_guard - v13[3];
}