user: Converte this assembly snippet into its equivalent C code:

```asm
<fromToRotation>:
  endbr64
  sub    $0x28,%rsp
  mov    %rdx,%rcx
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movss  0x4(%rdi),%xmm2
  movss  0x8(%rsi),%xmm7
  movss  0x8(%rdi),%xmm3
  movss  0x4(%rsi),%xmm6
  movss  (%rsi),%xmm9
  movss  (%rdi),%xmm5
  movaps %xmm9,%xmm0
  mulss  %xmm5,%xmm0
  movaps %xmm2,%xmm1
  mulss  %xmm6,%xmm1
  addss  %xmm1,%xmm0
  movaps %xmm7,%xmm1
  mulss  %xmm3,%xmm1
  addss  %xmm1,%xmm0
  pxor   %xmm8,%xmm8
  movaps %xmm0,%xmm1
  xorps  D44(%rip),%xmm1
  movaps %xmm0,%xmm4
  cmpltss %xmm8,%xmm4
  andps  %xmm4,%xmm1
  andnps %xmm0,%xmm4
  orps   %xmm4,%xmm1
  cvtss2sd %xmm1,%xmm1
  comisd D97(%rip),%xmm1
  jbe    L138
  movaps %xmm5,%xmm1
  comiss %xmm8,%xmm5
  jbe    L4
L71:
  movaps %xmm2,%xmm0
  comiss D4(%rip),%xmm2
  jbe    L57
L101:
  movaps %xmm3,%xmm4
  comiss D4(%rip),%xmm3
  jbe    L86
L24:
  comiss %xmm1,%xmm0
  jbe    L177
  comiss %xmm1,%xmm4
  ja     L35
  movss  D36(%rip),%xmm1
  pxor   %xmm4,%xmm4
  movaps %xmm4,%xmm8
L155:
  movaps %xmm8,%xmm0
  subss  %xmm5,%xmm0
  movss  %xmm0,(%rsp)
  movaps %xmm4,%xmm10
  subss  %xmm2,%xmm10
  movss  %xmm10,0x4(%rsp)
  movaps %xmm1,%xmm5
  subss  %xmm3,%xmm5
  movss  %xmm5,0x8(%rsp)
  movaps %xmm8,%xmm3
  subss  %xmm9,%xmm3
  movss  %xmm3,0xc(%rsp)
  subss  %xmm6,%xmm4
  movaps %xmm4,%xmm2
  movss  %xmm4,0x10(%rsp)
  subss  %xmm7,%xmm1
  movss  %xmm1,0x14(%rsp)
  movaps %xmm0,%xmm4
  mulss  %xmm0,%xmm4
  movaps %xmm10,%xmm6
  mulss  %xmm10,%xmm6
  addss  %xmm6,%xmm4
  movaps %xmm5,%xmm6
  mulss  %xmm5,%xmm6
  addss  %xmm6,%xmm4
  movss  D139(%rip),%xmm7
  movaps %xmm7,%xmm8
  divss  %xmm4,%xmm8
  movaps %xmm3,%xmm4
  mulss  %xmm3,%xmm4
  movaps %xmm2,%xmm6
  mulss  %xmm2,%xmm6
  addss  %xmm6,%xmm4
  movaps %xmm1,%xmm6
  mulss  %xmm1,%xmm6
  addss  %xmm6,%xmm4
  divss  %xmm4,%xmm7
  movaps %xmm0,%xmm4
  mulss  %xmm3,%xmm4
  mulss  %xmm2,%xmm10
  addss  %xmm10,%xmm4
  mulss  %xmm1,%xmm5
  addss  %xmm5,%xmm4
  movaps %xmm8,%xmm0
  mulss  %xmm7,%xmm0
  mulss  %xmm0,%xmm4
  mov    %rcx,%r9
  mov    $0x0,%edx
  xorps  D44(%rip),%xmm8
  mov    %rsp,%rsi
  movss  D36(%rip),%xmm9
  jmp    L55
L4:
  xorps  D44(%rip),%xmm1
  jmp    L71
L57:
  xorps  D44(%rip),%xmm0
  jmp    L101
L86:
  xorps  D44(%rip),%xmm4
  jmp    L24
L177:
  comiss %xmm0,%xmm4
  ja     L108
  movss  D36(%rip),%xmm1
  pxor   %xmm4,%xmm4
  movaps %xmm4,%xmm8
  jmp    L155
L35:
  pxor   %xmm1,%xmm1
  movaps %xmm1,%xmm4
  movss  D36(%rip),%xmm8
  jmp    L155
L108:
  pxor   %xmm1,%xmm1
  movss  D36(%rip),%xmm4
  movaps %xmm1,%xmm8
  jmp    L155
L2:
  movaps %xmm9,%xmm0
  addss  (%rcx,%rdx,4),%xmm0
  movss  %xmm0,(%rcx,%rdx,4)
  add    $0xc,%r9
  add    $0x4,%rdx
  cmp    $0xc,%rdx
  je     L47
L55:
  movaps %xmm8,%xmm6
  mulss  (%rdx,%rsi,1),%xmm6
  movss  0xc(%rsp,%rdx,1),%xmm2
  movaps %xmm2,%xmm5
  mulss  %xmm7,%xmm5
  mulss  %xmm4,%xmm2
  mov    %r9,%r8
  mov    $0x0,%eax
  lea    0xc(%rsp),%rdi
L77:
  movss  (%rax,%rsi,1),%xmm1
  movaps %xmm6,%xmm0
  mulss  %xmm1,%xmm0
  movaps %xmm5,%xmm3
  mulss  (%rax,%rdi,1),%xmm3
  subss  %xmm3,%xmm0
  mulss  %xmm2,%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,(%r8,%rax,1)
  add    $0x4,%rax
  cmp    $0xc,%rax
  jne    L77
  jmp    L2
L138:
  movaps %xmm2,%xmm4
  mulss  %xmm7,%xmm4
  movaps %xmm3,%xmm1
  mulss  %xmm6,%xmm1
  subss  %xmm1,%xmm4
  mulss  %xmm9,%xmm3
  mulss  %xmm5,%xmm7
  subss  %xmm7,%xmm3
  mulss  %xmm5,%xmm6
  mulss  %xmm9,%xmm2
  subss  %xmm2,%xmm6
  pxor   %xmm2,%xmm2
  cvtss2sd %xmm0,%xmm2
  movsd  D79(%rip),%xmm1
  addsd  %xmm1,%xmm2
  divsd  %xmm2,%xmm1
  cvtsd2ss %xmm1,%xmm1
  movaps %xmm4,%xmm2
  mulss  %xmm1,%xmm2
  movaps %xmm6,%xmm8
  mulss  %xmm1,%xmm8
  movaps %xmm3,%xmm7
  mulss  %xmm2,%xmm7
  movaps %xmm6,%xmm5
  mulss  %xmm2,%xmm5
  movaps %xmm3,%xmm9
  mulss  %xmm8,%xmm9
  mulss  %xmm4,%xmm2
  addss  %xmm0,%xmm2
  movss  %xmm2,(%rdx)
  movaps %xmm7,%xmm2
  subss  %xmm6,%xmm2
  movss  %xmm2,0x4(%rdx)
  movaps %xmm3,%xmm2
  addss  %xmm5,%xmm2
  movss  %xmm2,0x8(%rdx)
  addss  %xmm6,%xmm7
  movss  %xmm7,0xc(%rdx)
  mulss  %xmm3,%xmm1
  mulss  %xmm3,%xmm1
  addss  %xmm0,%xmm1
  movss  %xmm1,0x10(%rdx)
  movaps %xmm9,%xmm1
  subss  %xmm4,%xmm1
  movss  %xmm1,0x14(%rdx)
  subss  %xmm3,%xmm5
  movss  %xmm5,0x18(%rdx)
  addss  %xmm9,%xmm4
  movss  %xmm4,0x1c(%rdx)
  mulss  %xmm8,%xmm6
  movaps %xmm6,%xmm1
  addss  %xmm0,%xmm1
  movss  %xmm1,0x20(%rdx)
L47:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L156
  add    $0x28,%rsp
  ret
L156:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D44
type_infered: byte[16]
name: parse_data
arguments: data_tag: D97
type_infered: byte[16]
name: parse_data
arguments: data_tag: D4
type_infered: f64
name: parse_data
arguments: data_tag: D36
type_infered: f32
name: parse_data
arguments: data_tag: D139
type_infered: f32
name: parse_data
arguments: data_tag: D79
type_infered: byte[8]

tool: {"D44": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D97": [0xe9,0x0b,0x21,0xe7,0xfd,0xff,0xef,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: D4: 0

tool: D36: 1

tool: D139: 2

tool: {"D79": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

assistant: ```c
void fromToRotation(float from[3], float to[3], float mtx[3][3]) {
  float v[3];
  float e, h, f;
  {
    v[0] = from[1] * to[2] - from[2] * to[1];
    v[1] = from[2] * to[0] - from[0] * to[2];
    v[2] = from[0] * to[1] - from[1] * to[0];
  };
  e = (from[0] * to[0] + from[1] * to[1] + from[2] * to[2]);
  f = (e < 0) ? -e : e;
  if (f > 1.0 - 0.000001) {
    float u[3], v[3];
    float x[3];
    float c1, c2, c3;
    int i, j;
    x[0] = (from[0] > 0.0) ? from[0] : -from[0];
    x[1] = (from[1] > 0.0) ? from[1] : -from[1];
    x[2] = (from[2] > 0.0) ? from[2] : -from[2];
    if (x[0] < x[1]) {
      if (x[0] < x[2]) {
        x[0] = 1.0;
        x[1] = x[2] = 0.0;
      } else {
        x[2] = 1.0;
        x[0] = x[1] = 0.0;
      }
    } else {
      if (x[1] < x[2]) {
        x[1] = 1.0;
        x[0] = x[2] = 0.0;
      } else {
        x[2] = 1.0;
        x[0] = x[1] = 0.0;
      }
    }
    u[0] = x[0] - from[0];
    u[1] = x[1] - from[1];
    u[2] = x[2] - from[2];
    v[0] = x[0] - to[0];
    v[1] = x[1] - to[1];
    v[2] = x[2] - to[2];
    c1 = 2.0 / (u[0] * u[0] + u[1] * u[1] + u[2] * u[2]);
    c2 = 2.0 / (v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
    c3 = c1 * c2 * (u[0] * v[0] + u[1] * v[1] + u[2] * v[2]);
    for (i = 0; i < 3; i++) {
      for (j = 0; j < 3; j++) {
        mtx[i][j] = -c1 * u[i] * u[j] - c2 * v[i] * v[j] + c3 * v[i] * u[j];
      }
      mtx[i][i] += 1.0;
    }
  } else {
    float hvx, hvz, hvxy, hvxz, hvyz;
    h = 1.0 / (1.0 + e);
    hvx = h * v[0];
    hvz = h * v[2];
    hvxy = hvx * v[1];
    hvxz = hvx * v[2];
    hvyz = hvz * v[1];
    mtx[0][0] = e + hvx * v[0];
    mtx[0][1] = hvxy - v[2];
    mtx[0][2] = hvxz + v[1];
    mtx[1][0] = hvxy + v[2];
    mtx[1][1] = e + h * v[1] * v[1];
    mtx[1][2] = hvyz - v[0];
    mtx[2][0] = hvxz - v[1];
    mtx[2][1] = hvyz + v[0];
    mtx[2][2] = e + hvz * v[2];
  }
}
```