//
// tinyxml2::StrPair::CollapseWhitespace from 0x180098b70 to 0x180098c1f (175 bytes)
//
// 5 xrefs:
// > tinyxml2::StrPair::GetStr @ 0x180099602
// > ??> @ 0x18013e814
// > ??> @ 0x18013e824
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b6cf0
//
// 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
//
void __fastcall tinyxml2::StrPair::CollapseWhitespace(tinyxml2::StrPair *this)
{
char *v1; // rdi
char i; // al
unsigned __int8 v4; // al
bool v5; // sf
char *v6; // rsi
char v7; // al
char *j; // rbx
char v9; // al
v1 = *((char **)this + 1);
for ( i = *v1; i >= 0; i = *++v1 )
{
if ( !isspace((unsigned __int8)i) )
break;
}
*((_QWORD *)this + 1) = v1;
v4 = *v1;
v5 = *v1 < 0;
if ( *v1 )
{
v6 = v1;
while ( 1 )
{
if ( !v5 && isspace(v4) )
{
v7 = *v1;
for ( j = v1; v7 >= 0; v7 = *++j )
{
if ( !isspace((unsigned __int8)v7) )
break;
}
v1 = j;
if ( !*j )
{
LABEL_14:
*v6 = 0;
return;
}
*v6++ = 32;
}
v9 = *v1++;
*v6++ = v9;
v4 = *v1;
v5 = *v1 < 0;
if ( !*v1 )
goto LABEL_14;
}
}
}