//
// sub_6F970C from 0x6f970c to 0x6f9808 (252 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall sub_6F970C(int *a1, int a2, int a3)
{
_DWORD *v3; // r8
int v4; // r4
int v5; // r10
int v6; // r3
bool v7; // zf
int v8; // r1
int v9; // r6
int v10; // r6
int v11; // r11
_BOOL4 v12; // r3
int v14; // r9
int v15; // r0
int v16; // r5
_BOOL4 v18; // r3
int *v19; // [sp+Ch] [bp-18h]
int v21; // [sp+14h] [bp-10h]
int v22; // [sp+18h] [bp-Ch]
int v23; // [sp+1Ch] [bp-8h]
v3 = (_DWORD *)*a1;
v4 = *(_DWORD *)*a1;
v5 = a1[82];
v6 = *(_DWORD *)(*a1 + 16) + *(_DWORD *)(*a1 + 20) * a2;
v7 = v4 == 4;
if ( v4 != 4 )
v7 = v4 == 9;
v21 = *(_DWORD *)*a1;
v8 = v7;
if ( v7 )
v9 = 0;
else
v9 = 3;
v23 = v8;
v22 = v6;
v10 = v9 + v6;
if ( a1[83] <= a1[85] )
return 0;
v12 = a3 > 0;
if ( a1[75] > 0 )
v12 = 0;
if ( !v12 )
return 0;
v11 = 0;
v19 = a1 + 69;
v14 = 0;
do
{
++v11;
sub_712CB0(v19);
v15 = off_AD5158(a1[86], 0, v5, 1, v10, 0);
v10 += v3[5];
v14 |= v15;
if ( a1[83] <= a1[85] )
break;
v18 = a3 > v11;
if ( a1[75] > 0 )
v18 = 0;
}
while ( v18 );
v16 = v14;
if ( v14 )
v16 = 1;
if ( (unsigned int)(v21 - 7) > 3 )
v16 = 0;
if ( v16 )
off_AD513C(v22, v23, v5, v11, v3[5]);
return v11;
}