// File: /workspace/github_c_makefile_star2_O3/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 0x32bb24
movq %r14, %rdi
callq 0xfcc32
testb %al, %al
jne 0x32bc0f
leaq 0xba089(%rip), %r13     # 0x3e5bb4
movl $0x28, %edi
movq %r13, %rsi
movl $0xc4, %edx
callq 0x104226
movq %rax, %rbx
movq %r15, 0x8(%rax)
leaq 0x90f0b(%rip), %rsi     # 0x3bca56
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
movq %r13, %rcx
movl $0xc7, %r8d
movq %r14, %r9
callq 0xfdd02
movq %rax, (%rbx)
testq %rax, %rax
je 0x32bba3
movq %rax, 0x10(%rbx)
movq 0x18(%r12), %r8
addq %r8, %rax
movq %rax, 0x18(%rbx)
movq 0x8(%rsp), %rdx
subq %r8, %rdx
jae 0x32bbac
leaq 0xba107(%rip), %rsi     # 0x3e5c94
leaq 0x90ec2(%rip), %rcx     # 0x3bca56
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xfcb67
jmp 0x32bbc7
movq %rbx, %rax
addq $0x10, %rax
jmp 0x32bbd7
testb $0xf, %dl
je 0x32bc05
leaq 0xba112(%rip), %rsi     # 0x3e5cca
movl $0x10, %ecx
movq %r14, %rdi
xorl %eax, %eax
callq 0xfcb67
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x32bbde
callq 0xfdc54
movq %rbx, %rax
movq $0x0, (%rax)
leaq 0xb9fcf(%rip), %rsi     # 0x3e5bb4
movq %rbx, %rdi
movl $0xef, %edx
callq 0x1045eb
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 0x32bbf4
callq 0x95967