// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/splitter.c
// Function: gt_splitter_split
void gt_splitter_split(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';
    if ((s->num_of_tokens + 1) * sizeof (char*) > s->allocated)
      s->tokens = gt_dynalloc(s->tokens, &s->allocated,
                              (s->num_of_tokens + 1) * sizeof (char*));
    s->tokens[s->num_of_tokens++] = string_index;
    string_index = end_of_token + 1;
  }

  /* save last token */
  if ((s->num_of_tokens + 2) * sizeof (char*) > s->allocated)
    s->tokens = gt_dynalloc(s->tokens, &s->allocated,
                            (s->num_of_tokens + 2) * sizeof (char*));
  s->tokens[s->num_of_tokens++] = string_index;
  s->tokens[s->num_of_tokens]   = NULL;

  gt_assert(s->num_of_tokens);
}

// 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 0x16a63
cmpq $0x0, 0x28(%rsp)
jne 0x16a9b
movq 0x19d56e(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x1475f2(%rip), %rsi    # 0x15e066
leaq 0x14962d(%rip), %rdx    # 0x1600a8
leaq 0x149632(%rip), %rcx    # 0x1600b4
leaq 0x14960b(%rip), %r8     # 0x160094
movl $0x2c, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x16a9d
jmp 0x16a9f
movq 0x8(%rsp), %rcx
movq 0x28(%rsp), %rdx
addq 0x20(%rsp), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x7(%rsp)
jae 0x16ad8
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 0x16ae5
jmp 0x16bb7
jmp 0x16ae7
cmpq $0x0, 0x10(%rsp)
jne 0x16b27
movq 0x19d4e2(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x147566(%rip), %rsi    # 0x15e066
leaq 0x1495bf(%rip), %rdx    # 0x1600c6
leaq 0x1495a6(%rip), %rcx    # 0x1600b4
leaq 0x14957f(%rip), %r8     # 0x160094
movl $0x31, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x16b29
movq 0x10(%rsp), %rax
movb $0x0, (%rax)
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
addq $0x1, %rax
shlq $0x3, %rax
movq 0x30(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x16b7f
movq 0x30(%rsp), %rax
movq (%rax), %rdi
movq 0x30(%rsp), %rsi
addq $0x10, %rsi
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rdx
addq $0x1, %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 0x16a9f
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
addq $0x2, %rax
shlq $0x3, %rax
movq 0x30(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x16c05
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)
movq 0x30(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x16c87
movq 0x19d382(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x147406(%rip), %rsi    # 0x15e066
leaq 0x1494b0(%rip), %rdx    # 0x160117
leaq 0x149446(%rip), %rcx    # 0x1600b4
leaq 0x14941f(%rip), %r8     # 0x160094
movl $0x41, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x16c89
addq $0x38, %rsp
retq
nop