//
// cocos2d::cc_utf16_vec_from_utf16_str from 0x180095030 to 0x1800950c5 (149 bytes)
//
// 3 xrefs:
// > cocos2d::CCLabelBMFont::updateLabel @ 0x18004cd16
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b67a4
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall cocos2d::cc_utf16_vec_from_utf16_str(__int64 a1, _WORD *a2)
{
_WORD *v2; // rdi
_WORD *v4; // rax
int i; // ecx
__int64 v6; // rsi
_BYTE *v7; // rdx
v2 = a2;
v4 = a2;
for ( i = 0; *v4; ++i )
++v4;
*(_QWORD *)a1 = 0;
*(_QWORD *)(a1 + 8) = 0;
*(_QWORD *)(a1 + 16) = 0;
v6 = i;
if ( i > 0 )
{
do
{
v7 = *(_BYTE **)(a1 + 8);
if ( v7 == *(_BYTE **)(a1 + 16) )
{
sub_180046AC0((const void **)a1, v7, v2);
}
else
{
*(_WORD *)v7 = *v2;
*(_QWORD *)(a1 + 8) += 2LL;
}
++v2;
--v6;
}
while ( v6 );
}
return a1;
}