user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<dd_cos_taylor>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x180,%rsp
  mov    %rdi,-0x178(%rbp)
  mov    %rsi,-0x180(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x178(%rbp),%rax
  mov    %rax,%rdi
  call   <dd_is_zero@plt>
  cmp    $0x1,%eax
  jne    L48
  mov    -0x180(%rbp),%rax
  movsd  D319(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x180(%rbp),%rax
  add    $0x8,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  jmp    L40
L48:
  movl   $0xf,-0x164(%rbp)
  movsd  D24(%rip),%xmm0
  movsd  %xmm0,-0x100(%rbp)
  movsd  D3(%rip),%xmm0
  movsd  %xmm0,-0xf8(%rbp)
  movsd  D151(%rip),%xmm0
  movsd  %xmm0,-0xf0(%rbp)
  movsd  D103(%rip),%xmm0
  movsd  %xmm0,-0xe8(%rbp)
  movsd  D266(%rip),%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  movsd  D349(%rip),%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  movsd  D126(%rip),%xmm0
  movsd  %xmm0,-0xd0(%rbp)
  movsd  D149(%rip),%xmm0
  movsd  %xmm0,-0xc8(%rbp)
  movsd  D274(%rip),%xmm0
  movsd  %xmm0,-0xc0(%rbp)
  movsd  D62(%rip),%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  movsd  D46(%rip),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  D72(%rip),%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  movsd  D90(%rip),%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  movsd  D115(%rip),%xmm0
  movsd  %xmm0,-0x98(%rbp)
  movsd  D262(%rip),%xmm0
  movsd  %xmm0,-0x90(%rbp)
  movsd  D80(%rip),%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movsd  D26(%rip),%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movsd  D293(%rip),%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movsd  D175(%rip),%xmm0
  movsd  %xmm0,-0x70(%rbp)
  movsd  D339(%rip),%xmm0
  movsd  %xmm0,-0x68(%rbp)
  movsd  D321(%rip),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  D215(%rip),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  D61(%rip),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  D353(%rip),%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  D165(%rip),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  D185(%rip),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  D218(%rip),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  D182(%rip),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  D50(%rip),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  D148(%rip),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  D71(%rip),%xmm0
  movsd  %xmm0,-0x160(%rbp)
  movsd  -0x160(%rbp),%xmm1
  movsd  D43(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x158(%rbp)
  movl   $0x1,-0x168(%rbp)
  lea    -0x150(%rbp),%rdx
  mov    -0x178(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <dd_sqr@plt>
  lea    -0x150(%rbp),%rax
  mov    %rax,%rdi
  call   <dd_minus@plt>
  lea    -0x140(%rbp),%rdx
  lea    -0x150(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <dd_copy@plt>
  lea    -0x130(%rbp),%rcx
  mov    D43(%rip),%rdx
  lea    -0x140(%rbp),%rax
  mov    %rcx,%rsi
  movq   %rdx,%xmm0
  mov    %rax,%rdi
  call   <dd_mul_pwr2@plt>
  mov    D319(%rip),%rdx
  lea    -0x130(%rbp),%rax
  movq   %rdx,%xmm0
  mov    %rax,%rdi
  call   <dd_inc_d@plt>
L49:
  lea    -0x150(%rbp),%rdx
  lea    -0x140(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <dd_mlt@plt>
  mov    -0x168(%rbp),%eax
  add    $0x1,%eax
  cltq
  movsd  -0x100(%rbp,%rax,8),%xmm0
  movsd  %xmm0,-0x110(%rbp)
  mov    -0x168(%rbp),%eax
  add    $0x2,%eax
  cltq
  movsd  -0x100(%rbp,%rax,8),%xmm0
  movsd  %xmm0,-0x108(%rbp)
  lea    -0x120(%rbp),%rdx
  lea    -0x110(%rbp),%rcx
  lea    -0x140(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <dd_mul@plt>
  lea    -0x120(%rbp),%rdx
  lea    -0x130(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <dd_inc@plt>
  addl   $0x4,-0x168(%rbp)
  mov    -0x164(%rbp),%eax
  add    %eax,%eax
  cmp    %eax,-0x168(%rbp)
  jge    L24
  movsd  -0x120(%rbp),%xmm0
  movq   D76(%rip),%xmm1
  andpd  %xmm1,%xmm0
  comisd -0x158(%rbp),%xmm0
  ja     L49
L24:
  mov    -0x180(%rbp),%rdx
  lea    -0x130(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <dd_copy@plt>
L40:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L46
  call   <__stack_chk_fail@plt>
L46:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D319
datatype: f64
name: retrieve_data
arguments: tag: D24
datatype: byte[8]
name: retrieve_data
arguments: tag: D3
datatype: byte[8]
name: retrieve_data
arguments: tag: D151
datatype: byte[8]
name: retrieve_data
arguments: tag: D103
datatype: byte[8]
name: retrieve_data
arguments: tag: D266
datatype: byte[8]
name: retrieve_data
arguments: tag: D349
datatype: byte[8]
name: retrieve_data
arguments: tag: D126
datatype: byte[8]
name: retrieve_data
arguments: tag: D149
datatype: byte[8]
name: retrieve_data
arguments: tag: D274
datatype: byte[8]
name: retrieve_data
arguments: tag: D62
datatype: byte[8]
name: retrieve_data
arguments: tag: D46
datatype: byte[8]
name: retrieve_data
arguments: tag: D72
datatype: byte[8]
name: retrieve_data
arguments: tag: D90
datatype: byte[8]
name: retrieve_data
arguments: tag: D115
datatype: byte[8]
name: retrieve_data
arguments: tag: D262
datatype: byte[8]
name: retrieve_data
arguments: tag: D80
datatype: byte[8]
name: retrieve_data
arguments: tag: D26
datatype: byte[8]
name: retrieve_data
arguments: tag: D293
datatype: byte[8]
name: retrieve_data
arguments: tag: D175
datatype: byte[8]
name: retrieve_data
arguments: tag: D339
datatype: byte[8]
name: retrieve_data
arguments: tag: D321
datatype: byte[8]
name: retrieve_data
arguments: tag: D215
datatype: byte[8]
name: retrieve_data
arguments: tag: D61
datatype: byte[8]
name: retrieve_data
arguments: tag: D353
datatype: byte[8]
name: retrieve_data
arguments: tag: D165
datatype: byte[8]
name: retrieve_data
arguments: tag: D185
datatype: byte[8]
name: retrieve_data
arguments: tag: D218
datatype: byte[8]
name: retrieve_data
arguments: tag: D182
datatype: byte[8]
name: retrieve_data
arguments: tag: D50
datatype: byte[8]
name: retrieve_data
arguments: tag: D148
datatype: byte[8]
name: retrieve_data
arguments: tag: D71
datatype: byte[8]
name: retrieve_data
arguments: tag: D43
datatype: f64
name: retrieve_data
arguments: tag: D76
datatype: qword

tool: D319: 1

tool: {"D24": [0x55,0x55,0x55,0x55,0x55,0x55,0xc5,0x3f]}

tool: {"D3": [0x55,0x55,0x55,0x55,0x55,0x55,0x65,0x3c]}

tool: {"D151": [0x55,0x55,0x55,0x55,0x55,0x55,0xa5,0x3f]}

tool: {"D103": [0x55,0x55,0x55,0x55,0x55,0x55,0x45,0x3c]}

tool: {"D266": [0x11,0x11,0x11,0x11,0x11,0x11,0x81,0x3f]}

tool: {"D349": [0x11,0x11,0x11,0x11,0x11,0x11,0x01,0x3c]}

tool: {"D126": [0x17,0x6c,0xc1,0x16,0x6c,0xc1,0x56,0x3f]}

tool: {"D149": [0x9f,0xf4,0x49,0x9f,0xf4,0x49,0xef,0xbb]}

tool: {"D274": [0x1a,0xa0,0x01,0x1a,0xa0,0x01,0x2a,0x3f]}

tool: {"D62": [0x1a,0xa0,0x01,0x1a,0xa0,0x01,0x6a,0x3b]}

tool: {"D46": [0x1a,0xa0,0x01,0x1a,0xa0,0x01,0xfa,0x3e]}

tool: {"D72": [0x1a,0xa0,0x01,0x1a,0xa0,0x01,0x3a,0x3b]}

tool: {"D90": [0x34,0xc7,0x56,0xa5,0xe3,0x1d,0xc7,0x3e]}

tool: {"D115": [0x00,0x6c,0xdc,0x8d,0x4f,0x15,0x6c,0xbb]}

tool: {"D262": [0x5c,0x9f,0x78,0xb7,0x4f,0x7e,0x92,0x3e]}

tool: {"D80": [0x9a,0xa9,0x4f,0x5b,0xc0,0xbb,0x3c,0x3b]}

tool: {"D26": [0xe4,0x44,0xf5,0x67,0x45,0xe6,0x5a,0x3e]}

tool: {"D293": [0x09,0xf2,0xd1,0x06,0x2e,0x06,0xfc,0xba]}

tool: {"D175": [0x98,0xd8,0xf8,0xef,0xd8,0xee,0x21,0x3e]}

tool: {"D339": [0x06,0x4c,0xe1,0x59,0xc9,0xae,0xc2,0xba]}

tool: {"D321": [0x09,0x6d,0xa8,0x13,0x46,0x12,0xe6,0x3d]}

tool: {"D215": [0xbe,0x8e,0x74,0xcc,0xe0,0x28,0x8f,0x3a]}

tool: {"D61": [0x9d,0x7c,0xc0,0xa8,0x74,0x39,0xa9,0x3d]}

tool: {"D353": [0x1f,0xfd,0x2e,0x8a,0x6f,0x5d,0x30,0x3a]}

tool: {"D165": [0x1f,0xb8,0x33,0xe7,0xf3,0xe7,0x6a,0x3d]}

tool: {"D185": [0xcb,0xe8,0x0e,0x6b,0x65,0xd8,0xe1,0x39]}

tool: {"D218": [0x1f,0xb8,0x33,0xe7,0xf3,0xe7,0x2a,0x3d]}

tool: {"D182": [0xcb,0xe8,0x0e,0x6b,0x65,0xd8,0xa1,0x39]}

tool: {"D50": [0x4a,0xad,0x30,0x70,0xc7,0x52,0xe9,0x3c]}

tool: {"D148": [0x6c,0xdc,0x5d,0x46,0x81,0xc9,0x8a,0x39]}

tool: {"D71": [0xf9,0xff,0xff,0xff,0xff,0xff,0x6f,0x39]}

tool: D43: 0.5

tool: D76: 9223372036854775807

assistant: ```c
void dd_cos_taylor(const double *a, double *b) {
  if (dd_is_zero(a) == 1) {
    b[0] = 1.0;
    b[1] = 0.0;
  } else {
    const int n_inv_fact = 15;
    double i_fac[30];
    i_fac[0] = 1.66666666666666657e-01;
    i_fac[1] = 9.25185853854297066e-18;
    i_fac[2] = 4.16666666666666644e-02;
    i_fac[3] = 2.31296463463574266e-18;
    i_fac[4] = 8.33333333333333322e-03;
    i_fac[5] = 1.15648231731787138e-19;
    i_fac[6] = 1.38888888888888894e-03;
    i_fac[7] = -5.30054395437357706e-20;
    i_fac[8] = 1.98412698412698413e-04;
    i_fac[9] = 1.72095582934207053e-22;
    i_fac[10] = 2.48015873015873016e-05;
    i_fac[11] = 2.15119478667758816e-23;
    i_fac[12] = 2.75573192239858925e-06;
    i_fac[13] = -1.85839327404647208e-22;
    i_fac[14] = 2.75573192239858883e-07;
    i_fac[15] = 2.37677146222502973e-23;
    i_fac[16] = 2.50521083854417202e-08;
    i_fac[17] = -1.44881407093591197e-24;
    i_fac[18] = 2.08767569878681002e-09;
    i_fac[19] = -1.20734505911325997e-25;
    i_fac[20] = 1.60590438368216133e-10;
    i_fac[21] = 1.25852945887520981e-26;
    i_fac[22] = 1.14707455977297245e-11;
    i_fac[23] = 2.06555127528307454e-28;
    i_fac[24] = 7.64716373181981641e-13;
    i_fac[25] = 7.03872877733453001e-30;
    i_fac[26] = 4.77947733238738525e-14;
    i_fac[27] = 4.39920548583408126e-31;
    i_fac[28] = 2.81145725434552060e-15;
    i_fac[29] = 1.65088427308614326e-31;
    const double dd_eps = 4.93038065763132e-32;
    const double thresh = 0.5 * dd_eps;
    double x[2], r[2], s[2], t[2], inv_fac[2];
    int i = 1;
    dd_sqr(a, x);
    dd_minus(x);
    dd_copy(x, r);
    dd_mul_pwr2(r, 0.5, s);
    dd_inc_d(s, 1.0);
    do {
      dd_mlt(r, x);
      inv_fac[0] = i_fac[i + 1];
      inv_fac[1] = i_fac[i + 2];
      dd_mul(r, inv_fac, t);
      dd_inc(s, t);
      i += 4;
    } while ((i < 2 * n_inv_fact) && (fabs(t[0]) > thresh));
    dd_copy(s, b);
  }
}
```