user: Please show me the C implementation that matches the assembly code listed below:

```asm
<_to_float>:
  endbr64
  push   %r15
  mov    %ecx,%r15d
  mov    $0x34,%ecx
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  mov    %esi,%eax
  sar    %cl,%eax
  mov    %eax,%ecx
  mov    %esi,%eax
  shl    $0xb,%eax
  and    $0x7ff,%ecx
  mov    %eax,0x30(%rsp)
  cmp    $0x7ff,%ecx
  je     L510
  movl   $0x66,0xc(%rsp)
  mov    %r8d,%ebp
  cmp    $0x46,%edx
  je     L645
  mov    %edx,0xc(%rsp)
  and    $0xffffffdf,%r12d
L645:
  mov    0x10(%rsp),%rbx
  mov    %eax,%r13d
  lea    0x1(%rbx),%r14
  or     %ecx,%r13d
  je     L45
  lea    -0x3fe(%rcx),%r13d
  test   %esi,%esi
  jns    L591
  movb   $0x2d,(%rbx)
L418:
  xor    %ebp,%ebp
  lea    0x30(%rsp),%rbx
  cmp    $0xfffffffe,%r13d
  jge    L379
  nopl   (%rax)
L612:
  mov    %eax,%esi
  mov    $0x20,%ecx
  sar    %cl,%esi
  cmp    $0x33333332,%esi
  jbe    L109
  nopl   0x0(%rax)
L300:
  mov    %rbx,%rdi
  add    $0x1,%r13d
  call   <_rlrshift@plt>
  mov    0x30(%rsp),%eax
  mov    $0x20,%ecx
  mov    %eax,%edx
  sar    %cl,%edx
  cmp    $0x33333332,%edx
  ja     L300
L109:
  lea    (%rax,%rax,4),%eax
  add    $0x1,%r13d
  sub    $0x1,%ebp
  mov    %eax,0x30(%rsp)
  test   %eax,%eax
  js     L538
  nopl   0x0(%rax,%rax,1)
L549:
  sub    $0x1,%r13d
  add    %eax,%eax
  jns    L549
  mov    %eax,0x30(%rsp)
L538:
  cmp    $0xfffffffe,%r13d
  jl     L612
L379:
  test   %r13d,%r13d
  jle    L593
  nopw   0x0(%rax,%rax,1)
L122:
  mov    %rbx,%rdi
  sub    $0x1,%r13d
  add    $0x1,%ebp
  call   <_ldiv5@plt>
  mov    0x30(%rsp),%eax
  test   %eax,%eax
  js     L379
  nopw   0x0(%rax,%rax,1)
L269:
  sub    $0x1,%r13d
  add    %eax,%eax
  jns    L269
  mov    %eax,0x30(%rsp)
  test   %r13d,%r13d
  jg     L122
  nopl   0x0(%rax)
L593:
  mov    %rbx,%rdi
  add    $0x1,%r13d
  call   <_rlrshift@plt>
  cmp    $0x4,%r13d
  jne    L593
  mov    0x80(%rsp),%edi
  test   %edi,%edi
  js     L59
  setg   %al
  test   %r15d,%r15d
  setne  %dl
  or     %eax,%edx
  mov    %dl,0x1b(%rsp)
L327:
  cmp    $0x47,%r12d
  jne    L445
  xor    %edx,%edx
  test   %r15d,%r15d
  sete   %dl
  and    %eax,%edx
  mov    0x80(%rsp),%eax
  mov    %edx,0x1c(%rsp)
  add    $0x1,%eax
  cmp    $0xfffffffd,%ebp
  jge    L378
L455:
  cmpl   $0x67,0xc(%rsp)
  mov    $0x45,%r15d
  mov    $0x65,%edx
  cmovne %r15d,%edx
  mov    %edx,0xc(%rsp)
L34:
  mov    $0x10,%edx
  movl   $0x10,0x2c(%rsp)
  cmp    %edx,%eax
  movl   $0x0,0x34(%rsp)
  cmovle %eax,%edx
  mov    %edx,%r13d
  sub    $0x1,%r13d
L66:
  xor    %r15d,%r15d
  lea    0x34(%rsp),%r12
  nopl   0x0(%rax)
L119:
  mov    %r12,%rdi
  call   <_ldiv5@plt>
  mov    %r12,%rdi
  call   <_rlrshift@plt>
  mov    %r15,%rax
  add    $0x1,%r15
  cmp    %rax,%r13
  jne    L119
  mov    0x34(%rsp),%eax
  mov    $0x20,%ecx
  add    0x30(%rsp),%eax
  mov    %eax,0x30(%rsp)
  sar    %cl,%eax
  test   $0xf0000000,%eax
  jne    L501
L330:
  cmpl   $0x66,0xc(%rsp)
  je     L253
  lea    0x2c(%rsp),%r12
  mov    %rbx,%rdi
  lea    0x1(%r14),%r15
  mov    %r12,%rsi
  call   <_get_digit@plt>
  cmp    $0x30,%al
  mov    %al,(%r14)
  setne  %al
  movzbl %al,%eax
  sub    %eax,%ebp
  cmpb   $0x0,0x1b(%rsp)
  je     L190
  mov    0x80(%rsp),%ecx
  movb   $0x2e,0x1(%r14)
  lea    0x2(%r14),%r15
  test   %ecx,%ecx
  je     L190
  mov    0x80(%rsp),%eax
  sub    $0x1,%eax
  lea    0x3(%r14,%rax,1),%r13
  mov    %r15,%r14
  nopl   0x0(%rax,%rax,1)
L7:
  mov    %r12,%rsi
  mov    %rbx,%rdi
  add    $0x1,%r14
  call   <_get_digit@plt>
  mov    %al,-0x1(%r14)
  cmp    %r13,%r14
  jne    L7
  mov    0x80(%rsp),%eax
  add    %rax,%r15
L190:
  mov    0x1c(%rsp),%edx
  mov    %r15,%rax
  test   %edx,%edx
  je     L348
  nopl   (%rax)
L544:
  mov    %r15,%rax
  lea    -0x1(%r15),%r15
  movzbl -0x1(%rax),%ecx
  cmp    $0x30,%cl
  je     L544
L626:
  cmp    $0x2e,%cl
  cmove  %r15,%rax
L348:
  mov    0xc(%rsp),%esi
  mov    %rax,%r15
  mov    %esi,%ecx
  and    $0xffffffdf,%ecx
  cmp    $0x45,%ecx
  jne    L692
  mov    %sil,(%rax)
  mov    $0x2b,%edx
  test   %ebp,%ebp
  jns    L63
  neg    %ebp
  mov    $0x2d,%edx
L63:
  mov    %ebp,%ecx
  mov    %dl,0x1(%rax)
  mov    $0xcccccccd,%edx
  lea    0x4(%rax),%r15
  imul   %rdx,%rcx
  shr    $0x23,%rcx
  lea    0x30(%rcx),%edx
  lea    (%rcx,%rcx,4),%ecx
  add    %ecx,%ecx
  mov    %dl,0x2(%rax)
  sub    %ecx,%ebp
  lea    0x30(%rbp),%ecx
  mov    %cl,0x3(%rax)
L692:
  movb   $0x0,(%r15)
  mov    %r15d,%eax
  sub    0x10(%rsp),%eax
L123:
  mov    0x38(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L385
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L45:
  test   %ebp,%ebp
  jne    L310
  test   %r9d,%r9d
  je     L98
  movb   $0x20,(%rbx)
  lea    0x30(%rsp),%rbx
  jmp    L593
L263:
  mov    0x30(%rsp),%eax
  mov    $0x20,%ecx
  movl   $0x10,0x2c(%rsp)
  movl   $0x0,0x34(%rsp)
  sar    %cl,%eax
  test   $0xf0000000,%eax
  jne    L301
L253:
  test   %ebp,%ebp
  jle    L302
  movslq %ebp,%rdx
  lea    0x2c(%rsp),%r12
  lea    (%r14,%rdx,1),%r15
  nopw   0x0(%rax,%rax,1)
L69:
  mov    %r12,%rsi
  mov    %rbx,%rdi
  add    $0x1,%r14
  call   <_get_digit@plt>
  mov    %al,-0x1(%r14)
  cmp    %r15,%r14
  jne    L69
  xor    %ebp,%ebp
L219:
  cmpb   $0x0,0x1b(%rsp)
  je     L553
  mov    0x80(%rsp),%esi
  movb   $0x2e,(%r15)
  lea    0x1(%r15),%r13
  test   %esi,%esi
  je     L534
  mov    0x80(%rsp),%eax
  add    $0x1,%eax
  add    %rax,%r15
  jmp    L124
  nopw   0x0(%rax,%rax,1)
L459:
  movb   $0x30,-0x1(%r13)
  add    $0x1,%ebp
  cmp    %r13,%r15
  je     L553
L124:
  add    $0x1,%r13
  test   %ebp,%ebp
  jne    L459
  lea    0x2c(%rsp),%r12
  jmp    L132
  nopl   0x0(%rax)
L670:
  add    $0x1,%r13
L132:
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <_get_digit@plt>
  mov    %al,-0x1(%r13)
  cmp    %r15,%r13
  jne    L670
L553:
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  je     L692
  mov    %r15,%rax
  movl   $0x66,0xc(%rsp)
  lea    -0x1(%r15),%r15
  movzbl -0x1(%rax),%ecx
  cmp    $0x30,%cl
  je     L544
  jmp    L626
  nopl   (%rax)
L445:
  cmpl   $0x66,0xc(%rsp)
  je     L440
  mov    0x80(%rsp),%eax
  movl   $0x0,0x1c(%rsp)
  add    $0x1,%eax
  jmp    L34
L59:
  movb   $0x1,0x1b(%rsp)
  mov    $0x1,%eax
  movl   $0x6,0x80(%rsp)
  jmp    L327
L678:
  mov    0x30(%rsp),%eax
  mov    $0x20,%ecx
  sar    %cl,%eax
  test   $0xf0000000,%eax
  je     L253
  movl   $0x66,0xc(%rsp)
L501:
  mov    %rbx,%rdi
  add    $0x1,%ebp
  call   <_ldiv5@plt>
  mov    %rbx,%rdi
  call   <_rlrshift@plt>
  jmp    L330
L510:
  mov    %rdi,%rbp
  test   %esi,%esi
  js     L384
L366:
  lea    0x3(%rbp),%rbx
  mov    %r12d,%edi
  test   %eax,%eax
  je     L267
  call   <isupper@plt>
  cmp    $0x1,%rax
  sbb    %ecx,%ecx
  and    $0x20,%ecx
  add    $0x4e,%ecx
  cmp    $0x1,%rax
  sbb    %edx,%edx
  and    $0x20,%edx
  add    $0x41,%edx
  cmp    $0x1,%rax
  sbb    %eax,%eax
  and    $0x20,%eax
  add    $0x4e,%eax
L578:
  mov    %al,0x2(%rbp)
  mov    %ebx,%eax
  sub    0x10(%rsp),%eax
  mov    %cl,0x0(%rbp)
  mov    %dl,0x1(%rbp)
  movb   $0x0,0x3(%rbp)
  jmp    L123
L378:
  cmp    %eax,%ebp
  jg     L455
L618:
  mov    %ebp,%edx
  add    0x80(%rsp),%edx
  js     L263
  mov    $0x10,%eax
  movl   $0x10,0x2c(%rsp)
  cmp    %eax,%edx
  movl   $0x0,0x34(%rsp)
  cmovle %edx,%eax
  mov    %eax,%r13d
  sub    $0x1,%r13d
  test   %edx,%edx
  je     L678
  movl   $0x66,0xc(%rsp)
  jmp    L66
L310:
  movb   $0x2b,(%rbx)
  xor    %ebp,%ebp
  lea    0x30(%rsp),%rbx
  jmp    L593
L267:
  call   <isupper@plt>
  cmp    $0x1,%rax
  sbb    %ecx,%ecx
  and    $0x20,%ecx
  add    $0x49,%ecx
  cmp    $0x1,%rax
  sbb    %edx,%edx
  and    $0x20,%edx
  add    $0x4e,%edx
  cmp    $0x1,%rax
  sbb    %eax,%eax
  and    $0x20,%eax
  add    $0x46,%eax
  jmp    L578
L384:
  movb   $0x2d,(%rdi)
  lea    0x1(%rdi),%rbp
  jmp    L366
L302:
  movb   $0x30,(%r14)
  lea    0x1(%r14),%r15
  jmp    L219
L440:
  movl   $0x0,0x1c(%rsp)
  jmp    L618
L301:
  mov    %rbx,%rdi
  add    $0x1,%ebp
  call   <_ldiv5@plt>
  mov    %rbx,%rdi
  call   <_rlrshift@plt>
  jmp    L253
L534:
  mov    %r13,%r15
  jmp    L553
L98:
  mov    %rbx,%r14
  lea    0x30(%rsp),%rbx
  jmp    L593
L591:
  test   %ebp,%ebp
  je     L77
  mov    0x10(%rsp),%rsi
  movb   $0x2b,(%rsi)
  jmp    L418
L385:
  call   <__stack_chk_fail@plt>
L77:
  test   %r9d,%r9d
  je     L368
  mov    0x10(%rsp),%rsi
  movb   $0x20,(%rsi)
  jmp    L418
L368:
  mov    0x10(%rsp),%r14
  jmp    L418
```

