//
// sub_B4AE0C from 0xb4ae0c to 0xb4af80 (372 bytes)
//
// 2 xrefs:
// > sub_B63D0C @ 0xb63e08
// > sub_B65844 @ 0xb66118
//
// 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
//
__int64 __fastcall sub_B4AE0C(_QWORD *a1)
{
_BYTE *v1; // x1
__int64 v2; // x4
__int64 v3; // x0
__int64 v4; // x4
__int64 result; // x0
__int64 v6; // x4
__int64 v7; // x0
__int64 v8; // x4
__int64 v9; // x4
__int64 v10; // x0
__int64 v11; // x4
__int64 v12; // x4
__int64 v13; // x0
__int64 v14; // x4
v1 = (_BYTE *)*a1;
switch ( *(_BYTE *)*a1 )
{
case 'c':
v12 = a1[1];
v13 = 0;
v14 = v12 - (_QWORD)v1;
if ( v14 )
{
while ( v14 != ++v13 )
{
if ( aComment[v13] != v1[v13] )
goto LABEL_30;
}
}
if ( aComment[v14] )
result = 0;
else
result = 3;
break;
case 'n':
v9 = a1[1];
v10 = 0;
v11 = v9 - (_QWORD)v1;
if ( v11 )
{
while ( v11 != ++v10 )
{
if ( aNode[v10] != v1[v10] )
goto LABEL_30;
}
}
if ( aNode[v11] )
result = 0;
else
result = 2;
break;
case 'p':
v6 = a1[1];
v7 = 0;
v8 = v6 - (_QWORD)v1;
if ( v8 )
{
while ( v8 != ++v7 )
{
if ( aProcessingInst[v7] != v1[v7] )
goto LABEL_30;
}
}
if ( aProcessingInst[v8] )
result = 0;
else
result = 4;
break;
case 't':
v2 = a1[1];
v3 = 0;
v4 = v2 - (_QWORD)v1;
if ( v4 )
{
while ( v4 != ++v3 )
{
if ( aText_0[v3] != v1[v3] )
goto LABEL_30;
}
}
if ( aText_0[v4] )
result = 0;
else
result = 5;
break;
default:
LABEL_30:
result = 0;
break;
}
return result;
}