user: 请将以下的汇编代码转换成C语言代码：

```asm
<pftoa>:
  endbr64
  movd   %xmm0,%ecx
  movd   %xmm0,%edx
  push   %r14
  shr    $0x17,%ecx
  shr    $0x10,%edx
  push   %r13
  sub    $0x7f,%ecx
  push   %r12
  and    $0x7f,%edx
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  cmp    $0x12,%cl
  jg     L144
  cmp    $0xfd,%cl
  jl     L248
  movd   %xmm0,%esi
  movd   %xmm0,%eax
  mov    %rdi,%r13
  xor    %r12d,%r12d
  shr    $0x18,%esi
  test   %sil,%sil
  jns    L64
  movb   $0x2d,(%rdi)
  lea    0x1(%rdi),%r13
  mov    $0x1,%r12d
L64:
  movzbl %dl,%edx
  movzwl %ax,%eax
  movsbl %cl,%ebp
  mov    $0x17,%ecx
  shl    $0x10,%rdx
  sub    %ebp,%ecx
  mov    %r13,%rsi
  lea    0x800000(%rax,%rdx,1),%r14
  mov    $0xa,%edx
  mov    %r14,%rax
  shr    %cl,%rax
  mov    %rax,%rdi
  call   <itoa@plt>
  cmpb   $0x0,(%rbx)
  je     L149
  cmpb   $0x0,0x1(%rbx)
  lea    0x1(%rbx),%rax
  je     L102
  cmpb   $0x0,0x2(%rbx)
  lea    0x2(%rbx),%rax
  je     L221
  cmpb   $0x0,0x3(%rbx)
  lea    0x3(%rbx),%rax
  je     L193
  cmpb   $0x0,0x4(%rbx)
  lea    0x4(%rbx),%rax
  je     L34
  cmpb   $0x0,0x5(%rbx)
  lea    0x5(%rbx),%rax
  je     L229
  cmpb   $0x0,0x6(%rbx)
  je     L198
  cmpb   $0x0,0x7(%rbx)
  je     L198
L84:
  mov    $0x14,%ecx
  lea    0x1(%r12),%edx
  sub    %ebp,%ecx
  shr    %cl,%r14
  lea    D6(%rip),%rcx
  and    $0x7,%r14d
  movslq (%rcx,%r14,4),%rax
  add    %rcx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax)
L248:
  mov    $0x30,%eax
  mov    %ax,(%rdi)
L198:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L144:
  movl   $0x666e49,(%rdi)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
  mov    $0x31,%esi
  mov    $0x32,%ecx
  mov    $0x35,%edi
  nop
L189:
  movslq %edx,%rdx
  movb   $0x2e,0x0(%r13)
  lea    0x2(%r12),%eax
  mov    %sil,(%rbx,%rdx,1)
  cmp    $0x5,%r12d
  je     L227
  cltq
  lea    0x3(%r12),%edx
  mov    %cl,(%rbx,%rax,1)
  mov    $0x7,%eax
  cmp    $0x4,%r12d
  je     L227
  movslq %edx,%rdx
  lea    0x4(%r12),%eax
  mov    %dil,(%rbx,%rdx,1)
L227:
  cltq
  movb   $0x0,(%rbx,%rax,1)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
  mov    $0x32,%esi
  mov    $0x35,%ecx
  mov    $0x30,%edi
  jmp    L189
  nopl   0x0(%rax)
  mov    $0x33,%esi
  mov    $0x37,%ecx
  mov    $0x35,%edi
  jmp    L189
  nopl   0x0(%rax)
  mov    $0x35,%esi
  mov    $0x30,%ecx
  mov    $0x30,%edi
  jmp    L189
  nopl   0x0(%rax)
  mov    $0x36,%esi
  mov    $0x32,%ecx
  mov    $0x35,%edi
  jmp    L189
  nopl   0x0(%rax)
  mov    $0x37,%esi
  mov    $0x35,%ecx
  mov    $0x30,%edi
  jmp    L189
  nopl   0x0(%rax)
  mov    $0x38,%esi
  mov    $0x37,%ecx
  mov    $0x35,%edi
  jmp    L189
L149:
  mov    %rbx,%r13
  xor    %r12d,%r12d
  jmp    L84
L102:
  mov    %rax,%r13
  mov    $0x1,%r12d
  jmp    L84
L221:
  mov    %rax,%r13
  mov    $0x2,%r12d
  jmp    L84
L193:
  mov    %rax,%r13
  mov    $0x3,%r12d
  jmp    L84
L34:
  mov    %rax,%r13
  mov    $0x4,%r12d
  jmp    L84
L229:
  mov    %rax,%r13
  mov    $0x5,%r12d
  jmp    L84
  mov    $0x30,%esi
  mov    $0x30,%ecx
  mov    $0x30,%edi
  jmp    L189
```

assistant: ```c
void pftoa(float value, char *buffer) {
  union {
    float f;
    struct {
      unsigned int mantissa_lo : 16;
      unsigned int mantissa_hi : 7;
      unsigned int exponent : 8;
      unsigned int sign : 1;
    };
  } helper;
  unsigned long mantissa;
  signed char exponent;
  unsigned int int_part;
  char frac_part[3];
  int i, count = 0;
  helper.f = value;
  mantissa = helper.mantissa_lo;
  mantissa += ((unsigned long)helper.mantissa_hi << 16);
  mantissa += 0x00800000;
  exponent = (signed char)helper.exponent - 127;
  if (exponent > 18) {
    buffer[0] = 'I';
    buffer[1] = 'n';
    buffer[2] = 'f';
    buffer[3] = '\0';
    return;
  }
  if (exponent < -3) {
    buffer[0] = '0';
    buffer[1] = '\0';
    return;
  }
  count = 0;
  if (helper.sign) {
    buffer[0] = '-';
    count++;
  }
  int_part = mantissa >> (23 - exponent);
  itoa(int_part, &buffer[count], 10);
  for (i = 0; i < 8; i++)
    if (buffer[i] == '\0') {
      count = i;
      break;
    }
  if (count > 5)
    return;
  buffer[count++] = '.';
  switch (0x7 & (mantissa >> (20 - exponent))) {
  case 0:
    frac_part[0] = '0';
    frac_part[1] = '0';
    frac_part[2] = '0';
    break;
  case 1:
    frac_part[0] = '1';
    frac_part[1] = '2';
    frac_part[2] = '5';
    break;
  case 2:
    frac_part[0] = '2';
    frac_part[1] = '5';
    frac_part[2] = '0';
    break;
  case 3:
    frac_part[0] = '3';
    frac_part[1] = '7';
    frac_part[2] = '5';
    break;
  case 4:
    frac_part[0] = '5';
    frac_part[1] = '0';
    frac_part[2] = '0';
    break;
  case 5:
    frac_part[0] = '6';
    frac_part[1] = '2';
    frac_part[2] = '5';
    break;
  case 6:
    frac_part[0] = '7';
    frac_part[1] = '5';
    frac_part[2] = '0';
    break;
  case 7:
    frac_part[0] = '8';
    frac_part[1] = '7';
    frac_part[2] = '5';
    break;
  }
  for (i = 0; i < 3; i++)
    if (count < 7)
      buffer[count++] = frac_part[i];
  buffer[count] = '\0';
}
```