// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/randomcodes.c
// Function: gt_randomcodes_init
static int gt_randomcodes_init(GtRandomcodesinfo *fci,
                              const GtEncseq *encseq,
                              bool withsuftabcheck,
                              unsigned int skipshorter,
                              GtError *err)
{
  GtUword maxseqlength, maxrelpos, numofsequences;
  unsigned int bitsforrelpos, bitsforseqnum;
  bool haserr = false;

  maxseqlength = gt_encseq_max_seq_length(encseq);
  if (maxseqlength > (GtUword) skipshorter)
  {
    maxrelpos = maxseqlength - (GtUword) skipshorter;
  } else
  {
    maxrelpos = 0;
  }
  bitsforrelpos = gt_determinebitspervalue(maxrelpos);
  fci->buf.snrp = gt_seqnumrelpos_new(bitsforrelpos, encseq);
  fci->buf.markprefix = NULL;
  fci->buf.marksuffix = NULL;
  fci->buf.accum_all = true;
  numofsequences = gt_encseq_num_of_sequences(encseq);
  gt_assert(numofsequences > 0);
  bitsforseqnum = gt_determinebitspervalue(numofsequences - 1);
  if (bitsforseqnum + bitsforrelpos > (unsigned int) GT_INTWORDSIZE)
  {
    gt_seqnumrelpos_delete(fci->buf.snrp);
    fci->buf.snrp = NULL;
    gt_error_set(err, "cannot process encoded sequences with " GT_WU
                 " sequences of length up to " GT_WU " (%u+%u bits)",
                 numofsequences, maxseqlength, bitsforseqnum, bitsforrelpos);
    haserr = true;
  }
  fci->fcsl = gt_firstcodes_spacelog_new();
  fci->spmsuftab = NULL;
  fci->radixsort_code = NULL;
  fci->radixsort_codepos = NULL;
  fci->buf.spaceGtUwordPair = NULL;
  fci->buf.spaceGtUword = NULL;
  fci->mappedallrandomcodes = NULL;
  fci->mappedleftborder = NULL;
  GT_FCI_ADDWORKSPACE(fci->fcsl, "encseq", (size_t)
                      gt_encseq_sizeofrep(encseq));
  if (withsuftabcheck)
  {
    gt_firstcodes_spacelog_start_diff(fci->fcsl);
  }
  fci->allrandomcodes = NULL;
  gt_randomcodes_countocc_setnull(&fci->tab);
  fci->countcodes = 0;
  fci->total_count = 0;
  fci->total_inserted = 0;
  fci->bitsforposref = bitsforseqnum + bitsforrelpos;
  GT_INITARRAY(&fci->binsearchcache, GtIndexwithcodeRC);
  return haserr ? -1 : 0;
}

// Assembly:
subq $0x58, %rsp
movb %dl, %al
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
andb $0x1, %al
movb %al, 0x47(%rsp)
movl %ecx, 0x40(%rsp)
movq %r8, 0x38(%rsp)
movb $0x0, 0x17(%rsp)
movq 0x48(%rsp), %rdi
callq 0xb10b0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movl 0x40(%rsp), %ecx
cmpq %rcx, %rax
jbe 0x26dc64
movq 0x30(%rsp), %rax
movl 0x40(%rsp), %ecx
subq %rcx, %rax
movq %rax, 0x28(%rsp)
jmp 0x26dc6d
movq $0x0, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0xec660
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %edi
movq 0x48(%rsp), %rsi
callq 0x2b1140
movq %rax, %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0xf8(%rax)
movq 0x50(%rsp), %rax
movq $0x0, 0xd0(%rax)
movq 0x50(%rsp), %rax
movq $0x0, 0xd8(%rax)
movq 0x50(%rsp), %rax
movb $0x1, 0x108(%rax)
movq 0x48(%rsp), %rdi
callq 0xa9d50
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
ja 0x26dd13
movq 0x3ce2be(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2a8327(%rip), %rsi    # 0x516013
leaq 0x30a724(%rip), %rdx    # 0x578417
leaq 0x310f91(%rip), %rcx    # 0x57ec8b
leaq 0x310dd4(%rip), %r8     # 0x57ead5
movl $0x388, %r9d            # imm = 0x388
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x26dd15
movq 0x20(%rsp), %rdi
subq $0x1, %rdi
callq 0xec660
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
addl 0x1c(%rsp), %eax
cmpl $0x40, %eax
jbe 0x26dd81
movq 0x50(%rsp), %rax
movq 0xf8(%rax), %rdi
callq 0x2b11b0
movq 0x50(%rsp), %rax
movq $0x0, 0xf8(%rax)
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rdx
movq 0x30(%rsp), %rcx
movl 0x18(%rsp), %r8d
movl 0x1c(%rsp), %r9d
leaq 0x30a6c8(%rip), %rsi    # 0x57843d
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x17(%rsp)
callq 0x4be800
movq %rax, %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0xa8(%rax)
movq 0x50(%rsp), %rax
movq $0x0, 0x88(%rax)
movq 0x50(%rsp), %rax
movq $0x0, 0x78(%rax)
movq 0x50(%rsp), %rax
movq $0x0, 0x80(%rax)
movq 0x50(%rsp), %rax
movq $0x0, 0xe8(%rax)
movq 0x50(%rsp), %rax
movq $0x0, 0xf0(%rax)
movq 0x50(%rsp), %rax
movq $0x0, 0x98(%rax)
movq 0x50(%rsp), %rax
movq $0x0, 0x90(%rax)
movq 0x50(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rdi
callq 0xc2d70
movq 0x8(%rsp), %rdi
movl $0x39c, %esi            # imm = 0x39C
leaq 0x310ca7(%rip), %rdx    # 0x57ead5
movl $0x1, %r9d
leaq 0x2ebb3b(%rip), %r8     # 0x559976
movl %r9d, %ecx
movq %rax, (%rsp)
callq 0x4bea60
testb $0x1, 0x47(%rsp)
je 0x26de5f
movq 0x50(%rsp), %rax
movq 0xa8(%rax), %rdi
callq 0x4be880
movq 0x50(%rsp), %rax
movq $0x0, 0xa0(%rax)
movq 0x50(%rsp), %rdi
addq $0x110, %rdi            # imm = 0x110
callq 0x4dbff0
movq 0x50(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x50(%rsp), %rax
movq $0x0, (%rax)
movq 0x50(%rsp), %rax
movq $0x0, 0x8(%rax)
movl 0x18(%rsp), %ecx
addl 0x1c(%rsp), %ecx
movq 0x50(%rsp), %rax
movl %ecx, 0x74(%rax)
movq 0x50(%rsp), %rax
movq $0x0, 0x48(%rax)
movq 0x50(%rsp), %rax
movq $0x0, 0x58(%rax)
movq 0x50(%rsp), %rax
movq $0x0, 0x60(%rax)
movb 0x17(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)