user: What is the c source code of the assembly code below?

```asm
<cdb_seek>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %edi,%ebx
  mov    %rsi,%rdi
  mov    %rsi,0x18(%rsp)
  mov    %edx,0x20(%rsp)
  mov    %rcx,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  mov    %edx,%esi
  call   <cdb_hash@plt>
  mov    %eax,%r14d
  lea    0x0(,%rax,8),%esi
  and    $0x7f8,%esi
  mov    $0x0,%edx
  mov    %ebx,%edi
  call   <lseek@plt>
  mov    %rax,%rdx
  mov    $0xffffffff,%eax
  test   %rdx,%rdx
  js     L274
  lea    0x30(%rsp),%rsi
  mov    $0x8,%edx
  mov    %ebx,%edi
  call   <cdb_bread@plt>
  mov    %rax,%rdx
  mov    $0xffffffff,%eax
  test   %rdx,%rdx
  js     L274
  lea    0x34(%rsp),%rdi
  call   <cdb_unpack@plt>
  mov    %eax,%r15d
  mov    %eax,0xc(%rsp)
  mov    $0x0,%eax
  test   %r15d,%r15d
  jne    L173
L274:
  mov    0x78(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L45
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L173:
  mov    %r14d,%eax
  shr    $0x8,%eax
  mov    $0x0,%edx
  div    %r15d
  mov    %edx,%ebp
  lea    0x30(%rsp),%rdi
  call   <cdb_unpack@plt>
  mov    %eax,0x24(%rsp)
  mov    $0x1,%eax
  lea    0x30(%rsp),%r12
  jmp    L15
L237:
  mov    $0x8,%edx
  mov    %r12,%rsi
  mov    %ebx,%edi
  call   <cdb_bread@plt>
  test   %rax,%rax
  js     L148
  lea    0x34(%rsp),%rdi
  call   <cdb_unpack@plt>
  mov    %eax,%r13d
  test   %eax,%eax
  je     L171
  mov    %r12,%rdi
  call   <cdb_unpack@plt>
  mov    %eax,%edx
  mov    $0x0,%eax
  cmp    %r14d,%edx
  je     L308
L10:
  sub    $0x1,%r15d
  je     L189
  add    $0x1,%ebp
  cmp    %ebp,0xc(%rsp)
  je     L283
L15:
  test   %eax,%eax
  je     L237
  mov    0x24(%rsp),%eax
  lea    (%rax,%rbp,8),%esi
  mov    $0x0,%edx
  mov    %ebx,%edi
  call   <lseek@plt>
  test   %rax,%rax
  jns    L237
  mov    $0xffffffff,%eax
  jmp    L274
L308:
  mov    $0x0,%edx
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <lseek@plt>
  test   %rax,%rax
  js     L138
  mov    $0x8,%edx
  mov    %r12,%rsi
  mov    %ebx,%edi
  call   <cdb_bread@plt>
  test   %rax,%rax
  js     L94
  mov    %r12,%rdi
  call   <cdb_unpack@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  cmp    0x20(%rsp),%edx
  jne    L10
  mov    0x10(%rsp),%r13
  test   %r13,%r13
  je     L127
  lea    0x34(%rsp),%rdi
  call   <cdb_unpack@plt>
  mov    %eax,0x0(%r13)
L127:
  mov    0x20(%rsp),%eax
  test   %eax,%eax
  je     L204
  mov    0x18(%rsp),%rcx
  mov    %r15d,0x28(%rsp)
  mov    %r14d,0x2c(%rsp)
  mov    %rcx,%r15
  mov    %eax,%r14d
L100:
  mov    $0x40,%r13d
  cmp    %r13d,%r14d
  cmovbe %r14d,%r13d
  mov    %r13d,%edx
  mov    %r12,%rsi
  mov    %ebx,%edi
  call   <cdb_bread@plt>
  test   %rax,%rax
  js     L227
  mov    %r13d,%edx
  mov    %r15,%rsi
  mov    %r12,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  jne    L287
  mov    %r13d,%eax
  add    %rax,%r15
  sub    %r13d,%r14d
  jne    L100
  mov    $0x1,%eax
  jmp    L274
L287:
  mov    0x28(%rsp),%r15d
  mov    0x2c(%rsp),%r14d
  mov    $0x1,%eax
  jmp    L10
L283:
  mov    $0x1,%eax
  mov    $0x0,%ebp
  jmp    L15
L148:
  mov    $0xffffffff,%eax
  jmp    L274
L171:
  mov    $0x0,%eax
  jmp    L274
L138:
  mov    $0xffffffff,%eax
  jmp    L274
L94:
  mov    $0xffffffff,%eax
  jmp    L274
L204:
  mov    $0x1,%eax
  jmp    L274
L227:
  mov    $0xffffffff,%eax
  jmp    L274
L189:
  mov    $0x0,%eax
  jmp    L274
L45:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int cdb_seek(int fd, const void *key, unsigned klen, unsigned *dlenp) {
  unsigned htstart;
  unsigned htsize;
  unsigned httodo;
  unsigned hti;
  unsigned pos;
  unsigned hval;
  unsigned char rbuf[64];
  int needseek = 1;
  hval = cdb_hash(key, klen);
  pos = (hval & 0xff) << 3;
  if (lseek(fd, pos, 0) < 0 || cdb_bread(fd, rbuf, 8) < 0)
    return -1;
  if ((htsize = cdb_unpack(rbuf + 4)) == 0)
    return 0;
  hti = (hval >> 8) % htsize;
  httodo = htsize;
  htstart = cdb_unpack(rbuf);
  for (;;) {
    if (needseek && lseek(fd, htstart + (hti << 3), 0) < 0)
      return -1;
    if (cdb_bread(fd, rbuf, 8) < 0)
      return -1;
    if ((pos = cdb_unpack(rbuf + 4)) == 0)
      return 0;
    if (cdb_unpack(rbuf) != hval)
      needseek = 0;
    else {
      if (lseek(fd, pos, 0) < 0 || cdb_bread(fd, rbuf, 8) < 0)
        return -1;
      if (cdb_unpack(rbuf) == klen) {
        unsigned l = klen, c;
        const char *k = (const char *)key;
        if (dlenp)
          *dlenp = cdb_unpack(rbuf + 4);
        for (;;) {
          if (!l)
            return 1;
          c = l > sizeof(rbuf) ? sizeof(rbuf) : l;
          if (cdb_bread(fd, rbuf, c) < 0)
            return -1;
          if (memcmp(rbuf, k, c) != 0)
            break;
          k += c;
          l -= c;
        }
      }
      needseek = 1;
    }
    if (!--httodo)
      return 0;
    if (++hti == htsize) {
      hti = 0;
      needseek = 1;
    }
  }
}
```