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

```asm
<imcd_float24_decode>:
  endbr64
  cmp    $0x2,%esi
  jle    L60
  push   %r12
  mov    %esi,%r10d
  mov    %rdx,%r8
  mov    %ecx,%r11d
  push   %rbp
  xor    %r9d,%r9d
  push   %rbx
  mov    $0x40,%ebx
  jmp    L105
  nopl   0x0(%rax)
L61:
  cmp    $0x7f,%ecx
  je     L7
  lea    0x40(%rcx),%esi
  test   %ecx,%ecx
  je     L47
L87:
  mov    %esi,%eax
  shl    $0x7,%esi
  sar    %eax
  movzbl %sil,%esi
  or     %eax,%r12d
  mov    %ebp,%eax
  shl    $0x7,%ebp
  sar    %eax
  movzbl %bpl,%ebp
  and    $0x7f,%eax
  or     %eax,%esi
  mov    %edx,%eax
  shl    $0x7,%edx
  sar    %eax
  movzbl %dl,%edx
  and    $0x7f,%eax
  movd   %edx,%xmm0
  or     %ebp,%eax
L81:
  movd   %esi,%xmm1
  movd   %eax,%xmm3
  add    $0x10,%r8
  add    $0x3,%r9d
  movd   %r12d,%xmm2
  punpckldq %xmm3,%xmm0
  punpckldq %xmm2,%xmm1
  punpcklqdq %xmm1,%xmm0
  movups %xmm0,-0x10(%r8)
  cmp    %r9d,%r10d
  jle    L110
L105:
  mov    (%rdi),%ecx
  mov    0x4(%rdi),%ebp
  add    $0xc,%rdi
  mov    -0x4(%rdi),%edx
  cmp    $0x3c,%r11b
  jne    L115
  mov    %ecx,%eax
  mov    %edx,%ecx
  mov    %eax,%edx
L115:
  mov    %ebp,%eax
  mov    %ecx,%r12d
  and    $0x7f,%ecx
  shl    $0x8,%eax
  mov    %ecx,%esi
  and    $0x80,%r12d
  or     %edx,%eax
  or     %eax,%esi
  jne    L61
  pxor   %xmm0,%xmm0
  xor    %eax,%eax
  jmp    L81
  cs nopw 0x0(%rax,%rax,1)
L7:
  or     $0x7f,%r12d
  pxor   %xmm0,%xmm0
  mov    $0x80,%esi
  test   %eax,%eax
  je     L81
  xor    %eax,%eax
  mov    $0xc0,%esi
  jmp    L81
  nopl   0x0(%rax)
L110:
  movslq %r10d,%rax
  sar    $0x1f,%r10d
  pop    %rbx
  pop    %rbp
  imul   $0x55555556,%rax,%rax
  pop    %r12
  shr    $0x20,%rax
  sub    %r10d,%eax
  lea    (%rax,%rax,2),%eax
  ret
  nopl   (%rax)
L47:
  mov    $0xffffffff,%ecx
  nopl   (%rax)
L67:
  add    %eax,%eax
  add    $0x1,%ecx
  test   $0x10000,%eax
  je     L67
  mov    %ebx,%esi
  movzbl %al,%edx
  movzbl %ah,%ebp
  sub    %ecx,%esi
  jmp    L87
  nopl   0x0(%rax,%rax,1)
L60:
  xor    %eax,%eax
  ret
```

assistant: ```c
ssize_t imcd_float24_decode(const uint8_t *src, const ssize_t srcsize, uint8_t *dst, const char byteorder) {
  ssize_t i;
  uint8_t s0, s1, s2, f0, f1, f2, f3;
  uint8_t sign = 0;
  uint8_t exponent = 0;
  uint32_t mantissa = 0;
  if (srcsize < 3) {
    return 0;
  }
  for (i = 0; i < srcsize; i += 3) {
    if (byteorder == '<') {
      s2 = *src++;
      s1 = *src++;
      s0 = *src++;
    } else {
      s0 = *src++;
      s1 = *src++;
      s2 = *src++;
    }
    sign = s0 & 0x80;
    exponent = s0 & 0x7F;
    mantissa = s1;
    mantissa <<= 8;
    mantissa |= s2;
    f0 = sign;
    if ((exponent == 0) & (mantissa == 0)) {
      f1 = 0;
      f2 = 0;
      f3 = 0;
    } else if (exponent == 0x7F) {
      f0 |= 0x7F;
      f1 = (mantissa == 0) ? 0x80 : 0xC0;
      f2 = 0;
      f3 = 0;
    } else {
      if (exponent == 0) {
        int shift = -1;
        do {
          shift++;
          mantissa <<= 1;
        } while ((mantissa & 0x10000) == 0);
        s2 = mantissa & 0xFF;
        s1 = (mantissa >> 8) & 0xFF;
        exponent = exponent - 63 + 127 - shift;
      } else {
        exponent = exponent - 63 + 127;
      }
      f0 |= exponent >> 1;
      f1 = ((exponent & 0x01) << 7) | ((s1 & 0xFE) >> 1);
      f2 = ((s1 & 0x01) << 7) | ((s2 & 0xFE) >> 1);
      f3 = (s2 & 0x01) << 7;
    }
    *dst++ = f3;
    *dst++ = f2;
    *dst++ = f1;
    *dst++ = f0;
  }
  return (srcsize / 3) * 3;
}
```