{"type": "func", "start": 6443230784, "end": 6443230921, "name": "kmVec2Normalize", "pseudocode": "// \n// kmVec2Normalize from 0x1800be640 to 0x1800be6c9 (137 bytes)\n// \n// 5 xrefs:\n// > kmRay2IntersectTriangle @ 0x1800be2d5\n// > kmRay2IntersectTriangle @ 0x1800be364\n// > kmRay2IntersectTriangle @ 0x1800be3f0\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c3138\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:22:24 +0000\n// \n\nfloat *__fastcall kmVec2Normalize(float *a1, float *a2)\n{\n  float v4; // xmm6_4\n  float v5; // xmm7_4\n  float v6; // xmm7_4\n  float v7; // xmm0_4\n  float v9; // xmm1_4\n  float v10; // xmm0_4\n\n  v4 = a2[1];\n  v5 = kmSQR(*a2);\n  v6 = v5 + kmSQR(v4);\n  if ( v6 < 0.0 )\n    v7 = sqrtf(v6);\n  else\n    v7 = fsqrt(v6);\n  v9 = 1.0 / v7;\n  v10 = (float)(1.0 / v7) * a2[1];\n  *a1 = v9 * *a2;\n  a1[1] = v10;\n  return a1;\n}", "assembly": "; \n; kmVec2Normalize from 0x1800be640 to 0x1800be6c9 (137 bytes)\n; \n; 5 xrefs:\n; > kmRay2IntersectTriangle @ 0x1800be2d5\n; > kmRay2IntersectTriangle @ 0x1800be364\n; > kmRay2IntersectTriangle @ 0x1800be3f0\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c3138\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:22:24 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800be640\npush    rdi                                                            ; +0x5, 0x1800be645\nsub     rsp, 40h                                                       ; +0x6, 0x1800be646\nmovss   xmm0, dword ptr [rdx]                                          ; +0xa, 0x1800be64a\nmov     rdi, rdx                                                       ; +0xe, 0x1800be64e\nmovaps  [rsp+48h+var_18], xmm6                                         ; +0x11, 0x1800be651\nmov     rbx, rcx                                                       ; +0x16, 0x1800be656\nmovss   xmm6, dword ptr [rdx+4]                                        ; +0x19, 0x1800be659\nmovaps  [rsp+48h+var_28], xmm7                                         ; +0x1e, 0x1800be65e\ncall    kmSQR                                                          ; +0x23, 0x1800be663\nmovaps  xmm7, xmm0                                                     ; +0x28, 0x1800be668\nmovaps  xmm0, xmm6                                                     ; +0x2b, 0x1800be66b\ncall    kmSQR                                                          ; +0x2e, 0x1800be66e\naddss   xmm7, xmm0                                                     ; +0x33, 0x1800be673\nxorps   xmm1, xmm1                                                     ; +0x37, 0x1800be677\nucomiss xmm1, xmm7                                                     ; +0x3a, 0x1800be67a\nja      short loc_1800BE688                                            ; +0x3d, 0x1800be67d\nxorps   xmm0, xmm0                                                     ; +0x3f, 0x1800be67f\nsqrtss  xmm0, xmm7                                                     ; +0x42, 0x1800be682\njmp     short loc_1800BE690                                            ; +0x46, 0x1800be686\nmovaps  xmm0, xmm7; X                                                  ; +0x48, 0x1800be688\ncall    sqrtf                                                          ; +0x4b, 0x1800be68b\nmovss   xmm1, cs:flt_1800EC208                                         ; +0x50, 0x1800be690\nmov     rax, rbx                                                       ; +0x58, 0x1800be698\nmovaps  xmm6, [rsp+48h+var_18]                                         ; +0x5b, 0x1800be69b\nmovaps  xmm7, [rsp+48h+var_28]                                         ; +0x60, 0x1800be6a0\ndivss   xmm1, xmm0                                                     ; +0x65, 0x1800be6a5\nmovaps  xmm0, xmm1                                                     ; +0x69, 0x1800be6a9\nmulss   xmm1, dword ptr [rdi]                                          ; +0x6c, 0x1800be6ac\nmulss   xmm0, dword ptr [rdi+4]                                        ; +0x70, 0x1800be6b0\nmovss   dword ptr [rbx], xmm1                                          ; +0x75, 0x1800be6b5\nmovss   dword ptr [rbx+4], xmm0                                        ; +0x79, 0x1800be6b9\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x7e, 0x1800be6be\nadd     rsp, 40h                                                       ; +0x83, 0x1800be6c3\npop     rdi                                                            ; +0x87, 0x1800be6c7\nretn                                                                   ; +0x88, 0x1800be6c8", "xrefs": ["kmRay2IntersectTriangle @ 0x1800be2d5", "kmRay2IntersectTriangle @ 0x1800be364", "kmRay2IntersectTriangle @ 0x1800be3f0", "<???> @ 0x18014cf68", "<???> @ 0x1801c3138"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}