{"type": "func", "start": 4646884, "end": 4647296, "name": "GJBaseGameLayer::rectIntersectsCircle", "pseudocode": "// \n// GJBaseGameLayer::rectIntersectsCircle from 0x46e7e4 to 0x46e980 (412 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::damagingObjectsInRect @ 0x46eda0\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  float x; // r5\n  float y; // r4\n  float width; // s16\n  float v7; // s20\n  float v8; // s19\n  float v9; // s17\n  float v10; // s18\n  cocos2d::CCPoint v12; // [sp+4h] [bp-24h] BYREF\n  cocos2d::CCPoint v13; // [sp+Ch] [bp-1Ch] BYREF\n  cocos2d::CCPoint v14; // [sp+14h] [bp-14h] BYREF\n  cocos2d::CCPoint v15; // [sp+1Ch] [bp-Ch] BYREF\n\n  x = a2.origin.x;\n  y = a2.origin.y;\n  width = a2.size.width;\n  v7 = COERCE_FLOAT(cocos2d::CCRect::getMaxX((cocos2d::CCRect *)LODWORD(a2.origin.x)));\n  v8 = COERCE_FLOAT(cocos2d::CCRect::getMinX((cocos2d::CCRect *)LODWORD(x)));\n  v9 = COERCE_FLOAT(cocos2d::CCRect::getMaxY((cocos2d::CCRect *)LODWORD(x)));\n  v10 = COERCE_FLOAT(cocos2d::CCRect::getMinY((cocos2d::CCRect *)LODWORD(x)));\n  if ( cocos2d::CCRect::containsPoint((cocos2d::CCRect *)LODWORD(x), (const cocos2d::CCPoint *)LODWORD(y)) )\n    return 1;\n  cocos2d::CCPoint::CCPoint(&v12, v7, v9);\n  if ( fabsf(cocos2d::ccpDistance(&v12, (const cocos2d::CCPoint *)LODWORD(y))) < width )\n    return 1;\n  cocos2d::CCPoint::CCPoint(&v13, v7, v10);\n  if ( fabsf(cocos2d::ccpDistance(&v13, (const cocos2d::CCPoint *)LODWORD(y))) < width )\n    return 1;\n  cocos2d::CCPoint::CCPoint(&v14, v8, v10);\n  if ( fabsf(cocos2d::ccpDistance(&v14, (const cocos2d::CCPoint *)LODWORD(y))) < width )\n    return 1;\n  cocos2d::CCPoint::CCPoint(&v15, v8, v9);\n  if ( fabsf(cocos2d::ccpDistance(&v15, (const cocos2d::CCPoint *)LODWORD(y))) < width )\n    return 1;\n  cocos2d::CCPoint::CCPoint(&v15, (const cocos2d::CCPoint *)LODWORD(y));\n  if ( v15.x > v7 )\n    v15.x = v7;\n  if ( v15.x < v8 )\n    v15.x = v8;\n  if ( v15.y < v10 )\n    v15.y = v10;\n  if ( v15.y > v9 )\n    v15.y = v9;\n  return cocos2d::ccpDistance(&v15, (const cocos2d::CCPoint *)LODWORD(y)) < width;\n}", "assembly": "; \n; GJBaseGameLayer::rectIntersectsCircle from 0x46e7e4 to 0x46e980 (412 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::damagingObjectsInRect @ 0x46eda0\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\nPUSH            {R4-R6,LR}                                             ; +0x0, 0x46e7e4\nMOV             R0, R1; this                                           ; +0x2, 0x46e7e6\nLDR             R6, =(__stack_chk_guard_ptr - 0x46E7F6)                ; +0x4, 0x46e7e8\nMOV             R5, R1                                                 ; +0x6, 0x46e7ea\nVPUSH           {D8-D10}                                               ; +0x8, 0x46e7ec\nMOV             R4, R2                                                 ; +0xc, 0x46e7f0\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xe, 0x46e7f2\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x10, 0x46e7f4\nVMOV            S16, R3                                                ; +0x12, 0x46e7f6\nLDR             R3, [R6]                                               ; +0x16, 0x46e7fa\nSUB             SP, SP, #0x28                                          ; +0x18, 0x46e7fc\nSTR             R3, [SP,#0x28+var_4]                                   ; +0x1a, 0x46e7fe\nBL              _ZNK7cocos2d6CCRect7getMaxXEv; cocos2d::CCRect::getMaxX(void) ; +0x1c, 0x46e800\nVMOV            S20, R0                                                ; +0x20, 0x46e804\nMOV             R0, R5; this                                           ; +0x24, 0x46e808\nBL              _ZNK7cocos2d6CCRect7getMinXEv; cocos2d::CCRect::getMinX(void) ; +0x26, 0x46e80a\nVMOV            S19, R0                                                ; +0x2a, 0x46e80e\nMOV             R0, R5; this                                           ; +0x2e, 0x46e812\nBL              _ZNK7cocos2d6CCRect7getMaxYEv; cocos2d::CCRect::getMaxY(void) ; +0x30, 0x46e814\nVMOV            S17, R0                                                ; +0x34, 0x46e818\nMOV             R0, R5; this                                           ; +0x38, 0x46e81c\nBL              _ZNK7cocos2d6CCRect7getMinYEv; cocos2d::CCRect::getMinY(void) ; +0x3a, 0x46e81e\nMOV             R1, R4; cocos2d::CCPoint *                             ; +0x3e, 0x46e822\nVMOV            S18, R0                                                ; +0x40, 0x46e824\nMOV             R0, R5; this                                           ; +0x44, 0x46e828\nBL              _ZNK7cocos2d6CCRect13containsPointERKNS_7CCPointE; cocos2d::CCRect::containsPoint(cocos2d::CCPoint const&) ; +0x46, 0x46e82a\nCMP             R0, #0                                                 ; +0x4a, 0x46e82e\nBNE.W           loc_46E966                                             ; +0x4c, 0x46e830\nB               loc_46E838                                             ; +0x50, 0x46e834\nB               loc_46E974                                             ; +0x52, 0x46e836\nADD             R5, SP, #0x28+var_24                                   ; +0x54, 0x46e838\nVMOV            R1, S20; float                                         ; +0x56, 0x46e83a\nVMOV            R2, S17; float                                         ; +0x5a, 0x46e83e\nMOV             R0, R5; this                                           ; +0x5e, 0x46e842\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x60, 0x46e844\nB               loc_46E84C                                             ; +0x64, 0x46e848\nB               loc_46E974                                             ; +0x66, 0x46e84a\nMOV             R0, R5; this                                           ; +0x68, 0x46e84c\nMOV             R1, R4; cocos2d::CCPoint *                             ; +0x6a, 0x46e84e\nBL              _ZN7cocos2d11ccpDistanceERKNS_7CCPointES2_; cocos2d::ccpDistance(cocos2d::CCPoint const&,cocos2d::CCPoint const&) ; +0x6c, 0x46e850\nVMOV            S15, R0                                                ; +0x70, 0x46e854\nVABS.F32        S15, S15                                               ; +0x74, 0x46e858\nVCMPE.F32       S15, S16                                               ; +0x78, 0x46e85c\nVMRS            APSR_nzcv, FPSCR                                       ; +0x7c, 0x46e860\nBMI             loc_46E966                                             ; +0x80, 0x46e864\nB               loc_46E86A                                             ; +0x82, 0x46e866\nB               loc_46E974                                             ; +0x84, 0x46e868\nADD             R5, SP, #0x28+var_1C                                   ; +0x86, 0x46e86a\nVMOV            R1, S20; float                                         ; +0x88, 0x46e86c\nVMOV            R2, S18; float                                         ; +0x8c, 0x46e870\nMOV             R0, R5; this                                           ; +0x90, 0x46e874\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x92, 0x46e876\nB               loc_46E87E                                             ; +0x96, 0x46e87a\nB               loc_46E974                                             ; +0x98, 0x46e87c\nMOV             R0, R5; this                                           ; +0x9a, 0x46e87e\nMOV             R1, R4; cocos2d::CCPoint *                             ; +0x9c, 0x46e880\nBL              _ZN7cocos2d11ccpDistanceERKNS_7CCPointES2_; cocos2d::ccpDistance(cocos2d::CCPoint const&,cocos2d::CCPoint const&) ; +0x9e, 0x46e882\nVMOV            S15, R0                                                ; +0xa2, 0x46e886\nVABS.F32        S15, S15                                               ; +0xa6, 0x46e88a\nVCMPE.F32       S15, S16                                               ; +0xaa, 0x46e88e\nVMRS            APSR_nzcv, FPSCR                                       ; +0xae, 0x46e892\nBMI             loc_46E966                                             ; +0xb2, 0x46e896\nB               loc_46E89C                                             ; +0xb4, 0x46e898\nB               loc_46E974                                             ; +0xb6, 0x46e89a\nADD             R5, SP, #0x28+var_14                                   ; +0xb8, 0x46e89c\nVMOV            R1, S19; float                                         ; +0xba, 0x46e89e\nVMOV            R2, S18; float                                         ; +0xbe, 0x46e8a2\nMOV             R0, R5; this                                           ; +0xc2, 0x46e8a6\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xc4, 0x46e8a8\nB               loc_46E8B0                                             ; +0xc8, 0x46e8ac\nB               loc_46E974                                             ; +0xca, 0x46e8ae\nMOV             R0, R5; this                                           ; +0xcc, 0x46e8b0\nMOV             R1, R4; cocos2d::CCPoint *                             ; +0xce, 0x46e8b2\nBL              _ZN7cocos2d11ccpDistanceERKNS_7CCPointES2_; cocos2d::ccpDistance(cocos2d::CCPoint const&,cocos2d::CCPoint const&) ; +0xd0, 0x46e8b4\nVMOV            S15, R0                                                ; +0xd4, 0x46e8b8\nVABS.F32        S15, S15                                               ; +0xd8, 0x46e8bc\nVCMPE.F32       S15, S16                                               ; +0xdc, 0x46e8c0\nVMRS            APSR_nzcv, FPSCR                                       ; +0xe0, 0x46e8c4\nBMI             loc_46E966                                             ; +0xe4, 0x46e8c8\nADD             R5, SP, #0x28+var_C                                    ; +0xe6, 0x46e8ca\nVMOV            R1, S19; float                                         ; +0xe8, 0x46e8cc\nVMOV            R2, S17; float                                         ; +0xec, 0x46e8d0\nMOV             R0, R5; this                                           ; +0xf0, 0x46e8d4\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xf2, 0x46e8d6\nB               loc_46E8DE                                             ; +0xf6, 0x46e8da\nB               loc_46E974                                             ; +0xf8, 0x46e8dc\nMOV             R0, R5; this                                           ; +0xfa, 0x46e8de\nMOV             R1, R4; cocos2d::CCPoint *                             ; +0xfc, 0x46e8e0\nBL              _ZN7cocos2d11ccpDistanceERKNS_7CCPointES2_; cocos2d::ccpDistance(cocos2d::CCPoint const&,cocos2d::CCPoint const&) ; +0xfe, 0x46e8e2\nVMOV            S15, R0                                                ; +0x102, 0x46e8e6\nVABS.F32        S15, S15                                               ; +0x106, 0x46e8ea\nVCMPE.F32       S15, S16                                               ; +0x10a, 0x46e8ee\nVMRS            APSR_nzcv, FPSCR                                       ; +0x10e, 0x46e8f2\nBMI             loc_46E966                                             ; +0x112, 0x46e8f6\nMOV             R1, R4; cocos2d::CCPoint *                             ; +0x114, 0x46e8f8\nMOV             R0, R5; this                                           ; +0x116, 0x46e8fa\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x118, 0x46e8fc\nVLDR            S15, [SP,#0x28+var_C]                                  ; +0x11c, 0x46e900\nMOV             R0, R5; this                                           ; +0x120, 0x46e904\nMOV             R1, R4; cocos2d::CCPoint *                             ; +0x122, 0x46e906\nVCMPE.F32       S15, S20                                               ; +0x124, 0x46e908\nVMRS            APSR_nzcv, FPSCR                                       ; +0x128, 0x46e90c\nIT GT                                                                  ; +0x12c, 0x46e910\nVSTRGT          S20, [SP,#0x28+var_C]                                  ; +0x12e, 0x46e912\nVLDR            S15, [SP,#0x28+var_C]                                  ; +0x132, 0x46e916\nVCMPE.F32       S15, S19                                               ; +0x136, 0x46e91a\nVLDR            S15, [SP,#0x28+var_8]                                  ; +0x13a, 0x46e91e\nVMRS            APSR_nzcv, FPSCR                                       ; +0x13e, 0x46e922\nIT MI                                                                  ; +0x142, 0x46e926\nVSTRMI          S19, [SP,#0x28+var_C]                                  ; +0x144, 0x46e928\nVCMPE.F32       S15, S18                                               ; +0x148, 0x46e92c\nVMRS            APSR_nzcv, FPSCR                                       ; +0x14c, 0x46e930\nIT MI                                                                  ; +0x150, 0x46e934\nVSTRMI          S18, [SP,#0x28+var_8]                                  ; +0x152, 0x46e936\nVLDR            S15, [SP,#0x28+var_8]                                  ; +0x156, 0x46e93a\nVCMPE.F32       S15, S17                                               ; +0x15a, 0x46e93e\nVMRS            APSR_nzcv, FPSCR                                       ; +0x15e, 0x46e942\nIT GT                                                                  ; +0x162, 0x46e946\nVSTRGT          S17, [SP,#0x28+var_8]                                  ; +0x164, 0x46e948\nBL              _ZN7cocos2d11ccpDistanceERKNS_7CCPointES2_; cocos2d::ccpDistance(cocos2d::CCPoint const&,cocos2d::CCPoint const&) ; +0x168, 0x46e94c\nVMOV            S15, R0                                                ; +0x16c, 0x46e950\nVCMPE.F32       S15, S16                                               ; +0x170, 0x46e954\nVMRS            APSR_nzcv, FPSCR                                       ; +0x174, 0x46e958\nITE MI                                                                 ; +0x178, 0x46e95c\nMOVMI           R0, #1                                                 ; +0x17a, 0x46e95e\nMOVPL           R0, #0                                                 ; +0x17c, 0x46e960\nB               loc_46E968                                             ; +0x17e, 0x46e962\nB               loc_46E974                                             ; +0x180, 0x46e964\nMOVS            R0, #1                                                 ; +0x182, 0x46e966\nLDR             R2, [SP,#0x28+var_4]                                   ; +0x184, 0x46e968\nLDR             R3, [R6]                                               ; +0x186, 0x46e96a\nCMP             R2, R3                                                 ; +0x188, 0x46e96c\nBEQ             loc_46E978                                             ; +0x18a, 0x46e96e\nBLX             __stack_chk_fail                                       ; +0x18c, 0x46e970\nBL              __cxa_end_cleanup                                      ; +0x190, 0x46e974\nADD             SP, SP, #0x28 ; '('                                    ; +0x194, 0x46e978\nVPOP            {D8-D10}                                               ; +0x196, 0x46e97a\nPOP             {R4-R6,PC}                                             ; +0x19a, 0x46e97e", "xrefs": ["GJBaseGameLayer::damagingObjectsInRect @ 0x46eda0"], "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"}