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

```asm
<protobuf_parse>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %rsi,%r12
  mov    %edx,%r15d
  mov    %rcx,%r14
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x10(%rsp)
  movl   $0x0,0x14(%rsp)
  lea    0x10(%rsp),%rdx
  mov    %r15d,%esi
  mov    %r12,%rdi
  call   <protobuf_read_varint@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  sete   %dil
  movzbl %dil,%edi
  mov    $0x0,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L80
  mov    0x10(%rsp),%r13d
  mov    %r13d,%ebp
  and    $0x7,%ebp
  sar    $0x3,%r13d
  mov    %rbx,%rax
  sub    %r12,%rax
  sub    %eax,%r15d
  cmp    $0x2,%ebp
  je     L89
  jg     L41
  test   %ebp,%ebp
  je     L62
  cmp    $0x1,%ebp
  jne    L157
  cmp    $0x3,%r15d
  setbe  %dil
  movzbl %dil,%edi
  mov    $0x0,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L33
  mov    (%rbx),%eax
  mov    %eax,0x14(%rsp)
  add    $0x4,%rbx
  mov    $0x0,%r15d
  jmp    L219
L157:
  mov    $0xffffffff,%ebx
  jmp    L218
L41:
  cmp    $0x5,%ebp
  jne    L193
  cmp    $0x3,%r15d
  setbe  %dil
  movzbl %dil,%edi
  mov    $0x0,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L136
  mov    (%rbx),%eax
  mov    %eax,0x14(%rsp)
  add    $0x4,%rbx
  mov    $0x0,%r15d
  jmp    L219
L193:
  mov    $0xffffffff,%ebx
  jmp    L218
L62:
  lea    0x14(%rsp),%rdx
  mov    %r15d,%esi
  mov    %rbx,%rdi
  call   <protobuf_read_varint@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  sete   %dil
  movzbl %dil,%edi
  mov    $0x0,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L186
  mov    $0x0,%r15d
L219:
  mov    %r15,%r8
  mov    0x14(%rsp),%ecx
  mov    %ebp,%edx
  mov    %r13d,%esi
  mov    0x8(%rsp),%rdi
  call   *%r14
  cmp    $0x1,%eax
  sete   %dil
  movzbl %dil,%edi
  mov    $0x1,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  je     L31
  sub    %r12d,%ebx
L218:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L168
  mov    %ebx,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L89:
  lea    0x14(%rsp),%rdx
  mov    %r15d,%esi
  mov    %rbx,%rdi
  call   <protobuf_read_varint@plt>
  mov    %rax,%r15
  test   %rax,%rax
  sete   %dil
  movzbl %dil,%edi
  mov    $0x0,%esi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L121
  movslq 0x14(%rsp),%rbx
  add    %r15,%rbx
  jmp    L219
L80:
  mov    $0xffffffff,%ebx
  jmp    L218
L186:
  mov    $0xffffffff,%ebx
  jmp    L218
L33:
  mov    $0xffffffff,%ebx
  jmp    L218
L121:
  mov    $0xffffffff,%ebx
  jmp    L218
L136:
  mov    $0xffffffff,%ebx
  jmp    L218
L31:
  mov    $0xffffffff,%ebx
  jmp    L218
L168:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int protobuf_parse(void *param, const char *restrict buf, int size, bool (*cb)(void *param, int field, int wire_type, uint64_t value, const char *restrict extra)) {
  uint64_t key = 0;
  uint64_t value = 0;
  const char *extra = NULL;
  const char *p = protobuf_read_varint(buf, size, &key);
  if (__builtin_expect(!!(p == NULL), 0)) {
    return -1;
  }
  int wire_type = key & 0x07;
  int field = key >> 3;
  size -= (p - buf);
  switch (wire_type) {
  case 0:
    p = protobuf_read_varint(p, size, &value);
    if (__builtin_expect(!!(p == NULL), 0)) {
      return -1;
    };
    break;
  case 1:
    if (__builtin_expect(!!(size < sizeof(uint64_t)), 0)) {
      return -1;
    }
    value = *(uint64_t *)p;
    p += sizeof(uint64_t);
    ;
    break;
  case 2:
    p = protobuf_read_varint(p, size, &value);
    if (__builtin_expect(!!(p == NULL), 0)) {
      return -1;
    };
    extra = p;
    p += value;
    break;
  case 5:
    if (__builtin_expect(!!(size < sizeof(uint32_t)), 0)) {
      return -1;
    }
    value = *(uint32_t *)p;
    p += sizeof(uint32_t);
    ;
    break;
  default:
    return -1;
  }
  return (__builtin_expect(!!(cb(param, field, wire_type, value, extra) == true), 1)) ? p - buf : -1;
}
```