user: 下面的汇编指令对应的C源代码是什么:

```asm
<fl2sh>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r12
  push   %rbx
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  movsd  %xmm0,-0x30(%rbp)
  mov    %ecx,%eax
  mov    %ax,-0x34(%rbp)
  mov    $0x0,%r12d
  pxor   %xmm0,%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jp     L169
  pxor   %xmm0,%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jne    L169
  mov    $0x0,%ebx
  jmp    L167
L61:
  mov    %rbx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  movss  D31(%rip),%xmm0
  mulss  %xmm1,%xmm0
  pxor   %xmm3,%xmm3
  cvtss2sd %xmm0,%xmm3
  movapd %xmm3,%xmm5
  comisd D109(%rip),%xmm3
  jbe    L106
  movsd  D109(%rip),%xmm7
  movapd %xmm7,%xmm5
  add    $0x1,%r12
  jmp    L60
L106:
  movsd  D24(%rip),%xmm0
  movapd %xmm5,%xmm7
  comisd %xmm7,%xmm0
  jbe    L60
  movsd  D24(%rip),%xmm4
  movapd %xmm4,%xmm5
  add    $0x1,%r12
L60:
  mov    %rbx,%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  cvttsd2si %xmm5,%edx
  mov    %dx,(%rax)
  mov    %rbx,%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  mov    %rbx,%rdx
  lea    (%rdx,%rdx,1),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  and    -0x34(%rbp),%ax
  mov    %ax,(%rdx)
  add    $0x1,%rbx
L167:
  cmp    -0x18(%rbp),%rbx
  jl     L61
  jmp    L41
L169:
  mov    $0x0,%ebx
  jmp    L127
L84:
  mov    %rbx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  movss  D31(%rip),%xmm0
  mulss  %xmm1,%xmm0
  pxor   %xmm2,%xmm2
  cvtss2sd %xmm0,%xmm2
  movapd %xmm2,%xmm5
  pxor   %xmm0,%xmm0
  comisd %xmm0,%xmm2
  jb     L38
  addsd  -0x30(%rbp),%xmm2
  movapd %xmm2,%xmm5
  jmp    L33
L38:
  movapd %xmm5,%xmm4
  subsd  -0x30(%rbp),%xmm4
  movapd %xmm4,%xmm5
L33:
  movapd %xmm5,%xmm6
  comisd D109(%rip),%xmm6
  jbe    L161
  movsd  D109(%rip),%xmm1
  movapd %xmm1,%xmm5
  add    $0x1,%r12
  jmp    L71
L161:
  movsd  D24(%rip),%xmm0
  movapd %xmm5,%xmm7
  comisd %xmm7,%xmm0
  jbe    L71
  movsd  D24(%rip),%xmm4
  movapd %xmm4,%xmm5
  add    $0x1,%r12
L71:
  pxor   %xmm0,%xmm0
  comisd %xmm0,%xmm5
  jb     L28
  mov    %rbx,%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  cvttsd2si %xmm5,%edx
  mov    %dx,(%rax)
  mov    %rbx,%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  mov    %rbx,%rdx
  lea    (%rdx,%rdx,1),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  and    -0x34(%rbp),%ax
  mov    %ax,(%rdx)
  jmp    L35
L28:
  movq   D1(%rip),%xmm0
  movapd %xmm5,%xmm6
  xorpd  %xmm0,%xmm6
  movapd %xmm6,%xmm0
  mov    %rbx,%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  cvttsd2si %xmm0,%edx
  mov    %dx,(%rax)
  mov    %rbx,%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  mov    %rbx,%rdx
  lea    (%rdx,%rdx,1),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  and    -0x34(%rbp),%ax
  mov    %ax,(%rdx)
  mov    %rbx,%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  neg    %eax
  mov    %eax,%edx
  mov    %rbx,%rax
  lea    (%rax,%rax,1),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    %dx,(%rax)
L35:
  add    $0x1,%rbx
L127:
  cmp    -0x18(%rbp),%rbx
  jl     L84
L41:
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  pop    %rbp
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D31
data_type: f32
name: disassemble_data
arguments: tag: D109
data_type: f64[2]
name: disassemble_data
arguments: tag: D24
data_type: f32[2]
name: disassemble_data
arguments: tag: D1
data_type: f32[2]

tool: D31: 32768

tool: {"D109": [32767.0,-32768.0]}

tool: {"D24": [0.0,-7.0]}

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

assistant: ```c
long fl2sh(n, x, iy, half_lsb, mask)
long n;
float *x;
short *iy;
double half_lsb;
short mask;
{
  register long iOvrFlw, k;
  register double y;
  iOvrFlw = 0;
  if (half_lsb == 0.0) {
    for (k = 0; k < n; k++) {
      y = x[k] * 32768;
      if (y > 32767.0) {
        y = 32767.0;
        iOvrFlw += 1;
      } else if (y < -32768.0) {
        y = -32768.0;
        iOvrFlw += 1;
      }
      iy[k] = (short)(y);
      iy[k] &= mask;
    }
  } else {
    for (k = 0; k < n; k++) {
      y = x[k] * 32768;
      if (y >= 0.0)
        y = y + half_lsb;
      else
        y = y - half_lsb;
      if (y > 32767.0) {
        y = 32767.0;
        iOvrFlw += 1;
      } else if (y < -32768.0) {
        y = -32768.0;
        iOvrFlw += 1;
      }
      if (y >= 0.0) {
        iy[k] = (short)(y);
        iy[k] &= mask;
      } else {
        iy[k] = (short)(-y);
        iy[k] &= mask;
        iy[k] = -iy[k];
      }
    }
  }
  return iOvrFlw;
}
```