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

```asm
<main>:
  endbr64
  push   %r15
  lea    D7(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  lea    0x40(%rsp),%r14
  lea    0x1c(%rsp),%rbp
  call   <printf@plt>
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  xor    %edx,%edx
  xor    %esi,%esi
  xor    %edi,%edi
  call   <run_test@plt>
  xor    %ecx,%ecx
  xor    %edx,%edx
  xor    %esi,%esi
  xor    %edi,%edi
  mov    $0xffffffff,%r8d
  call   <run_test@plt>
  xor    %r8d,%r8d
  xor    %edx,%edx
  xor    %esi,%esi
  xor    %edi,%edi
  mov    $0x5,%ecx
  call   <run_test@plt>
  xor    %edx,%edx
  xor    %esi,%esi
  xor    %edi,%edi
  mov    $0xffffffff,%r8d
  mov    $0x5,%ecx
  call   <run_test@plt>
  xor    %r8d,%r8d
  xor    %esi,%esi
  xor    %edi,%edi
  mov    $0x28,%ecx
  mov    %r14,%rdx
  call   <run_test@plt>
  xor    %esi,%esi
  mov    $0xffffffff,%r8d
  mov    %r14,%rdx
  mov    $0x28,%ecx
  xor    %edi,%edi
  call   <run_test@plt>
  lea    D80(%rip),%rdi
  call   <printf@plt>
  xor    %ecx,%ecx
  mov    $0x61,%r8d
  xor    %edx,%edx
  mov    $0x1,%esi
  mov    %rbp,%rdi
  xor    %ebx,%ebx
  call   <run_test@plt>
  mov    $0x28,%edx
  mov    $0x78,%esi
  mov    %r14,%rdi
  call   <memset@plt>
  mov    $0x61,%r8d
  xor    %ecx,%ecx
  xor    %edx,%edx
  mov    $0x28,%esi
  mov    %r14,%rdi
  call   <run_test@plt>
  lea    D69(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%ecx
  mov    %rbp,%rdx
  mov    %rbp,%rdi
  mov    $0x61,%r8d
  mov    $0x1,%esi
  movl   $0x78,0x1c(%rsp)
  call   <run_test@plt>
  mov    $0x28,%edx
  mov    $0x78,%esi
  mov    %r14,%rdi
  call   <memset@plt>
L35:
  mov    %ebx,%esi
  mov    $0x61,%r8d
  mov    $0x28,%ecx
  mov    %r14,%rdx
  mov    %r14,%rdi
  add    $0x1,%ebx
  call   <run_test@plt>
  cmp    $0x29,%ebx
  jne    L35
  lea    D9(%rip),%rdi
  lea    0x20(%rsp),%rbp
  call   <printf@plt>
  mov    $0x28,%edx
  mov    %r14,%rdi
  mov    $0x62,%esi
  call   <memset@plt>
  mov    %rbp,%rdi
  mov    $0x14,%edx
  mov    $0x73,%esi
  call   <memset@plt>
  mov    $0x61,%r8d
  mov    %rbp,%rdx
  mov    $0x14,%ecx
  mov    $0x28,%esi
  mov    %r14,%rdi
  lea    0x4c(%rsp),%r12
  call   <run_test@plt>
  lea    D21(%rip),%rdi
  lea    D45(%rip),%r13
  call   <printf@plt>
  mov    $0x28,%edx
  mov    $0x62,%esi
  mov    %r14,%rdi
  call   <memset@plt>
  mov    %rbp,%rdi
  mov    $0x14,%edx
  mov    $0x73,%esi
  call   <memset@plt>
  mov    $0x28,%ecx
  mov    %r14,%rdx
  mov    %rbp,%rdi
  mov    $0x61,%r8d
  mov    $0x14,%esi
  lea    D3(%rip),%rbp
  call   <run_test@plt>
  lea    D42(%rip),%rdi
  call   <printf@plt>
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    $0x78,%r8d
  mov    $0x5,%ecx
  mov    %r14,%rdi
  lea    0x54(%rsp),%rdx
  mov    $0x28,%esi
  call   <run_test@plt>
  lea    D16(%rip),%rdi
  call   <printf@plt>
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    $0x78,%r8d
  mov    $0x3,%ecx
  mov    %r14,%rdi
  lea    0x50(%rsp),%rdx
  mov    $0x5,%esi
  call   <run_test@plt>
  lea    D54(%rip),%rdi
  call   <printf@plt>
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    $0xa,%ecx
  mov    %r14,%rdx
  mov    %r12,%rdi
  mov    $0x78,%r8d
  mov    $0x1,%esi
  call   <run_test@plt>
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    $0xa,%ecx
  mov    %r14,%rdx
  mov    %r12,%rdi
  mov    $0x78,%r8d
  mov    $0x2,%esi
  call   <run_test@plt>
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    $0xa,%ecx
  mov    %r14,%rdx
  mov    %r12,%rdi
  mov    $0x78,%r8d
  mov    $0x3,%esi
  call   <run_test@plt>
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    $0xa,%ecx
  mov    %r14,%rdx
  mov    %r12,%rdi
  mov    $0x78,%r8d
  mov    $0x4,%esi
  call   <run_test@plt>
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    $0xa,%ecx
  mov    %r14,%rdx
  mov    %r12,%rdi
  mov    $0x78,%r8d
  mov    $0x5,%esi
  call   <run_test@plt>
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    $0xa,%ecx
  mov    %r14,%rdx
  mov    %r12,%rdi
  mov    $0x78,%r8d
  mov    $0x6,%esi
  call   <run_test@plt>
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    $0xa,%ecx
  mov    %r14,%rdx
  mov    %r12,%rdi
  mov    $0x78,%r8d
  mov    $0x7,%esi
  call   <run_test@plt>
  mov    %r13,%rdi
  call   <printf@plt>
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    $0x78,%r8d
  xor    %ecx,%ecx
  mov    %r14,%rdx
  mov    $0x1,%esi
  mov    %r12,%rdi
  call   <run_test@plt>
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    $0x78,%r8d
  xor    %ecx,%ecx
  mov    %r14,%rdx
  mov    $0x2,%esi
  mov    %r12,%rdi
  call   <run_test@plt>
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    $0x78,%r8d
  xor    %ecx,%ecx
  mov    %r14,%rdx
  mov    $0x3,%esi
  mov    %r12,%rdi
  call   <run_test@plt>
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    $0x78,%r8d
  xor    %ecx,%ecx
  mov    %r14,%rdx
  mov    $0x4,%esi
  mov    %r12,%rdi
  call   <run_test@plt>
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    $0x78,%r8d
  xor    %ecx,%ecx
  mov    %r14,%rdx
  mov    $0x4,%esi
  mov    %r12,%rdi
  call   <run_test@plt>
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    $0x78,%r8d
  xor    %ecx,%ecx
  mov    %r14,%rdx
  mov    $0x5,%esi
  mov    %r12,%rdi
  call   <run_test@plt>
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    $0x78,%r8d
  xor    %ecx,%ecx
  mov    %r14,%rdx
  mov    $0x6,%esi
  mov    %r12,%rdi
  call   <run_test@plt>
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    $0x78,%r8d
  xor    %ecx,%ecx
  mov    %r14,%rdx
  mov    $0x7,%esi
  mov    %r12,%rdi
  call   <run_test@plt>
  mov    %r13,%rdi
  mov    %r14,%r13
  call   <printf@plt>
  movl   $0x28,0x8(%rsp)
L16:
  mov    0x8(%rsp),%eax
  xor    %r12d,%r12d
  add    $0x1,%eax
  mov    %eax,0xc(%rsp)
L12:
  mov    %r14,%rbp
  mov    $0x29,%ebx
  nopl   0x0(%rax,%rax,1)
L54:
  xor    %r15d,%r15d
  nopl   0x0(%rax,%rax,1)
L18:
  mov    %r15d,%ecx
  mov    $0x78,%r8d
  mov    %rbp,%rdx
  mov    %r12d,%esi
  mov    %r13,%rdi
  add    $0x1,%r15d
  call   <run_test@plt>
  cmp    %r15d,%ebx
  jne    L18
  sub    $0x1,%ebx
  add    $0x4,%rbp
  cmp    $0x1,%ebx
  jne    L54
  add    $0x1,%r12d
  cmp    %r12d,0xc(%rsp)
  jne    L12
  add    $0x4,%r13
  subl   $0x1,0x8(%rsp)
  jne    L16
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L15
  add    $0x78,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L15:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D7
data_type: string
name: unpack_data
arguments: data_tag: D80
data_type: string
name: unpack_data
arguments: data_tag: D69
data_type: string
name: unpack_data
arguments: data_tag: D9
data_type: string
name: unpack_data
arguments: data_tag: D21
data_type: string
name: unpack_data
arguments: data_tag: D45
data_type: string
name: unpack_data
arguments: data_tag: D3
data_type: string
name: unpack_data
arguments: data_tag: D42
data_type: string
name: unpack_data
arguments: data_tag: D16
data_type: string
name: unpack_data
arguments: data_tag: D54
data_type: string

tool: D7: --- test 1 ---


tool: D80: --- test 2 ---


tool: D69: --- test 3 ---


tool: D9: --- test 4 ---


tool: D21: --- test 5 ---


tool: D45: --- test 9 ---


tool: D3: 0123456789

tool: D42: --- test 6 ---


tool: D16: --- test 7 ---


tool: D54: --- test 8 ---


assistant: ```c
int main() {
  uint8_t byte, buf[10], small[5], i;
  uint32_t dst_offset, dst_len, src_offset, src_len;
  printf("--- test 1 ---\n");
  run_test(NULL, 0, NULL, 0, 0x00);
  run_test(NULL, 0, NULL, 0, 0xFF);
  run_test(NULL, 0, NULL, 5, 0x00);
  run_test(NULL, 0, NULL, 5, 0xFF);
  run_test(NULL, 0, buf, sizeof buf, 0x00);
  run_test(NULL, 0, buf, sizeof buf, 0xFF);
  printf("--- test 2 ---\n");
  run_test(&byte, 1, NULL, 0, 'a');
  memset(buf, 'x', sizeof buf);
  run_test(buf, sizeof buf, NULL, 0, 'a');
  printf("--- test 3 ---\n");
  byte = 'x';
  run_test(&byte, 1, &byte, 1, 'a');
  memset(buf, 'x', sizeof buf);
  for (i = 0; i <= sizeof buf; ++i)
    run_test(buf, i, buf, sizeof buf, 'a');
  printf("--- test 4 ---\n");
  memset(buf, 'b', sizeof buf);
  memset(small, 's', sizeof small);
  run_test(buf, sizeof buf, small, sizeof small, 'a');
  printf("--- test 5 ---\n");
  memset(buf, 'b', sizeof buf);
  memset(small, 's', sizeof small);
  run_test(small, sizeof small, buf, sizeof buf, 'a');
  printf("--- test 6 ---\n");
  memcpy(buf, "0123456789", 10);
  run_test(buf, sizeof buf, buf + 5, 5, 'x');
  printf("--- test 7 ---\n");
  memcpy(buf, "0123456789", 10);
  run_test(buf, 5, buf + 4, 3, 'x');
  printf("--- test 8 ---\n");
  memcpy(buf, "0123456789", 10);
  run_test(buf + 3, 1, buf, 10, 'x');
  memcpy(buf, "0123456789", 10);
  run_test(buf + 3, 2, buf, 10, 'x');
  memcpy(buf, "0123456789", 10);
  run_test(buf + 3, 3, buf, 10, 'x');
  memcpy(buf, "0123456789", 10);
  run_test(buf + 3, 4, buf, 10, 'x');
  memcpy(buf, "0123456789", 10);
  run_test(buf + 3, 5, buf, 10, 'x');
  memcpy(buf, "0123456789", 10);
  run_test(buf + 3, 6, buf, 10, 'x');
  memcpy(buf, "0123456789", 10);
  run_test(buf + 3, 7, buf, 10, 'x');
  printf("--- test 9 ---\n");
  memcpy(buf, "0123456789", 10);
  run_test(buf + 3, 1, buf, 0, 'x');
  memcpy(buf, "0123456789", 10);
  run_test(buf + 3, 2, buf, 0, 'x');
  memcpy(buf, "0123456789", 10);
  run_test(buf + 3, 3, buf, 0, 'x');
  memcpy(buf, "0123456789", 10);
  run_test(buf + 3, 4, buf, 0, 'x');
  memcpy(buf, "0123456789", 10);
  run_test(buf + 3, 4, buf, 0, 'x');
  memcpy(buf, "0123456789", 10);
  run_test(buf + 3, 5, buf, 0, 'x');
  memcpy(buf, "0123456789", 10);
  run_test(buf + 3, 6, buf, 0, 'x');
  memcpy(buf, "0123456789", 10);
  run_test(buf + 3, 7, buf, 0, 'x');
  printf("--- test 9 ---\n");
  for (dst_offset = 0; dst_offset < sizeof buf; ++dst_offset)
    for (dst_len = 0; dst_len <= sizeof buf - dst_offset; ++dst_len)
      for (src_offset = 0; src_offset < sizeof buf; ++src_offset)
        for (src_len = 0; src_len <= sizeof buf - src_offset; ++src_len)
          run_test(buf + dst_offset, dst_len, buf + src_offset, src_len, 'x');
  return 0;
}
```