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

```asm
<find_next_bit>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    -0x38(%rbp),%rax
  shr    $0x6,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x38(%rbp),%rax
  and    $0xffffffffffffffc0,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jb     L2
  mov    -0x30(%rbp),%rax
  jmp    L117
L2:
  mov    -0x10(%rbp),%rax
  sub    %rax,-0x30(%rbp)
  andq   $0x3f,-0x38(%rbp)
  cmpq   $0x0,-0x38(%rbp)
  je     L97
  mov    -0x18(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x38(%rbp),%rax
  mov    $0xffffffffffffffff,%rdx
  mov    %eax,%ecx
  shl    %cl,%rdx
  mov    %rdx,%rax
  and    %rax,-0x8(%rbp)
  cmpq   $0x3f,-0x30(%rbp)
  jbe    L112
  cmpq   $0x0,-0x8(%rbp)
  jne    L88
  subq   $0x40,-0x30(%rbp)
  addq   $0x40,-0x10(%rbp)
  jmp    L97
L18:
  mov    -0x18(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L36
  addq   $0x40,-0x10(%rbp)
  subq   $0x40,-0x30(%rbp)
L97:
  mov    -0x30(%rbp),%rax
  and    $0xffffffffffffffc0,%rax
  test   %rax,%rax
  jne    L18
  cmpq   $0x0,-0x30(%rbp)
  jne    L30
  mov    -0x10(%rbp),%rax
  jmp    L117
L30:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L47
L112:
  nop
L47:
  mov    -0x30(%rbp),%rax
  mov    %eax,%edx
  mov    $0x40,%eax
  sub    %edx,%eax
  mov    $0xffffffffffffffff,%rdx
  mov    %eax,%ecx
  shr    %cl,%rdx
  mov    %rdx,%rax
  and    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L78
  mov    -0x10(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  jmp    L117
L88:
  nop
  jmp    L40
L36:
  nop
  jmp    L40
L78:
  nop
L40:
  mov    -0x8(%rbp),%rax
  mov    $0xffffffffffffffff,%rdx
  bsf    %rax,%rax
  cmove  %rdx,%rax
  add    $0x1,%rax
  sub    $0x1,%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
L117:
  pop    %rbp
  ret
```

assistant: ```c
unsigned long find_next_bit(const unsigned long *addr, unsigned long size, unsigned long offset) {
  const unsigned long *p = addr + ((offset) / ((int)((sizeof(long) * 8))));
  unsigned long result = offset & ~(((int)((sizeof(long) * 8))) - 1);
  unsigned long tmp;
  if (offset >= size)
    return size;
  size -= result;
  offset %= ((int)((sizeof(long) * 8)));
  if (offset) {
    tmp = *(p++);
    tmp &= (~0UL << offset);
    if (size < ((int)((sizeof(long) * 8))))
      goto found_first;
    if (tmp)
      goto found_middle;
    size -= ((int)((sizeof(long) * 8)));
    result += ((int)((sizeof(long) * 8)));
  }
  while (size & ~(((int)((sizeof(long) * 8))) - 1)) {
    if ((tmp = *(p++)))
      goto found_middle;
    result += ((int)((sizeof(long) * 8)));
    size -= ((int)((sizeof(long) * 8)));
  }
  if (!size)
    return result;
  tmp = *p;
found_first:
  tmp &= (~0UL >> (((int)((sizeof(long) * 8))) - size));
  if (tmp == 0UL)
    return result + size;
found_middle:
  return result + (__builtin_ffsl(tmp) - 1);
}
```