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

```asm
<__kernel_tan>:
  endbr64
  movq   %xmm0,%rdx
  movapd %xmm0,%xmm6
  movq   %xmm0,%rsi
  mov    %edi,%eax
  sar    $0x20,%rdx
  mov    %edx,%ecx
  and    $0x7fffffff,%ecx
  cmp    $0x3e2fffff,%ecx
  jg     L2
  cvttsd2si %xmm0,%edi
  test   %edi,%edi
  jne    L34
  or     %ecx,%esi
  lea    0x1(%rax),%edx
  or     %edx,%esi
  je     L8
  cmp    $0x1,%eax
  je     L29
  movapd %xmm1,%xmm2
  movsd  D164(%rip),%xmm4
  movabs $0xffffffff00000000,%rdx
  addsd  %xmm0,%xmm2
  divsd  %xmm2,%xmm4
  movq   %xmm2,%rax
  and    %rdx,%rax
  movq   %rax,%xmm3
  movapd %xmm3,%xmm5
  subsd  %xmm0,%xmm5
  subsd  %xmm5,%xmm1
  movapd %xmm1,%xmm0
  movq   %xmm4,%rax
  and    %rdx,%rax
  movq   %rax,%xmm2
  mulsd  %xmm2,%xmm0
  mulsd  %xmm2,%xmm3
  addsd  D152(%rip),%xmm3
  addsd  %xmm3,%xmm0
  mulsd  %xmm4,%xmm0
  addsd  %xmm2,%xmm0
  ret
  nopl   0x0(%rax,%rax,1)
L2:
  cmp    $0x3fe59427,%ecx
  jle    L34
  test   %edx,%edx
  jns    L45
  movq   D6(%rip),%xmm0
  xorpd  %xmm0,%xmm6
  xorpd  %xmm0,%xmm1
L45:
  movsd  D165(%rip),%xmm0
  subsd  %xmm6,%xmm0
  movsd  D113(%rip),%xmm6
  subsd  %xmm1,%xmm6
  pxor   %xmm1,%xmm1
  addsd  %xmm0,%xmm6
L34:
  movapd %xmm6,%xmm3
  movsd  D106(%rip),%xmm0
  movsd  D126(%rip),%xmm4
  mulsd  %xmm6,%xmm3
  movapd %xmm3,%xmm5
  movapd %xmm3,%xmm2
  mulsd  %xmm3,%xmm5
  mulsd  %xmm6,%xmm2
  mulsd  %xmm5,%xmm0
  addsd  D44(%rip),%xmm0
  mulsd  %xmm5,%xmm4
  addsd  D43(%rip),%xmm4
  mulsd  %xmm5,%xmm0
  addsd  D183(%rip),%xmm0
  mulsd  %xmm5,%xmm4
  addsd  D56(%rip),%xmm4
  mulsd  %xmm5,%xmm0
  addsd  D166(%rip),%xmm0
  mulsd  %xmm5,%xmm4
  addsd  D161(%rip),%xmm4
  mulsd  %xmm5,%xmm0
  addsd  D195(%rip),%xmm0
  mulsd  %xmm5,%xmm4
  addsd  D120(%rip),%xmm4
  mulsd  %xmm5,%xmm0
  addsd  D172(%rip),%xmm0
  mulsd  %xmm5,%xmm4
  addsd  D49(%rip),%xmm4
  mulsd  %xmm3,%xmm0
  addsd  %xmm4,%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  D179(%rip),%xmm2
  addsd  %xmm1,%xmm0
  mulsd  %xmm3,%xmm0
  addsd  %xmm0,%xmm1
  addsd  %xmm1,%xmm2
  movapd %xmm2,%xmm0
  addsd  %xmm6,%xmm0
  cmp    $0x3fe59427,%ecx
  jg     L18
  cmp    $0x1,%eax
  je     L29
  movsd  D164(%rip),%xmm1
  movq   %xmm0,%rax
  movabs $0xffffffff00000000,%rdx
  and    %rdx,%rax
  divsd  %xmm0,%xmm1
  movq   %rax,%xmm3
  movapd %xmm3,%xmm4
  subsd  %xmm6,%xmm4
  subsd  %xmm4,%xmm2
  movq   %xmm1,%rax
  and    %rdx,%rax
  movq   %rax,%xmm0
  mulsd  %xmm0,%xmm2
  mulsd  %xmm0,%xmm3
  addsd  D152(%rip),%xmm3
  addsd  %xmm3,%xmm2
  mulsd  %xmm1,%xmm2
  addsd  %xmm2,%xmm0
L29:
  ret
  cs nopw 0x0(%rax,%rax,1)
L18:
  pxor   %xmm3,%xmm3
  movapd %xmm0,%xmm1
  sar    $0x1e,%edx
  cvtsi2sd %eax,%xmm3
  mulsd  %xmm0,%xmm1
  and    $0x2,%edx
  mov    $0x1,%eax
  sub    %edx,%eax
  addsd  %xmm3,%xmm0
  divsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  subsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm6
  addsd  %xmm6,%xmm6
  subsd  %xmm6,%xmm3
  mulsd  %xmm3,%xmm0
  ret
  nopw   0x0(%rax,%rax,1)
L8:
  andpd  D83(%rip),%xmm6
  movsd  D152(%rip),%xmm0
  divsd  %xmm6,%xmm0
  ret
```

