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

```asm
<double64_be_read>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  sar    $0x7,%al
  movsbl %al,%eax
  and    $0x1,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x4,%eax
  and    $0x7f0,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  shr    $0x4,%al
  movzbl %al,%eax
  and    $0xf,%eax
  or     %edx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x18,%eax
  and    $0xf000000,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x10,%eax
  or     %eax,%edx
  mov    -0x28(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%eax
  or     %eax,%edx
  mov    -0x28(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  or     %edx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x5,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x10,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    $0x6,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%eax
  or     %eax,%edx
  mov    -0x28(%rbp),%rax
  add    $0x7,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  or     %edx,%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  jne    L49
  cmpl   $0x0,-0x10(%rbp)
  jne    L49
  cmpl   $0x0,-0xc(%rbp)
  jne    L49
  pxor   %xmm0,%xmm0
  jmp    L65
L49:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x10(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0xc(%rbp),%xmm0
  movsd  D23(%rip),%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm1
  movsd  D0(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  subl   $0x3ff,-0x14(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  D0(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  cmpl   $0x0,-0x18(%rbp)
  je     L68
  movsd  -0x8(%rbp),%xmm0
  movq   D1(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
L68:
  cmpl   $0x0,-0x14(%rbp)
  jle    L9
  mov    -0x14(%rbp),%edx
  mov    D18(%rip),%rax
  mov    %edx,%edi
  movq   %rax,%xmm0
  call   <pow@plt>
  movsd  -0x8(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  jmp    L61
L9:
  cmpl   $0x0,-0x14(%rbp)
  jns    L61
  mov    -0x14(%rbp),%eax
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  mov    D18(%rip),%rax
  mov    %edx,%edi
  movq   %rax,%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm1
  movsd  -0x8(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
L61:
  movsd  -0x8(%rbp),%xmm0
L65:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D23
type_guessed: f32[2]
name: retrieve_data
arguments: data_label: D0
type_guessed: f32[2]
name: retrieve_data
arguments: data_label: D1
type_guessed: f32[2]
name: retrieve_data
arguments: data_label: D18
type_guessed: f64

tool: {"D23": [0.0,15.0]}

tool: {"D0": [0.0,22.0]}

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

tool: D18: 2

assistant: ```c
double double64_be_read(const unsigned char *cptr) {
  int exponent, negative, upper, lower;
  double dvalue;
  negative = (cptr[0] & 0x80) ? 1 : 0;
  exponent = ((cptr[0] & 0x7F) << 4) | ((cptr[1] >> 4) & 0xF);
  upper = (((cptr[1] & 0xF) << 24) | (cptr[2] << 16) | (cptr[3] << 8) | cptr[4]);
  lower = (cptr[5] << 16) | (cptr[6] << 8) | cptr[7];
  if (exponent == 0 && upper == 0 && lower == 0)
    return 0.0;
  dvalue = upper + lower / ((double)0x1000000);
  dvalue += 0x10000000;
  exponent = exponent - 0x3FF;
  dvalue = dvalue / ((double)0x10000000);
  if (negative)
    dvalue *= -1;
  if (exponent > 0)
    dvalue *= pow(2.0, exponent);
  else if (exponent < 0)
    dvalue /= pow(2.0, abs(exponent));
  return dvalue;
}
```