// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/condenseq_creator.c
// Function: gt_condenseq_creator_new
GtCondenseqCreator *gt_condenseq_creator_new(GtUword initsize,
                                             GtUword minalignlength,
                                             GtWord xdropscore,
                                             GtXdropArbitraryscores *scores,
                                             unsigned int kmersize,
                                             unsigned int windowsize,
                                             GtLogger *logger,
                                             GtError *err)
{
  GtCondenseqCreator *ces_c;
  ces_c = gt_malloc(sizeof (*ces_c));

  if (minalignlength > CES_UNSIGNED_MAX) {
    gt_error_set(err, "minimal alignment length is to large to be stored. "
                 "GtCondenseq needs to be recompiled with GT_CONDENSEQ_64_BIT "
                 "set");
    return NULL;
  }
  ces_c->adding_iter = NULL;
  ces_c->ces = NULL;
  ces_c->current_orig_start = 0;
  ces_c->cleanup_percent = GT_DIAGS_CLEAN_LIMIT;
  ces_c->current_seq_pos = 0;
  ces_c->cutoff_value = GT_UNDEF_UWORD;
  ces_c->diagonals = NULL;
  ces_c->extend_all_kmers = false;
  ces_c->initsize = initsize;
  ces_c->kmer_db = NULL;
  ces_c->kmersize = kmersize;
  ces_c->logger = logger;
  ces_c->main_kmer_iter = NULL;
  ces_c->main_pos = 0;
  ces_c->main_seqnum = 0;
  ces_c->max_d = 0;
  ces_c->mean = 0;
  ces_c->min_nu_kmers = 0;
  ces_c->mean_fraction = (GtUword) 2;
  ces_c->min_d = GT_UNDEF_UWORD;
  ces_c->min_align_len = minalignlength;
  ces_c->use_diagonals = true;
  ces_c->use_full_diags = false;
  ces_c->use_cutoff = false;
  ces_c->mean_cutoff = false;
  ces_c->prune_kmer_db = true;
  ces_c->window.count = 0;
  ces_c->window.next = 0;
  ces_c->windowsize = windowsize;

  ces_c->extend = ces_c_extend_seeds_diags;

  ces_c_xdrop_init(scores, xdropscore, &ces_c->xdrop);
  ces_c->window.idxs = gt_calloc((size_t) windowsize,
                                 sizeof (*ces_c->window.idxs));
  ces_c->window.pos_arrs = gt_calloc((size_t) windowsize,
                                     sizeof (*ces_c->window.pos_arrs));

  ces_c->add = NULL;
  ces_c->replace = NULL;
  ces_c->delete = NULL;

#ifdef GT_CONDENSEQ_CREATOR_DIST_DEBUG
  if (gt_log_enabled()) {
    ces_c->add = gt_disc_distri_new();
    ces_c->replace = gt_disc_distri_new();
    ces_c->delete = gt_disc_distri_new();
  }
#endif
  gt_logger_log(logger, "condenseq creator parameters: k: %u, win: %u, "
                "min algn: " GT_WU ", init: " GT_WU,
                kmersize, windowsize, minalignlength, initsize);
  gt_logger_log(logger, "condenseq creator xdrop parameters: Mat: %d, "
                "Mis: %d, Ins: %d, Del: %d Xdrop: " GT_WD,
                scores->mat, scores->mis, scores->ins, scores->del, xdropscore);

  return ces_c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebp
movl %r8d, %r13d
movq %rcx, %r15
movq %rdx, 0x20(%rsp)
movq %rsi, %r14
movq %rdi, %r12
leaq 0x255d1f(%rip), %rsi    # 0x3199d4
movl $0x150, %edi            # imm = 0x150
movl $0x3cf, %edx            # imm = 0x3CF
callq 0x93160
movq %rax, %rbx
movq %r14, %rax
shrq $0x20, %rax
je 0xc3cea
movq 0x68(%rsp), %rdi
leaq 0x255d19(%rip), %rsi    # 0x3199f5
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x89dbb
jmp 0xc3eca
movq 0x60(%rsp), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x28(%rbx)
andq $0x0, 0xc8(%rbx)
movabsq $0x100000014, %rax      # imm = 0x100000014
movq %rax, 0x140(%rbx)
andq $0x0, 0xd8(%rbx)
orq $-0x1, 0x108(%rbx)
movq %r12, 0x18(%rsp)
movq %r12, 0xe8(%rbx)
andq $0x0, 0x8(%rbx)
movl %r13d, 0x138(%rbx)
movq %rcx, 0x20(%rbx)
andq $0x0, 0x110(%rbx)
movups %xmm0, 0xf0(%rbx)
movups %xmm0, 0x128(%rbx)
movq $0x2, 0x118(%rbx)
orq $-0x1, 0x120(%rbx)
movq %r14, 0x100(%rbx)
movw $0x100, 0x148(%rbx)     # imm = 0x100
andq $0x0, 0xc0(%rbx)
movl %ebp, 0x13c(%rbx)
leaq 0x14f(%rip), %rax       # 0xc3edc
movq %rax, 0x50(%rbx)
movq %r15, %rdi
callq 0x1b7511
movq %rax, 0x58(%rbx)
movq %r15, %rdi
callq 0x1b7511
movq %rax, 0x60(%rbx)
movq %r15, %rdi
callq 0x1b7511
movq %rax, 0x68(%rbx)
movq %r15, %rdi
callq 0x1b7511
movq %rax, 0x70(%rbx)
callq 0x1916d4
movq %rax, 0x78(%rbx)
callq 0x1916d4
movq %rax, 0x80(%rbx)
callq 0x1916d4
movq %rax, 0x88(%rbx)
callq 0x1916d4
movq %rax, 0x90(%rbx)
movq %r14, 0x10(%rsp)
movq 0x20(%rsp), %r14
leaq 0x255bd5(%rip), %r12    # 0x3199d4
movl %r13d, 0xc(%rsp)
pushq $0x28
popq %r13
movq %r13, %rdi
movq %r12, %rsi
movl $0x1b6, %edx            # imm = 0x1B6
callq 0x93160
movq %rax, 0x98(%rbx)
movq %r13, %rdi
movq %r12, %rsi
movl $0x1b7, %edx            # imm = 0x1B7
callq 0x93160
movq %rax, 0xa0(%rbx)
movq %r14, 0xa8(%rbx)
movl %ebp, %r13d
pushq $0x8
popq %rsi
movq %r13, %rdi
movq %r12, %rdx
movl $0x3f9, %ecx            # imm = 0x3F9
callq 0x9334a
movq %rax, 0xb8(%rbx)
pushq $0x18
popq %rsi
movq %r13, %rdi
movq %r12, %rdx
movl $0x3fb, %ecx            # imm = 0x3FB
callq 0x9334a
movq %rax, 0xb0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
andq $0x0, 0x48(%rbx)
leaq 0x255be1(%rip), %rsi    # 0x319a68
movq 0x60(%rsp), %r12
movq %r12, %rdi
movl 0xc(%rsp), %edx
movl %ebp, %ecx
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %r9
xorl %eax, %eax
callq 0x92e71
movl (%r15), %edx
movl 0x4(%r15), %ecx
movl 0x8(%r15), %r8d
movl 0xc(%r15), %r9d
movq %r14, (%rsp)
leaq 0x255bef(%rip), %rsi    # 0x319aaf
movq %r12, %rdi
xorl %eax, %eax
callq 0x92e71
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq