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

```asm
<hmac_sha1_vector>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xf8,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %rsi,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xe8(%rsp)
  xor    %eax,%eax
  cmp    $0x5,%rdx
  ja     L53
  mov    %rdx,%r12
  mov    %rcx,%r15
  mov    %r9,%r14
  cmp    $0x40,%rsi
  ja     L95
L6:
  lea    0xa0(%rsp),%r13
  mov    $0x40,%edx
  xor    %esi,%esi
  mov    %r8,0x8(%rsp)
  mov    %r13,%rdi
  mov    %r13,%rbx
  lea    0xe0(%rsp),%rbp
  call   <memset@plt>
  mov    0x10(%rsp),%rdx
  mov    0x18(%rsp),%rsi
  mov    %r13,%rdi
  call   <memcpy@plt>
  mov    0x8(%rsp),%r8
  mov    %r13,%rax
L51:
  xorb   $0x36,(%rax)
  add    $0x1,%rax
  cmp    %rbp,%rax
  jne    L51
  mov    %r13,0x20(%rsp)
  movq   $0x40,0x50(%rsp)
  test   %r12,%r12
  je     L73
  lea    0x0(,%r12,8),%rdx
  lea    0x28(%rsp),%r10
  mov    %edx,%r9d
  sub    $0x1,%edx
  mov    -0x8(%r15,%r9,1),%rax
  mov    %rax,-0x8(%r10,%r9,1)
  cmp    $0x8,%edx
  jb     L7
  mov    %edx,%edi
  xor    %eax,%eax
  and    $0xfffffff8,%edi
L72:
  mov    %eax,%ecx
  add    $0x8,%eax
  mov    (%r15,%rcx,1),%rsi
  mov    %rsi,(%r10,%rcx,1)
  cmp    %edi,%eax
  jb     L72
L7:
  mov    -0x8(%r8,%r9,1),%rax
  lea    0x58(%rsp),%rdi
  mov    %rax,-0x8(%rdi,%r9,1)
  cmp    $0x8,%edx
  jb     L73
  and    $0xfffffff8,%edx
  xor    %eax,%eax
L49:
  mov    %eax,%ecx
  add    $0x8,%eax
  mov    (%r8,%rcx,1),%rsi
  mov    %rsi,(%rdi,%rcx,1)
  cmp    %edx,%eax
  jb     L49
L73:
  lea    0x50(%rsp),%r8
  lea    0x20(%rsp),%r15
  mov    %r14,%rcx
  mov    %r8,%rdx
  lea    0x1(%r12),%edi
  mov    %r15,%rsi
  mov    %r8,0x8(%rsp)
  call   <sha1_vector@plt>
  mov    $0x40,%edx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  mov    0x10(%rsp),%rdx
  mov    0x18(%rsp),%rsi
  mov    %r13,%rdi
  call   <memcpy@plt>
  mov    0x8(%rsp),%r8
  nopl   0x0(%rax,%rax,1)
L38:
  xorb   $0x5c,(%rbx)
  add    $0x1,%rbx
  cmp    %rbx,%rbp
  jne    L38
  mov    %r14,%rcx
  mov    %r8,%rdx
  mov    %r15,%rsi
  mov    $0x2,%edi
  mov    %r13,0x20(%rsp)
  movq   $0x40,0x50(%rsp)
  mov    %r14,0x28(%rsp)
  movq   $0x14,0x58(%rsp)
  call   <sha1_vector@plt>
L53:
  mov    0xe8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L29
  add    $0xf8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L95:
  lea    0x10(%rsp),%rdx
  lea    0x18(%rsp),%rsi
  mov    $0x1,%edi
  mov    %r8,0x8(%rsp)
  lea    0x80(%rsp),%rbx
  mov    %rbx,%rcx
  call   <sha1_vector@plt>
  mov    %rbx,0x18(%rsp)
  mov    0x8(%rsp),%r8
  movq   $0x14,0x10(%rsp)
  jmp    L6
L29:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void hmac_sha1_vector(const uint8_t *key, size_t key_len, size_t num_elem, const uint8_t *addr[], const size_t *len, uint8_t *mac) {
  unsigned char k_pad[64];
  unsigned char tk[20];
  int i;
  const uint8_t *_addr[6];
  size_t _len[6];
  if (num_elem > 5) {
    return;
  }
  if (key_len > 64) {
    sha1_vector(1, &key, &key_len, tk);
    key = tk;
    key_len = 20;
  }
  memset(k_pad, 0, sizeof(k_pad));
  memcpy((uint8_t *)k_pad, (uint8_t *)key, key_len);
  for (i = 0; i < 64; i++)
    k_pad[i] ^= 0x36;
  _addr[0] = k_pad;
  _len[0] = 64;
  for (i = 0; i < num_elem; i++) {
    _addr[i + 1] = addr[i];
    _len[i + 1] = len[i];
  }
  sha1_vector(1 + num_elem, _addr, _len, mac);
  memset(k_pad, 0, sizeof(k_pad));
  memcpy((uint8_t *)k_pad, (uint8_t *)key, key_len);
  for (i = 0; i < 64; i++)
    k_pad[i] ^= 0x5c;
  _addr[0] = k_pad;
  _len[0] = 64;
  _addr[1] = mac;
  _len[1] = 20;
  sha1_vector(2, _addr, _len, mac);
}
```