{"type": "func", "start": 6443229072, "end": 6443229691, "name": "kmRay2IntersectLineSegment", "pseudocode": "// \n// kmRay2IntersectLineSegment from 0x1800bdf90 to 0x1800be1fb (619 bytes)\n// \n// 5 xrefs:\n// > kmRay2IntersectTriangle @ 0x1800be257\n// > kmRay2IntersectTriangle @ 0x1800be2e7\n// > kmRay2IntersectTriangle @ 0x1800be376\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c3108\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\nchar __fastcall kmRay2IntersectLineSegment(float *a1, float *a2, float *a3, float *a4)\n{\n  float v5; // xmm4_4\n  float v6; // xmm8_4\n  float v7; // xmm6_4\n  float v8; // xmm11_4\n  float v9; // xmm12_4\n  float v10; // xmm14_4\n  float v11; // xmm13_4\n  float v12; // xmm1_4\n  float v13; // xmm10_4\n  float v14; // xmm7_4\n  float v15; // xmm10_4\n  double v16; // xmm9_8\n  double v17; // xmm8_8\n\n  v5 = *a3 - *a2;\n  v6 = a2[1];\n  v7 = a3[1] - v6;\n  v8 = a1[1];\n  v9 = *a1;\n  v10 = *a1 + a1[2];\n  v11 = v8 + a1[3];\n  v12 = (float)(v7 * (float)(v10 - *a1)) - (float)(v5 * (float)(v11 - v8));\n  if ( v12 > -0.015625 && v12 < 0.015625 )\n    return 0;\n  v13 = (float)((float)((float)(v8 - v6) * v5) - (float)((float)(v9 - *a2) * v7)) / v12;\n  v14 = (float)(v13 * (float)(v11 - v8)) + v8;\n  v15 = (float)(v13 * (float)(v10 - v9)) + v9;\n  v16 = v15;\n  if ( kmMin() - 0.015625 > v15 )\n    return 0;\n  if ( v16 > kmMax() + 0.015625 )\n    return 0;\n  v17 = v14;\n  if ( kmMin() - 0.015625 > v14\n    || v17 > kmMax() + 0.015625\n    || kmMin() - 0.015625 > v16\n    || v16 > kmMax() + 0.015625\n    || kmMin() - 0.015625 > v17\n    || v17 > kmMax() + 0.015625 )\n  {\n    return 0;\n  }\n  *a4 = v15;\n  a4[1] = v14;\n  return 1;\n}", "assembly": "; \n; kmRay2IntersectLineSegment from 0x1800bdf90 to 0x1800be1fb (619 bytes)\n; \n; 5 xrefs:\n; > kmRay2IntersectTriangle @ 0x1800be257\n; > kmRay2IntersectTriangle @ 0x1800be2e7\n; > kmRay2IntersectTriangle @ 0x1800be376\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c3108\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     rax, rsp                                                       ; +0x0, 0x1800bdf90\nmov     [rax+8], rbx                                                   ; +0x3, 0x1800bdf93\nmov     [rax+10h], rsi                                                 ; +0x7, 0x1800bdf97\npush    rdi                                                            ; +0xb, 0x1800bdf9b\nsub     rsp, 0B0h                                                      ; +0xc, 0x1800bdf9c\nmovss   xmm4, dword ptr [r8]                                           ; +0x13, 0x1800bdfa3\nmov     rsi, r9                                                        ; +0x18, 0x1800bdfa8\nmovss   xmm2, dword ptr [rdx]                                          ; +0x1b, 0x1800bdfab\nmov     rbx, r8                                                        ; +0x1f, 0x1800bdfaf\nmovaps  xmmword ptr [rax-18h], xmm6                                    ; +0x22, 0x1800bdfb2\nsubss   xmm4, xmm2                                                     ; +0x26, 0x1800bdfb6\nmovss   xmm6, dword ptr [r8+4]                                         ; +0x2a, 0x1800bdfba\nmov     rdi, rdx                                                       ; +0x30, 0x1800bdfc0\nmovaps  xmmword ptr [rax-28h], xmm7                                    ; +0x33, 0x1800bdfc3\nmovaps  xmmword ptr [rax-38h], xmm8                                    ; +0x37, 0x1800bdfc7\nmovss   xmm8, dword ptr [rdx+4]                                        ; +0x3c, 0x1800bdfcc\nmovaps  xmmword ptr [rax-48h], xmm9                                    ; +0x42, 0x1800bdfd2\nsubss   xmm6, xmm8                                                     ; +0x47, 0x1800bdfd7\nmovaps  xmmword ptr [rax-58h], xmm10                                   ; +0x4c, 0x1800bdfdc\nmovaps  xmm0, xmm4                                                     ; +0x51, 0x1800bdfe1\nmovaps  xmmword ptr [rax-68h], xmm11                                   ; +0x54, 0x1800bdfe4\nmovss   xmm11, dword ptr [rcx+4]                                       ; +0x59, 0x1800bdfe9\nmovaps  xmmword ptr [rax-78h], xmm12                                   ; +0x5f, 0x1800bdfef\nmovss   xmm12, dword ptr [rcx]                                         ; +0x64, 0x1800bdff4\nmovaps  xmm1, xmm6                                                     ; +0x69, 0x1800bdff9\nmovaps  [rsp+0B8h+var_88], xmm13                                       ; +0x6c, 0x1800bdffc\nmovaps  xmm13, xmm11                                                   ; +0x72, 0x1800be002\nmovaps  [rsp+0B8h+var_98], xmm14                                       ; +0x76, 0x1800be006\nmovaps  xmm14, xmm12                                                   ; +0x7c, 0x1800be00c\naddss   xmm14, dword ptr [rcx+8]                                       ; +0x80, 0x1800be010\naddss   xmm13, dword ptr [rcx+0Ch]                                     ; +0x86, 0x1800be016\nmovaps  xmm5, xmm14                                                    ; +0x8c, 0x1800be01c\nmovaps  xmm3, xmm13                                                    ; +0x90, 0x1800be020\nsubss   xmm5, xmm12                                                    ; +0x94, 0x1800be024\nsubss   xmm3, xmm11                                                    ; +0x99, 0x1800be029\nmulss   xmm1, xmm5                                                     ; +0x9e, 0x1800be02e\nmulss   xmm0, xmm3                                                     ; +0xa2, 0x1800be032\nsubss   xmm1, xmm0                                                     ; +0xa6, 0x1800be036\ncomiss  xmm1, cs:dword_18010D640                                       ; +0xaa, 0x1800be03a\njbe     short loc_1800BE054                                            ; +0xb1, 0x1800be041\nmovss   xmm0, cs:dword_18010D630                                       ; +0xb3, 0x1800be043\ncomiss  xmm0, xmm1                                                     ; +0xbb, 0x1800be04b\nja      loc_1800BE1B6                                                  ; +0xbe, 0x1800be04e\nmovaps  xmm7, xmm11                                                    ; +0xc4, 0x1800be054\nmovaps  xmm0, xmm12                                                    ; +0xc8, 0x1800be058\nsubss   xmm7, xmm8                                                     ; +0xcc, 0x1800be05c\nsubss   xmm0, xmm2                                                     ; +0xd1, 0x1800be061\nmulss   xmm7, xmm4                                                     ; +0xd5, 0x1800be065\nmulss   xmm0, xmm6                                                     ; +0xd9, 0x1800be069\nsubss   xmm7, xmm0                                                     ; +0xdd, 0x1800be06d\nmovaps  xmm0, xmm2                                                     ; +0xe1, 0x1800be071\ndivss   xmm7, xmm1                                                     ; +0xe4, 0x1800be074\nmovss   xmm1, dword ptr [r8]                                           ; +0xe8, 0x1800be078\nmovaps  xmm10, xmm7                                                    ; +0xed, 0x1800be07d\nmulss   xmm7, xmm3                                                     ; +0xf1, 0x1800be081\nmulss   xmm10, xmm5                                                    ; +0xf5, 0x1800be085\naddss   xmm7, xmm11                                                    ; +0xfa, 0x1800be08a\naddss   xmm10, xmm12                                                   ; +0xff, 0x1800be08f\ncvtps2pd xmm9, xmm10                                                   ; +0x104, 0x1800be094\ncall    kmMin                                                          ; +0x108, 0x1800be098\nmovsd   xmm6, cs:qword_18010D5D0                                       ; +0x10d, 0x1800be09d\nxorps   xmm1, xmm1                                                     ; +0x115, 0x1800be0a5\ncvtss2sd xmm1, xmm0                                                    ; +0x118, 0x1800be0a8\nsubsd   xmm1, xmm6                                                     ; +0x11c, 0x1800be0ac\ncomisd  xmm1, xmm9                                                     ; +0x120, 0x1800be0b0\nja      loc_1800BE1B6                                                  ; +0x125, 0x1800be0b5\nmovss   xmm1, dword ptr [rbx]                                          ; +0x12b, 0x1800be0bb\nmovss   xmm0, dword ptr [rdi]                                          ; +0x12f, 0x1800be0bf\ncall    kmMax                                                          ; +0x133, 0x1800be0c3\nxorps   xmm1, xmm1                                                     ; +0x138, 0x1800be0c8\ncvtss2sd xmm1, xmm0                                                    ; +0x13b, 0x1800be0cb\naddsd   xmm1, xmm6                                                     ; +0x13f, 0x1800be0cf\ncomisd  xmm9, xmm1                                                     ; +0x143, 0x1800be0d3\nja      loc_1800BE1B6                                                  ; +0x148, 0x1800be0d8\nmovss   xmm1, dword ptr [rbx+4]                                        ; +0x14e, 0x1800be0de\nmovss   xmm0, dword ptr [rdi+4]                                        ; +0x153, 0x1800be0e3\ncvtps2pd xmm8, xmm7                                                    ; +0x158, 0x1800be0e8\ncall    kmMin                                                          ; +0x15c, 0x1800be0ec\nxorps   xmm1, xmm1                                                     ; +0x161, 0x1800be0f1\ncvtss2sd xmm1, xmm0                                                    ; +0x164, 0x1800be0f4\nsubsd   xmm1, xmm6                                                     ; +0x168, 0x1800be0f8\ncomisd  xmm1, xmm8                                                     ; +0x16c, 0x1800be0fc\nja      loc_1800BE1B6                                                  ; +0x171, 0x1800be101\nmovss   xmm1, dword ptr [rbx+4]                                        ; +0x177, 0x1800be107\nmovss   xmm0, dword ptr [rdi+4]                                        ; +0x17c, 0x1800be10c\ncall    kmMax                                                          ; +0x181, 0x1800be111\nxorps   xmm2, xmm2                                                     ; +0x186, 0x1800be116\ncvtss2sd xmm2, xmm0                                                    ; +0x189, 0x1800be119\naddsd   xmm2, xmm6                                                     ; +0x18d, 0x1800be11d\ncomisd  xmm8, xmm2                                                     ; +0x191, 0x1800be121\nja      loc_1800BE1B6                                                  ; +0x196, 0x1800be126\nmovaps  xmm1, xmm14                                                    ; +0x19c, 0x1800be12c\nmovaps  xmm0, xmm12                                                    ; +0x1a0, 0x1800be130\ncall    kmMin                                                          ; +0x1a4, 0x1800be134\nxorps   xmm2, xmm2                                                     ; +0x1a9, 0x1800be139\ncvtss2sd xmm2, xmm0                                                    ; +0x1ac, 0x1800be13c\nsubsd   xmm2, xmm6                                                     ; +0x1b0, 0x1800be140\ncomisd  xmm2, xmm9                                                     ; +0x1b4, 0x1800be144\nja      short loc_1800BE1B6                                            ; +0x1b9, 0x1800be149\nmovaps  xmm1, xmm14                                                    ; +0x1bb, 0x1800be14b\nmovaps  xmm0, xmm12                                                    ; +0x1bf, 0x1800be14f\ncall    kmMax                                                          ; +0x1c3, 0x1800be153\nxorps   xmm2, xmm2                                                     ; +0x1c8, 0x1800be158\ncvtss2sd xmm2, xmm0                                                    ; +0x1cb, 0x1800be15b\naddsd   xmm2, xmm6                                                     ; +0x1cf, 0x1800be15f\ncomisd  xmm9, xmm2                                                     ; +0x1d3, 0x1800be163\nja      short loc_1800BE1B6                                            ; +0x1d8, 0x1800be168\nmovaps  xmm1, xmm13                                                    ; +0x1da, 0x1800be16a\nmovaps  xmm0, xmm11                                                    ; +0x1de, 0x1800be16e\ncall    kmMin                                                          ; +0x1e2, 0x1800be172\nxorps   xmm2, xmm2                                                     ; +0x1e7, 0x1800be177\ncvtss2sd xmm2, xmm0                                                    ; +0x1ea, 0x1800be17a\nsubsd   xmm2, xmm6                                                     ; +0x1ee, 0x1800be17e\ncomisd  xmm2, xmm8                                                     ; +0x1f2, 0x1800be182\nja      short loc_1800BE1B6                                            ; +0x1f7, 0x1800be187\nmovaps  xmm1, xmm13                                                    ; +0x1f9, 0x1800be189\nmovaps  xmm0, xmm11                                                    ; +0x1fd, 0x1800be18d\ncall    kmMax                                                          ; +0x201, 0x1800be191\nxorps   xmm1, xmm1                                                     ; +0x206, 0x1800be196\ncvtss2sd xmm1, xmm0                                                    ; +0x209, 0x1800be199\naddsd   xmm1, xmm6                                                     ; +0x20d, 0x1800be19d\ncomisd  xmm8, xmm1                                                     ; +0x211, 0x1800be1a1\nja      short loc_1800BE1B6                                            ; +0x216, 0x1800be1a6\nmovss   dword ptr [rsi], xmm10                                         ; +0x218, 0x1800be1a8\nmov     al, 1                                                          ; +0x21d, 0x1800be1ad\nmovss   dword ptr [rsi+4], xmm7                                        ; +0x21f, 0x1800be1af\njmp     short loc_1800BE1B8                                            ; +0x224, 0x1800be1b4\nxor     al, al                                                         ; +0x226, 0x1800be1b6\nmovaps  xmm14, [rsp+0B8h+var_98]                                       ; +0x228, 0x1800be1b8\nlea     r11, [rsp+0B8h+var_8]                                          ; +0x22e, 0x1800be1be\nmov     rbx, [r11+10h]                                                 ; +0x236, 0x1800be1c6\nmov     rsi, [r11+18h]                                                 ; +0x23a, 0x1800be1ca\nmovaps  xmm6, xmmword ptr [r11-10h]                                    ; +0x23e, 0x1800be1ce\nmovaps  xmm7, xmmword ptr [r11-20h]                                    ; +0x243, 0x1800be1d3\nmovaps  xmm8, xmmword ptr [r11-30h]                                    ; +0x248, 0x1800be1d8\nmovaps  xmm9, xmmword ptr [r11-40h]                                    ; +0x24d, 0x1800be1dd\nmovaps  xmm10, xmmword ptr [r11-50h]                                   ; +0x252, 0x1800be1e2\nmovaps  xmm11, xmmword ptr [r11-60h]                                   ; +0x257, 0x1800be1e7\nmovaps  xmm12, xmmword ptr [r11-70h]                                   ; +0x25c, 0x1800be1ec\nmovaps  xmm13, xmmword ptr [r11-80h]                                   ; +0x261, 0x1800be1f1\nmov     rsp, r11                                                       ; +0x266, 0x1800be1f6\npop     rdi                                                            ; +0x269, 0x1800be1f9\nretn                                                                   ; +0x26a, 0x1800be1fa", "xrefs": ["kmRay2IntersectTriangle @ 0x1800be257", "kmRay2IntersectTriangle @ 0x1800be2e7", "kmRay2IntersectTriangle @ 0x1800be376", "<???> @ 0x18014cf68", "<???> @ 0x1801c3108"], "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"}