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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  lea    0x20(%rsp),%rax
  mov    %rax,0x18(%rsp)
  movq   $0x0,0x10(%rsp)
  lea    D25(%rip),%r15
L66:
  mov    0x18(%rsp),%rbp
  mov    %rbp,%r13
  movq   $0x0,(%rsp)
L78:
  mov    (%rsp),%rbx
  lea    0x0(,%rbx,4),%r14
  mov    %r14,%rdx
  mov    $0x61,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  lea    0x1(%rbx),%rax
  mov    %rax,0x8(%rsp)
  mov    $0x0,%ebx
L51:
  mov    %rbx,%rax
  and    $0x1,%eax
  neg    %eax
  and    $0x62,%eax
  mov    %al,0x0(%rbp)
  mov    %rbx,%rax
  and    $0x2,%eax
  neg    %rax
  sbb    %al,%al
  and    $0x63,%eax
  mov    %al,0x1(%rbp)
  mov    %rbx,%rax
  and    $0x4,%eax
  neg    %rax
  sbb    %al,%al
  and    $0x64,%eax
  mov    %al,0x2(%rbp)
  mov    %rbx,%rax
  and    $0x8,%eax
  neg    %rax
  sbb    %al,%al
  and    $0x65,%eax
  mov    %al,0x3(%rbp)
  movb   $0x0,0x4(%rbp)
  mov    %r13,%rdi
  call   <strlen@plt>
  mov    %r14,%r12
  add    (%r15,%rbx,8),%r12
  cmp    %r12,%rax
  jne    L69
  mov    $0xffffffff,%esi
  mov    %r13,%rdi
  call   <strnlen@plt>
  cmp    %rax,%r12
  jne    L71
  add    $0x1,%rbx
  cmp    $0x10,%rbx
  jne    L51
  add    $0x4,%rbp
  cmpq   $0x4,0x8(%rsp)
  je     L0
  mov    0x8(%rsp),%rax
  mov    %rax,(%rsp)
  jmp    L78
L69:
  mov    %r12,%r9
  mov    %rax,%r8
  mov    %rbx,%rcx
  mov    (%rsp),%rdx
  mov    0x10(%rsp),%rsi
  lea    D3(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%eax
L61:
  mov    0x58(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L40
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L71:
  mov    $0xffffffff,%esi
  mov    %r13,%rdi
  call   <strnlen@plt>
  mov    %rax,%r8
  mov    %r12,%r9
  mov    %rbx,%rcx
  mov    (%rsp),%rdx
  mov    0x10(%rsp),%rsi
  lea    D4(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%eax
  jmp    L61
L0:
  addq   $0x1,0x10(%rsp)
  mov    0x10(%rsp),%rax
  addq   $0x1,0x18(%rsp)
  cmp    $0x20,%rax
  jne    L66
  mov    $0x0,%eax
  jmp    L61
L40:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D25
datatype: string
name: parse_data
arguments: data_tag: D3
datatype: string
name: parse_data
arguments: data_tag: D4
datatype: string

tool: 

tool: D3: strlen failed for base=%Zu, words=%Zu, and last=%Zu (is %zd, expected %zd)


tool: D4: strnlen failed for base=%Zu, words=%Zu, and last=%Zu (is %zd, expected %zd)


assistant: ```c
int main(int argc, char *argv[]) {
  static const size_t lens[] = {0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4};
  char basebuf[24 + 32];
  size_t base;
  for (base = 0; base < 32; ++base) {
    char *buf = basebuf + base;
    size_t words;
    for (words = 0; words < 4; ++words) {
      size_t last;
      memset(buf, 'a', words * 4);
      for (last = 0; last < 16; ++last) {
        buf[words * 4 + 0] = (last & 1) != 0 ? 'b' : '\0';
        buf[words * 4 + 1] = (last & 2) != 0 ? 'c' : '\0';
        buf[words * 4 + 2] = (last & 4) != 0 ? 'd' : '\0';
        buf[words * 4 + 3] = (last & 8) != 0 ? 'e' : '\0';
        buf[words * 4 + 4] = '\0';
        if (strlen(buf) != words * 4 + lens[last]) {
          printf("strlen failed for base=%Zu, words=%Zu, and last=%Zu (is %zd, expected %zd)\n", base, words, last, strlen(buf), words * 4 + lens[last]);
          return 1;
        }
        if (strnlen(buf, -1) != words * 4 + lens[last]) {
          printf("strnlen failed for base=%Zu, words=%Zu, and last=%Zu (is %zd, expected %zd)\n", base, words, last, strnlen(buf, -1), words * 4 + lens[last]);
          return 1;
        }
      }
    }
  }
  return 0;
}
```