user: 请从给定的汇编指令推导出C源代码：

```asm
<ksplit_core>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %esi,%r13d
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    (%rdx),%eax
  mov    %rdx,0x18(%rsp)
  mov    %eax,0x8(%rsp)
  mov    (%rcx),%rax
  mov    %rcx,0x10(%rsp)
  mov    %rax,(%rsp)
  call   <strlen@plt>
  test   %eax,%eax
  js     L306
  movl   $0x0,0xc(%rsp)
  mov    %eax,%ebx
  xor    %r14d,%r14d
  xor    %r12d,%r12d
  xor    %r15d,%r15d
  jmp    L169
  nopl   0x0(%rax)
L34:
  test   %dil,%dil
  je     L171
  cmp    %edi,%r13d
  je     L171
  cmp    %r14d,%r13d
  je     L203
  test   %r14d,%r14d
  mov    %edi,%r14d
  je     L203
  nop
L190:
  add    $0x1,%r15d
  add    $0x1,%rbp
  cmp    %r15d,%ebx
  jl     L195
L169:
  movsbl 0x0(%rbp),%edi
  test   %r13d,%r13d
  jne    L34
  call   <isspace@plt>
  mov    %r14d,%edi
  test   %rax,%rax
  jne    L319
  cmpb   $0x0,0x0(%rbp)
  jne    L219
L319:
  call   <isgraph@plt>
  test   %rax,%rax
  jne    L237
  add    $0x1,%r15d
  movsbl 0x0(%rbp),%r14d
  add    $0x1,%rbp
  cmp    %r15d,%ebx
  jge    L169
  nopl   (%rax)
L195:
  mov    0x18(%rsp),%rax
  mov    0x8(%rsp),%ecx
  mov    %ecx,(%rax)
L69:
  mov    0x10(%rsp),%rax
  mov    (%rsp),%rsi
  mov    %rsi,(%rax)
  add    $0x28,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L171:
  test   %r14d,%r14d
  je     L255
  cmp    %r14d,%r13d
  je     L255
  movb   $0x0,0x0(%rbp)
  cmp    %r12d,0x8(%rsp)
  je     L137
L305:
  mov    (%rsp),%rdx
  mov    0xc(%rsp),%ecx
  movslq %r12d,%rax
  add    $0x1,%r12d
  mov    %ecx,(%rdx,%rax,4)
  movsbl 0x0(%rbp),%r14d
  jmp    L190
  nopl   0x0(%rax)
L255:
  mov    %edi,%r14d
  jmp    L190
L237:
  movb   $0x0,0x0(%rbp)
  cmp    %r12d,0x8(%rsp)
  je     L156
L247:
  mov    (%rsp),%rsi
  mov    0xc(%rsp),%edx
  movslq %r12d,%rax
  add    $0x1,%r12d
  mov    %edx,(%rsi,%rax,4)
  movsbl 0x0(%rbp),%r14d
  jmp    L190
  nopl   0x0(%rax,%rax,1)
L203:
  mov    %edi,%r14d
L206:
  mov    %r15d,0xc(%rsp)
  jmp    L190
  nopl   (%rax)
L137:
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  je     L143
  add    %eax,%eax
  mov    %eax,0x8(%rsp)
  lea    0x0(,%rax,4),%esi
L300:
  mov    (%rsp),%rdi
  call   <realloc@plt>
  test   %rax,%rax
  je     L184
  mov    %rax,(%rsp)
  jmp    L305
  nopl   0x0(%rax)
L219:
  call   <isspace@plt>
  test   %r14d,%r14d
  movsbl 0x0(%rbp),%r14d
  je     L206
  test   %rax,%rax
  jne    L206
  jmp    L190
  nopl   0x0(%rax)
L156:
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  je     L310
  add    %eax,%eax
  mov    %eax,0x8(%rsp)
  lea    0x0(,%rax,4),%esi
L65:
  mov    (%rsp),%rdi
  call   <realloc@plt>
  test   %rax,%rax
  je     L243
  mov    %rax,(%rsp)
  jmp    L247
  nopl   0x0(%rax)
L143:
  movl   $0x2,0x8(%rsp)
  mov    $0x8,%esi
  jmp    L300
  nop
L310:
  movl   $0x2,0x8(%rsp)
  mov    $0x8,%esi
  jmp    L65
L184:
  mov    (%rsp),%rdi
  xor    %r12d,%r12d
  call   <free@plt>
  movq   $0x0,(%rsp)
  jmp    L69
L243:
  mov    (%rsp),%rdi
  xor    %r12d,%r12d
  call   <free@plt>
  movq   $0x0,(%rsp)
  jmp    L69
L306:
  xor    %r12d,%r12d
  jmp    L195
```

assistant: ```c
int ksplit_core(char *s, int delimiter, int *_max, int **_offsets) {
  int i, n, max, last_char, last_start, *offsets, l;
  n = 0;
  max = *_max;
  offsets = *_offsets;
  l = strlen(s);
  for (i = 0, last_char = last_start = 0; i <= l; ++i) {
    if (delimiter == 0) {
      if (isspace(s[i]) || s[i] == 0) {
        if (isgraph(last_char))
          do {
            if (_offsets) {
              s[i] = 0;
              if (n == max) {
                int *tmp;
                max = max ? max << 1 : 2;
                if ((tmp = (int *)realloc(offsets, sizeof(int) * max))) {
                  offsets = tmp;
                } else {
                  free(offsets);
                  *_offsets = NULL;
                  return 0;
                }
              }
              offsets[n++] = last_start;
            } else
              ++n;
          } while (0);
      } else {
        if (isspace(last_char) || last_char == 0)
          last_start = i;
      }
    } else {
      if (s[i] == delimiter || s[i] == 0) {
        if (last_char != 0 && last_char != delimiter)
          do {
            if (_offsets) {
              s[i] = 0;
              if (n == max) {
                int *tmp;
                max = max ? max << 1 : 2;
                if ((tmp = (int *)realloc(offsets, sizeof(int) * max))) {
                  offsets = tmp;
                } else {
                  free(offsets);
                  *_offsets = NULL;
                  return 0;
                }
              }
              offsets[n++] = last_start;
            } else
              ++n;
          } while (0);
      } else {
        if (last_char == delimiter || last_char == 0)
          last_start = i;
      }
    }
    last_char = s[i];
  }
  *_max = max;
  *_offsets = offsets;
  return n;
}
```