{"type": "func", "start": 4296435388, "end": 4296435604, "name": "GameSettingsLayer::nextPosition", "pseudocode": "// \n// GameSettingsLayer::nextPosition from 0x1001666bc to 0x100166794 (216 bytes)\n// \n// 1 xrefs:\n// > GameSettingsLayer::addToggle @ 0x1001661f8\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 10:59:48 +0000\n// \n\nvoid __usercall GameSettingsLayer::nextPosition(__int64 a1@<X0>, int a2@<W1>, __int64 a3@<X8>)\n{\n  __int64 v5; // x0\n  float *v6; // x1\n  float v7; // [xsp+8h] [xbp-48h] BYREF\n  float v8[2]; // [xsp+10h] [xbp-40h] BYREF\n  __int64 v9; // [xsp+18h] [xbp-38h] BYREF\n\n  v5 = cocos2d::CCDirector::sharedDirector(a1);\n  cocos2d::CCDirector::getWinSize(&v9, v5);\n  sub_1000262BC(v8, (float)(*(float *)&v9 * 0.5) + -160.0, (float)(*((float *)&v9 + 1) * 0.5) + 75.0);\n  sub_1000262BC(&v7, (float)(*(float *)&v9 * 0.5) + 32.0, v8[1]);\n  if ( (a2 & 1) != 0 )\n    v6 = v8;\n  else\n    v6 = &v7;\n  sub_1000262F4((_QWORD *)a3, (double *)v6);\n  if ( a2 >= 3 )\n    *(float *)(a3 + 4) = *(float *)(a3 + 4) + (float)((float)(int)floorf(vcvts_n_f32_u32(a2 - 1, 1u)) * -37.0);\n}", "assembly": "; \n; GameSettingsLayer::nextPosition from 0x1001666bc to 0x100166794 (216 bytes)\n; \n; 1 xrefs:\n; > GameSettingsLayer::addToggle @ 0x1001661f8\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 10:59:48 +0000\n; \nSUB             SP, SP, #0x60                                          ; +0x0, 0x1001666bc\nSTP             D9, D8, [SP,#0x50+var_30]                              ; +0x4, 0x1001666c0\nSTP             X22, X21, [SP,#0x50+var_20]                            ; +0x8, 0x1001666c4\nSTP             X20, X19, [SP,#0x50+var_10]                            ; +0xc, 0x1001666c8\nSTP             X29, X30, [SP,#0x50+var_s0]                            ; +0x10, 0x1001666cc\nADD             X29, SP, #0x50                                         ; +0x14, 0x1001666d0\nMOV             X20, X1                                                ; +0x18, 0x1001666d4\nMOV             X19, X8                                                ; +0x1c, 0x1001666d8\nBL              cocos2d__CCDirector__sharedDirector                    ; +0x20, 0x1001666dc\nADD             X8, SP, #0x50+var_38                                   ; +0x24, 0x1001666e0\nBL              cocos2d__CCDirector__getWinSize                        ; +0x28, 0x1001666e4\nFMOV            S8, #0.5                                               ; +0x2c, 0x1001666e8\nLDP             S0, S1, [SP,#0x50+var_38]                              ; +0x30, 0x1001666ec\nFMUL            S0, S0, S8                                             ; +0x34, 0x1001666f0\nMOV             W8, #0xC3200000                                        ; +0x38, 0x1001666f4\nFMOV            S2, W8                                                 ; +0x3c, 0x1001666f8\nFADD            S0, S0, S2                                             ; +0x40, 0x1001666fc\nFMUL            S1, S1, S8                                             ; +0x44, 0x100166700\nMOV             W8, #0x42960000                                        ; +0x48, 0x100166704\nFMOV            S2, W8                                                 ; +0x4c, 0x100166708\nFADD            S1, S1, S2                                             ; +0x50, 0x10016670c\nADD             X21, SP, #0x50+var_40                                  ; +0x54, 0x100166710\nADD             X0, SP, #0x50+var_40                                   ; +0x58, 0x100166714\nBL              sub_1000262BC                                          ; +0x5c, 0x100166718\nLDR             S0, [SP,#0x50+var_38]                                  ; +0x60, 0x10016671c\nFMUL            S0, S0, S8                                             ; +0x64, 0x100166720\nMOVI            V1.2S, #0x42,LSL#24 ; 'B'                              ; +0x68, 0x100166724\nFADD            S0, S0, S1                                             ; +0x6c, 0x100166728\nLDR             S1, [SP,#0x50+var_3C]                                  ; +0x70, 0x10016672c\nADD             X22, SP, #0x50+var_48                                  ; +0x74, 0x100166730\nADD             X0, SP, #0x50+var_48                                   ; +0x78, 0x100166734\nBL              sub_1000262BC                                          ; +0x7c, 0x100166738\nTST             W20, #1                                                ; +0x80, 0x10016673c\nCSEL            X1, X22, X21, EQ                                       ; +0x84, 0x100166740\nMOV             X0, X19                                                ; +0x88, 0x100166744\nBL              sub_1000262F4                                          ; +0x8c, 0x100166748\nCMP             W20, #3                                                ; +0x90, 0x10016674c\nB.LT            loc_10016677C                                          ; +0x94, 0x100166750\nSUB             W8, W20, #1                                            ; +0x98, 0x100166754\nUCVTF           S0, W8, #1                                             ; +0x9c, 0x100166758\nFRINTM          S0, S0                                                 ; +0xa0, 0x10016675c\nFCVTZS          S0, S0                                                 ; +0xa4, 0x100166760\nSCVTF           S0, S0                                                 ; +0xa8, 0x100166764\nLDR             S1, [X19,#4]                                           ; +0xac, 0x100166768\nMOV             W8, #0xC2140000                                        ; +0xb0, 0x10016676c\nFMOV            S2, W8                                                 ; +0xb4, 0x100166770\nFMADD           S0, S0, S2, S1                                         ; +0xb8, 0x100166774\nSTR             S0, [X19,#4]                                           ; +0xbc, 0x100166778\nLDP             X29, X30, [SP,#0x50+var_s0]                            ; +0xc0, 0x10016677c\nLDP             X20, X19, [SP,#0x50+var_10]                            ; +0xc4, 0x100166780\nLDP             X22, X21, [SP,#0x50+var_20]                            ; +0xc8, 0x100166784\nLDP             D9, D8, [SP,#0x50+var_30]                              ; +0xcc, 0x100166788\nADD             SP, SP, #0x60 ; '`'                                    ; +0xd0, 0x10016678c\nRET                                                                    ; +0xd4, 0x100166790", "xrefs": ["GameSettingsLayer::addToggle @ 0x1001661f8"], "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"}