user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<gcvt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  movsd  %xmm0,-0x48(%rbp)
  mov    %edi,-0x4c(%rbp)
  mov    %rsi,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x0,%eax
  call   <localeconv@plt>
  mov    %rax,-0x18(%rbp)
  cmpl   $0x0,-0x4c(%rbp)
  jne    L274
  mov    -0x58(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x58(%rbp),%rax
  jmp    L218
L274:
  lea    -0x30(%rbp),%rcx
  lea    -0x34(%rbp),%rdx
  mov    -0x4c(%rbp),%esi
  mov    -0x48(%rbp),%rax
  mov    $0x0,%r8d
  mov    $0x2,%edi
  movq   %rax,%xmm0
  call   <__dtoa@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L179
  mov    $0x0,%eax
  jmp    L218
L179:
  mov    -0x34(%rbp),%eax
  cmp    $0x270f,%eax
  jne    L29
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x49,%al
  jne    L35
  lea    D3(%rip),%rdx
  jmp    L135
L35:
  lea    D13(%rip),%rdx
L135:
  mov    -0x30(%rbp),%eax
  test   %eax,%eax
  je     L207
  lea    D12(%rip),%rax
  jmp    L203
L207:
  lea    D40(%rip),%rax
L203:
  mov    -0x4c(%rbp),%ecx
  lea    0x1(%rcx),%esi
  mov    -0x58(%rbp),%rdi
  mov    %rdx,%r8
  mov    %rax,%rcx
  lea    D49(%rip),%rax
  mov    %rax,%rdx
  call   <snprintf@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <__freedtoa@plt>
  mov    -0x58(%rbp),%rax
  jmp    L218
L29:
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x30(%rbp),%eax
  test   %eax,%eax
  je     L303
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movb   $0x2d,(%rax)
L303:
  mov    -0x34(%rbp),%eax
  test   %eax,%eax
  js     L130
  mov    -0x34(%rbp),%eax
  cmp    %eax,-0x4c(%rbp)
  jge    L52
L130:
  mov    -0x34(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x34(%rbp),%eax
  test   %eax,%eax
  jns    L334
  movl   $0x1,-0x30(%rbp)
  mov    -0x34(%rbp),%eax
  neg    %eax
  mov    %eax,-0x34(%rbp)
  jmp    L342
L334:
  movl   $0x0,-0x30(%rbp)
L342:
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rdx
  lea    0x1(%rdx),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x28(%rbp)
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <stpcpy@plt>
  mov    %rax,-0x28(%rbp)
  jmp    L139
L67:
  mov    -0x20(%rbp),%rdx
  lea    0x1(%rdx),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x28(%rbp)
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
L139:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L67
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movb   $0x65,(%rax)
  mov    -0x30(%rbp),%eax
  test   %eax,%eax
  je     L75
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movb   $0x2d,(%rax)
  jmp    L81
L75:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movb   $0x2b,(%rax)
L81:
  mov    -0x34(%rbp),%eax
  cmp    $0x9,%eax
  jg     L205
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movb   $0x30,(%rax)
  mov    -0x34(%rbp),%eax
  lea    0x30(%rax),%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x28(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L62
L205:
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  movl   $0x0,-0x2c(%rbp)
  jmp    L231
L28:
  nop
  addl   $0x1,-0x2c(%rbp)
L231:
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  test   %eax,%eax
  jne    L28
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  jmp    L59
L168:
  mov    -0x34(%rbp),%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%ecx
  mov    %ecx,%eax
  shl    $0x2,%eax
  add    %ecx,%eax
  add    %eax,%eax
  mov    %edx,%ecx
  sub    %eax,%ecx
  mov    %ecx,%eax
  lea    0x30(%rax),%ecx
  mov    -0x2c(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x2c(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x34(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x34(%rbp)
L59:
  mov    -0x34(%rbp),%eax
  test   %eax,%eax
  jne    L168
  jmp    L62
L52:
  movl   $0x0,-0x2c(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  jmp    L127
L64:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L305
  mov    -0x20(%rbp),%rdx
  lea    0x1(%rdx),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x28(%rbp)
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  jmp    L110
L305:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movb   $0x30,(%rax)
L110:
  addl   $0x1,-0x2c(%rbp)
L127:
  mov    -0x34(%rbp),%eax
  cmp    %eax,-0x2c(%rbp)
  jl     L64
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L3
  mov    -0x20(%rbp),%rax
  cmp    -0x10(%rbp),%rax
  jne    L60
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movb   $0x30,(%rax)
L60:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <stpcpy@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L180
L20:
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rcx),%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x2c(%rbp)
L180:
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L20
L3:
  mov    -0x28(%rbp),%rax
  movb   $0x0,(%rax)
L62:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <__freedtoa@plt>
  mov    -0x58(%rbp),%rax
L218:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L40
  call   <__stack_chk_fail@plt>
L40:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D3
type_guessed: string
name: disassemble_data
arguments: tag: D13
type_guessed: string
name: disassemble_data
arguments: tag: D12
type_guessed: string
name: disassemble_data
arguments: tag: D40
type_guessed: string
name: disassemble_data
arguments: tag: D49
type_guessed: string

tool: D3: inf

tool: D13: nan

tool: D12: -

tool: 

tool: D49: %s%s

assistant: ```c
char *gcvt(double value, int ndigit, char *buf) {
  char *digits, *dst, *src;
  int i, decpt, sign;
  struct lconv *lconv;
  lconv = localeconv();
  if (ndigit == 0) {
    buf[0] = '\0';
    return (buf);
  }
  digits = __dtoa(value, 2, ndigit, &decpt, &sign, NULL);
  if (digits == NULL)
    return (NULL);
  if (decpt == 9999) {
    snprintf(buf, ndigit + 1, "%s%s", sign ? "-" : "", *digits == 'I' ? "inf" : "nan");
    __freedtoa(digits);
    return (buf);
  }
  dst = buf;
  if (sign)
    *dst++ = '-';
  if (decpt < 0 || decpt > ndigit) {
    if (--decpt < 0) {
      sign = 1;
      decpt = -decpt;
    } else
      sign = 0;
    src = digits;
    *dst++ = *src++;
    dst = stpcpy(dst, lconv->decimal_point);
    while (*src != '\0')
      *dst++ = *src++;
    *dst++ = 'e';
    if (sign)
      *dst++ = '-';
    else
      *dst++ = '+';
    if (decpt < 10) {
      *dst++ = '0';
      *dst++ = '0' + decpt;
      *dst = '\0';
    } else {
      for (sign = decpt, i = 0; (sign /= 10) != 0; i++)
        continue;
      dst[i + 1] = '\0';
      while (decpt != 0) {
        dst[i--] = '0' + decpt % 10;
        decpt /= 10;
      }
    }
  } else {
    for (i = 0, src = digits; i < decpt; i++) {
      if (*src != '\0')
        *dst++ = *src++;
      else
        *dst++ = '0';
    }
    if (*src != '\0') {
      if (src == digits)
        *dst++ = '0';
      dst = stpcpy(dst, lconv->decimal_point);
      for (i = decpt; digits[i] != '\0'; i++) {
        *dst++ = digits[i];
      }
    }
    *dst = '\0';
  }
  __freedtoa(digits);
  return (buf);
}
```