//
// sub_99897E from 0x99897e to 0x9989b8 (58 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:06:42 +0000
//
_DWORD *__fastcall sub_99897E(_DWORD *a1, int *a2)
{
int v2; // r3
int *v3; // r1
int v4; // r12
int v5; // t1
int v6; // r2
_DWORD *v7; // lr
int *v8; // r4
int v9; // r5
int v10; // t1
v2 = *a1;
if ( !*a1 )
return nullptr;
v5 = *a2;
v3 = a2 + 1;
v4 = v5;
v6 = 0;
v7 = a1;
while ( 1 )
{
v8 = v3;
v9 = v4;
if ( v4 )
break;
LABEL_6:
v2 = a1[++v6];
v7 = &a1[v6];
if ( !v2 )
return nullptr;
}
while ( v9 != v2 )
{
v10 = *v8++;
v9 = v10;
if ( !v10 )
goto LABEL_6;
}
return v7;
}