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

```asm
<ksplit_core>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,%rbx
  mov    %esi,%r13d
  mov    %rdx,0x28(%rsp)
  mov    %rcx,0x20(%rsp)
  mov    (%rdx),%eax
  mov    %eax,0x10(%rsp)
  mov    (%rcx),%rax
  mov    %rax,0x8(%rsp)
  call   <strlen@plt>
  test   %eax,%eax
  js     L120
  mov    %eax,%r14d
  movl   $0x0,0x14(%rsp)
  mov    $0x0,%r12d
  mov    $0x0,%r15d
  mov    $0x0,%ebp
  jmp    L232
L76:
  mov    %rbx,0x18(%rsp)
  movsbl (%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L212
  cmpb   $0x0,(%rbx)
  jne    L50
L212:
  mov    %r12d,%edi
  call   <isgraph@plt>
  test   %rax,%rax
  je     L204
  mov    0x18(%rsp),%rax
  movb   $0x0,(%rax)
  cmp    0x10(%rsp),%r15d
  je     L130
L34:
  movslq %r15d,%rax
  mov    0x8(%rsp),%rcx
  mov    0x14(%rsp),%esi
  mov    %esi,(%rcx,%rax,4)
  lea    0x1(%r15),%r15d
  jmp    L204
L130:
  mov    0x10(%rsp),%esi
  lea    (%rsi,%rsi,1),%eax
  test   %esi,%esi
  mov    $0x2,%ecx
  cmove  %ecx,%eax
  mov    %eax,0x10(%rsp)
  lea    0x0(,%rax,4),%esi
  mov    0x8(%rsp),%rdi
  call   <realloc@plt>
  test   %rax,%rax
  je     L36
  mov    %rax,0x8(%rsp)
  jmp    L34
L36:
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  mov    %r13d,%r15d
  movq   $0x0,0x8(%rsp)
  jmp    L16
L50:
  mov    %r12d,%edi
  call   <isspace@plt>
  test   %r12d,%r12d
  je     L136
  test   %rax,%rax
  je     L204
L136:
  mov    %ebp,0x14(%rsp)
  jmp    L204
L53:
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  movq   $0x0,0x8(%rsp)
  mov    $0x0,%r15d
  jmp    L16
L74:
  movslq %r15d,%rax
  mov    0x8(%rsp),%rcx
  mov    0x14(%rsp),%esi
  mov    %esi,(%rcx,%rax,4)
  lea    0x1(%r15),%r15d
L204:
  movsbl (%rbx),%r12d
  add    $0x1,%ebp
  add    $0x1,%rbx
  cmp    %ebp,%r14d
  jl     L14
L232:
  test   %r13d,%r13d
  je     L76
  mov    %rbx,%rdx
  movzbl (%rbx),%eax
  test   %al,%al
  je     L146
  movsbl %al,%eax
  cmp    %r13d,%eax
  jne    L101
L146:
  test   %r12d,%r12d
  je     L204
  cmp    %r12d,%r13d
  je     L204
  movb   $0x0,(%rdx)
  cmp    0x10(%rsp),%r15d
  jne    L74
  mov    0x10(%rsp),%ecx
  lea    (%rcx,%rcx,1),%eax
  test   %ecx,%ecx
  mov    $0x2,%esi
  cmove  %esi,%eax
  mov    %eax,0x10(%rsp)
  lea    0x0(,%rax,4),%esi
  mov    0x8(%rsp),%rdi
  call   <realloc@plt>
  test   %rax,%rax
  je     L53
  mov    %rax,0x8(%rsp)
  jmp    L74
L101:
  cmp    %r12d,%r13d
  je     L115
  test   %r12d,%r12d
  jne    L204
L115:
  mov    %ebp,0x14(%rsp)
  jmp    L204
L120:
  mov    $0x0,%r15d
L14:
  mov    0x28(%rsp),%rax
  mov    0x10(%rsp),%esi
  mov    %esi,(%rax)
L16:
  mov    0x20(%rsp),%rax
  mov    0x8(%rsp),%rdx
  mov    %rdx,(%rax)
  mov    %r15d,%eax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

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;
}
```