user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<scalbn>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  movsd  %xmm0,-0x18(%rbp)
  mov    %edi,-0x1c(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  lea    -0x18(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  sar    $0x14,%eax
  and    $0x7ff,%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0xc(%rbp)
  jne    L51
  mov    -0x8(%rbp),%eax
  and    $0x7fffffff,%eax
  or     -0x4(%rbp),%eax
  test   %eax,%eax
  jne    L63
  movsd  -0x18(%rbp),%xmm0
  jmp    L24
L63:
  movsd  -0x18(%rbp),%xmm1
  movsd  D27(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  sar    $0x14,%eax
  and    $0x7ff,%eax
  sub    $0x36,%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0xffff3cb0,-0x1c(%rbp)
  jge    L51
  movsd  -0x18(%rbp),%xmm1
  movsd  D30(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  jmp    L24
L51:
  cmpl   $0x7ff,-0xc(%rbp)
  jne    L141
  movsd  -0x18(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  jmp    L24
L141:
  mov    -0x1c(%rbp),%eax
  add    %eax,-0xc(%rbp)
  cmpl   $0x7fe,-0xc(%rbp)
  jle    L95
  movsd  -0x18(%rbp),%xmm0
  mov    D66(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <copysign@plt>
  movsd  D66(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  jmp    L24
L95:
  cmpl   $0x0,-0xc(%rbp)
  jle    L66
  mov    -0x8(%rbp),%eax
  and    $0x800fffff,%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  shl    $0x14,%eax
  or     %eax,%edx
  lea    -0x18(%rbp),%rax
  add    $0x4,%rax
  mov    %edx,(%rax)
  movsd  -0x18(%rbp),%xmm0
  jmp    L24
L66:
  cmpl   $0xffffffcb,-0xc(%rbp)
  jge    L112
  cmpl   $0xc350,-0x1c(%rbp)
  jle    L145
  movsd  -0x18(%rbp),%xmm0
  mov    D66(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <copysign@plt>
  movsd  D66(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  jmp    L24
L145:
  movsd  -0x18(%rbp),%xmm0
  mov    D30(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <copysign@plt>
  movsd  D30(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  jmp    L24
L112:
  addl   $0x36,-0xc(%rbp)
  mov    -0x8(%rbp),%eax
  and    $0x800fffff,%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  shl    $0x14,%eax
  or     %eax,%edx
  lea    -0x18(%rbp),%rax
  add    $0x4,%rax
  mov    %edx,(%rax)
  movsd  -0x18(%rbp),%xmm1
  movsd  D86(%rip),%xmm0
  mulsd  %xmm1,%xmm0
L24:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D27
data_type: byte[8]
name: retrieve_data
arguments: label: D30
data_type: byte[8]
name: retrieve_data
arguments: label: D66
data_type: byte[8]
name: retrieve_data
arguments: label: D86
data_type: byte[8]

tool: {"D27": [0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x43]}

tool: {"D30": [0x59,0xf3,0xf8,0xc2,0x1f,0x6e,0xa5,0x01]}

tool: {"D66": [0x9c,0x75,0x00,0x88,0x3c,0xe4,0x37,0x7e]}

tool: {"D86": [0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x3c]}

assistant: ```c
double scalbn(double x, int n) {
  int k, hx, lx;
  hx = *(1 + (int *)&x);
  lx = *(int *)&x;
  k = (hx & 0x7ff00000) >> 20;
  if (k == 0) {
    if ((lx | (hx & 0x7fffffff)) == 0) {
      return x;
    }
    x *= 1.80143985094819840000e+16;
    hx = *(1 + (int *)&x);
    k = ((hx & 0x7ff00000) >> 20) - 54;
    if (n < -50000) {
      return 1.0e-300 * x;
    }
  }
  if (k == 0x7ff) {
    return x + x;
  }
  k = k + n;
  if (k > 0x7fe) {
    return 1.0e+300 * copysign(1.0e+300, x);
  }
  if (k > 0) {
    *(1 + (int *)&x) = (hx & 0x800fffff) | (k << 20);
    return x;
  }
  if (k <= -54) {
    if (n > 50000) {
      return 1.0e+300 * copysign(1.0e+300, x);
    } else {
      return 1.0e-300 * copysign(1.0e-300, x);
    }
  }
  k += 54;
  *(1 + (int *)&x) = (hx & 0x800fffff) | (k << 20);
  return x * 5.55111512312578270212e-17;
}
```