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

```asm
<mskbits>:
  endbr64
  push   %rbx
  mov    %rsi,%rcx
  mov    %rdx,%rsi
  mov    (%rdi),%edx
  mov    %edx,%eax
  test   %dx,%dx
  je     L130
  and    $0x1,%edx
  jne    L79
  nopl   (%rax)
L210:
  shr    %ax
  test   $0x1,%al
  je     L210
L79:
  mov    %eax,%edx
  shr    %ax
  mov    %eax,%r11d
  and    $0x1,%edx
  and    $0x1,%r11d
  cmp    %edx,%r11d
  je     L256
  mov    %eax,%r9d
  mov    $0x1,%edi
  mov    $0x1,%edx
  movl   $0x1,(%rcx)
  shr    %r9w
  mov    $0xf,%r8d
  mov    $0x1,%r10d
  and    $0x1,%r9d
  cmp    %r11d,%r9d
  je     L157
L351:
  mov    %edx,(%rcx,%r10,4)
  lea    0x1(%r10),%r11d
  mov    $0x1,%edx
L93:
  mov    %eax,%r10d
  shr    $0x2,%r10w
  and    $0x1,%r10d
  cmp    %r10d,%r9d
  je     L265
  lea    0x1(%r11),%ebx
  movslq %r11d,%r11
  mov    %edx,(%rcx,%r11,4)
  mov    $0x1,%edx
L105:
  mov    %eax,%r9d
  shr    $0x3,%r9w
  and    $0x1,%r9d
  cmp    %r9d,%r10d
  je     L297
  lea    0x1(%rbx),%r11d
  movslq %ebx,%rbx
  mov    %edx,(%rcx,%rbx,4)
  mov    $0x1,%edx
L16:
  mov    %eax,%r10d
  shr    $0x4,%r10w
  and    $0x1,%r10d
  cmp    %r10d,%r9d
  je     L235
  lea    0x1(%r11),%ebx
  movslq %r11d,%r11
  mov    %edx,(%rcx,%r11,4)
  mov    $0x1,%edx
L137:
  mov    %eax,%r9d
  shr    $0x5,%r9w
  and    $0x1,%r9d
  cmp    %r9d,%r10d
  je     L358
  lea    0x1(%rbx),%r11d
  movslq %ebx,%rbx
  mov    %edx,(%rcx,%rbx,4)
  mov    $0x1,%edx
L81:
  mov    %eax,%r10d
  shr    $0x6,%r10w
  and    $0x1,%r10d
  cmp    %r10d,%r9d
  je     L123
  lea    0x1(%r11),%ebx
  movslq %r11d,%r11
  mov    %edx,(%rcx,%r11,4)
  mov    $0x1,%edx
L139:
  mov    %eax,%r9d
  shr    $0x7,%r9w
  and    $0x1,%r9d
  cmp    %r9d,%r10d
  je     L19
  lea    0x1(%rbx),%r11d
  movslq %ebx,%rbx
  mov    %edx,(%rcx,%rbx,4)
  mov    $0x1,%edx
L254:
  mov    %eax,%r10d
  shr    $0x8,%r10w
  and    $0x1,%r10d
  cmp    %r10d,%r9d
  je     L201
  lea    0x1(%r11),%ebx
  movslq %r11d,%r11
  mov    %edx,(%rcx,%r11,4)
  mov    $0x1,%edx
L66:
  mov    %eax,%r9d
  shr    $0x9,%r9w
  and    $0x1,%r9d
  cmp    %r9d,%r10d
  je     L117
  lea    0x1(%rbx),%r11d
  movslq %ebx,%rbx
  mov    %edx,(%rcx,%rbx,4)
  mov    $0x1,%edx
L49:
  mov    %eax,%r10d
  shr    $0xa,%r10w
  and    $0x1,%r10d
  cmp    %r10d,%r9d
  je     L248
  lea    0x1(%r11),%ebx
  movslq %r11d,%r11
  mov    %edx,(%rcx,%r11,4)
  mov    $0x1,%edx
L293:
  mov    %eax,%r9d
  shr    $0xb,%r9w
  and    $0x1,%r9d
  cmp    %r9d,%r10d
  je     L170
  lea    0x1(%rbx),%r11d
  movslq %ebx,%rbx
  mov    %edx,(%rcx,%rbx,4)
  mov    $0x1,%edx
L275:
  mov    %eax,%r10d
  shr    $0xc,%r10w
  and    $0x1,%r10d
  cmp    %r10d,%r9d
  je     L199
  lea    0x1(%r11),%ebx
  movslq %r11d,%r11
  mov    %edx,(%rcx,%r11,4)
  mov    $0x1,%edx
L21:
  mov    %eax,%r9d
  shr    $0xd,%r9w
  and    $0x1,%r9d
  cmp    %r9d,%r10d
  je     L200
  lea    0x1(%rbx),%r10d
  movslq %ebx,%rbx
  mov    %edx,(%rcx,%rbx,4)
  mov    $0x1,%edx
L250:
  shr    $0xe,%ax
  cmp    $0x10,%r8d
  jne    L193
  movzwl %ax,%eax
  cmp    %r9d,%eax
  je     L185
  lea    0x1(%r10),%r9d
  movslq %r10d,%r10
  mov    %edx,(%rcx,%r10,4)
  mov    $0x1,%edx
L141:
  movslq %r9d,%r8
  lea    0x1(%r9),%r10d
  shl    $0x2,%r8
  lea    (%rcx,%r8,1),%r11
  cmp    $0x1,%eax
  je     L325
  add    %edi,%edx
  mov    %edx,(%r11)
L344:
  mov    %r10d,(%rsi)
  pop    %rbx
  ret
  xchg   %ax,%ax
L130:
  movl   $0x0,(%rsi)
  xor    %edi,%edi
  mov    $0x10,%r8d
  xor    %r11d,%r11d
L364:
  mov    %eax,%r9d
  mov    $0x2,%edx
  xor    %r10d,%r10d
  shr    %r9w
  and    $0x1,%r9d
  cmp    %r11d,%r9d
  jne    L351
L157:
  add    $0x1,%edx
  mov    %r10d,%r11d
  jmp    L93
  nopl   0x0(%rax,%rax,1)
L297:
  add    $0x1,%edx
  mov    %ebx,%r11d
  jmp    L16
  nopl   0x0(%rax,%rax,1)
L265:
  add    $0x1,%edx
  mov    %r11d,%ebx
  jmp    L105
  nopl   0x0(%rax,%rax,1)
L170:
  add    $0x1,%edx
  mov    %ebx,%r11d
  jmp    L275
  nopl   0x0(%rax,%rax,1)
L325:
  mov    %edx,(%r11)
  cmp    $0x1,%edi
  jne    L344
  movl   $0x1,0x4(%rcx,%r8,1)
  lea    0x2(%r9),%r10d
  pop    %rbx
  mov    %r10d,(%rsi)
  ret
  xchg   %ax,%ax
L235:
  add    $0x1,%edx
  mov    %r11d,%ebx
  jmp    L137
  nopl   0x0(%rax,%rax,1)
L358:
  add    $0x1,%edx
  mov    %ebx,%r11d
  jmp    L81
  nopl   0x0(%rax,%rax,1)
L123:
  add    $0x1,%edx
  mov    %r11d,%ebx
  jmp    L139
  nopl   0x0(%rax,%rax,1)
L19:
  add    $0x1,%edx
  mov    %ebx,%r11d
  jmp    L254
  nopl   0x0(%rax,%rax,1)
L201:
  add    $0x1,%edx
  mov    %r11d,%ebx
  jmp    L66
  nopl   0x0(%rax,%rax,1)
L117:
  add    $0x1,%edx
  mov    %ebx,%r11d
  jmp    L49
  nopl   0x0(%rax,%rax,1)
L248:
  add    $0x1,%edx
  mov    %r11d,%ebx
  jmp    L293
L199:
  add    $0x1,%edx
  mov    %r11d,%ebx
  jmp    L21
L200:
  add    $0x1,%edx
  mov    %ebx,%r10d
  jmp    L250
L185:
  add    $0x1,%edx
  mov    %r10d,%r9d
  jmp    L141
L193:
  mov    %r9d,%eax
  mov    %r10d,%r9d
  jmp    L141
L256:
  mov    $0x1,%edi
  mov    $0xf,%r8d
  jmp    L364
```

assistant: ```c
void mskbits(int *mask, int *ibits, int *ndash) {
  int i, ic, ibit, ibitold;
  int nbits, nshft;
  unsigned short lmask;
  lmask = *mask;
  nshft = ibitold = 0;
  if (lmask != 0) {
    while (!(ibitold = (lmask & 0x01)))
      lmask >>= 1;
    nshft++;
  }
  if (ibitold == 0) {
    *ndash = 0;
    exit;
  }
  nbits = ic = ibit = 0;
  for (i = 0; i < (16 - nshft); ++i) {
    ibit = (lmask & 0x01);
    if (ibit != ibitold) {
      ibits[ic++] = nbits;
      nbits = 0;
    }
    ibitold = ibit;
    nbits++;
    lmask >>= 1;
  }
  if (ibit == 1) {
    ibits[ic++] = nbits;
    if (nshft > 0)
      ibits[ic++] = nshft;
  } else
    ibits[ic++] = nbits + nshft;
  *ndash = ic;
}
```