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

```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    L89
  nop
L169:
  mov    $0x31,%edi
  call   <putchar@plt>
  sub    $0x1,%r14d
  je     L163
L89:
  bt     %r14,%rbx
  jb     L169
  mov    $0x30,%edi
  call   <putchar@plt>
  sub    $0x1,%r14d
  jne    L89
L163:
  cmp    $0xff,%r13
  sete   %al
  test   %rbx,%rbx
  jne    L35
  test   %al,%al
  je     L58
  mov    %r12d,%edx
  lea    D0(%rip),%rsi
  test   %r15,%r15
  jne    L85
  lea    D28(%rip),%rsi
L85:
  add    $0x18,%rsp
  mov    %rbp,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <strncpy@plt>
L58:
  test   %rbx,%rbx
  je     L96
L35:
  mov    %r12d,%edx
  lea    D38(%rip),%rsi
  test   %al,%al
  jne    L85
L96:
  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    L9
  nopw   0x0(%rax,%rax,1)
L59:
  mov    %r9,%rdx
  shl    %cl,%rdx
  add    %rdx,%r8
L50:
  sub    $0x1,%rax
  cmp    %rax,%rdi
  je     L98
L9:
  lea    (%rsi,%rax,1),%edx
  mov    %eax,%ecx
  bt     %rdx,%rbx
  jae    L50
  test   %rax,%rax
  jns    L59
  not    %ecx
  mov    %r10,%rdx
  sub    $0x1,%rax
  shr    %cl,%rdx
  add    %rdx,%r13
  cmp    %rax,%rdi
  jne    L9
L98:
  test   %r12d,%r12d
  jle    L84
  test   %r15,%r15
  je     L84
  movb   $0x2d,0x0(%rbp)
  sub    $0x1,%r12d
  add    $0x1,%rbp
L84:
  xor    %ecx,%ecx
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %r8,%rdi
  call   <libc_ulltoa@plt>
  lea    D15(%rip),%rdi
  movslq %eax,%rbx
  lea    0x1(%rbx),%eax
  sub    %eax,%r12d
  mov    %r12d,%esi
  call   <dprintf@plt>
  test   %r12d,%r12d
  jle    L69
  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>
L69:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D0
type_infered: string
name: disassemble_data
arguments: data_tag: D28
type_infered: string
name: disassemble_data
arguments: data_tag: D38
type_infered: string
name: disassemble_data
arguments: data_tag: D15
type_infered: string

tool: D0: -inf

tool: D28: inf

tool: D38: nan

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