//
// GJSmartTemplate::isUnrequired from 0x53b230 to 0x53b30e (222 bytes)
//
// 3 xrefs:
// > GJSmartTemplate::logTemplateStatus @ 0x53c94a
// > GJSmartTemplate::getTemplateState @ 0x53cac8
// > BrowseSmartTemplateLayer::init @ 0x53ff6e
//
// 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 GJSmartTemplate::isUnrequired(int a1, int a2)
{
_BOOL4 v3; // r4
int v4; // r7
_BOOL4 v5; // r8
_BOOL4 v6; // r6
int v7; // r11
int v8; // r9
int v9; // r10
int v10; // r2
v3 = *(unsigned __int8 *)sub_7757BC(a2, 1) != 48;
v4 = *(unsigned __int8 *)sub_7757BC(a2, 2);
v5 = *(unsigned __int8 *)sub_7757BC(a2, 3) != 48;
v6 = *(unsigned __int8 *)sub_7757BC(a2, 4) != 48;
v7 = *(unsigned __int8 *)sub_7757BC(a2, 5);
v8 = *(unsigned __int8 *)sub_7757BC(a2, 6);
v9 = *(unsigned __int8 *)sub_7757BC(a2, 7);
v10 = *(unsigned __int8 *)sub_7757BC(a2, 8);
if ( v7 == 48 )
{
if ( v8 == 48 )
goto LABEL_8;
if ( !v3 )
return 1;
}
else
{
if ( !v3 || !v5 )
return 1;
if ( v8 == 48 )
goto LABEL_8;
}
if ( !v6 )
return 1;
LABEL_8:
if ( v9 != 48 )
{
if ( v4 == 48 || !v5 )
return 1;
if ( v10 == 48 )
return 0;
return !v6;
}
if ( v10 != 48 )
{
if ( v4 != 48 )
return !v6;
return 1;
}
if ( !v3 )
{
if ( v4 != 48 || v5 )
return 0;
return !v6;
}
return 0;
}