//
// std::__ndk1::codecvt::do_length from 0x970b3c to 0x970bc8 (140 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:52 +0000
//
int __fastcall std::codecvt::do_length(int a1, int a2, int a3, int a4, unsigned int a5)
{
int v6; // r11
bool v7; // zf
int v9; // r4
unsigned int v10; // r8
int v11; // r6
unsigned int v12; // r5
v6 = a3;
v7 = a3 == a4;
v9 = 0;
if ( a3 != a4 )
v7 = a5 == 0;
if ( !v7 )
{
v9 = 0;
v10 = 1;
do
{
v11 = sub_992F18(*(_DWORD *)(a1 + 8));
v12 = sub_993394(v6, a4 - v6, a2);
if ( v11 )
sub_992F18(v11);
if ( v12 )
{
if ( v12 >= 0xFFFFFFFE )
return v9;
v6 += v12;
}
else
{
++v6;
v12 = 1;
}
v9 += v12;
if ( v6 == a4 )
break;
}
while ( v10++ < a5 );
}
return v9;
}