//
// sub_1001589D0 from 0x1001589d0 to 0x100158a7a (170 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: pc, 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 12:25:05 +0000
//
__int64 __fastcall sub_1001589D0(const char *a1)
{
int v1; // eax
__int64 v2; // rsi
__int64 v3; // rax
__int64 v4; // rdx
unsigned int v5; // ecx
__int64 v6; // rax
__int64 v8; // rsi
__int64 v9; // r8
__int64 v10; // r8
v1 = strlen(a1);
if ( v1 <= 0 )
{
return 0;
}
else
{
v2 = v1 & 0x7FFFFFFF;
v3 = v1 & 1;
if ( v2 == 1 )
{
v4 = 0;
v5 = 0;
}
else
{
v8 = v2 - v3;
v4 = 0;
v5 = 0;
do
{
v9 = a1[v4];
if ( v9 >= 0 && (_DefaultRuneLocale.__runetype[v9] & 0x400) != 0 )
++v5;
v10 = a1[v4 + 1];
if ( v10 >= 0 && (_DefaultRuneLocale.__runetype[v10] & 0x400) != 0 )
++v5;
v4 += 2;
}
while ( v8 != v4 );
}
if ( v3 )
{
v6 = a1[v4];
if ( v6 >= 0 && (_DefaultRuneLocale.__runetype[v6] & 0x400) != 0 )
++v5;
}
}
return v5;
}