//
// std::__ndk1::codecvt::do_encoding from 0xf70f18 to 0xf70fec (212 bytes)
//
// 3 xrefs:
// > ??> @ 0xc1618
// > ??> @ 0x1534038
// > ??> @ 0x1534360
//
// 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:39 +0000
//
__int64 __fastcall std::codecvt::do_encoding(__int64 a1)
{
__int64 v2; // x20
int v3; // w21
__int64 v5; // x20
size_t mb_cur_max; // x19
v2 = uselocale();
v3 = mbtowc(nullptr, nullptr, 4u);
if ( v2 )
uselocale();
if ( v3 )
return 0xFFFFFFFFLL;
if ( !*(_QWORD *)(a1 + 16) )
return 1;
v5 = uselocale();
mb_cur_max = __ctype_get_mb_cur_max();
if ( v5 )
uselocale();
return mb_cur_max == 1;
}