user: Converte this assembly snippet into its equivalent C code:

```asm
<digestdb_encode>:
  endbr64
  mov    %rsi,%rcx
  movzbl (%rsi),%esi
  mov    %rdi,%rax
  lea    D8(%rip),%rdx
  mov    %esi,%edi
  and    $0xf,%esi
  shr    $0x4,%dil
  movzbl (%rdx,%rsi,1),%esi
  and    $0xf,%edi
  movzbl (%rdx,%rdi,1),%edi
  mov    %sil,0x1(%rax)
  mov    %dil,(%rax)
  movzbl 0x1(%rcx),%esi
  mov    %esi,%edi
  and    $0xf,%esi
  shr    $0x4,%dil
  movzbl (%rdx,%rsi,1),%esi
  and    $0xf,%edi
  movzbl (%rdx,%rdi,1),%edi
  mov    %sil,0x3(%rax)
  mov    %dil,0x2(%rax)
  movzbl 0x2(%rcx),%esi
  mov    %esi,%edi
  and    $0xf,%esi
  shr    $0x4,%dil
  movzbl (%rdx,%rsi,1),%esi
  and    $0xf,%edi
  movzbl (%rdx,%rdi,1),%edi
  mov    %sil,0x5(%rax)
  mov    %dil,0x4(%rax)
  movzbl 0x3(%rcx),%esi
  mov    %esi,%edi
  and    $0xf,%esi
  shr    $0x4,%dil
  movzbl (%rdx,%rsi,1),%esi
  and    $0xf,%edi
  movzbl (%rdx,%rdi,1),%edi
  mov    %sil,0x7(%rax)
  mov    %dil,0x6(%rax)
  movzbl 0x4(%rcx),%esi
  mov    %esi,%edi
  and    $0xf,%esi
  shr    $0x4,%dil
  movzbl (%rdx,%rsi,1),%esi
  and    $0xf,%edi
  movzbl (%rdx,%rdi,1),%edi
  mov    %sil,0x9(%rax)
  mov    %dil,0x8(%rax)
  movzbl 0x5(%rcx),%esi
  mov    %esi,%edi
  and    $0xf,%esi
  shr    $0x4,%dil
  movzbl (%rdx,%rsi,1),%esi
  and    $0xf,%edi
  movzbl (%rdx,%rdi,1),%edi
  mov    %sil,0xb(%rax)
  mov    %dil,0xa(%rax)
  movzbl 0x6(%rcx),%esi
  mov    %esi,%edi
  and    $0xf,%esi
  shr    $0x4,%dil
  and    $0xf,%edi
  movzbl (%rdx,%rdi,1),%edi
  mov    %dil,0xc(%rax)
  movzbl (%rdx,%rsi,1),%esi
  mov    %sil,0xd(%rax)
  movzbl 0x7(%rcx),%esi
  mov    %esi,%edi
  and    $0xf,%esi
  shr    $0x4,%dil
  movzbl (%rdx,%rsi,1),%esi
  and    $0xf,%edi
  movzbl (%rdx,%rdi,1),%edi
  mov    %sil,0xf(%rax)
  mov    %dil,0xe(%rax)
  movzbl 0x8(%rcx),%esi
  mov    %esi,%edi
  and    $0xf,%esi
  shr    $0x4,%dil
  movzbl (%rdx,%rsi,1),%esi
  and    $0xf,%edi
  movzbl (%rdx,%rdi,1),%edi
  mov    %sil,0x11(%rax)
  mov    %dil,0x10(%rax)
  movzbl 0x9(%rcx),%esi
  mov    %esi,%edi
  and    $0xf,%esi
  shr    $0x4,%dil
  movzbl (%rdx,%rsi,1),%esi
  and    $0xf,%edi
  movzbl (%rdx,%rdi,1),%edi
  mov    %sil,0x13(%rax)
  mov    %dil,0x12(%rax)
  movzbl 0xa(%rcx),%esi
  mov    %esi,%edi
  shr    $0x4,%dil
  and    $0xf,%edi
  and    $0xf,%esi
  movzbl (%rdx,%rdi,1),%edi
  movzbl (%rdx,%rsi,1),%esi
  mov    %dil,0x14(%rax)
  mov    %sil,0x15(%rax)
  movzbl 0xb(%rcx),%esi
  mov    %esi,%edi
  and    $0xf,%esi
  shr    $0x4,%dil
  movzbl (%rdx,%rsi,1),%esi
  and    $0xf,%edi
  movzbl (%rdx,%rdi,1),%edi
  mov    %sil,0x17(%rax)
  mov    %dil,0x16(%rax)
  movzbl 0xc(%rcx),%esi
  mov    %esi,%edi
  and    $0xf,%esi
  shr    $0x4,%dil
  movzbl (%rdx,%rsi,1),%esi
  and    $0xf,%edi
  movzbl (%rdx,%rdi,1),%edi
  mov    %sil,0x19(%rax)
  mov    %dil,0x18(%rax)
  movzbl 0xd(%rcx),%esi
  mov    %esi,%edi
  and    $0xf,%esi
  shr    $0x4,%dil
  movzbl (%rdx,%rsi,1),%esi
  and    $0xf,%edi
  movzbl (%rdx,%rdi,1),%edi
  mov    %sil,0x1b(%rax)
  mov    %dil,0x1a(%rax)
  movzbl 0xe(%rcx),%esi
  mov    %esi,%edi
  and    $0xf,%esi
  shr    $0x4,%dil
  movzbl (%rdx,%rsi,1),%esi
  and    $0xf,%edi
  movzbl (%rdx,%rdi,1),%edi
  mov    %sil,0x1d(%rax)
  mov    %dil,0x1c(%rax)
  movzbl 0xf(%rcx),%ecx
  mov    %ecx,%esi
  and    $0xf,%ecx
  shr    $0x4,%sil
  and    $0xf,%esi
  movzbl (%rdx,%rsi,1),%esi
  movzbl (%rdx,%rcx,1),%edx
  mov    %sil,0x1e(%rax)
  mov    %dl,0x1f(%rax)
  ret
```

tool_calls: name: unpack_data
arguments: label: D8
type_infered: string

tool: D8: 0123456789abcdef

assistant: ```c
void digestdb_encode(char *text, const unsigned char *bytes) {
  static const char tab[] = "0123456789abcdef";
  const unsigned char *end;
  end = bytes + 16;
  for (; bytes < end; bytes++) {
    unsigned char b;
    b = *bytes;
    *text++ = tab[(b & 0xf0) >> 4];
    *text++ = tab[(b & 0x0f) >> 0];
  }
}
```