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

```asm
<test_reachable_size>:
  endbr64
  push   %r13
  lea    D99(%rip),%rdi
  push   %r12
  lea    D44(%rip),%r12
  push   %rbp
  push   %rbx
  lea    D60(%rip),%rbx
  sub    $0xb8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xa8(%rsp)
  xor    %eax,%eax
  lea    0x50(%rsp),%rbp
  mov    %rsp,%r13
  call   <puts@plt>
  mov    $0x50,%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  movdqa D27(%rip),%xmm1
  movdqa D39(%rip),%xmm0
  movdqa D79(%rip),%xmm2
  movaps %xmm1,(%rsp)
  movaps %xmm0,0x10(%rsp)
  movaps %xmm2,0x20(%rsp)
  movaps %xmm1,0x30(%rsp)
  movaps %xmm0,0x40(%rsp)
  call   <memcpy@plt>
  mov    $0x1,%r8d
  mov    $0x1,%ecx
  mov    %rbp,%rdi
  mov    $0x5,%edx
  mov    $0x4,%esi
  call   <reachable_size@plt>
  mov    %r12,%rcx
  mov    $0x3,%edx
  lea    D12(%rip),%rdi
  cmp    $0x3,%eax
  mov    %eax,%esi
  cmove  %rbx,%rcx
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x50,%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <memcpy@plt>
  mov    $0x3,%r8d
  mov    $0x3,%ecx
  mov    %rbp,%rdi
  mov    $0x5,%edx
  mov    $0x4,%esi
  call   <reachable_size@plt>
  mov    %r12,%rcx
  mov    $0x3,%edx
  lea    D19(%rip),%rdi
  cmp    $0x3,%eax
  mov    %eax,%esi
  cmove  %rbx,%rcx
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x50,%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <memcpy@plt>
  mov    $0x1,%r8d
  mov    $0x2,%ecx
  mov    %rbp,%rdi
  mov    $0x5,%edx
  mov    $0x4,%esi
  call   <reachable_size@plt>
  mov    %r12,%rcx
  mov    $0x1,%edx
  lea    D38(%rip),%rdi
  cmp    $0x1,%eax
  mov    %eax,%esi
  cmove  %rbx,%rcx
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x50,%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <memcpy@plt>
  xor    %ecx,%ecx
  xor    %r8d,%r8d
  mov    $0x5,%edx
  mov    $0x4,%esi
  mov    %rbp,%rdi
  call   <reachable_size@plt>
  mov    %r12,%rcx
  lea    D52(%rip),%rdi
  test   %eax,%eax
  mov    %eax,%esi
  cmove  %rbx,%rcx
  xor    %edx,%edx
  xor    %eax,%eax
  call   <printf@plt>
  mov    0xa8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L5
  add    $0xb8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L5:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D99
data_type: string
name: retrieve_data
arguments: data_label: D44
data_type: string
name: retrieve_data
arguments: data_label: D60
data_type: string
name: retrieve_data
arguments: data_label: D27
data_type: byte[16]
name: retrieve_data
arguments: data_label: D39
data_type: byte[16]
name: retrieve_data
arguments: data_label: D79
data_type: byte[16]
name: retrieve_data
arguments: data_label: D12
data_type: string
name: retrieve_data
arguments: data_label: D19
data_type: string
name: retrieve_data
arguments: data_label: D38
data_type: string
name: retrieve_data
arguments: data_label: D52
data_type: string

tool: D99: TESTING PROBLEM 5: reachable_size


tool: D44: WRONG

tool: D60: CORRECT

tool: {"D27": [0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00]}

tool: {"D39": [0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00]}

tool: {"D79": [0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: D12: Test 1 of reachable_size returns %d, should be %d, %s


tool: D19: Test 2 of reachable_size returns %d, should be %d, %s


tool: D38: Test 3 of reachable_size returns %d, should be %d, %s


tool: D52: Test 4 of reachable_size returns %d, should be %d, %s


assistant: ```c
void test_reachable_size() {
  printf("TESTING PROBLEM 5: reachable_size\n\n");
  int test1[4][5] = {{1, 1, 1, 1, 1}, {1, 0, 1, 0, 1}, {1, 0, 1, 1, 1}, {1, 1, 1, 0, 1}};
  int vals[4][5];
  memcpy(vals, test1, sizeof(int) * 4 * 5);
  int result1 = reachable_size((int *)vals, 4, 5, 1, 1);
  int answer1 = 3;
  printf("Test 1 of reachable_size returns %d, should be %d, %s\n", result1, answer1, (result1 == answer1 ? "CORRECT" : "WRONG"));
  memcpy(vals, test1, sizeof(int) * 4 * 5);
  int result2 = reachable_size((int *)vals, 4, 5, 3, 3);
  int answer2 = 3;
  printf("Test 2 of reachable_size returns %d, should be %d, %s\n", result2, answer2, (result2 == answer2 ? "CORRECT" : "WRONG"));
  memcpy(vals, test1, sizeof(int) * 4 * 5);
  int result3 = reachable_size((int *)vals, 4, 5, 2, 1);
  int answer3 = 1;
  printf("Test 3 of reachable_size returns %d, should be %d, %s\n", result3, answer3, (result3 == answer3 ? "CORRECT" : "WRONG"));
  memcpy(vals, test1, sizeof(int) * 4 * 5);
  int result4 = reachable_size((int *)vals, 4, 5, 0, 0);
  int answer4 = 0;
  printf("Test 4 of reachable_size returns %d, should be %d, %s\n", result4, answer4, (result4 == answer4 ? "CORRECT" : "WRONG"));
}
```