// File: /workspace/github_c_makefile_star2_O3/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, %r13
movq %rcx, %r14
movl %edx, %r12d
movl %esi, 0x4(%rsp)
movq %rdi, %r15
leaq 0x1ef427(%rip), %rsi    # 0x3abe8e
movl $0x68, %edi
movl $0xab, %edx
callq 0x104226
movq %rax, %rbx
movq %r14, %rdi
callq 0x11acc9
movq %rax, %r14
movq %rax, %rdi
movl $0x2e, %esi
callq 0x11af23
movq %r14, %rdi
movl %ebp, %esi
callq 0x11b054
movq %r14, %rdi
movq %r13, %rsi
callq 0x11acf3
movl 0x4(%rsp), %eax
movl %eax, 0x20(%rbx)
movl %r12d, 0x24(%rbx)
movq %r15, (%rbx)
movq %r15, %rdi
callq 0xebcd9
movq %rax, %rdi
callq 0xd11be
movl %eax, 0x8(%rbx)
movq %r15, %rdi
callq 0xe7b9c
movq %rax, 0x18(%rbx)
movq %rax, 0x10(%rbx)
movq %r15, %rdi
callq 0xf6567
testb %al, %al
je 0x1bcae7
shrq 0x10(%rbx)
movq 0x40(%rsp), %r15
movl 0x8(%rbx), %eax
movl %r12d, %edi
imulq %rax, %rdi
shlq $0x3, %rdi
leaq 0x1ef38d(%rip), %r12    # 0x3abe8e
movq %r12, %rsi
movl $0xb9, %edx
callq 0x104226
movq %rax, 0x30(%rbx)
movl 0x8(%rbx), %edi
shlq $0x2, %rdi
movq %r12, %rsi
movl $0xba, %edx
callq 0x104226
movq %rax, 0x28(%rbx)
movw $0x100, 0x44(%rbx)      # imm = 0x100
movl $0x0, 0x40(%rbx)
cmpl $0x0, 0x8(%rbx)
je 0x1bcb51
xorl %ecx, %ecx
movl $0x0, (%rax,%rcx,4)
incq %rcx
movl 0x8(%rbx), %edx
cmpq %rdx, %rcx
jb 0x1bcb3f
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x48(%rbx)
movq %r14, %rdi
callq 0x11b0a1
leaq 0x198f76(%rip), %rsi    # 0x355ae1
leaq 0x1ef31c(%rip), %rdx    # 0x3abe8e
movq %rax, %rdi
movl $0xc1, %ecx
movq %r15, %r8
callq 0xfcdbb
movq %rax, 0x38(%rbx)
testq %rax, %rax
je 0x1bcbb3
movq 0x18(%rbx), %rdx
movq %rdx, %rax
shrq $0x3e, %rax
je 0x1bcbc5
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
leaq 0x1ef305(%rip), %rsi    # 0x3abeae
movq %r15, %rdi
xorl %eax, %eax
callq 0xfcb67
movq %r14, %rdi
callq 0x11bdbf
movq %rbx, %rdi
callq 0x1bcbdf
jmp 0x1bcbcd
movq %r14, %rdi
callq 0x11bdbf
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq