{"type": "func", "start": 8753592, "end": 8754084, "name": "GJBaseGameLayer::rectIntersectsCircle", "pseudocode": "// \n// GJBaseGameLayer::rectIntersectsCircle from 0x8591b8 to 0x8593a4 (492 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::damagingObjectsInRect @ 0x859838\n// > <???> @ 0x2d7c8\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\nbool GJBaseGameLayer::rectIntersectsCircle(GJBaseGameLayer *a1, cocos2d::CCRect a2, cocos2d::CCPoint a3, float a4)\n{\n  cocos2d::CCRect *v4; // x1\n  const cocos2d::CCPoint *v5; // x2\n  cocos2d::CCRect *v6; // x19\n  float x; // s11\n  const cocos2d::CCPoint *v8; // x21\n  float v9; // s0\n  float v10; // s8\n  float v11; // s0\n  float v12; // s12\n  float v13; // s0\n  float v14; // s10\n  float v15; // s0\n  float v16; // s9\n  float v18; // s0\n  float y; // s0\n  cocos2d::CCPoint v20; // [xsp+58h] [xbp+58h] BYREF\n  cocos2d::CCPoint v21; // [xsp+60h] [xbp+60h] BYREF\n  cocos2d::CCPoint v22; // [xsp+68h] [xbp+68h] BYREF\n  cocos2d::CCPoint v23; // [xsp+70h] [xbp+70h] BYREF\n\n  v6 = v4;\n  x = a2.origin.x;\n  v8 = v5;\n  cocos2d::CCRect::getMaxX(v4);\n  v10 = v9;\n  cocos2d::CCRect::getMinX(v6);\n  v12 = v11;\n  cocos2d::CCRect::getMaxY(v6);\n  v14 = v13;\n  cocos2d::CCRect::getMinY(v6);\n  v16 = v15;\n  if ( (unsigned __int8)cocos2d::CCRect::containsPoint(v6, v8) )\n    return 1;\n  cocos2d::CCPoint::CCPoint(&v20, v10, v14);\n  if ( fabsf(cocos2d::ccpDistance(&v20, v8)) < x )\n    return 1;\n  cocos2d::CCPoint::CCPoint(&v21, v10, v16);\n  if ( x > fabsf(cocos2d::ccpDistance(&v21, v8)) )\n    return 1;\n  cocos2d::CCPoint::CCPoint(&v22, v12, v16);\n  if ( x > fabsf(cocos2d::ccpDistance(&v22, v8)) )\n    return 1;\n  cocos2d::CCPoint::CCPoint(&v23, v12, v14);\n  if ( x > fabsf(cocos2d::ccpDistance(&v23, v8)) )\n    return 1;\n  cocos2d::CCPoint::CCPoint(&v23, v8);\n  v18 = v23.x;\n  if ( v10 < v23.x )\n  {\n    v18 = v10;\n    v23.x = v10;\n  }\n  if ( v12 > v18 )\n    v23.x = v12;\n  y = v23.y;\n  if ( v16 > v23.y )\n  {\n    y = v16;\n    v23.y = v16;\n  }\n  if ( v14 < y )\n    v23.y = v14;\n  return x > cocos2d::ccpDistance(&v23, v8);\n}", "assembly": "; \n; GJBaseGameLayer::rectIntersectsCircle from 0x8591b8 to 0x8593a4 (492 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::damagingObjectsInRect @ 0x859838\n; > <???> @ 0x2d7c8\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, 0x8591b8\nMOV             X0, X1; this                                           ; +0x4, 0x8591bc\nMOV             X29, SP                                                ; +0x8, 0x8591c0\nSTP             X19, X20, [SP,#0x80+var_70]                            ; +0xc, 0x8591c4\nSTP             D10, D11, [SP,#0x80+var_48]                            ; +0x10, 0x8591c8\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x14, 0x8591cc\nMOV             X19, X1                                                ; +0x18, 0x8591d0\nFMOV            S11, S0                                                ; +0x1c, 0x8591d4\nSTP             D8, D9, [SP,#0x80+var_58]                              ; +0x20, 0x8591d8\nSTR             D12, [SP,#0x80+var_38]                                 ; +0x24, 0x8591dc\nSTR             X21, [SP,#0x80+var_60]                                 ; +0x28, 0x8591e0\nLDR             X1, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x2c, 0x8591e4\nMOV             X21, X2                                                ; +0x30, 0x8591e8\nLDR             X1, [X1]                                               ; +0x34, 0x8591ec\nSTR             X1, [X29,#0x80+var_8]                                  ; +0x38, 0x8591f0\nBL              _ZNK7cocos2d6CCRect7getMaxXEv; cocos2d::CCRect::getMaxX(void) ; +0x3c, 0x8591f4\nFMOV            S8, S0                                                 ; +0x40, 0x8591f8\nMOV             X0, X19; this                                          ; +0x44, 0x8591fc\nBL              _ZNK7cocos2d6CCRect7getMinXEv; cocos2d::CCRect::getMinX(void) ; +0x48, 0x859200\nFMOV            S12, S0                                                ; +0x4c, 0x859204\nMOV             X0, X19; this                                          ; +0x50, 0x859208\nBL              _ZNK7cocos2d6CCRect7getMaxYEv; cocos2d::CCRect::getMaxY(void) ; +0x54, 0x85920c\nFMOV            S10, S0                                                ; +0x58, 0x859210\nMOV             X0, X19; this                                          ; +0x5c, 0x859214\nBL              _ZNK7cocos2d6CCRect7getMinYEv; cocos2d::CCRect::getMinY(void) ; +0x60, 0x859218\nFMOV            S9, S0                                                 ; +0x64, 0x85921c\nMOV             X0, X19; this                                          ; +0x68, 0x859220\nMOV             X1, X21; cocos2d::CCPoint *                            ; +0x6c, 0x859224\nBL              _ZNK7cocos2d6CCRect13containsPointERKNS_7CCPointE; cocos2d::CCRect::containsPoint(cocos2d::CCPoint const&) ; +0x70, 0x859228\nUXTB            W0, W0                                                 ; +0x74, 0x85922c\nCBZ             W0, loc_859268                                         ; +0x78, 0x859230\nMOV             W0, #1                                                 ; +0x7c, 0x859234\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x80, 0x859238\nLDR             X2, [X29,#0x80+var_8]                                  ; +0x84, 0x85923c\nLDR             X1, [X20]                                              ; +0x88, 0x859240\nCMP             X2, X1                                                 ; +0x8c, 0x859244\nB.NE            loc_85937C                                             ; +0x90, 0x859248\nLDP             X19, X20, [SP,#0x80+var_70]                            ; +0x94, 0x85924c\nLDP             D8, D9, [SP,#0x80+var_58]                              ; +0x98, 0x859250\nLDR             X21, [SP,#0x80+var_60]                                 ; +0x9c, 0x859254\nLDP             D10, D11, [SP,#0x80+var_48]                            ; +0xa0, 0x859258\nLDR             D12, [SP,#0x80+var_38]                                 ; +0xa4, 0x85925c\nLDP             X29, X30, [SP+0x80+var_80],#0x80                       ; +0xa8, 0x859260\nRET                                                                    ; +0xac, 0x859264\nFMOV            S0, S8; float                                          ; +0xb0, 0x859268\nADD             X19, X29, #0x80+var_28                                 ; +0xb4, 0x85926c\nFMOV            S1, S10; float                                         ; +0xb8, 0x859270\nMOV             X0, X19; this                                          ; +0xbc, 0x859274\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xc0, 0x859278\nMOV             X0, X19; this                                          ; +0xc4, 0x85927c\nMOV             X1, X21; cocos2d::CCPoint *                            ; +0xc8, 0x859280\nBL              _ZN7cocos2d11ccpDistanceERKNS_7CCPointES2_; cocos2d::ccpDistance(cocos2d::CCPoint const&,cocos2d::CCPoint const&) ; +0xcc, 0x859284\nFABS            S0, S0                                                 ; +0xd0, 0x859288\nFCMPE           S0, S11                                                ; +0xd4, 0x85928c\nB.MI            loc_859234                                             ; +0xd8, 0x859290\nFMOV            S0, S8; float                                          ; +0xdc, 0x859294\nADD             X19, X29, #0x80+var_20                                 ; +0xe0, 0x859298\nFMOV            S1, S9; float                                          ; +0xe4, 0x85929c\nMOV             X0, X19; this                                          ; +0xe8, 0x8592a0\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xec, 0x8592a4\nMOV             X0, X19; this                                          ; +0xf0, 0x8592a8\nMOV             X1, X21; cocos2d::CCPoint *                            ; +0xf4, 0x8592ac\nBL              _ZN7cocos2d11ccpDistanceERKNS_7CCPointES2_; cocos2d::ccpDistance(cocos2d::CCPoint const&,cocos2d::CCPoint const&) ; +0xf8, 0x8592b0\nFABS            S0, S0                                                 ; +0xfc, 0x8592b4\nFCMPE           S11, S0                                                ; +0x100, 0x8592b8\nB.GT            loc_859234                                             ; +0x104, 0x8592bc\nFMOV            S0, S12; float                                         ; +0x108, 0x8592c0\nADD             X19, X29, #0x80+var_18                                 ; +0x10c, 0x8592c4\nFMOV            S1, S9; float                                          ; +0x110, 0x8592c8\nMOV             X0, X19; this                                          ; +0x114, 0x8592cc\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x118, 0x8592d0\nMOV             X0, X19; this                                          ; +0x11c, 0x8592d4\nMOV             X1, X21; cocos2d::CCPoint *                            ; +0x120, 0x8592d8\nBL              _ZN7cocos2d11ccpDistanceERKNS_7CCPointES2_; cocos2d::ccpDistance(cocos2d::CCPoint const&,cocos2d::CCPoint const&) ; +0x124, 0x8592dc\nFABS            S0, S0                                                 ; +0x128, 0x8592e0\nFCMPE           S11, S0                                                ; +0x12c, 0x8592e4\nB.GT            loc_859234                                             ; +0x130, 0x8592e8\nFMOV            S0, S12; float                                         ; +0x134, 0x8592ec\nADD             X19, X29, #0x80+var_10                                 ; +0x138, 0x8592f0\nFMOV            S1, S10; float                                         ; +0x13c, 0x8592f4\nMOV             X0, X19; this                                          ; +0x140, 0x8592f8\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x144, 0x8592fc\nMOV             X0, X19; this                                          ; +0x148, 0x859300\nMOV             X1, X21; cocos2d::CCPoint *                            ; +0x14c, 0x859304\nBL              _ZN7cocos2d11ccpDistanceERKNS_7CCPointES2_; cocos2d::ccpDistance(cocos2d::CCPoint const&,cocos2d::CCPoint const&) ; +0x150, 0x859308\nFABS            S0, S0                                                 ; +0x154, 0x85930c\nFCMPE           S11, S0                                                ; +0x158, 0x859310\nB.GT            loc_859234                                             ; +0x15c, 0x859314\nMOV             X0, X19; this                                          ; +0x160, 0x859318\nMOV             X1, X21; cocos2d::CCPoint *                            ; +0x164, 0x85931c\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x168, 0x859320\nLDR             S0, [X29,#0x80+var_10]                                 ; +0x16c, 0x859324\nFCMPE           S8, S0                                                 ; +0x170, 0x859328\nB.PL            loc_859338                                             ; +0x174, 0x85932c\nFMOV            S0, S8                                                 ; +0x178, 0x859330\nSTR             S8, [X29,#0x80+var_10]                                 ; +0x17c, 0x859334\nFCMPE           S12, S0                                                ; +0x180, 0x859338\nB.LE            loc_859344                                             ; +0x184, 0x85933c\nSTR             S12, [X29,#0x80+var_10]                                ; +0x188, 0x859340\nLDR             S0, [X29,#0x80+var_C]                                  ; +0x18c, 0x859344\nFCMPE           S9, S0                                                 ; +0x190, 0x859348\nB.LE            loc_859358                                             ; +0x194, 0x85934c\nFMOV            S0, S9                                                 ; +0x198, 0x859350\nSTR             S9, [X29,#0x80+var_C]                                  ; +0x19c, 0x859354\nFCMPE           S10, S0                                                ; +0x1a0, 0x859358\nB.PL            loc_859364                                             ; +0x1a4, 0x85935c\nSTR             S10, [X29,#0x80+var_C]                                 ; +0x1a8, 0x859360\nMOV             X0, X19; this                                          ; +0x1ac, 0x859364\nMOV             X1, X21; cocos2d::CCPoint *                            ; +0x1b0, 0x859368\nBL              _ZN7cocos2d11ccpDistanceERKNS_7CCPointES2_; cocos2d::ccpDistance(cocos2d::CCPoint const&,cocos2d::CCPoint const&) ; +0x1b4, 0x85936c\nFCMPE           S11, S0                                                ; +0x1b8, 0x859370\nCSET            W0, GT                                                 ; +0x1bc, 0x859374\nB               loc_859238                                             ; +0x1c0, 0x859378\nBL              .__stack_chk_fail                                      ; +0x1c4, 0x85937c\nBL              _Unwind_Resume                                         ; +0x1c8, 0x859380\nB               loc_859380                                             ; +0x1cc, 0x859384\nB               loc_859380                                             ; +0x1d0, 0x859388\nB               loc_859380                                             ; +0x1d4, 0x85938c\nB               loc_859380                                             ; +0x1d8, 0x859390\nB               loc_859380                                             ; +0x1dc, 0x859394\nB               loc_859380                                             ; +0x1e0, 0x859398\nB               loc_859380                                             ; +0x1e4, 0x85939c\nB               loc_859380                                             ; +0x1e8, 0x8593a0", "xrefs": ["GJBaseGameLayer::damagingObjectsInRect @ 0x859838", "<???> @ 0x2d7c8"], "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"}