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

```asm
<fromToRotation>:
  endbr64
  sub    $0x28,%rsp
  movss  0x4(%rdi),%xmm8
  movss  (%rsi),%xmm10
  pxor   %xmm3,%xmm3
  movss  0x4(%rsi),%xmm1
  movss  (%rdi),%xmm11
  movaps %xmm10,%xmm0
  movaps %xmm8,%xmm2
  movss  0x8(%rsi),%xmm9
  movss  0x8(%rdi),%xmm12
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mulss  %xmm1,%xmm2
  mulss  %xmm11,%xmm0
  addss  %xmm2,%xmm0
  movaps %xmm9,%xmm2
  mulss  %xmm12,%xmm2
  addss  %xmm2,%xmm0
  movaps %xmm0,%xmm4
  movaps %xmm0,%xmm2
  xorps  D28(%rip),%xmm2
  cmpltss %xmm3,%xmm4
  andps  %xmm4,%xmm2
  andnps %xmm0,%xmm4
  orps   %xmm4,%xmm2
  cvtss2sd %xmm2,%xmm2
  comisd D37(%rip),%xmm2
  jbe    L57
  comiss %xmm3,%xmm11
  movaps %xmm11,%xmm2
  movss  D28(%rip),%xmm4
  jbe    L136
L88:
  comiss %xmm3,%xmm8
  movaps %xmm8,%xmm0
  ja     L21
  xorps  %xmm4,%xmm0
L21:
  comiss %xmm3,%xmm12
  movaps %xmm12,%xmm5
  ja     L53
  xorps  %xmm4,%xmm5
L53:
  comiss %xmm2,%xmm0
  jbe    L59
  comiss %xmm2,%xmm5
  ja     L51
L93:
  movss  D59(%rip),%xmm13
  movaps %xmm3,%xmm5
  movaps %xmm13,%xmm0
L126:
  movaps %xmm5,%xmm7
  movaps %xmm0,%xmm2
  subss  %xmm10,%xmm5
  mov    %rdx,%rsi
  subss  %xmm11,%xmm7
  movaps %xmm3,%xmm11
  subss  %xmm1,%xmm3
  xor    %ecx,%ecx
  subss  %xmm8,%xmm11
  subss  %xmm12,%xmm2
  movss  D45(%rip),%xmm8
  subss  %xmm9,%xmm0
  movaps %xmm7,%xmm1
  movaps %xmm8,%xmm9
  movss  %xmm3,0x10(%rsp)
  mulss  %xmm7,%xmm1
  movaps %xmm11,%xmm6
  movss  %xmm11,0x4(%rsp)
  mulss  %xmm11,%xmm6
  movss  %xmm2,0x8(%rsp)
  mulss  %xmm3,%xmm11
  movss  %xmm0,0x14(%rsp)
  addss  %xmm6,%xmm1
  movaps %xmm2,%xmm6
  mulss  %xmm2,%xmm6
  mulss  %xmm0,%xmm2
  addss  %xmm6,%xmm1
  movaps %xmm3,%xmm6
  mulss  %xmm3,%xmm6
  movaps %xmm5,%xmm3
  divss  %xmm1,%xmm9
  movaps %xmm5,%xmm1
  mulss  %xmm5,%xmm1
  addss  %xmm6,%xmm1
  movaps %xmm0,%xmm6
  mulss  %xmm0,%xmm6
  addss  %xmm6,%xmm1
  movaps %xmm7,%xmm6
  mulss  %xmm5,%xmm6
  divss  %xmm1,%xmm8
  movaps %xmm9,%xmm0
  addss  %xmm11,%xmm6
  xorps  %xmm4,%xmm9
  movaps %xmm7,%xmm4
  addss  %xmm2,%xmm6
  mulss  %xmm8,%xmm0
  mulss  %xmm0,%xmm6
L0:
  movaps %xmm8,%xmm10
  movaps %xmm5,%xmm2
  movaps %xmm7,%xmm1
  xor    %eax,%eax
  mulss  %xmm3,%xmm10
  mulss  %xmm9,%xmm4
  mulss  %xmm6,%xmm3
L129:
  mulss  %xmm10,%xmm2
  movaps %xmm4,%xmm0
  mulss  %xmm1,%xmm0
  mulss  %xmm3,%xmm1
  subss  %xmm2,%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rsi,%rax,1)
  add    $0x4,%rax
  cmp    $0xc,%rax
  je     L39
  movss  (%rsp,%rax,1),%xmm1
  movss  0xc(%rsp,%rax,1),%xmm2
  jmp    L129
  nopl   0x0(%rax)
L136:
  movss  D28(%rip),%xmm4
  xorps  %xmm4,%xmm2
  jmp    L88
  nopl   0x0(%rax,%rax,1)
L39:
  movss  (%rdx,%rcx,4),%xmm0
  add    $0xc,%rsi
  addss  %xmm13,%xmm0
  movss  %xmm0,(%rdx,%rcx,4)
  add    $0x4,%rcx
  cmp    $0xc,%rcx
  je     L108
  movss  (%rsp,%rcx,1),%xmm4
  movss  0xc(%rsp,%rcx,1),%xmm3
  jmp    L0
  nopl   0x0(%rax)
L57:
  movaps %xmm8,%xmm4
  movaps %xmm12,%xmm2
  pxor   %xmm5,%xmm5
  mulss  %xmm1,%xmm2
  cvtss2sd %xmm0,%xmm5
  movaps %xmm12,%xmm3
  mulss  %xmm9,%xmm4
  mulss  %xmm11,%xmm1
  mulss  %xmm11,%xmm9
  mulss  %xmm10,%xmm3
  subss  %xmm2,%xmm4
  movaps %xmm8,%xmm2
  mulss  %xmm10,%xmm2
  subss  %xmm9,%xmm3
  subss  %xmm2,%xmm1
  movsd  D40(%rip),%xmm2
  movaps %xmm3,%xmm7
  movaps %xmm3,%xmm9
  addsd  %xmm2,%xmm5
  movaps %xmm1,%xmm8
  movaps %xmm1,%xmm6
  divsd  %xmm5,%xmm2
  movaps %xmm4,%xmm5
  cvtsd2ss %xmm2,%xmm2
  mulss  %xmm2,%xmm5
  mulss  %xmm2,%xmm8
  mulss  %xmm3,%xmm2
  mulss  %xmm5,%xmm7
  mulss  %xmm5,%xmm6
  mulss  %xmm4,%xmm5
  mulss  %xmm3,%xmm2
  mulss  %xmm8,%xmm9
  addss  %xmm0,%xmm5
  addss  %xmm0,%xmm2
  movss  %xmm5,(%rdx)
  movaps %xmm7,%xmm5
  addss  %xmm1,%xmm7
  subss  %xmm1,%xmm5
  mulss  %xmm8,%xmm1
  movss  %xmm2,0x10(%rdx)
  movaps %xmm9,%xmm2
  subss  %xmm4,%xmm2
  addss  %xmm9,%xmm4
  movss  %xmm7,0xc(%rdx)
  movss  %xmm5,0x4(%rdx)
  movaps %xmm3,%xmm5
  addss  %xmm6,%xmm5
  subss  %xmm3,%xmm6
  movss  %xmm2,0x14(%rdx)
  addss  %xmm0,%xmm1
  movss  %xmm4,0x1c(%rdx)
  movss  %xmm5,0x8(%rdx)
  movss  %xmm6,0x18(%rdx)
  movss  %xmm1,0x20(%rdx)
L108:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L124
  add    $0x28,%rsp
  ret
  cs nopw 0x0(%rax,%rax,1)
L59:
  comiss %xmm0,%xmm5
  jbe    L93
  movss  D59(%rip),%xmm13
  movaps %xmm3,%xmm0
  movaps %xmm0,%xmm5
  movaps %xmm13,%xmm3
  jmp    L126
  nopl   0x0(%rax)
L51:
  movss  D59(%rip),%xmm13
  movaps %xmm3,%xmm0
  movaps %xmm13,%xmm5
  jmp    L126
L124:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D28
data_type: byte[16]
name: disassemble_data
arguments: label: D37
data_type: byte[16]
name: disassemble_data
arguments: label: D59
data_type: f32
name: disassemble_data
arguments: label: D45
data_type: f32
name: disassemble_data
arguments: label: D40
data_type: f32[2]

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

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

tool: D59: 1

tool: D45: 2

tool: {"D40": [0.0,1.875]}

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];
  }
}
```