{"type": "func", "start": 6866700, "end": 6866860, "name": "CCAnimatedSprite::cleanupSprite", "pseudocode": "// \n// CCAnimatedSprite::cleanupSprite from 0x68c70c to 0x68c7ac (160 bytes)\n// \n// 2 xrefs:\n// > CCAnimatedSprite::loadType @ 0x68cb28\n// > <???> @ 0x72d78\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:50:33 +0000\n// \n\n__int64 __fastcall CCAnimatedSprite::cleanupSprite(CCAnimatedSprite *this)\n{\n  __int64 v2; // x0\n  __int64 v3; // x0\n  SpriteAnimationManager *v4; // x0\n  __int64 v5; // x0\n  __int64 result; // x0\n\n  v2 = *((_QWORD *)this + 84);\n  if ( v2 )\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)v2 + 736LL))(v2);\n  v3 = *((_QWORD *)this + 83);\n  if ( v3 )\n  {\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)v3 + 736LL))(v3);\n    v4 = *((SpriteAnimationManager **)this + 81);\n    if ( !v4 )\n      goto LABEL_6;\n  }\n  else\n  {\n    v4 = *((SpriteAnimationManager **)this + 81);\n    if ( !v4 )\n      goto LABEL_8;\n  }\n  SpriteAnimationManager::doCleanup(v4);\nLABEL_6:\n  v5 = *((_QWORD *)this + 83);\n  if ( v5 )\n    (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v5 + 528LL))(v5, 1);\nLABEL_8:\n  result = *((_QWORD *)this + 84);\n  if ( result )\n    result = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)result + 528LL))(result, 1);\n  *((_DWORD *)this + 170) = 0;\n  *((_QWORD *)this + 81) = 0;\n  *((_QWORD *)this + 83) = 0;\n  *((_QWORD *)this + 84) = 0;\n  *((_QWORD *)this + 82) = 0;\n  return result;\n}", "assembly": "; \n; CCAnimatedSprite::cleanupSprite from 0x68c70c to 0x68c7ac (160 bytes)\n; \n; 2 xrefs:\n; > CCAnimatedSprite::loadType @ 0x68cb28\n; > <???> @ 0x72d78\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:50:33 +0000\n; \nSTP             X29, X30, [SP,#var_20]!                                ; +0x0, 0x68c70c\nMOV             X29, SP                                                ; +0x4, 0x68c710\nSTR             X19, [SP,#0x20+var_10]                                 ; +0x8, 0x68c714\nMOV             X19, X0                                                ; +0xc, 0x68c718\nLDR             X0, [X0,#0x2A0]                                        ; +0x10, 0x68c71c\nCBZ             X0, loc_68C730                                         ; +0x14, 0x68c720\nLDR             X1, [X0]                                               ; +0x18, 0x68c724\nLDR             X1, [X1,#0x2E0]                                        ; +0x1c, 0x68c728\nBLR             X1                                                     ; +0x20, 0x68c72c\nLDR             X0, [X19,#0x298]                                       ; +0x24, 0x68c730\nCBZ             X0, loc_68C7A0                                         ; +0x28, 0x68c734\nLDR             X1, [X0]                                               ; +0x2c, 0x68c738\nLDR             X1, [X1,#0x2E0]                                        ; +0x30, 0x68c73c\nBLR             X1                                                     ; +0x34, 0x68c740\nLDR             X0, [X19,#0x288]; this                                 ; +0x38, 0x68c744\nCBZ             X0, loc_68C750                                         ; +0x3c, 0x68c748\nBL              _ZN22SpriteAnimationManager9doCleanupEv; SpriteAnimationManager::doCleanup(void) ; +0x40, 0x68c74c\nLDR             X0, [X19,#0x298]                                       ; +0x44, 0x68c750\nCBZ             X0, loc_68C768                                         ; +0x48, 0x68c754\nLDR             X2, [X0]                                               ; +0x4c, 0x68c758\nMOV             W1, #1                                                 ; +0x50, 0x68c75c\nLDR             X2, [X2,#0x210]                                        ; +0x54, 0x68c760\nBLR             X2                                                     ; +0x58, 0x68c764\nLDR             X0, [X19,#0x2A0]                                       ; +0x5c, 0x68c768\nCBZ             X0, loc_68C780                                         ; +0x60, 0x68c76c\nLDR             X2, [X0]                                               ; +0x64, 0x68c770\nMOV             W1, #1                                                 ; +0x68, 0x68c774\nLDR             X2, [X2,#0x210]                                        ; +0x6c, 0x68c778\nBLR             X2                                                     ; +0x70, 0x68c77c\nSTR             WZR, [X19,#0x2A8]                                      ; +0x74, 0x68c780\nSTR             XZR, [X19,#0x288]                                      ; +0x78, 0x68c784\nSTR             XZR, [X19,#0x298]                                      ; +0x7c, 0x68c788\nSTR             XZR, [X19,#0x2A0]                                      ; +0x80, 0x68c78c\nSTR             XZR, [X19,#0x290]                                      ; +0x84, 0x68c790\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x88, 0x68c794\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x8c, 0x68c798\nRET                                                                    ; +0x90, 0x68c79c\nLDR             X0, [X19,#0x288]                                       ; +0x94, 0x68c7a0\nCBNZ            X0, loc_68C74C                                         ; +0x98, 0x68c7a4\nB               loc_68C768                                             ; +0x9c, 0x68c7a8", "xrefs": ["CCAnimatedSprite::loadType @ 0x68cb28", "<???> @ 0x72d78"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}