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

```asm
<fltrep_stod>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x8,%rsp
  movsbl (%rdi),%r14d
  cmp    $0x2b,%r14b
  je     L66
  cmp    $0x2d,%r14b
  je     L274
  lea    0x1(%rdi),%rax
  xor    %ebp,%ebp
  cmp    $0x30,%r14d
  jne    L86
  nopl   0x0(%rax)
L51:
  movsbl (%rax),%r14d
  add    $0x1,%rax
L111:
  cmp    $0x30,%r14d
  je     L51
L86:
  xor    %r10d,%r10d
  xor    %r11d,%r11d
  cmp    $0x2e,%r14d
  je     L223
L236:
  lea    0x1(%rax),%rdi
  xor    %r13d,%r13d
  xor    %r8d,%r8d
  mov    $0x100000,%r12d
  xor    %ecx,%ecx
  xor    %eax,%eax
  xor    %edx,%edx
  jmp    L260
  cs nopw 0x0(%rax,%rax,1)
L299:
  movsbl -0x1(%rdi),%r14d
  mov    $0x1,%r10d
L68:
  add    $0x1,%rdi
L260:
  lea    -0x1(%rdi),%r15
  test   %r10d,%r10d
  jne    L382
  cmp    $0x2e,%r14d
  je     L299
L382:
  lea    -0x30(%r14),%r9d
  cmp    $0x9,%r9d
  ja     L118
  movslq %r12d,%r14
  mov    %r12d,%esi
  imul   $0x66666667,%r14,%r14
  sar    $0x1f,%esi
  sar    $0x22,%r14
  sub    %esi,%r14d
  mov    %r12d,%esi
  lea    (%r14,%r14,4),%r15d
  mov    %r14d,%r12d
  add    %r15d,%r15d
  sub    %r15d,%esi
  shl    $0x18,%esi
  add    %r8d,%esi
  movslq %esi,%r8
  mov    %esi,%r14d
  imul   $0x66666667,%r8,%r8
  sar    $0x1f,%r14d
  sar    $0x22,%r8
  sub    %r14d,%r8d
  lea    (%r8,%r8,4),%r14d
  add    %r14d,%r14d
  sub    %r14d,%esi
  shl    $0x18,%esi
  add    %r13d,%esi
  movslq %esi,%r13
  sar    $0x1f,%esi
  imul   $0x66666667,%r13,%r13
  sar    $0x22,%r13
  sub    %esi,%r13d
  mov    %r13d,%esi
  imul   %r9d,%esi
  add    %esi,%ecx
  mov    %r8d,%esi
  imul   %r9d,%esi
  mov    %ecx,%r14d
  and    $0xffffff,%ecx
  shr    $0x18,%r14d
  imul   %r12d,%r9d
  add    %r14d,%esi
  movsbl -0x1(%rdi),%r14d
  add    %esi,%eax
  mov    %eax,%esi
  and    $0xffffff,%eax
  shr    $0x18,%esi
  add    %esi,%r9d
  add    %r9d,%edx
  cmp    $0x1,%r10d
  adc    $0x0,%r11d
  jmp    L68
  nopl   (%rax)
L118:
  xor    %esi,%esi
  test   %edx,%edx
  je     L405
  and    $0xffffffdf,%r14d
  cmp    $0x45,%r14d
  jne    L90
  movsbl (%r15),%esi
  cmp    $0x2b,%sil
  je     L264
  cmp    $0x2d,%sil
  je     L45
  sub    $0x30,%esi
  cmp    $0x9,%esi
  ja     L90
  lea    0x1(%r15),%r8
  xor    %r9d,%r9d
L333:
  xor    %edi,%edi
  nopl   (%rax)
L158:
  lea    (%rdi,%rdi,4),%edi
  add    $0x1,%r8
  lea    (%rsi,%rdi,2),%edi
  movsbl -0x1(%r8),%esi
  sub    $0x30,%esi
  cmp    $0x9,%esi
  jbe    L158
  lea    (%r11,%rdi,1),%esi
  sub    %edi,%r11d
  test   %r9d,%r9d
  cmove  %esi,%r11d
L90:
  xor    %edi,%edi
  test   %r11d,%r11d
  jle    L179
L56:
  lea    (%rcx,%rcx,4),%ecx
  lea    (%rax,%rax,4),%esi
  add    %ecx,%ecx
  mov    %ecx,%eax
  and    $0xffffff,%ecx
  shr    $0x18,%eax
  lea    (%rax,%rsi,2),%eax
  lea    (%rdx,%rdx,4),%esi
  mov    %eax,%edx
  and    $0xffffff,%eax
  shr    $0x18,%edx
  lea    (%rdx,%rsi,2),%edx
  test   $0xffe00000,%edx
  je     L221
  xchg   %ax,%ax
L373:
  mov    %eax,%esi
  sar    %ecx
  add    $0x1,%edi
  shl    $0x17,%esi
  sar    %eax
  and    $0x800000,%esi
  or     %esi,%ecx
  mov    %edx,%esi
  sar    %edx
  shl    $0x17,%esi
  and    $0x800000,%esi
  or     %esi,%eax
  test   $0xffe00000,%edx
  jne    L373
L221:
  sub    $0x1,%r11d
  jne    L56
L129:
  test   $0xfff00000,%edx
  jne    L427
L191:
  mov    %eax,%esi
  add    %edx,%edx
  add    %eax,%eax
  sub    $0x1,%edi
  sar    $0x17,%esi
  or     %esi,%edx
  mov    %ecx,%esi
  add    %ecx,%ecx
  sar    $0x17,%esi
  and    $0xffffff,%ecx
  or     %esi,%eax
  and    $0xffffff,%eax
  test   $0xfff00000,%edx
  je     L191
  test   $0xffe00000,%edx
  je     L417
  nopl   0x0(%rax,%rax,1)
L91:
  mov    %eax,%esi
  sar    %ecx
  add    $0x1,%edi
  shl    $0x17,%esi
  sar    %eax
  and    $0x800000,%esi
  or     %esi,%ecx
  mov    %edx,%esi
  sar    %edx
  shl    $0x17,%esi
  and    $0x800000,%esi
  or     %esi,%eax
L427:
  test   $0xffe00000,%edx
  jne    L91
L417:
  mov    %ecx,%esi
  and    $0xff00,%esi
  cmp    $0x8000,%esi
  jg     L98
  mov    %ecx,%r8d
  and    $0xfe0000,%r8d
  cmp    $0x8000,%esi
  cmove  %r8d,%ecx
  add    $0x3ff,%edi
  test   %edi,%edi
  jle    L170
  cmp    $0x7ff,%edi
  jg     L288
  shl    $0x14,%edi
  and    $0xfffff,%edx
  shl    $0x8,%eax
  or     %edx,%edi
  sar    $0x10,%ecx
  mov    %edi,%esi
  or     %ecx,%eax
  mov    %eax,%edx
  or     %ebp,%esi
L405:
  mov    %esi,(%rbx)
  mov    %edx,0x4(%rbx)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L274:
  mov    $0x80000000,%ebp
L246:
  movsbl 0x1(%rdi),%r14d
  lea    0x2(%rdi),%rax
  jmp    L111
L179:
  je     L129
  nopl   0x0(%rax)
L12:
  movslq %edx,%rsi
  mov    %edx,%r8d
  imul   $0x66666667,%rsi,%rsi
  sar    $0x1f,%r8d
  sar    $0x22,%rsi
  sub    %r8d,%esi
  lea    (%rsi,%rsi,4),%r8d
  add    %r8d,%r8d
  sub    %r8d,%edx
  shl    $0x18,%edx
  add    %edx,%eax
  movslq %eax,%rdx
  mov    %eax,%r8d
  imul   $0x66666667,%rdx,%rdx
  sar    $0x1f,%r8d
  sar    $0x22,%rdx
  sub    %r8d,%edx
  lea    (%rdx,%rdx,4),%r8d
  add    %r8d,%r8d
  sub    %r8d,%eax
  shl    $0x18,%eax
  add    %ecx,%eax
  movslq %eax,%rcx
  sar    $0x1f,%eax
  imul   $0x66666667,%rcx,%rcx
  sar    $0x22,%rcx
  sub    %eax,%ecx
  mov    %ecx,%eax
  and    $0xffffff,%ecx
  shr    $0x18,%eax
  add    %edx,%eax
  mov    %eax,%edx
  and    $0xffffff,%eax
  shr    $0x18,%edx
  add    %esi,%edx
  test   $0xfff00000,%edx
  jne    L351
  nopw   0x0(%rax,%rax,1)
L285:
  mov    %eax,%esi
  add    %edx,%edx
  add    %eax,%eax
  sub    $0x1,%edi
  sar    $0x17,%esi
  or     %esi,%edx
  mov    %ecx,%esi
  add    %ecx,%ecx
  sar    $0x17,%esi
  and    $0xffffff,%ecx
  or     %esi,%eax
  and    $0xffffff,%eax
  test   $0xfff00000,%edx
  je     L285
L351:
  add    $0x1,%r11d
  jne    L12
  jmp    L129
  nopl   0x0(%rax)
L223:
  movsbl (%rax),%r14d
  add    $0x1,%rax
  lea    -0x1(%rax),%edx
  cmp    $0x30,%r14d
  jne    L92
  nopl   0x0(%rax)
L420:
  mov    %edx,%r11d
  sub    %eax,%r11d
  movsbl (%rax),%r14d
  add    $0x1,%rax
  cmp    $0x30,%r14d
  je     L420
L92:
  mov    $0x1,%r10d
  jmp    L236
  nop
L66:
  xor    %ebp,%ebp
  jmp    L246
  nopw   0x0(%rax,%rax,1)
L98:
  add    $0x10000,%ecx
  mov    %ecx,%esi
  and    $0xff0000,%ecx
  shr    $0x18,%esi
  add    %esi,%eax
  mov    %eax,%esi
  and    $0xffffff,%eax
  shr    $0x18,%esi
  add    %esi,%edx
  jmp    L129
L288:
  lea    D16(%rip),%rdi
  xor    %eax,%eax
  call   <cc_err@plt>
  mov    $0x7ff00000,%esi
  xor    %edx,%edx
  or     %ebp,%esi
  jmp    L405
L45:
  movsbl 0x1(%r15),%esi
  lea    0x2(%r15),%r8
  mov    $0x1,%r9d
  sub    $0x30,%esi
  cmp    $0x9,%esi
  jbe    L333
  jmp    L90
L264:
  movsbl 0x1(%r15),%esi
  lea    0x2(%r15),%r8
  sub    $0x30,%esi
  cmp    $0x9,%esi
  ja     L90
  xor    %r9d,%r9d
  jmp    L333
L170:
  lea    D14(%rip),%rdi
  xor    %eax,%eax
  call   <cc_rerr@plt>
  xor    %esi,%esi
  xor    %edx,%edx
  jmp    L405
```

