{"type": "func", "start": 4300052472, "end": 4300052728, "name": "EditorWindowPopup::clampWindowCenter", "pseudocode": "// \n// EditorWindowPopup::clampWindowCenter from 0x1004d97f8 to 0x1004d98f8 (256 bytes)\n// \n// 4 xrefs:\n// > EditorWindowPopup::initWindow @ 0x1004d9798\n// > EditorWindowPopup::ccTouchMoved @ 0x1004da590\n// > EditorWindowPopup::ccTouchEnded @ 0x1004da7fc\n// > EditorWindowPopup::ccTouchCancelled @ 0x1004da938\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 11:06:33 +0000\n// \n\ndouble __usercall EditorWindowPopup::clampWindowCenter@<D0>(__int64 a1@<X0>, __int64 a2@<X1>, _QWORD *a3@<X8>)\n{\n  float v5; // s1\n  float v6; // s11\n  float v7; // s8\n  __int64 v8; // x8\n  float v9; // s9\n  __int64 v10; // x0\n  float v11; // s10\n  float v12; // s9\n  __int64 v13; // x0\n  float v14; // s8\n  float v15; // s12\n  __int64 v16; // x0\n  float v17; // s13\n  float v18; // s11\n  __int64 v19; // x0\n  float v20; // s0\n  float v21; // s0\n\n  v5 = *(float *)(a1 + 1064);\n  v6 = *(float *)(a1 + 1056) * v5;\n  v7 = v5 * *(float *)(a1 + 1060);\n  v8 = *(_QWORD *)(a1 + 1016);\n  if ( v8 )\n    v9 = *(float *)(v8 + 856);\n  else\n    v9 = 0.0;\n  v10 = cocos2d::CCDirector::sharedDirector();\n  v11 = v7 * 0.5;\n  v12 = (float)((float)((float)(v9 + sub_100207EA0(v10)) + 10.0) - (float)(v7 * 0.5)) + 6.0;\n  v13 = cocos2d::CCDirector::sharedDirector();\n  v14 = sub_100207E98(v13);\n  v15 = v6 * 0.3;\n  v16 = cocos2d::CCDirector::sharedDirector();\n  v17 = v6 * 0.5;\n  v18 = (float)(v6 * 0.3) + (float)(sub_100207EA8(v16) - (float)(v6 * 0.5));\n  v19 = cocos2d::CCDirector::sharedDirector();\n  v20 = sub_100207EB0(v19);\n  if ( *(float *)a2 < v18 || (v18 = (float)(v17 + v20) - v15, *(float *)a2 > v18) )\n    *(float *)a2 = v18;\n  v21 = *(float *)(a2 + 4);\n  if ( v21 < v12 || (v12 = v14 - v11, v21 > (float)(v14 - v11)) )\n    *(float *)(a2 + 4) = v12;\n  return sub_1000262F4(a3, (double *)a2);\n}", "assembly": "; \n; EditorWindowPopup::clampWindowCenter from 0x1004d97f8 to 0x1004d98f8 (256 bytes)\n; \n; 4 xrefs:\n; > EditorWindowPopup::initWindow @ 0x1004d9798\n; > EditorWindowPopup::ccTouchMoved @ 0x1004da590\n; > EditorWindowPopup::ccTouchEnded @ 0x1004da7fc\n; > EditorWindowPopup::ccTouchCancelled @ 0x1004da938\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 11:06:33 +0000\n; \nSTP             D13, D12, [SP,#-0x10+var_40]!                          ; +0x0, 0x1004d97f8\nSTP             D11, D10, [SP,#0x40+var_30]                            ; +0x4, 0x1004d97fc\nSTP             D9, D8, [SP,#0x40+var_20]                              ; +0x8, 0x1004d9800\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0xc, 0x1004d9804\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0x10, 0x1004d9808\nADD             X29, SP, #0x40                                         ; +0x14, 0x1004d980c\nMOV             X19, X1                                                ; +0x18, 0x1004d9810\nMOV             X20, X8                                                ; +0x1c, 0x1004d9814\nLDR             S0, [X0,#0x420]                                        ; +0x20, 0x1004d9818\nLDR             S1, [X0,#0x428]                                        ; +0x24, 0x1004d981c\nFMUL            S11, S0, S1                                            ; +0x28, 0x1004d9820\nLDR             S0, [X0,#0x424]                                        ; +0x2c, 0x1004d9824\nFMUL            S8, S1, S0                                             ; +0x30, 0x1004d9828\nLDR             X8, [X0,#0x3F8]                                        ; +0x34, 0x1004d982c\nCBZ             X8, loc_1004D983C                                      ; +0x38, 0x1004d9830\nLDR             S9, [X8,#0x358]                                        ; +0x3c, 0x1004d9834\nB               loc_1004D9840                                          ; +0x40, 0x1004d9838\nFMOV            S9, WZR                                                ; +0x44, 0x1004d983c\nBL              cocos2d__CCDirector__sharedDirector                    ; +0x48, 0x1004d9840\nBL              sub_100207EA0                                          ; +0x4c, 0x1004d9844\nFADD            S0, S9, S0                                             ; +0x50, 0x1004d9848\nFMOV            S1, #10.0                                              ; +0x54, 0x1004d984c\nFADD            S0, S0, S1                                             ; +0x58, 0x1004d9850\nFMOV            S13, #0.5                                              ; +0x5c, 0x1004d9854\nFMUL            S10, S8, S13                                           ; +0x60, 0x1004d9858\nFSUB            S0, S0, S10                                            ; +0x64, 0x1004d985c\nFMOV            S1, #6.0                                               ; +0x68, 0x1004d9860\nFADD            S9, S0, S1                                             ; +0x6c, 0x1004d9864\nBL              cocos2d__CCDirector__sharedDirector                    ; +0x70, 0x1004d9868\nBL              sub_100207E98                                          ; +0x74, 0x1004d986c\nFMOV            S8, S0                                                 ; +0x78, 0x1004d9870\nADRP            X8, #dword_10075BD00@PAGE                              ; +0x7c, 0x1004d9874\nLDR             S0, [X8,#dword_10075BD00@PAGEOFF]                      ; +0x80, 0x1004d9878\nFMUL            S12, S11, S0                                           ; +0x84, 0x1004d987c\nBL              cocos2d__CCDirector__sharedDirector                    ; +0x88, 0x1004d9880\nBL              sub_100207EA8                                          ; +0x8c, 0x1004d9884\nFMUL            S13, S11, S13                                          ; +0x90, 0x1004d9888\nFSUB            S0, S0, S13                                            ; +0x94, 0x1004d988c\nFADD            S11, S12, S0                                           ; +0x98, 0x1004d9890\nBL              cocos2d__CCDirector__sharedDirector                    ; +0x9c, 0x1004d9894\nBL              sub_100207EB0                                          ; +0xa0, 0x1004d9898\nLDR             S1, [X19]                                              ; +0xa4, 0x1004d989c\nFCMP            S1, S11                                                ; +0xa8, 0x1004d98a0\nB.MI            loc_1004D98B8                                          ; +0xac, 0x1004d98a4\nFADD            S0, S13, S0                                            ; +0xb0, 0x1004d98a8\nFSUB            S11, S0, S12                                           ; +0xb4, 0x1004d98ac\nFCMP            S1, S11                                                ; +0xb8, 0x1004d98b0\nB.LE            loc_1004D98BC                                          ; +0xbc, 0x1004d98b4\nSTR             S11, [X19]                                             ; +0xc0, 0x1004d98b8\nLDR             S0, [X19,#4]                                           ; +0xc4, 0x1004d98bc\nFCMP            S0, S9                                                 ; +0xc8, 0x1004d98c0\nB.MI            loc_1004D98D4                                          ; +0xcc, 0x1004d98c4\nFSUB            S9, S8, S10                                            ; +0xd0, 0x1004d98c8\nFCMP            S0, S9                                                 ; +0xd4, 0x1004d98cc\nB.LE            loc_1004D98D8                                          ; +0xd8, 0x1004d98d0\nSTR             S9, [X19,#4]                                           ; +0xdc, 0x1004d98d4\nMOV             X0, X20                                                ; +0xe0, 0x1004d98d8\nMOV             X1, X19                                                ; +0xe4, 0x1004d98dc\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0xe8, 0x1004d98e0\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0xec, 0x1004d98e4\nLDP             D9, D8, [SP,#0x40+var_20]                              ; +0xf0, 0x1004d98e8\nLDP             D11, D10, [SP,#0x40+var_30]                            ; +0xf4, 0x1004d98ec\nLDP             D13, D12, [SP+0x40+var_40],#0x50                       ; +0xf8, 0x1004d98f0\nB               sub_1000262F4                                          ; +0xfc, 0x1004d98f4", "xrefs": ["EditorWindowPopup::initWindow @ 0x1004d9798", "EditorWindowPopup::ccTouchMoved @ 0x1004da590", "EditorWindowPopup::ccTouchEnded @ 0x1004da7fc", "EditorWindowPopup::ccTouchCancelled @ 0x1004da938"], "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"}