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

```asm
<ffi2fr8>:
  endbr64
  ucomisd D14(%rip),%xmm0
  mov    %rdx,%r8
  mov    $0x0,%edx
  mov    %rcx,%r9
  movapd %xmm0,%xmm5
  setnp  %al
  cmovne %edx,%eax
  test   %al,%al
  je     L158
  ucomisd D16(%rip),%xmm1
  setnp  %al
  cmovne %edx,%eax
  test   %al,%al
  je     L158
  test   %rsi,%rsi
  jle    L101
  lea    -0x1(%rsi),%rax
  cmp    $0x6,%rax
  jbe    L89
  mov    %rsi,%rcx
  mov    %rdi,%rdx
  pxor   %xmm3,%xmm3
  mov    %r8,%rax
  shr    $0x3,%rcx
  shl    $0x4,%rcx
  add    %rdi,%rcx
  xchg   %ax,%ax
L90:
  movdqu (%rdx),%xmm0
  movdqa %xmm3,%xmm2
  add    $0x10,%rdx
  add    $0x40,%rax
  pcmpgtw %xmm0,%xmm2
  movdqa %xmm0,%xmm1
  punpcklwd %xmm2,%xmm1
  punpckhwd %xmm2,%xmm0
  cvtdq2pd %xmm1,%xmm2
  pshufd $0xee,%xmm1,%xmm1
  movups %xmm2,-0x40(%rax)
  cvtdq2pd %xmm1,%xmm1
  movups %xmm1,-0x30(%rax)
  cvtdq2pd %xmm0,%xmm1
  pshufd $0xee,%xmm0,%xmm0
  cvtdq2pd %xmm0,%xmm0
  movups %xmm1,-0x20(%rax)
  movups %xmm0,-0x10(%rax)
  cmp    %rdx,%rcx
  jne    L90
  mov    %rsi,%rax
  and    $0xfffffffffffffff8,%rax
  test   $0x7,%sil
  je     L101
L94:
  movswl (%rdi,%rax,2),%r10d
  pxor   %xmm0,%xmm0
  lea    (%rax,%rax,1),%rcx
  lea    0x0(,%rax,8),%rdx
  cvtsi2sd %r10d,%xmm0
  lea    0x1(%rax),%r10
  movsd  %xmm0,(%r8,%rax,8)
  cmp    %rsi,%r10
  jge    L101
  movswl 0x2(%rdi,%rcx,1),%r10d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r10d,%xmm0
  lea    0x2(%rax),%r10
  movsd  %xmm0,0x8(%r8,%rdx,1)
  cmp    %r10,%rsi
  jle    L101
  movswl 0x4(%rdi,%rcx,1),%r10d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r10d,%xmm0
  lea    0x3(%rax),%r10
  movsd  %xmm0,0x10(%r8,%rdx,1)
  cmp    %r10,%rsi
  jle    L101
  movswl 0x6(%rdi,%rcx,1),%r10d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r10d,%xmm0
  lea    0x4(%rax),%r10
  movsd  %xmm0,0x18(%r8,%rdx,1)
  cmp    %r10,%rsi
  jle    L101
  movswl 0x8(%rdi,%rcx,1),%r10d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r10d,%xmm0
  lea    0x5(%rax),%r10
  movsd  %xmm0,0x20(%r8,%rdx,1)
  cmp    %r10,%rsi
  jle    L101
  movswl 0xa(%rdi,%rcx,1),%r10d
  pxor   %xmm0,%xmm0
  add    $0x6,%rax
  cvtsi2sd %r10d,%xmm0
  movsd  %xmm0,0x28(%r8,%rdx,1)
  cmp    %rax,%rsi
  jle    L101
  movswl 0xc(%rdi,%rcx,1),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,0x30(%r8,%rdx,1)
L101:
  mov    (%r9),%eax
  ret
  nopl   0x0(%rax)
L158:
  test   %rsi,%rsi
  jle    L101
  lea    -0x1(%rsi),%rax
  cmp    $0x6,%rax
  jbe    L10
  mov    %rsi,%rcx
  movapd %xmm1,%xmm4
  movapd %xmm5,%xmm3
  mov    %rdi,%rdx
  shr    $0x3,%rcx
  unpcklpd %xmm4,%xmm4
  unpcklpd %xmm3,%xmm3
  mov    %r8,%rax
  shl    $0x4,%rcx
  pxor   %xmm6,%xmm6
  add    %rdi,%rcx
  nopl   0x0(%rax,%rax,1)
L104:
  movdqu (%rdx),%xmm0
  movdqa %xmm6,%xmm7
  add    $0x10,%rdx
  add    $0x40,%rax
  pcmpgtw %xmm0,%xmm7
  movdqa %xmm0,%xmm2
  punpcklwd %xmm7,%xmm2
  punpckhwd %xmm7,%xmm0
  cvtdq2pd %xmm2,%xmm7
  pshufd $0xee,%xmm2,%xmm2
  subpd  %xmm4,%xmm7
  cvtdq2pd %xmm2,%xmm2
  subpd  %xmm4,%xmm2
  divpd  %xmm3,%xmm7
  divpd  %xmm3,%xmm2
  movups %xmm7,-0x40(%rax)
  movups %xmm2,-0x30(%rax)
  cvtdq2pd %xmm0,%xmm2
  pshufd $0xee,%xmm0,%xmm0
  subpd  %xmm4,%xmm2
  cvtdq2pd %xmm0,%xmm0
  subpd  %xmm4,%xmm0
  divpd  %xmm3,%xmm2
  divpd  %xmm3,%xmm0
  movups %xmm2,-0x20(%rax)
  movups %xmm0,-0x10(%rax)
  cmp    %rcx,%rdx
  jne    L104
  mov    %rsi,%rax
  and    $0xfffffffffffffff8,%rax
  test   $0x7,%sil
  je     L101
L170:
  movswl (%rdi,%rax,2),%r10d
  pxor   %xmm0,%xmm0
  lea    (%rax,%rax,1),%rcx
  lea    0x0(,%rax,8),%rdx
  cvtsi2sd %r10d,%xmm0
  lea    0x1(%rax),%r10
  subsd  %xmm1,%xmm0
  divsd  %xmm5,%xmm0
  movsd  %xmm0,(%r8,%rax,8)
  cmp    %r10,%rsi
  jle    L101
  movswl 0x2(%rdi,%rcx,1),%r10d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r10d,%xmm0
  lea    0x2(%rax),%r10
  subsd  %xmm1,%xmm0
  divsd  %xmm5,%xmm0
  movsd  %xmm0,0x8(%r8,%rdx,1)
  cmp    %r10,%rsi
  jle    L101
  movswl 0x4(%rdi,%rcx,1),%r10d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r10d,%xmm0
  lea    0x3(%rax),%r10
  subsd  %xmm1,%xmm0
  divsd  %xmm5,%xmm0
  movsd  %xmm0,0x10(%r8,%rdx,1)
  cmp    %r10,%rsi
  jle    L101
  movswl 0x6(%rdi,%rcx,1),%r10d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r10d,%xmm0
  lea    0x4(%rax),%r10
  subsd  %xmm1,%xmm0
  divsd  %xmm5,%xmm0
  movsd  %xmm0,0x18(%r8,%rdx,1)
  cmp    %r10,%rsi
  jle    L101
  movswl 0x8(%rdi,%rcx,1),%r10d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r10d,%xmm0
  lea    0x5(%rax),%r10
  subsd  %xmm1,%xmm0
  divsd  %xmm5,%xmm0
  movsd  %xmm0,0x20(%r8,%rdx,1)
  cmp    %r10,%rsi
  jle    L101
  movswl 0xa(%rdi,%rcx,1),%r10d
  pxor   %xmm0,%xmm0
  add    $0x6,%rax
  cvtsi2sd %r10d,%xmm0
  subsd  %xmm1,%xmm0
  divsd  %xmm5,%xmm0
  movsd  %xmm0,0x28(%r8,%rdx,1)
  cmp    %rax,%rsi
  jle    L101
  movswl 0xc(%rdi,%rcx,1),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mov    (%r9),%eax
  subsd  %xmm1,%xmm0
  divsd  %xmm5,%xmm0
  movsd  %xmm0,0x30(%r8,%rdx,1)
  ret
L89:
  xor    %eax,%eax
  jmp    L94
L10:
  xor    %eax,%eax
  jmp    L170
```

tool_calls: name: read_data
arguments: data_label: D14
data_type: f64
name: read_data
arguments: data_label: D16
data_type: f64

tool: D14: 1

tool: D16: 0

assistant: ```c
int ffi2fr8(short *input, long ntodo, double scale, double zero, double *output, int *status) {
  long ii;
  if (scale == 1. && zero == 0.) {
    for (ii = 0; ii < ntodo; ii++)
      output[ii] = (double)input[ii];
  } else {
    for (ii = 0; ii < ntodo; ii++)
      output[ii] = (input[ii] - zero) / scale;
  }
  return (*status);
}
```