// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/cstr.c
// Function: gt_cstr_split
char** gt_cstr_split(const char *cstr, char sep)
{
  size_t n = 0;
  char **res;
  GtUword i,
                lastpos = 0,
                respos = 0;
  gt_assert(cstr);

  for (i = 0; i < strlen(cstr); i++) {
    if (cstr[i] == sep)
      n++;
  }
  n++;
  res = gt_calloc(n+1, sizeof (char*));
  for (i = 0; i < strlen(cstr)+1; i++) {
    if (cstr[i] == sep || cstr[i] == '\0') {
      if (i != 0)
        res[respos] = gt_calloc(i - lastpos + 1, sizeof (char));
      if (i - lastpos >= 1)
        memcpy(res[respos], cstr + lastpos, (i - lastpos) * sizeof (char));
      lastpos = i+1;
      respos++;
    }
  }
  gt_assert(respos == n);
  res[respos] = NULL;
  return res;
}

// Assembly:
subq $0x48, %rsp
movb %sil, %al
movq %rdi, 0x40(%rsp)
movb %al, 0x3f(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0x7c1fb
movq 0x137e0e(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0xe1e92(%rip), %rsi     # 0x15e066
leaq 0xe488b(%rip), %rdx     # 0x160a66
leaq 0xf1386(%rip), %rcx     # 0x16d568
leaq 0xf138d(%rip), %r8      # 0x16d576
movl $0x21, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x7c1fd
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rdi
callq 0xb240
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x7c25e
movq 0x40(%rsp), %rax
movq 0x20(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movsbl 0x3f(%rsp), %ecx
cmpl %ecx, %eax
jne 0x7c24c
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x7c24e
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x7c206
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
addq $0x1, %rdi
movl $0x8, %esi
leaq 0xf12f5(%rip), %rdx     # 0x16d576
movl $0x28, %ecx
callq 0xd5b0
movq %rax, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x40(%rsp), %rdi
callq 0xb240
movq %rax, %rcx
movq (%rsp), %rax
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x7c397
movq 0x40(%rsp), %rax
movq 0x20(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movsbl 0x3f(%rsp), %ecx
cmpl %ecx, %eax
je 0x7c2ee
movq 0x40(%rsp), %rax
movq 0x20(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x7c382
cmpq $0x0, 0x20(%rsp)
je 0x7c32b
movq 0x20(%rsp), %rdi
subq 0x18(%rsp), %rdi
addq $0x1, %rdi
movl $0x1, %esi
leaq 0xf1266(%rip), %rdx     # 0x16d576
movl $0x2c, %ecx
callq 0xd5b0
movq %rax, %rdx
movq 0x28(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x20(%rsp), %rax
subq 0x18(%rsp), %rax
cmpq $0x1, %rax
jb 0x7c366
movq 0x28(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x40(%rsp), %rsi
addq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
subq 0x18(%rsp), %rdx
shlq $0x0, %rdx
callq 0xb500
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x7c384
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x7c299
jmp 0x7c399
movq 0x10(%rsp), %rax
cmpq 0x30(%rsp), %rax
je 0x7c3dd
movq 0x137c2c(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0xe1cb0(%rip), %rsi     # 0x15e066
leaq 0xf11c9(%rip), %rdx     # 0x16d586
leaq 0xf11a4(%rip), %rcx     # 0x16d568
leaq 0xf11ab(%rip), %r8      # 0x16d576
movl $0x33, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x7c3df
movq 0x28(%rsp), %rax
movq 0x10(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
movq 0x28(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax,%rax)