// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/cgr_spacedseed.c
// Function: spacedseed_new
static Spacedseed *spacedseed_new(const char *seedstring, GtError *err)
{
  Spacedseed *spse;
  GtUword idx, fillindex;
  bool haserr = false;

  spse = gt_malloc(sizeof (*spse));
  spse->seedwidth = spse->numofonepositions = 0;
  spse->seedbitvector = 0;
  spse->onepositions = NULL;
  for (idx = 0; seedstring[idx] != '\0'; idx++)
  {
    if (spse->seedwidth == (GtUword) GT_INTWORDSIZE)
    {
      gt_error_set(err,"space seed cannot be longer than %u",
                       (unsigned int) GT_INTWORDSIZE);
      haserr = true;
      break;
    }
    spse->seedwidth++;
    if (seedstring[idx] == '1')
    {
      spse->numofonepositions++;
      spse->seedbitvector |= GT_ITHBIT(idx);
    }
  }
  if (!haserr)
  {
    spse->onepositions = gt_malloc(sizeof (*spse->onepositions) *
                                   spse->numofonepositions);
    for (fillindex = 0, idx = 0; seedstring[idx] != '\0'; idx++)
    {
      if (seedstring[idx] == '1')
      {
        spse->onepositions[fillindex++] = (unsigned char) idx;
      }
    }
  }
  if (haserr)
  {
    gt_free(spse);
    return NULL;
  }
  return spse;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movb $0x0, 0x7(%rsp)
movl $0x20, %edi
leaq 0x36a389(%rip), %rsi    # 0x571418
movl $0x2b, %edx
callq 0xe80f0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x18(%rsp), %rax
movq $0x0, (%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0x10(%rax)
movq $0x0, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq 0x10(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x207185
movq 0x18(%rsp), %rax
cmpq $0x40, (%rax)
jne 0x20711b
movq 0x20(%rsp), %rdi
leaq 0x36a338(%rip), %rsi    # 0x571440
movl $0x40, %edx
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x7(%rsp)
jmp 0x207185
movq 0x18(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x28(%rsp), %rax
movq 0x10(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x31, %eax
jne 0x207170
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
shrq %cl, %rax
movq %rax, %rcx
movq 0x18(%rsp), %rax
orq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
jmp 0x207172
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x2070da
testb $0x1, 0x7(%rsp)
jne 0x20722a
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdi
shlq $0x0, %rdi
leaq 0x36a274(%rip), %rsi    # 0x571418
movl $0x42, %edx
callq 0xe80f0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq 0x10(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x207228
movq 0x28(%rsp), %rax
movq 0x10(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x31, %eax
jne 0x207216
movq 0x10(%rsp), %rax
movb %al, %dl
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rsp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x8(%rsp)
movb %dl, (%rax,%rcx)
jmp 0x207218
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x2071cc
jmp 0x20722a
testb $0x1, 0x7(%rsp)
je 0x207252
movq 0x18(%rsp), %rdi
leaq 0x36a1db(%rip), %rsi    # 0x571418
movl $0x4d, %edx
callq 0xe88c0
movq $0x0, 0x30(%rsp)
jmp 0x20725c
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)