//
// sub_90967C from 0x90967c to 0x909740 (196 bytes)
//
// 0 xrefs:
//
// 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:04:21 +0000
//
int __fastcall sub_90967C(int *a1, int **a2)
{
int v2; // lr
int *v3; // r5
int v4; // r6
int v5; // r4
int v6; // r3
bool v7; // zf
int v8; // r9
_BOOL4 v9; // r7
int v10; // r1
int v11; // r8
int v12; // r12
int v13; // r2
int v14; // r3
int v15; // r10
int v16; // r11
v2 = a1[26];
if ( !v2 )
return 0;
v3 = *a2;
v4 = a1[3];
v5 = **a2;
v6 = a1[2];
v7 = v5 == 4;
if ( v5 != 4 )
v7 = v5 == 9;
v8 = a1[4];
v9 = v7;
if ( a1[14] )
{
v10 = *a1;
if ( v6 )
{
v12 = v6 - 1;
v11 = a1[4];
v2 -= *a1;
}
else
{
v11 = v8 - 1;
v12 = 0;
}
v13 = a1[21];
v14 = v6 + v13 + v8;
if ( v14 == a1[22] )
v11 = v14 - v13 - v12;
}
else
{
v10 = *a1;
v11 = a1[4];
v12 = a1[2];
}
v15 = v9 ? 0 : 3;
v16 = v3[4] + v12 * v3[5];
if ( !off_D363E0(v2, v10, v4, v11, v15 + v16, v3[5]) || (unsigned int)(v5 - 7) > 3 )
return 0;
off_D363C4(v16, v9, v4, v11, v3[5]);
return 0;
}