user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<fromToRotation>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %rdx,%rbx
  mov    0x4(%rdi),%r12d
  movss  0x8(%rsi),%xmm1
  mov    0x8(%rdi),%r13d
  movss  0x4(%rsi),%xmm0
  movss  (%rsi),%xmm5
  mov    (%rdi),%ebp
  movd   %ebp,%xmm6
  mulss  %xmm5,%xmm6
  movd   %r12d,%xmm2
  mulss  %xmm0,%xmm2
  addss  %xmm2,%xmm6
  movd   %r13d,%xmm2
  mulss  %xmm1,%xmm2
  addss  %xmm2,%xmm6
  pxor   %xmm3,%xmm3
  cvtss2sd %xmm6,%xmm3
  comisd D42(%rip),%xmm3
  ja     L78
  movsd  D81(%rip),%xmm2
  comisd %xmm3,%xmm2
  jbe    L63
  movd   %r12d,%xmm7
  xorps  D99(%rip),%xmm7
  movss  %xmm7,0x14(%rsp)
  movd   %r13d,%xmm4
  mulss  %xmm4,%xmm4
  movss  %xmm4,0x18(%rsp)
  movd   %r12d,%xmm7
  mulss  %xmm7,%xmm7
  movss  %xmm7,0x1c(%rsp)
  addss  D97(%rip),%xmm4
  movaps %xmm4,%xmm0
  addss  %xmm7,%xmm0
  cvtss2sd %xmm0,%xmm0
  movsd  D47(%rip),%xmm1
  comisd %xmm0,%xmm1
  jbe    L50
  movd   %r13d,%xmm4
  xorps  D99(%rip),%xmm4
  movd   %xmm4,%r14d
  mov    %ebp,0xc(%rsp)
  pxor   %xmm6,%xmm6
  movss  %xmm6,0x10(%rsp)
L9:
  movss  0x10(%rsp),%xmm4
  movaps %xmm4,%xmm1
  mulss  %xmm4,%xmm1
  movd   %r14d,%xmm5
  movd   %r14d,%xmm0
  mulss  %xmm5,%xmm0
  addss  %xmm1,%xmm0
  movss  0xc(%rsp),%xmm4
  movaps %xmm4,%xmm1
  mulss  %xmm4,%xmm1
  addss  %xmm1,%xmm0
  cvtss2sd %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L45
  sqrtsd %xmm0,%xmm0
L23:
  movsd  D92(%rip),%xmm1
  divsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsd2ss %xmm1,%xmm0
  movd   %r14d,%xmm1
  mulss  %xmm0,%xmm1
  movss  0x10(%rsp),%xmm2
  mulss  %xmm0,%xmm2
  movss  0xc(%rsp),%xmm4
  mulss  %xmm0,%xmm4
  movd   %r13d,%xmm9
  mulss  %xmm2,%xmm9
  movd   %r12d,%xmm0
  mulss  %xmm4,%xmm0
  subss  %xmm0,%xmm9
  movd   %ebp,%xmm7
  mulss  %xmm4,%xmm7
  movd   %r13d,%xmm0
  mulss  %xmm1,%xmm0
  subss  %xmm0,%xmm7
  movd   %r12d,%xmm0
  mulss  %xmm1,%xmm0
  movd   %ebp,%xmm3
  mulss  %xmm2,%xmm3
  subss  %xmm3,%xmm0
  movss  D99(%rip),%xmm6
  movd   %ebp,%xmm5
  xorps  %xmm6,%xmm5
  movaps %xmm1,%xmm10
  xorps  %xmm6,%xmm10
  xorps  %xmm2,%xmm6
  movd   %ebp,%xmm3
  mulss  %xmm5,%xmm3
  movaps %xmm9,%xmm8
  mulss  %xmm9,%xmm8
  addss  %xmm8,%xmm3
  mulss  %xmm10,%xmm1
  addss  %xmm1,%xmm3
  movd   %r12d,%xmm8
  mulss  %xmm5,%xmm8
  movaps %xmm9,%xmm1
  mulss  %xmm7,%xmm1
  addss  %xmm1,%xmm8
  movaps %xmm2,%xmm1
  mulss  %xmm10,%xmm1
  addss  %xmm1,%xmm8
  movd   %r13d,%xmm1
  mulss  %xmm1,%xmm5
  movaps %xmm9,%xmm1
  mulss  %xmm0,%xmm1
  addss  %xmm1,%xmm5
  mulss  %xmm4,%xmm10
  addss  %xmm10,%xmm5
  movaps %xmm7,%xmm1
  mulss  %xmm7,%xmm1
  subss  0x1c(%rsp),%xmm1
  mulss  %xmm6,%xmm2
  addss  %xmm2,%xmm1
  movd   %r13d,%xmm2
  mulss  0x14(%rsp),%xmm2
  mulss  %xmm0,%xmm7
  addss  %xmm7,%xmm2
  mulss  %xmm4,%xmm6
  addss  %xmm6,%xmm2
  mulss  %xmm4,%xmm4
  mulss  %xmm0,%xmm0
  subss  0x18(%rsp),%xmm0
  subss  %xmm4,%xmm0
  movaps %xmm8,%xmm7
  movaps %xmm5,%xmm12
  movaps %xmm2,%xmm9
  jmp    L77
