user: 请将以下的汇编代码转换成C语言代码:

```asm
<halfp2singles>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %edx,-0x54(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x50(%rbp)
  je     L47
  cmpq   $0x0,-0x48(%rbp)
  jne    L57
L47:
  mov    $0x0,%eax
  jmp    L66
L98:
  mov    -0x10(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    (%rax),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  and    $0x7fff,%eax
  test   %eax,%eax
  jne    L24
  mov    -0x8(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    -0x2c(%rbp),%edx
  shl    $0x10,%edx
  mov    %edx,(%rax)
  jmp    L57
L24:
  mov    -0x2c(%rbp),%eax
  and    $0x8000,%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x2c(%rbp),%eax
  and    $0x7c00,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x2c(%rbp),%eax
  and    $0x3ff,%eax
  mov    %eax,-0x34(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  jne    L71
  movl   $0xffffffff,-0x30(%rbp)
L34:
  addl   $0x1,-0x30(%rbp)
  shll   -0x34(%rbp)
  mov    -0x34(%rbp),%eax
  and    $0x400,%eax
  test   %eax,%eax
  je     L34
  mov    -0x28(%rbp),%eax
  shl    $0x10,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x24(%rbp),%eax
  sar    $0xa,%eax
  add    $0x70,%eax
  sub    -0x30(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  shl    $0x17,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x34(%rbp),%eax
  shl    $0xd,%eax
  and    $0x7fe000,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x20(%rbp),%eax
  or     -0x18(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  lea    0x4(%rax),%rcx
  mov    %rcx,-0x8(%rbp)
  or     -0x14(%rbp),%edx
  mov    %edx,(%rax)
  jmp    L57
L71:
  cmpl   $0x7c00,-0x24(%rbp)
  jne    L25
  cmpl   $0x0,-0x34(%rbp)
  jne    L5
  mov    -0x28(%rbp),%eax
  shl    $0x10,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0x7f800000,%ecx
  mov    %ecx,%edx
  mov    %edx,(%rax)
  jmp    L57
L5:
  mov    -0x8(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movl   $0xffc00000,(%rax)
  jmp    L57
L25:
  mov    -0x28(%rbp),%eax
  shl    $0x10,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x24(%rbp),%eax
  sar    $0xa,%eax
  add    $0x70,%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  shl    $0x17,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x34(%rbp),%eax
  shl    $0xd,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x20(%rbp),%eax
  or     -0x18(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  lea    0x4(%rax),%rcx
  mov    %rcx,-0x8(%rbp)
  or     -0x14(%rbp),%edx
  mov    %edx,(%rax)
L57:
  mov    -0x54(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x54(%rbp)
  test   %eax,%eax
  jne    L98
  mov    $0x0,%eax
L66:
  pop    %rbp
  ret
```

assistant: ```c
int halfp2singles(void *target, void *source, int numel) {
  uint16_t *hp = (uint16_t *)source;
  uint32_t *xp = (uint32_t *)target;
  uint16_t h, hs, he, hm;
  uint32_t xs, xe, xm;
  int32_t xes;
  int e;
  if (source == NULL || target == NULL)
    return 0;
  while (numel--) {
    h = *hp++;
    if ((h & 0x7FFFu) == 0) {
      *xp++ = ((uint32_t)h) << 16;
    } else {
      hs = h & 0x8000u;
      he = h & 0x7C00u;
      hm = h & 0x03FFu;
      if (he == 0) {
        e = -1;
        do {
          e++;
          hm <<= 1;
        } while ((hm & 0x0400u) == 0);
        xs = ((uint32_t)hs) << 16;
        xes = ((int32_t)(he >> 10)) - 15 + 127 - e;
        xe = (uint32_t)(xes << 23);
        xm = ((uint32_t)(hm & 0x03FFu)) << 13;
        *xp++ = (xs | xe | xm);
      } else if (he == 0x7C00u) {
        if (hm == 0) {
          *xp++ = (((uint32_t)hs) << 16) | ((uint32_t)0x7F800000u);
        } else {
          *xp++ = (uint32_t)0xFFC00000u;
        }
      } else {
        xs = ((uint32_t)hs) << 16;
        xes = ((int32_t)(he >> 10)) - 15 + 127;
        xe = (uint32_t)(xes << 23);
        xm = ((uint32_t)hm) << 13;
        *xp++ = (xs | xe | xm);
      }
    }
  }
  return 0;
}
```