user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<convToFloat>:
  endbr64
  push   %r15
  mov    %edi,%r15d
  push   %r14
  mov    %rsi,%r14
  push   %r13
  mov    %rcx,%r13
  push   %r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    0x8(%rdx),%edi
  movss  %xmm0,0x10(%rsp)
  test   %edi,%edi
  jg     L9
  movss  D5(%rip),%xmm6
  xor    %r12d,%r12d
  movss  %xmm6,0xc(%rsp)
L48:
  mov    0x0(%rbp),%eax
  mov    0x4(%rbp),%r8d
  xor    %ebx,%ebx
  add    %eax,%edi
  sub    %edi,%r8d
  test   %r8d,%r8d
  jle    L54
  movsd  D36(%rip),%xmm0
  mov    %r8d,%edi
  call   <pow@plt>
  mov    0x8(%rbp),%ecx
  lea    -0x1(%rax),%ebx
  mov    0x0(%rbp),%eax
  shl    %cl,%ebx
L54:
  test   %eax,%eax
  jg     L5
  pxor   %xmm7,%xmm7
  xor    %ebp,%ebp
  movss  %xmm7,0x14(%rsp)
L0:
  test   %r15d,%r15d
  jle    L52
  lea    -0x1(%r15),%eax
  lea    0x2(%r14,%rax,2),%rax
  mov    %rax,0x18(%rsp)
  nopl   (%rax)
L40:
  movzwl (%r14),%r15d
  mov    %r15d,%edi
  call   <floor@plt>
  pxor   %xmm1,%xmm1
  pxor   %xmm0,%xmm0
  movss  0xc(%rsp),%xmm3
  and    %r12d,%eax
  movss  0x14(%rsp),%xmm4
  cvtsi2ss %eax,%xmm1
  mov    %r15d,%eax
  and    %ebx,%eax
  movaps %xmm4,%xmm2
  cvtsi2ss %eax,%xmm0
  divss  %xmm3,%xmm1
  divss  %xmm3,%xmm0
  test   %ebp,%r15d
  jne    L60
  pxor   %xmm2,%xmm2
  mulss  %xmm4,%xmm2
L60:
  addss  %xmm2,%xmm0
  add    $0x2,%r14
  add    $0x4,%r13
  addss  %xmm1,%xmm0
  mulss  0x10(%rsp),%xmm0
  movss  %xmm0,-0x4(%r13)
  cmp    0x18(%rsp),%r14
  jne    L40
L52:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L9:
  movsd  D36(%rip),%xmm0
  call   <pow@plt>
  mov    0x8(%rbp),%edi
  lea    -0x1(%rax),%r12d
  mov    D36(%rip),%rax
  movq   %rax,%xmm0
  call   <pow@plt>
  pxor   %xmm6,%xmm6
  mov    0x8(%rbp),%edi
  cvtsi2ss %eax,%xmm6
  movss  %xmm6,0xc(%rsp)
  jmp    L48
  nopl   0x0(%rax,%rax,1)
L5:
  mov    0x4(%rbp),%edi
  movsd  D36(%rip),%xmm0
  sub    $0x1,%edi
  call   <pow@plt>
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  pxor   %xmm7,%xmm7
  cvtsi2ss %eax,%xmm0
  cvtss2sd 0xc(%rsp),%xmm1
  mov    %eax,%ebp
  cvtss2sd %xmm0,%xmm0
  xorpd  D6(%rip),%xmm0
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm7
  movss  %xmm7,0x14(%rsp)
  jmp    L0
```

tool_calls: name: disassemble_data
arguments: data_tag: D5
type: f32
name: disassemble_data
arguments: data_tag: D36
type: f64
name: disassemble_data
arguments: data_tag: D6
type: f32[4]

tool: D5: 1

tool: D36: 2

tool: {"D6": [0.0,-0.0,0.0,0.0]}

assistant: ```c
void convToFloat(int dlen, unsigned short data[], int datatype[], float newdata[], float gain) {
  int k;
  unsigned short d;
  int numintbits = 0;
  int intmask = 0;
  int signmask = 0;
  float signval_ = 0;
  float signval = 0.0;
  int fracmask = 0;
  float fracnorm = 1.0;
  int nfrac = 2;
  int nbits = 1;
  int sbit = 0;
  float frac = 0.0;
  int fracpart = 0;
  int intpart = 0;
  float intval = 0;
  float signbit = 0.0;
  float val = 0.0;
  if (datatype[nfrac] > 0) {
    fracmask = (int)(pow(2.0, datatype[nfrac]) - 1);
    fracnorm = (float)(pow(2.0, datatype[nfrac]));
  } else {
    fracmask = 0;
    fracnorm = 1.0;
  }
  numintbits = datatype[nbits] - (datatype[sbit] + datatype[nfrac]);
  if (numintbits > 0)
    intmask = ((int)(pow(2.0, numintbits) - 1)) << datatype[nfrac];
  else
    intmask = 0;
  if (datatype[sbit] > 0) {
    signmask = (int)(pow(2.0, (datatype[nbits] - 1)));
    signval = -1.0 * ((float)(signmask)) / fracnorm;
  } else {
    signmask = 0;
    signval = 0.0;
  }
  for (k = 0; k < dlen; k++) {
    d = data[k];
    fracpart = ((int)(floor(d))) & fracmask;
    frac = ((float)(fracpart)) / fracnorm;
    intpart = ((int)(d)) & intmask;
    intval = ((float)(intpart)) / fracnorm;
    signbit = 0.0;
    if ((((int)(d)) & signmask) > 0)
      signbit = 1.0;
    signval_ = signbit * signval;
    val = signval_ + intval + frac;
    newdata[k] = val * gain;
  }
}
```