L50:
  movss  0x14(%rsp),%xmm4
  movss  %xmm4,0xc(%rsp)
  mov    %r13d,0x10(%rsp)
  pxor   %xmm5,%xmm5
  movd   %xmm5,%r14d
  jmp    L9
L45:
  call   <sqrt@plt>
  jmp    L23
L63:
  movd   %r12d,%xmm2
  mulss  %xmm1,%xmm2
  movd   %r13d,%xmm4
  mulss  %xmm0,%xmm4
  subss  %xmm4,%xmm2
  movd   %r13d,%xmm4
  mulss  %xmm5,%xmm4
  movd   %ebp,%xmm7
  mulss  %xmm7,%xmm1
  subss  %xmm1,%xmm4
  mulss  %xmm7,%xmm0
  movd   %r12d,%xmm1
  mulss  %xmm5,%xmm1
  subss  %xmm1,%xmm0
  movsd  D92(%rip),%xmm1
  subsd  %xmm3,%xmm1
  movaps %xmm2,%xmm3
  mulss  %xmm2,%xmm3
  movaps %xmm4,%xmm5
  mulss  %xmm4,%xmm5
  addss  %xmm5,%xmm3
  movaps %xmm0,%xmm5
  mulss  %xmm0,%xmm5
  addss  %xmm5,%xmm3
  cvtss2sd %xmm3,%xmm3
  divsd  %xmm3,%xmm1
  cvtsd2ss %xmm1,%xmm1
  movaps %xmm2,%xmm3
  mulss  %xmm1,%xmm3
  movaps %xmm0,%xmm10
  mulss  %xmm1,%xmm10
  movaps %xmm4,%xmm8
  mulss  %xmm3,%xmm8
  movaps %xmm0,%xmm5
  mulss  %xmm3,%xmm5
  movaps %xmm4,%xmm11
  mulss  %xmm10,%xmm11
  mulss  %xmm2,%xmm3
  addss  %xmm6,%xmm3
  movaps %xmm8,%xmm7
  subss  %xmm0,%xmm7
  movaps %xmm4,%xmm12
  addss  %xmm5,%xmm12
  addss  %xmm0,%xmm8
  mulss  %xmm4,%xmm1
  mulss  %xmm4,%xmm1
  addss  %xmm6,%xmm1
  movaps %xmm11,%xmm9
  subss  %xmm2,%xmm9
  subss  %xmm4,%xmm5
  addss  %xmm11,%xmm2
  mulss  %xmm10,%xmm0
  addss  %xmm6,%xmm0
  jmp    L77
L78:
  movss  D33(%rip),%xmm3
  pxor   %xmm7,%xmm7
  movaps %xmm7,%xmm12
  movaps %xmm7,%xmm8
  movaps %xmm3,%xmm1
  movaps %xmm7,%xmm9
  movaps %xmm7,%xmm5
  movaps %xmm7,%xmm2
  movaps %xmm3,%xmm0
