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

```asm
<gcvt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  movsd  %xmm0,-0x58(%rbp)
  mov    %rdi,-0x60(%rbp)
  mov    %rsi,-0x68(%rbp)
  movl   $0x0,-0x40(%rbp)
  mov    -0x68(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  movl   $0x0,-0x44(%rbp)
  mov    -0x60(%rbp),%rax
  cmp    $0xffffffff,%eax
  jne    L224
  movq   $0x5,-0x60(%rbp)
L224:
  cmpq   $0x14,-0x60(%rbp)
  jbe    L211
  movq   $0x14,-0x60(%rbp)
L211:
  pxor   %xmm0,%xmm0
  comisd -0x58(%rbp),%xmm0
  jbe    L125
  movl   $0x1,-0x44(%rbp)
  movsd  -0x58(%rbp),%xmm0
  movq   D2(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  addq   $0x1,-0x68(%rbp)
L125:
  movsd  D48(%rip),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x60(%rbp),%rax
  mov    %eax,-0x4c(%rbp)
  jmp    L244
L252:
  movsd  -0x20(%rbp),%xmm1
  movsd  D69(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  subl   $0x1,-0x4c(%rbp)
L244:
  cmpl   $0x0,-0x4c(%rbp)
  jg     L252
  movsd  D3(%rip),%xmm0
  divsd  -0x20(%rbp),%xmm0
  addsd  -0x58(%rbp),%xmm0
  comisd D88(%rip),%xmm0
  jae    L40
  cvttsd2si %xmm0,%rax
  mov    %rax,-0x30(%rbp)
  jmp    L30
L40:
  movsd  D88(%rip),%xmm1
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %rax,-0x30(%rbp)
  movabs $0x8000000000000000,%rax
  xor    %rax,-0x30(%rbp)
L30:
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  test   %rax,%rax
  js     L231
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L216
L231:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L216:
  movsd  -0x58(%rbp),%xmm1
  subsd  %xmm0,%xmm1
  movsd  %xmm1,-0x10(%rbp)
  pxor   %xmm0,%xmm0
  ucomisd -0x58(%rbp),%xmm0
  jp     L226
  pxor   %xmm0,%xmm0
  ucomisd -0x58(%rbp),%xmm0
  jne    L226
  mov    -0x68(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x68(%rbp)
  movb   $0x30,(%rax)
  cmpq   $0x0,-0x60(%rbp)
  je     L16
  mov    -0x68(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x68(%rbp)
  movb   $0x2e,(%rax)
L16:
  movl   $0x0,-0x4c(%rbp)
  jmp    L45
L272:
  mov    -0x68(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x68(%rbp)
  movb   $0x30,(%rax)
  addl   $0x1,-0x4c(%rbp)
L45:
  mov    -0x4c(%rbp),%eax
  cltq
  cmp    %rax,-0x60(%rbp)
  ja     L272
  mov    -0x68(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x68(%rbp)
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  jmp    L58
L226:
  movl   $0x1,-0x4c(%rbp)
  jmp    L253
L121:
  movsd  -0x58(%rbp),%xmm0
  movsd  D69(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  addl   $0x1,-0x4c(%rbp)
L253:
  movsd  -0x58(%rbp),%xmm0
  comisd D69(%rip),%xmm0
  jae    L121
  mov    -0x4c(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  movl   $0x1,-0x48(%rbp)
L78:
  cmpq   $0x9,-0x28(%rbp)
  jbe    L296
  addl   $0x1,-0x48(%rbp)
L296:
  mov    -0x28(%rbp),%rax
  movabs $0xcccccccccccccccd,%rdx
  mul    %rdx
  mov    %rdx,%rax
  shr    $0x3,%rax
  mov    %rax,-0x28(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  jne    L78
  mov    -0x48(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jle    L242
  mov    -0x4c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  add    $0x2,%rax
  add    %rax,-0x68(%rbp)
  jmp    L229
L242:
  mov    -0x4c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  add    $0x1,%rax
  add    %rax,-0x68(%rbp)
L229:
  mov    -0x68(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x68(%rbp)
  movb   $0x0,(%rax)
  cmpq   $0x0,-0x60(%rbp)
  je     L37
  movsd  -0x10(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm1
  movsd  D3(%rip),%xmm0
  addsd  %xmm1,%xmm0
  comisd D88(%rip),%xmm0
  jae    L113
  cvttsd2si %xmm0,%rax
  mov    %rax,-0x38(%rbp)
  jmp    L17
L113:
  movsd  D88(%rip),%xmm1
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %rax,-0x38(%rbp)
  movabs $0x8000000000000000,%rax
  xor    %rax,-0x38(%rbp)
L17:
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  movl   $0x0,-0x4c(%rbp)
  jmp    L132
L245:
  mov    -0x38(%rbp),%rcx
  movabs $0xcccccccccccccccd,%rdx
  mov    %rcx,%rax
  mul    %rdx
  shr    $0x3,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  mov    %edx,%eax
  lea    0x30(%rax),%ecx
  mov    -0x68(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x68(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x38(%rbp),%rax
  movabs $0xcccccccccccccccd,%rdx
  mul    %rdx
  mov    %rdx,%rax
  shr    $0x3,%rax
  mov    %rax,-0x38(%rbp)
  addl   $0x1,-0x4c(%rbp)
L132:
  mov    -0x4c(%rbp),%eax
  cltq
  cmp    %rax,-0x60(%rbp)
  ja     L245
  mov    -0x68(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x68(%rbp)
  movb   $0x2e,(%rax)
  jmp    L134
L37:
  mov    -0x68(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x68(%rbp)
  movb   $0x0,(%rax)
L134:
  movl   $0x1,-0x48(%rbp)
L120:
  mov    -0x30(%rbp),%rcx
  movabs $0xcccccccccccccccd,%rdx
  mov    %rcx,%rax
  mul    %rdx
  shr    $0x3,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  mov    %edx,%eax
  lea    0x30(%rax),%ecx
  mov    -0x68(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x68(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  cmpq   $0x9,-0x30(%rbp)
  jbe    L233
  addl   $0x1,-0x48(%rbp)
L233:
  mov    -0x30(%rbp),%rax
  movabs $0xcccccccccccccccd,%rdx
  mul    %rdx
  mov    %rdx,%rax
  shr    $0x3,%rax
  mov    %rax,-0x30(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  jne    L120
  cmpl   $0x0,-0x44(%rbp)
  je     L0
  mov    -0x68(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x68(%rbp)
  movb   $0x2d,(%rax)
L0:
  mov    -0x18(%rbp),%rax
L58:
  pop    %rbp
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D2
type: f32[2]
name: disassemble_data
arguments: data_label: D48
type: f32[2]
name: disassemble_data
arguments: data_label: D69
type: f64[2]
name: disassemble_data
arguments: data_label: D3
type: f64
name: disassemble_data
arguments: data_label: D88
type: f32

tool: {"D2": [0.0,-0.0]}

tool: {"D48": [0.0,1.875]}

tool: {"D69": [10.0,0.5]}

tool: D3: 0.5

tool: D88: 0

assistant: ```c
char *gcvt(double f, size_t ndigit, char *buf) {
  int i;
  int l1, l2;
  unsigned long long z, k, k2;
  int exp = 0;
  char *c = buf;
  double f2, t, scal;
  int sign = 0;
  if ((int)ndigit == -1)
    ndigit = 5;
  if (ndigit > 20)
    ndigit = 20;
  if (f < 0.0) {
    sign = 1;
    f = -f;
    buf++;
  }
  scal = 1;
  for (i = ndigit; i > 0; i--)
    scal *= 10;
  k = f + 0.5 / scal;
  f2 = f - k;
  if (!f) {
    (*(buf++) = ('0'));
    if (ndigit > 0)
      (*(buf++) = ('.'));
    for (i = 0; i < ndigit; i++)
      (*(buf++) = ('0'));
    (*(buf++) = (0));
    return c;
  }
  i = 1;
  while (f >= 10.0) {
    f /= 10.0;
    i++;
  }
  l1 = i;
  k2 = k;
  l2 = 1;
  do {
    if (k2 >= 10) {
      l2++;
    }
    k2 /= 10;
  } while (k2);
  if (l2 > l1) {
    buf += i + ndigit + 2;
  } else {
    buf += i + ndigit + 1;
  }
  (*(buf--) = (0));
  if (ndigit > 0) {
    t = f2 * scal;
    z = t + 0.5;
    for (i = 0; i < ndigit; i++) {
      (*(buf--) = ('0' + (z % 10)));
      z /= 10;
    }
    (*(buf--) = ('.'));
  } else
    (*(buf--) = (0));
  l2 = 1;
  do {
    (*(buf--) = ('0' + (k % 10)));
    if (k >= 10) {
      l2++;
    }
    k /= 10;
  } while (k);
  if (sign)
    (*(buf--) = ('-'));
  return c;
}
```