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

```asm
<convToFloat>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,%ebp
  mov    %rsi,%r15
  mov    %rdx,%rbx
  mov    %rcx,%r12
  movss  %xmm0,0x4(%rsp)
  mov    0x8(%rdx),%edi
  test   %edi,%edi
  jg     L48
  movss  D11(%rip),%xmm6
  movss  %xmm6,(%rsp)
  movl   $0x0,0xc(%rsp)
L99:
  mov    0x8(%rbx),%eax
  add    (%rbx),%eax
  mov    0x4(%rbx),%edi
  sub    %eax,%edi
  mov    $0x0,%r13d
  test   %edi,%edi
  jg     L44
L25:
  cmpl   $0x0,(%rbx)
  jg     L19
  pxor   %xmm7,%xmm7
  movss  %xmm7,0x8(%rsp)
  mov    $0x0,%r14d
L38:
  test   %ebp,%ebp
  jle    L11
  mov    %r15,%rbx
  lea    -0x1(%rbp),%eax
  lea    0x2(%r15,%rax,2),%r15
  jmp    L89
L48:
  mov    D48(%rip),%rax
  movq   %rax,%xmm0
  call   <pow@plt>
  sub    $0x1,%eax
  mov    %eax,0xc(%rsp)
  mov    0x8(%rbx),%edi
  mov    D48(%rip),%rax
  movq   %rax,%xmm0
  call   <pow@plt>
  pxor   %xmm6,%xmm6
  cvtsi2ss %eax,%xmm6
  movss  %xmm6,(%rsp)
  jmp    L99
L44:
  movsd  D48(%rip),%xmm0
  call   <pow@plt>
  lea    -0x1(%rax),%r13d
  mov    0x8(%rbx),%ecx
  shl    %cl,%r13d
  jmp    L25
L19:
  mov    0x4(%rbx),%edi
  sub    $0x1,%edi
  movsd  D48(%rip),%xmm0
  call   <pow@plt>
  mov    %eax,%r14d
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  cvtss2sd %xmm0,%xmm0
  xorpd  D3(%rip),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd (%rsp),%xmm1
  divsd  %xmm1,%xmm0
  pxor   %xmm7,%xmm7
  cvtsd2ss %xmm0,%xmm7
  movss  %xmm7,0x8(%rsp)
  jmp    L38
L39:
  mulss  0x8(%rsp),%xmm0
  addss  %xmm2,%xmm0
  addss  %xmm1,%xmm0
  mulss  0x4(%rsp),%xmm0
  movss  %xmm0,(%r12)
  add    $0x2,%rbx
  add    $0x4,%r12
  cmp    %r15,%rbx
  je     L11
L89:
  movzwl (%rbx),%ebp
  mov    %ebp,%edi
  call   <floor@plt>
  and    0xc(%rsp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  movss  (%rsp),%xmm3
  divss  %xmm3,%xmm1
  mov    %ebp,%eax
  and    %r13d,%eax
  pxor   %xmm2,%xmm2
  cvtsi2ss %eax,%xmm2
  divss  %xmm3,%xmm2
  pxor   %xmm0,%xmm0
  test   %r14d,%ebp
  je     L39
  movss  D11(%rip),%xmm0
  jmp    L39
L11:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: read_data
arguments: tag: D11
datatype: f32
name: read_data
arguments: tag: D48
datatype: f64
name: read_data
arguments: tag: D3
datatype: f32[4]

tool: D11: 1

tool: D48: 2

tool: {"D3": [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;
  }
}
```