//
// sub_82580 from 0x82580 to 0x825ea (106 bytes)
//
// 1 xrefs:
// > sub_82290 @ 0x822c4
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:41:17 +0000
//
int __fastcall sub_82580(int a1)
{
int result; // r0
bool v3; // zf
int v4; // r2
int v5; // r3
unsigned __int8 v6; // [sp+3h] [bp-15h] BYREF
int v7; // [sp+4h] [bp-14h] BYREF
v7 = 0;
LABEL_2:
result = sub_819EC(a1, &v7);
if ( !result )
{
result = sub_BBA38(*(_DWORD *)(a1 + 220), &v6);
if ( !result )
{
v3 = v6 == 91;
if ( v6 != 91 )
v3 = v6 == 35;
if ( v3 )
{
while ( 1 )
{
result = sub_BBA38(*(_DWORD *)(a1 + 220), &v6);
if ( result )
break;
if ( sub_82442(a1, v6, v4, v5) )
goto LABEL_2;
}
}
else
{
return sub_BBB84(*(_DWORD *)(a1 + 220), -1);
}
}
}
return result;
}