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

```asm
<ceph_unarmor>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L41
L134:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L7
  addq   $0x1,-0x30(%rbp)
  jmp    L41
L7:
  mov    -0x30(%rbp),%rax
  add    $0x4,%rax
  cmp    %rax,-0x38(%rbp)
  jae    L35
  mov    D16(%rip),%rax
  mov    (%rax),%eax
  neg    %eax
  jmp    L101
L35:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <decode_bits@plt>
  mov    %eax,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <decode_bits@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0x30(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <decode_bits@plt>
  mov    %eax,-0x8(%rbp)
  mov    -0x30(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <decode_bits@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x10(%rbp)
  js     L45
  cmpl   $0x0,-0xc(%rbp)
  js     L45
  cmpl   $0x0,-0x8(%rbp)
  js     L45
  cmpl   $0x0,-0x4(%rbp)
  jns    L143
L45:
  mov    D16(%rip),%rax
  mov    (%rax),%eax
  neg    %eax
  jmp    L101
L143:
  mov    -0x10(%rbp),%eax
  shl    $0x2,%eax
  mov    %eax,%esi
  mov    -0xc(%rbp),%eax
  sar    $0x4,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  or     %ecx,%esi
  mov    %esi,%edx
  mov    %dl,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  jne    L144
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  jmp    L101
L144:
  mov    -0xc(%rbp),%eax
  shl    $0x4,%eax
  mov    %eax,%esi
  mov    -0x8(%rbp),%eax
  sar    $0x2,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  or     %ecx,%esi
  mov    %esi,%edx
  mov    %dl,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  jne    L90
  mov    -0x14(%rbp),%eax
  add    $0x2,%eax
  jmp    L101
L90:
  mov    -0x8(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%esi
  mov    -0x4(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %esi,%edx
  or     %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x3,-0x14(%rbp)
  addq   $0x4,-0x30(%rbp)
L41:
  mov    -0x30(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jb     L134
  mov    -0x14(%rbp),%eax
L101:
  leave
  ret
```

assistant: ```c
int ceph_unarmor(char *dst, const char *src, const char *end) {
  int olen = 0;
  while (src < end) {
    int a, b, c, d;
    if (src[0] == '\n') {
      src++;
      continue;
    }
    if (src + 4 > end)
      return -EINVAL;
    a = decode_bits(src[0]);
    b = decode_bits(src[1]);
    c = decode_bits(src[2]);
    d = decode_bits(src[3]);
    if (a < 0 || b < 0 || c < 0 || d < 0)
      return -EINVAL;
    *dst++ = (a << 2) | (b >> 4);
    if (src[2] == '=')
      return olen + 1;
    *dst++ = ((b & 15) << 4) | (c >> 2);
    if (src[3] == '=')
      return olen + 2;
    *dst++ = ((c & 3) << 6) | d;
    olen += 3;
    src += 4;
  }
  return olen;
}
```