user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<Si>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  movsd  %xmm0,0x20(%rsp)
  comisd D38(%rip),%xmm0
  jae    L40
  mov    $0x1,%r12d
  mov    $0x0,%ebx
  pxor   %xmm3,%xmm3
  movsd  %xmm3,0x8(%rsp)
  jmp    L28
L40:
  mov    D7(%rip),%r14
  mov    %r14,0x8(%rsp)
  mov    $0x0,%ebx
L1:
  mov    %ebx,%esi
  mov    $0xffffffff,%edi
  call   <pow@plt>
  movq   %xmm0,%rbp
  lea    (%rbx,%rbx,1),%r12d
  mov    %r12d,%edi
  call   <factorial@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  movq   %rbp,%xmm3
  mulsd  %xmm0,%xmm3
  movq   %xmm3,%rbp
  lea    0x1(%r12),%r15d
  cvttsd2si 0x20(%rsp),%r13d
  mov    %r15d,%esi
  mov    %r13d,%edi
  call   <pow@plt>
  movapd %xmm0,%xmm1
  movq   %rbp,%xmm0
  divsd  %xmm1,%xmm0
  movq   %r14,%xmm4
  addsd  %xmm0,%xmm4
  movq   %xmm4,%r14
  mov    %ebx,%esi
  mov    $0xffffffff,%edi
  call   <pow@plt>
  movq   %xmm0,%rbp
  mov    %r15d,%edi
  call   <factorial@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  movq   %rbp,%xmm5
  mulsd  %xmm0,%xmm5
  movq   %xmm5,%rbp
  add    $0x1,%ebx
  lea    0x2(%r12),%esi
  mov    %r13d,%edi
  call   <pow@plt>
  movapd %xmm0,%xmm1
  movq   %rbp,%xmm0
  divsd  %xmm1,%xmm0
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  cmp    $0x4,%ebx
  jne    L1
  lea    0x38(%rsp),%rdi
  lea    0x30(%rsp),%rsi
  movsd  0x20(%rsp),%xmm0
  call   <sincos@plt>
  movq   %r14,%xmm0
  mulsd  0x30(%rsp),%xmm0
  movsd  D39(%rip),%xmm1
  subsd  %xmm0,%xmm1
  movsd  0x8(%rsp),%xmm0
  mulsd  0x38(%rsp),%xmm0
  subsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rsp)
L48:
  movsd  0x8(%rsp),%xmm0
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L31:
  lea    0x1(%rbx,%rbx,1),%ebp
  cvttsd2si 0x20(%rsp),%edi
  mov    %ebp,%esi
  call   <pow@plt>
  movsd  %xmm0,0x10(%rsp)
  mov    %ebx,%esi
  mov    $0xffffffff,%edi
  call   <pow@plt>
  movsd  %xmm0,0x28(%rsp)
  fldl   0x28(%rsp)
  fmull  0x10(%rsp)
  fstpt  0x10(%rsp)
  mov    %ebp,%edi
  call   <factorial@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebx,%xmm0
  addsd  %xmm0,%xmm0
  addsd  D11(%rip),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,0x28(%rsp)
  fldt   0x10(%rsp)
  fdivl  0x28(%rsp)
  faddl  0x8(%rsp)
  fstpl  0x8(%rsp)
  cmp    $0x5,%r12d
  jg     L48
L21:
  add    $0x1,%ebx
  add    $0x1,%r12d
L28:
  test   %ebx,%ebx
  jne    L31
  movsd  0x8(%rsp),%xmm2
  addsd  0x20(%rsp),%xmm2
  movsd  %xmm2,0x8(%rsp)
  jmp    L21
```

tool_calls: name: read_data
arguments: label: D38
type_guessed: byte[16]
name: read_data
arguments: label: D7
type_guessed: f64
name: read_data
arguments: label: D39
type_guessed: byte[8]
name: read_data
arguments: label: D11
type_guessed: f64

tool: {"D38": [0x59,0x09,0xe8,0xfa,0x55,0x7a,0x13,0x40,0x18,0x2d,0x44,0x54,0xfb,0x21,0xf9,0x3f]}

tool: D7: 0

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

tool: D11: 1

assistant: ```c
double Si(double x) {
  int i;
  int nmax = 6;
  double out;
  long double power;
  double pi = 4.0 * atan(1.0);
  if (x >= pi * 6.2 / 4.0) {
    double out_sin = 0.0;
    double out_cos = 0.0;
    out = pi / 2.0;
    for (i = 0; i < nmax - 2; i += 1) {
      out_cos += pow(-1.0, i) * (double)factorial(2 * i) / pow(x, 2 * i + 1);
      out_sin += pow(-1.0, i) * (double)factorial(2 * i + 1) / pow(x, 2 * i + 2);
    }
    out -= cos(x) * out_cos;
    out -= sin(x) * out_sin;
    return out;
  }
  out = 0.0;
  for (i = 0; i < nmax; i += 1) {
    if (i == 0) {
      out += x;
      continue;
    }
    power = pow(x, (2 * i + 1));
    out += (double)pow(-1, i) * power / ((2.0 * (double)i + 1.0) * (double)factorial(2 * i + 1));
  }
  return out;
}
```