//
// sub_100726C20 from 0x100726c20 to 0x100726d2a (266 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b99d08
//
// 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:36:17 +0000
//
unsigned __int64 __fastcall sub_100726C20(_BYTE *a1)
{
__int64 v1; // r14
char *v2; // rsi
__int64 v3; // r15
_BYTE *v4; // r12
__int64 v5; // r13
__int64 v6; // rax
unsigned __int64 v7; // rbx
char *v8; // rax
v1 = -1;
v2 = nullptr;
v3 = 0;
while ( 1 )
{
while ( 1 )
{
v4 = a1;
v5 = 0;
do
v6 = (unsigned __int8)a1[v5++];
while ( (a7_0[v6] & 1) == 0 );
a1 += v5;
if ( (_DWORD)v6 != 13 )
break;
*(a1 - 1) = 10;
if ( *a1 == 10 )
{
if ( v2 )
{
if ( &v4[v5] < v2 )
sub_1009A8B70(a1);
memmove(&v2[-v3], v2, v5 + v4 - v2);
}
a1 = &v4[v5 + 1];
++v3;
--v1;
v2 = a1;
}
}
if ( !(_DWORD)v6 )
break;
if ( (_DWORD)v6 == 60 )
{
v7 = (unsigned __int64)&v4[v5];
v8 = &v4[v5 - 1];
if ( !v2 )
goto LABEL_20;
if ( v2 > v8 )
sub_1009A8BA0(a1);
goto LABEL_18;
}
}
v7 = (unsigned __int64)&v4[v5 - 1];
if ( v2 )
{
if ( (unsigned __int64)v2 > v7 )
sub_1009A8B40(a1);
LABEL_18:
memmove(&v2[-v3], v2, v4 - v2 + v5 - 1);
v8 = &v4[v1 + v5];
goto LABEL_20;
}
v8 = &v4[v5 - 1];
LABEL_20:
*v8 = 0;
return v7;
}