user: What is the c source code of the assembly code below:

```asm
<ftoa>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  movss  %xmm0,-0x14(%rbp)
  mov    %rdi,-0x20(%rbp)
  movl   $0x0,-0xc(%rbp)
  pxor   %xmm0,%xmm0
  comiss -0x14(%rbp),%xmm0
  jbe    L118
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x2d,(%rax)
  movss  -0x14(%rbp),%xmm0
  movss  D40(%rip),%xmm1
  xorps  %xmm1,%xmm0
  movss  %xmm0,-0x14(%rbp)
L118:
  pxor   %xmm0,%xmm0
  ucomiss -0x14(%rbp),%xmm0
  jp     L3
  pxor   %xmm0,%xmm0
  ucomiss -0x14(%rbp),%xmm0
  je     L85
L3:
  mov    -0x14(%rbp),%eax
  movd   %eax,%xmm0
  call   <log10@plt>
  jmp    L97
L85:
  mov    $0x0,%eax
L97:
  mov    %eax,-0x4(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x4(%rbp),%xmm0
  mov    D51(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movaps %xmm0,%xmm1
  movss  -0x14(%rbp),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x14(%rbp)
  movss  -0x14(%rbp),%xmm0
  movss  D36(%rip),%xmm1
  comiss %xmm1,%xmm0
  jbe    L104
  movss  D31(%rip),%xmm0
  comiss -0x14(%rbp),%xmm0
  jbe    L104
  pxor   %xmm0,%xmm0
  ucomiss -0x14(%rbp),%xmm0
  jp     L111
  pxor   %xmm0,%xmm0
  ucomiss -0x14(%rbp),%xmm0
  je     L104
L111:
  movss  -0x14(%rbp),%xmm1
  movss  D6(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0x14(%rbp)
  subl   $0x1,-0x4(%rbp)
  movss  -0x14(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  lea    0x30(%rax),%ecx
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  movss  -0x14(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  movss  -0x14(%rbp),%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,-0x14(%rbp)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x2e,(%rax)
  jmp    L95
L104:
  movss  -0x14(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  lea    0x30(%rax),%ecx
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  movss  -0x14(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  movss  -0x14(%rbp),%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,-0x14(%rbp)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x2e,(%rax)
L95:
  movl   $0x0,-0x8(%rbp)
  jmp    L94
L79:
  movss  -0x14(%rbp),%xmm1
  movss  D6(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0x14(%rbp)
  movss  -0x14(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  lea    0x30(%rax),%ecx
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  movss  -0x14(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  movss  -0x14(%rbp),%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,-0x14(%rbp)
  addl   $0x1,-0x8(%rbp)
L94:
  cmpl   $0x3,-0x8(%rbp)
  jle    L79
  cmpl   $0x0,-0x4(%rbp)
  je     L101
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x78,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x31,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x30,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x65,(%rax)
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <ltoa@plt>
  jmp    L112
L101:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
L112:
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D40
datatype: byte[4]
name: disassemble_data
arguments: label: D51
datatype: f64
name: disassemble_data
arguments: label: D36
datatype: byte[4]
name: disassemble_data
arguments: label: D31
datatype: f32
name: disassemble_data
arguments: label: D6
datatype: byte[4]

tool: {"D40": [0x00,0x00,0x00,0x80]}

tool: D51: 10

tool: {"D36": [0x00,0x00,0x80,0xbf]}

tool: D31: 1

tool: {"D6": [0x00,0x00,0x20,0x41]}

assistant: ```c
void ftoa(float fval, char *buf) {
  int index = 0, count, exponent;
  double temp1, temp2;
  if (fval < 0) {
    buf[index++] = '-';
    fval = -fval;
  }
  exponent = fval != 0.0 ? log10(fval) : 0;
  fval /= pow((double)10.0, (double)exponent);
  if ((fval > -1.0) && (fval < 1.0) && (fval != 0.0)) {
    fval *= 10;
    exponent--;
    buf[index++] = '0' + (int)fval;
    fval -= (int)fval;
    buf[index++] = '.';
  } else {
    buf[index++] = '0' + (int)fval;
    fval -= (int)fval;
    buf[index++] = '.';
  }
  for (count = 0; count < 4; count++) {
    fval *= 10;
    buf[index++] = '0' + (int)fval;
    fval -= (int)fval;
  }
  if (exponent) {
    buf[index++] = 'x';
    buf[index++] = '1';
    buf[index++] = '0';
    buf[index++] = 'e';
    ltoa(exponent, buf + index);
  } else {
    buf[index] = '\0';
  }
}
```