{"type": "func", "start": 6443218736, "end": 6443219232, "name": "kmMat4ExtractPlane", "pseudocode": "// \n// kmMat4ExtractPlane from 0x1800bb730 to 0x1800bb920 (496 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c2f64\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:23 +0000\n// \n\n__m128 *__fastcall kmMat4ExtractPlane(__m128 *a1, float *a2, int a3)\n{\n  float v4; // xmm1_4\n  __m128 v5; // xmm2\n  __m128 v6; // xmm0\n\n  switch ( a3 )\n  {\n    case 0:\n      a1->m128_f32[0] = a2[3] + *a2;\n      a1->m128_f32[1] = a2[7] + a2[4];\n      a1->m128_f32[2] = a2[11] + a2[8];\n      v4 = a2[15] + a2[12];\n      goto LABEL_8;\n    case 1:\n      a1->m128_f32[0] = a2[3] - *a2;\n      a1->m128_f32[1] = a2[7] - a2[4];\n      a1->m128_f32[2] = a2[11] - a2[8];\n      v4 = a2[15] - a2[12];\n      goto LABEL_8;\n    case 2:\n      a1->m128_f32[0] = a2[3] + a2[1];\n      a1->m128_f32[1] = a2[7] + a2[5];\n      a1->m128_f32[2] = a2[11] + a2[9];\n      v4 = a2[15] + a2[13];\n      goto LABEL_8;\n    case 3:\n      a1->m128_f32[0] = a2[3] - a2[1];\n      a1->m128_f32[1] = a2[7] - a2[5];\n      a1->m128_f32[2] = a2[11] - a2[9];\n      v4 = a2[15] - a2[13];\n      goto LABEL_8;\n    case 4:\n      a1->m128_f32[0] = a2[3] + a2[2];\n      a1->m128_f32[1] = a2[7] + a2[6];\n      a1->m128_f32[2] = a2[11] + a2[10];\n      v4 = a2[15] + a2[14];\n      goto LABEL_8;\n    case 5:\n      a1->m128_f32[0] = a2[3] - a2[2];\n      a1->m128_f32[1] = a2[7] - a2[6];\n      a1->m128_f32[2] = a2[11] - a2[10];\n      v4 = a2[15] - a2[14];\nLABEL_8:\n      a1->m128_f32[3] = v4;\n      break;\n    default:\n      break;\n  }\n  v5 = (__m128)a1->m128_u32[0];\n  v5.m128_f32[0] = (float)((float)(v5.m128_f32[0] * v5.m128_f32[0]) + (float)(a1->m128_f32[1] * a1->m128_f32[1]))\n                 + (float)(a1->m128_f32[2] * a1->m128_f32[2]);\n  if ( v5.m128_f32[0] < 0.0 )\n  {\n    v6 = v5;\n    v6.m128_f32[0] = sqrtf(v5.m128_f32[0]);\n  }\n  else\n  {\n    v6 = 0;\n    v6.m128_f32[0] = fsqrt(v5.m128_f32[0]);\n  }\n  *a1 = _mm_div_ps(*a1, _mm_shuffle_ps(v6, v6, 0));\n  return a1;\n}", "assembly": "; \n; kmMat4ExtractPlane from 0x1800bb730 to 0x1800bb920 (496 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c2f64\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:23 +0000\n; \npush    rbx                                                            ; +0x0, 0x1800bb730\nsub     rsp, 20h                                                       ; +0x2, 0x1800bb732\nmov     rbx, rcx                                                       ; +0x6, 0x1800bb736\ncmp     r8d, 5; switch 6 cases                                         ; +0x9, 0x1800bb739\nja      def_1800BB758; jumptable 00000001800BB758 default case         ; +0xd, 0x1800bb73d\nmov     eax, r8d                                                       ; +0x13, 0x1800bb743\nlea     rcx, cs:180000000h                                             ; +0x16, 0x1800bb746\nmov     r8d, ds:(jpt_1800BB758 - 180000000h)[rcx+rax*4]                ; +0x1d, 0x1800bb74d\nadd     r8, rcx                                                        ; +0x25, 0x1800bb755\njmp     r8; switch jump                                                ; +0x28, 0x1800bb758\nmovss   xmm0, dword ptr [rdx+0Ch]; jumptable 00000001800BB758 case 1   ; +0x2b, 0x1800bb75b\nsubss   xmm0, dword ptr [rdx]                                          ; +0x30, 0x1800bb760\nmovss   dword ptr [rbx], xmm0                                          ; +0x34, 0x1800bb764\nmovss   xmm1, dword ptr [rdx+1Ch]                                      ; +0x38, 0x1800bb768\nsubss   xmm1, dword ptr [rdx+10h]                                      ; +0x3d, 0x1800bb76d\nmovss   dword ptr [rbx+4], xmm1                                        ; +0x42, 0x1800bb772\nmovss   xmm0, dword ptr [rdx+2Ch]                                      ; +0x47, 0x1800bb777\nsubss   xmm0, dword ptr [rdx+20h]                                      ; +0x4c, 0x1800bb77c\nmovss   dword ptr [rbx+8], xmm0                                        ; +0x51, 0x1800bb781\nmovss   xmm1, dword ptr [rdx+3Ch]                                      ; +0x56, 0x1800bb786\nsubss   xmm1, dword ptr [rdx+30h]                                      ; +0x5b, 0x1800bb78b\njmp     loc_1800BB8B0                                                  ; +0x60, 0x1800bb790\nmovss   xmm0, dword ptr [rdx+0Ch]; jumptable 00000001800BB758 case 0   ; +0x65, 0x1800bb795\naddss   xmm0, dword ptr [rdx]                                          ; +0x6a, 0x1800bb79a\nmovss   dword ptr [rbx], xmm0                                          ; +0x6e, 0x1800bb79e\nmovss   xmm1, dword ptr [rdx+1Ch]                                      ; +0x72, 0x1800bb7a2\naddss   xmm1, dword ptr [rdx+10h]                                      ; +0x77, 0x1800bb7a7\nmovss   dword ptr [rbx+4], xmm1                                        ; +0x7c, 0x1800bb7ac\nmovss   xmm0, dword ptr [rdx+2Ch]                                      ; +0x81, 0x1800bb7b1\naddss   xmm0, dword ptr [rdx+20h]                                      ; +0x86, 0x1800bb7b6\nmovss   dword ptr [rbx+8], xmm0                                        ; +0x8b, 0x1800bb7bb\nmovss   xmm1, dword ptr [rdx+3Ch]                                      ; +0x90, 0x1800bb7c0\naddss   xmm1, dword ptr [rdx+30h]                                      ; +0x95, 0x1800bb7c5\njmp     loc_1800BB8B0                                                  ; +0x9a, 0x1800bb7ca\nmovss   xmm0, dword ptr [rdx+0Ch]; jumptable 00000001800BB758 case 2   ; +0x9f, 0x1800bb7cf\naddss   xmm0, dword ptr [rdx+4]                                        ; +0xa4, 0x1800bb7d4\nmovss   dword ptr [rbx], xmm0                                          ; +0xa9, 0x1800bb7d9\nmovss   xmm1, dword ptr [rdx+1Ch]                                      ; +0xad, 0x1800bb7dd\naddss   xmm1, dword ptr [rdx+14h]                                      ; +0xb2, 0x1800bb7e2\nmovss   dword ptr [rbx+4], xmm1                                        ; +0xb7, 0x1800bb7e7\nmovss   xmm0, dword ptr [rdx+2Ch]                                      ; +0xbc, 0x1800bb7ec\naddss   xmm0, dword ptr [rdx+24h]                                      ; +0xc1, 0x1800bb7f1\nmovss   dword ptr [rbx+8], xmm0                                        ; +0xc6, 0x1800bb7f6\nmovss   xmm1, dword ptr [rdx+3Ch]                                      ; +0xcb, 0x1800bb7fb\naddss   xmm1, dword ptr [rdx+34h]                                      ; +0xd0, 0x1800bb800\njmp     loc_1800BB8B0                                                  ; +0xd5, 0x1800bb805\nmovss   xmm0, dword ptr [rdx+0Ch]; jumptable 00000001800BB758 case 3   ; +0xda, 0x1800bb80a\nsubss   xmm0, dword ptr [rdx+4]                                        ; +0xdf, 0x1800bb80f\nmovss   dword ptr [rbx], xmm0                                          ; +0xe4, 0x1800bb814\nmovss   xmm1, dword ptr [rdx+1Ch]                                      ; +0xe8, 0x1800bb818\nsubss   xmm1, dword ptr [rdx+14h]                                      ; +0xed, 0x1800bb81d\nmovss   dword ptr [rbx+4], xmm1                                        ; +0xf2, 0x1800bb822\nmovss   xmm0, dword ptr [rdx+2Ch]                                      ; +0xf7, 0x1800bb827\nsubss   xmm0, dword ptr [rdx+24h]                                      ; +0xfc, 0x1800bb82c\nmovss   dword ptr [rbx+8], xmm0                                        ; +0x101, 0x1800bb831\nmovss   xmm1, dword ptr [rdx+3Ch]                                      ; +0x106, 0x1800bb836\nsubss   xmm1, dword ptr [rdx+34h]                                      ; +0x10b, 0x1800bb83b\njmp     short loc_1800BB8B0                                            ; +0x110, 0x1800bb840\nmovss   xmm0, dword ptr [rdx+0Ch]; jumptable 00000001800BB758 case 5   ; +0x112, 0x1800bb842\nsubss   xmm0, dword ptr [rdx+8]                                        ; +0x117, 0x1800bb847\nmovss   dword ptr [rbx], xmm0                                          ; +0x11c, 0x1800bb84c\nmovss   xmm1, dword ptr [rdx+1Ch]                                      ; +0x120, 0x1800bb850\nsubss   xmm1, dword ptr [rdx+18h]                                      ; +0x125, 0x1800bb855\nmovss   dword ptr [rbx+4], xmm1                                        ; +0x12a, 0x1800bb85a\nmovss   xmm0, dword ptr [rdx+2Ch]                                      ; +0x12f, 0x1800bb85f\nsubss   xmm0, dword ptr [rdx+28h]                                      ; +0x134, 0x1800bb864\nmovss   dword ptr [rbx+8], xmm0                                        ; +0x139, 0x1800bb869\nmovss   xmm1, dword ptr [rdx+3Ch]                                      ; +0x13e, 0x1800bb86e\nsubss   xmm1, dword ptr [rdx+38h]                                      ; +0x143, 0x1800bb873\njmp     short loc_1800BB8B0                                            ; +0x148, 0x1800bb878\nmovss   xmm0, dword ptr [rdx+0Ch]; jumptable 00000001800BB758 case 4   ; +0x14a, 0x1800bb87a\naddss   xmm0, dword ptr [rdx+8]                                        ; +0x14f, 0x1800bb87f\nmovss   dword ptr [rbx], xmm0                                          ; +0x154, 0x1800bb884\nmovss   xmm1, dword ptr [rdx+1Ch]                                      ; +0x158, 0x1800bb888\naddss   xmm1, dword ptr [rdx+18h]                                      ; +0x15d, 0x1800bb88d\nmovss   dword ptr [rbx+4], xmm1                                        ; +0x162, 0x1800bb892\nmovss   xmm0, dword ptr [rdx+2Ch]                                      ; +0x167, 0x1800bb897\naddss   xmm0, dword ptr [rdx+28h]                                      ; +0x16c, 0x1800bb89c\nmovss   dword ptr [rbx+8], xmm0                                        ; +0x171, 0x1800bb8a1\nmovss   xmm1, dword ptr [rdx+3Ch]                                      ; +0x176, 0x1800bb8a6\naddss   xmm1, dword ptr [rdx+38h]                                      ; +0x17b, 0x1800bb8ab\nmovss   dword ptr [rbx+0Ch], xmm1                                      ; +0x180, 0x1800bb8b0\nmovss   xmm0, dword ptr [rbx+4]; jumptable 00000001800BB758 default case ; +0x185, 0x1800bb8b5\nmovss   xmm2, dword ptr [rbx]                                          ; +0x18a, 0x1800bb8ba\nmovss   xmm1, dword ptr [rbx+8]                                        ; +0x18e, 0x1800bb8be\nmulss   xmm2, xmm2                                                     ; +0x193, 0x1800bb8c3\nmulss   xmm0, xmm0                                                     ; +0x197, 0x1800bb8c7\nmulss   xmm1, xmm1                                                     ; +0x19b, 0x1800bb8cb\naddss   xmm2, xmm0                                                     ; +0x19f, 0x1800bb8cf\nxorps   xmm0, xmm0                                                     ; +0x1a3, 0x1800bb8d3\naddss   xmm2, xmm1                                                     ; +0x1a6, 0x1800bb8d6\nucomiss xmm0, xmm2                                                     ; +0x1aa, 0x1800bb8da\nja      short loc_1800BB8E8                                            ; +0x1ad, 0x1800bb8dd\nxorps   xmm0, xmm0                                                     ; +0x1af, 0x1800bb8df\nsqrtss  xmm0, xmm2                                                     ; +0x1b2, 0x1800bb8e2\njmp     short loc_1800BB8F0                                            ; +0x1b6, 0x1800bb8e6\nmovaps  xmm0, xmm2; X                                                  ; +0x1b8, 0x1800bb8e8\ncall    sqrtf                                                          ; +0x1bb, 0x1800bb8eb\nmovups  xmm1, xmmword ptr [rbx]                                        ; +0x1c0, 0x1800bb8f0\nmov     rax, rbx                                                       ; +0x1c3, 0x1800bb8f3\nshufps  xmm0, xmm0, 0                                                  ; +0x1c6, 0x1800bb8f6\ndivps   xmm1, xmm0                                                     ; +0x1ca, 0x1800bb8fa\nmovups  xmmword ptr [rbx], xmm1                                        ; +0x1cd, 0x1800bb8fd\nadd     rsp, 20h                                                       ; +0x1d0, 0x1800bb900\npop     rbx                                                            ; +0x1d4, 0x1800bb904\nretn                                                                   ; +0x1d5, 0x1800bb905\nalign 8                                                                ; +0x1d6, 0x1800bb906\ndd offset loc_1800BB795 - 180000000h; jump table for switch statement  ; +0x1d8, 0x1800bb908", "xrefs": ["<???> @ 0x18014cf68", "<???> @ 0x1801c2f64"], "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"}