L77:
  movss  %xmm3,(%rbx)
  movss  %xmm7,0x4(%rbx)
  movss  %xmm12,0x8(%rbx)
  movss  %xmm8,0xc(%rbx)
  movss  %xmm1,0x10(%rbx)
  movss  %xmm9,0x14(%rbx)
  movss  %xmm5,0x18(%rbx)
  movss  %xmm2,0x1c(%rbx)
  movss  %xmm0,0x20(%rbx)
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

tool_calls: name: retrieve_data
arguments: label: D42
type: byte[16]
name: retrieve_data
arguments: label: D81
type: byte[8]
name: retrieve_data
arguments: label: D99
type: byte[16]
name: retrieve_data
arguments: label: D97
type: f64
name: retrieve_data
arguments: label: D47
type: f64
name: retrieve_data
arguments: label: D92
type: f64
name: retrieve_data
arguments: label: D33
type: byte[4]

tool: {"D42": [0xe9,0x0b,0x21,0xe7,0xfd,0xff,0xef,0x3f,0xe9,0x0b,0x21,0xe7,0xfd,0xff,0xef,0xbf]}

tool: {"D81": [0xe9,0x0b,0x21,0xe7,0xfd,0xff,0xef,0xbf]}

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

tool: D97: 0

tool: D47: 1e-06

tool: D92: 1

tool: {"D33": [0x00,0x00,0x80,0x3f]}

assistant: ```c
void fromToRotation(float from[3], float to[3], float mtx[3][3]) {
  float v[3];
  float e, h;
  {
    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]);
  if (e > 1.0 - 0.000001) {
    mtx[0][0] = 1.0;
    mtx[0][1] = 0.0;
    mtx[0][2] = 0.0;
    mtx[1][0] = 0.0;
    mtx[1][1] = 1.0;
    mtx[1][2] = 0.0;
    mtx[2][0] = 0.0;
    mtx[2][1] = 0.0;
    mtx[2][2] = 1.0;
  } else if (e < -1.0 + 0.000001) {
    float up[3], left[3];
    float invlen;
    float fxx, fyy, fzz, fxy, fxz, fyz;
    float uxx, uyy, uzz, uxy, uxz, uyz;
    float lxx, lyy, lzz, lxy, lxz, lyz;
    left[0] = 0.0;
    left[1] = from[2];
    left[2] = -from[1];
    if ((left[0] * left[0] + left[1] * left[1] + left[2] * left[2]) < 0.000001) {
      left[0] = -from[2];
      left[1] = 0.0;
      left[2] = from[0];
    }
    invlen = 1.0 / sqrt((left[0] * left[0] + left[1] * left[1] + left[2] * left[2]));
    left[0] *= invlen;
    left[1] *= invlen;
    left[2] *= invlen;
    {
      up[0] = left[1] * from[2] - left[2] * from[1];
      up[1] = left[2] * from[0] - left[0] * from[2];
      up[2] = left[0] * from[1] - left[1] * from[0];
    };
    fxx = -from[0] * from[0];
    fyy = -from[1] * from[1];
    fzz = -from[2] * from[2];
    fxy = -from[0] * from[1];
    fxz = -from[0] * from[2];
    fyz = -from[1] * from[2];
    uxx = up[0] * up[0];
    uyy = up[1] * up[1];
    uzz = up[2] * up[2];
    uxy = up[0] * up[1];
    uxz = up[0] * up[2];
    uyz = up[1] * up[2];
    lxx = -left[0] * left[0];
    lyy = -left[1] * left[1];
    lzz = -left[2] * left[2];
    lxy = -left[0] * left[1];
    lxz = -left[0] * left[2];
    lyz = -left[1] * left[2];
    mtx[0][0] = fxx + uxx + lxx;
    mtx[0][1] = fxy + uxy + lxy;
    mtx[0][2] = fxz + uxz + lxz;
    mtx[1][0] = mtx[0][1];
    mtx[1][1] = fyy + uyy + lyy;
    mtx[1][2] = fyz + uyz + lyz;
    mtx[2][0] = mtx[0][2];
    mtx[2][1] = mtx[1][2];
    mtx[2][2] = fzz + uzz + lzz;
  } else {
    float hvx, hvz, hvxy, hvxz, hvyz;
    h = (1.0 - e) / (v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
    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];
  }
}
```