// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/randomcodes-correct.c
// Function: gt_randomcodes_correct_data_new
GtRandomcodesCorrectData *gt_randomcodes_correct_data_new(GtEncseq *encseq,
    unsigned int k, unsigned int c, const char *indexname, const char *suffix,
    unsigned int threadnum, GtError *err)
{
  bool haserr = false;
  GtRandomcodesCorrectData *cdata = gt_malloc(sizeof *cdata);
  GtStr *path = gt_str_new_cstr(indexname);
  gt_str_append_char(path, '.');
  gt_str_append_uint(path, threadnum);
  gt_str_append_cstr(path, suffix);
  cdata->k = k;
  cdata->c = c;
  cdata->encseq = encseq;
  cdata->alphasize = gt_alphabet_num_of_chars(gt_encseq_alphabet(encseq));
  cdata->totallength = gt_encseq_total_length(encseq);
  cdata->firstmirrorpos = cdata->totallength;
  if (gt_encseq_is_mirrored(encseq))
    cdata->firstmirrorpos >>= 1;
  cdata->kpositions = gt_malloc(sizeof (*cdata->kpositions) *
      cdata->alphasize * c);
  cdata->count = gt_malloc(sizeof (*cdata->count) * cdata->alphasize);
  gt_randomcodes_correct_data_reset(cdata);
  /* stats */
  cdata->nofkmergroups = 0;
  cdata->nofkmeritvs = 0;
  cdata->nofkmers = 0;
  cdata->nofcorrections = 0;
  cdata->outfile = gt_fa_fopen(gt_str_get(path), "wb", err);
  if (cdata->outfile == NULL)
  {
    haserr = true;
  }
  if (!haserr && cdata->totallength > (ULONG_MAX >> 2))
  {
    gt_error_set(err, "totallength "GT_WU" larger than "GT_WU,
                 cdata->totallength, (GtUword) ULONG_MAX >> 2);
    haserr = true;
  }
  gt_str_delete(path);
  if (haserr)
    gt_randomcodes_correct_data_delete(cdata);
  return cdata;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movq %r8, (%rsp)
movq %rcx, %r15
movl %edx, %r14d
movl %esi, %r13d
movq %rdi, %r12
leaq 0x1dfdf9(%rip), %rsi    # 0x34c1ee
pushq $0x68
popq %rdi
movl $0xab, %edx
callq 0x93160
movq %rax, %rbx
movq %r15, %rdi
callq 0xacbd1
movq %rax, %r15
pushq $0x2e
popq %rsi
movq %rax, %rdi
callq 0xaced9
movq %r15, %rdi
movl %ebp, %esi
callq 0xad151
movq %r15, %rdi
movq (%rsp), %rsi
callq 0xacbfb
movl %r13d, 0x20(%rbx)
movl %r14d, 0x24(%rbx)
movq %r12, (%rbx)
movq %r12, %rdi
callq 0x754dd
movq %rax, %rdi
callq 0x56c8e
movl %eax, 0x8(%rbx)
movq %r12, %rdi
callq 0x7055e
movq %rax, 0x18(%rbx)
movq %rax, 0x10(%rbx)
movq %r12, %rdi
callq 0x81dea
testb %al, %al
je 0x16c46f
shrq 0x10(%rbx)
movl 0x8(%rbx), %eax
movl %r14d, %edi
imulq %rax, %rdi
shlq $0x3, %rdi
leaq 0x1dfd6a(%rip), %r12    # 0x34c1ee
movq %r12, %rsi
movl $0xb9, %edx
callq 0x93160
movq %rax, 0x30(%rbx)
movl 0x8(%rbx), %edi
shlq $0x2, %rdi
movq %r12, %rsi
movl $0xba, %edx
callq 0x93160
movq %rax, 0x28(%rbx)
movq %rbx, %rdi
callq 0x16c544
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x48(%rbx)
movq %r15, %rdi
callq 0xad1fa
leaq 0x189622(%rip), %rsi    # 0x2f5af1
movq %rax, %rdi
movq %r12, %rdx
movl $0xc1, %ecx
movq 0x40(%rsp), %r14
movq %r14, %r8
callq 0x8a156
movq %rax, 0x38(%rbx)
testq %rax, %rax
je 0x16c518
movq 0x18(%rbx), %rdx
movq %rdx, %rax
shrq $0x3e, %rax
je 0x16c52a
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
leaq 0x1dfd00(%rip), %rsi    # 0x34c20e
movq %r14, %rdi
xorl %eax, %eax
callq 0x89dbb
movq %r15, %rdi
callq 0xae103
movq %rbx, %rdi
callq 0x16c566
jmp 0x16c532
movq %r15, %rdi
callq 0xae103
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq