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

```asm
<atof>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x18,%rsp
  jmp    L88
  nopl   (%rax)
L182:
  add    $0x1,%r13d
L88:
  movsbl (%rbx),%edi
  mov    %rbx,%r12
  add    $0x1,%rbx
  call   <isspace@plt>
  test   %rax,%rax
  jne    L182
  movzbl (%r12),%eax
  cmp    $0x2d,%al
  je     L137
  mov    $0x1,%r14d
  cmp    $0x2b,%al
  je     L86
L169:
  movslq %r13d,%r15
  pxor   %xmm6,%xmm6
  add    %rbp,%r15
  movsd  %xmm6,(%rsp)
  mov    %r15,%rbx
  jmp    L168
  nopw   0x0(%rax,%rax,1)
L76:
  movsbl (%rbx),%eax
  movsd  D11(%rip),%xmm0
  pxor   %xmm1,%xmm1
  add    $0x1,%rbx
  mulsd  (%rsp),%xmm0
  sub    $0x30,%eax
  cvtsi2sd %eax,%xmm1
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsp)
L168:
  mov    %r13d,%r12d
  movsbl (%rbx),%edi
  sub    %r15d,%r12d
  add    %ebx,%r12d
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L76
  xor    %eax,%eax
  cmpb   $0x2e,(%rbx)
  movsd  D14(%rip),%xmm7
  sete   %al
  add    %eax,%r12d
  movsd  %xmm7,0x8(%rsp)
  movslq %r12d,%r15
  add    %rbp,%r15
  mov    %r15,%rbx
  jmp    L39
  nopw   0x0(%rax,%rax,1)
L175:
  movsbl (%rbx),%eax
  pxor   %xmm1,%xmm1
  add    $0x1,%rbx
  movsd  D11(%rip),%xmm0
  mulsd  (%rsp),%xmm0
  movsd  D11(%rip),%xmm2
  mulsd  0x8(%rsp),%xmm2
  sub    $0x30,%eax
  cvtsi2sd %eax,%xmm1
  addsd  %xmm0,%xmm1
  movsd  %xmm2,0x8(%rsp)
  movsd  %xmm1,(%rsp)
L39:
  mov    %r12d,%r13d
  movsbl (%rbx),%edi
  sub    %r15d,%r13d
  add    %ebx,%r13d
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L175
  movzbl (%rbx),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %r14d,%xmm0
  mulsd  (%rsp),%xmm0
  mov    %eax,%edx
  divsd  0x8(%rsp),%xmm0
  and    $0xffffffdf,%edx
  cmp    $0x45,%dl
  jne    L100
  add    $0x1,%r13d
  movslq %r13d,%rax
  movzbl 0x0(%rbp,%rax,1),%eax
L100:
  cmp    $0x2d,%al
  je     L159
  mov    $0x1,%r12d
  cmp    $0x2b,%al
  je     L143
L14:
  movslq %r13d,%r13
  add    %rbp,%r13
  xor    %ebp,%ebp
  jmp    L57
  nop
L83:
  movsbl 0x0(%r13),%eax
  lea    0x0(%rbp,%rbp,4),%edx
  add    $0x1,%r13
  lea    -0x30(%rax,%rdx,2),%ebp
L57:
  movsbl 0x0(%r13),%edi
  movsd  %xmm0,(%rsp)
  call   <isdigit@plt>
  movsd  (%rsp),%xmm0
  test   %rax,%rax
  jne    L83
  test   %ebp,%ebp
  jle    L155
  cmp    $0x1,%r12d
  je     L61
  movsd  D11(%rip),%xmm1
  nopl   0x0(%rax)
L126:
  divsd  %xmm1,%xmm0
  add    $0x1,%eax
  cmp    %eax,%ebp
  jne    L126
L155:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L159:
  mov    $0xffffffff,%r12d
L143:
  add    $0x1,%r13d
  jmp    L14
  nopl   0x0(%rax)
L137:
  mov    $0xffffffff,%r14d
L86:
  add    $0x1,%r13d
  jmp    L169
  nop
L61:
  movsd  D11(%rip),%xmm1
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L77:
  mulsd  %xmm1,%xmm0
  add    $0x1,%eax
  cmp    %eax,%ebp
  jne    L77
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D11
type_guessed: f64
name: disassemble_data
arguments: data_tag: D14
type_guessed: f64

tool: D11: 10

tool: D14: 1

assistant: ```c
double atof(char s[]) {
  double val, power;
  int i, j, sign, scientific;
  for (i = 0; isspace(s[i]); i++) {
    ;
  }
  sign = (s[i] == '-') ? -1 : 1;
  if (s[i] == '+' || s[i] == '-') {
    i++;
  }
  for (val = 0.0; isdigit(s[i]); i++) {
    val = val * 10.0 + (s[i] - '0');
  }
  if (s[i] == '.') {
    i++;
  }
  for (power = 1.0; isdigit(s[i]); i++) {
    val = val * 10.0 + (s[i] - '0');
    power *= 10.0;
  }
  val = sign * val / power;
  if (s[i] == 'e' || s[i] == 'E') {
    i++;
  }
  sign = (s[i] == '-') ? -1 : 1;
  if (s[i] == '+' || s[i] == '-') {
    i++;
  }
  for (scientific = 0; isdigit(s[i]); i++) {
    scientific = scientific * 10 + (s[i] - '0');
  }
  for (i = 0; i < scientific; i++) {
    if (sign == 1) {
      val *= 10.0;
    } else {
      val /= 10.0;
    }
  }
  return val;
}
```