user: What would the C source look like for the assembly code provided here?

```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    L181
  xorpd  D28(%rip),%xmm0
  mov    $0x1,%ebx
L181:
  movsd  D163(%rip),%xmm7
  test   %ebp,%ebp
  jle    L101
  movq   D141(%rip),%xmm5
  movapd %xmm0,%xmm2
  movapd %xmm0,%xmm1
  andpd  %xmm5,%xmm2
  movapd %xmm5,%xmm3
  ucomisd %xmm2,%xmm7
  ja     L208
L96:
  movapd %xmm0,%xmm2
  movsd  D70(%rip),%xmm3
  lea    -0x1(%rbp),%edx
  mov    $0x1,%eax
  subsd  %xmm1,%xmm2
  nopl   0x0(%rax)
L136:
  lea    (%rax,%rax,4),%eax
  mulsd  %xmm3,%xmm2
  add    %eax,%eax
  sub    $0x1,%edx
  jae    L136
  addsd  D45(%rip),%xmm2
  cvttsd2si %xmm2,%r8d
  cmp    %eax,%r8d
  jge    L137
  comisd %xmm6,%xmm1
  jbe    L170
L95:
  movsd  D70(%rip),%xmm3
  xor    %edx,%edx
  mov    %rsp,%rsi
  lea    D46(%rip),%rdi
  movsd  D87(%rip),%xmm8
  movsd  D111(%rip),%xmm9
  jmp    L141
  xchg   %ax,%ax
L266:
  movslq %ecx,%rcx
  movzbl (%rdi,%rcx,1),%ecx
  mov    %cl,(%rsi,%rdx,1)
  add    $0x1,%rdx
  comisd %xmm6,%xmm0
  jbe    L40
L161:
  movapd %xmm0,%xmm1
L141:
  movapd %xmm1,%xmm0
  movslq %edx,%rax
  divsd  %xmm3,%xmm0
  movapd %xmm0,%xmm2
  andpd  %xmm5,%xmm2
  ucomisd %xmm2,%xmm7
  jbe    L61
  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
L61:
  movapd %xmm0,%xmm2
  mulsd  %xmm3,%xmm2
  subsd  %xmm2,%xmm1
  addsd  %xmm8,%xmm1
  cvttsd2si %xmm1,%ecx
  cmp    $0x9,%ecx
  jbe    L266
  movb   $0x2a,(%rsi,%rdx,1)
  add    $0x1,%rdx
  comisd %xmm6,%xmm0
  ja     L161
L40:
  movzbl (%rsp),%edx
L241:
  lea    D66(%rip),%r12
  mov    %dl,(%rsp)
  mov    %r12,%rdx
  test   %ebx,%ebx
  je     L204
  movb   $0x28,D66(%rip)
  add    $0x1,%rdx
L204:
  xor    %r9d,%r9d
  jmp    L138
  xchg   %ax,%ax
L16:
  imul   $0xaaaaaaab,%eax,%ecx
  add    $0x2aaaaaaa,%ecx
  cmp    $0x55555554,%ecx
  ja     L70
  movb   $0x2c,0x1(%rdx)
  add    $0x2,%rdx
L265:
  sub    $0x1,%rax
  cmp    $0xffffffff,%eax
  je     L154
L138:
  movzbl (%rsi,%rax,1),%ecx
  lea    0x1(%rdx),%rdi
  mov    %cl,(%rdx)
  cmp    %rax,%r9
  jne    L16
L98:
  test   %ebp,%ebp
  jle    L92
  movb   $0x2e,(%rdi)
  lea    0x1(%rdi),%r13
  mov    %r8d,%ecx
  mov    %ebp,%edx
  mov    %r13,%rdi
  lea    D38(%rip),%rsi
  call   <sprintf@plt>
  lea    0x0(%r13,%rbp,1),%rdi
L92:
  test   %ebx,%ebx
  je     L206
  movb   $0x29,(%rdi)
  add    $0x1,%rdi
L206:
  movb   $0x0,(%rdi)
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L258
  add    $0x58,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L70:
  mov    %rdi,%rdx
  jmp    L265
  nopl   (%rax)
L137:
  movsd  D111(%rip),%xmm3
  movapd %xmm5,%xmm2
  addsd  %xmm3,%xmm0
  movapd %xmm0,%xmm1
  andpd  %xmm5,%xmm1
  ucomisd %xmm1,%xmm7
  ja     L173
L176:
  movapd %xmm0,%xmm1
  xor    %r8d,%r8d
L207:
  comisd %xmm6,%xmm1
  ja     L95
L170:
  xor    %eax,%eax
  mov    $0x30,%edx
  mov    %rsp,%rsi
  jmp    L241
  nopw   0x0(%rax,%rax,1)
L208:
  cvttsd2si %xmm0,%rax
  pxor   %xmm2,%xmm2
  movsd  D111(%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    L96
  nopl   0x0(%rax,%rax,1)
L101:
  addsd  D45(%rip),%xmm0
  movq   D141(%rip),%xmm5
  movapd %xmm5,%xmm2
  movapd %xmm0,%xmm1
  andpd  %xmm5,%xmm1
  ucomisd %xmm1,%xmm7
  jbe    L176
  cvttsd2si %xmm0,%rax
  pxor   %xmm1,%xmm1
  andnpd %xmm0,%xmm2
  xor    %r8d,%r8d
  movsd  D111(%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    L207
  nopl   (%rax)
L173:
  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    L207
L258:
  call   <__stack_chk_fail@plt>
L154:
  mov    %rdx,%rdi
  jmp    L98
```

tool_calls: name: disassemble_data
arguments: data_label: D28
type_infered: f32[4]
name: disassemble_data
arguments: data_label: D163
type_infered: f32[2]
name: disassemble_data
arguments: data_label: D141
type_infered: byte[8]
name: disassemble_data
arguments: data_label: D70
type_infered: f64
name: disassemble_data
arguments: data_label: D45
type_infered: f64
name: disassemble_data
arguments: data_label: D46
type_infered: string
name: disassemble_data
arguments: data_label: D87
type_infered: f64
name: disassemble_data
arguments: data_label: D111
type_infered: f32[2]
name: disassemble_data
arguments: data_label: D38
type_infered: string

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

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

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

tool: D70: 10

tool: D45: 0.5

tool: D46: 0123456789*

tool: D87: 0.01

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

tool: D38: %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);
}
```