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    $0x58,%rsp
  lea    D22(%rip),%rdi
  call   <wctype@plt>
  mov    %rax,(%rsp)
  lea    D24(%rip),%rdi
  call   <wctype@plt>
  mov    %rax,0x8(%rsp)
  lea    D335(%rip),%rdi
  call   <wctype@plt>
  mov    %rax,0x10(%rsp)
  lea    D323(%rip),%rdi
  call   <wctype@plt>
  mov    %rax,0x18(%rsp)
  lea    D331(%rip),%rdi
  call   <wctype@plt>
  mov    %rax,0x20(%rsp)
  lea    D181(%rip),%rdi
  call   <wctype@plt>
  mov    %rax,0x28(%rsp)
  lea    D151(%rip),%rdi
  call   <wctype@plt>
  mov    %rax,0x30(%rsp)
  lea    D296(%rip),%rdi
  call   <wctype@plt>
  mov    %rax,0x38(%rsp)
  lea    D124(%rip),%rdi
  call   <wctype@plt>
  mov    %rax,0x40(%rsp)
  lea    D66(%rip),%rdi
  call   <wctype@plt>
  mov    %rax,0x48(%rsp)
  lea    D17(%rip),%rdi
  call   <wctype@plt>
  mov    %rax,%r15
  lea    D339(%rip),%rdi
  call   <wctype@plt>
  mov    $0x0,%ebp
  test   %rax,%rax
  jne    L128
L315:
  mov    $0x0,%ebx
  lea    D318(%rip),%r13
  lea    D6(%rip),%r12
  jmp    L343
