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

```asm
<get_cpu_interval>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  lea    D19(%rip),%r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x48,%rsp
  mov    %edi,0x1c(%rsp)
  lea    0x28(%rsp),%r13
  mov    %rsi,%rdi
  mov    %r12,%rsi
  mov    %r13,%rdx
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  call   <strtok_r@plt>
  test   %ebx,%ebx
  jle    L50
  lea    0x0(,%rbx,4),%edi
  mov    %rax,%r15
  call   <malloc@plt>
  movslq %ebx,%rdx
  mov    $0xff,%esi
  shl    $0x2,%rdx
  mov    %rax,%rdi
  mov    %rax,0x10(%rsp)
  call   <memset@plt>
  test   %r15,%r15
  je     L50
  lea    0x30(%rsp),%rbp
  lea    D21(%rip),%rbx
  nopw   0x0(%rax,%rax,1)
L118:
  mov    %r15,%rdi
  call   <strlen@plt>
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %r15,%rsi
  mov    %rax,%r14
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %r14,%rdi
  call   <strtok_r@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L102
  xor    %edi,%edi
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  call   <strtok_r@plt>
  test   %rax,%rax
  mov    %rax,0x8(%rsp)
  je     L102
  mov    %r15,%rdi
  call   <atoi@plt>
  mov    0x8(%rsp),%rdi
  mov    %eax,%r15d
  call   <atoi@plt>
  xor    %ecx,%ecx
  test   %r15d,%r15d
  cmovns %r15d,%ecx
  cmp    %eax,%ecx
  jge    L102
  test   %r15d,%r15d
  js     L102
  mov    0x1c(%rsp),%edx
  cmp    %eax,%edx
  jle    L102
  cmp    %eax,%r15d
  mov    %eax,%ecx
  cmovge %r15d,%ecx
  cmp    %ecx,%edx
  jg     L111
  cs nopw 0x0(%rax,%rax,1)
L102:
  mov    %r13,%rdx
  mov    %r12,%rsi
  xor    %edi,%edi
  call   <strtok_r@plt>
  mov    %rax,%r15
  test   %rax,%rax
  jne    L118
L164:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L174
  mov    0x10(%rsp),%rax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L50:
  movq   $0x0,0x10(%rsp)
  jmp    L164
  nopl   0x0(%rax,%rax,1)
L111:
  cmp    %eax,%r15d
  jg     L102
  mov    %eax,%ecx
  sub    %r15d,%ecx
  lea    0x1(%rcx),%r8d
  cmp    $0x2,%ecx
  jbe    L37
  mov    0x10(%rsp),%rdx
  movslq %r15d,%rcx
  movdqa D24(%rip),%xmm0
  lea    (%rdx,%rcx,4),%rsi
  mov    %r8d,%ecx
  shr    $0x2,%ecx
  lea    -0x1(%rcx),%edi
  lea    0x10(%rsi),%rcx
  shl    $0x4,%rdi
  add    %rcx,%rdi
  jmp    L35
  nopl   (%rax)
L45:
  add    $0x10,%rcx
L35:
  movups %xmm0,(%rsi)
  mov    %rcx,%rsi
  cmp    %rdi,%rcx
  jne    L45
  mov    %r8d,%ecx
  and    $0xfffffffc,%ecx
  add    %ecx,%r15d
  cmp    %ecx,%r8d
  je     L102
L37:
  mov    0x10(%rsp),%rdx
  movslq %r15d,%rcx
  lea    0x0(,%rcx,4),%rsi
  movl   $0x1,(%rdx,%rcx,4)
  lea    0x1(%r15),%ecx
  cmp    %eax,%ecx
  jg     L102
  movl   $0x1,0x4(%rdx,%rsi,1)
  mov    %rdx,%rcx
  lea    0x2(%r15),%edx
  cmp    %edx,%eax
  jl     L102
  movl   $0x1,0x8(%rcx,%rsi,1)
  jmp    L102
L174:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D19
datatype: string
name: disassemble_data
arguments: tag: D21
datatype: string
name: disassemble_data
arguments: tag: D24
datatype: byte[16]

tool: D19: ,

tool: D21: -

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

assistant: ```c
int *get_cpu_interval(int max_cores, char *siblings) {
  int *sibling_array, i;
  char *savep1, *savep2;
  char *tok = strtok_r(siblings, ",", &savep1), *tokcpy;
  int high, low;
  char *interval1, *interval2;
  if (max_cores < 1)
    return NULL;
  sibling_array = malloc(sizeof(int) * max_cores);
  for (i = 0; i < max_cores; i++)
    sibling_array[i] = -1;
  if (tok == NULL)
    return 0;
  do {
    tokcpy = (char *)malloc(sizeof(char) * strlen(tok));
    strcpy(tokcpy, tok);
    interval1 = strtok_r(tokcpy, "-", &savep2);
    if (interval1 != NULL) {
      interval2 = strtok_r(NULL, "-", &savep2);
      if (interval2 != NULL) {
        low = atoi(interval1);
        high = atoi(interval2);
        if (low < high && high > 0 && low >= 0 && high < max_cores && low < max_cores && high < max_cores) {
          for (i = low; i <= high; i++)
            sibling_array[i] = 1;
        }
      }
    }
    tok = strtok_r(NULL, ",", &savep1);
  } while (tok != NULL);
  return sibling_array;
}
```