{"type": "func", "start": 6443056112, "end": 6443056395, "name": "cocos2d::ccpAngle", "pseudocode": "// \n// cocos2d::ccpAngle from 0x180093bf0 to 0x180093d0b (283 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b6618\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\nfloat __fastcall cocos2d::ccpAngle(cocos2d *this, struct cocos2d::CCPoint *a2, const struct cocos2d::CCPoint *a3)\n{\n  float v5; // xmm1_4\n  float v6; // xmm0_4\n  float v7; // xmm1_4\n  float v8; // xmm0_4\n  float result; // xmm0_4\n  float v10; // [rsp+40h] [rbp+8h] BYREF\n  float v11; // [rsp+44h] [rbp+Ch]\n  float v12; // [rsp+48h] [rbp+10h] BYREF\n  float v13; // [rsp+4Ch] [rbp+14h]\n\n  v5 = (float)(a2->x * a2->x) + (float)(a2->y * a2->y);\n  if ( v5 < 0.0 )\n    v6 = sqrtf(v5);\n  else\n    v6 = fsqrt(v5);\n  if ( v6 == 0.0 )\n    kmVec2Fill(&v10, 1.0, 0.0);\n  else\n    cocos2d::CCSize::operator/((float *)a2, &v10, v6);\n  v7 = (float)(*(float *)this * *(float *)this) + (float)(*((float *)this + 1) * *((float *)this + 1));\n  if ( v7 < 0.0 )\n    v8 = sqrtf(v7);\n  else\n    v8 = fsqrt(v7);\n  if ( v8 == 0.0 )\n    kmVec2Fill(&v12, 1.0, 0.0);\n  else\n    cocos2d::CCSize::operator/((float *)this, &v12, v8);\n  result = acosf((float)(v12 * v10) + (float)(v11 * v13));\n  if ( fabs(result) < 0.00000011920929 )\n    return 0.0;\n  return result;\n}", "assembly": "; \n; cocos2d::ccpAngle from 0x180093bf0 to 0x180093d0b (283 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b6618\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\nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x180093bf0\npush    rdi                                                            ; +0x5, 0x180093bf5\nsub     rsp, 30h                                                       ; +0x6, 0x180093bf6\nmovss   xmm0, dword ptr [rdx+4]                                        ; +0xa, 0x180093bfa\nmov     rbx, rdx                                                       ; +0xf, 0x180093bff\nmovss   xmm1, dword ptr [rdx]                                          ; +0x12, 0x180093c02\nmov     rdi, rcx                                                       ; +0x16, 0x180093c06\nmulss   xmm0, xmm0                                                     ; +0x19, 0x180093c09\nmulss   xmm1, xmm1                                                     ; +0x1d, 0x180093c0d\nmovaps  [rsp+38h+var_18], xmm6                                         ; +0x21, 0x180093c11\naddss   xmm1, xmm0                                                     ; +0x26, 0x180093c16\nxorps   xmm0, xmm0                                                     ; +0x2a, 0x180093c1a\nucomiss xmm0, xmm1                                                     ; +0x2d, 0x180093c1d\nja      short loc_180093C2B                                            ; +0x30, 0x180093c20\nxorps   xmm0, xmm0                                                     ; +0x32, 0x180093c22\nsqrtss  xmm0, xmm1                                                     ; +0x35, 0x180093c25\njmp     short loc_180093C33                                            ; +0x39, 0x180093c29\nmovaps  xmm0, xmm1; X                                                  ; +0x3b, 0x180093c2b\ncall    sqrtf                                                          ; +0x3e, 0x180093c2e\nxorps   xmm6, xmm6                                                     ; +0x43, 0x180093c33\nucomiss xmm0, xmm6                                                     ; +0x46, 0x180093c36\njp      short loc_180093C54                                            ; +0x49, 0x180093c39\njnz     short loc_180093C54                                            ; +0x4b, 0x180093c3b\nmovss   xmm1, cs:flt_1800E61A8                                         ; +0x4d, 0x180093c3d\nlea     rcx, [rsp+38h+arg_0]                                           ; +0x55, 0x180093c45\nxorps   xmm2, xmm2                                                     ; +0x5a, 0x180093c4a\ncall    kmVec2Fill                                                     ; +0x5d, 0x180093c4d\njmp     short loc_180093C64                                            ; +0x62, 0x180093c52\nmovaps  xmm2, xmm0                                                     ; +0x64, 0x180093c54\nlea     rdx, [rsp+38h+arg_0]                                           ; +0x67, 0x180093c57\nmov     rcx, rbx                                                       ; +0x6c, 0x180093c5c\ncall    ??KCCSize@cocos2d@@QEBA?AV01@M@Z; cocos2d::CCSize::operator/(float) ; +0x6f, 0x180093c5f\nmovss   xmm0, dword ptr [rdi+4]                                        ; +0x74, 0x180093c64\nmovss   xmm1, dword ptr [rdi]                                          ; +0x79, 0x180093c69\nmulss   xmm0, xmm0                                                     ; +0x7d, 0x180093c6d\nmulss   xmm1, xmm1                                                     ; +0x81, 0x180093c71\naddss   xmm1, xmm0                                                     ; +0x85, 0x180093c75\nxorps   xmm0, xmm0                                                     ; +0x89, 0x180093c79\nucomiss xmm0, xmm1                                                     ; +0x8c, 0x180093c7c\nja      short loc_180093C8A                                            ; +0x8f, 0x180093c7f\nxorps   xmm0, xmm0                                                     ; +0x91, 0x180093c81\nsqrtss  xmm0, xmm1                                                     ; +0x94, 0x180093c84\njmp     short loc_180093C92                                            ; +0x98, 0x180093c88\nmovaps  xmm0, xmm1; X                                                  ; +0x9a, 0x180093c8a\ncall    sqrtf                                                          ; +0x9d, 0x180093c8d\nucomiss xmm0, xmm6                                                     ; +0xa2, 0x180093c92\njp      short loc_180093CB0                                            ; +0xa5, 0x180093c95\njnz     short loc_180093CB0                                            ; +0xa7, 0x180093c97\nmovss   xmm1, cs:flt_1800E61A8                                         ; +0xa9, 0x180093c99\nlea     rcx, [rsp+38h+arg_8]                                           ; +0xb1, 0x180093ca1\nxorps   xmm2, xmm2                                                     ; +0xb6, 0x180093ca6\ncall    kmVec2Fill                                                     ; +0xb9, 0x180093ca9\njmp     short loc_180093CC0                                            ; +0xbe, 0x180093cae\nmovaps  xmm2, xmm0                                                     ; +0xc0, 0x180093cb0\nlea     rdx, [rsp+38h+arg_8]                                           ; +0xc3, 0x180093cb3\nmov     rcx, rdi                                                       ; +0xc8, 0x180093cb8\ncall    ??KCCSize@cocos2d@@QEBA?AV01@M@Z; cocos2d::CCSize::operator/(float) ; +0xcb, 0x180093cbb\nmovss   xmm0, [rsp+38h+arg_8]                                          ; +0xd0, 0x180093cc0\nmovss   xmm1, [rsp+38h+arg_4]                                          ; +0xd6, 0x180093cc6\nmulss   xmm0, [rsp+38h+arg_0]                                          ; +0xdc, 0x180093ccc\nmulss   xmm1, [rsp+38h+arg_C]                                          ; +0xe2, 0x180093cd2\naddss   xmm0, xmm1; X                                                  ; +0xe8, 0x180093cd8\ncall    acosf                                                          ; +0xec, 0x180093cdc\nmovss   xmm1, cs:dword_1800E6554                                       ; +0xf1, 0x180093ce1\nmovaps  xmm2, xmm0                                                     ; +0xf9, 0x180093ce9\nandps   xmm2, cs:xmmword_1800E6560                                     ; +0xfc, 0x180093cec\ncomiss  xmm1, xmm2                                                     ; +0x103, 0x180093cf3\njbe     short loc_180093CFB                                            ; +0x106, 0x180093cf6\nxorps   xmm0, xmm0                                                     ; +0x108, 0x180093cf8\nmov     rbx, [rsp+38h+arg_10]                                          ; +0x10b, 0x180093cfb\nmovaps  xmm6, [rsp+38h+var_18]                                         ; +0x110, 0x180093d00\nadd     rsp, 30h                                                       ; +0x115, 0x180093d05\npop     rdi                                                            ; +0x119, 0x180093d09\nretn                                                                   ; +0x11a, 0x180093d0a", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b6618"], "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"}