user: 请将以下的汇编代码转换成C语言代码：

```asm
<check_sort_criteria>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x20(%rbp)
  movl   $0x0,-0x24(%rbp)
  lea    -0x18(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  lea    D18(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strtok_r@plt>
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L117
L8:
  movl   $0x0,-0x1c(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  jne    L114
  addq   $0x1,-0x10(%rbp)
  jmp    L147
L114:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L120
  movl   $0x1,-0x1c(%rbp)
  addq   $0x1,-0x10(%rbp)
  jmp    L147
L120:
  movl   $0xffffffff,-0x24(%rbp)
  jmp    L23
L147:
  mov    -0x10(%rbp),%rax
  lea    D32(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L23
  mov    -0x10(%rbp),%rax
  lea    D68(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L23
  mov    -0x10(%rbp),%rax
  lea    D16(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L23
  mov    -0x10(%rbp),%rax
  lea    D29(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L23
  mov    -0x10(%rbp),%rax
  lea    D27(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L23
  movl   $0xffffffff,-0x24(%rbp)
  lea    D76(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  nop
L23:
  cmpl   $0xffffffff,-0x24(%rbp)
  jne    L48
  mov    -0x24(%rbp),%eax
  jmp    L105
L48:
  lea    -0x18(%rbp),%rax
  mov    %rax,%rdx
  lea    D18(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok_r@plt>
  mov    %rax,-0x10(%rbp)
  addl   $0x1,-0x28(%rbp)
L117:
  cmpq   $0x0,-0x10(%rbp)
  jne    L8
  mov    -0x24(%rbp),%eax
L105:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L14
  call   <__stack_chk_fail@plt>
L14:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D18
type_infered: string
name: extract_symbolic_data
arguments: data_label: D32
type_infered: string
name: extract_symbolic_data
arguments: data_label: D68
type_infered: string
name: extract_symbolic_data
arguments: data_label: D16
type_infered: string
name: extract_symbolic_data
arguments: data_label: D29
type_infered: string
name: extract_symbolic_data
arguments: data_label: D27
type_infered: string
name: extract_symbolic_data
arguments: data_label: D76
type_infered: string

tool: D18: ,

tool: D32: upnp:class

tool: D68: dc:title

tool: D16: dc:date

tool: D29: upnp:originalTrackNumber

tool: D27: upnp:album

tool: D76: 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;
}
```