user: What would the C source look like for the assembly code provided here:

```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     L41
  movss  D34(%rip),%xmm6
  xor    %r12d,%r12d
  movss  %xmm6,0xc(%rsp)
L79:
  mov    0x0(%rbp),%eax
  mov    0x4(%rbp),%r8d
  xor    %ebx,%ebx
  add    %eax,%edi
  sub    %edi,%r8d
  test   %r8d,%r8d
  jle    L1
  movsd  D59(%rip),%xmm0
  mov    %r8d,%edi
  call   <pow@plt>
  mov    0x8(%rbp),%ecx
  lea    -0x1(%rax),%ebx
  mov    0x0(%rbp),%eax
  shl    %cl,%ebx
L1:
  test   %eax,%eax
  jg     L58
  pxor   %xmm7,%xmm7
  xor    %ebp,%ebp
  movss  %xmm7,0x14(%rsp)
L3:
  test   %r15d,%r15d
  jle    L34
  lea    -0x1(%r15),%eax
  lea    0x2(%r14,%rax,2),%rax
  mov    %rax,0x18(%rsp)
  nopl   (%rax)
L68:
  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    L31
  pxor   %xmm2,%xmm2
  mulss  %xmm4,%xmm2
L31:
  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    L68
L34:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L41:
  movsd  D59(%rip),%xmm0
  call   <pow@plt>
  mov    0x8(%rbp),%edi
  lea    -0x1(%rax),%r12d
  mov    D59(%rip),%rax
  movq   %rax,%xmm0
  call   <pow@plt>
  pxor   %xmm6,%xmm6
  mov    0x8(%rbp),%edi
  cvtsi2ss %eax,%xmm6
  movss  %xmm6,0xc(%rsp)
  jmp    L79
  nopl   0x0(%rax,%rax,1)
L58:
  mov    0x4(%rbp),%edi
  movsd  D59(%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  D52(%rip),%xmm0
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm7
  movss  %xmm7,0x14(%rsp)
  jmp    L3
```

tool_calls: name: read_data
arguments: tag: D34
datatype: f32
name: read_data
arguments: tag: D59
datatype: f64
name: read_data
arguments: tag: D52
datatype: f32[4]

tool: D34: 1

tool: D59: 2

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