assistant: ```c
int _to_float(char *buf, uint64_t double_temp, int c, int falt, int fplus, int fspace, int precision) {
  register int decexp;
  register int exp;
  int sign;
  int digit_count;
  uint64_t fract;
  uint64_t ltemp;
  int prune_zero;
  char *start = buf;
  exp = double_temp >> 52 & 0x7ff;
  fract = (double_temp << 11) & ~(1ull << 63);
  sign = !!(double_temp & (1ull << 63));
  if (exp == 0x7ff) {
    if (sign) {
      *buf++ = '-';
    }
    if (!fract) {
      if (isupper(c)) {
        *buf++ = 'I';
        *buf++ = 'N';
        *buf++ = 'F';
      } else {
        *buf++ = 'i';
        *buf++ = 'n';
        *buf++ = 'f';
      }
    } else {
      if (isupper(c)) {
        *buf++ = 'N';
        *buf++ = 'A';
        *buf++ = 'N';
      } else {
        *buf++ = 'n';
        *buf++ = 'a';
        *buf++ = 'n';
      }
    }
    *buf = 0;
    return buf - start;
  }
  if (c == 'F') {
    c = 'f';
  }
  if ((exp | fract) != 0) {
    exp -= (1023 - 1);
    fract |= (1ull << 63);
    decexp = true;
  } else {
    decexp = false;
  }
  if (decexp && sign) {
    *buf++ = '-';
  } else if (fplus) {
    *buf++ = '+';
  } else if (fspace) {
    *buf++ = ' ';
  } else {
  }
  decexp = 0;
  while (exp <= -3) {
    while ((fract >> 32) >= (0xFFFFFFFF / 5)) {
      _rlrshift(&fract);
      exp++;
    }
    fract *= 5;
    exp++;
    decexp--;
    while ((fract >> 32) <= (0xFFFFFFFF / 2)) {
      fract <<= 1;
      exp--;
    }
  }
  while (exp > 0) {
    _ldiv5(&fract);
    exp--;
    decexp++;
    while ((fract >> 32) <= (0xFFFFFFFF / 2)) {
      fract <<= 1;
      exp--;
    }
  }
  while (exp < (0 + 4)) {
    _rlrshift(&fract);
    exp++;
  }
  if (precision < 0)
    precision = 6;
  prune_zero = false;
  if ((c == 'g') || (c == 'G')) {
    if (!falt && (precision > 0)) {
      prune_zero = true;
    }
    if ((decexp < (-4 + 1)) || (decexp > (precision + 1))) {
      if (c == 'g') {
        c = 'e';
      } else {
        c = 'E';
      }
    } else {
      c = 'f';
    }
  }
  if (c == 'f') {
    exp = precision + decexp;
    if (exp < 0) {
      exp = 0;
    }
  } else {
    exp = precision + 1;
  }
  digit_count = 16;
  if (exp > 16) {
    exp = 16;
  }
  ltemp = 0x0800000000000000;
  while (exp--) {
    _ldiv5(&ltemp);
    _rlrshift(&ltemp);
  }
  fract += ltemp;
  if ((fract >> 32) & 0xF0000000) {
    _ldiv5(&fract);
    _rlrshift(&fract);
    decexp++;
  }
  if (c == 'f') {
    if (decexp > 0) {
      while (decexp > 0) {
        *buf++ = _get_digit(&fract, &digit_count);
        decexp--;
      }
    } else {
      *buf++ = '0';
    }
    if (falt || (precision > 0)) {
      *buf++ = '.';
    }
    while (precision-- > 0) {
      if (decexp < 0) {
        *buf++ = '0';
        decexp++;
      } else {
        *buf++ = _get_digit(&fract, &digit_count);
      }
    }
  } else {
    *buf = _get_digit(&fract, &digit_count);
    if (*buf++ != '0') {
      decexp--;
    }
    if (falt || (precision > 0)) {
      *buf++ = '.';
    }
    while (precision-- > 0) {
      *buf++ = _get_digit(&fract, &digit_count);
    }
  }
  if (prune_zero) {
    while (*--buf == '0')
      ;
    if (*buf != '.') {
      buf++;
    }
  }
  if ((c == 'e') || (c == 'E')) {
    *buf++ = (char)c;
    if (decexp < 0) {
      decexp = -decexp;
      *buf++ = '-';
    } else {
      *buf++ = '+';
    }
    *buf++ = (char)((decexp / 10) + '0');
    decexp %= 10;
    *buf++ = (char)(decexp + '0');
  }
  *buf = 0;
  return buf - start;
}
```