user: Translate the below assembly code into C programming language:

```asm
<runor>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x4000(%rsp),%r11
L118:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L118
  sub    $0x10,%rsp
  mov    $0x1,%r10d
  mov    %fs:0x28,%rax
  mov    %rax,0x4008(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r14
  test   %r8,%r8
  mov    %rdi,%rbx
  cmove  %r14,%r8
  xor    %eax,%eax
  mov    %esi,%ebp
  movzwl (%rdi),%esi
  movzwl (%rdx),%edi
  mov    %rdx,%r12
  mov    %ecx,%r13d
  xor    %r11d,%r11d
  mov    %ax,(%r8)
  xor    %ecx,%ecx
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L83:
  mov    %edx,%eax
  or     %ecx,%eax
  xor    %r11d,%eax
  and    $0x1,%eax
  cmp    %di,%si
  jg     L38
L178:
  test   %eax,%eax
  je     L238
  movslq %r10d,%rax
  add    $0x1,%edx
  mov    %r10d,%r11d
  sub    %esi,%edi
  mov    %si,(%r8,%rax,2)
  add    $0x1,%r10d
  cmp    %ebp,%edx
  jge    L14
L109:
  movslq %edx,%rax
  movzwl (%rbx,%rax,2),%esi
  mov    %edx,%eax
  or     %ecx,%eax
  xor    %r11d,%eax
  and    $0x1,%eax
  cmp    %di,%si
  jle    L178
L38:
  test   %eax,%eax
  je     L136
  movslq %r10d,%rax
  add    $0x1,%ecx
  mov    %r10d,%r11d
  sub    %edi,%esi
  mov    %di,(%r8,%rax,2)
  add    $0x1,%r10d
  cmp    %r13d,%ecx
  jge    L7
L99:
  movslq %ecx,%rax
  movzwl (%r12,%rax,2),%edi
  jmp    L83
L238:
  movslq %r11d,%rax
  add    $0x1,%edx
  sub    %esi,%edi
  add    %si,(%r8,%rax,2)
  cmp    %ebp,%edx
  jl     L109
L14:
  movslq %ecx,%rcx
  jmp    L13
  cs nopw 0x0(%rax,%rax,1)
L94:
  movslq %r10d,%rax
  add    $0x1,%rcx
  mov    %r10d,%r11d
  add    $0x1,%r10d
  mov    %di,(%r8,%rax,2)
  cmp    %ecx,%r13d
  jle    L138
L185:
  movzwl (%r12,%rcx,2),%edi
L13:
  mov    %r11d,%eax
  xor    %ecx,%eax
  test   $0x1,%al
  jne    L94
  movslq %r11d,%rax
  add    $0x1,%rcx
  add    %di,(%r8,%rax,2)
  cmp    %ecx,%r13d
  jg     L185
L138:
  xor    %ecx,%ecx
  cmp    %r14,%r8
  je     L73
L98:
  test   %r9,%r9
  je     L45
  mov    %ecx,(%r9)
L45:
  mov    0x4008(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L224
  add    $0x4010,%rsp
  mov    %r10d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L136:
  movslq %r11d,%rax
  add    $0x1,%ecx
  sub    %edi,%esi
  add    %di,(%r8,%rax,2)
  cmp    %r13d,%ecx
  jl     L99
L7:
  cmp    %ebp,%edx
  jge    L14
  movslq %edx,%rdx
  jmp    L200
  nopl   0x0(%rax,%rax,1)
L86:
  movslq %r10d,%rax
  mov    %r10d,%r11d
  add    $0x1,%r10d
  mov    %si,(%r8,%rax,2)
L43:
  add    $0x1,%rdx
  cmp    %edx,%ebp
  jle    L138
  movzwl (%rbx,%rdx,2),%esi
L200:
  mov    %r11d,%eax
  xor    %edx,%eax
  test   $0x1,%al
  jne    L86
  movslq %r11d,%rax
  add    %si,(%r8,%rax,2)
  jmp    L43
  xchg   %ax,%ax
L73:
  lea    0x2(%rax,%rax,1),%rsi
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L46:
  movswl (%r14,%rax,1),%edx
  mov    %dx,(%rbx,%rax,1)
  add    $0x2,%rax
  add    %edx,%ecx
  cmp    %rax,%rsi
  jne    L46
  jmp    L98
L224:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int runor(short *a, int na, short *b, int nb, short *c, int *pels) {
  register short la, lb;
  int ia, ib, ic, np = 0;
  short tmp[8192];
  if (!c)
    c = tmp;
  la = a[ia = 0];
  lb = b[ib = 0];
  c[ic = 0] = 0;
  while (1) {
    if (la <= lb) {
      if (((ia | ib) ^ ic) & 1)
        c[++ic] = la;
      else
        c[ic] += la;
      lb -= la;
      if (++ia >= na)
        break;
      la = a[ia];
    } else {
      if (((ia | ib) ^ ic) & 1)
        c[++ic] = lb;
      else
        c[ic] += lb;
      la -= lb;
      if (++ib >= nb)
        break;
      lb = b[ib];
    }
  }
  if (ia < na)
    while (1) {
      if ((ia ^ ic) & 1)
        c[++ic] = la;
      else
        c[ic] += la;
      if (++ia >= na)
        break;
      la = a[ia];
    }
  else
    while (1) {
      if ((ib ^ ic) & 1)
        c[++ic] = lb;
      else
        c[ic] += lb;
      if (++ib >= nb)
        break;
      lb = b[ib];
    }
  if (c == tmp)
    for (ia = 0; ia <= ic; ia++)
      np += a[ia] = c[ia];
  if (pels)
    *pels = np;
  return ic + 1;
}
```