{"type": "func", "start": 6442503344, "end": 6442503487, "name": "cocos2d::CCPoint::normalize", "pseudocode": "// \n// cocos2d::CCPoint::normalize from 0x18000ccb0 to 0x18000cd3f (143 bytes)\n// \n// 3 xrefs:\n// > cocos2d::ccpNormalize @ 0x180094152\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801ade64\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\n__int64 __fastcall cocos2d::CCPoint::normalize(cocos2d::CCPoint *this, __int64 a2)\n{\n  float x; // xmm6_4\n  float y; // xmm7_4\n  float v5; // xmm1_4\n  float v6; // xmm0_4\n\n  x = this->x;\n  y = this->y;\n  v5 = (float)(x * x) + (float)(y * y);\n  if ( v5 < 0.0 )\n    v6 = sqrtf(v5);\n  else\n    v6 = fsqrt(v5);\n  if ( v6 == 0.0 )\n  {\n    *(_QWORD *)a2 = 1065353216;\n    return a2;\n  }\n  else\n  {\n    *(float *)a2 = x / v6;\n    *(float *)(a2 + 4) = y / v6;\n    return a2;\n  }\n}", "assembly": "; \n; cocos2d::CCPoint::normalize from 0x18000ccb0 to 0x18000cd3f (143 bytes)\n; \n; 3 xrefs:\n; > cocos2d::ccpNormalize @ 0x180094152\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801ade64\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    rbx                                                            ; +0x0, 0x18000ccb0\nsub     rsp, 40h                                                       ; +0x2, 0x18000ccb2\nmovaps  [rsp+48h+var_18], xmm6                                         ; +0x6, 0x18000ccb6\nmov     rbx, rdx                                                       ; +0xb, 0x18000ccbb\nmovss   xmm6, dword ptr [rcx]                                          ; +0xe, 0x18000ccbe\nmovaps  [rsp+48h+var_28], xmm7                                         ; +0x12, 0x18000ccc2\nmovaps  xmm1, xmm6                                                     ; +0x17, 0x18000ccc7\nmovss   xmm7, dword ptr [rcx+4]                                        ; +0x1a, 0x18000ccca\nmovaps  xmm0, xmm7                                                     ; +0x1f, 0x18000cccf\nmulss   xmm1, xmm6                                                     ; +0x22, 0x18000ccd2\nmulss   xmm0, xmm7                                                     ; +0x26, 0x18000ccd6\naddss   xmm1, xmm0                                                     ; +0x2a, 0x18000ccda\nxorps   xmm0, xmm0                                                     ; +0x2e, 0x18000ccde\nucomiss xmm0, xmm1                                                     ; +0x31, 0x18000cce1\nja      short loc_18000CCEF                                            ; +0x34, 0x18000cce4\nxorps   xmm0, xmm0                                                     ; +0x36, 0x18000cce6\nsqrtss  xmm0, xmm1                                                     ; +0x39, 0x18000cce9\njmp     short loc_18000CCF7                                            ; +0x3d, 0x18000cced\nmovaps  xmm0, xmm1; X                                                  ; +0x3f, 0x18000ccef\ncall    sqrtf                                                          ; +0x42, 0x18000ccf2\nxorps   xmm1, xmm1                                                     ; +0x47, 0x18000ccf7\nucomiss xmm0, xmm1                                                     ; +0x4a, 0x18000ccfa\njp      short loc_18000CD1B                                            ; +0x4d, 0x18000ccfd\njnz     short loc_18000CD1B                                            ; +0x4f, 0x18000ccff\nmov     qword ptr [rbx], 3F800000h                                     ; +0x51, 0x18000cd01\nmov     rax, rbx                                                       ; +0x58, 0x18000cd08\nmovaps  xmm6, [rsp+48h+var_18]                                         ; +0x5b, 0x18000cd0b\nmovaps  xmm7, [rsp+48h+var_28]                                         ; +0x60, 0x18000cd10\nadd     rsp, 40h                                                       ; +0x65, 0x18000cd15\npop     rbx                                                            ; +0x69, 0x18000cd19\nretn                                                                   ; +0x6a, 0x18000cd1a\ndivss   xmm6, xmm0                                                     ; +0x6b, 0x18000cd1b\nmov     rax, rbx                                                       ; +0x6f, 0x18000cd1f\ndivss   xmm7, xmm0                                                     ; +0x72, 0x18000cd22\nmovss   dword ptr [rbx], xmm6                                          ; +0x76, 0x18000cd26\nmovaps  xmm6, [rsp+48h+var_18]                                         ; +0x7a, 0x18000cd2a\nmovss   dword ptr [rbx+4], xmm7                                        ; +0x7f, 0x18000cd2f\nmovaps  xmm7, [rsp+48h+var_28]                                         ; +0x84, 0x18000cd34\nadd     rsp, 40h                                                       ; +0x89, 0x18000cd39\npop     rbx                                                            ; +0x8d, 0x18000cd3d\nretn                                                                   ; +0x8e, 0x18000cd3e", "xrefs": ["cocos2d::ccpNormalize @ 0x180094152", "<???> @ 0x1801438a8", "<???> @ 0x1801ade64"], "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"}