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

```asm
<dtostrf>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  movsd  %xmm0,-0x38(%rbp)
  mov    %edi,%ecx
  mov    %esi,%eax
  mov    %rdx,-0x48(%rbp)
  mov    %ecx,%edx
  mov    %dl,-0x3c(%rbp)
  mov    %al,-0x40(%rbp)
  movl   $0x0,-0x28(%rbp)
  mov    -0x38(%rbp),%rax
  movq   %rax,%xmm0
  call   <isnan@plt>
  test   %rax,%rax
  je     L106
  mov    -0x48(%rbp),%rax
  lea    D45(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x48(%rbp),%rax
  jmp    L115
L106:
  mov    -0x38(%rbp),%rax
  movq   %rax,%xmm0
  call   <isinf@plt>
  test   %rax,%rax
  je     L177
  mov    -0x48(%rbp),%rax
  lea    D65(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x48(%rbp),%rax
  jmp    L115
L177:
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  movsbl -0x3c(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  cmpb   $0x0,-0x40(%rbp)
  je     L160
  movzbl -0x40(%rbp),%eax
  add    $0x1,%eax
  sub    %eax,-0x24(%rbp)
L160:
  pxor   %xmm0,%xmm0
  comisd -0x38(%rbp),%xmm0
  jbe    L148
  movl   $0x1,-0x28(%rbp)
  subl   $0x1,-0x24(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movq   D58(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
L148:
  movsd  D93(%rip),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movb   $0x0,-0x29(%rbp)
  jmp    L120
L4:
  movsd  -0x10(%rbp),%xmm1
  movsd  D91(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  addb   $0x1,-0x29(%rbp)
L120:
  movzbl -0x29(%rbp),%eax
  cmp    -0x40(%rbp),%al
  jb     L4
  movsd  D94(%rip),%xmm0
  divsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x38(%rbp),%xmm0
  addsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  D94(%rip),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movl   $0x1,-0x20(%rbp)
  jmp    L24
L5:
  movsd  -0x8(%rbp),%xmm1
  movsd  D91(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  addl   $0x1,-0x20(%rbp)
L24:
  movsd  -0x8(%rbp),%xmm1
  movsd  D91(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x38(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jae    L5
  movsd  -0x38(%rbp),%xmm0
  divsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x20(%rbp),%eax
  sub    %eax,-0x24(%rbp)
  jmp    L128
L82:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movb   $0x20,(%rax)
L128:
  mov    -0x24(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x24(%rbp)
  test   %eax,%eax
  jg     L82
  cmpl   $0x0,-0x28(%rbp)
  je     L32
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movb   $0x2d,(%rax)
L32:
  movzbl -0x40(%rbp),%eax
  add    %eax,-0x20(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L11
L72:
  movsd  -0x38(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x9,-0x1c(%rbp)
  jle    L28
  movl   $0x9,-0x1c(%rbp)
L28:
  mov    -0x1c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  or     $0x30,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  movzbl -0x40(%rbp),%eax
  cmp    %eax,-0x20(%rbp)
  jne    L168
  cmpb   $0x0,-0x40(%rbp)
  je     L168
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movb   $0x2e,(%rax)
L168:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x1c(%rbp),%xmm1
  movsd  -0x38(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x38(%rbp),%xmm1
  movsd  D91(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
L11:
  mov    -0x20(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x20(%rbp)
  test   %eax,%eax
  jg     L72
  mov    -0x18(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x48(%rbp),%rax
L115:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D45
datatype: string
name: unpack_data
arguments: tag: D65
datatype: string
name: unpack_data
arguments: tag: D58
datatype: f32[2]
name: unpack_data
arguments: tag: D93
datatype: f64
name: unpack_data
arguments: tag: D91
datatype: f64
name: unpack_data
arguments: tag: D94
datatype: f64

tool: D45: nan

tool: D65: inf

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

tool: D93: 2

tool: D91: 10

tool: D94: 1

assistant: ```c
char *dtostrf(double number, signed char width, unsigned char prec, char *s) {
  bool negative = false;
  if (isnan(number)) {
    strcpy(s, "nan");
    return s;
  }
  if (isinf(number)) {
    strcpy(s, "inf");
    return s;
  }
  char *out = s;
  int fillme = width;
  if (prec > 0) {
    fillme -= (prec + 1);
  }
  if (number < 0.0) {
    negative = true;
    fillme--;
    number = -number;
  }
  double rounding = 2.0;
  for (uint8_t i = 0; i < prec; ++i)
    rounding *= 10.0;
  rounding = 1.0 / rounding;
  number += rounding;
  double tenpow = 1.0;
  int digitcount = 1;
  while (number >= 10.0 * tenpow) {
    tenpow *= 10.0;
    digitcount++;
  }
  number /= tenpow;
  fillme -= digitcount;
  while (fillme-- > 0) {
    *out++ = ' ';
  }
  if (negative)
    *out++ = '-';
  digitcount += prec;
  int8_t digit = 0;
  while (digitcount-- > 0) {
    digit = (int8_t)number;
    if (digit > 9)
      digit = 9;
    *out++ = (char)('0' | digit);
    if ((digitcount == prec) && (prec > 0)) {
      *out++ = '.';
    }
    number -= digit;
    number *= 10.0;
  }
  *out = 0;
  return s;
}
```