//
// GJSmartTemplate::isUnrequired from 0x1004144c0 to 0x1004145f3 (307 bytes)
//
// 3 xrefs:
// > GJSmartTemplate::logTemplateStatus @ 0x100414263
// > GJSmartTemplate::getTemplateState @ 0x100414889
// > BrowseSmartTemplateLayer::init @ 0x1004e3cb2
//
// 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:30:10 +0000
//
bool __fastcall GJSmartTemplate::isUnrequired(__int64 a1, std::string *a2)
{
bool v2; // r14
bool v3; // r13
bool v4; // r12
std::string::reference v5; // rcx
bool result; // al
std::string::value_type v7; // [rsp+4h] [rbp-2Ch]
std::string::value_type v8; // [rsp+5h] [rbp-2Bh]
std::string::value_type v9; // [rsp+6h] [rbp-2Ah]
std::string::value_type v10; // [rsp+7h] [rbp-29h]
v7 = *std::string::at(a2, 1u);
v9 = *std::string::at(a2, 2u);
v8 = *std::string::at(a2, 3u);
v10 = *std::string::at(a2, 4u);
v2 = *std::string::at(a2, 5u) != 48;
v3 = *std::string::at(a2, 6u) != 48;
v4 = *std::string::at(a2, 7u) != 48;
v5 = std::string::at(a2, 8u);
result = 1;
if ( (v8 != 48 && v7 != 48 || !v2) && (v10 != 48 && v7 != 48 || !v3) && (v8 != 48 && v9 != 48 || !v4) )
{
if ( *v5 == 48 )
return ((unsigned __int8)v10 ^ 0x30
| (unsigned __int8)v8 ^ 0x30
| (unsigned __int8)v9 ^ 0x30
| (unsigned __int8)v7 ^ 0x30) == 0;
else
return v10 == 48 || v9 == 48;
}
return result;
}