user: Demonstrate the C code that generates the assembly output below:

```asm
<libc_double_to_string>:
  endbr64
  movabs $0xfffffffffffff,%rax
  push   %r15
  movq   %xmm0,%r15
  push   %r14
  shr    $0x3f,%r15
  mov    $0x34,%r14d
  push   %r13
  movq   %xmm0,%r13
  push   %r12
  shr    $0x34,%r13
  mov    %esi,%r12d
  push   %rbp
  and    $0x7ff,%r13d
  mov    %rdi,%rbp
  push   %rbx
  movq   %xmm0,%rbx
  and    %rax,%rbx
  sub    $0x18,%rsp
  mov    %edx,0xc(%rsp)
  jmp    L91
  nop
L32:
  mov    $0x31,%edi
  call   <putchar@plt>
  sub    $0x1,%r14d
  je     L71
L91:
  bt     %r14,%rbx
  jb     L32
  mov    $0x30,%edi
  call   <putchar@plt>
  sub    $0x1,%r14d
  jne    L91
L71:
  cmp    $0xff,%r13
  sete   %al
  test   %rbx,%rbx
  jne    L49
  test   %al,%al
  je     L140
  mov    %r12d,%edx
  lea    D27(%rip),%rsi
  test   %r15,%r15
  jne    L141
  lea    D11(%rip),%rsi
L141:
  add    $0x18,%rsp
  mov    %rbp,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <strncpy@plt>
L140:
  test   %rbx,%rbx
  je     L150
L49:
  mov    %r12d,%edx
  lea    D9(%rip),%rsi
  test   %al,%al
  jne    L141
L150:
  lea    -0x3ff(%r13),%rax
  mov    $0x34,%esi
  bts    $0x34,%rbx
  xor    %r8d,%r8d
  lea    -0x434(%r13),%rdi
  sub    %eax,%esi
  xor    %r13d,%r13d
  movabs $0x4563918244f40000,%r10
  mov    $0x1,%r9d
  jmp    L117
  nopw   0x0(%rax,%rax,1)
L20:
  mov    %r9,%rdx
  shl    %cl,%rdx
  add    %rdx,%r8
L14:
  sub    $0x1,%rax
  cmp    %rdi,%rax
  je     L159
L117:
  lea    (%rsi,%rax,1),%edx
  mov    %eax,%ecx
  bt     %rdx,%rbx
  jae    L14
  test   %rax,%rax
  jns    L20
  not    %ecx
  mov    %r10,%rdx
  sub    $0x1,%rax
  shr    %cl,%rdx
  add    %rdx,%r13
  cmp    %rdi,%rax
  jne    L117
L159:
  test   %r12d,%r12d
  jle    L94
  test   %r15,%r15
  je     L94
  movb   $0x2d,0x0(%rbp)
  sub    $0x1,%r12d
  add    $0x1,%rbp
L94:
  xor    %ecx,%ecx
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %r8,%rdi
  call   <libc_ulltoa@plt>
  lea    D29(%rip),%rdi
  movslq %eax,%rbx
  lea    0x1(%rbx),%eax
  sub    %eax,%r12d
  mov    %r12d,%esi
  call   <dprintf@plt>
  test   %r12d,%r12d
  jle    L129
  mov    0xc(%rsp),%ecx
  add    %rbx,%rbp
  mov    %r13,%rdi
  movb   $0x2e,0x0(%rbp)
  lea    0x1(%rbp),%rsi
  cmp    %ecx,%r12d
  lea    0x1(%rcx),%eax
  mov    $0x1,%ecx
  cmovg  %eax,%r12d
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  mov    %r12d,%edx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <libc_ulltoa@plt>
L129:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: unpack_data
arguments: label: D27
type_guessed: string
name: unpack_data
arguments: label: D11
type_guessed: string
name: unpack_data
arguments: label: D9
type_guessed: string
name: unpack_data
arguments: label: D29
type_guessed: string

tool: D27: -inf

tool: D11: inf

tool: D9: nan

tool: D29: N = %d


assistant: ```c
void libc_double_to_string(double fl, char *dst, int n, int prec) {
  unsigned long long *p = (unsigned long long *)&fl;
  unsigned long long i = 0;
  unsigned long long f = 0;
  unsigned long long m, s;
  long long e;
  int x;
  unsigned long long z;
  s = *p >> 63;
  e = (*p >> 52) & 0x7ff;
  m = *p & 0xfffffffffffff;
  for (x = 0; x < 52; x++)
    if (m & ((unsigned long long)1 << (52 - x)))
      putchar('1');
    else
      putchar('0');
  if (e == 255 && m == 0) {
    if (s)
      strncpy(dst, "-inf", n);
    else
      strncpy(dst, "inf", n);
  } else if (e == 255 && m != 0) {
    strncpy(dst, "nan", n);
  } else {
    e -= 1023;
    m |= (unsigned long long)1 << 52;
    for (x = 52; x >= 0; x--) {
      if (m & ((unsigned long long)1 << x)) {
        if (e >= 0) {
          z = (long long)1 << e;
          i += z;
        } else {
          z = 5000000000000000000;
          z >>= -(e + 1);
          f += z;
        }
      }
      e--;
    }
    if (s && (n > 0)) {
      *(dst++) = '-';
      n--;
    }
    x = libc_ulltoa(i, dst, n, 0);
    n -= x + 1;
    dst += x;
    dprintf("N = %d\n", n);
    if (n > 0) {
      *(dst++) = '.';
      if (n > 0)
        libc_ulltoa(f, dst, (n < (prec + 1)) ? n : (prec + 1), 1);
    }
  }
}
```