//
// GJBaseGameLayer::canProcessSFX from 0x1002a307c to 0x1002a3244 (456 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::processActivatedAudioTriggers @ 0x1002a3a24
//
// 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 11:02:13 +0000
//
__int64 __fastcall GJBaseGameLayer::canProcessSFX(__int64 a1, double *a2, _QWORD *a3, _QWORD *a4, _QWORD *a5)
{
int v9; // w23
__int64 v10; // x8
int v11; // w9
float v12; // s8
double v13; // d9
__int64 v14; // x22
float v15; // s0
int v16; // w23
float v17; // s8
int v19; // [xsp+0h] [xbp-50h] BYREF
int *v20; // [xsp+8h] [xbp-48h] BYREF
v9 = sub_100432764(*(_QWORD *)a2);
v10 = *(_QWORD *)a2;
v11 = v9;
if ( !v9 )
v11 = -*(_DWORD *)(v10 + 916);
v19 = v11;
v12 = *(float *)(v10 + 1948);
if ( v12 > 0.0 )
{
if ( sub_100019268(a4, &v19) )
{
v13 = a2[2];
v20 = &v19;
if ( v13 - *((float *)sub_10001DBA4((unsigned __int64)a4, &v19, (__int64)&unk_100763014, &v20) + 5) < *(float *)(*(_QWORD *)a2 + 1948LL) )
return 0;
}
}
if ( v9 && sub_100019268(a3, &v19) )
{
v20 = &v19;
v14 = *a5 + 168LL * *((int *)sub_10001DBA4((unsigned __int64)a3, &v19, (__int64)&unk_100763014, &v20) + 5);
if ( *(_BYTE *)(*(_QWORD *)a2 + 1910LL) == 1 )
{
*(_BYTE *)(v14 + 68) = 1;
goto LABEL_12;
}
if ( (*(_BYTE *)(v14 + 68) & 1) == 0 )
{
v15 = a2[2];
GJBaseGameLayer::processSFXState(v15);
if ( *(_BYTE *)(v14 + 68) != 1 )
return 0;
}
}
LABEL_12:
v16 = *((_DWORD *)a2 + 16);
v20 = &v19;
*((_DWORD *)sub_10001DBA4((unsigned __int64)a3, &v19, (__int64)&unk_100763014, &v20) + 5) = v16;
if ( v12 > 0.0 )
{
v17 = a2[2];
v20 = &v19;
*((float *)sub_10001DBA4((unsigned __int64)a4, &v19, (__int64)&unk_100763014, &v20) + 5) = v17;
}
return 1;
}