user: Translate the below assembly code into C programming language:

```asm
<ksplit_core>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  sub    $0x28,%rsp
  mov    (%rdx),%eax
  mov    %rdx,0x10(%rsp)
  mov    %eax,0x8(%rsp)
  mov    (%rcx),%rax
  mov    %rcx,0x18(%rsp)
  mov    %rax,(%rsp)
  call   <strlen@plt>
  test   %eax,%eax
  js     L269
  movl   $0x0,0xc(%rsp)
  mov    %eax,%ebx
  xor    %r13d,%r13d
  xor    %r14d,%r14d
  xor    %r15d,%r15d
  jmp    L30
L262:
  cmp    %edi,%ebp
  je     L149
  test   %dil,%dil
  je     L149
  cmp    %r13d,%ebp
  je     L212
  test   %r13d,%r13d
  mov    %edi,%r13d
  je     L212
  cs nopw 0x0(%rax,%rax,1)
L35:
  add    $0x1,%r15d
  add    $0x1,%r12
  cmp    %r15d,%ebx
  jl     L145
L30:
  movsbl (%r12),%edi
  test   %ebp,%ebp
  jne    L262
  call   <isspace@plt>
  mov    %r13d,%edi
  test   %rax,%rax
  jne    L270
  cmpb   $0x0,(%r12)
  jne    L260
L270:
  call   <isgraph@plt>
  test   %rax,%rax
  jne    L46
  add    $0x1,%r15d
  movsbl (%r12),%r13d
  add    $0x1,%r12
  cmp    %r15d,%ebx
  jge    L30
L145:
  mov    0x10(%rsp),%rax
  mov    0x8(%rsp),%esi
  mov    %esi,(%rax)
  mov    0x18(%rsp),%rax
  mov    (%rsp),%rsi
  mov    %rsi,(%rax)
  add    $0x28,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L149:
  test   %r13d,%r13d
  je     L298
  cmp    %r13d,%ebp
  je     L298
  movb   $0x0,(%r12)
  cmp    %r14d,0x8(%rsp)
  je     L288
L34:
  mov    (%rsp),%rdx
  mov    0xc(%rsp),%ecx
  movslq %r14d,%rax
  add    $0x1,%r14d
  mov    %ecx,(%rdx,%rax,4)
  movsbl (%r12),%r13d
  jmp    L35
  nopw   0x0(%rax,%rax,1)
L298:
  mov    %edi,%r13d
  jmp    L35
L46:
  movb   $0x0,(%r12)
  cmp    %r14d,0x8(%rsp)
  je     L96
L283:
  mov    (%rsp),%rsi
  mov    0xc(%rsp),%edx
  movslq %r14d,%rax
  add    $0x1,%r14d
  mov    %edx,(%rsi,%rax,4)
  movsbl (%r12),%r13d
  jmp    L35
  nopl   0x0(%rax)
L212:
  mov    %edi,%r13d
L109:
  mov    %r15d,0xc(%rsp)
  jmp    L35
  nopl   (%rax)
L288:
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jne    L115
  movl   $0x2,0x8(%rsp)
  mov    $0x8,%esi
L11:
  mov    (%rsp),%rdi
  call   <realloc@plt>
  mov    %rax,(%rsp)
  jmp    L34
  nopw   0x0(%rax,%rax,1)
L260:
  call   <isspace@plt>
  test   %r13d,%r13d
  movsbl (%r12),%r13d
  je     L109
  test   %rax,%rax
  jne    L109
  jmp    L35
  nopl   0x0(%rax)
L115:
  add    %eax,%eax
  mov    %eax,0x8(%rsp)
  lea    0x0(,%rax,4),%esi
  jmp    L11
  nop
L96:
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jne    L296
  movl   $0x2,0x8(%rsp)
  mov    $0x8,%esi
L18:
  mov    (%rsp),%rdi
  call   <realloc@plt>
  mov    %rax,(%rsp)
  jmp    L283
  nopw   0x0(%rax,%rax,1)
L296:
  add    %eax,%eax
  mov    %eax,0x8(%rsp)
  lea    0x0(,%rax,4),%esi
  jmp    L18
  nop
L269:
  xor    %r14d,%r14d
  jmp    L145
```

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) {
                max = max ? max << 1 : 2;
                offsets = (int *)realloc(offsets, sizeof(int) * max);
              }
              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) {
                max = max ? max << 1 : 2;
                offsets = (int *)realloc(offsets, sizeof(int) * max);
              }
              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;
}
```