{"type": "func", "start": 8820700, "end": 8820916, "name": "GJBaseGameLayer::orderSpawnObjects", "pseudocode": "// \n// GJBaseGameLayer::orderSpawnObjects from 0x8697dc to 0x8698b4 (216 bytes)\n// \n// 3 xrefs:\n// > PlayLayer::createObjectsFromSetupFinished @ 0x5d7d74\n// > LevelEditorLayer::onPlaytest @ 0x6642fc\n// > <???> @ 0x8c0d0\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 GJBaseGameLayer::orderSpawnObjects(GJBaseGameLayer *a1)\n{\n  cocos2d::CCArray *m_spawnObjectsArray; // x0\n  cocos2d::ccArray *data; // x2\n  cocos2d::CCObject **arr; // x20\n  cocos2d::CCObject **v5; // x22\n  cocos2d::CCObject *v6; // x19\n  float v7; // s0\n  float v8; // s1\n\n  cocos2d::CCDictionary::removeAllObjects(a1->m_spawnObjects);\n  m_spawnObjectsArray = a1->m_spawnObjectsArray;\n  if ( m_spawnObjectsArray )\n  {\n    data = m_spawnObjectsArray->data;\n    if ( data->num )\n    {\n      arr = data->arr;\n      v5 = &arr[data->num - 1];\n      if ( arr <= v5 )\n      {\n        v6 = *arr;\n        if ( *arr )\n        {\n          do\n          {\n            ++arr;\n            v7 = ((float (__fastcall *)(cocos2d::CCObject *))v6->__vftable[22].update)(v6);\n            cocos2d::CCPoint::operator=(&v6[31].m_uIndexInArray, v7, v8);\n            if ( v5 < arr )\n              break;\n            v6 = *arr;\n          }\n          while ( *arr );\n          m_spawnObjectsArray = a1->m_spawnObjectsArray;\n        }\n      }\n    }\n  }\n  LevelTools::sortChannelOrderObjects(m_spawnObjectsArray, a1->m_spawnObjects, 0);\n}", "assembly": "; \n; GJBaseGameLayer::orderSpawnObjects from 0x8697dc to 0x8698b4 (216 bytes)\n; \n; 3 xrefs:\n; > PlayLayer::createObjectsFromSetupFinished @ 0x5d7d74\n; > LevelEditorLayer::onPlaytest @ 0x6642fc\n; > <???> @ 0x8c0d0\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\nSTP             X29, X30, [SP,#var_50]!                                ; +0x0, 0x8697dc\nMOV             X29, SP                                                ; +0x4, 0x8697e0\nSTP             X23, X24, [SP,#0x50+var_20]                            ; +0x8, 0x8697e4\nADRP            X24, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x8697e8\nMOV             X23, X0                                                ; +0x10, 0x8697ec\nLDR             X0, [X0,#0xE28]; this                                  ; +0x14, 0x8697f0\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x18, 0x8697f4\nLDR             X1, [X24,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0x8697f8\nSTP             X21, X22, [SP,#0x50+var_30]                            ; +0x20, 0x8697fc\nLDR             X1, [X1]                                               ; +0x24, 0x869800\nSTR             X1, [X29,#0x50+var_8]                                  ; +0x28, 0x869804\nBL              _ZN7cocos2d12CCDictionary16removeAllObjectsEv; cocos2d::CCDictionary::removeAllObjects(void) ; +0x2c, 0x869808\nLDR             X0, [X23,#0xE20]                                       ; +0x30, 0x86980c\nCBZ             X0, loc_86987C                                         ; +0x34, 0x869810\nLDR             X2, [X0,#0x38]                                         ; +0x38, 0x869814\nLDR             W1, [X2]                                               ; +0x3c, 0x869818\nCBZ             W1, loc_86987C                                         ; +0x40, 0x86981c\nLDR             X20, [X2,#0x10]                                        ; +0x44, 0x869820\nMOV             X22, #0xFFFFFFFFFFFFFFF8                               ; +0x48, 0x869824\nADD             X22, X22, W1,UXTW#3                                    ; +0x4c, 0x869828\nADD             X22, X20, X22                                          ; +0x50, 0x86982c\nCMP             X20, X22                                               ; +0x54, 0x869830\nB.HI            loc_86987C                                             ; +0x58, 0x869834\nLDR             X19, [X20]                                             ; +0x5c, 0x869838\nADD             X21, X29, #0x50+var_10                                 ; +0x60, 0x86983c\nCBZ             X19, loc_86987C                                        ; +0x64, 0x869840\nLDR             X1, [X19]                                              ; +0x68, 0x869844\nMOV             X8, X21                                                ; +0x6c, 0x869848\nMOV             X0, X19                                                ; +0x70, 0x86984c\nADD             X20, X20, #8                                           ; +0x74, 0x869850\nLDR             X1, [X1,#0x708]                                        ; +0x78, 0x869854\nBLR             X1                                                     ; +0x7c, 0x869858\nADD             X0, X19, #0x6E8                                        ; +0x80, 0x86985c\nMOV             X1, X21                                                ; +0x84, 0x869860\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x88, 0x869864\nCMP             X22, X20                                               ; +0x8c, 0x869868\nB.CC            loc_869878                                             ; +0x90, 0x86986c\nLDR             X19, [X20]                                             ; +0x94, 0x869870\nCBNZ            X19, loc_869844                                        ; +0x98, 0x869874\nLDR             X0, [X23,#0xE20]; this                                 ; +0x9c, 0x869878\nLDR             X1, [X23,#0xE28]; cocos2d::CCArray *                   ; +0xa0, 0x86987c\nMOV             W2, #0; cocos2d::CCDictionary *                        ; +0xa4, 0x869880\nBL              _ZN10LevelTools23sortChannelOrderObjectsEPN7cocos2d7CCArrayEPNS0_12CCDictionaryEb; LevelTools::sortChannelOrderObjects(cocos2d::CCArray *,cocos2d::CCDictionary *,bool) ; +0xa8, 0x869884\nLDR             X24, [X24,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xac, 0x869888\nLDR             X1, [X29,#0x50+var_8]                                  ; +0xb0, 0x86988c\nLDR             X0, [X24]                                              ; +0xb4, 0x869890\nCMP             X1, X0                                                 ; +0xb8, 0x869894\nB.NE            loc_8698B0                                             ; +0xbc, 0x869898\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0xc0, 0x86989c\nLDP             X21, X22, [SP,#0x50+var_30]                            ; +0xc4, 0x8698a0\nLDP             X23, X24, [SP,#0x50+var_20]                            ; +0xc8, 0x8698a4\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0xcc, 0x8698a8\nRET                                                                    ; +0xd0, 0x8698ac\nBL              .__stack_chk_fail                                      ; +0xd4, 0x8698b0", "xrefs": ["PlayLayer::createObjectsFromSetupFinished @ 0x5d7d74", "LevelEditorLayer::onPlaytest @ 0x6642fc", "<???> @ 0x8c0d0"], "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"}