user: What is the c source code of the assembly code below:

```asm
<dbltoa>:
  endbr64
  push   %r13
  pxor   %xmm6,%xmm6
  push   %r12
  push   %rbp
  movslq %edi,%rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  comisd %xmm0,%xmm6
  jbe    L119
  xorpd  D41(%rip),%xmm0
  mov    $0x1,%ebx
L119:
  movsd  D94(%rip),%xmm7
  test   %ebp,%ebp
  jle    L139
  movq   D86(%rip),%xmm5
  movapd %xmm0,%xmm2
  movapd %xmm0,%xmm1
  andpd  %xmm5,%xmm2
  movapd %xmm5,%xmm3
  ucomisd %xmm2,%xmm7
  ja     L149
L121:
  movapd %xmm0,%xmm2
  movsd  D66(%rip),%xmm3
  lea    -0x1(%rbp),%edx
  mov    $0x1,%eax
  subsd  %xmm1,%xmm2
  nopl   0x0(%rax)
L145:
  lea    (%rax,%rax,4),%eax
  mulsd  %xmm3,%xmm2
  add    %eax,%eax
  sub    $0x1,%edx
  jae    L145
  addsd  D114(%rip),%xmm2
  cvttsd2si %xmm2,%r8d
  cmp    %eax,%r8d
  jge    L248
  comisd %xmm6,%xmm1
  jbe    L57
L137:
  movsd  D66(%rip),%xmm3
  xor    %edx,%edx
  mov    %rsp,%rsi
  lea    D116(%rip),%rdi
  movsd  D153(%rip),%xmm8
  movsd  D97(%rip),%xmm9
  jmp    L265
  xchg   %ax,%ax
L153:
  movslq %ecx,%rcx
  movzbl (%rdi,%rcx,1),%ecx
  mov    %cl,(%rsi,%rdx,1)
  add    $0x1,%rdx
  comisd %xmm6,%xmm0
  jbe    L19
L276:
  movapd %xmm0,%xmm1
L265:
  movapd %xmm1,%xmm0
  movslq %edx,%rax
  divsd  %xmm3,%xmm0
  movapd %xmm0,%xmm2
  andpd  %xmm5,%xmm2
  ucomisd %xmm2,%xmm7
  jbe    L214
  cvttsd2si %xmm0,%rcx
  pxor   %xmm2,%xmm2
  cvtsi2sd %rcx,%xmm2
  movapd %xmm2,%xmm4
  cmpnlesd %xmm0,%xmm4
  andpd  %xmm9,%xmm4
  subsd  %xmm4,%xmm2
  movapd %xmm5,%xmm4
  andnpd %xmm0,%xmm4
  movapd %xmm2,%xmm0
  orpd   %xmm4,%xmm0
L214:
  movapd %xmm0,%xmm2
  mulsd  %xmm3,%xmm2
  subsd  %xmm2,%xmm1
  addsd  %xmm8,%xmm1
  cvttsd2si %xmm1,%ecx
  cmp    $0x9,%ecx
  jbe    L153
  movb   $0x2a,(%rsi,%rdx,1)
  add    $0x1,%rdx
  comisd %xmm6,%xmm0
  ja     L276
L19:
  movzbl (%rsp),%edx
L186:
  lea    D44(%rip),%r12
  mov    %dl,(%rsp)
  mov    %r12,%rdx
  test   %ebx,%ebx
  je     L270
  movb   $0x28,D44(%rip)
  add    $0x1,%rdx
L270:
  xor    %r9d,%r9d
  jmp    L154
  xchg   %ax,%ax
L142:
  imul   $0xaaaaaaab,%eax,%ecx
  add    $0x2aaaaaaa,%ecx
  cmp    $0x55555554,%ecx
  ja     L203
  movb   $0x2c,0x1(%rdx)
  add    $0x2,%rdx
L197:
  sub    $0x1,%rax
  cmp    $0xffffffff,%eax
  je     L177
L154:
  movzbl (%rsi,%rax,1),%ecx
  lea    0x1(%rdx),%rdi
  mov    %cl,(%rdx)
  cmp    %rax,%r9
  jne    L142
L179:
  test   %ebp,%ebp
  jle    L78
  movb   $0x2e,(%rdi)
  lea    0x1(%rdi),%r13
  mov    %r8d,%ecx
  mov    %ebp,%edx
  mov    %r13,%rdi
  lea    D117(%rip),%rsi
  call   <sprintf@plt>
  lea    0x0(%r13,%rbp,1),%rdi
L78:
  test   %ebx,%ebx
  je     L171
  movb   $0x29,(%rdi)
  add    $0x1,%rdi
L171:
  movb   $0x0,(%rdi)
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L233
  add    $0x58,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L203:
  mov    %rdi,%rdx
  jmp    L197
  nopl   (%rax)
L248:
  movsd  D97(%rip),%xmm3
  movapd %xmm5,%xmm2
  addsd  %xmm3,%xmm0
  movapd %xmm0,%xmm1
  andpd  %xmm5,%xmm1
  ucomisd %xmm1,%xmm7
  ja     L52
L170:
  movapd %xmm0,%xmm1
  xor    %r8d,%r8d
L100:
  comisd %xmm6,%xmm1
  ja     L137
L57:
  xor    %eax,%eax
  mov    $0x30,%edx
  mov    %rsp,%rsi
  jmp    L186
  nopw   0x0(%rax,%rax,1)
L149:
  cvttsd2si %xmm0,%rax
  pxor   %xmm2,%xmm2
  movsd  D97(%rip),%xmm4
  andnpd %xmm0,%xmm3
  cvtsi2sd %rax,%xmm2
  movapd %xmm2,%xmm1
  cmpnlesd %xmm0,%xmm1
  andpd  %xmm4,%xmm1
  subsd  %xmm1,%xmm2
  movapd %xmm2,%xmm1
  orpd   %xmm3,%xmm1
  jmp    L121
  nopl   0x0(%rax,%rax,1)
L139:
  addsd  D114(%rip),%xmm0
  movq   D86(%rip),%xmm5
  movapd %xmm5,%xmm2
  movapd %xmm0,%xmm1
  andpd  %xmm5,%xmm1
  ucomisd %xmm1,%xmm7
  jbe    L170
  cvttsd2si %xmm0,%rax
  pxor   %xmm1,%xmm1
  andnpd %xmm0,%xmm2
  xor    %r8d,%r8d
  movsd  D97(%rip),%xmm4
  cvtsi2sd %rax,%xmm1
  movapd %xmm1,%xmm3
  cmpnlesd %xmm0,%xmm3
  andpd  %xmm4,%xmm3
  subsd  %xmm3,%xmm1
  orpd   %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movapd %xmm0,%xmm1
  jmp    L100
  nopl   (%rax)
L52:
  cvttsd2si %xmm0,%rax
  pxor   %xmm1,%xmm1
  andnpd %xmm0,%xmm2
  xor    %r8d,%r8d
  cvtsi2sd %rax,%xmm1
  movapd %xmm1,%xmm4
  cmpnlesd %xmm0,%xmm4
  andpd  %xmm3,%xmm4
  subsd  %xmm4,%xmm1
  orpd   %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movapd %xmm0,%xmm1
  jmp    L100
L233:
  call   <__stack_chk_fail@plt>
L177:
  mov    %rdx,%rdi
  jmp    L179
```

tool_calls: name: disassemble_data
arguments: label: D41
type_guessed: f32[4]
name: disassemble_data
arguments: label: D94
type_guessed: f32[2]
name: disassemble_data
arguments: label: D86
type_guessed: byte[8]
name: disassemble_data
arguments: label: D66
type_guessed: f64
name: disassemble_data
arguments: label: D114
type_guessed: f64
name: disassemble_data
arguments: label: D116
type_guessed: string
name: disassemble_data
arguments: label: D153
type_guessed: f64
name: disassemble_data
arguments: label: D97
type_guessed: f32[2]
name: disassemble_data
arguments: label: D117
type_guessed: string

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

tool: {"D94": [0.0,176.0]}

tool: {"D86": [0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f]}

tool: D66: 10

tool: D114: 0.5

tool: D116: 0123456789*

tool: D153: 0.01

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

tool: D117: %0*d

assistant: ```c
char *dbltoa(double dblval, int npts) {
  double floor();
  static char finval[256];
  static char digittbl[32] = "0123456789*";
  char *finptr = finval;
  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);
}
```