//
// sub_931AB0 from 0x931ab0 to 0x931d34 (644 bytes)
//
// 3 xrefs:
// > sub_931D48 @ 0x932364
// > sub_931D48 @ 0x9323b2
// > sub_931D48 @ 0x932456
//
// 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:53 +0000
//
int __fastcall sub_931AB0(int a1, int a2, int *a3)
{
int v3; // r7
unsigned __int8 *v6; // r4
int result; // r0
int v8; // r6
int v9; // r7
char *v10; // r9
int v11; // t1
int v12; // r3
unsigned int v13; // r5
int v14; // r8
int v15; // r4
int v16; // r4
int v17; // r4
unsigned __int8 *v18; // r5
int v19; // r8
int v20; // t1
unsigned int v21; // [sp+0h] [bp-1Ch]
v3 = *a3;
v6 = (unsigned __int8 *)(a3[4] + 33 * *a3 + 11 * a2);
result = sub_9436D4(a1, a3[1] >= 0, *v6);
if ( result )
{
if ( v3 <= 15 )
{
v8 = v3 + 1;
v9 = 2 * v3;
v10 = &byte_C44438[v8];
while ( 1 )
{
v12 = *(__int16 *)(a3[2] + v9);
v13 = (unsigned int)v12 >> 31;
v14 = (v12 ^ (v12 >> 31)) + ((unsigned int)v12 >> 31);
if ( sub_9436D4(a1, v14 != 0, v6[1]) )
{
if ( sub_9436D4(a1, v14 > 1, v6[2]) )
{
if ( sub_9436D4(a1, v14 > 4, v6[3]) )
{
if ( sub_9436D4(a1, v14 > 10, v6[6]) )
{
if ( v14 <= 18 )
{
sub_9436D4(a1, 0, v6[8]);
sub_9436D4(a1, 0, v6[9]);
v21 = v13;
v17 = 4;
v18 = (unsigned __int8 *)&unk_C46D10;
v19 = v14 - 11;
}
else if ( v14 <= 34 )
{
sub_9436D4(a1, 0, v6[8]);
sub_9436D4(a1, 1, v6[9]);
v21 = v13;
v17 = 8;
v18 = (unsigned __int8 *)&unk_C46D00;
v19 = v14 - 19;
}
else
{
sub_9436D4(a1, 1, v6[8]);
if ( v14 > 66 )
{
sub_9436D4(a1, 1, v6[10]);
v21 = v13;
v17 = 1024;
v18 = (unsigned __int8 *)&unk_C46D18;
v19 = v14 - 67;
}
else
{
sub_9436D4(a1, 0, v6[10]);
v21 = v13;
v17 = 16;
v18 = (unsigned __int8 *)&unk_C46D08;
v19 = v14 - 35;
}
}
do
{
v20 = *v18++;
sub_9436D4(a1, (v17 & v19) != 0, v20);
v17 >>= 1;
}
while ( v17 );
v13 = v21;
}
else if ( sub_9436D4(a1, v14 > 6, v6[7]) )
{
sub_9436D4(a1, v14 > 8, 165);
sub_9436D4(a1, !(v14 & 1), 145);
}
else
{
sub_9436D4(a1, v14 == 6, 159);
}
}
else if ( sub_9436D4(a1, v14 != 2, v6[4]) )
{
sub_9436D4(a1, v14 == 4, v6[5]);
}
v16 = a3[4] + 33 * (unsigned __int8)*v10;
sub_943800(a1, v13);
v6 = (unsigned __int8 *)(v16 + 22);
if ( v8 == 16 )
return 1;
}
else
{
v15 = a3[4] + 33 * (unsigned __int8)*v10;
sub_943800(a1, v13);
v6 = (unsigned __int8 *)(v15 + 11);
if ( v8 == 16 )
return 1;
}
if ( !sub_9436D4(a1, a3[1] >= v8, *v6) )
return 1;
v9 += 2;
++v10;
}
else
{
v11 = (unsigned __int8)*v10++;
v9 += 2;
v6 = (unsigned __int8 *)(a3[4] + 33 * v11);
if ( v8 == 16 )
return 1;
}
++v8;
}
}
return 1;
}
return result;
}