user: Converte this assembly snippet into its equivalent C code:

```asm
<__emul>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  mov    %rdx,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  call   <__eisnan@plt>
  test   %rax,%rax
  jne    L71
  mov    %rbp,%rdi
  call   <__eisnan@plt>
  test   %rax,%rax
  jne    L34
  mov    %rbx,%rdi
  call   <__eisinf@plt>
  test   %rax,%rax
  je     L187
  mov    %rbp,%rdi
  call   <__eiiszero@plt>
  test   %rax,%rax
  jne    L20
L187:
  mov    %rbp,%rdi
  call   <__eisinf@plt>
  test   %rax,%rax
  je     L53
  mov    %rbx,%rdi
  call   <__eiiszero@plt>
  test   %rax,%rax
  jne    L20
L53:
  mov    %rbx,%rdi
  call   <__eisinf@plt>
  test   %rax,%rax
  jne    L144
  mov    %rbp,%rdi
  call   <__eisinf@plt>
  test   %rax,%rax
  je     L58
L144:
  mov    %rbx,%rdi
  call   <__eisneg@plt>
  mov    %eax,%ebx
  mov    %rbp,%rdi
  call   <__eisneg@plt>
  cmp    %eax,%ebx
  setne  %al
  movzbl %al,%eax
  shl    $0xf,%eax
  mov    %ax,0xa(%r12)
  mov    %r12,%rdi
  call   <__einfin@plt>
  jmp    L48
L71:
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <__emov@plt>
L48:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L121
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L34:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <__emov@plt>
  jmp    L48
L20:
  mov    %r12,%rdi
  call   <__enan_NBITS@plt>
  jmp    L48
L58:
  mov    %rsp,%rsi
  mov    %rbx,%rdi
  call   <__emovi@plt>
  lea    0x20(%rsp),%rsi
  mov    %rbp,%rdi
  call   <__emovi@plt>
  movzwl 0x2(%rsp),%eax
  movzwl 0x22(%rsp),%ebp
  test   %ax,%ax
  je     L181
  movzwl %ax,%ebx
L21:
  movzwl %bp,%ebp
  lea    0x24(%rsp),%rax
  lea    0x30(%rsp),%rdx
  cmpw   $0x0,0x22(%rsp)
  jne    L166
L195:
  cmp    %rdx,%rax
  je     L72
  add    $0x2,%rax
  cmpw   $0x0,-0x2(%rax)
  je     L195
  lea    0x20(%rsp),%rdi
  call   <__enormlz@plt>
  sub    %rax,%rbp
L166:
  lea    0x20(%rsp),%r13
  mov    %rsp,%rdi
  mov    %r13,%rsi
  call   <__emulm@plt>
  mov    %eax,%esi
  lea    -0x3ffe(%rbx,%rbp,1),%rcx
  mov    $0x50,%r9d
  mov    $0x40,%r8d
  mov    $0x0,%edx
  mov    %r13,%rdi
  call   <__emdnorm@plt>
  movzwl 0x20(%rsp),%eax
  cmp    %ax,(%rsp)
  setne  %al
  movzbl %al,%eax
  neg    %eax
  mov    %ax,0x20(%rsp)
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <__emovo@plt>
  jmp    L48
L181:
  lea    0x4(%rsp),%rax
  lea    0x10(%rsp),%rdx
L65:
  cmp    %rdx,%rax
  je     L194
  add    $0x2,%rax
  cmpw   $0x0,-0x2(%rax)
  je     L65
  mov    %rsp,%rdi
  call   <__enormlz@plt>
  neg    %rax
  mov    %rax,%rbx
  jmp    L21
L194:
  mov    %r12,%rdi
  call   <__eclear@plt>
  jmp    L48
L72:
  mov    %r12,%rdi
  call   <__eclear@plt>
  jmp    L48
L121:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void __emul(const short unsigned int *a, const short unsigned int *b, short unsigned int *c) {
  unsigned short ai[(6 + 3)], bi[(6 + 3)];
  int i, j;
  long lt, lta, ltb;
  if (__eisnan(a)) {
    __emov(a, c);
    return;
  }
  if (__eisnan(b)) {
    __emov(b, c);
    return;
  }
  if ((__eisinf(a) && __eiiszero(b)) || (__eisinf(b) && __eiiszero(a))) {
    ;
    __enan_NBITS(c);
    return;
  }
  if (__eisinf(a) || __eisinf(b)) {
    if (__eisneg(a) ^ __eisneg(b))
      *(c + (6 - 1)) = 0x8000;
    else
      *(c + (6 - 1)) = 0;
    __einfin(c);
    return;
  }
  __emovi(a, ai);
  __emovi(b, bi);
  lta = ai[1];
  ltb = bi[1];
  if (ai[1] == 0) {
    for (i = 1; i < (6 + 3) - 1; i++) {
      if (ai[i] != 0) {
        lta -= __enormlz(ai);
        goto mnzer1;
      }
    }
    __eclear(c);
    return;
  }
mnzer1:
  if (bi[1] == 0) {
    for (i = 1; i < (6 + 3) - 1; i++) {
      if (bi[i] != 0) {
        ltb -= __enormlz(bi);
        goto mnzer2;
      }
    }
    __eclear(c);
    return;
  }
mnzer2:
  j = __emulm(ai, bi);
  lt = lta + ltb - ((0x3fff) - 1);
  __emdnorm(bi, j, 0, lt, 64, (((6 + 3) - 4) * 16));
  if (ai[0] == bi[0])
    bi[0] = 0;
  else
    bi[0] = 0xffff;
  __emovo(bi, c);
}
```