//
// GJEffectManager::countForItem from 0x5c4d62 to 0x5c4d8e (44 bytes)
//
// 11 xrefs:
// > GJBaseGameLayer::testInstantCountTrigger @ 0x59574e
// > GJBaseGameLayer::getItemValue @ 0x5957b8
// > GJBaseGameLayer::activateProgressTrigger @ 0x5bd058
// > GJBaseGameLayer::activateProgressTrigger @ 0x5bd0a0
// > GJBaseGameLayer::collectedObject @ 0x5bd0de
// > GJBaseGameLayer::addPickupTrigger @ 0x5bd10e
// > GJBaseGameLayer::addPickupTrigger @ 0x5bd12e
// > GJBaseGameLayer::addPickupTrigger @ 0x5bd182
// > GJBaseGameLayer::refreshCounterLabels @ 0x5be4ae
// > GJEffectManager::runCountTrigger @ 0x5cc32e
// > GJEffectManager::updateCountForItem @ 0x5cf342
//
// 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:53:52 +0000
//
_DWORD *__fastcall GJEffectManager::countForItem(GJEffectManager *this, int a2, unsigned int a3)
{
int v3; // r3
_DWORD *result; // r0
unsigned int v5[2]; // [sp+4h] [bp-8h] BYREF
v5[0] = a2;
v5[1] = a3;
if ( a2 > 9998 )
v3 = 9999;
else
v3 = a2 & ~(a2 >> 31);
v5[0] = v3;
result = std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::find(
(_DWORD *)this + 115,
v5);
if ( result )
return (_DWORD *)result[3];
return result;
}