//
// sub_810B64 from 0x810b64 to 0x810c30 (204 bytes)
//
// 3 xrefs:
// > sub_819D3C @ 0x819d56
// > sub_819D3C @ 0x819d84
// > sub_819D3C @ 0x819de2
//
// 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 12:01:37 +0000
//
int *__fastcall sub_810B64(int *a1, int a2)
{
int *v3; // r5
int v4; // r3
int v5; // r3
int v6; // r3
int v7; // r3
switch ( *(_DWORD *)(a2 + 16) )
{
case 1:
v4 = 3;
goto LABEL_12;
case 2:
*a1 = 4;
a1[1] = 4;
v4 = 3;
goto LABEL_27;
case 3:
v6 = 5;
goto LABEL_18;
case 4:
v6 = 6;
goto LABEL_18;
case 5:
v6 = 7;
goto LABEL_18;
case 6:
v6 = 8;
LABEL_18:
*a1 = v6;
v4 = 4;
goto LABEL_26;
case 7:
v7 = 9;
goto LABEL_21;
case 8:
v7 = 10;
LABEL_21:
*a1 = v7;
a1[1] = 2;
v4 = 5;
goto LABEL_27;
case 9:
v5 = 11;
goto LABEL_23;
case 0xA:
*a1 = 15;
a1[1] = 1;
v4 = 7;
goto LABEL_27;
case 0x14:
v3 = (int *)(a2 + 8);
if ( sub_80F83C((int *)(a2 + 8), (int)"or") )
{
v4 = 1;
LABEL_12:
*a1 = v4;
a1[1] = 4;
goto LABEL_27;
}
if ( sub_80F83C(v3, (int)"and") )
{
v4 = 2;
goto LABEL_12;
}
if ( sub_80F83C(v3, (int)"div") )
{
v5 = 12;
}
else
{
if ( !sub_80F83C(v3, (int)"mod") )
{
*a1 = 0;
a1[1] = 0;
a1[2] = 0;
return a1;
}
v5 = 13;
}
LABEL_23:
*a1 = v5;
a1[1] = 2;
v4 = 6;
LABEL_27:
a1[2] = v4;
return a1;
default:
v4 = 0;
*a1 = 0;
LABEL_26:
a1[1] = v4;
goto LABEL_27;
}
}