//
// GJGameLevel::countDeathsNear from 0x8062f0 to 0x80634c (92 bytes)
//
// 3 xrefs:
// > PlayLayer::tryShowDeathMarkers @ 0xc37224
// > PlayLayer::tryShowDeathMarkers @ 0xc372ac
// > ??> @ 0x88b88
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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:54:45 +0000
//
__int64 __fastcall GJGameLevel::countDeathsNear(__int64 *a1, int a2, int a3, int a4)
{
__int64 v5; // x8
unsigned __int64 v6; // x7
__int64 result; // x0
__int64 v8; // x6
int v9; // w3
unsigned __int64 v10; // x8
int v11; // w5
v5 = *a1;
v6 = 0;
result = 0;
v8 = v5;
v9 = a4 * a4;
v10 = (a1[1] - v5) >> 2;
while ( 1 )
{
v6 += 2LL;
if ( v6 > v10 )
break;
v11 = *(_DWORD *)(v8 + 4);
v8 += 8;
if ( v9 < (v11 - a3) * (v11 - a3) + (*(_DWORD *)(v8 - 8) - a2) * (*(_DWORD *)(v8 - 8) - a2) )
result = (unsigned int)result;
else
result = (unsigned int)(result + 1);
}
return result;
}