// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq 0x58(%rsp), %rax
movq 0x50(%rsp), %rax
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movl %r8d, 0x1c(%rsp)
movl %r9d, 0x18(%rsp)
movl $0x150, %edi            # imm = 0x150
leaq 0x4089c6(%rip), %rsi    # 0x54b9ee
movl $0x3cf, %edx            # imm = 0x3CF
callq 0xe80f0
movq %rax, 0x10(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, 0x30(%rsp)
jbe 0x143064
movq 0x58(%rsp), %rdi
leaq 0x4089c0(%rip), %rsi    # 0x54ba0f
movb $0x0, %al
callq 0xd88c0
movq $0x0, 0x40(%rsp)
jmp 0x143319
movq 0x10(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x28(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0xc8(%rax)
movq 0x10(%rsp), %rax
movl $0x14, 0x140(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0xd8(%rax)
movq 0x10(%rsp), %rax
movq $-0x1, 0x108(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x30(%rax)
movq 0x10(%rsp), %rax
movb $0x0, 0x146(%rax)
movq 0x38(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xe8(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x8(%rax)
movl 0x1c(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x138(%rax)
movq 0x50(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0xf0(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0xf8(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x128(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x110(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x130(%rax)
movq 0x10(%rsp), %rax
movq $0x2, 0x118(%rax)
movq 0x10(%rsp), %rax
movq $-0x1, 0x120(%rax)
movq 0x30(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x100(%rax)
movq 0x10(%rsp), %rax
movb $0x1, 0x144(%rax)
movq 0x10(%rsp), %rax
movb $0x0, 0x145(%rax)
movq 0x10(%rsp), %rax
movb $0x0, 0x147(%rax)
movq 0x10(%rsp), %rax
movb $0x0, 0x148(%rax)
movq 0x10(%rsp), %rax
movb $0x1, 0x149(%rax)
movq 0x10(%rsp), %rax
movl $0x0, 0xc4(%rax)
movq 0x10(%rsp), %rax
movl $0x0, 0xc0(%rax)
movl 0x18(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x13c(%rax)
movq 0x10(%rsp), %rax
leaq 0x11c(%rip), %rcx       # 0x143330
movq %rcx, 0x50(%rax)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq $0x58, %rdx
callq 0x143b60
movl 0x18(%rsp), %eax
movl %eax, %edi
movl $0x8, %esi
leaq 0x4087ac(%rip), %rdx    # 0x54b9ee
movl $0x3f9, %ecx            # imm = 0x3F9
callq 0xe83c0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xb8(%rax)
movl 0x18(%rsp), %eax
movl %eax, %edi
movl $0x18, %esi
leaq 0x408781(%rip), %rdx    # 0x54b9ee
movl $0x3fb, %ecx            # imm = 0x3FB
callq 0xe83c0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xb0(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x38(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x40(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x48(%rax)
movq 0x50(%rsp), %rdi
movl 0x1c(%rsp), %edx
movl 0x18(%rsp), %ecx
movq 0x30(%rsp), %r8
movq 0x38(%rsp), %r9
leaq 0x4087b7(%rip), %rsi    # 0x54ba82
movb $0x0, %al
callq 0xe7cd0
movq 0x50(%rsp), %rdi
movq 0x20(%rsp), %rax
movl (%rax), %edx
movq 0x20(%rsp), %rax
movl 0x4(%rax), %ecx
movq 0x20(%rsp), %rax
movl 0x8(%rax), %r8d
movq 0x20(%rsp), %rax
movl 0xc(%rax), %r9d
movq 0x28(%rsp), %rax
leaq 0x4087c5(%rip), %rsi    # 0x54bac9
movq %rax, (%rsp)
movb $0x0, %al
callq 0xe7cd0
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)