user: Please show me the C implementation that matches the assembly code listed below:

```asm
<JV_PBKDF1>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x240,%rsp
  mov    %rdi,-0x218(%rbp)
  mov    %rsi,-0x220(%rbp)
  mov    %rdx,-0x228(%rbp)
  mov    %rcx,-0x230(%rbp)
  mov    %r8,-0x238(%rbp)
  mov    %r9d,-0x23c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x200(%rbp)
  movq   $0x0,-0x1f8(%rbp)
  movq   $0x0,-0x1f0(%rbp)
  movq   $0x0,-0x1e8(%rbp)
  movq   $0x0,-0x1e0(%rbp)
  movq   $0x0,-0x1d8(%rbp)
  movq   $0x0,-0x1d0(%rbp)
  movq   $0x0,-0x1c8(%rbp)
  movq   $0x0,-0x1c0(%rbp)
  movq   $0x0,-0x1b8(%rbp)
  movq   $0x0,-0x1b0(%rbp)
  movq   $0x0,-0x1a8(%rbp)
  movq   $0x0,-0x1a0(%rbp)
  movq   $0x0,-0x198(%rbp)
  movq   $0x0,-0x190(%rbp)
  movq   $0x0,-0x188(%rbp)
  movq   $0x0,-0x180(%rbp)
  movq   $0x0,-0x178(%rbp)
  movq   $0x0,-0x170(%rbp)
  movq   $0x0,-0x168(%rbp)
  lea    -0x160(%rbp),%rdx
  mov    $0x0,%eax
  mov    $0x2a,%ecx
  mov    %rdx,%rdi
  rep stos %rax,%es:(%rdi)
  movl   $0x1,-0x204(%rbp)
  mov    -0x228(%rbp),%rdx
  mov    -0x220(%rbp),%rcx
  lea    -0x160(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x228(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  lea    -0x160(%rbp),%rax
  lea    (%rax,%rdx,1),%rcx
  mov    -0x238(%rbp),%rdx
  mov    -0x230(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <memcpy@plt>
  mov    -0x228(%rbp),%rdx
  mov    -0x238(%rbp),%rax
  add    %rax,%rdx
  lea    -0x160(%rbp),%rcx
  lea    -0x1b0(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <JV_SHA1@plt>
  movl   $0x1,-0x204(%rbp)
  jmp    L62
L8:
  mov    -0x204(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L69
  lea    -0x1b0(%rbp),%rcx
  lea    -0x200(%rbp),%rax
  mov    $0x14,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <JV_SHA1@plt>
  jmp    L54
L69:
  lea    -0x200(%rbp),%rcx
  lea    -0x1b0(%rbp),%rax
  mov    $0x14,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <JV_SHA1@plt>
L54:
  addl   $0x1,-0x204(%rbp)
L62:
  mov    -0x204(%rbp),%eax
  cmp    -0x23c(%rbp),%eax
  jl     L8
  mov    -0x204(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L51
  lea    -0x1b0(%rbp),%rcx
  mov    -0x218(%rbp),%rax
  mov    $0x14,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  jmp    L2
L51:
  lea    -0x200(%rbp),%rcx
  mov    -0x218(%rbp),%rax
  mov    $0x14,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
L2:
  mov    -0x218(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L12
  call   <__stack_chk_fail@plt>
L12:
  leave
  ret
```

assistant: ```c
uint8_t *JV_PBKDF1(uint8_t *dkey, const uint8_t password[], const size_t pwlen, const uint8_t salt[], const size_t saltlen, const uint32_t itercount) {
  uint8_t mid_odd[20] = {0}, mid_even[20] = {0};
  uint8_t kickoff[84] = {0};
  int i = 1;
  memcpy(kickoff, password, pwlen);
  memcpy(kickoff + pwlen, salt, saltlen);
  JV_SHA1(mid_even, kickoff, pwlen + saltlen);
  for (i = 1; i < itercount; i++) {
    if (i % 2) {
      JV_SHA1(mid_odd, mid_even, 20);
    } else {
      JV_SHA1(mid_even, mid_odd, 20);
    }
  }
  if (i % 2) {
    memcpy(dkey, mid_even, 20);
  } else {
    memcpy(dkey, mid_odd, 20);
  }
  return dkey;
}
```