{"type": "func", "start": 6443226208, "end": 6443226369, "name": "kmQuaternionNormalize", "pseudocode": "// \n// kmQuaternionNormalize from 0x1800bd460 to 0x1800bd501 (161 bytes)\n// \n// 3 xrefs:\n// > kmQuaternionRotationBetweenVec3 @ 0x1800bd7ce\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c306c\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 kmQuaternionNormalize(float *a1, float *a2)\n{\n  float v4; // xmm3_4\n  float v5; // xmm0_4\n\n  v4 = (float)((float)((float)(a2[1] * a2[1]) + (float)(*a2 * *a2)) + (float)(a2[2] * a2[2])) + (float)(a2[3] * a2[3]);\n  if ( v4 < 0.0 )\n    v5 = sqrtf(v4);\n  else\n    v5 = fsqrt(v4);\n  *a1 = (float)(1.0 / v5) * *a2;\n  a1[1] = (float)(1.0 / v5) * a2[1];\n  a1[2] = (float)(1.0 / v5) * a2[2];\n  a1[3] = (float)(1.0 / v5) * a2[3];\n  return a1;\n}", "assembly": "; \n; kmQuaternionNormalize from 0x1800bd460 to 0x1800bd501 (161 bytes)\n; \n; 3 xrefs:\n; > kmQuaternionRotationBetweenVec3 @ 0x1800bd7ce\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c306c\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, 0x1800bd460\npush    rdi                                                            ; +0x5, 0x1800bd465\nsub     rsp, 20h                                                       ; +0x6, 0x1800bd466\nmovss   xmm0, dword ptr [rdx]                                          ; +0xa, 0x1800bd46a\nmov     rdi, rdx                                                       ; +0xe, 0x1800bd46e\nmovss   xmm3, dword ptr [rdx+4]                                        ; +0x11, 0x1800bd471\nmov     rbx, rcx                                                       ; +0x16, 0x1800bd476\nmovss   xmm1, dword ptr [rdx+8]                                        ; +0x19, 0x1800bd479\nmovss   xmm2, dword ptr [rdx+0Ch]                                      ; +0x1e, 0x1800bd47e\nmulss   xmm3, xmm3                                                     ; +0x23, 0x1800bd483\nmulss   xmm0, xmm0                                                     ; +0x27, 0x1800bd487\nmulss   xmm1, xmm1                                                     ; +0x2b, 0x1800bd48b\naddss   xmm3, xmm0                                                     ; +0x2f, 0x1800bd48f\nmulss   xmm2, xmm2                                                     ; +0x33, 0x1800bd493\nxorps   xmm0, xmm0                                                     ; +0x37, 0x1800bd497\naddss   xmm3, xmm1                                                     ; +0x3a, 0x1800bd49a\naddss   xmm3, xmm2                                                     ; +0x3e, 0x1800bd49e\nucomiss xmm0, xmm3                                                     ; +0x42, 0x1800bd4a2\nja      short loc_1800BD4B0                                            ; +0x45, 0x1800bd4a5\nxorps   xmm0, xmm0                                                     ; +0x47, 0x1800bd4a7\nsqrtss  xmm0, xmm3                                                     ; +0x4a, 0x1800bd4aa\njmp     short loc_1800BD4B8                                            ; +0x4e, 0x1800bd4ae\nmovaps  xmm0, xmm3; X                                                  ; +0x50, 0x1800bd4b0\ncall    sqrtf                                                          ; +0x53, 0x1800bd4b3\nmovss   xmm2, cs:flt_1800EC208                                         ; +0x58, 0x1800bd4b8\nmov     rax, rbx                                                       ; +0x60, 0x1800bd4c0\ndivss   xmm2, xmm0                                                     ; +0x63, 0x1800bd4c3\nmovaps  xmm0, xmm2                                                     ; +0x67, 0x1800bd4c7\nmovaps  xmm1, xmm2                                                     ; +0x6a, 0x1800bd4ca\nmulss   xmm0, dword ptr [rdi]                                          ; +0x6d, 0x1800bd4cd\nmovss   dword ptr [rbx], xmm0                                          ; +0x71, 0x1800bd4d1\nmovaps  xmm0, xmm2                                                     ; +0x75, 0x1800bd4d5\nmulss   xmm1, dword ptr [rdi+4]                                        ; +0x78, 0x1800bd4d8\nmovss   dword ptr [rbx+4], xmm1                                        ; +0x7d, 0x1800bd4dd\nmulss   xmm0, dword ptr [rdi+8]                                        ; +0x82, 0x1800bd4e2\nmovss   dword ptr [rbx+8], xmm0                                        ; +0x87, 0x1800bd4e7\nmulss   xmm2, dword ptr [rdi+0Ch]                                      ; +0x8c, 0x1800bd4ec\nmovss   dword ptr [rbx+0Ch], xmm2                                      ; +0x91, 0x1800bd4f1\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x96, 0x1800bd4f6\nadd     rsp, 20h                                                       ; +0x9b, 0x1800bd4fb\npop     rdi                                                            ; +0x9f, 0x1800bd4ff\nretn                                                                   ; +0xa0, 0x1800bd500", "xrefs": ["kmQuaternionRotationBetweenVec3 @ 0x1800bd7ce", "<???> @ 0x18014cf68", "<???> @ 0x1801c306c"], "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"}