user: Translate the below assembly code into C programming language:

```asm
<rlemap_unpack>:
  endbr64
  movzwl (%rdi),%edx
  test   %dx,%dx
  je     L148
  lea    -0x1(%rdx),%eax
  push   %rbx
  movdqa D11(%rip),%xmm3
  mov    %rsi,%rcx
  movzwl %ax,%eax
  movdqa D0(%rip),%xmm2
  lea    0x2(%rdi),%r10
  lea    0x5(%rax,%rax,2),%rax
  lea    (%rdi,%rax,1),%r11
  nopw   0x0(%rax,%rax,1)
L81:
  movzbl (%r10),%eax
  movzwl 0x1(%r10),%esi
  add    $0x3,%r10
  mov    %eax,%r9d
  rol    $0x8,%si
  and    $0x7f,%r9d
  add    $0x1,%r9d
  movzbl %r9b,%edi
  lea    -0x1(%rdi),%r8d
  test   %al,%al
  js     L31
  cmp    $0x6,%r8w
  jbe    L196
  lea    -0x8(%rdi),%edx
  movd   %esi,%xmm0
  xor    %eax,%eax
  shr    $0x3,%dx
  punpcklwd %xmm0,%xmm0
  add    $0x1,%edx
  pshufd $0x0,%xmm0,%xmm0
L20:
  mov    %rax,%rbx
  add    $0x1,%rax
  shl    $0x4,%rbx
  movups %xmm0,(%rcx,%rbx,1)
  cmp    %ax,%dx
  ja     L20
  shl    $0x3,%edx
  movzwl %dx,%eax
  sub    %edx,%r8d
  lea    (%rcx,%rax,2),%rbx
  cmp    %dx,%di
  je     L19
L138:
  sub    %edx,%edi
  lea    -0x1(%rdi),%eax
  cmp    $0x2,%ax
  jbe    L77
  movd   %esi,%xmm5
  movzwl %dx,%edx
  mov    %edi,%eax
  pshuflw $0x0,%xmm5,%xmm4
  and    $0xfffffffc,%eax
  movq   %xmm4,(%rcx,%rdx,2)
  mov    %rdi,%rdx
  sub    %eax,%r8d
  and    $0xfffc,%edx
  lea    (%rbx,%rdx,2),%rbx
  cmp    %ax,%di
  je     L19
L77:
  mov    %si,(%rbx)
  test   %r8w,%r8w
  je     L19
  mov    %si,0x2(%rbx)
  cmp    $0x1,%r8w
  je     L19
  mov    %si,0x4(%rbx)
L19:
  movzbl %r9b,%r9d
  lea    (%rcx,%r9,2),%rcx
  cmp    %r11,%r10
  jne    L81
  pop    %rbx
  ret
  nopw   0x0(%rax,%rax,1)
L31:
  cmp    $0x6,%r8w
  jbe    L78
  movd   %esi,%xmm0
  lea    -0x8(%rdi),%edx
  xor    %eax,%eax
  punpcklwd %xmm0,%xmm0
  shr    $0x3,%dx
  pshufd $0x0,%xmm0,%xmm0
  add    $0x1,%edx
  paddw  %xmm3,%xmm0
  nopl   0x0(%rax,%rax,1)
L132:
  mov    %rax,%rbx
  movdqa %xmm0,%xmm1
  paddw  %xmm2,%xmm0
  add    $0x1,%rax
  shl    $0x4,%rbx
  movups %xmm1,(%rcx,%rbx,1)
  cmp    %ax,%dx
  ja     L132
  shl    $0x3,%edx
  movzwl %dx,%eax
  add    %edx,%esi
  sub    %edx,%r8d
  lea    (%rcx,%rax,2),%rax
  cmp    %dx,%di
  je     L19
L202:
  mov    %si,(%rax)
  lea    0x1(%rsi),%edx
  test   %r8w,%r8w
  je     L19
  mov    %dx,0x2(%rax)
  lea    0x2(%rsi),%edi
  cmp    $0x1,%r8w
  je     L19
  mov    %di,0x4(%rax)
  lea    0x3(%rsi),%edx
  cmp    $0x2,%r8w
  je     L19
  mov    %dx,0x6(%rax)
  lea    0x4(%rsi),%edi
  cmp    $0x3,%r8w
  je     L19
  mov    %di,0x8(%rax)
  lea    0x5(%rsi),%edx
  cmp    $0x4,%r8w
  je     L19
  mov    %dx,0xa(%rax)
  add    $0x6,%esi
  cmp    $0x5,%r8w
  je     L19
  mov    %si,0xc(%rax)
  jmp    L19
  nopl   0x0(%rax,%rax,1)
L196:
  mov    %rcx,%rbx
  xor    %edx,%edx
  jmp    L138
L78:
  mov    %rcx,%rax
  jmp    L202
L148:
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D11
type_infered: byte[16]
name: retrieve_data
arguments: data_tag: D0
type_infered: byte[16]

tool: {"D11": [0x00,0x00,0x01,0x00,0x02,0x00,0x03,0x00,0x04,0x00,0x05,0x00,0x06,0x00,0x07,0x00]}

tool: {"D0": [0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00]}

assistant: ```c
void rlemap_unpack(unsigned char *src, unsigned char *dest) {
  unsigned char *s;
  unsigned short *d;
  unsigned short blocnum;
  blocnum = *((unsigned short *)src);
  s = src + 2;
  d = (unsigned short *)dest;
  while (blocnum--) {
    unsigned short data;
    const unsigned char v8 = *s++;
    unsigned short len = (v8 & 0x7F) + 1;
    data = (s[0] << 8) | (s[1] << 0);
    s += 2;
    if (v8 & 0x80) {
      while (len--)
        *d++ = data++;
    } else {
      while (len--)
        *d++ = data;
    }
  }
}
```