user: Demonstrate the C code that generates the assembly output below:

```asm
<TH_float2halfbits>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  and    $0x7fffffff,%eax
  mov    %eax,-0x18(%rbp)
  cmpl   $0x7f800000,-0x18(%rbp)
  jbe    L103
  mov    -0x40(%rbp),%rax
  movw   $0x7fff,(%rax)
  jmp    L88
L103:
  mov    -0x1c(%rbp),%eax
  shr    $0x10,%eax
  and    $0x8000,%eax
  mov    %eax,-0x14(%rbp)
  cmpl   $0x477fefff,-0x18(%rbp)
  jbe    L102
  mov    -0x14(%rbp),%eax
  or     $0x7c,%ah
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  mov    %dx,(%rax)
  jmp    L88
L102:
  cmpl   $0x33000000,-0x18(%rbp)
  ja     L46
  mov    -0x14(%rbp),%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  mov    %dx,(%rax)
  jmp    L88
L46:
  mov    -0x18(%rbp),%eax
  shr    $0x17,%eax
  and    $0xff,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x18(%rbp),%eax
  and    $0x7fffff,%eax
  mov    %eax,-0x20(%rbp)
  cmpl   $0x70,-0x24(%rbp)
  jbe    L69
  movl   $0xd,-0x28(%rbp)
  subl   $0x70,-0x24(%rbp)
  jmp    L4
L69:
  mov    $0x7e,%eax
  sub    -0x24(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  movl   $0x0,-0x24(%rbp)
  orl    $0x800000,-0x20(%rbp)
L4:
  mov    -0x28(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  shr    %eax
  mov    %eax,-0xc(%rbp)
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%eax
  and    -0x8(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x28(%rbp),%eax
  mov    %eax,%ecx
  shrl   %cl,-0x20(%rbp)
  mov    -0x4(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  ja     L105
  mov    -0x4(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jne    L71
  mov    -0x20(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L71
L105:
  addl   $0x1,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
  and    $0x3ff,%eax
  test   %eax,%eax
  jne    L71
  addl   $0x1,-0x24(%rbp)
  movl   $0x0,-0x20(%rbp)
L71:
  mov    -0x24(%rbp),%eax
  shl    $0xa,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  or     %eax,%edx
  mov    -0x20(%rbp),%eax
  or     %eax,%edx
  mov    -0x40(%rbp),%rax
  mov    %dx,(%rax)
L88:
  pop    %rbp
  ret
```

assistant: ```c
void TH_float2halfbits(float *src, unsigned short *dest) {
  unsigned x = *(unsigned *)src;
  unsigned u = (x & 0x7fffffff), remainder, shift, lsb, lsb_s1, lsb_m1;
  unsigned sign, exponent, mantissa;
  if (u > 0x7f800000) {
    *dest = 0x7fffU;
    return;
  }
  sign = ((x >> 16) & 0x8000);
  if (u > 0x477fefff) {
    *dest = sign | 0x7c00U;
    return;
  }
  if (u < 0x33000001) {
    *dest = (sign | 0x0000);
    return;
  }
  exponent = ((u >> 23) & 0xff);
  mantissa = (u & 0x7fffff);
  if (exponent > 0x70) {
    shift = 13;
    exponent -= 0x70;
  } else {
    shift = 0x7e - exponent;
    exponent = 0;
    mantissa |= 0x800000;
  }
  lsb = (1 << shift);
  lsb_s1 = (lsb >> 1);
  lsb_m1 = (lsb - 1);
  remainder = (mantissa & lsb_m1);
  mantissa >>= shift;
  if (remainder > lsb_s1 || (remainder == lsb_s1 && (mantissa & 0x1))) {
    ++mantissa;
    if (!(mantissa & 0x3ff)) {
      ++exponent;
      mantissa = 0;
    }
  }
  *dest = (sign | (exponent << 10) | mantissa);
}
```