//
// std::__ndk1::locale::locale from 0xf6d994 to 0xf6dac0 (300 bytes)
//
// 2 xrefs:
// > ??> @ 0xd2b68
// > ??> @ 0xf3550
//
// 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 13:13:37 +0000
//
// Alternative name is '_ZNSt6__ndk16localeC1ERKS0_PKci'
__int64 __fastcall std::locale::locale(std::locale *this, const std::locale *a2, char *a3, char a4)
{
__int64 v8; // x0
__int64 v9; // x23
std::__shared_count *v10; // x19
size_t v11; // x0
__int64 result; // x0
std::runtime_error *exception; // x19
__int64 v14[4]; // [xsp+0h] [xbp-50h] BYREF
v14[3] = *(_QWORD *)(_ReadStatusReg(TPIDR_EL0) + 40);
if ( !a3 )
{
exception = (std::runtime_error *)_cxa_allocate_exception(0x10u);
std::runtime_error::runtime_error(exception, "locale constructed with null");
_cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))std::overflow_error::~overflow_error);
}
v8 = operator new(0x140u);
v9 = *(_QWORD *)a2;
v10 = (std::__shared_count *)v8;
memset(v14, 0, 24);
v11 = strlen(a3);
std::string::__init(v14, a3, v11);
sub_F6B1B0((__int64)v10, v9, (__int64)v14, a4);
std::string::~string((__int64)v14);
*(_QWORD *)this = v10;
result = std::__shared_count::__add_shared(v10);
_ReadStatusReg(TPIDR_EL0);
return result;
}