//
// std::__ndk1::__codecvt_utf16::do_out from 0x97243c to 0x972496 (90 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:54 +0000
//
int __fastcall std::__codecvt_utf16::do_out(
int a1,
int a2,
unsigned __int16 *a3,
unsigned int a4,
_DWORD *a5,
_WORD *a6,
int a7,
_DWORD *a8)
{
_WORD *v8; // r1
unsigned int v9; // r5
unsigned int v10; // r6
int result; // r0
v8 = a6;
v9 = *(_DWORD *)(a1 + 8);
if ( (*(_BYTE *)(a1 + 12) & 2) != 0 )
{
if ( a7 - (int)a6 >= 2 )
{
*a6 = -257;
v8 = a6 + 1;
goto LABEL_5;
}
LABEL_9:
result = 1;
}
else
{
LABEL_5:
while ( (unsigned int)a3 < a4 )
{
v10 = *a3;
result = 2;
if ( v10 > v9 || (v10 & 0xF800) == 0xD800 )
goto LABEL_11;
if ( a7 - (int)v8 < 2 )
goto LABEL_9;
*v8 = v10;
++a3;
++v8;
}
result = 0;
}
LABEL_11:
*a5 = a3;
*a8 = v8;
return result;
}