// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/splitter.c
// Function: gt_splitter_split_non_empty
void gt_splitter_split_non_empty(GtSplitter *s, char *string, GtUword length,
                                 char delimiter)
{

  char *end_of_token, *string_index = string;

  gt_assert(s && string);

  /* splitting */
  while (string_index < string + length &&
         (end_of_token = strchr(string_index, delimiter))) {
    gt_assert(end_of_token);
    *end_of_token = '\0';
    /* skip empty token */
    if (end_of_token > string_index) {
      if ((s->num_of_tokens + 2) * sizeof (*s->tokens) > s->allocated)
        s->tokens = gt_dynalloc(s->tokens, &s->allocated,
                                (s->num_of_tokens + 2) * sizeof (*s->tokens));
      s->tokens[s->num_of_tokens++] = string_index;
    }
    string_index = end_of_token + 1;
  }

  /* save last token if not empty*/
  if (string_index < string + length) {
    if ((s->num_of_tokens + 2) * sizeof (*s->tokens) > s->allocated)
      s->tokens = gt_dynalloc(s->tokens, &s->allocated,
                              (s->num_of_tokens + 2) * sizeof (*s->tokens));
    s->tokens[s->num_of_tokens++] = string_index;
  }
  s->tokens[s->num_of_tokens] = NULL;
}

// Assembly:
subq $0x38, %rsp
movb %cl, %al
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movb %al, 0x1f(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x16cc3
cmpq $0x0, 0x28(%rsp)
jne 0x16cfb
movq 0x19d30e(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x147392(%rip), %rsi    # 0x15e066
leaq 0x1493cd(%rip), %rdx    # 0x1600a8
leaq 0x1493f1(%rip), %rcx    # 0x1600d3
leaq 0x1493ab(%rip), %r8     # 0x160094
movl $0x4a, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x16cfd
jmp 0x16cff
movq 0x8(%rsp), %rcx
movq 0x28(%rsp), %rdx
addq 0x20(%rsp), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x7(%rsp)
jae 0x16d38
movq 0x8(%rsp), %rdi
movsbl 0x1f(%rsp), %esi
callq 0xb1f0
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
setne %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x16d45
jmp 0x16e23
jmp 0x16d47
cmpq $0x0, 0x10(%rsp)
jne 0x16d87
movq 0x19d282(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x147306(%rip), %rsi    # 0x15e066
leaq 0x14935f(%rip), %rdx    # 0x1600c6
leaq 0x149365(%rip), %rcx    # 0x1600d3
leaq 0x14931f(%rip), %r8     # 0x160094
movl $0x4f, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x16d89
movq 0x10(%rsp), %rax
movb $0x0, (%rax)
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
jbe 0x16e10
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
addq $0x2, %rax
shlq $0x3, %rax
movq 0x30(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x16deb
movq 0x30(%rsp), %rax
movq (%rax), %rdi
movq 0x30(%rsp), %rsi
addq $0x10, %rsi
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rdx
addq $0x2, %rdx
shlq $0x3, %rdx
callq 0x7f2b0
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rdx
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq 0x30(%rsp), %rsi
movq 0x8(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x8(%rsi)
movq %rdx, (%rax,%rcx,8)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x16cff
movq 0x8(%rsp), %rax
movq 0x28(%rsp), %rcx
addq 0x20(%rsp), %rcx
cmpq %rcx, %rax
jae 0x16eaa
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
addq $0x2, %rax
shlq $0x3, %rax
movq 0x30(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x16e85
movq 0x30(%rsp), %rax
movq (%rax), %rdi
movq 0x30(%rsp), %rsi
addq $0x10, %rsi
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rdx
addq $0x2, %rdx
shlq $0x3, %rdx
callq 0x7f2b0
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rdx
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq 0x30(%rsp), %rsi
movq 0x8(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x8(%rsi)
movq %rdx, (%rax,%rcx,8)
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq 0x30(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq $0x0, (%rax,%rcx,8)
addq $0x38, %rsp
retq
nopl (%rax,%rax)