user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<__emdnorm>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  mov    %ecx,-0x54(%rbp)
  mov    %r8d,-0x58(%rbp)
  mov    %r9d,-0x5c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x8,-0x2c(%rbp)
  movl   $0x7,-0x28(%rbp)
  movw   $0xffff,-0x34(%rbp)
  movw   $0x8000,-0x32(%rbp)
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  movw   $0x0,-0x10(%rbp)
  movw   $0x1,-0x12(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <__enormlz@plt>
  mov    %eax,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  sub    %eax,-0x54(%rbp)
  cmpl   $0x50,-0x24(%rbp)
  jle    L99
  cmpl   $0x7ffe,-0x54(%rbp)
  jg     L99
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <__ecleazs@plt>
  jmp    L102
L99:
  cmpl   $0x0,-0x54(%rbp)
  jns    L261
  cmpl   $0xffffffb0,-0x54(%rbp)
  jl     L144
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x24(%rbp),%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <__eshift@plt>
  mov    %eax,-0x30(%rbp)
  cmpl   $0x0,-0x30(%rbp)
  je     L261
  movl   $0x1,-0x4c(%rbp)
  jmp    L261
L144:
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <__ecleazs@plt>
  jmp    L102
L261:
  cmpl   $0x0,-0x58(%rbp)
  je     L22
  cmpl   $0x40,-0x5c(%rbp)
  jne    L25
  movl   $0x7,-0x2c(%rbp)
  movl   $0x6,-0x28(%rbp)
  movw   $0x0,-0x12(%rbp)
  movw   $0x1,-0x14(%rbp)
L25:
  cmpl   $0x0,-0x54(%rbp)
  jg     L245
  cmpl   $0x50,-0x5c(%rbp)
  je     L245
  mov    -0x48(%rbp),%rax
  add    $0x10,%rax
  movzwl (%rax),%eax
  movzwl %ax,%eax
  and    $0x1,%eax
  or     %eax,-0x4c(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <__eshdn1@plt>
L245:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  and    -0x34(%rbp),%ax
  mov    %ax,-0x36(%rbp)
  cmpl   $0x4f,-0x5c(%rbp)
  jg     L229
  mov    -0x2c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x30(%rbp)
  jmp    L181
L54:
  mov    -0x30(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  test   %ax,%ax
  je     L244
  orw    $0x1,-0x36(%rbp)
L244:
  mov    -0x30(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movw   $0x0,(%rax)
  addl   $0x1,-0x30(%rbp)
L181:
  cmpl   $0x8,-0x30(%rbp)
  jle    L54
L229:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%edx
  movzwl -0x34(%rbp),%eax
  not    %eax
  mov    %eax,%ecx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rsi
  mov    -0x48(%rbp),%rax
  add    %rsi,%rax
  and    %ecx,%edx
  mov    %dx,(%rax)
  movzwl -0x36(%rbp),%eax
  and    -0x32(%rbp),%ax
  test   %ax,%ax
  je     L310
  movzwl -0x36(%rbp),%eax
  cmp    -0x32(%rbp),%ax
  jne    L191
  cmpl   $0x0,-0x4c(%rbp)
  jne    L95
  mov    -0x28(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  movzwl %ax,%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L191
  jmp    L13
L95:
  cmpl   $0x0,-0x50(%rbp)
  jne    L186
L191:
  mov    -0x48(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <__eaddm@plt>
  jmp    L13
L310:
  nop
  jmp    L13
L186:
  nop
L13:
  cmpl   $0x0,-0x54(%rbp)
  jg     L273
  cmpl   $0x50,-0x5c(%rbp)
  je     L273
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <__eshup1@plt>
L273:
  mov    -0x48(%rbp),%rax
  add    $0x4,%rax
  movzwl (%rax),%eax
  test   %ax,%ax
  je     L51
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <__eshdn1@plt>
  addl   $0x1,-0x54(%rbp)
  jmp    L230
L22:
  nop
  jmp    L230
L51:
  nop
L230:
  mov    -0x48(%rbp),%rax
  add    $0x10,%rax
  movw   $0x0,(%rax)
  cmpl   $0x7ffe,-0x54(%rbp)
  jle    L78
  mov    -0x48(%rbp),%rax
  add    $0x2,%rax
  movw   $0x7fff,(%rax)
  movl   $0x2,-0x30(%rbp)
  jmp    L211
L12:
  mov    -0x30(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movw   $0x0,(%rax)
  addl   $0x1,-0x30(%rbp)
L211:
  cmpl   $0x7,-0x30(%rbp)
  jle    L12
  jmp    L102
L78:
  cmpl   $0x0,-0x54(%rbp)
  jns    L287
  mov    -0x48(%rbp),%rax
  add    $0x2,%rax
  movw   $0x0,(%rax)
  jmp    L102
L287:
  mov    -0x48(%rbp),%rax
  add    $0x2,%rax
  mov    -0x54(%rbp),%edx
  mov    %dx,(%rax)
L102:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L15
  call   <__stack_chk_fail@plt>
L15:
  leave
  ret
```

assistant: ```c
void __emdnorm(short unsigned int *s, int lost, int subflg, int expo, int rcntrl, int rndprc) {
  int i, j;
  unsigned short r;
  int rw = (6 + 3) - 1;
  int re = (6 + 3) - 2;
  const unsigned short rmsk = 0xffff;
  const unsigned short rmbit = 0x8000;
  unsigned short rbit[(6 + 3)] = {0, 0, 0, 0, 0, 0, 0, 1, 0};
  j = __enormlz(s);
  expo -= j;
  if ((j > (((6 + 3) - 4) * 16)) && (expo < 32767L)) {
    __ecleazs(s);
    return;
  }
  if (expo < 0L) {
    if (expo > (long)(-(((6 + 3) - 4) * 16) - 1)) {
      j = (int)expo;
      i = __eshift(s, j);
      if (i)
        lost = 1;
    } else {
      __ecleazs(s);
      return;
    }
  }
  if (rcntrl == 0)
    goto mdfin;
  if (rndprc == 64) {
    rw = 7;
    re = 6;
    rbit[(6 + 3) - 2] = 0;
    rbit[6] = 1;
  }
  if ((expo <= 0) && (rndprc != (((6 + 3) - 4) * 16))) {
    lost |= s[(6 + 3) - 1] & 1;
    __eshdn1(s);
  }
  r = s[rw] & rmsk;
  if (rndprc < (((6 + 3) - 4) * 16)) {
    i = rw + 1;
    while (i < (6 + 3)) {
      if (s[i])
        r |= 1;
      s[i] = 0;
      ++i;
    }
  }
  s[rw] &= (rmsk ^ 0xffff);
  if ((r & rmbit) != 0) {
    if (r == rmbit) {
      if (lost == 0) {
        if ((s[re] & 1) == 0)
          goto mddone;
      } else {
        if (subflg != 0)
          goto mddone;
      }
    }
    __eaddm(rbit, s);
  }
mddone:
  if ((expo <= 0) && (rndprc != (((6 + 3) - 4) * 16))) {
    __eshup1(s);
  }
  if (s[2] != 0) {
    __eshdn1(s);
    expo += 1;
  }
mdfin:
  s[(6 + 3) - 1] = 0;
  if (expo >= 32767L) {
    s[1] = 32767;
    for (i = 2; i < (6 + 3) - 1; i++)
      s[i] = 0;
    return;
  }
  if (expo < 0)
    s[1] = 0;
  else
    s[1] = (unsigned short)expo;
}
```