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

```asm
<dbltoa>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  movsd  %xmm0,-0x88(%rbp)
  mov    %edi,-0x8c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D4(%rip),%rax
  mov    %rax,-0x60(%rbp)
  movl   $0x0,-0x70(%rbp)
  movl   $0x0,-0x6c(%rbp)
  movl   $0x0,-0x68(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x88(%rbp),%xmm0
  jbe    L73
  movl   $0x1,-0x70(%rbp)
  movsd  -0x88(%rbp),%xmm0
  movq   D52(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
L73:
  cmpl   $0x0,-0x8c(%rbp)
  jle    L14
  mov    -0x8c(%rbp),%eax
  mov    %eax,-0x64(%rbp)
  mov    -0x88(%rbp),%rax
  movq   %rax,%xmm0
  call   <floor@plt>
  movapd %xmm0,%xmm1
  movsd  -0x88(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movl   $0x1,-0x74(%rbp)
  jmp    L49
L69:
  movsd  -0x58(%rbp),%xmm1
  movsd  D8(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  mov    -0x74(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,-0x74(%rbp)
L49:
  subl   $0x1,-0x64(%rbp)
  cmpl   $0x0,-0x64(%rbp)
  jns    L69
  movsd  -0x58(%rbp),%xmm1
  movsd  D113(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x6c(%rbp)
  mov    -0x6c(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jl     L32
  movsd  -0x88(%rbp),%xmm1
  movsd  D119(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movl   $0x0,-0x6c(%rbp)
  jmp    L32
L14:
  movsd  -0x88(%rbp),%xmm1
  movsd  D113(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
L32:
  mov    -0x88(%rbp),%rax
  movq   %rax,%xmm0
  call   <floor@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x88(%rbp)
  jmp    L3
L158:
  movsd  -0x88(%rbp),%xmm0
  movsd  D8(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <floor@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x58(%rbp)
  movsd  -0x58(%rbp),%xmm1
  movsd  D8(%rip),%xmm0
  movapd %xmm1,%xmm2
  mulsd  %xmm0,%xmm2
  movsd  -0x88(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  D73(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x74(%rbp)
  cmpl   $0x0,-0x74(%rbp)
  js     L187
  cmpl   $0x9,-0x74(%rbp)
  jle    L23
L187:
  movl   $0xa,-0x74(%rbp)
L23:
  mov    -0x68(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x68(%rbp)
  mov    -0x74(%rbp),%edx
  movslq %edx,%rdx
  lea    D40(%rip),%rcx
  movzbl (%rdx,%rcx,1),%edx
  cltq
  mov    %dl,-0x50(%rbp,%rax,1)
  movsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x88(%rbp)
L3:
  movsd  -0x88(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  ja     L158
  cmpl   $0x0,-0x68(%rbp)
  jg     L4
  mov    -0x68(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x68(%rbp)
  cltq
  movb   $0x30,-0x50(%rbp,%rax,1)
L4:
  cmpl   $0x0,-0x70(%rbp)
  je     L87
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  movb   $0x28,(%rax)
L87:
  mov    -0x68(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x74(%rbp)
  jmp    L103
L76:
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    -0x74(%rbp),%edx
  movslq %edx,%rdx
  movzbl -0x50(%rbp,%rdx,1),%edx
  mov    %dl,(%rax)
  cmpl   $0x0,-0x74(%rbp)
  jle    L183
  mov    -0x74(%rbp),%edx
  movslq %edx,%rax
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  add    %ecx,%ecx
  add    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  jne    L183
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  movb   $0x2c,(%rax)
L183:
  subl   $0x1,-0x74(%rbp)
L103:
  cmpl   $0x0,-0x74(%rbp)
  jns    L76
  cmpl   $0x0,-0x8c(%rbp)
  jle    L81
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  movb   $0x2e,(%rax)
  mov    -0x6c(%rbp),%ecx
  mov    -0x8c(%rbp),%edx
  mov    -0x60(%rbp),%rax
  lea    D41(%rip),%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  mov    -0x8c(%rbp),%eax
  cltq
  add    %rax,-0x60(%rbp)
L81:
  cmpl   $0x0,-0x70(%rbp)
  je     L62
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  movb   $0x29,(%rax)
L62:
  mov    -0x60(%rbp),%rax
  movb   $0x0,(%rax)
  lea    D4(%rip),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L28
  call   <__stack_chk_fail@plt>
L28:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D52
type_guessed: f32[2]
name: read_data
arguments: data_label: D8
type_guessed: f64
name: read_data
arguments: data_label: D113
type_guessed: f64
name: read_data
arguments: data_label: D119
type_guessed: f32[2]
name: read_data
arguments: data_label: D73
type_guessed: f64
name: read_data
arguments: data_label: D41
type_guessed: string

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

tool: D8: 10

tool: D113: 0.5

tool: {"D119": [0.0,1.875]}

tool: D73: 0.01

tool: D41: %0*d

assistant: ```c
char *dbltoa(double dblval, int npts) {
  static char finval[256];
  static char digittbl[32] = "0123456789*";
  char *finptr = finval;
  double floor();
  double dbldigit;
  int digit;
  int isneg = 0;
  int ifrac = 0;
  char digits[64];
  int ndigits = 0;
  if (dblval < 0.0) {
    isneg = 1;
    dblval = (-dblval);
  }
  if (npts > 0) {
    int ipts = npts;
    dbldigit = dblval - floor(dblval);
    digit = 1;
    while (--ipts >= 0) {
      dbldigit *= 10.0;
      digit *= 10;
    }
    ifrac = (int)(dbldigit + 0.5);
    if (ifrac >= digit) {
      dblval++;
      ifrac = 0;
    }
  } else
    dblval += 0.5;
  dblval = floor(dblval);
  while (dblval > 0.0) {
    dbldigit = floor(dblval / 10.0);
    digit = (int)(dblval - 10.0 * dbldigit + 0.01);
    if (digit < 0 || digit > 9)
      digit = 10;
    digits[ndigits++] = digittbl[digit];
    dblval = dbldigit;
  }
  if (ndigits < 1)
    digits[ndigits++] = '0';
  if (isneg)
    *finptr++ = '(';
  for (digit = ndigits - 1; digit >= 0; digit--) {
    *finptr++ = digits[digit];
    if (digit > 0 && digit % 3 == 0)
      *finptr++ = ',';
  }
  if (npts > 0) {
    *finptr++ = '.';
    sprintf(finptr, "%0*d", npts, ifrac);
    finptr += npts;
  }
  if (isneg)
    *finptr++ = ')';
  *finptr = '\000';
  return (finval);
}
```