user: What would the C source look like for the assembly code provided here:

```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    L241
  cmpl   $0x7ffe,-0x54(%rbp)
  jg     L241
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <__ecleazs@plt>
  jmp    L131
L241:
  cmpl   $0x0,-0x54(%rbp)
  jns    L228
  cmpl   $0xffffffb0,-0x54(%rbp)
  jl     L233
  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     L228
  movl   $0x1,-0x4c(%rbp)
  jmp    L228
L233:
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <__ecleazs@plt>
  jmp    L131
L228:
  cmpl   $0x0,-0x58(%rbp)
  je     L271
  cmpl   $0x40,-0x5c(%rbp)
  jne    L313
  movl   $0x7,-0x2c(%rbp)
  movl   $0x6,-0x28(%rbp)
  movw   $0x0,-0x12(%rbp)
  movw   $0x1,-0x14(%rbp)
L313:
  cmpl   $0x0,-0x54(%rbp)
  jg     L356
  cmpl   $0x50,-0x5c(%rbp)
  je     L356
  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>
L356:
  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     L235
  mov    -0x2c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x30(%rbp)
  jmp    L217
L268:
  mov    -0x30(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  test   %ax,%ax
  je     L36
  orw    $0x1,-0x36(%rbp)
L36:
  mov    -0x30(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movw   $0x0,(%rax)
  addl   $0x1,-0x30(%rbp)
L217:
  cmpl   $0x8,-0x30(%rbp)
  jle    L268
L235:
  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     L293
  movzwl -0x36(%rbp),%eax
  cmp    -0x32(%rbp),%ax
  jne    L148
  cmpl   $0x0,-0x4c(%rbp)
  jne    L105
  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    L148
  jmp    L351
L105:
  cmpl   $0x0,-0x50(%rbp)
  jne    L39
L148:
  mov    -0x48(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <__eaddm@plt>
  jmp    L351
L293:
  nop
  jmp    L351
L39:
  nop
L351:
  cmpl   $0x0,-0x54(%rbp)
  jg     L29
  cmpl   $0x50,-0x5c(%rbp)
  je     L29
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <__eshup1@plt>
L29:
  mov    -0x48(%rbp),%rax
  add    $0x4,%rax
  movzwl (%rax),%eax
  test   %ax,%ax
  je     L166
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <__eshdn1@plt>
  addl   $0x1,-0x54(%rbp)
  jmp    L76
L271:
  nop
  jmp    L76
L166:
  nop
L76:
  mov    -0x48(%rbp),%rax
  add    $0x10,%rax
  movw   $0x0,(%rax)
  cmpl   $0x7ffe,-0x54(%rbp)
  jle    L48
  mov    -0x48(%rbp),%rax
  add    $0x2,%rax
  movw   $0x7fff,(%rax)
  movl   $0x2,-0x30(%rbp)
  jmp    L311
L3:
  mov    -0x30(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movw   $0x0,(%rax)
  addl   $0x1,-0x30(%rbp)
L311:
  cmpl   $0x7,-0x30(%rbp)
  jle    L3
  jmp    L131
L48:
  cmpl   $0x0,-0x54(%rbp)
  jns    L347
  mov    -0x48(%rbp),%rax
  add    $0x2,%rax
  movw   $0x0,(%rax)
  jmp    L131
L347:
  mov    -0x48(%rbp),%rax
  add    $0x2,%rax
  mov    -0x54(%rbp),%edx
  mov    %dx,(%rax)
L131:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L227
  call   <__stack_chk_fail@plt>
L227:
  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 < 32767)) {
    __ecleazs(s);
    return;
  }
  if (expo < 0) {
    if (expo > (-(((6 + 3) - 4) * 16) - 1)) {
      j = 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 >= 32767) {
    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;
}
```