//
// GJGameLevel::countDeathsNear from 0x4ab868 to 0x4ab89e (54 bytes)
//
// 2 xrefs:
// > PlayLayer::tryShowDeathMarkers @ 0x72d10e
// > PlayLayer::tryShowDeathMarkers @ 0x72d1b0
//
// 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:49:58 +0000
//
int __fastcall GJGameLevel::countDeathsNear(int *a1, int a2, int a3, int a4)
{
unsigned int v4; // lr
int v5; // r4
int v6; // r7
int result; // r0
int v8; // r3
unsigned int v9; // r7
int v10; // r6
v4 = 0;
v5 = *a1;
v6 = a1[1];
result = 0;
v8 = a4 * a4;
v9 = (v6 - v5) >> 2;
while ( 1 )
{
v4 += 2;
if ( v4 > v9 )
break;
v10 = *(_DWORD *)(v5 + 4);
v5 += 8;
if ( (v10 - a3) * (v10 - a3) + (*(_DWORD *)(v5 - 8) - a2) * (*(_DWORD *)(v5 - 8) - a2) <= v8 )
++result;
}
return result;
}