// File: /workspace/github_c_makefile_star2_O2/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 0x145204(%rip), %rsi    # 0x3389cd
movl $0x128, %edi            # imm = 0x128
movl $0x42a, %edx            # imm = 0x42A
callq 0x2e5f0
movq %rax, %rbx
movq %r12, %rdi
callq 0x30100
movq %rax, %r12
pushq $0x2e
popq %rsi
movq %rax, %rdi
callq 0x323d0
movq %r12, %rdi
movl 0x100(%rsp), %esi
callq 0x30a60
leaq 0x1451e8(%rip), %rax    # 0x3389ef
leaq 0x1451e6(%rip), %rsi    # 0x3389f4
testl %r15d, %r15d
cmovneq %rax, %rsi
movq %r12, %rdi
callq 0x31a00
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 0x1f38cc
movq $0x1, 0x68(%rbx)
cmpl $0x2, %r13d
jbe 0x1f3b7e
pushq $-0x2
jmp 0x1f38d3
andq $0x0, 0x68(%rbx)
pushq $-0x1
popq %rcx
movq 0x108(%rsp), %r15
movb 0x98(%rsp), %sil
movb 0x90(%rsp), %dl
addq %rax, %rcx
movq %rcx, 0x70(%rbx)
testb %sil, %sil
je 0x1f38fb
movq %rcx, 0x68(%rbx)
movb 0xa0(%rsp), %bpl
movb %dl, 0x78(%rbx)
movq %r12, %rdi
callq 0x32b70
leaq 0x1264d6(%rip), %rsi    # 0x319deb
movq %rax, %rdi
movq %r15, %rdx
callq 0x2f120
movq %rax, 0xa0(%rbx)
movq %r12, %rdi
callq 0x33020
movq 0x10(%rsp), %rdi
movq %rdi, (%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rbx)
callq 0x2e870
movq %rax, 0x18(%rbx)
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
callq 0x32250
testb %al, %al
je 0x1f395d
shrq 0x10(%rbx)
movq 0xb0(%rsp), %r14
imulq $0x7f8, 0x20(%rbx), %rdi # imm = 0x7F8
leaq 0x145059(%rip), %rsi    # 0x3389cd
movl $0x457, %edx            # imm = 0x457
callq 0x2e5f0
movq %rax, 0x58(%rbx)
movq $0x80, 0x40(%rbx)
testb %bpl, %bpl
je 0x1f39f2
cmpq $0x65, %r14
jae 0x1f3bac
movl %r14d, 0xb8(%rbx)
leaq 0x145026(%rip), %r14    # 0x3389cd
movl $0xfe00, %edi           # imm = 0xFE00
movq %r14, %rsi
movl $0x45e, %edx            # imm = 0x45E
callq 0x2e5f0
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 0x2e5f0
movq %rax, 0xb0(%rbx)
movq 0x40(%rbx), %rdi
shlq $0x3, %rdi
jmp 0x1f3a08
movq %r14, 0x80(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xa8(%rbx)
movl $0x400, %edi            # imm = 0x400
movb 0x78(%rsp), %bpl
leaq 0x144fb9(%rip), %r14    # 0x3389cd
movq %r14, %rsi
movl $0x469, %edx            # imm = 0x469
callq 0x2e5f0
movq %rax, 0x38(%rbx)
movq 0x20(%rbx), %rdi
shlq $0x3, %rdi
movq %r14, %rsi
movl $0x46a, %edx            # imm = 0x46A
callq 0x2e5f0
movq %rax, 0x50(%rbx)
testb %bpl, %bpl
je 0x1f3a6f
movq 0x40(%rbx), %rdi
shlq $0x3, %rdi
leaq 0x144f7b(%rip), %rsi    # 0x3389cd
movl $0x46e, %edx            # imm = 0x46E
callq 0x2e5f0
movq %rax, 0x88(%rbx)
andq $0x0, 0x98(%rbx)
xorl %eax, %eax
jmp 0x1f3aa1
movl $0x400, %edi            # imm = 0x400
callq 0x18e5c4
movq %rax, 0x98(%rbx)
andq $0x0, 0x88(%rbx)
movq 0x40(%rbx), %rdi
shlq $0x3, %rdi
leaq 0x144f36(%rip), %rsi    # 0x3389cd
movl $0x477, %edx            # imm = 0x477
callq 0x2e5f0
movq %rax, 0x90(%rbx)
cmpb $0x1, 0xc9(%rbx)
jne 0x1f3b2b
movl (%rsp), %eax
movl %eax, 0xcc(%rbx)
movq 0x40(%rbx), %rdi
shlq $0x3, %rdi
leaq 0x144f04(%rip), %r14    # 0x3389cd
movq %r14, %rsi
movl $0x47c, %edx            # imm = 0x47C
callq 0x2e5f0
movq %rax, 0xd0(%rbx)
movq 0x40(%rbx), %rdi
shlq $0x3, %rdi
movq %r14, %rsi
movl $0x47e, %edx            # imm = 0x47E
callq 0x2e5f0
movq %rax, 0xd8(%rbx)
movq (%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2faf0
movq %rax, 0x118(%rbx)
movq (%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2faf0
movq 0x20(%rbx), %rcx
movl 0xcc(%rbx), %edx
leaq (%rcx,%rdx), %rdi
incq %rdi
jmp 0x1f3b43
andq $0x0, 0x118(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xd0(%rbx)
movq 0x20(%rbx), %rdi
xorl %eax, %eax
movq %rax, 0x120(%rbx)
movq %rdi, 0x48(%rbx)
imulq 0x40(%rbx), %rdi
shlq $0x3, %rdi
leaq 0x144e6f(%rip), %rsi    # 0x3389cd
movl $0x48e, %edx            # imm = 0x48E
callq 0x2e5f0
movq %rax, 0x30(%rbx)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x21742b(%rip), %rax    # 0x40afb0
movq (%rax), %rdi
leaq 0xeac61(%rip), %rsi     # 0x2de7f0
leaq 0x144e63(%rip), %rdx    # 0x3389f9
leaq 0x144e6b(%rip), %rcx    # 0x338a08
leaq 0x144e29(%rip), %r8     # 0x3389cd
movl $0x443, %r9d            # imm = 0x443
jmp 0x1f3bd8
movq 0x2173fd(%rip), %rax    # 0x40afb0
movq (%rax), %rdi
leaq 0xeac33(%rip), %rsi     # 0x2de7f0
leaq 0x144e66(%rip), %rdx    # 0x338a2a
leaq 0x144e3d(%rip), %rcx    # 0x338a08
leaq 0x144dfb(%rip), %r8     # 0x3389cd
movl $0x45b, %r9d            # imm = 0x45B
xorl %eax, %eax
callq 0x32960
callq 0x2e820