user: Converte this assembly snippet into its equivalent C code:

```asm
<dtoa>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  movslq %esi,%rbx
  sub    $0x28,%rsp
  movsd  %xmm0,0x8(%rsp)
  call   <isnan@plt>
  movsd  0x8(%rsp),%xmm1
  test   %rax,%rax
  je     L160
  mov    $0x616e,%ecx
  movb   $0x6e,0x2(%r13)
  lea    0x3(%r13),%r14
  mov    %cx,0x0(%r13)
L204:
  add    $0x28,%rsp
  mov    %r14,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L160:
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x8(%rsp)
  call   <isinf@plt>
  movsd  0x8(%rsp),%xmm1
  test   %rax,%rax
  jne    L288
  test   %ebx,%ebx
  mov    $0x1,%eax
  pxor   %xmm5,%xmm5
  cmovle %rax,%rbx
  ucomisd %xmm5,%xmm1
  jp     L125
  je     L121
L125:
  pxor   %xmm4,%xmm4
  comisd %xmm1,%xmm4
  ja     L195
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x8(%rsp)
  mov    %r13,%r14
  call   <log10@plt>
  movsd  0x8(%rsp),%xmm1
  mov    %eax,%ebp
  movsd  %xmm1,0x10(%rsp)
L259:
  test   %r12d,%r12d
  jne    L149
  cmp    $0xd,%ebp
  jg     L239
  pxor   %xmm7,%xmm7
  comisd %xmm1,%xmm7
  seta   %dl
  cmp    $0x8,%ebp
  setg   %al
  test   %al,%dl
  jne    L27
  cmp    $0xfffffff8,%ebp
  jge    L254
L27:
  mov    $0x1,%r12d
L149:
  test   %ebp,%ebp
  jns    L140
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebp,%xmm0
  subsd  D7(%rip),%xmm0
  cvttsd2si %xmm0,%ebp
L140:
  movsd  D15(%rip),%xmm6
  mov    %ebp,%edi
  xor    %r15d,%r15d
  movapd %xmm6,%xmm0
  movsd  %xmm6,0x8(%rsp)
  call   <pow@plt>
  movsd  0x10(%rsp),%xmm7
  divsd  %xmm0,%xmm7
  movsd  %xmm7,0x10(%rsp)
L173:
  xor    %r13d,%r13d
L221:
  movsd  0x8(%rsp),%xmm0
  mov    %r15d,%edi
  call   <pow@plt>
  pxor   %xmm2,%xmm2
  comisd %xmm0,%xmm2
  jae    L204
  comisd %xmm2,%xmm0
  ja     L70
L87:
  test   %r13,%r13
  je     L115
L117:
  sub    $0x1,%r15d
  sub    $0x1,%ebx
  jne    L221
  test   %r12d,%r12d
  je     L119
  movb   $0x65,(%r14)
  lea    0x2(%r14),%rcx
  test   %ebp,%ebp
  js     L286
  movb   $0x2b,0x1(%r14)
  mov    %rcx,%r14
  je     L145
L252:
  mov    %rcx,%r14
  mov    $0xcccccccd,%edi
  nopl   0x0(%rax,%rax,1)
L111:
  mov    %ebp,%eax
  mov    %r14,%rsi
  lea    0x1(%r14),%r14
  add    $0x1,%ebx
  imul   %rdi,%rax
  shr    $0x23,%rax
  lea    (%rax,%rax,4),%edx
  add    %edx,%edx
  sub    %edx,%ebp
  add    $0x30,%ebp
  mov    %bpl,-0x1(%r14)
  mov    %eax,%ebp
  test   %eax,%eax
  jne    L111
  mov    %r14,%rax
  sub    %rcx,%rax
  cmp    $0x1,%rax
  jg     L196
L145:
  sub    %r14d,%ebx
  nopl   0x0(%rax,%rax,1)
L235:
  mov    %r14,%rsi
  add    $0x1,%r14
  mov    %r14,%rax
  lea    (%rbx,%r14,1),%edx
  movb   $0x30,-0x1(%r14)
  sub    %rcx,%rax
  cmp    $0x1,%rax
  jle    L235
L84:
  movslq %edx,%rdx
  mov    %r14,%rdi
  sub    %rdx,%rdi
  call   <mem_reverse@plt>
L119:
  movb   $0x0,(%r14)
  jmp    L204
  nopl   0x0(%rax,%rax,1)
L195:
  movapd %xmm1,%xmm6
  xorpd  D36(%rip),%xmm6
  movsd  %xmm1,0x8(%rsp)
  lea    0x1(%r13),%r14
  movapd %xmm6,%xmm0
  movsd  %xmm6,0x10(%rsp)
  call   <log10@plt>
  movb   $0x2d,0x0(%r13)
  movsd  0x8(%rsp),%xmm1
  mov    %eax,%ebp
  jmp    L259
  nopw   0x0(%rax,%rax,1)
L288:
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  jbe    L116
  movb   $0x2d,0x0(%r13)
  add    $0x1,%r13
L116:
  mov    $0x6e69,%edx
  movb   $0x66,0x2(%r13)
  lea    0x3(%r13),%r14
  mov    %dx,0x0(%r13)
  jmp    L204
  nopl   0x0(%rax,%rax,1)
L70:
  movsd  %xmm0,0x18(%rsp)
  call   <isinf@plt>
  movsd  0x18(%rsp),%xmm1
  test   %rax,%rax
  jne    L87
  movsd  0x10(%rsp),%xmm0
  add    $0x1,%r14
  divsd  %xmm1,%xmm0
  call   <floor@plt>
  pxor   %xmm0,%xmm0
  movsd  0x18(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm4
  cvtsi2sd %eax,%xmm0
  add    $0x30,%eax
  mov    %al,-0x1(%r14)
  mulsd  %xmm1,%xmm0
  subsd  %xmm0,%xmm4
  movsd  %xmm4,0x10(%rsp)
  test   %r13,%r13
  jne    L117
  nop
L115:
  test   %r15d,%r15d
  jne    L180
  movsd  0x10(%rsp),%xmm7
  pxor   %xmm5,%xmm5
  comisd %xmm5,%xmm7
  jbe    L180
  lea    0x1(%r14),%r13
  movb   $0x2e,(%r14)
  mov    %r13,%r14
L180:
  sub    $0x1,%r15d
  jmp    L221
  nopl   0x0(%rax)
L121:
  mov    $0x2e30,%eax
  lea    0x2(%r13),%r14
  mov    %rbx,%rdx
  mov    $0x30,%esi
  mov    %ax,0x0(%r13)
  mov    %r14,%rdi
  add    %rbx,%r14
  call   <memset@plt>
  test   %r12d,%r12d
  je     L204
  movl   $0x30302b65,(%r14)
  add    $0x4,%r14
  jmp    L204
  nopw   0x0(%rax,%rax,1)
L239:
  mov    $0x1,%r12d
  jmp    L140
  nopl   0x0(%rax,%rax,1)
L286:
  movb   $0x2d,0x1(%r14)
  neg    %ebp
  jmp    L252
L254:
  movsd  D15(%rip),%xmm4
  xor    %r15d,%r15d
  test   %ebp,%ebp
  cmovns %ebp,%r15d
  xor    %ebp,%ebp
  movsd  %xmm4,0x8(%rsp)
  jmp    L173
L196:
  mov    %ebx,%edx
  jmp    L84
```

tool_calls: name: read_data
arguments: tag: D7
datatype: f64
name: read_data
arguments: tag: D15
datatype: f64
name: read_data
arguments: tag: D36
datatype: f32[4]

tool: D7: 1

tool: D15: 10

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

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;
}
```