{"type": "func", "start": 4849524, "end": 4849708, "name": "GJEffectManager::objectsCollided", "pseudocode": "// \n// GJEffectManager::objectsCollided from 0x49ff74 to 0x4a002c (184 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::objectsCollided @ 0x46c074\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid GJEffectManager::objectsCollided(GJEffectManager *a1, int a2, int a3)\n{\n  unsigned int CollisionKey; // r0\n  std::unordered_map<int, bool> *p_m_unkMap288; // r8\n  std::_Hashtable<int, std::pair<const int, bool>, std::allocator<std::pair<const int, bool>>, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>>::size_type M_bucket_count; // r1\n  unsigned int v7; // r4\n  _DWORD **v8; // r0\n  std::unordered_map<int, bool> *v9; // r0\n  std::_Hashtable<int, std::pair<const int, bool>, std::allocator<std::pair<const int, bool>>, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>>::size_type v10; // r6\n  _DWORD **v11; // r0\n  _DWORD *inserted; // r0\n  int v13; // r0\n  GJEffectManager *v14; // [sp+0h] [bp-10h] BYREF\n  int v15; // [sp+4h] [bp-Ch] BYREF\n  int v16; // [sp+8h] [bp-8h] BYREF\n\n  v14 = a1;\n  v15 = a2;\n  v16 = a3;\n  if ( a2 <= 10001 && a3 <= 10001 )\n  {\n    if ( a2 < a3 )\n      v14 = (GJEffectManager *)a3;\n    else\n      v14 = (GJEffectManager *)a2;\n    if ( a2 > a3 )\n      v15 = a3;\n    else\n      v15 = a2;\n    CollisionKey = (unsigned int)getCollisionKey((const int *)&v14, &v15);\n    p_m_unkMap288 = &a1->m_unkMap288;\n    M_bucket_count = a1->m_unkMap288._M_h._M_bucket_count;\n    v16 = CollisionKey;\n    v7 = CollisionKey;\n    v8 = sub_498AD6(&a1->m_unkMap288._M_h._M_buckets, CollisionKey % M_bucket_count, &v16);\n    if ( v8 && *v8 )\n    {\n      *((_BYTE *)*v8 + 8) = 1;\n    }\n    else\n    {\n      GJEffectManager::handleObjectCollision(a1, 1, (int)v14, v15);\n      v9 = &a1->m_unkMap288;\n      v10 = v7 % a1->m_unkMap288._M_h._M_bucket_count;\n      v11 = sub_498AD6(v9, v10, &v16);\n      if ( !v11 || (inserted = *v11) == nullptr )\n      {\n        v13 = operator new(0xCu);\n        *(_DWORD *)v13 = 0;\n        *(_DWORD *)(v13 + 4) = v7;\n        *(_BYTE *)(v13 + 8) = 0;\n        inserted = std::_Hashtable<int,std::pair<int const,bool>,std::allocator<std::pair<int const,bool>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_insert_unique_node(\n                     (int)p_m_unkMap288,\n                     v10,\n                     v7,\n                     (_DWORD *)v13);\n      }\n      *((_BYTE *)inserted + 8) = 1;\n    }\n  }\n}", "assembly": "; \n; GJEffectManager::objectsCollided from 0x49ff74 to 0x4a002c (184 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::objectsCollided @ 0x46c074\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nPUSH.W          {R0-R8,LR}                                             ; +0x0, 0x49ff74\nMOV             R6, R0                                                 ; +0x4, 0x49ff78\nLDR             R7, =(__stack_chk_guard_ptr - 0x49FF80)                ; +0x6, 0x49ff7a\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0x8, 0x49ff7c\nLDR             R7, [R7]; __stack_chk_guard                            ; +0xa, 0x49ff7e\nLDR             R3, [R7]                                               ; +0xc, 0x49ff80\nSTR             R3, [SP,#0x10+var_4]                                   ; +0xe, 0x49ff82\nMOVW            R3, #0x2711                                            ; +0x10, 0x49ff84\nCMP             R1, R3                                                 ; +0x14, 0x49ff88\nBGT             loc_4A001A                                             ; +0x16, 0x49ff8a\nCMP             R2, R3                                                 ; +0x18, 0x49ff8c\nBGT             loc_4A001A                                             ; +0x1a, 0x49ff8e\nCMP             R1, R2                                                 ; +0x1c, 0x49ff90\nITE GE                                                                 ; +0x1e, 0x49ff92\nSTRGE           R1, [SP,#0x10+var_10]                                  ; +0x20, 0x49ff94\nSTRLT           R2, [SP,#0x10+var_10]                                  ; +0x22, 0x49ff96\nMOV             R0, SP; int *                                          ; +0x24, 0x49ff98\nCMP             R1, R2                                                 ; +0x26, 0x49ff9a\nITE LE                                                                 ; +0x28, 0x49ff9c\nSTRLE           R1, [SP,#0x10+var_C]                                   ; +0x2a, 0x49ff9e\nSTRGT           R2, [SP,#0x10+var_C]                                   ; +0x2c, 0x49ffa0\nADD             R1, SP, #0x10+var_C; int *                             ; +0x2e, 0x49ffa2\nBL              _Z15getCollisionKeyRKiS0_; getCollisionKey(int const&,int const&) ; +0x30, 0x49ffa4\nADD             R5, SP, #0x10+var_s0                                   ; +0x34, 0x49ffa8\nADD.W           R8, R6, #0x1AC                                         ; +0x36, 0x49ffaa\nLDR.W           R1, [R6,#0x1B0]                                        ; +0x3a, 0x49ffae\nSTR.W           R0, [R5,#-8]!                                          ; +0x3e, 0x49ffb2\nMOV             R4, R0                                                 ; +0x42, 0x49ffb6\nBLX             __aeabi_uidivmod                                       ; +0x44, 0x49ffb8\nMOV             R0, R8                                                 ; +0x48, 0x49ffbc\nMOV             R2, R5                                                 ; +0x4a, 0x49ffbe\nBL              sub_498AD6                                             ; +0x4c, 0x49ffc0\nCBZ             R0, loc_49FFD0                                         ; +0x50, 0x49ffc4\nLDR             R3, [R0]                                               ; +0x52, 0x49ffc6\nCBZ             R3, loc_49FFD0                                         ; +0x54, 0x49ffc8\nMOVS            R2, #1                                                 ; +0x56, 0x49ffca\nSTRB            R2, [R3,#8]                                            ; +0x58, 0x49ffcc\nB               loc_4A001A                                             ; +0x5a, 0x49ffce\nMOV             R0, R6; this                                           ; +0x5c, 0x49ffd0\nLDMFD.W         SP, {R2,R3}; int                                       ; +0x5e, 0x49ffd2\nMOVS            R1, #1; bool                                           ; +0x62, 0x49ffd6\nBL              _ZN15GJEffectManager21handleObjectCollisionEbii; GJEffectManager::handleObjectCollision(bool,int,int) ; +0x64, 0x49ffd8\nLDR.W           R1, [R6,#0x1B0]                                        ; +0x68, 0x49ffdc\nMOV             R0, R4                                                 ; +0x6c, 0x49ffe0\nBLX             __aeabi_uidivmod                                       ; +0x6e, 0x49ffe2\nMOV             R0, R8                                                 ; +0x72, 0x49ffe6\nMOV             R2, R5                                                 ; +0x74, 0x49ffe8\nMOV             R6, R1                                                 ; +0x76, 0x49ffea\nBL              sub_498AD6                                             ; +0x78, 0x49ffec\nCBZ             R0, loc_49FFFE                                         ; +0x7c, 0x49fff0\nLDR             R0, [R0]                                               ; +0x7e, 0x49fff2\nCBZ             R0, loc_49FFFE                                         ; +0x80, 0x49fff4\nADDS            R0, #8                                                 ; +0x82, 0x49fff6\nMOVS            R3, #1                                                 ; +0x84, 0x49fff8\nSTRB            R3, [R0]                                               ; +0x86, 0x49fffa\nB               loc_4A001A                                             ; +0x88, 0x49fffc\nMOVS            R0, #0xC; unsigned int                                 ; +0x8a, 0x49fffe\nBL              _Znwj; operator new(uint)                              ; +0x8c, 0x4a0000\nMOVS            R2, #0                                                 ; +0x90, 0x4a0004\nMOV             R1, R6                                                 ; +0x92, 0x4a0006\nSTM.W           R0, {R2,R4}                                            ; +0x94, 0x4a0008\nMOV             R3, R0                                                 ; +0x98, 0x4a000c\nSTRB            R2, [R0,#8]                                            ; +0x9a, 0x4a000e\nMOV             R0, R8                                                 ; +0x9c, 0x4a0010\nMOV             R2, R4                                                 ; +0x9e, 0x4a0012\nBL              _ZNSt10_HashtableIiSt4pairIKibESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE21_M_insert_unique_nodeEjjPNS4_10_Hash_nodeIS2_Lb0EEE; std::_Hashtable<int,std::pair<int const,bool>,std::allocator<std::pair<int const,bool>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_insert_unique_node(uint,uint,std::__detail::_Hash_node<std::pair<int const,bool>,false> *) ; +0xa0, 0x4a0014\nB               loc_49FFF6                                             ; +0xa4, 0x4a0018\nLDR             R2, [SP,#0x10+var_4]                                   ; +0xa6, 0x4a001a\nLDR             R3, [R7]                                               ; +0xa8, 0x4a001c\nCMP             R2, R3                                                 ; +0xaa, 0x4a001e\nBEQ             loc_4A0026                                             ; +0xac, 0x4a0020\nBLX             __stack_chk_fail                                       ; +0xae, 0x4a0022\nADD             SP, SP, #0x10                                          ; +0xb2, 0x4a0026\nPOP.W           {R4-R8,PC}                                             ; +0xb4, 0x4a0028", "xrefs": ["GJBaseGameLayer::objectsCollided @ 0x46c074"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}