L128:
  lea    D376(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%ebp
  jmp    L315
L189:
  mov    %ebx,%edx
  lea    D22(%rip),%rsi
  mov    %r13,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L478
L191:
  mov    %ebx,%edx
  lea    D22(%rip),%rsi
  mov    %r12,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L454
L152:
  mov    %ebx,%edx
  lea    D24(%rip),%rsi
  mov    %r13,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L271
L145:
  mov    %ebx,%edx
  lea    D24(%rip),%rsi
  mov    %r12,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L220
L419:
  mov    %ebx,%edx
  lea    D335(%rip),%rsi
  mov    %r13,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L140
L252:
  mov    %ebx,%edx
  lea    D335(%rip),%rsi
  mov    %r12,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L262
L227:
  mov    %ebx,%edx
  lea    D323(%rip),%rsi
  mov    %r13,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L471
L95:
  mov    %ebx,%edx
  lea    D323(%rip),%rsi
  mov    %r12,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L375
L202:
  mov    %ebx,%edx
  lea    D331(%rip),%rsi
  mov    %r13,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L377
L278:
  mov    %ebx,%edx
  lea    D331(%rip),%rsi
  mov    %r12,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L203
L148:
  mov    %ebx,%edx
  lea    D181(%rip),%rsi
  mov    %r13,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L309
L486:
  mov    %ebx,%edx
  lea    D181(%rip),%rsi
  mov    %r12,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L441
L290:
  mov    %ebx,%edx
  lea    D151(%rip),%rsi
  mov    %r13,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L163
L445:
  mov    %ebx,%edx
  lea    D151(%rip),%rsi
  mov    %r12,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L26
L251:
  mov    %ebx,%edx
  lea    D296(%rip),%rsi
  mov    %r13,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L305
L194:
  mov    %ebx,%edx
  lea    D296(%rip),%rsi
  mov    %r12,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L67
L398:
  mov    %ebx,%edx
  lea    D124(%rip),%rsi
  mov    %r13,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L51
L36:
  mov    %ebx,%edx
  lea    D124(%rip),%rsi
  mov    %r12,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L292
L222:
  mov    %ebx,%edx
  lea    D66(%rip),%rsi
  mov    %r13,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L434
L396:
  mov    %ebx,%edx
  lea    D66(%rip),%rsi
  mov    %r12,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L404
L443:
  mov    %ebx,%edx
  lea    D17(%rip),%rsi
  mov    %r13,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L1
L386:
  add    $0x1,%ebx
  cmp    $0x100,%ebx
  je     L351
L343:
  mov    %ebx,%edi
  call   <isalnum@plt>
  mov    %rax,%r14
  mov    (%rsp),%rsi
  mov    %ebx,%edi
  call   <iswctype@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L189
L478:
  mov    %ebx,%edi
  call   <isalnum@plt>
  mov    %rax,%r14
  mov    %ebx,%edi
  call   <iswalnum@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L191
L454:
  mov    %ebx,%edi
  call   <isalpha@plt>
  mov    %rax,%r14
  mov    0x8(%rsp),%rsi
  mov    %ebx,%edi
  call   <iswctype@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L152
L271:
  mov    %ebx,%edi
  call   <isalpha@plt>
  mov    %rax,%r14
  mov    %ebx,%edi
  call   <iswalpha@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L145
L220:
  mov    %ebx,%edi
  call   <iscntrl@plt>
  mov    %rax,%r14
  mov    0x10(%rsp),%rsi
  mov    %ebx,%edi
  call   <iswctype@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L419
L140:
  mov    %ebx,%edi
  call   <iscntrl@plt>
  mov    %rax,%r14
  mov    %ebx,%edi
  call   <iswcntrl@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L252
L262:
  mov    %ebx,%edi
  call   <isdigit@plt>
  mov    %rax,%r14
  mov    0x18(%rsp),%rsi
  mov    %ebx,%edi
  call   <iswctype@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L227
L471:
  mov    %ebx,%edi
  call   <isdigit@plt>
  mov    %rax,%r14
  mov    %ebx,%edi
  call   <iswdigit@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L95
L375:
  mov    %ebx,%edi
  call   <isgraph@plt>
  mov    %rax,%r14
  mov    0x20(%rsp),%rsi
  mov    %ebx,%edi
  call   <iswctype@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L202
L377:
  mov    %ebx,%edi
  call   <isgraph@plt>
  mov    %rax,%r14
  mov    %ebx,%edi
  call   <iswgraph@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L278
L203:
  mov    %ebx,%edi
  call   <islower@plt>
  mov    %rax,%r14
  mov    0x28(%rsp),%rsi
  mov    %ebx,%edi
  call   <iswctype@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L148
L309:
  mov    %ebx,%edi
  call   <islower@plt>
  mov    %rax,%r14
  mov    %ebx,%edi
  call   <iswlower@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L486
L441:
  mov    %ebx,%edi
  call   <isprint@plt>
  mov    %rax,%r14
  mov    0x30(%rsp),%rsi
  mov    %ebx,%edi
  call   <iswctype@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L290
L163:
  mov    %ebx,%edi
  call   <isprint@plt>
  mov    %rax,%r14
  mov    %ebx,%edi
  call   <iswprint@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L445
L26:
  mov    %ebx,%edi
  call   <ispunct@plt>
  mov    %rax,%r14
  mov    0x38(%rsp),%rsi
  mov    %ebx,%edi
  call   <iswctype@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L251
L305:
  mov    %ebx,%edi
  call   <ispunct@plt>
  mov    %rax,%r14
  mov    %ebx,%edi
  call   <iswpunct@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L194
L67:
  mov    %ebx,%edi
  call   <isspace@plt>
  mov    %rax,%r14
  mov    0x40(%rsp),%rsi
  mov    %ebx,%edi
  call   <iswctype@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L398
L51:
  mov    %ebx,%edi
  call   <isspace@plt>
  mov    %rax,%r14
  mov    %ebx,%edi
  call   <iswspace@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L36
L292:
  mov    %ebx,%edi
  call   <isupper@plt>
  mov    %rax,%r14
  mov    0x48(%rsp),%rsi
  mov    %ebx,%edi
  call   <iswctype@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L222
L434:
  mov    %ebx,%edi
  call   <isupper@plt>
  mov    %rax,%r14
  mov    %ebx,%edi
  call   <iswupper@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L396
L404:
  mov    %ebx,%edi
  call   <isxdigit@plt>
  mov    %rax,%r14
  mov    %r15,%rsi
  mov    %ebx,%edi
  call   <iswctype@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  jne    L443
L1:
  mov    %ebx,%edi
  call   <isxdigit@plt>
  mov    %rax,%r14
  mov    %ebx,%edi
  call   <iswxdigit@plt>
  test   %r14,%r14
  sete   %dl
  test   %rax,%rax
  sete   %al
  cmp    %al,%dl
  je     L386
  mov    %ebx,%edx
  lea    D17(%rip),%rsi
  mov    %r12,%rdi
  call   <printf@plt>
  mov    $0x1,%ebp
  jmp    L386
L351:
  test   %ebp,%ebp
  je     L460
L408:
  mov    %ebp,%eax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L460:
  lea    D153(%rip),%rdi
  call   <puts@plt>
  jmp    L408
```

tool_calls: name: retrieve_data
arguments: data_label: D22
datatype: string
name: retrieve_data
arguments: data_label: D24
datatype: string
name: retrieve_data
arguments: data_label: D335
datatype: string
name: retrieve_data
arguments: data_label: D323
datatype: string
name: retrieve_data
arguments: data_label: D331
datatype: string
name: retrieve_data
arguments: data_label: D181
datatype: string
name: retrieve_data
arguments: data_label: D151
datatype: string
name: retrieve_data
arguments: data_label: D296
datatype: string
name: retrieve_data
arguments: data_label: D124
datatype: string
name: retrieve_data
arguments: data_label: D66
datatype: string
name: retrieve_data
arguments: data_label: D17
datatype: string
name: retrieve_data
arguments: data_label: D339
datatype: string
name: retrieve_data
arguments: data_label: D318
datatype: string
name: retrieve_data
arguments: data_label: D6
datatype: string
name: retrieve_data
arguments: data_label: D376
datatype: string
name: retrieve_data
arguments: data_label: D153
datatype: string

tool: D22: alnum

tool: D24: alpha

tool: D335: cntrl

tool: D323: digit

tool: D331: graph

tool: D181: lower

tool: D151: print

tool: D296: punct

tool: D124: space

tool: D66: upper

tool: D17: xdigit

tool: D339: does not exist

tool: D318: `iswctype' class `%s' test for character \%o failed


tool: D6: `isw%s' test for character \%o failed


tool: D376: wctype return value != 0 for non existing property

tool: D153: All test successful!

assistant: ```c
int main(int argc, char *argv[]) {
  int result = 0;
  wctype_t bit_alnum = wctype("alnum");
  wctype_t bit_alpha = wctype("alpha");
  wctype_t bit_cntrl = wctype("cntrl");
  wctype_t bit_digit = wctype("digit");
  wctype_t bit_graph = wctype("graph");
  wctype_t bit_lower = wctype("lower");
  wctype_t bit_print = wctype("print");
  wctype_t bit_punct = wctype("punct");
  wctype_t bit_space = wctype("space");
  wctype_t bit_upper = wctype("upper");
  wctype_t bit_xdigit = wctype("xdigit");
  int ch;
  if (wctype("does not exist") != 0) {
    puts("wctype return value != 0 for non existing property");
    result = 1;
  }
  for (ch = 0; ch < 256; ++ch) {
    do {
      if ((isalnum(ch) == 0) != (iswctype(ch, bit_alnum) == 0)) {
        printf("`iswctype' class `%s' test "
               "for character \\%o failed\n",
               "alnum", ch);
        result = 1;
      }
      if ((isalnum(ch) == 0) != (iswalnum(ch) == 0)) {
        printf("`isw%s' test for character \\%o failed\n", "alnum", ch);
        result = 1;
      }
    } while (0);
    do {
      if ((isalpha(ch) == 0) != (iswctype(ch, bit_alpha) == 0)) {
        printf("`iswctype' class `%s' test "
               "for character \\%o failed\n",
               "alpha", ch);
        result = 1;
      }
      if ((isalpha(ch) == 0) != (iswalpha(ch) == 0)) {
        printf("`isw%s' test for character \\%o failed\n", "alpha", ch);
        result = 1;
      }
    } while (0);
    do {
      if ((iscntrl(ch) == 0) != (iswctype(ch, bit_cntrl) == 0)) {
        printf("`iswctype' class `%s' test "
               "for character \\%o failed\n",
               "cntrl", ch);
        result = 1;
      }
      if ((iscntrl(ch) == 0) != (iswcntrl(ch) == 0)) {
        printf("`isw%s' test for character \\%o failed\n", "cntrl", ch);
        result = 1;
      }
    } while (0);
    do {
      if ((isdigit(ch) == 0) != (iswctype(ch, bit_digit) == 0)) {
        printf("`iswctype' class `%s' test "
               "for character \\%o failed\n",
               "digit", ch);
        result = 1;
      }
      if ((isdigit(ch) == 0) != (iswdigit(ch) == 0)) {
        printf("`isw%s' test for character \\%o failed\n", "digit", ch);
        result = 1;
      }
    } while (0);
    do {
      if ((isgraph(ch) == 0) != (iswctype(ch, bit_graph) == 0)) {
        printf("`iswctype' class `%s' test "
               "for character \\%o failed\n",
               "graph", ch);
        result = 1;
      }
      if ((isgraph(ch) == 0) != (iswgraph(ch) == 0)) {
        printf("`isw%s' test for character \\%o failed\n", "graph", ch);
        result = 1;
      }
    } while (0);
    do {
      if ((islower(ch) == 0) != (iswctype(ch, bit_lower) == 0)) {
        printf("`iswctype' class `%s' test "
               "for character \\%o failed\n",
               "lower", ch);
        result = 1;
      }
      if ((islower(ch) == 0) != (iswlower(ch) == 0)) {
        printf("`isw%s' test for character \\%o failed\n", "lower", ch);
        result = 1;
      }
    } while (0);
    do {
      if ((isprint(ch) == 0) != (iswctype(ch, bit_print) == 0)) {
        printf("`iswctype' class `%s' test "
               "for character \\%o failed\n",
               "print", ch);
        result = 1;
      }
      if ((isprint(ch) == 0) != (iswprint(ch) == 0)) {
        printf("`isw%s' test for character \\%o failed\n", "print", ch);
        result = 1;
      }
    } while (0);
    do {
      if ((ispunct(ch) == 0) != (iswctype(ch, bit_punct) == 0)) {
        printf("`iswctype' class `%s' test "
               "for character \\%o failed\n",
               "punct", ch);
        result = 1;
      }
      if ((ispunct(ch) == 0) != (iswpunct(ch) == 0)) {
        printf("`isw%s' test for character \\%o failed\n", "punct", ch);
        result = 1;
      }
    } while (0);
    do {
      if ((isspace(ch) == 0) != (iswctype(ch, bit_space) == 0)) {
        printf("`iswctype' class `%s' test "
               "for character \\%o failed\n",
               "space", ch);
        result = 1;
      }
      if ((isspace(ch) == 0) != (iswspace(ch) == 0)) {
        printf("`isw%s' test for character \\%o failed\n", "space", ch);
        result = 1;
      }
    } while (0);
    do {
      if ((isupper(ch) == 0) != (iswctype(ch, bit_upper) == 0)) {
        printf("`iswctype' class `%s' test "
               "for character \\%o failed\n",
               "upper", ch);
        result = 1;
      }
      if ((isupper(ch) == 0) != (iswupper(ch) == 0)) {
        printf("`isw%s' test for character \\%o failed\n", "upper", ch);
        result = 1;
      }
    } while (0);
    do {
      if ((isxdigit(ch) == 0) != (iswctype(ch, bit_xdigit) == 0)) {
        printf("`iswctype' class `%s' test "
               "for character \\%o failed\n",
               "xdigit", ch);
        result = 1;
      }
      if ((isxdigit(ch) == 0) != (iswxdigit(ch) == 0)) {
        printf("`isw%s' test for character \\%o failed\n", "xdigit", ch);
        result = 1;
      }
    } while (0);
  }
  if (result == 0)
    puts("All test successful!");
  return result;
}
```