user: 请将以下的汇编代码转换成C语言代码：

```asm
<ft_cos>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm1
  movsd  D75(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm0
  comisd D16(%rip),%xmm0
  jbe    L67
  movsd  -0x18(%rbp),%xmm0
  movsd  D46(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
L67:
  pxor   %xmm0,%xmm0
  comisd -0x18(%rbp),%xmm0
  jbe    L66
  movsd  -0x18(%rbp),%xmm1
  movsd  D44(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x18(%rbp),%xmm2
  movsd  D65(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  -0x18(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x8(%rbp),%xmm0
  jbe    L26
  movsd  -0x8(%rbp),%xmm0
  movq   D40(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x8(%rbp),%xmm1
  movsd  D49(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  jmp    L6
L26:
  movsd  -0x8(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x8(%rbp),%xmm1
  movsd  D49(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  jmp    L6
L66:
  movsd  -0x18(%rbp),%xmm1
  movsd  D44(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x18(%rbp),%xmm2
  movsd  D65(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  mulsd  -0x18(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x8(%rbp),%xmm0
  jbe    L13
  movsd  -0x8(%rbp),%xmm0
  movq   D40(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x8(%rbp),%xmm1
  movsd  D49(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  jmp    L6
L13:
  movsd  -0x8(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x8(%rbp),%xmm1
  movsd  D49(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
L6:
  movsd  -0x8(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D75
datatype: f64
name: parse_data
arguments: data_tag: D16
datatype: f64[2]
name: parse_data
arguments: data_tag: D46
datatype: f64
name: parse_data
arguments: data_tag: D44
datatype: f64
name: parse_data
arguments: data_tag: D65
datatype: f64
name: parse_data
arguments: data_tag: D40
datatype: byte[8]
name: parse_data
arguments: data_tag: D49
datatype: f64

tool: D75: 1.57079632

tool: {"D16": [3.14159265,6.28318531]}

tool: D46: 6.28318531

tool: D44: 1.27323954

tool: D65: 0.405284735

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

tool: D49: 0.225

assistant: ```c
double ft_cos(double ang) {
  double cosinus;
  ang += 1.57079632;
  if (ang > 3.14159265)
    ang -= 6.28318531;
  if (ang < 0) {
    cosinus = 1.27323954 * ang + 0.405284735 * ang * ang;
    if (cosinus < 0)
      cosinus = 0.225 * (cosinus * (-cosinus) - cosinus) + cosinus;
    else
      cosinus = 0.225 * (cosinus * cosinus - cosinus) + cosinus;
  } else {
    cosinus = 1.27323954 * ang - 0.405284735 * ang * ang;
    if (cosinus < 0)
      cosinus = 0.225 * (cosinus * (-cosinus) - cosinus) + cosinus;
    else
      cosinus = 0.225 * (cosinus * cosinus - cosinus) + cosinus;
  }
  return (cosinus);
}
```