user: Please show me the C implementation that matches the assembly code listed below:

```asm
<getRotationMatrixFromVectors>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x40(%rbp),%rax
  mov    $0x3,%esi
  mov    %rax,%rdi
  call   <normalizeVector@plt>
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x20(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x1c(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x18(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x14(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x30(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x2c(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x28(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L24
L23:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  %xmm1,%xmm0
  movss  -0x30(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x30(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  %xmm1,%xmm0
  movss  -0x2c(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x2c(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  %xmm1,%xmm0
  movss  -0x28(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x28(%rbp)
  addl   $0x1,-0x24(%rbp)
L24:
  cmpl   $0x2,-0x24(%rbp)
  jle    L23
  movss  -0x30(%rbp),%xmm0
  mulss  -0x2c(%rbp),%xmm0
  movd   %xmm0,%eax
  movd   %eax,%xmm0
  call   <sqrt@plt>
  movd   %xmm0,%eax
  movd   %eax,%xmm0
  addss  -0x28(%rbp),%xmm0
  movss  %xmm0,-0x20(%rbp)
  mov    -0x38(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm1
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm0
  mulss  %xmm1,%xmm0
  mov    -0x38(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm2
  mov    -0x40(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm1
  mulss  %xmm2,%xmm1
  subss  %xmm1,%xmm0
  movss  D29(%rip),%xmm1
  xorps  %xmm1,%xmm0
  movss  %xmm0,-0x1c(%rbp)
  mov    -0x38(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm1
  mov    -0x40(%rbp),%rax
  movss  (%rax),%xmm0
  mulss  %xmm1,%xmm0
  mov    -0x38(%rbp),%rax
  movss  (%rax),%xmm2
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm1
  mulss  %xmm2,%xmm1
  subss  %xmm1,%xmm0
  movss  D29(%rip),%xmm1
  xorps  %xmm1,%xmm0
  movss  %xmm0,-0x18(%rbp)
  mov    -0x38(%rbp),%rax
  movss  (%rax),%xmm1
  mov    -0x40(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm0
  mulss  %xmm1,%xmm0
  mov    -0x38(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm2
  mov    -0x40(%rbp),%rax
  movss  (%rax),%xmm1
  mulss  %xmm2,%xmm1
  subss  %xmm1,%xmm0
  movss  D29(%rip),%xmm1
  xorps  %xmm1,%xmm0
  movss  %xmm0,-0x14(%rbp)
  lea    -0x20(%rbp),%rax
  mov    $0x4,%esi
  mov    %rax,%rdi
  call   <normalizeVector@plt>
  mov    -0x48(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <getRotationMatrixFromQuartenion@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L2
  call   <__stack_chk_fail@plt>
L2:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D29
type: byte[4]

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

assistant: ```c
void getRotationMatrixFromVectors(float vin[3], float vout[3], float matrix[4][4]) {
  normalizeVector(vout, 3);
  float q[4] = {0, 0, 0, 0};
  float vin_length = 0;
  float vout_length = 0;
  float dotprod = 0;
  int i;
  for (i = 0; i < 3; i++) {
    vin_length += vin[i] * vin[i];
    vout_length += vout[i] * vout[i];
    dotprod += vin[i] * vout[i];
  }
  q[0] = sqrt(vin_length * vout_length) + dotprod;
  q[1] = -1 * (vin[1] * vout[2] - vin[2] * vout[1]);
  q[2] = -1 * (vin[2] * vout[0] - vin[0] * vout[2]);
  q[3] = -1 * (vin[0] * vout[1] - vin[1] * vout[0]);
  normalizeVector(q, 4);
  getRotationMatrixFromQuartenion(q, matrix);
}
```