tool_calls: name: unpack_data
arguments: label: D16
type_guessed: string
name: unpack_data
arguments: label: D14
type_guessed: string

tool: D16: Overlarge floating point value found

tool: D14: Small floating point value converted to 0.0

assistant: ```c
void fltrep_stod(s, p) char *s;
int *p;
{
  int ds, dh, dm, dl, bx;
  int th, tm, tl, x, x1, ch, dot;
  ds = 0;
  switch (ch = *s++) {
  case '-':
    ds = 0x80000000;
  case '+':
    ch = *s++;
  default:
    break;
  }
  dh = dm = dl = bx = 0;
  th = 0x00100000;
  tm = tl = x = x1 = dot = 0;
  while (ch == '0')
    ch = *s++;
  if (ch == '.') {
    dot = 1;
    while ((ch = *s++) == '0')
      x -= 1;
  }
  while (1) {
    if (!dot && ch == '.')
      ch = *s++, dot = 1;
    else if (isdigit(ch)) {
      int carry = ((th % 10) << 24) + tm;
      th = th / 10;
      tm = carry / 10;
      tl = (((carry % 10) << 24) + tl) / 10;
      ch = ((ch) - '0');
      dl += ch * tl;
      dm += ch * tm + ((dl >> 24) & 0xff);
      dh += ch * th + ((dm >> 24) & 0xff);
      dl &= 0x00ffffff;
      dm &= 0x00ffffff;
      if (!dot)
        x += 1;
      ch = *s++;
    } else
      break;
  }
  if (dh == 0) {
    *p++ = 0;
    *p++ = 0;
    return;
  }
  if (ch == 'e' || ch == 'E') {
    int sx = 0;
    switch (ch = *s++) {
    case '-':
      sx = 1;
    case '+':
      ch = *s++;
    default:
      break;
    }
    while (isdigit(ch)) {
      x1 = 10 * x1 + ((ch) - '0');
      ch = *s++;
    }
    if (sx)
      x -= x1;
    else
      x += x1;
  }
  if (x > 0) {
    while (x > 0) {
      dl *= 10;
      dm = 10 * dm + ((dl >> 24) & 0xff);
      dh = 10 * dh + ((dm >> 24) & 0xff);
      dl &= 0x00ffffff;
      dm &= 0x00ffffff;
      while ((dh & 0xffe00000) != 0) {
        dl = (dl >> 1) | ((dm & 1) << 23);
        dm = (dm >> 1) | ((dh & 1) << 23);
        dh = dh >> 1;
        bx += 1;
      }
      x -= 1;
    }
  } else if (x < 0) {
    while (x < 0) {
      int carry = ((dh % 10) << 24) + dm;
      dh /= 10;
      dm = carry / 10;
      dl = (dl + ((carry % 10) << 24)) / 10;
      dm += ((dl >> 24) & 0xff);
      dh += ((dm >> 24) & 0xff);
      dl &= 0x00ffffff;
      dm &= 0x00ffffff;
      while ((dh & 0xfff00000) == 0) {
        dh = (dh << 1) | ((dm >> 23) & 1);
        dm = ((dm << 1) | ((dl >> 23) & 1)) & 0x00ffffff;
        dl = (dl << 1) & 0x00ffffff;
        bx -= 1;
      }
      x += 1;
    }
  }
  for (;;) {
    while ((dh & 0xfff00000) == 0) {
      dh = (dh << 1) | ((dm >> 23) & 1);
      dm = ((dm << 1) | ((dl >> 23) & 1)) & 0x00ffffff;
      dl = (dl << 1) & 0x00ffffff;
      bx -= 1;
    }
    while ((dh & 0xffe00000) != 0) {
      dl = (dl >> 1) | ((dm & 1) << 23);
      dm = (dm >> 1) | ((dh & 1) << 23);
      dh = dh >> 1;
      bx += 1;
    }
    if ((dl & 0xff00) > 0x8000) {
      dl += 0x00010000;
      dm += (dl >> 24) & 0xff;
      dh += (dm >> 24) & 0xff;
      dl &= 0x00ff0000;
      dm &= 0x00ffffff;
      continue;
    } else if ((dl & 0xff00) == 0x8000)
      dl &= 0x00fe0000;
    break;
  }
  bx += 0x3ff;
  if (bx <= 0) {
    cc_rerr("Small floating point value converted to 0.0");
    *p++ = 0;
    *p++ = 0;
    return;
  }
  if (bx > 0x7ff) {
    cc_err("Overlarge floating point value found");
    bx = 0x7ff;
    dh = dm = dl = 0;
  }
  dh = ds | (bx << 20) | (dh & 0x000fffff);
  dm = (dm << 8) | ((dl >> 16) & 0xff);
  *p++ = dh;
  *p++ = dm;
  return;
}
```