//
// sub_6C940 from 0x6c940 to 0x6c998 (88 bytes)
//
// 2 xrefs:
// > sub_6BB6C @ 0x6bb8a
// > sub_6BBB8 @ 0x6bbcc
//
// 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:40:58 +0000
//
int __fastcall sub_6C940(int *a1, int *a2, int *a3)
{
bool v3; // zf
int v4; // r3
int v5; // r3
int v6; // r5
int v7; // r0
v3 = *a3 == -1;
if ( *a3 != -1 )
{
v4 = *(_DWORD *)(a1[3] + 12 * *a3 + 4);
*a3 = v4;
v3 = v4 == -1;
}
if ( v3 )
{
v5 = *a2 + 1;
if ( *a2 == -1 )
v5 = 0;
while ( 1 )
{
if ( a1[1] == v5 )
{
v7 = -1;
*a2 = -1;
goto LABEL_12;
}
v6 = *a1;
if ( *(_DWORD *)(*a1 + 4 * v5) != -1 )
break;
++v5;
}
*a2 = v5;
v7 = *(_DWORD *)(v6 + 4 * v5);
LABEL_12:
*a3 = v7;
}
return 0;
}