// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/randomcodes-hpcorrect.c
// Function: gt_randomcodes_hpcorrect_data_new
GtRandomcodesHpcorrectData *gt_randomcodes_hpcorrect_data_new(
    GtEncseq *encseq, GtHplstore *hplstore, unsigned int k,
    bool firstpass, unsigned int r, unsigned int mintrustp,
    unsigned int maxuntrustp, bool greedy_clustering,
    bool skip_read_ends, bool skip_hmer_ends, bool skip_rc,
    bool non_redundant, bool best_score_clustering, bool manhattan,
    GtWord clustering_param, GtUword maxwidth, int rext_cl_minscore,
    int rext_I_minscore, int rext_J_minscore, int rext_R_minscore,
    int rext_D_minscore, int rext_J_lminscore, GtUword rext_J_lwidth,
    GtStr *indexname, unsigned int threadnum, GtError *err)
{
  GtRandomcodesHpcorrectData *sdata = gt_malloc(sizeof *sdata);
  GtStr *path = gt_str_clone(indexname);
  gt_str_append_char(path, '.');
  gt_str_append_uint(path, threadnum);
  if (firstpass)
    gt_str_append_cstr(path, GT_RANDOMCODES_HPCORRECT_FIRSTPASS_FILESFX);
  else
    gt_str_append_cstr(path, GT_RANDOMCODES_HPCORRECT_FILESFX);
  sdata->k = (GtUword)k;
  sdata->firstpass = firstpass;
  sdata->mintrustp = mintrustp;
  sdata->maxuntrustp = maxuntrustp;
  sdata->maxwidth = maxwidth;
  sdata->manhattan = manhattan;
  sdata->skip_read_ends = skip_read_ends;
  sdata->rext_cl_minscore = (gt_rchc_score_t)rext_cl_minscore;
  sdata->rext_I_minscore = (gt_rchc_score_t)rext_I_minscore;
  sdata->rext_J_minscore = (gt_rchc_score_t)rext_J_minscore;
  sdata->rext_R_minscore = (gt_rchc_score_t)rext_R_minscore;
  sdata->rext_D_minscore = (gt_rchc_score_t)rext_D_minscore;
  sdata->rext_J_lminscore = (gt_rchc_score_t)rext_J_lminscore;
  sdata->rext_J_lwidth = rext_J_lwidth;
  if (skip_hmer_ends)
  {
    sdata->frompos = 1UL;
    gt_assert(sdata->k > 2UL);
    sdata->topos = sdata->k - 2UL;
  }
  else
  {
    sdata->frompos = 0;
    sdata->topos = sdata->k - 1UL;
  }
  if (non_redundant)
    sdata->frompos = sdata->topos;
  sdata->skip_rc = skip_rc;
  sdata->outfile = gt_file_new(gt_str_get(path), "w", err);
  gt_str_delete(path);
  sdata->encseq = encseq;
  sdata->hplstore = hplstore;
  sdata->mirror_nofseqs = gt_encseq_num_of_sequences(encseq);
  sdata->nofreads = sdata->mirror_nofseqs;
  if (gt_encseq_is_mirrored(sdata->encseq))
    sdata->nofreads >>= 1;
  sdata->hdistri = gt_malloc(sizeof (sdata->hdistri) * GT_HPLSTORE_RANGE *
      sdata->k);
  sdata->hmers_alloc = GT_RANDOMCODES_HPCORRECT_HMERS_INIT;
  if (best_score_clustering)
  {
    gt_assert(clustering_param >= 0 && clustering_param <= 100L);
    sdata->quantile = (unsigned int)clustering_param;
    sdata->pw_scores = gt_malloc(sizeof (sdata->pw_scores) *
            GT_STRICT_TRIANGULAR_SIZE(sdata->hmers_alloc));
    sdata->pw_scores_copy = gt_malloc(sizeof (sdata->pw_scores_copy) *
            GT_STRICT_TRIANGULAR_SIZE(sdata->hmers_alloc));
  }
  else
  {
    sdata->clustering_minscore = clustering_param;
    sdata->pw_scores = NULL;
    sdata->pw_scores_copy = NULL;
  }
  sdata->cluster_size = gt_malloc(sizeof (sdata->cluster_size) *\
      sdata->hmers_alloc);
  sdata->consensus_hmer = gt_malloc(sizeof (sdata->consensus_hmer) * sdata->k);
  if (greedy_clustering)
  {
    sdata->hmer_cluster = gt_malloc(sizeof (sdata->hmer_cluster) *
        sdata->hmers_alloc);
    sdata->union_find = NULL;
    sdata->skip = NULL;
  }
  else
  {
    sdata->union_find =
      gt_union_find_new(GT_RANDOMCODES_HPCORRECT_UNION_FIND_INIT);
    sdata->hmer_cluster = NULL;
    sdata->skip = gt_malloc(sizeof (sdata->skip) * sdata->hmers_alloc);
  }
  if (sdata->firstpass)
  {
    sdata->r = r;
    sdata->rextset = gt_malloc(sizeof (sdata->rextset) * sdata->hmers_alloc);
    sdata->rextset_size = gt_malloc(sizeof (sdata->rextset_size) *
        sdata->hmers_alloc);
    sdata->esr1 = gt_encseq_create_reader_with_readmode(sdata->encseq,
        GT_READMODE_FORWARD, 0);
    sdata->esr2 = gt_encseq_create_reader_with_readmode(sdata->encseq,
        GT_READMODE_FORWARD, 0);
    sdata->hmers_width = sdata->k + sdata->r + 1UL;
  }
  else
  {
    sdata->rextset = NULL;
    sdata->rextset_size = NULL;
    sdata->esr1 = NULL;
    sdata->esr2 = NULL;
    sdata->hmers_width = sdata->k;
  }
  sdata->hmers = gt_malloc(sizeof (sdata->hmers) * sdata->hmers_alloc *
      sdata->hmers_width);
  return sdata;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, 0x4(%rsp)
movl %r8d, (%rsp)
movl %ecx, %r15d
movl %edx, %r13d
movq %rsi, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
movslq 0xe8(%rsp), %rax
movq %rax, 0x30(%rsp)
movslq 0xe0(%rsp), %rax
movq %rax, 0x28(%rsp)
movslq 0xd8(%rsp), %rax
movq %rax, 0x20(%rsp)
movslq 0xd0(%rsp), %rax
movq %rax, 0x18(%rsp)
movslq 0xc8(%rsp), %rbp
movslq 0xc0(%rsp), %r14
movq 0xf8(%rsp), %r12
leaq 0x14ad94(%rip), %rsi    # 0x39ec6d
movl $0x128, %edi            # imm = 0x128
movl $0x42a, %edx            # imm = 0x42A
callq 0x2d5f0
movq %rax, %rbx
movq %r12, %rdi
callq 0x2f0f0
movq %rax, %r12
movq %rax, %rdi
movl $0x2e, %esi
callq 0x31390
movq %r12, %rdi
movl 0x100(%rsp), %esi
callq 0x2fa10
leaq 0x14ad76(%rip), %rax    # 0x39ec8f
leaq 0x14ad74(%rip), %rsi    # 0x39ec94
testl %r15d, %r15d
cmovneq %rax, %rsi
movq %r12, %rdi
callq 0x309a0
movl %r13d, %eax
movq %rax, 0x20(%rbx)
movb %r15b, 0xc9(%rbx)
movl 0x4(%rsp), %ecx
movl %ecx, 0x2c(%rbx)
movl 0x70(%rsp), %ecx
movl %ecx, 0x28(%rbx)
movq 0xb8(%rsp), %rcx
movq %rcx, 0xc0(%rbx)
movb 0xa8(%rsp), %cl
movb %cl, 0xc8(%rbx)
movb 0x80(%rsp), %cl
movb %cl, 0x60(%rbx)
movq %r14, 0xe0(%rbx)
movq %rbp, 0xe8(%rbx)
movq 0x18(%rsp), %rcx
movq %rcx, 0xf0(%rbx)
movq 0x20(%rsp), %rcx
movq %rcx, 0xf8(%rbx)
movq 0x28(%rsp), %rcx
movq %rcx, 0x100(%rbx)
movq 0x30(%rsp), %rcx
movq %rcx, 0x108(%rbx)
movq 0xf0(%rsp), %rcx
movq %rcx, 0x110(%rbx)
cmpb $0x0, 0x88(%rsp)
je 0x253fe2
movq $0x1, 0x68(%rbx)
movq $-0x2, %rcx
cmpl $0x2, %r13d
ja 0x253ff1
callq 0x88df0
movq $0x0, 0x68(%rbx)
movq $-0x1, %rcx
movq 0x108(%rsp), %r15
movb 0x98(%rsp), %sil
movb 0x90(%rsp), %dl
addq %rax, %rcx
movq %rcx, 0x70(%rbx)
testb %sil, %sil
je 0x25401c
movq 0x70(%rbx), %rax
movq %rax, 0x68(%rbx)
movb 0xa0(%rsp), %bpl
movb %dl, 0x78(%rbx)
movq %r12, %rdi
callq 0x31b20
leaq 0x12bda7(%rip), %rsi    # 0x37fddd
movq %rax, %rdi
movq %r15, %rdx
callq 0x2e100
movq %rax, 0xa0(%rbx)
movq %r12, %rdi
callq 0x31fe0
movq 0x10(%rsp), %rdi
movq %rdi, (%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rbx)
callq 0x2d870
movq %rax, 0x18(%rbx)
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
callq 0x31200
testb %al, %al
je 0x25407e
shrq 0x10(%rbx)
movq 0xb0(%rsp), %r14
imulq $0x7f8, 0x20(%rbx), %rdi # imm = 0x7F8
leaq 0x14abd8(%rip), %rsi    # 0x39ec6d
movl $0x457, %edx            # imm = 0x457
callq 0x2d5f0
movq %rax, 0x58(%rbx)
movq $0x80, 0x40(%rbx)
testb %bpl, %bpl
je 0x25410b
cmpq $0x65, %r14
jae 0x25429e
movl %r14d, 0xb8(%rbx)
leaq 0x14aba5(%rip), %r14    # 0x39ec6d
movl $0xfe00, %edi           # imm = 0xFE00
movq %r14, %rsi
movl $0x45e, %edx            # imm = 0x45E
callq 0x2d5f0
movq %rax, 0xa8(%rbx)
movq 0x40(%rbx), %rax
leaq -0x1(%rax), %rdi
imulq %rax, %rdi
shlq $0x2, %rdi
andq $-0x8, %rdi
movq %r14, %rsi
movl $0x460, %edx            # imm = 0x460
callq 0x2d5f0
movq %rax, 0xb0(%rbx)
jmp 0x25411c
movq %r14, 0x80(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xa8(%rbx)
movb 0x78(%rsp), %bpl
movq 0x40(%rbx), %rdi
shlq $0x3, %rdi
leaq 0x14ab3d(%rip), %r14    # 0x39ec6d
movq %r14, %rsi
movl $0x469, %edx            # imm = 0x469
callq 0x2d5f0
movq %rax, 0x38(%rbx)
movq 0x20(%rbx), %rdi
shlq $0x3, %rdi
movq %r14, %rsi
movl $0x46a, %edx            # imm = 0x46A
callq 0x2d5f0
movq %rax, 0x50(%rbx)
testb %bpl, %bpl
je 0x25418b
movq 0x40(%rbx), %rdi
shlq $0x3, %rdi
leaq 0x14aaff(%rip), %rsi    # 0x39ec6d
movl $0x46e, %edx            # imm = 0x46E
callq 0x2d5f0
movq %rax, 0x88(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x90(%rbx)
jmp 0x2541c7
movl $0x400, %edi            # imm = 0x400
callq 0x1f9908
movq %rax, 0x98(%rbx)
movq $0x0, 0x88(%rbx)
movq 0x40(%rbx), %rdi
shlq $0x3, %rdi
leaq 0x14aab7(%rip), %rsi    # 0x39ec6d
movl $0x477, %edx            # imm = 0x477
callq 0x2d5f0
movq %rax, 0x90(%rbx)
cmpb $0x1, 0xc9(%rbx)
jne 0x254255
movl (%rsp), %eax
movl %eax, 0xcc(%rbx)
movq 0x40(%rbx), %rdi
shlq $0x3, %rdi
leaq 0x14aa81(%rip), %r14    # 0x39ec6d
movq %r14, %rsi
movl $0x47c, %edx            # imm = 0x47C
callq 0x2d5f0
movq %rax, 0xd0(%rbx)
movq 0x40(%rbx), %rdi
shlq $0x3, %rdi
movq %r14, %rsi
movl $0x47e, %edx            # imm = 0x47E
callq 0x2d5f0
movq %rax, 0xd8(%rbx)
movq (%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2eae0
movq %rax, 0x118(%rbx)
movq (%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2eae0
movq %rax, 0x120(%rbx)
movq 0x20(%rbx), %rax
movl 0xcc(%rbx), %ecx
leaq (%rax,%rcx), %rdi
incq %rdi
jmp 0x25426a
xorps %xmm0, %xmm0
movups %xmm0, 0xd0(%rbx)
movups %xmm0, 0x118(%rbx)
movq 0x20(%rbx), %rdi
movq %rdi, 0x48(%rbx)
imulq 0x40(%rbx), %rdi
shlq $0x3, %rdi
leaq 0x14a9ef(%rip), %rsi    # 0x39ec6d
movl $0x48e, %edx            # imm = 0x48E
callq 0x2d5f0
movq %rax, 0x30(%rbx)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x88e29