{"type": "func", "start": 4849276, "end": 4849518, "name": "GJEffectManager::postCollisionCheck", "pseudocode": "// \n// GJEffectManager::postCollisionCheck from 0x49fe7c to 0x49ff6e (242 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::loadUpToPosition @ 0x496f22\n// > GJBaseGameLayer::update @ 0x497a74\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::postCollisionCheck(GJEffectManager *a1)\n{\n  int *M_nxt; // r4\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>>::__bucket_type *M_buckets; // r11\n  int v4; // r7\n  _DWORD *i; // r6\n  std::__detail::_Hash_node_base *v6; // r12\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 v7; // r1\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>>::__bucket_type *v8; // r1\n  int v9; // r1\n  int *v10; // r6\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; // [sp+4h] [bp-18h]\n  int v12; // [sp+Ch] [bp-10h] BYREF\n  int v13; // [sp+10h] [bp-Ch] BYREF\n\n  M_nxt = (int *)a1->m_unkMap288._M_h._M_before_begin._M_nxt;\n  while ( M_nxt )\n  {\n    if ( *((_BYTE *)M_nxt + 8) )\n    {\n      M_nxt = (int *)*M_nxt;\n    }\n    else\n    {\n      splitCollisionKey(M_nxt + 1, &v12, &v13);\n      GJEffectManager::handleObjectCollision(a1, 0, v12, v13);\n      M_bucket_count = a1->m_unkMap288._M_h._M_bucket_count;\n      M_buckets = a1->m_unkMap288._M_h._M_buckets;\n      v4 = M_nxt[1] % M_bucket_count;\n      for ( i = &M_buckets[v4]->_M_nxt; (int *)*i != M_nxt; i = (_DWORD *)*i )\n        ;\n      if ( i == (_DWORD *)M_buckets[v4] )\n      {\n        v6 = (std::__detail::_Hash_node_base *)*M_nxt;\n        if ( *M_nxt )\n        {\n          v7 = (unsigned int)v6[1]._M_nxt % a1->m_unkMap288._M_h._M_bucket_count;\n          if ( v7 == v4 )\n            goto LABEL_17;\n          v6 = (std::__detail::_Hash_node_base *)*M_nxt;\n          M_buckets[v7] = (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>>::__bucket_type)i;\n        }\n        v8 = a1->m_unkMap288._M_h._M_buckets;\n        if ( v8[v4] == &a1->m_unkMap288._M_h._M_before_begin )\n          a1->m_unkMap288._M_h._M_before_begin._M_nxt = v6;\n        v8[v4] = nullptr;\n      }\n      else if ( *M_nxt )\n      {\n        v9 = *(_DWORD *)(*M_nxt + 4) % M_bucket_count;\n        if ( v9 != v4 )\n          M_buckets[v9] = (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>>::__bucket_type)i;\n      }\nLABEL_17:\n      *i = *M_nxt;\n      v10 = (int *)*M_nxt;\n      operator delete(M_nxt);\n      M_nxt = v10;\n      --a1->m_unkMap288._M_h._M_element_count;\n    }\n  }\n}", "assembly": "; \n; GJEffectManager::postCollisionCheck from 0x49fe7c to 0x49ff6e (242 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::loadUpToPosition @ 0x496f22\n; > GJBaseGameLayer::update @ 0x497a74\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\nLDR             R3, =(__stack_chk_guard_ptr - 0x49FE86)                ; +0x0, 0x49fe7c\nPUSH.W          {R4-R11,LR}                                            ; +0x2, 0x49fe7e\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x49fe82\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x49fe84\nSUB             SP, SP, #0x1C                                          ; +0xa, 0x49fe86\nLDR.W           R4, [R0,#0x1B4]                                        ; +0xc, 0x49fe88\nLDR             R2, [R3]                                               ; +0x10, 0x49fe8c\nADD.W           R9, SP, #0x1C+var_10                                   ; +0x12, 0x49fe8e\nADD.W           R10, SP, #0x1C+var_C                                   ; +0x16, 0x49fe92\nMOV             R5, R0                                                 ; +0x1a, 0x49fe96\nMOV             R8, R3                                                 ; +0x1c, 0x49fe98\nSTR             R2, [SP,#0x1C+var_8]                                   ; +0x1e, 0x49fe9a\nCMP             R4, #0                                                 ; +0x20, 0x49fe9c\nBEQ             loc_49FF5A                                             ; +0x22, 0x49fe9e\nLDRB            R6, [R4,#8]                                            ; +0x24, 0x49fea0\nCMP             R6, #0                                                 ; +0x26, 0x49fea2\nBNE             loc_49FF56                                             ; +0x28, 0x49fea4\nADDS            R0, R4, #4; int *                                      ; +0x2a, 0x49fea6\nMOV             R1, R9; int *                                          ; +0x2c, 0x49fea8\nMOV             R2, R10; int *                                         ; +0x2e, 0x49feaa\nBL              _Z17splitCollisionKeyRKiRiS1_; splitCollisionKey(int const&,int &,int &) ; +0x30, 0x49feac\nMOV             R1, R6; bool                                           ; +0x34, 0x49feb0\nMOV             R0, R5; this                                           ; +0x36, 0x49feb2\nLDR             R2, [SP,#0x1C+var_10]; int                             ; +0x38, 0x49feb4\nLDR             R3, [SP,#0x1C+var_C]; int                              ; +0x3a, 0x49feb6\nBL              _ZN15GJEffectManager21handleObjectCollisionEbii; GJEffectManager::handleObjectCollision(bool,int,int) ; +0x3c, 0x49feb8\nLDR.W           R2, [R5,#0x1B0]                                        ; +0x40, 0x49febc\nLDR             R0, [R4,#4]                                            ; +0x44, 0x49fec0\nMOV             R1, R2                                                 ; +0x46, 0x49fec2\nSTR             R2, [SP,#0x1C+var_18]                                  ; +0x48, 0x49fec4\nBLX             __aeabi_uidivmod                                       ; +0x4a, 0x49fec6\nLDR.W           R11, [R5,#0x1AC]                                       ; +0x4e, 0x49feca\nLDR             R2, [SP,#0x1C+var_18]                                  ; +0x52, 0x49fece\nMOV             R7, R1                                                 ; +0x54, 0x49fed0\nLDR.W           R1, [R11,R1,LSL#2]                                     ; +0x56, 0x49fed2\nMOV             R6, R1                                                 ; +0x5a, 0x49fed6\nLDR             R0, [R6]                                               ; +0x5c, 0x49fed8\nCMP             R0, R4                                                 ; +0x5e, 0x49feda\nBEQ             loc_49FEE2                                             ; +0x60, 0x49fedc\nMOV             R6, R0                                                 ; +0x62, 0x49fede\nB               loc_49FED8                                             ; +0x64, 0x49fee0\nCMP             R6, R1                                                 ; +0x66, 0x49fee2\nBNE             loc_49FF28                                             ; +0x68, 0x49fee4\nLDR.W           R12, [R4]                                              ; +0x6a, 0x49fee6\nCMP.W           R12, #0                                                ; +0x6e, 0x49feea\nBEQ             loc_49FF0A                                             ; +0x72, 0x49feee\nLDR.W           R0, [R12,#4]                                           ; +0x74, 0x49fef0\nMOV             R1, R2                                                 ; +0x78, 0x49fef4\nSTR.W           R12, [SP,#0x1C+var_18]                                 ; +0x7a, 0x49fef6\nBLX             __aeabi_uidivmod                                       ; +0x7e, 0x49fefa\nCMP             R1, R7                                                 ; +0x82, 0x49fefe\nBEQ             loc_49FF3C                                             ; +0x84, 0x49ff00\nLDR.W           R12, [SP,#0x1C+var_18]                                 ; +0x86, 0x49ff02\nSTR.W           R6, [R11,R1,LSL#2]                                     ; +0x8a, 0x49ff06\nLDR.W           R1, [R5,#0x1AC]                                        ; +0x8e, 0x49ff0a\nADD.W           R3, R5, #0x1B4                                         ; +0x92, 0x49ff0e\nLDR.W           R2, [R1,R7,LSL#2]                                      ; +0x96, 0x49ff12\nCMP             R2, R3                                                 ; +0x9a, 0x49ff16\nMOV.W           R3, #0                                                 ; +0x9c, 0x49ff18\nIT EQ                                                                  ; +0xa0, 0x49ff1c\nSTREQ.W         R12, [R5,#0x1B4]                                       ; +0xa2, 0x49ff1e\nSTR.W           R3, [R1,R7,LSL#2]                                      ; +0xa6, 0x49ff22\nB               loc_49FF3C                                             ; +0xaa, 0x49ff26\nLDR             R1, [R4]                                               ; +0xac, 0x49ff28\nCBZ             R1, loc_49FF3C                                         ; +0xae, 0x49ff2a\nLDR             R0, [R1,#4]                                            ; +0xb0, 0x49ff2c\nMOV             R1, R2                                                 ; +0xb2, 0x49ff2e\nBLX             __aeabi_uidivmod                                       ; +0xb4, 0x49ff30\nCMP             R1, R7                                                 ; +0xb8, 0x49ff34\nIT NE                                                                  ; +0xba, 0x49ff36\nSTRNE.W         R6, [R11,R1,LSL#2]                                     ; +0xbc, 0x49ff38\nLDR             R3, [R4]                                               ; +0xc0, 0x49ff3c\nMOV             R0, R4; p                                              ; +0xc2, 0x49ff3e\nSTR             R3, [R6]                                               ; +0xc4, 0x49ff40\nLDR             R6, [R4]                                               ; +0xc6, 0x49ff42\nBL              _ZdlPv; operator delete(void *)                        ; +0xc8, 0x49ff44\nLDR.W           R3, [R5,#0x1B8]                                        ; +0xcc, 0x49ff48\nMOV             R4, R6                                                 ; +0xd0, 0x49ff4c\nSUBS            R3, #1                                                 ; +0xd2, 0x49ff4e\nSTR.W           R3, [R5,#0x1B8]                                        ; +0xd4, 0x49ff50\nB               loc_49FE9C                                             ; +0xd8, 0x49ff54\nLDR             R4, [R4]                                               ; +0xda, 0x49ff56\nB               loc_49FE9C                                             ; +0xdc, 0x49ff58\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0xde, 0x49ff5a\nLDR.W           R3, [R8]                                               ; +0xe0, 0x49ff5c\nCMP             R2, R3                                                 ; +0xe4, 0x49ff60\nBEQ             loc_49FF68                                             ; +0xe6, 0x49ff62\nBLX             __stack_chk_fail                                       ; +0xe8, 0x49ff64\nADD             SP, SP, #0x1C                                          ; +0xec, 0x49ff68\nPOP.W           {R4-R11,PC}                                            ; +0xee, 0x49ff6a", "xrefs": ["GJBaseGameLayer::loadUpToPosition @ 0x496f22", "GJBaseGameLayer::update @ 0x497a74"], "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"}