{"type": "func", "start": 9208936, "end": 9209216, "name": "GJOptionsLayer::nextPosition", "pseudocode": "// \n// GJOptionsLayer::nextPosition from 0x8c8468 to 0x8c8580 (280 bytes)\n// \n// 4 xrefs:\n// > GJOptionsLayer::addToggleInternal @ 0x8dad04\n// > GameOptionsLayer::setupOptions @ 0x8dbee4\n// > GameOptionsLayer::setupOptions @ 0x8dc1d4\n// > <???> @ 0x63270\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\ncocos2d::CCPoint GJOptionsLayer::nextPosition(GJOptionsLayer *a1, int a2)\n{\n  cocos2d::CCPoint *v2; // x8\n  cocos2d::CCPoint *v4; // x23\n  cocos2d::CCDirector *v5; // x0\n  int v6; // w0\n  int v7; // w25\n  int v8; // w19\n  const cocos2d::CCPoint *v9; // x1\n  float v13; // [xsp+60h] [xbp+60h]\n  float v14; // [xsp+64h] [xbp+64h]\n  cocos2d::CCPoint v15; // [xsp+68h] [xbp+68h] BYREF\n  cocos2d::CCPoint v16; // [xsp+70h] [xbp+70h] BYREF\n  cocos2d::CCPoint result; // 0:s0.4,4:s1.4\n\n  v4 = v2;\n  v5 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::getWinSize(v5);\n  cocos2d::CCPoint::CCPoint(&v15, (float)(v13 * 0.5) + -160.0, (float)((float)(v14 * 0.5) + 80.0) + a1->m_offset);\n  cocos2d::CCPoint::CCPoint(&v16, (float)(v13 * 0.5) + 32.0, v15.y);\n  v6 = GJOptionsLayer::countForPage(a1, a2);\n  v7 = v6 + 1;\n  v8 = v6;\n  if ( ((v6 + 1) & 1) != 0 )\n    v9 = &v15;\n  else\n    v9 = &v16;\n  cocos2d::CCPoint::CCPoint(v4, v9);\n  if ( v7 > 2 )\n  {\n    result.y = (float)(int)vcvtms_s32_f32((float)v8 * 0.5);\n    result.x = v4->y - (float)(result.y * a1->m_gap);\n    v4->y = result.x;\n  }\n  return result;\n}", "assembly": "; \n; GJOptionsLayer::nextPosition from 0x8c8468 to 0x8c8580 (280 bytes)\n; \n; 4 xrefs:\n; > GJOptionsLayer::addToggleInternal @ 0x8dad04\n; > GameOptionsLayer::setupOptions @ 0x8dbee4\n; > GameOptionsLayer::setupOptions @ 0x8dc1d4\n; > <???> @ 0x63270\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_80]!                                ; +0x0, 0x8c8468\nMOV             X29, SP                                                ; +0x4, 0x8c846c\nSTP             X19, X20, [SP,#0x80+var_70]                            ; +0x8, 0x8c8470\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x8c8474\nSTR             X25, [SP,#0x80+var_40]                                 ; +0x10, 0x8c8478\nSTP             X23, X24, [SP,#0x80+var_50]                            ; +0x14, 0x8c847c\nMOV             X24, X0                                                ; +0x18, 0x8c8480\nSTR             X1, [X29,#0x80+var_28]                                 ; +0x1c, 0x8c8484\nLDR             X0, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x8c8488\nMOV             X23, X8                                                ; +0x24, 0x8c848c\nSTR             D8, [SP,#0x80+var_38]                                  ; +0x28, 0x8c8490\nFMOV            S8, #0.5                                               ; +0x2c, 0x8c8494\nLDR             X0, [X0]; this                                         ; +0x30, 0x8c8498\nSTP             X21, X22, [SP,#0x80+var_60]                            ; +0x34, 0x8c849c\nSTR             X0, [X29,#0x80+var_8]                                  ; +0x38, 0x8c84a0\nADD             X22, X29, #0x80+var_18                                 ; +0x3c, 0x8c84a4\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x40, 0x8c84a8\nADD             X21, X29, #0x80+var_10                                 ; +0x44, 0x8c84ac\nADD             X8, X29, #0x80+var_20                                  ; +0x48, 0x8c84b0\nBL              _ZN7cocos2d10CCDirector10getWinSizeEv; cocos2d::CCDirector::getWinSize(void) ; +0x4c, 0x8c84b4\nLDR             S0, [X29,#0x80+var_1C]                                 ; +0x50, 0x8c84b8\nMOV             X0, X22; this                                          ; +0x54, 0x8c84bc\nLDR             S1, =0x42A00000                                        ; +0x58, 0x8c84c0\nLDR             S3, [X29,#0x80+var_20]                                 ; +0x5c, 0x8c84c4\nFMADD           S1, S0, S8, S1                                         ; +0x60, 0x8c84c8\nLDR             S0, =0xC3200000                                        ; +0x64, 0x8c84cc\nLDR             S2, [X24,#0x400]                                       ; +0x68, 0x8c84d0\nFMADD           S0, S3, S8, S0; float                                  ; +0x6c, 0x8c84d4\nFADD            S1, S1, S2; float                                      ; +0x70, 0x8c84d8\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x74, 0x8c84dc\nLDR             S2, [X29,#0x80+var_20]                                 ; +0x78, 0x8c84e0\nMOV             X0, X21; this                                          ; +0x7c, 0x8c84e4\nLDR             S0, =0x42000000                                        ; +0x80, 0x8c84e8\nLDR             S1, [X29,#0x80+var_14]; float                          ; +0x84, 0x8c84ec\nFMADD           S0, S2, S8, S0; float                                  ; +0x88, 0x8c84f0\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x8c, 0x8c84f4\nLDR             X1, [X29,#0x80+var_28]; int                            ; +0x90, 0x8c84f8\nMOV             X0, X24; this                                          ; +0x94, 0x8c84fc\nBL              _ZN14GJOptionsLayer12countForPageEi; GJOptionsLayer::countForPage(int) ; +0x98, 0x8c8500\nADD             W25, W0, #1                                            ; +0x9c, 0x8c8504\nAND             W1, W25, #1                                            ; +0xa0, 0x8c8508\nMOV             W19, W0                                                ; +0xa4, 0x8c850c\nCMP             W1, WZR                                                ; +0xa8, 0x8c8510\nMOV             X0, X23; this                                          ; +0xac, 0x8c8514\nCSEL            X1, X22, X21, NE; cocos2d::CCPoint *                   ; +0xb0, 0x8c8518\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0xb4, 0x8c851c\nCMP             W25, #2                                                ; +0xb8, 0x8c8520\nB.LE            loc_8C8548                                             ; +0xbc, 0x8c8524\nSCVTF           S1, W19                                                ; +0xc0, 0x8c8528\nLDR             S0, [X24,#0x3C4]                                       ; +0xc4, 0x8c852c\nLDR             S2, [X23,#4]                                           ; +0xc8, 0x8c8530\nFMUL            S1, S1, S8                                             ; +0xcc, 0x8c8534\nFCVTMS          W19, S1                                                ; +0xd0, 0x8c8538\nSCVTF           S1, W19                                                ; +0xd4, 0x8c853c\nFMSUB           S0, S1, S0, S2                                         ; +0xd8, 0x8c8540\nSTR             S0, [X23,#4]                                           ; +0xdc, 0x8c8544\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xe0, 0x8c8548\nMOV             X0, X23                                                ; +0xe4, 0x8c854c\nLDR             X2, [X29,#0x80+var_8]                                  ; +0xe8, 0x8c8550\nLDR             X1, [X20]                                              ; +0xec, 0x8c8554\nCMP             X2, X1                                                 ; +0xf0, 0x8c8558\nB.NE            loc_8C857C                                             ; +0xf4, 0x8c855c\nLDP             X19, X20, [SP,#0x80+var_70]                            ; +0xf8, 0x8c8560\nLDP             X21, X22, [SP,#0x80+var_60]                            ; +0xfc, 0x8c8564\nLDP             X23, X24, [SP,#0x80+var_50]                            ; +0x100, 0x8c8568\nLDR             X25, [SP,#0x80+var_40]                                 ; +0x104, 0x8c856c\nLDR             D8, [SP,#0x80+var_38]                                  ; +0x108, 0x8c8570\nLDP             X29, X30, [SP+0x80+var_80],#0x80                       ; +0x10c, 0x8c8574\nRET                                                                    ; +0x110, 0x8c8578\nBL              .__stack_chk_fail                                      ; +0x114, 0x8c857c", "xrefs": ["GJOptionsLayer::addToggleInternal @ 0x8dad04", "GameOptionsLayer::setupOptions @ 0x8dbee4", "GameOptionsLayer::setupOptions @ 0x8dc1d4", "<???> @ 0x63270"], "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"}