// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq 0x40(%rsp), %rax
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movl %edx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq %r8, 0x18(%rsp)
movl %r9d, 0x14(%rsp)
movb $0x0, 0x13(%rsp)
movl $0x68, %edi
leaq 0x312dc0(%rip), %rsi    # 0x57e8d6
movl $0xab, %edx
callq 0xe80f0
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0x11d510
movq %rax, (%rsp)
movq (%rsp), %rdi
movl $0x2e, %esi
callq 0x11da70
movq (%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x11de00
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x11d550
movl 0x2c(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x20(%rax)
movl 0x28(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x24(%rax)
movq 0x30(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x30(%rsp), %rdi
callq 0xb0f00
movq %rax, %rdi
callq 0x7e8c0
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x30(%rsp), %rdi
callq 0xa9d00
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x30(%rsp), %rdi
callq 0xc2ec0
testb $0x1, %al
jne 0x26bbd5
jmp 0x26bbe5
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rcx
shrq %rcx
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, %edi
shlq $0x3, %rdi
movl 0x28(%rsp), %eax
imulq %rax, %rdi
leaq 0x312cd4(%rip), %rsi    # 0x57e8d6
movl $0xb9, %edx
callq 0xe80f0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x8(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, %edi
shlq $0x2, %rdi
leaq 0x312ca9(%rip), %rsi    # 0x57e8d6
movl $0xba, %edx
callq 0xe80f0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x8(%rsp), %rdi
callq 0x26bd40
movq 0x8(%rsp), %rax
movq $0x0, 0x48(%rax)
movq 0x8(%rsp), %rax
movq $0x0, 0x50(%rax)
movq 0x8(%rsp), %rax
movq $0x0, 0x58(%rax)
movq 0x8(%rsp), %rax
movq $0x0, 0x60(%rax)
movq (%rsp), %rdi
callq 0x11dee0
movq %rax, %rdi
movq 0x40(%rsp), %r8
leaq 0x2baf04(%rip), %rsi    # 0x526b9d
leaq 0x312c36(%rip), %rdx    # 0x57e8d6
movl $0xc1, %ecx
callq 0xd8df0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x8(%rsp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x26bcc7
movb $0x1, 0x13(%rsp)
testb $0x1, 0x13(%rsp)
jne 0x26bd0e
movq 0x8(%rsp), %rax
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rcx, 0x18(%rax)
jbe 0x26bd0e
movq 0x40(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdx
leaq 0x312bfe(%rip), %rsi    # 0x57e8f6
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x13(%rsp)
movq (%rsp), %rdi
callq 0x11f560
testb $0x1, 0x13(%rsp)
je 0x26bd28
movq 0x8(%rsp), %rdi
callq 0x26bda0
movq 0x8(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)