//
// ConvertUTF16toUTF32 from 0x7f4a34 to 0x7f4aa6 (114 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:01:07 +0000
//
int __fastcall ConvertUTF16toUTF32(unsigned __int16 **a1, unsigned int a2, int **a3, unsigned int a4, int a5)
{
unsigned __int16 *v5; // r4
int *i; // r5
int v7; // r6
unsigned __int16 *v8; // lr
int v9; // r7
int v10; // r3
v5 = *a1;
for ( i = *a3; ; ++i )
{
if ( (unsigned int)v5 >= a2 )
{
v10 = 0;
goto LABEL_17;
}
v7 = *v5;
v8 = v5 + 1;
if ( (unsigned int)(v7 - 55296) >= 0x400 )
{
if ( !a5 && (unsigned int)(v7 - 56320) < 0x400 )
{
LABEL_15:
v10 = 3;
goto LABEL_17;
}
}
else
{
if ( (unsigned int)v8 >= a2 )
{
v10 = 1;
goto LABEL_17;
}
v9 = v5[1];
if ( (unsigned int)(v9 - 56320) >= 0x400 )
{
if ( !a5 )
goto LABEL_15;
}
else
{
v8 = v5 + 2;
v7 = v9 + 9216 + ((v7 - 55296) << 10);
}
}
if ( (unsigned int)i >= a4 )
break;
*i = v7;
v5 = v8;
}
v10 = 2;
LABEL_17:
*a1 = v5;
*a3 = i;
return v10;
}