user: Demonstrate the C code that generates the assembly output below:

```asm
<check_sort_criteria>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  lea    D67(%rip),%rbp
  push   %rbx
  mov    %rbp,%rsi
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbx
  mov    %rbx,%rdx
  call   <strtok_r@plt>
  test   %rax,%rax
  je     L122
  lea    D52(%rip),%r12
  lea    D54(%rip),%r13
  lea    D19(%rip),%r14
  jmp    L100
  nopw   0x0(%rax,%rax,1)
L13:
  xor    %edi,%edi
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  call   <strtok_r@plt>
  test   %rax,%rax
  je     L122
L100:
  movzbl (%rax),%edx
  cmp    $0x2b,%dl
  je     L117
  cmp    $0x2d,%dl
  jne    L95
L117:
  lea    0x1(%rax),%r15
  mov    %r12,%rsi
  mov    %r15,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L13
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L13
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L13
  lea    D63(%rip),%rsi
  mov    %r15,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L13
  lea    D65(%rip),%rsi
  mov    %r15,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L13
  lea    D66(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L85
  nopw   0x0(%rax,%rax,1)
L122:
  xor    %eax,%eax
L85:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L40
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L95:
  mov    $0xffffffff,%eax
  jmp    L85
L40:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D67
datatype: string
name: retrieve_data
arguments: data_tag: D52
datatype: string
name: retrieve_data
arguments: data_tag: D54
datatype: string
name: retrieve_data
arguments: data_tag: D19
datatype: string
name: retrieve_data
arguments: data_tag: D63
datatype: string
name: retrieve_data
arguments: data_tag: D65
datatype: string
name: retrieve_data
arguments: data_tag: D66
datatype: string

tool: D67: ,

tool: D52: upnp:class

tool: D54: dc:title

tool: D19: dc:date

tool: D63: upnp:originalTrackNumber

tool: D65: upnp:album

tool: D66: unhandled sort Criteria


assistant: ```c
int check_sort_criteria(char *sortCriteria) {
  char *item, *saveptr;
  int i, ret, reverse, title_sorted = 0;
  int ret_value = 0;
  item = strtok_r(sortCriteria, ",", &saveptr);
  for (i = 0; item != NULL; i++) {
    reverse = 0;
    if (*item == '+') {
      item++;
    } else if (*item == '-') {
      reverse = 1;
      item++;
    } else {
      {};
      ret_value = -1;
      goto unhandled_order;
    }
    if (strcasecmp(item, "upnp:class") == 0) {
    } else if (strcasecmp(item, "dc:title") == 0) {
    } else if (strcasecmp(item, "dc:date") == 0) {
    } else if (strcasecmp(item, "upnp:originalTrackNumber") == 0) {
    } else if (strcasecmp(item, "upnp:album") == 0) {
    } else {
      {};
      ret_value = -1;
      printf("unhandled sort Criteria\n");
      goto unhandled_order;
    }
  unhandled_order:
    if (ret_value == -1)
      return ret_value;
    item = strtok_r(NULL, ",", &saveptr);
  }
  return ret_value;
}
```