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

```asm
<cvt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  movsd  %xmm0,-0x38(%rbp)
  mov    %edi,-0x3c(%rbp)
  mov    %rsi,-0x48(%rbp)
  mov    %rdx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %r8d,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpl   $0x0,-0x3c(%rbp)
  jns    L37
  movl   $0x0,-0x3c(%rbp)
L37:
  cmpl   $0x4e,-0x3c(%rbp)
  jle    L191
  movl   $0x4e,-0x3c(%rbp)
L191:
  movl   $0x0,-0x2c(%rbp)
  mov    -0x50(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x38(%rbp),%xmm0
  jbe    L30
  mov    -0x50(%rbp),%rax
  movl   $0x1,(%rax)
  movsd  -0x38(%rbp),%xmm0
  movq   D10(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
L30:
  lea    -0x28(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rdi
  movq   %rax,%xmm0
  call   <modf@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x58(%rbp),%rax
  add    $0x50,%rax
  mov    %rax,-0x10(%rbp)
  movsd  -0x28(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L215
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  je     L185
L215:
  mov    -0x58(%rbp),%rax
  add    $0x50,%rax
  mov    %rax,-0x10(%rbp)
  jmp    L258
L69:
  movsd  -0x28(%rbp),%xmm0
  movsd  D56(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  lea    -0x28(%rbp),%rdx
  mov    %rdx,%rdi
  movq   %rax,%xmm0
  call   <modf@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm1
  movsd  D31(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  D56(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  add    $0x30,%eax
  subq   $0x1,-0x10(%rbp)
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  mov    %dl,(%rax)
  addl   $0x1,-0x2c(%rbp)
L258:
  movsd  -0x28(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L69
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jne    L69
  jmp    L236
L165:
  mov    -0x10(%rbp),%rdx
  lea    0x1(%rdx),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x18(%rbp)
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
L236:
  mov    -0x58(%rbp),%rax
  add    $0x50,%rax
  cmp    %rax,-0x10(%rbp)
  jb     L165
  jmp    L78
L185:
  movsd  -0x38(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L78
  jmp    L14
L250:
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  subl   $0x1,-0x2c(%rbp)
L14:
  movsd  -0x38(%rbp),%xmm1
  movsd  D56(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm1
  movsd  D7(%rip),%xmm0
  comisd %xmm1,%xmm0
  ja     L250
L78:
  mov    -0x3c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
  cmpl   $0x0,-0x40(%rbp)
  jne    L115
  mov    -0x2c(%rbp),%eax
  cltq
  add    %rax,-0x10(%rbp)
L115:
  mov    -0x48(%rbp),%rax
  mov    -0x2c(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x10(%rbp),%rax
  cmp    -0x58(%rbp),%rax
  jae    L212
  mov    -0x58(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x58(%rbp),%rax
  jmp    L134
L240:
  movsd  -0x38(%rbp),%xmm1
  movsd  D56(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  lea    -0x20(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rdi
  movq   %rax,%xmm0
  call   <modf@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x38(%rbp)
  movsd  -0x20(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  lea    0x30(%rax),%ecx
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
L212:
  mov    -0x18(%rbp),%rax
  cmp    -0x10(%rbp),%rax
  ja     L137
  mov    -0x58(%rbp),%rax
  add    $0x50,%rax
  cmp    %rax,-0x18(%rbp)
  jb     L240
L137:
  mov    -0x58(%rbp),%rax
  add    $0x50,%rax
  cmp    %rax,-0x10(%rbp)
  jb     L243
  mov    -0x58(%rbp),%rax
  add    $0x4f,%rax
  movb   $0x0,(%rax)
  mov    -0x58(%rbp),%rax
  jmp    L134
L243:
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  add    $0x5,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L203
L97:
  mov    -0x10(%rbp),%rax
  movb   $0x30,(%rax)
  mov    -0x10(%rbp),%rax
  cmp    -0x58(%rbp),%rax
  jbe    L28
  subq   $0x1,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  add    $0x1,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L203
L28:
  mov    -0x10(%rbp),%rax
  movb   $0x31,(%rax)
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,(%rax)
  cmpl   $0x0,-0x40(%rbp)
  jne    L203
  mov    -0x18(%rbp),%rax
  cmp    -0x58(%rbp),%rax
  jbe    L98
  mov    -0x18(%rbp),%rax
  movb   $0x30,(%rax)
L98:
  addq   $0x1,-0x18(%rbp)
L203:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jg     L97
  mov    -0x18(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x58(%rbp),%rax
L134:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L199
  call   <__stack_chk_fail@plt>
L199:
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D10
type_guessed: byte[8]
name: parse_data
arguments: tag: D56
type_guessed: byte[8]
name: parse_data
arguments: tag: D31
type_guessed: byte[8]
name: parse_data
arguments: tag: D7
type_guessed: byte[8]

tool: {"D10": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

tool: {"D56": [0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x40]}

tool: {"D31": [0xb8,0x1e,0x85,0xeb,0x51,0xb8,0x9e,0x3f]}

tool: {"D7": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

assistant: ```c
char *cvt(double arg, int ndigits, int *decpt, int *sign, char *buf, int eflag) {
  int r2;
  double fi, fj;
  char *p, *p1;
  if (ndigits < 0) {
    ndigits = 0;
  }
  if (ndigits >= 80 - 1) {
    ndigits = 80 - 2;
  }
  r2 = 0;
  *sign = 0;
  p = &buf[0];
  if (arg < 0) {
    *sign = 1;
    arg = -arg;
  }
  arg = modf(arg, &fi);
  p1 = &buf[80];
  if (fi != 0) {
    p1 = &buf[80];
    while (fi != 0) {
      fj = modf(fi / 10, &fi);
      *--p1 = (int)((fj + .03) * 10) + '0';
      r2++;
    }
    while (p1 < &buf[80]) {
      *p++ = *p1++;
    }
  } else if (arg > 0) {
    while ((fj = arg * 10) < 1) {
      arg = fj;
      r2--;
    }
  }
  p1 = &buf[ndigits];
  if (eflag == 0) {
    p1 += r2;
  }
  *decpt = r2;
  if (p1 < &buf[0]) {
    buf[0] = '\0';
    return buf;
  }
  while (p <= p1 && p < &buf[80]) {
    arg *= 10;
    arg = modf(arg, &fj);
    *p++ = (int)fj + '0';
  }
  if (p1 >= &buf[80]) {
    buf[80 - 1] = '\0';
    return buf;
  }
  p = p1;
  *p1 += 5;
  while (*p1 > '9') {
    *p1 = '0';
    if (p1 > buf) {
      ++*--p1;
    } else {
      *p1 = '1';
      (*decpt)++;
      if (eflag == 0) {
        if (p > buf) {
          *p = '0';
        }
        p++;
      }
    }
  }
  *p = '\0';
  return buf;
}
```