user: 请从给定的汇编指令推导出C源代码:

```asm
<dtoa>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  movsd  %xmm0,-0x38(%rbp)
  mov    %rdi,-0x40(%rbp)
  mov    %esi,-0x44(%rbp)
  mov    %edx,-0x48(%rbp)
  cmpl   $0x0,-0x44(%rbp)
  jg     L242
  movl   $0x1,-0x44(%rbp)
L242:
  movq   $0x0,-0x18(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  movq   %rax,%xmm0
  call   <isnan@plt>
  test   %rax,%rax
  je     L372
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movb   $0x6e,(%rax)
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movb   $0x61,(%rax)
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movb   $0x6e,(%rax)
  mov    -0x40(%rbp),%rax
  jmp    L6
L372:
  mov    -0x38(%rbp),%rax
  movq   %rax,%xmm0
  call   <isinf@plt>
  test   %rax,%rax
  je     L72
  pxor   %xmm0,%xmm0
  comisd -0x38(%rbp),%xmm0
  jbe    L192
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movb   $0x2d,(%rax)
L192:
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movb   $0x69,(%rax)
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movb   $0x6e,(%rax)
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movb   $0x66,(%rax)
  mov    -0x40(%rbp),%rax
  jmp    L6
L72:
  pxor   %xmm0,%xmm0
  ucomisd -0x38(%rbp),%xmm0
  jp     L360
  pxor   %xmm0,%xmm0
  ucomisd -0x38(%rbp),%xmm0
  jne    L360
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movb   $0x30,(%rax)
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movb   $0x2e,(%rax)
  jmp    L270
L33:
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movb   $0x30,(%rax)
L270:
  mov    -0x44(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x44(%rbp)
  test   %eax,%eax
  jg     L33
  cmpl   $0x0,-0x48(%rbp)
  je     L233
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movb   $0x65,(%rax)
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movb   $0x2b,(%rax)
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movb   $0x30,(%rax)
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movb   $0x30,(%rax)
L233:
  mov    -0x40(%rbp),%rax
  jmp    L6
L360:
  movl   $0x0,-0x24(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x38(%rbp),%xmm0
  seta   %al
  movzbl %al,%eax
  mov    %eax,-0x20(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  je     L46
  movsd  -0x38(%rbp),%xmm0
  movq   D22(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
L46:
  mov    -0x38(%rbp),%rax
  movq   %rax,%xmm0
  call   <log10@plt>
  mov    %eax,-0x28(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  je     L70
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movb   $0x2d,(%rax)
L70:
  cmpl   $0x0,-0x48(%rbp)
  jne    L63
  cmpl   $0xd,-0x28(%rbp)
  jg     L236
  cmpl   $0x0,-0x20(%rbp)
  je     L67
  cmpl   $0x8,-0x28(%rbp)
  jg     L236
L67:
  cmpl   $0xfffffff8,-0x28(%rbp)
  jge    L241
L236:
  mov    $0x1,%eax
  jmp    L252
L241:
  mov    $0x0,%eax
L252:
  mov    %eax,-0x48(%rbp)
L63:
  cmpl   $0x0,-0x48(%rbp)
  je     L370
  cmpl   $0x0,-0x28(%rbp)
  jns    L318
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x28(%rbp),%xmm0
  movsd  D31(%rip),%xmm1
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x28(%rbp)
L318:
  mov    -0x28(%rbp),%edx
  mov    D17(%rip),%rax
  mov    %edx,%edi
  movq   %rax,%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm1
  movsd  -0x38(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x28(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  movl   $0x0,-0x28(%rbp)
L370:
  cmpl   $0x0,-0x28(%rbp)
  jg     L7
  movl   $0x0,-0x28(%rbp)
  jmp    L7
L380:
  mov    -0x28(%rbp),%edx
  mov    D17(%rip),%rax
  mov    %edx,%edi
  movq   %rax,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x8(%rbp),%xmm0
  jb     L304
  mov    -0x10(%rbp),%rax
  jmp    L6
L304:
  movsd  -0x8(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L369
  mov    -0x8(%rbp),%rax
  movq   %rax,%xmm0
  call   <isinf@plt>
  test   %rax,%rax
  jne    L369
  movsd  -0x38(%rbp),%xmm0
  divsd  -0x8(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <floor@plt>
  mov    %eax,-0x1c(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x1c(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x8(%rbp),%xmm1
  movsd  -0x38(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x1c(%rbp),%eax
  lea    0x30(%rax),%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
L369:
  cmpq   $0x0,-0x18(%rbp)
  je     L325
  subl   $0x1,-0x44(%rbp)
  jmp    L128
L325:
  cmpl   $0x0,-0x28(%rbp)
  jne    L128
  movsd  -0x38(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L128
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movb   $0x2e,(%rax)
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x18(%rbp)
L128:
  subl   $0x1,-0x28(%rbp)
L7:
  cmpl   $0x0,-0x44(%rbp)
  jg     L380
  cmpl   $0x0,-0x48(%rbp)
  je     L22
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movb   $0x65,(%rax)
  cmpl   $0x0,-0x24(%rbp)
  js     L275
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movb   $0x2b,(%rax)
  jmp    L336
L275:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movb   $0x2d,(%rax)
  negl   -0x24(%rbp)
L336:
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L194
L331:
  mov    -0x24(%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    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x24(%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,-0x24(%rbp)
  addl   $0x1,-0x28(%rbp)
L194:
  cmpl   $0x0,-0x24(%rbp)
  jg     L331
  jmp    L328
L291:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movb   $0x30,(%rax)
  addl   $0x1,-0x28(%rbp)
L328:
  mov    -0x10(%rbp),%rax
  sub    -0x18(%rbp),%rax
  cmp    $0x1,%rax
  jle    L291
  mov    -0x10(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  neg    %rax
  mov    %rax,%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <mem_reverse@plt>
L22:
  mov    -0x10(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x10(%rbp),%rax
L6:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D22
datatype: f32[2]
name: unpack_data
arguments: tag: D31
datatype: f64
name: unpack_data
arguments: tag: D17
datatype: f64

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

tool: D31: 1

tool: D17: 10

assistant: ```c
char *dtoa(double n, char *s, int precision_with, bool use_exp) {
  if (precision_with <= 0) {
    precision_with = 1;
  }
  char *p_tmp = NULL;
  char *c = s;
  if (isnan(n)) {
    *s++ = 'n';
    *s++ = 'a';
    *s++ = 'n';
    return s;
  } else if (isinf(n)) {
    if (n < 0) {
      *s++ = '-';
    }
    *s++ = 'i';
    *s++ = 'n';
    *s++ = 'f';
    return s;
  } else if (n == 0.0) {
    *s++ = '0';
    *s++ = '.';
    while (precision_with-- > 0) {
      *s++ = '0';
    }
    if (use_exp) {
      *s++ = 'e';
      *s++ = '+';
      *s++ = '0';
      *s++ = '0';
    }
    return s;
  } else {
    int digit, m, m1 = 0;
    int neg = (n < 0);
    if (neg)
      n = -n;
    m = log10(n);
    if (neg)
      *(c++) = '-';
    if (!use_exp) {
      use_exp = (m >= 14 || (neg && m >= 9) || m <= -9);
    }
    if (use_exp) {
      if (m < 0)
        m -= 1.0;
      n = n / pow(10.0, m);
      m1 = m;
      m = 0;
    } else {
    }
    if (m < 1.0) {
      m = 0;
    }
    while (precision_with > 0) {
      double weight = pow(10.0, m);
      if (weight <= 0) {
        return c;
      }
      if (weight > 0 && !isinf(weight)) {
        digit = floor(n / weight);
        n -= (digit * weight);
        *(c++) = '0' + digit;
      }
      if (p_tmp) {
        precision_with--;
      } else if (m == 0 && n > 0) {
        *(c++) = '.';
        p_tmp = c;
      }
      m--;
    }
    if (use_exp) {
      *(c++) = 'e';
      if (m1 >= 0) {
        *(c++) = '+';
      } else {
        *(c++) = '-';
        m1 = -m1;
      }
      p_tmp = c;
      m = 0;
      while (m1 > 0) {
        *(c++) = '0' + m1 % 10;
        m1 /= 10;
        m++;
      }
      while ((c - p_tmp) < 2) {
        *(c++) = '0';
        m++;
      }
      mem_reverse(c - m, c - 1);
    }
    *(c) = '\0';
  }
  return c;
}
```