{"type": "func", "start": 6443203584, "end": 6443204116, "name": "kmMat4ExtractPlane", "pseudocode": "// \n// kmMat4ExtractPlane from 0x1800b7c00 to 0x1800b7e14 (532 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b8c70\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__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 0x1800b7c00 to 0x1800b7e14 (532 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b8c70\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, 0x1800b7c00\nsub     rsp, 20h                                                       ; +0x2, 0x1800b7c02\nmov     rbx, rcx                                                       ; +0x6, 0x1800b7c06\ncmp     r8d, 5; switch 6 cases                                         ; +0x9, 0x1800b7c09\nja      def_1800B7C28; jumptable 00000001800B7C28 default case         ; +0xd, 0x1800b7c0d\nmov     eax, r8d                                                       ; +0x13, 0x1800b7c13\nlea     rcx, cs:180000000h                                             ; +0x16, 0x1800b7c16\nmov     r8d, ds:(jpt_1800B7C28 - 180000000h)[rcx+rax*4]                ; +0x1d, 0x1800b7c1d\nadd     r8, rcx                                                        ; +0x25, 0x1800b7c25\njmp     r8; switch jump                                                ; +0x28, 0x1800b7c28\nalign 10h                                                              ; +0x2b, 0x1800b7c2b\nmovss   xmm0, dword ptr [rdx+0Ch]; jumptable 00000001800B7C28 case 1   ; +0x30, 0x1800b7c30\nsubss   xmm0, dword ptr [rdx]                                          ; +0x35, 0x1800b7c35\nmovss   dword ptr [rbx], xmm0                                          ; +0x39, 0x1800b7c39\nmovss   xmm1, dword ptr [rdx+1Ch]                                      ; +0x3d, 0x1800b7c3d\nsubss   xmm1, dword ptr [rdx+10h]                                      ; +0x42, 0x1800b7c42\nmovss   dword ptr [rbx+4], xmm1                                        ; +0x47, 0x1800b7c47\nmovss   xmm0, dword ptr [rdx+2Ch]                                      ; +0x4c, 0x1800b7c4c\nsubss   xmm0, dword ptr [rdx+20h]                                      ; +0x51, 0x1800b7c51\nmovss   dword ptr [rbx+8], xmm0                                        ; +0x56, 0x1800b7c56\nmovss   xmm1, dword ptr [rdx+3Ch]                                      ; +0x5b, 0x1800b7c5b\nsubss   xmm1, dword ptr [rdx+30h]                                      ; +0x60, 0x1800b7c60\njmp     loc_1800B7DA6                                                  ; +0x65, 0x1800b7c65\nalign 10h                                                              ; +0x6a, 0x1800b7c6a\nmovss   xmm0, dword ptr [rdx+0Ch]; jumptable 00000001800B7C28 case 0   ; +0x70, 0x1800b7c70\naddss   xmm0, dword ptr [rdx]                                          ; +0x75, 0x1800b7c75\nmovss   dword ptr [rbx], xmm0                                          ; +0x79, 0x1800b7c79\nmovss   xmm1, dword ptr [rdx+1Ch]                                      ; +0x7d, 0x1800b7c7d\naddss   xmm1, dword ptr [rdx+10h]                                      ; +0x82, 0x1800b7c82\nmovss   dword ptr [rbx+4], xmm1                                        ; +0x87, 0x1800b7c87\nmovss   xmm0, dword ptr [rdx+2Ch]                                      ; +0x8c, 0x1800b7c8c\naddss   xmm0, dword ptr [rdx+20h]                                      ; +0x91, 0x1800b7c91\nmovss   dword ptr [rbx+8], xmm0                                        ; +0x96, 0x1800b7c96\nmovss   xmm1, dword ptr [rdx+3Ch]                                      ; +0x9b, 0x1800b7c9b\naddss   xmm1, dword ptr [rdx+30h]                                      ; +0xa0, 0x1800b7ca0\njmp     loc_1800B7DA6                                                  ; +0xa5, 0x1800b7ca5\nalign 10h                                                              ; +0xaa, 0x1800b7caa\nmovss   xmm0, dword ptr [rdx+0Ch]; jumptable 00000001800B7C28 case 2   ; +0xb0, 0x1800b7cb0\naddss   xmm0, dword ptr [rdx+4]                                        ; +0xb5, 0x1800b7cb5\nmovss   dword ptr [rbx], xmm0                                          ; +0xba, 0x1800b7cba\nmovss   xmm1, dword ptr [rdx+1Ch]                                      ; +0xbe, 0x1800b7cbe\naddss   xmm1, dword ptr [rdx+14h]                                      ; +0xc3, 0x1800b7cc3\nmovss   dword ptr [rbx+4], xmm1                                        ; +0xc8, 0x1800b7cc8\nmovss   xmm0, dword ptr [rdx+2Ch]                                      ; +0xcd, 0x1800b7ccd\naddss   xmm0, dword ptr [rdx+24h]                                      ; +0xd2, 0x1800b7cd2\nmovss   dword ptr [rbx+8], xmm0                                        ; +0xd7, 0x1800b7cd7\nmovss   xmm1, dword ptr [rdx+3Ch]                                      ; +0xdc, 0x1800b7cdc\naddss   xmm1, dword ptr [rdx+34h]                                      ; +0xe1, 0x1800b7ce1\njmp     loc_1800B7DA6                                                  ; +0xe6, 0x1800b7ce6\nalign 10h                                                              ; +0xeb, 0x1800b7ceb\nmovss   xmm0, dword ptr [rdx+0Ch]; jumptable 00000001800B7C28 case 3   ; +0xf0, 0x1800b7cf0\nsubss   xmm0, dword ptr [rdx+4]                                        ; +0xf5, 0x1800b7cf5\nmovss   dword ptr [rbx], xmm0                                          ; +0xfa, 0x1800b7cfa\nmovss   xmm1, dword ptr [rdx+1Ch]                                      ; +0xfe, 0x1800b7cfe\nsubss   xmm1, dword ptr [rdx+14h]                                      ; +0x103, 0x1800b7d03\nmovss   dword ptr [rbx+4], xmm1                                        ; +0x108, 0x1800b7d08\nmovss   xmm0, dword ptr [rdx+2Ch]                                      ; +0x10d, 0x1800b7d0d\nsubss   xmm0, dword ptr [rdx+24h]                                      ; +0x112, 0x1800b7d12\nmovss   dword ptr [rbx+8], xmm0                                        ; +0x117, 0x1800b7d17\nmovss   xmm1, dword ptr [rdx+3Ch]                                      ; +0x11c, 0x1800b7d1c\nsubss   xmm1, dword ptr [rdx+34h]                                      ; +0x121, 0x1800b7d21\njmp     short loc_1800B7DA6                                            ; +0x126, 0x1800b7d26\nalign 10h                                                              ; +0x128, 0x1800b7d28\nmovss   xmm0, dword ptr [rdx+0Ch]; jumptable 00000001800B7C28 case 5   ; +0x130, 0x1800b7d30\nsubss   xmm0, dword ptr [rdx+8]                                        ; +0x135, 0x1800b7d35\nmovss   dword ptr [rbx], xmm0                                          ; +0x13a, 0x1800b7d3a\nmovss   xmm1, dword ptr [rdx+1Ch]                                      ; +0x13e, 0x1800b7d3e\nsubss   xmm1, dword ptr [rdx+18h]                                      ; +0x143, 0x1800b7d43\nmovss   dword ptr [rbx+4], xmm1                                        ; +0x148, 0x1800b7d48\nmovss   xmm0, dword ptr [rdx+2Ch]                                      ; +0x14d, 0x1800b7d4d\nsubss   xmm0, dword ptr [rdx+28h]                                      ; +0x152, 0x1800b7d52\nmovss   dword ptr [rbx+8], xmm0                                        ; +0x157, 0x1800b7d57\nmovss   xmm1, dword ptr [rdx+3Ch]                                      ; +0x15c, 0x1800b7d5c\nsubss   xmm1, dword ptr [rdx+38h]                                      ; +0x161, 0x1800b7d61\njmp     short loc_1800B7DA6                                            ; +0x166, 0x1800b7d66\nalign 10h                                                              ; +0x168, 0x1800b7d68\nmovss   xmm0, dword ptr [rdx+0Ch]; jumptable 00000001800B7C28 case 4   ; +0x170, 0x1800b7d70\naddss   xmm0, dword ptr [rdx+8]                                        ; +0x175, 0x1800b7d75\nmovss   dword ptr [rbx], xmm0                                          ; +0x17a, 0x1800b7d7a\nmovss   xmm1, dword ptr [rdx+1Ch]                                      ; +0x17e, 0x1800b7d7e\naddss   xmm1, dword ptr [rdx+18h]                                      ; +0x183, 0x1800b7d83\nmovss   dword ptr [rbx+4], xmm1                                        ; +0x188, 0x1800b7d88\nmovss   xmm0, dword ptr [rdx+2Ch]                                      ; +0x18d, 0x1800b7d8d\naddss   xmm0, dword ptr [rdx+28h]                                      ; +0x192, 0x1800b7d92\nmovss   dword ptr [rbx+8], xmm0                                        ; +0x197, 0x1800b7d97\nmovss   xmm1, dword ptr [rdx+3Ch]                                      ; +0x19c, 0x1800b7d9c\naddss   xmm1, dword ptr [rdx+38h]                                      ; +0x1a1, 0x1800b7da1\nmovss   dword ptr [rbx+0Ch], xmm1                                      ; +0x1a6, 0x1800b7da6\nmovss   xmm0, dword ptr [rbx+4]; jumptable 00000001800B7C28 default case ; +0x1ab, 0x1800b7dab\nmovss   xmm2, dword ptr [rbx]                                          ; +0x1b0, 0x1800b7db0\nmovss   xmm1, dword ptr [rbx+8]                                        ; +0x1b4, 0x1800b7db4\nmulss   xmm2, xmm2                                                     ; +0x1b9, 0x1800b7db9\nmulss   xmm0, xmm0                                                     ; +0x1bd, 0x1800b7dbd\nmulss   xmm1, xmm1                                                     ; +0x1c1, 0x1800b7dc1\naddss   xmm2, xmm0                                                     ; +0x1c5, 0x1800b7dc5\nxorps   xmm0, xmm0                                                     ; +0x1c9, 0x1800b7dc9\naddss   xmm2, xmm1                                                     ; +0x1cc, 0x1800b7dcc\nucomiss xmm0, xmm2                                                     ; +0x1d0, 0x1800b7dd0\nja      short loc_1800B7DDE                                            ; +0x1d3, 0x1800b7dd3\nxorps   xmm0, xmm0                                                     ; +0x1d5, 0x1800b7dd5\nsqrtss  xmm0, xmm2                                                     ; +0x1d8, 0x1800b7dd8\njmp     short loc_1800B7DE6                                            ; +0x1dc, 0x1800b7ddc\nmovaps  xmm0, xmm2; X                                                  ; +0x1de, 0x1800b7dde\ncall    sqrtf                                                          ; +0x1e1, 0x1800b7de1\nmovups  xmm1, xmmword ptr [rbx]                                        ; +0x1e6, 0x1800b7de6\nmov     rax, rbx                                                       ; +0x1e9, 0x1800b7de9\nshufps  xmm0, xmm0, 0                                                  ; +0x1ec, 0x1800b7dec\ndivps   xmm1, xmm0                                                     ; +0x1f0, 0x1800b7df0\nmovups  xmmword ptr [rbx], xmm1                                        ; +0x1f3, 0x1800b7df3\nadd     rsp, 20h                                                       ; +0x1f6, 0x1800b7df6\npop     rbx                                                            ; +0x1fa, 0x1800b7dfa\nretn                                                                   ; +0x1fb, 0x1800b7dfb\ndd offset loc_1800B7C70 - 180000000h; jump table for switch statement  ; +0x1fc, 0x1800b7dfc", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b8c70"], "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"}