user: Translate the below assembly code into C programming language:

```asm
<__cvt>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %edi,%edi
  je     L133
  mov    %edi,%ebp
  mov    D67(%rip),%rdi
  mov    %ecx,%r15d
  mov    %r8d,%r13d
  test   %rdi,%rdi
  je     L26
  movsd  %xmm0,0x8(%rsp)
  call   <free@plt>
  movsd  0x8(%rsp),%xmm0
  movq   $0x0,D67(%rip)
L26:
  lea    0x1(%rbp),%ebx
  movslq %ebx,%rbx
  test   %ebp,%ebp
  js     L155
L8:
  ucomisd D45(%rip),%xmm0
  jp     L77
  jne    L77
  mov    $0x1,%eax
  movl   $0x0,(%r14)
  mov    %rbx,%rdi
  sub    %r15d,%eax
  mov    %eax,(%r12)
  call   <malloc@plt>
  mov    %rax,D69(%rip)
  test   %rax,%rax
  je     L80
  lea    0x1(%rax),%rdx
  mov    %rdx,0x10(%rsp)
  movb   $0x30,(%rax)
  mov    0x10(%rsp),%rdx
  movb   $0x0,(%rdx)
L1:
  test   %r13d,%r13d
  je     L41
  mov    0x10(%rsp),%rcx
  lea    -0x1(%rbx),%rdx
  mov    %rcx,%rsi
  sub    %rax,%rsi
  sub    %rsi,%rdx
  je     L47
  nopw   0x0(%rax,%rax,1)
L186:
  lea    0x1(%rcx),%rsi
  mov    %rsi,0x10(%rsp)
  movb   $0x30,(%rcx)
  mov    0x10(%rsp),%rcx
  sub    $0x1,%rdx
  jne    L186
L47:
  movb   $0x0,(%rcx)
L41:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L6
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L77:
  mov    %ebp,%esi
  lea    0x2(%r15),%edi
  lea    0x10(%rsp),%r8
  mov    %r14,%rcx
  mov    %r12,%rdx
  call   <__dtoa@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L80
  movslq (%r12),%rax
  cmp    $0x270f,%eax
  je     L147
  test   %r13d,%r13d
  je     L162
  test   %r15d,%r15d
  setne  %dl
  add    %rbx,%rax
  test   %dl,%dl
  cmovne %rax,%rbx
L162:
  mov    %rbx,%rdi
  call   <malloc@plt>
  mov    %rax,D69(%rip)
  mov    %rax,%rdi
  test   %rax,%rax
  je     L22
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  call   <strlcpy@plt>
  mov    0x10(%rsp),%rax
  mov    %rbp,%rdi
  sub    %rbp,%rax
  add    D69(%rip),%rax
  mov    %rax,0x10(%rsp)
  call   <__freedtoa@plt>
  mov    D69(%rip),%rax
  jmp    L1
  nop
L155:
  mov    $0x1,%ebx
  sub    %ebp,%ebx
  movslq %ebx,%rbx
  jmp    L8
  nop
L133:
  pxor   %xmm1,%xmm1
  xor    %eax,%eax
  movl   $0x0,(%rsi)
  comisd %xmm0,%xmm1
  seta   %al
  mov    %eax,(%rdx)
  lea    D69(%rip),%rax
  jmp    L41
L22:
  mov    %rbp,%rdi
  call   <__freedtoa@plt>
L80:
  xor    %eax,%eax
  jmp    L41
L147:
  movl   $0x0,(%r12)
  movzbl 0x0(%rbp),%ebx
  mov    %rbp,%rdi
  call   <__freedtoa@plt>
  cmp    $0x49,%bl
  lea    D70(%rip),%rax
  lea    D44(%rip),%rdx
  cmovne %rdx,%rax
  jmp    L41
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D45
type: f64
name: disassemble_data
arguments: data_label: D69
type: string
name: disassemble_data
arguments: data_label: D70
type: string
name: disassemble_data
arguments: data_label: D44
type: string

tool: D45: 0

tool: 

tool: D70: inf

tool: D44: nan

assistant: ```c
char *__cvt(double value, int ndigit, int *__restrict decpt, int *__restrict sign, int fmode, int pad) {
  static char *s;
  char *p, *rve, c;
  size_t siz;
  if (ndigit == 0) {
    *sign = value < 0.0;
    *decpt = 0;
    return ("");
  }
  if (s) {
    free(s);
    s = NULL;
  }
  if (ndigit < 0)
    siz = -ndigit + 1;
  else
    siz = ndigit + 1;
  if (value == 0.0) {
    *decpt = 1 - fmode;
    *sign = 0;
    if ((rve = s = (char *)malloc(siz)) == NULL)
      return (NULL);
    *rve++ = '0';
    *rve = '\0';
  } else {
    p = __dtoa(value, fmode + 2, ndigit, decpt, sign, &rve);
    if (p == NULL)
      return (NULL);
    if (*decpt == 9999) {
      *decpt = 0;
      c = *p;
      __freedtoa(p);
      return (c == 'I' ? "inf" : "nan");
    }
    if (pad && fmode)
      siz += *decpt;
    if ((s = (char *)malloc(siz)) == NULL) {
      __freedtoa(p);
      return (NULL);
    }
    (void)strlcpy(s, p, siz);
    rve = s + (rve - p);
    __freedtoa(p);
  }
  if (pad) {
    siz -= rve - s;
    while (--siz)
      *rve++ = '0';
    *rve = '\0';
  }
  return (s);
}
```