tool_calls: name: read_data
arguments: label: D164
type_guessed: f32[2]
name: read_data
arguments: label: D152
type_guessed: f64
name: read_data
arguments: label: D6
type_guessed: f32[2]
name: read_data
arguments: label: D165
type_guessed: byte[8]
name: read_data
arguments: label: D113
type_guessed: byte[8]
name: read_data
arguments: label: D106
type_guessed: byte[8]
name: read_data
arguments: label: D126
type_guessed: byte[8]
name: read_data
arguments: label: D44
type_guessed: byte[8]
name: read_data
arguments: label: D43
type_guessed: byte[8]
name: read_data
arguments: label: D183
type_guessed: byte[8]
name: read_data
arguments: label: D56
type_guessed: byte[8]
name: read_data
arguments: label: D166
type_guessed: byte[8]
name: read_data
arguments: label: D161
type_guessed: byte[8]
name: read_data
arguments: label: D195
type_guessed: byte[8]
name: read_data
arguments: label: D120
type_guessed: byte[8]
name: read_data
arguments: label: D172
type_guessed: byte[8]
name: read_data
arguments: label: D49
type_guessed: byte[8]
name: read_data
arguments: label: D179
type_guessed: byte[8]
name: read_data
arguments: label: D83
type_guessed: qword[2]

tool: {"D164": [0.0,-1.875]}

tool: D152: 1

tool: {"D6": [0.0,-0.0]}

tool: {"D165": [0x18,0x2d,0x44,0x54,0xfb,0x21,0xe9,0x3f]}

tool: {"D113": [0x07,0x5c,0x14,0x33,0x26,0xa6,0x81,0x3c]}

tool: {"D106": [0xd4,0x7a,0xbf,0x74,0x70,0x2a,0xfb,0x3e]}

tool: {"D126": [0x73,0x53,0x60,0xdb,0xcb,0x75,0xf3,0xbe]}

tool: {"D44": [0xe9,0xa7,0xf0,0x32,0x0f,0xb8,0x12,0x3f]}

tool: {"D43": [0xa6,0x92,0x37,0xa0,0x88,0x7e,0x14,0x3f]}

tool: {"D183": [0x68,0x10,0x8d,0x1a,0xf7,0x26,0x30,0x3f]}

tool: {"D56": [0x01,0x65,0xf2,0xf2,0xd8,0x44,0x43,0x3f]}

tool: {"D166": [0x15,0x83,0xe0,0xfe,0xc8,0xdb,0x57,0x3f]}

tool: {"D161": [0x28,0x03,0x56,0xc9,0x22,0x6d,0x6d,0x3f]}

tool: {"D195": [0x93,0x84,0x6e,0xe9,0xe3,0x26,0x82,0x3f]}

tool: {"D120": [0x37,0xd6,0x06,0x84,0xf4,0x64,0x96,0x3f]}

tool: {"D172": [0xfe,0x41,0xb3,0x1b,0xba,0xa1,0xab,0x3f]}

tool: {"D49": [0x7a,0xfe,0x10,0x11,0x11,0x11,0xc1,0x3f]}

tool: {"D179": [0x63,0x55,0x55,0x55,0x55,0x55,0xd5,0x3f]}

tool: {"D83": [0x7fffffffffffffff,0x0000000000000000]}

assistant: ```c
double __kernel_tan(double x, double y, int iy) {
  double z, r, v, w, s;
  int ix, hx;
  hx = *(1 + (int *)&x);
  ix = hx & 0x7fffffff;
  if (ix < 0x3e300000) {
    if ((int)x == 0) {
      if (((ix | *(int *)&x) | (iy + 1)) == 0) {
        return 1.00000000000000000000e+00 / fabs(x);
      } else {
        if (iy == 1) {
          return x;
        } else {
          double a, t;
          z = w = x + y;
          *(int *)&z = 0;
          v = y - (z - x);
          t = a = -1.00000000000000000000e+00 / w;
          *(int *)&t = 0;
          s = 1.00000000000000000000e+00 + t * z;
          return t + a * (s + t * v);
        }
      }
    }
  }
  if (ix >= 0x3FE59428) {
    if (hx < 0) {
      x = -x;
      y = -y;
    }
    z = 7.85398163397448278999e-01 - x;
    w = 3.06161699786838301793e-17 - y;
    x = z + w;
    y = 0.0;
  }
  z = x * x;
  w = z * z;
  r = 1.33333333333201242699e-01 + w * (2.18694882948595424599e-02 + w * (3.59207910759131235356e-03 + w * (5.88041240820264096874e-04 + w * (7.81794442939557092300e-05 + w * -1.85586374855275456654e-05))));
  v = z * (5.39682539762260521377e-02 + w * (8.86323982359930005737e-03 + w * (1.45620945432529025516e-03 + w * (2.46463134818469906812e-04 + w * (7.14072491382608190305e-05 + w * 2.59073051863633712884e-05)))));
  s = z * x;
  r = y + z * (s * (r + v) + y);
  r += 3.33333333333334091986e-01 * s;
  w = x + r;
  if (ix >= 0x3FE59428) {
    v = (double)iy;
    return (double)(1 - ((hx >> 30) & 2)) * (v - 2.0 * (x - (w * w / (w + v) - r)));
  }
  if (iy == 1) {
    return w;
  } else {
    double a, t;
    z = w;
    *(int *)&z = 0;
    v = r - (z - x);
    t = a = -1.0 / w;
    *(int *)&t = 0;
    s = 1.0 + t * z;
    return t + a * (s + t * v);
  }
}
```