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

```asm
<libc_double_to_string>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r14
  mov    %esi,%r13d
  mov    %edx,0xc(%rsp)
  movq   %xmm0,%rbp
  movq   %xmm0,%r15
  shr    $0x3f,%r15
  movq   %xmm0,%r12
  shr    $0x34,%r12
  and    $0x7ff,%r12d
  movabs $0xfffffffffffff,%rax
  and    %rax,%rbp
  mov    $0x34,%ebx
  jmp    L65
L143:
  mov    $0x30,%edi
  call   <putchar@plt>
L60:
  sub    $0x1,%ebx
  je     L28
L65:
  bt     %rbx,%rbp
  jae    L143
  mov    $0x31,%edi
  call   <putchar@plt>
  jmp    L60
L28:
  cmp    $0xff,%r12
  sete   %al
  test   %rbp,%rbp
  jne    L8
  test   %al,%al
  je     L8
  test   %r15,%r15
  je     L140
  mov    %r13d,%edx
  lea    D36(%rip),%rsi
  mov    %r14,%rdi
  call   <strncpy@plt>
L43:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L140:
  mov    %r13d,%edx
  lea    D20(%rip),%rsi
  mov    %r14,%rdi
  call   <strncpy@plt>
  jmp    L43
L8:
  test   %rbp,%rbp
  je     L58
  test   %al,%al
  jne    L120
L58:
  lea    -0x3ff(%r12),%rdx
  bts    $0x34,%rbp
  sub    $0x434,%r12
  mov    %rdx,%rax
  mov    $0x0,%ebx
  mov    $0x0,%edi
  mov    $0x34,%esi
  sub    %edx,%esi
  movabs $0x4563918244f40000,%r9
  mov    $0x1,%r8d
  jmp    L126
L120:
  mov    %r13d,%edx
  lea    D16(%rip),%rsi
  mov    %r14,%rdi
  call   <strncpy@plt>
  jmp    L43
L148:
  not    %ecx
  mov    %r9,%rdx
  shr    %cl,%rdx
  add    %rdx,%rbx
L48:
  sub    $0x1,%rax
  cmp    %r12,%rax
  je     L146
L126:
  mov    %eax,%ecx
  lea    (%rsi,%rax,1),%edx
  bt     %rdx,%rbp
  jae    L48
  test   %rax,%rax
  js     L148
  mov    %r8,%rdx
  shl    %cl,%rdx
  add    %rdx,%rdi
  jmp    L48
L146:
  test   %r15,%r15
  je     L45
  test   %r13d,%r13d
  jle    L45
  movb   $0x2d,(%r14)
  sub    $0x1,%r13d
  lea    0x1(%r14),%r14
L45:
  mov    $0x0,%ecx
  mov    %r13d,%edx
  mov    %r14,%rsi
  call   <libc_ulltoa@plt>
  mov    %eax,%ebp
  lea    0x1(%rax),%eax
  sub    %eax,%r13d
  mov    %r13d,%esi
  lea    D2(%rip),%rdi
  call   <dprintf@plt>
  test   %r13d,%r13d
  jle    L43
  movslq %ebp,%rbp
  add    %rbp,%r14
  lea    0x1(%r14),%rsi
  movb   $0x2e,(%r14)
  mov    0xc(%rsp),%ecx
  lea    0x1(%rcx),%eax
  cmp    %ecx,%r13d
  cmovg  %eax,%r13d
  mov    $0x1,%ecx
  mov    %r13d,%edx
  mov    %rbx,%rdi
  call   <libc_ulltoa@plt>
  jmp    L43
```

tool_calls: name: unpack_data
arguments: data_label: D36
type_infered: string
name: unpack_data
arguments: data_label: D20
type_infered: string
name: unpack_data
arguments: data_label: D16
type_infered: string
name: unpack_data
arguments: data_label: D2
type_infered: string

tool: D36: -inf

tool: D20: inf

tool: D16: nan

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