user: 请从给定的汇编指令推导出C源代码：

```asm
<cos>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  movsd  %xmm0,-0x18(%rbp)
  movsd  D43(%rip),%xmm0
  comisd -0x18(%rbp),%xmm0
  jbe    L53
  movsd  -0x18(%rbp),%xmm1
  movsd  D63(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  jmp    L22
L53:
  movsd  -0x18(%rbp),%xmm0
  comisd D153(%rip),%xmm0
  jbe    L22
  movsd  -0x18(%rbp),%xmm0
  movsd  D63(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
L22:
  movsd  -0x18(%rbp),%xmm1
  movsd  D12(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm0
  comisd D153(%rip),%xmm0
  jbe    L99
  movsd  -0x18(%rbp),%xmm0
  movsd  D63(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
L99:
  pxor   %xmm0,%xmm0
  comisd -0x18(%rbp),%xmm0
  jbe    L87
  movsd  -0x18(%rbp),%xmm1
  movsd  D67(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x18(%rbp),%xmm2
  movsd  D34(%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   D93(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x8(%rbp),%xmm1
  movsd  D44(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  jmp    L49
L26:
  movsd  -0x8(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x8(%rbp),%xmm1
  movsd  D44(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  jmp    L49
L87:
  movsd  -0x18(%rbp),%xmm1
  movsd  D67(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x18(%rbp),%xmm2
  movsd  D34(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  mulsd  -0x18(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x8(%rbp),%xmm0
  jbe    L96
  movsd  -0x8(%rbp),%xmm0
  movq   D93(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x8(%rbp),%xmm1
  movsd  D44(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  jmp    L49
L96:
  movsd  -0x8(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x8(%rbp),%xmm1
  movsd  D44(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
L49:
  movsd  -0x8(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D43
type_guessed: byte[8]
name: unpack_data
arguments: data_tag: D63
type_guessed: f64
name: unpack_data
arguments: data_tag: D153
type_guessed: f64[2]
name: unpack_data
arguments: data_tag: D12
type_guessed: f64
name: unpack_data
arguments: data_tag: D67
type_guessed: f64
name: unpack_data
arguments: data_tag: D34
type_guessed: f64
name: unpack_data
arguments: data_tag: D93
type_guessed: byte[8]
name: unpack_data
arguments: data_tag: D44
type_guessed: byte[8]

tool: {"D43": [0xf1,0xd4,0xc8,0x53,0xfb,0x21,0x09,0xc0]}

tool: D63: 6.28318531

tool: {"D153": [3.14159265,1.57079632]}

tool: D12: 1.57079632

tool: D67: 1.27323954

tool: D34: 0.405284735

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

tool: {"D44": [0xcd,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x3f]}

assistant: ```c
double cos(double x) {
  double cos;
  if (x < -3.14159265)
    x += 6.28318531;
  else if (x > 3.14159265)
    x -= 6.28318531;
  x += 1.57079632;
  if (x > 3.14159265)
    x -= 6.28318531;
  if (x < 0) {
    cos = 1.27323954 * x + 0.405284735 * x * x;
    if (cos < 0)
      cos = .225 * (cos * -cos - cos) + cos;
    else
      cos = .225 * (cos * cos - cos) + cos;
  } else {
    cos = 1.27323954 * x - 0.405284735 * x * x;
    if (cos < 0)
      cos = .225 * (cos * -cos - cos) + cos;
    else
      cos = .225 * (cos * cos - cos) + cos;
  }
  return cos;
}
```