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

```asm
<Torsion>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xf0,%rsp
  mov    %rdi,-0xd8(%rbp)
  mov    %rsi,-0xe0(%rbp)
  mov    %rdx,-0xe8(%rbp)
  mov    %rcx,-0xf0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0xc4(%rbp)
  jmp    L49
L135:
  mov    -0xc4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xe0(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0xc4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  subss  %xmm1,%xmm0
  cvtss2sd %xmm0,%xmm0
  mov    -0xc4(%rbp),%eax
  cltq
  movsd  %xmm0,-0x50(%rbp,%rax,8)
  mov    -0xc4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xe8(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0xc4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xe0(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  subss  %xmm1,%xmm0
  cvtss2sd %xmm0,%xmm0
  mov    -0xc4(%rbp),%eax
  cltq
  add    $0x3,%rax
  movsd  %xmm0,-0x50(%rbp,%rax,8)
  mov    -0xc4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xf0(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0xc4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xe8(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  subss  %xmm1,%xmm0
  cvtss2sd %xmm0,%xmm0
  mov    -0xc4(%rbp),%eax
  cltq
  add    $0x6,%rax
  movsd  %xmm0,-0x50(%rbp,%rax,8)
  addl   $0x1,-0xc4(%rbp)
L49:
  cmpl   $0x2,-0xc4(%rbp)
  jle    L135
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  movl   $0x0,-0xc4(%rbp)
  jmp    L23
L58:
  mov    -0xc4(%rbp),%eax
  add    $0x1,%eax
  movslq %eax,%rdx
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  mov    %edx,-0xc0(%rbp)
  mov    -0xc0(%rbp),%ecx
  mov    %ecx,%edx
  add    %edx,%edx
  add    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,-0xc0(%rbp)
  mov    -0xc0(%rbp),%eax
  add    $0x1,%eax
  movslq %eax,%rdx
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  mov    %edx,-0xbc(%rbp)
  mov    -0xbc(%rbp),%ecx
  mov    %ecx,%edx
  add    %edx,%edx
  add    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,-0xbc(%rbp)
  mov    -0xc0(%rbp),%eax
  cltq
  movsd  -0x50(%rbp,%rax,8),%xmm1
  mov    -0xbc(%rbp),%eax
  cltq
  add    $0x3,%rax
  movsd  -0x50(%rbp,%rax,8),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0xbc(%rbp),%eax
  cltq
  movsd  -0x50(%rbp,%rax,8),%xmm2
  mov    -0xc0(%rbp),%eax
  cltq
  add    $0x3,%rax
  movsd  -0x50(%rbp,%rax,8),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  mov    -0xc4(%rbp),%eax
  cltq
  movsd  %xmm0,-0x90(%rbp,%rax,8)
  mov    -0xc0(%rbp),%eax
  cltq
  add    $0x3,%rax
  movsd  -0x50(%rbp,%rax,8),%xmm1
  mov    -0xbc(%rbp),%eax
  cltq
  add    $0x6,%rax
  movsd  -0x50(%rbp,%rax,8),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0xbc(%rbp),%eax
  cltq
  add    $0x3,%rax
  movsd  -0x50(%rbp,%rax,8),%xmm2
  mov    -0xc0(%rbp),%eax
  cltq
  add    $0x6,%rax
  movsd  -0x50(%rbp,%rax,8),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  mov    -0xc4(%rbp),%eax
  cltq
  movsd  %xmm0,-0x70(%rbp,%rax,8)
  mov    -0xc4(%rbp),%eax
  cltq
  movsd  -0x90(%rbp,%rax,8),%xmm1
  mov    -0xc4(%rbp),%eax
  cltq
  movsd  -0x90(%rbp,%rax,8),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0xa8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  mov    -0xc4(%rbp),%eax
  cltq
  movsd  -0x70(%rbp,%rax,8),%xmm1
  mov    -0xc4(%rbp),%eax
  cltq
  movsd  -0x70(%rbp,%rax,8),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0xa0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  addl   $0x1,-0xc4(%rbp)
L23:
  cmpl   $0x2,-0xc4(%rbp)
  jle    L58
  mov    -0xa8(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0xa8(%rbp)
  mov    -0xa0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0xa0(%rbp)
  movl   $0x0,-0xc4(%rbp)
  jmp    L130
L17:
  mov    -0xc4(%rbp),%eax
  cltq
  movsd  -0x90(%rbp,%rax,8),%xmm0
  divsd  -0xa8(%rbp),%xmm0
  mov    -0xc4(%rbp),%eax
  cltq
  movsd  %xmm0,-0x90(%rbp,%rax,8)
  mov    -0xc4(%rbp),%eax
  cltq
  movsd  -0x70(%rbp,%rax,8),%xmm0
  divsd  -0xa0(%rbp),%xmm0
  mov    -0xc4(%rbp),%eax
  cltq
  movsd  %xmm0,-0x70(%rbp,%rax,8)
  addl   $0x1,-0xc4(%rbp)
L130:
  cmpl   $0x2,-0xc4(%rbp)
  jle    L17
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  movl   $0x0,-0xc4(%rbp)
  jmp    L97
L94:
  mov    -0xc4(%rbp),%eax
  cltq
  movsd  -0x90(%rbp,%rax,8),%xmm1
  mov    -0xc4(%rbp),%eax
  cltq
  movsd  -0x70(%rbp,%rax,8),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0xb8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  addl   $0x1,-0xc4(%rbp)
L97:
  cmpl   $0x2,-0xc4(%rbp)
  jle    L94
  movsd  -0xb8(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L146
  movsd  -0xb8(%rbp),%xmm0
  movsd  D13(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movq   D11(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  D93(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L146
  movsd  -0xb8(%rbp),%xmm0
  movsd  D93(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  jmp    L65
L146:
  pxor   %xmm0,%xmm0
  comisd -0xb8(%rbp),%xmm0
  jbe    L65
  movsd  -0xb8(%rbp),%xmm1
  movsd  D13(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movq   D11(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  D93(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L65
  movsd  -0xb8(%rbp),%xmm1
  movsd  D93(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xb8(%rbp)
L65:
  mov    -0xb8(%rbp),%rax
  movq   %rax,%xmm0
  call   <acos@plt>
  movsd  D68(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movl   $0x0,-0xc4(%rbp)
  jmp    L53
L63:
  mov    -0xc4(%rbp),%eax
  cltq
  movsd  -0x50(%rbp,%rax,8),%xmm1
  mov    -0xc4(%rbp),%eax
  cltq
  movsd  -0x70(%rbp,%rax,8),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0xb0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  addl   $0x1,-0xc4(%rbp)
L53:
  cmpl   $0x2,-0xc4(%rbp)
  jle    L63
  movsd  -0xb0(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L109
  pxor   %xmm0,%xmm0
  cvtsd2ss -0x98(%rbp),%xmm0
  jmp    L152
L109:
  pxor   %xmm0,%xmm0
  cvtsd2ss -0x98(%rbp),%xmm0
  movss  D5(%rip),%xmm1
  xorps  %xmm1,%xmm0
L152:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L118
  call   <__stack_chk_fail@plt>
L118:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D13
type: f64
name: extract_symbolic_data
arguments: data_label: D11
type: qword
name: extract_symbolic_data
arguments: data_label: D93
type: f64
name: extract_symbolic_data
arguments: data_label: D68
type: f64
name: extract_symbolic_data
arguments: data_label: D5
type: byte[4]

tool: D13: 1

tool: D11: 9223372036854775807

tool: D93: 1e-06

tool: D68: 57.2958

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

assistant: ```c
float Torsion(float *Coord1, float *Coord2, float *Coord3, float *Coord4) {
  double Comp[3][3], ScalarProd, TripleScalarProd, AbsTorsAng;
  double Perp_123[3], Perp_234[3], Len_Perp_123, Len_Perp_234;
  int i, j, k;
  for (i = 0; i < 3; i++) {
    Comp[0][i] = (double)(Coord2[i] - Coord1[i]);
    Comp[1][i] = (double)(Coord3[i] - Coord2[i]);
    Comp[2][i] = (double)(Coord4[i] - Coord3[i]);
  }
  Len_Perp_123 = 0.0;
  Len_Perp_234 = 0.0;
  for (i = 0; i < 3; i++) {
    j = (i + 1) % 3;
    k = (j + 1) % 3;
    Perp_123[i] = Comp[0][j] * Comp[1][k] - Comp[0][k] * Comp[1][j];
    Perp_234[i] = Comp[1][j] * Comp[2][k] - Comp[1][k] * Comp[2][j];
    Len_Perp_123 += Perp_123[i] * Perp_123[i];
    Len_Perp_234 += Perp_234[i] * Perp_234[i];
  }
  Len_Perp_123 = sqrt(Len_Perp_123);
  Len_Perp_234 = sqrt(Len_Perp_234);
  for (i = 0; i < 3; i++) {
    Perp_123[i] /= Len_Perp_123;
    Perp_234[i] /= Len_Perp_234;
  }
  ScalarProd = 0.0;
  for (i = 0; i < 3; i++)
    ScalarProd += Perp_123[i] * Perp_234[i];
  if (ScalarProd > 0.0 && fabs(ScalarProd - 1.0) < 0.000001)
    ScalarProd -= 0.000001;
  else if (ScalarProd < 0.0 && fabs(ScalarProd + 1.0) < 0.000001)
    ScalarProd += 0.000001;
  AbsTorsAng = 57.2958 * acos(ScalarProd);
  TripleScalarProd = 0.0;
  for (i = 0; i < 3; i++)
    TripleScalarProd += Comp[0][i] * Perp_234[i];
  return ((TripleScalarProd > 0.0) ? (float)AbsTorsAng : (float)(-AbsTorsAng));
}
```