{"type": "func", "start": 7914076, "end": 7914318, "name": "EditorWindowPopup::clampWindowCenter", "pseudocode": "// \n// EditorWindowPopup::clampWindowCenter from 0x78c25c to 0x78c34e (242 bytes)\n// \n// 4 xrefs:\n// > EditorWindowPopup::ccTouchMoved @ 0x78c5da\n// > EditorWindowPopup::ccTouchEnded @ 0x78c6f4\n// > EditorWindowPopup::ccTouchCancelled @ 0x78c7d2\n// > EditorWindowPopup::initWindow @ 0x78cc9e\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:59:37 +0000\n// \n\ncocos2d::CCDirector *__fastcall EditorWindowPopup::clampWindowCenter(cocos2d::CCDirector *a1, int a2, float *a3)\n{\n  float v5; // s15\n  int v6; // r3\n  float v7; // s18\n  float v8; // s17\n  float v9; // s16\n  cocos2d::CCDirector *v10; // r0\n  float v11; // r0\n  float v12; // s17\n  float v13; // s16\n  cocos2d::CCDirector *v14; // r0\n  float v15; // s20\n  float v16; // s19\n  cocos2d::CCDirector *v17; // r0\n  float v18; // r0\n  float v19; // s18\n  float v20; // s21\n  cocos2d::CCDirector *v21; // r0\n  float v22; // r0\n  float v23; // s21\n  float v24; // s18\n  float v25; // s15\n  float v26; // s17\n\n  v5 = *(float *)(a2 + 740);\n  v6 = *(_DWORD *)(a2 + 712);\n  v7 = v5 * *(float *)(a2 + 732);\n  v8 = v5 * *(float *)(a2 + 736);\n  if ( v6 )\n    v9 = *(float *)(v6 + 632);\n  else\n    v9 = 0.0;\n  v10 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1);\n  v11 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v10));\n  v12 = v8 * 0.5;\n  v13 = (float)((float)((float)(v11 + v9) + 10.0) - v12) + 6.0;\n  v14 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v11));\n  v15 = v7 * 0.3;\n  v16 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v14));\n  v17 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v16));\n  v18 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v17));\n  v19 = v7 * 0.5;\n  v20 = v18 - v19;\n  v21 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v18));\n  v22 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v21));\n  v23 = v20 + v15;\n  if ( *a3 >= v23 )\n  {\n    v24 = (float)(v22 + v19) - v15;\n    if ( *a3 > v24 )\n      *a3 = v24;\n  }\n  else\n  {\n    *a3 = v23;\n  }\n  v25 = a3[1];\n  if ( v25 >= v13 )\n  {\n    v26 = v16 - v12;\n    if ( v25 > v26 )\n      a3[1] = v26;\n  }\n  else\n  {\n    a3[1] = v13;\n  }\n  cocos2d::CCPoint::CCPoint(a1, (const cocos2d::CCPoint *)a3);\n  return a1;\n}", "assembly": "; \n; EditorWindowPopup::clampWindowCenter from 0x78c25c to 0x78c34e (242 bytes)\n; \n; 4 xrefs:\n; > EditorWindowPopup::ccTouchMoved @ 0x78c5da\n; > EditorWindowPopup::ccTouchEnded @ 0x78c6f4\n; > EditorWindowPopup::ccTouchCancelled @ 0x78c7d2\n; > EditorWindowPopup::initWindow @ 0x78cc9e\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:59:37 +0000\n; \nPUSH            {R3-R5,LR}                                             ; +0x0, 0x78c25c\nMOV             R5, R0                                                 ; +0x2, 0x78c25e\nVPUSH           {D8-D10}                                               ; +0x4, 0x78c260\nMOV             R4, R2                                                 ; +0x8, 0x78c264\nVLDR            S15, [R1,#0x2E4]                                       ; +0xa, 0x78c266\nLDR.W           R3, [R1,#0x2C8]                                        ; +0xe, 0x78c26a\nVLDR            S18, [R1,#0x2DC]                                       ; +0x12, 0x78c26e\nVLDR            S17, [R1,#0x2E0]                                       ; +0x16, 0x78c272\nVMUL.F32        S18, S15, S18                                          ; +0x1a, 0x78c276\nVMUL.F32        S17, S15, S17                                          ; +0x1e, 0x78c27a\nCBZ             R3, loc_78C286                                         ; +0x22, 0x78c27e\nVLDR            S16, [R3,#0x278]                                       ; +0x24, 0x78c280\nB               loc_78C28A                                             ; +0x28, 0x78c284\nVLDR            S16, =0.0                                              ; +0x2a, 0x78c286\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x2e, 0x78c28a\nBL              _ZN7cocos2d10CCDirector15getScreenBottomEv; cocos2d::CCDirector::getScreenBottom(void) ; +0x32, 0x78c28e\nVMOV.F32        S21, #0.5                                              ; +0x36, 0x78c292\nVLDR            S20, =0.3                                              ; +0x3a, 0x78c296\nVMUL.F32        S17, S17, S21                                          ; +0x3e, 0x78c29a\nVMOV            S15, R0; this                                          ; +0x42, 0x78c29e\nVADD.F32        S16, S15, S16                                          ; +0x46, 0x78c2a2\nVMOV.F32        S15, #10.0                                             ; +0x4a, 0x78c2a6\nVADD.F32        S16, S16, S15                                          ; +0x4e, 0x78c2aa\nVMOV.F32        S15, #6.0                                              ; +0x52, 0x78c2ae\nVSUB.F32        S16, S16, S17                                          ; +0x56, 0x78c2b2\nVADD.F32        S16, S16, S15                                          ; +0x5a, 0x78c2b6\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x5e, 0x78c2ba\nBL              _ZN7cocos2d10CCDirector12getScreenTopEv; cocos2d::CCDirector::getScreenTop(void) ; +0x62, 0x78c2be\nVMUL.F32        S20, S18, S20                                          ; +0x66, 0x78c2c2\nVMOV            S19, R0; this                                          ; +0x6a, 0x78c2c6\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x6e, 0x78c2ca\nBL              _ZN7cocos2d10CCDirector13getScreenLeftEv; cocos2d::CCDirector::getScreenLeft(void) ; +0x72, 0x78c2ce\nVMUL.F32        S18, S18, S21                                          ; +0x76, 0x78c2d2\nVMOV            S15, R0; this                                          ; +0x7a, 0x78c2d6\nVSUB.F32        S21, S15, S18                                          ; +0x7e, 0x78c2da\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x82, 0x78c2de\nBL              _ZN7cocos2d10CCDirector14getScreenRightEv; cocos2d::CCDirector::getScreenRight(void) ; +0x86, 0x78c2e2\nVLDR            S14, [R4]                                              ; +0x8a, 0x78c2e6\nVADD.F32        S21, S21, S20                                          ; +0x8e, 0x78c2ea\nVCMPE.F32       S14, S21                                               ; +0x92, 0x78c2ee\nVMRS            APSR_nzcv, FPSCR                                       ; +0x96, 0x78c2f2\nVMOV            S15, R0                                                ; +0x9a, 0x78c2f6\nBPL             loc_78C302                                             ; +0x9e, 0x78c2fa\nVSTR            S21, [R4]                                              ; +0xa0, 0x78c2fc\nB               loc_78C318                                             ; +0xa4, 0x78c300\nVADD.F32        S18, S15, S18                                          ; +0xa6, 0x78c302\nVSUB.F32        S18, S18, S20                                          ; +0xaa, 0x78c306\nVCMPE.F32       S14, S18                                               ; +0xae, 0x78c30a\nVMRS            APSR_nzcv, FPSCR                                       ; +0xb2, 0x78c30e\nIT GT                                                                  ; +0xb6, 0x78c312\nVSTRGT          S18, [R4]                                              ; +0xb8, 0x78c314\nVLDR            S15, [R4,#4]                                           ; +0xbc, 0x78c318\nVCMPE.F32       S15, S16                                               ; +0xc0, 0x78c31c\nVMRS            APSR_nzcv, FPSCR                                       ; +0xc4, 0x78c320\nBPL             loc_78C32C                                             ; +0xc8, 0x78c324\nVSTR            S16, [R4,#4]                                           ; +0xca, 0x78c326\nB               loc_78C33E                                             ; +0xce, 0x78c32a\nVSUB.F32        S17, S19, S17                                          ; +0xd0, 0x78c32c\nVCMPE.F32       S15, S17                                               ; +0xd4, 0x78c330\nVMRS            APSR_nzcv, FPSCR                                       ; +0xd8, 0x78c334\nIT GT                                                                  ; +0xdc, 0x78c338\nVSTRGT          S17, [R4,#4]                                           ; +0xde, 0x78c33a\nMOV             R0, R5; this                                           ; +0xe2, 0x78c33e\nMOV             R1, R4; cocos2d::CCPoint *                             ; +0xe4, 0x78c340\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0xe6, 0x78c342\nVPOP            {D8-D10}                                               ; +0xea, 0x78c346\nMOV             R0, R5                                                 ; +0xee, 0x78c34a\nPOP             {R3-R5,PC}                                             ; +0xf0, 0x78c34c", "xrefs": ["EditorWindowPopup::ccTouchMoved @ 0x78c5da", "EditorWindowPopup::ccTouchEnded @ 0x78c6f4", "EditorWindowPopup::ccTouchCancelled @ 0x78c7d2", "EditorWindowPopup::initWindow @ 0x78cc9e"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}