{"type": "func", "start": 6028632, "end": 6028960, "name": "CreateGuidelinesLayer::doClearGuidelines", "pseudocode": "// \n// CreateGuidelinesLayer::doClearGuidelines from 0x5bfd58 to 0x5bfea0 (328 bytes)\n// \n// 2 xrefs:\n// > CreateGuidelinesLayer::FLAlert_Clicked @ 0x5bfee8\n// > <???> @ 0x6cff0\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 CreateGuidelinesLayer::doClearGuidelines(CreateGuidelinesLayer *a1)\n{\n  CustomSongDelegate *m_delegate; // x0\n  __int64 v3; // x22\n  void *v4; // x0\n  unsigned int *v5; // x2\n  int v6; // w1\n  __int64 v7; // [xsp+40h] [xbp+40h] BYREF\n\n  a1->m_infoLabel->setString(a1->m_infoLabel, \"Guidelines cleared\");\n  m_delegate = a1->m_delegate;\n  if ( m_delegate )\n  {\n    v3 = (__int64)m_delegate->getLevelSettings(m_delegate);\n    sub_D153B8((int)&v7, &byte_F288A0);\n    sub_D18EA8(v3 + 392, &v7);\n    v4 = (void *)(v7 - 24);\n    if ( (__int64 *)(v7 - 24) != &qword_124B6B0 )\n    {\n      if ( &pthread_create )\n      {\n        v5 = (unsigned int *)(v7 - 8);\n        do\n          v6 = __ldaxr(v5);\n        while ( __stlxr(v6 - 1, v5) );\n      }\n      else\n      {\n        v6 = *(_DWORD *)(v7 - 8);\n        *(_DWORD *)(v7 - 8) = v6 - 1;\n      }\n      if ( v6 <= 0 )\n        operator delete(v4);\n    }\n    a1->m_delegate->getLevelSettings(a1->m_delegate)->m_guidelinesUpdated = 1;\n  }\n}", "assembly": "; \n; CreateGuidelinesLayer::doClearGuidelines from 0x5bfd58 to 0x5bfea0 (328 bytes)\n; \n; 2 xrefs:\n; > CreateGuidelinesLayer::FLAlert_Clicked @ 0x5bfee8\n; > <???> @ 0x6cff0\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, 0x5bfd58\nADRP            X1, #aGuidelinesClea@PAGE; \"Guidelines cleared\"        ; +0x4, 0x5bfd5c\nMOV             X29, SP                                                ; +0x8, 0x5bfd60\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0xc, 0x5bfd64\nLDR             X2, [X0,#0x2A0]                                        ; +0x10, 0x5bfd68\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0x14, 0x5bfd6c\nSTP             X21, X22, [SP,#0x50+var_30]                            ; +0x18, 0x5bfd70\nMOV             X21, X0                                                ; +0x1c, 0x5bfd74\nMOV             X0, X2                                                 ; +0x20, 0x5bfd78\nLDR             X3, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0x5bfd7c\nADD             X1, X1, #aGuidelinesClea@PAGEOFF; \"Guidelines cleared\" ; +0x28, 0x5bfd80\nLDR             X2, [X2]                                               ; +0x2c, 0x5bfd84\nLDR             X3, [X3]                                               ; +0x30, 0x5bfd88\nLDR             X2, [X2,#0x390]                                        ; +0x34, 0x5bfd8c\nSTR             X3, [X29,#0x50+var_8]                                  ; +0x38, 0x5bfd90\nBLR             X2                                                     ; +0x3c, 0x5bfd94\nLDR             X0, [X21,#0x280]                                       ; +0x40, 0x5bfd98\nCBZ             X0, loc_5BFE08                                         ; +0x44, 0x5bfd9c\nLDR             X1, [X0]                                               ; +0x48, 0x5bfda0\nADD             X20, X29, #0x50+var_10                                 ; +0x4c, 0x5bfda4\nLDR             X1, [X1,#0x18]                                         ; +0x50, 0x5bfda8\nBLR             X1                                                     ; +0x54, 0x5bfdac\nMOV             X22, X0                                                ; +0x58, 0x5bfdb0\nADRP            X1, #byte_F288A0@PAGE                                  ; +0x5c, 0x5bfdb4\nMOV             X0, X20; int                                           ; +0x60, 0x5bfdb8\nADD             X1, X1, #byte_F288A0@PAGEOFF; char *                   ; +0x64, 0x5bfdbc\nADD             X2, X29, #0x50+var_20                                  ; +0x68, 0x5bfdc0\nBL              sub_D153B8                                             ; +0x6c, 0x5bfdc4\nADD             X0, X22, #0x188                                        ; +0x70, 0x5bfdc8\nMOV             X1, X20                                                ; +0x74, 0x5bfdcc\nBL              sub_D18EA8                                             ; +0x78, 0x5bfdd0\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x7c, 0x5bfdd4\nLDR             X2, [X29,#0x50+var_10]                                 ; +0x80, 0x5bfdd8\nSUB             X0, X2, #0x18; p                                       ; +0x84, 0x5bfddc\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x88, 0x5bfde0\nCMP             X0, X1                                                 ; +0x8c, 0x5bfde4\nB.NE            loc_5BFE2C                                             ; +0x90, 0x5bfde8\nLDR             X1, [X21,#0x280]                                       ; +0x94, 0x5bfdec\nMOV             X0, X1                                                 ; +0x98, 0x5bfdf0\nLDR             X1, [X1]                                               ; +0x9c, 0x5bfdf4\nLDR             X1, [X1,#0x18]                                         ; +0xa0, 0x5bfdf8\nBLR             X1                                                     ; +0xa4, 0x5bfdfc\nMOV             W1, #1                                                 ; +0xa8, 0x5bfe00\nSTRB            W1, [X0,#0x190]                                        ; +0xac, 0x5bfe04\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xb0, 0x5bfe08\nLDR             X1, [X29,#0x50+var_8]                                  ; +0xb4, 0x5bfe0c\nLDR             X0, [X19]                                              ; +0xb8, 0x5bfe10\nCMP             X1, X0                                                 ; +0xbc, 0x5bfe14\nB.NE            loc_5BFE70                                             ; +0xc0, 0x5bfe18\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0xc4, 0x5bfe1c\nLDP             X21, X22, [SP,#0x50+var_30]                            ; +0xc8, 0x5bfe20\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0xcc, 0x5bfe24\nRET                                                                    ; +0xd0, 0x5bfe28\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0xd4, 0x5bfe2c\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xd8, 0x5bfe30\nCBZ             X1, loc_5BFE60                                         ; +0xdc, 0x5bfe34\nSUB             X2, X2, #8                                             ; +0xe0, 0x5bfe38\nLDAXR           W1, [X2]                                               ; +0xe4, 0x5bfe3c\nSUB             W3, W1, #1                                             ; +0xe8, 0x5bfe40\nSTLXR           W4, W3, [X2]                                           ; +0xec, 0x5bfe44\nCBNZ            W4, loc_5BFE3C                                         ; +0xf0, 0x5bfe48\nCMP             W1, WZR                                                ; +0xf4, 0x5bfe4c\nB.GT            loc_5BFDEC                                             ; +0xf8, 0x5bfe50\nADD             X1, X29, #0x50+var_18                                  ; +0xfc, 0x5bfe54\nBL              j__ZdlPv; operator delete(void *)                      ; +0x100, 0x5bfe58\nB               loc_5BFDEC                                             ; +0x104, 0x5bfe5c\nLDUR            W1, [X2,#-8]                                           ; +0x108, 0x5bfe60\nSUB             W3, W1, #1                                             ; +0x10c, 0x5bfe64\nSTUR            W3, [X2,#-8]                                           ; +0x110, 0x5bfe68\nB               loc_5BFE4C                                             ; +0x114, 0x5bfe6c\nBL              .__stack_chk_fail                                      ; +0x118, 0x5bfe70\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x11c, 0x5bfe74\nMOV             X19, X0                                                ; +0x120, 0x5bfe78\nLDR             X0, [X29,#0x50+var_10]                                 ; +0x124, 0x5bfe7c\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x128, 0x5bfe80\nSUB             X0, X0, #0x18                                          ; +0x12c, 0x5bfe84\nCMP             X0, X1                                                 ; +0x130, 0x5bfe88\nB.EQ            loc_5BFE98                                             ; +0x134, 0x5bfe8c\nADD             X1, X29, #0x50+var_18                                  ; +0x138, 0x5bfe90\nBL              sub_4DB3D0                                             ; +0x13c, 0x5bfe94\nMOV             X0, X19                                                ; +0x140, 0x5bfe98\nBL              _Unwind_Resume                                         ; +0x144, 0x5bfe9c", "xrefs": ["CreateGuidelinesLayer::FLAlert_Clicked @ 0x5bfee8", "<???> @ 0x6cff0"], "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"}