{"type": "func", "start": 4296105376, "end": 4296105499, "name": "GJBaseGameLayer::convertToClosestDirection", "pseudocode": "// \n// GJBaseGameLayer::convertToClosestDirection from 0x100115da0 to 0x100115e1b (123 bytes)\n// \n// 3 xrefs:\n// > PlayLayer::updateScreenRotation @ 0x1000837b9\n// > PlayerObject::redirectDash @ 0x1003fdc56\n// > PlayerObject::redirectPlayerForce @ 0x100408010\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 12:24:33 +0000\n// \n\nfloat __fastcall GJBaseGameLayer::convertToClosestDirection(__m128 a1, float a2)\n{\n  __m128 v2; // xmm2\n  __m128 v3; // xmm2\n  __m128 v4; // xmm2\n  __m128 v5; // xmm2\n\n  if ( (float)-a2 <= a1.f32[0] )\n  {\n    if ( a1.f32[0] > a2 )\n    {\n      v4 = _mm_and_ps((__m128)xmmword_100A038A0, a1);\n      v4.f32[0] = v4.f32[0] / a2;\n      v5 = _mm_round_ss(v4, v4, 9);\n      v5.f32[0] = v5.f32[0] * 0.5;\n      a1.f32[0] = a1.f32[0] - (float)((float)(a2 + a2) * _mm_round_ss(v5, v5, 10).f32[0]);\n    }\n  }\n  else\n  {\n    v2 = _mm_and_ps((__m128)xmmword_100A038A0, a1);\n    v2.f32[0] = v2.f32[0] / a2;\n    v3 = _mm_round_ss(v2, v2, 9);\n    v3.f32[0] = v3.f32[0] * 0.5;\n    a1.f32[0] = (float)((float)(a2 + a2) * _mm_round_ss(v3, v3, 10).f32[0]) + a1.f32[0];\n  }\n  return a1.f32[0];\n}", "assembly": "; \n; GJBaseGameLayer::convertToClosestDirection from 0x100115da0 to 0x100115e1b (123 bytes)\n; \n; 3 xrefs:\n; > PlayLayer::updateScreenRotation @ 0x1000837b9\n; > PlayerObject::redirectDash @ 0x1003fdc56\n; > PlayerObject::redirectPlayerForce @ 0x100408010\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 12:24:33 +0000\n; \npush    rbp                                                            ; +0x0, 0x100115da0\nmov     rbp, rsp                                                       ; +0x1, 0x100115da1\nmovaps  xmm2, cs:xmmword_100A035F0                                     ; +0x4, 0x100115da4\nxorps   xmm2, xmm1                                                     ; +0xb, 0x100115dab\nucomiss xmm2, xmm0                                                     ; +0xe, 0x100115dae\njbe     short loc_100115DE6                                            ; +0x11, 0x100115db1\nmovaps  xmm2, cs:xmmword_100A038A0                                     ; +0x13, 0x100115db3\nandps   xmm2, xmm0                                                     ; +0x1a, 0x100115dba\ndivss   xmm2, xmm1                                                     ; +0x1d, 0x100115dbd\nroundss xmm2, xmm2, 9                                                  ; +0x21, 0x100115dc1\nmulss   xmm2, cs:dword_100A03578                                       ; +0x27, 0x100115dc7\nroundss xmm2, xmm2, 0Ah                                                ; +0x2f, 0x100115dcf\naddss   xmm1, xmm1                                                     ; +0x35, 0x100115dd5\nmulss   xmm1, xmm2                                                     ; +0x39, 0x100115dd9\naddss   xmm1, xmm0                                                     ; +0x3d, 0x100115ddd\nmovaps  xmm0, xmm1                                                     ; +0x41, 0x100115de1\npop     rbp                                                            ; +0x44, 0x100115de4\nretn                                                                   ; +0x45, 0x100115de5\nucomiss xmm0, xmm1                                                     ; +0x46, 0x100115de6\njbe     short loc_100115E19                                            ; +0x49, 0x100115de9\nmovaps  xmm2, cs:xmmword_100A038A0                                     ; +0x4b, 0x100115deb\nandps   xmm2, xmm0                                                     ; +0x52, 0x100115df2\ndivss   xmm2, xmm1                                                     ; +0x55, 0x100115df5\nroundss xmm2, xmm2, 9                                                  ; +0x59, 0x100115df9\nmulss   xmm2, cs:dword_100A03578                                       ; +0x5f, 0x100115dff\nroundss xmm2, xmm2, 0Ah                                                ; +0x67, 0x100115e07\naddss   xmm1, xmm1                                                     ; +0x6d, 0x100115e0d\nmulss   xmm1, xmm2                                                     ; +0x71, 0x100115e11\nsubss   xmm0, xmm1                                                     ; +0x75, 0x100115e15\npop     rbp                                                            ; +0x79, 0x100115e19\nretn                                                                   ; +0x7a, 0x100115e1a", "xrefs": ["PlayLayer::updateScreenRotation @ 0x1000837b9", "PlayerObject::redirectDash @ 0x1003fdc56", "PlayerObject::redirectPlayerForce @ 0x100408010"], "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"}