//
// tinyxml2::StrPair::CollapseWhitespace from 0x5ed614 to 0x5ed65c (72 bytes)
//
// 1 xrefs:
// > tinyxml2::StrPair::GetStr @ 0x5ed92e
//
// 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
//
int __fastcall tinyxml2::StrPair::CollapseWhitespace(tinyxml2::XMLUtil **this, char *a2)
{
int result; // r0
_BYTE *v4; // r4
tinyxml2::XMLUtil *i; // r5
char *v6; // r1
char v7; // t1
result = (int)tinyxml2::XMLUtil::SkipWhiteSpace(*(this + 1), a2);
v4 = (_BYTE *)result;
*(this + 1) = (tinyxml2::XMLUtil *)result;
if ( result && *(_BYTE *)result )
{
for ( i = (tinyxml2::XMLUtil *)result; ; i = (tinyxml2::XMLUtil *)((char *)i + 1) )
{
result = *(unsigned __int8 *)i;
if ( !*(_BYTE *)i )
break;
if ( (result & 0x80) == 0 && isspace(result) )
{
result = (int)tinyxml2::XMLUtil::SkipWhiteSpace(i, v6);
i = (tinyxml2::XMLUtil *)result;
if ( !*(_BYTE *)result )
break;
*v4++ = 32;
}
v7 = *(_BYTE *)i;
*v4++ = v7;
}
*v4 = 0;
}
return result;
}