// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/tyr-map.c
// Function: gt_tyrcountinfo_new
Tyrcountinfo *gt_tyrcountinfo_new(const Tyrindex *tyrindex,
                                  const char *tyrindexname,
                                  GtError *err)
{
  size_t numofbytes;
  void *tmp;
  bool haserr = false;
  Tyrcountinfo *tyrcountinfo;

  gt_error_check(err);
  tyrcountinfo = gt_malloc(sizeof *tyrcountinfo);
  tyrcountinfo->indexfilename = tyrindexname;
  tyrcountinfo->mappedmctfileptr
    = gt_fa_mmap_read_with_suffix(tyrindexname,COUNTSSUFFIX,&numofbytes,err);
  if (tyrcountinfo->mappedmctfileptr == NULL)
  {
    tyrcountinfo->smallcounts = NULL;
    haserr = true;
  } else
  {
    tyrcountinfo->smallcounts
      = (GtUchar *) tyrcountinfo->mappedmctfileptr;
    tmp = &tyrcountinfo->smallcounts[tyrindex->numofmers];
    tyrcountinfo->largecounts = (Largecount *) tmp;
    if (numofbytes < tyrindex->numofmers)
    {
      gt_error_set(err,"size of file \"%s.%s\" is smaller than minimum size "
                       ""GT_WU"",tyrindexname,COUNTSSUFFIX,
                       (GtUword) tyrindex->numofmers);
      haserr = true;
    }
  }
  if (!haserr && (numofbytes - tyrindex->numofmers) % sizeof (Largecount) != 0)
  {
    gt_error_set(err,"(numofbytes - numofmers) = "GT_WU
                 " must be a multiple of "GT_WU,
           (GtUword) (numofbytes - tyrindex->numofmers),
           (GtUword) sizeof (Largecount));
    haserr = true;
  }
  if (!haserr)
  {
    tyrcountinfo->numoflargecounts
      = (GtUword) (numofbytes - tyrindex->numofmers)/
        (GtUword) sizeof (Largecount);
  }
  if (haserr)
  {
    if (tyrcountinfo->mappedmctfileptr != NULL)
    {
      gt_fa_xmunmap(tyrcountinfo->mappedmctfileptr);
      tyrcountinfo->mappedmctfileptr = NULL;
    }
    gt_free(tyrcountinfo);
  }
  return haserr ? NULL : tyrcountinfo;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
testq %rdx, %rdx
je 0x2cd497
movq %r14, %rdi
callq 0x89eb7
testb %al, %al
jne 0x2cd57b
leaq 0xb8b16(%rip), %r13     # 0x385fb4
pushq $0x28
popq %rdi
movq %r13, %rsi
movl $0xc4, %edx
callq 0x93160
movq %rax, %rbx
movq %r15, 0x8(%rax)
leaq 0x8f9ee(%rip), %rsi     # 0x35ceaa
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
movq %r13, %rcx
movl $0xc7, %r8d
movq %r14, %r9
callq 0x8bb39
movq %rax, (%rbx)
testq %rax, %rax
je 0x2cd514
movq %rax, 0x10(%rbx)
movq 0x18(%r12), %r8
addq %r8, %rax
movq %rax, 0x18(%rbx)
movq 0x8(%rsp), %rdx
subq %r8, %rdx
jae 0x2cd51d
leaq 0xb8b96(%rip), %rsi     # 0x386094
leaq 0x8f9a5(%rip), %rcx     # 0x35ceaa
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x89dbb
jmp 0x2cd536
movq %rbx, %rax
addq $0x10, %rax
jmp 0x2cd546
testb $0xf, %dl
je 0x2cd571
leaq 0xb8ba1(%rip), %rsi     # 0x3860ca
pushq $0x10
popq %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x89dbb
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2cd54a
callq 0x8b9fa
movq %rbx, %rax
andq $0x0, (%rax)
leaq 0xb8a63(%rip), %rsi     # 0x385fb4
movq %rbx, %rdi
movl $0xef, %edx
callq 0x936f9
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
shrq $0x4, %rdx
movq %rdx, 0x20(%rbx)
jmp 0x2cd560
movq 0x16a9e6(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x17a87(%rip), %rsi     # 0x2e5013
leaq 0x17c2c(%rip), %rdx     # 0x2e51bf
leaq 0xb8ae6(%rip), %rcx     # 0x386080
leaq 0xb8a13(%rip), %r8      # 0x385fb4
movl $0xc3, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390