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

```asm
<imcd_float24_decode>:
  endbr64
  mov    %esi,%r11d
  mov    $0x0,%eax
  cmp    $0x2,%esi
  jle    L32
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdx,%rsi
  mov    %ecx,%ebx
  add    $0xc,%rdi
  mov    $0x0,%r9d
  mov    $0x40,%ebp
  mov    $0x80,%r14d
  mov    $0x0,%r13d
  mov    $0xc0,%r12d
  jmp    L86
L130:
  mov    -0xc(%rdi),%r8d
  mov    -0x8(%rdi),%r15d
  mov    -0x4(%rdi),%edx
  jmp    L118
L9:
  or     $0x7f,%r10d
  test   %eax,%eax
  je     L43
  mov    %r13d,%r8d
  mov    $0x0,%eax
  mov    %r12d,%ecx
  jmp    L121
L14:
  mov    $0xffffffff,%edx
L5:
  add    $0x1,%edx
  add    %eax,%eax
  test   $0x10000,%eax
  je     L5
  movzbl %al,%r8d
  movzbl %ah,%eax
  mov    %eax,%r15d
  mov    %ebp,%ecx
  sub    %edx,%ecx
  jmp    L128
L106:
  mov    %ecx,%r8d
  mov    %ecx,%eax
L121:
  mov    %r8d,(%rsi)
  mov    %eax,0x4(%rsi)
  mov    %ecx,0x8(%rsi)
  add    $0x10,%rsi
  mov    %r10d,-0x4(%rsi)
  add    $0x3,%r9d
  add    $0xc,%rdi
  cmp    %r9d,%r11d
  jle    L44
L86:
  cmp    $0x3c,%bl
  je     L130
  mov    -0xc(%rdi),%edx
  mov    -0x8(%rdi),%r15d
  mov    -0x4(%rdi),%r8d
L118:
  mov    %edx,%r10d
  and    $0x80,%r10d
  and    $0x7f,%edx
  mov    %r15d,%eax
  shl    $0x8,%eax
  or     %r8d,%eax
  mov    %edx,%ecx
  or     %eax,%ecx
  je     L106
  cmp    $0x7f,%edx
  je     L9
  lea    0x40(%rdx),%ecx
  test   %edx,%edx
  je     L14
L128:
  mov    %ecx,%eax
  sar    %eax
  or     %eax,%r10d
  shl    $0x7,%ecx
  movzbl %cl,%ecx
  mov    %r15d,%eax
  sar    %eax
  and    $0x7f,%eax
  or     %eax,%ecx
  shl    $0x7,%r15d
  movzbl %r15b,%r15d
  mov    %r8d,%eax
  sar    %eax
  and    $0x7f,%eax
  or     %r15d,%eax
  shl    $0x7,%r8d
  movzbl %r8b,%r8d
  jmp    L121
L43:
  mov    %eax,%r8d
  mov    %r14d,%ecx
  jmp    L121
L44:
  movslq %r11d,%rax
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  sar    $0x1f,%r11d
  sub    %r11d,%eax
  lea    (%rax,%rax,2),%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L32:
  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;
}
```