// File: /workspace/github_c_makefile_star2_O1/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 0x1efd39(%rip), %rsi    # 0x3b549e
movl $0x68, %edi
movl $0xab, %edx
callq 0x1092b2
movq %rax, %rbx
movq %r14, %rdi
callq 0x120955
movq %rax, %r14
movq %rax, %rdi
movl $0x2e, %esi
callq 0x120ba5
movq %r14, %rdi
movl %ebp, %esi
callq 0x120cd6
movq %r14, %rdi
movq %r13, %rsi
callq 0x12097f
movl 0x4(%rsp), %eax
movl %eax, 0x20(%rbx)
movl %r12d, 0x24(%rbx)
movq %r15, (%rbx)
movq %r15, %rdi
callq 0xf02da
movq %rax, %rdi
callq 0xd3713
movl %eax, 0x8(%rbx)
movq %r15, %rdi
callq 0xec1d8
movq %rax, 0x18(%rbx)
movq %rax, 0x10(%rbx)
movq %r15, %rdi
callq 0xfac80
testb %al, %al
je 0x1c57e5
shrq 0x10(%rbx)
movq 0x40(%rsp), %r15
movl 0x8(%rbx), %eax
movl %r12d, %edi
imulq %rax, %rdi
shlq $0x3, %rdi
leaq 0x1efc9f(%rip), %r12    # 0x3b549e
movq %r12, %rsi
movl $0xb9, %edx
callq 0x1092b2
movq %rax, 0x30(%rbx)
movl 0x8(%rbx), %edi
shlq $0x2, %rdi
movq %r12, %rsi
movl $0xba, %edx
callq 0x1092b2
movq %rax, 0x28(%rbx)
movw $0x100, 0x44(%rbx)      # imm = 0x100
movl $0x0, 0x40(%rbx)
cmpl $0x0, 0x8(%rbx)
je 0x1c584f
xorl %ecx, %ecx
movl $0x0, (%rax,%rcx,4)
incq %rcx
movl 0x8(%rbx), %edx
cmpq %rdx, %rcx
jb 0x1c583d
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x48(%rbx)
movq %r14, %rdi
callq 0x120d23
leaq 0x1992a4(%rip), %rsi    # 0x35eb0d
leaq 0x1efc2e(%rip), %rdx    # 0x3b549e
movq %rax, %rdi
movl $0xc1, %ecx
movq %r15, %r8
callq 0x101c23
movq %rax, 0x38(%rbx)
testq %rax, %rax
je 0x1c58b4
movq %rax, %r12
movq 0x18(%rbx), %rdx
movq %rdx, %rax
shrq $0x3e, %rax
je 0x1c58d6
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
leaq 0x1efc14(%rip), %rsi    # 0x3b54be
movq %r15, %rdi
xorl %eax, %eax
callq 0x1019cf
movq %r14, %rdi
callq 0x121b03
movq %rbx, %rdi
callq 0x1c58e5
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x121b03
testq %r12, %r12
jne 0x1c58c4
jmp 0x1c58bc