// File: /workspace/github_c_makefile_star2_O3/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, %r13d
movl %r8d, %r12d
movq %rcx, %r15
movq %rdx, 0x18(%rsp)
movq %rsi, %r14
movq %rdi, %rbp
leaq 0x24b29d(%rip), %rsi    # 0x379686
movl $0x150, %edi            # imm = 0x150
movl $0x3cf, %edx            # imm = 0x3CF
callq 0x104226
movq %rax, %rbx
movq %r14, %rax
shrq $0x20, %rax
je 0x12e41e
movq 0x68(%rsp), %rdi
leaq 0x24b297(%rip), %rsi    # 0x3796a7
xorl %ebx, %ebx
xorl %eax, %eax
callq 0xfcb67
jmp 0x12e607
movq 0x60(%rsp), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x28(%rbx)
xorl %edx, %edx
movq %rdx, 0xc8(%rbx)
movabsq $0x100000014, %rax      # imm = 0x100000014
movq %rax, 0x140(%rbx)
movq %rdx, 0xd8(%rbx)
movq $-0x1, %rax
movq %rax, 0x108(%rbx)
movq %rbp, 0x20(%rsp)
movq %rbp, 0xe8(%rbx)
movq %rdx, 0x8(%rbx)
movl %r12d, 0x138(%rbx)
movq %rcx, 0x20(%rbx)
movq %rdx, 0x110(%rbx)
movups %xmm0, 0xf0(%rbx)
movups %xmm0, 0x128(%rbx)
movq $0x2, 0x118(%rbx)
movq %rax, 0x120(%rbx)
movq %r14, 0x100(%rbx)
movw $0x100, 0x148(%rbx)     # imm = 0x100
movq %rdx, 0xc0(%rbx)
movl %r13d, %ebp
movl %r13d, 0x13c(%rbx)
leaq 0x152(%rip), %rax       # 0x12e619
movq %rax, 0x50(%rbx)
movq %r15, %rdi
callq 0x2033eb
movq %rax, 0x58(%rbx)
movq %r15, %rdi
callq 0x2033eb
movq %rax, 0x60(%rbx)
movq %r15, %rdi
callq 0x2033eb
movq %rax, 0x68(%rbx)
movq %r15, %rdi
callq 0x2033eb
movq %rax, 0x70(%rbx)
callq 0x1e279e
movq %rax, 0x78(%rbx)
callq 0x1e279e
movq %rax, 0x80(%rbx)
callq 0x1e279e
movq %rax, 0x88(%rbx)
callq 0x1e279e
movq %rax, 0x90(%rbx)
movl %r12d, 0x14(%rsp)
leaq 0x24b152(%rip), %r12    # 0x379686
movl $0x28, %edi
movq %r12, %rsi
movl $0x1b6, %edx            # imm = 0x1B6
callq 0x104226
movq %rax, 0x98(%rbx)
movl $0x28, %edi
movq %r12, %rsi
movl $0x1b7, %edx            # imm = 0x1B7
callq 0x104226
movq %rax, 0xa0(%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0xa8(%rbx)
movl %r13d, %r13d
movl $0x8, %esi
movq %r13, %rdi
movq %r12, %rdx
movl $0x3f9, %ecx            # imm = 0x3F9
callq 0x10436a
movq %rax, 0xb8(%rbx)
movl $0x18, %esi
movq %r13, %rdi
movq %r12, %rdx
movl $0x3fb, %ecx            # imm = 0x3FB
callq 0x10436a
movq %rax, 0xb0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
xorl %eax, %eax
movq %rax, 0x48(%rbx)
leaq 0x24b159(%rip), %rsi    # 0x37971a
movq 0x60(%rsp), %r12
movq %r12, %rdi
movl 0x14(%rsp), %edx
movl %ebp, %ecx
movq %r14, %r8
movq 0x20(%rsp), %r9
xorl %eax, %eax
callq 0x103fe1
movl (%r15), %edx
movl 0x4(%r15), %ecx
movl 0x8(%r15), %r8d
movl 0xc(%r15), %r9d
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
leaq 0x24b164(%rip), %rsi    # 0x379761
movq %r12, %rdi
xorl %eax, %eax
callq 0x103fe1
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq