// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: ed_dp_c(overlap_region_alloc*, kv_ul_ov_t*, ul_ov_t*, ul_idx_t const*, ug_opt_t const*, long, double, long, long, unsigned long*, unsigned long*, unsigned long*, double, unsigned long, All_reads*, ma_ug_t*, unsigned int)
int64_t ed_dp_c(overlap_region_alloc *o, kv_ul_ov_t *res, ul_ov_t *ex, const ul_idx_t *uref, const ug_opt_t *uopt, int64_t bw, 
double diff_ec_ul, int64_t qlen, int64_t max_skip, uint64_t *srt, uint64_t *idx, uint64_t *track, double err_sc, 
uint64_t mode, All_reads *ridx, ma_ug_t *ug, uint32_t need_srt)
{
    if(res->n == 0) return 0;
    uint32_t li_v, lj_v, rev_n;
    int64_t mm_ovlp, x, i, j, k, sc, csc, mm_sc, mm_idx, qo, qovl, minus_sc, pj, n_skip, wi, werr;
    ul_ov_t *li = NULL, *lj = NULL, rev_t;
	if(need_srt) {
		radix_sort_ul_ov_srt_qe(res->a, res->a + res->n);
		for (i = 1, j = 0; i <= (int64_t)res->n; i++) {
			if (i == (int64_t)res->n || res->a[i].qe != res->a[j].qe) {
				if(i - j > 1) radix_sort_ul_ov_srt_qs(res->a+j, res->a+i);
				j = i;
			}
		}
	}
	///res->a[0].qe: min_qe; res->a[res->n-1].qs: max_qs
	if(res->a[0].qe == qlen && res->a[res->n-1].qs == 0) {///all alignments are contained
		for (i = 0; i < (int64_t)res->n; ++i) {
			li = &(res->a[i]); assert(li->qs == 0 && li->qe == qlen);
			csc = (li->qe-li->qs); minus_sc = (o->list[li->qn].non_homopolymer_errors*err_sc);
			csc -= minus_sc; if(csc <= 0) csc = 1; mm_sc = csc; mm_idx = -1;

			if(mm_sc > ((int64_t)0x7fffffff)) mm_sc = ((int64_t)0x7fffffff);
			track[i] = push_sc_pre(mm_sc, mm_idx);
			srt[i] = track[i]>>32; srt[i] <<= 32; srt[i] |= i;
		}
	} else {
		memset(idx, 0, (sizeof((*idx))*res->n));
		for (i = 0; i < (int64_t)res->n; ++i) {
			li = &(res->a[i]); li_v = (li->tn<<1)|li->rev;
			// fprintf(stderr, "[M::%s::i->%ld::utg%.6dl] q[%u, %u), t[%u, %u)\n", __func__, i, (int32_t)li->tn+1, li->qs, li->qe, li->ts, li->te);
			mm_ovlp = mode?max_ovlp_src(uopt, li_v^1):max_ovlp(uref->ug->g, li_v^1);        
			x = (li->qs + mm_ovlp)*diff_ec_ul; 
			if(x < bw) x = bw; 
			x += li->qs + mm_ovlp;
			if (x > qlen+1) x = qlen+1;
			x = find_ul_ov_max(i, res->a, x+G_CHAIN_INDEL); 
			csc = (li->qe-li->qs); minus_sc = (o->list[li->qn].non_homopolymer_errors*err_sc);
			csc -= minus_sc; if(csc <= 0) csc = 1;
			mm_sc = csc; mm_idx = -1; n_skip = 0; wi = werr = 0;
			for (j = x; j >= 0; --j) { // collect potential destination vertices
				lj = &(res->a[j]); lj_v = (lj->tn<<1)|lj->rev;
				if(lj->qe+G_CHAIN_INDEL <= li->qs) break;//even this pair has a overlap, its length will be very small; just ignore
				if(lj->qs > li->qs+G_CHAIN_INDEL) continue;///at boundary, migh be lj->qs == li->qs
				qo = infer_rovlp(li, lj, NULL, NULL, ridx, ug); ///overlap length in query (UL read)
				// fprintf(stderr, "[M::%s::j->%ld] qo::%ld\n", __func__, j, qo);
				if(li_v != lj_v && get_ecov_adv(uref, uopt, li_v^1, lj_v^1, bw, diff_ec_ul, qo, mode, NULL)) {
					qovl = ((MIN(li->qe, lj->qe) > MAX(li->qs, lj->qs))? (MIN(li->qe, lj->qe) - MAX(li->qs, lj->qs)):0);
					// fprintf(stderr, "[M::%s::] utg%.6dl->utg%.6dl, icsc::%ld, ierr::%u, ilen::%u, aln::%u, app_sc::%ld\n", 
					// __func__, (int32_t)li->tn+1, (int32_t)lj->tn+1, csc, o->list[li->qn].non_homopolymer_errors, 
					// li->qe - li->qs, o->list[li->qn].align_length, comput_sc_partial_cigar(csc, qovl, err_sc, &(o->list[li->qn]), &wi, &werr));
					sc = comput_sc_partial_cigar(csc, qovl, err_sc, &(o->list[li->qn]), &wi, &werr) 
																						+ pop_sc(track[j]);
					// fprintf(stderr, "[M::%s::j->%ld] qo::%ld, sc::%ld, mm_sc::%ld\n", __func__, j, qo, sc, mm_sc);
					if(sc > mm_sc) {
						mm_sc = sc, mm_idx = j;
						if (n_skip > 0) --n_skip;
					} else if (idx[j] == (uint64_t)i) {
						if (++n_skip > max_skip)
							break;
					}
					pj = pop_pre(track[j]);
					if(pj >= 0) idx[pj] = i;
				}
			}
			if(mm_sc > ((int64_t)0x7fffffff)) mm_sc = ((int64_t)0x7fffffff);
			track[i] = push_sc_pre(mm_sc, mm_idx);
			srt[i] = track[i]>>32; srt[i] <<= 32; srt[i] |= i;
			// fprintf(stderr, "[M::%s::i->%ld] mm_idx::%ld\n", __func__, i, mm_idx);
		}
	}
    
    int64_t n_v, n_u, n_v0; 
    radix_sort_gfa64(srt, srt+res->n); 
    for (k = (int64_t)res->n-1, n_v = n_u = 0; k >= 0; --k) {
        n_v0 = n_v; 
		for (i = (uint32_t)srt[k]; i >= 0 && (track[i]&((uint64_t)0x80000000)) == 0;) {
			ex[n_v++] = res->a[i]; track[i] |= ((uint64_t)0x80000000);
			i = pop_pre(track[i]);
		}
        if(n_v0 == n_v) continue;
        sc = (i<0?(pop_sc(srt[k])):(pop_sc(srt[k])-pop_sc(track[i])));
        if(sc < 0) {
            n_v = n_v0;
            continue;
        }
        idx[n_u++] = ((uint64_t)sc<<32)|(n_v-n_v0); 
    }

    for (k = 0, n_v = n_v0 = 0; k < n_u; k++) {
        n_v0 = n_v; n_v += (uint32_t)idx[k];
        res->a[k].qn = idx[k]>>32;//score
        res->a[k].ts = n_v0; res->a[k].te = n_v;///idx
        
        rev_n = ((uint32_t)idx[k])>>1; 
        ///we need to consider contained reads; so determining qs is not such easy
        res->a[k].qs = (uint32_t)-1; res->a[k].qe = ex[n_v0].qe;
        for (i = 0; i < rev_n; i++) {
            rev_t = ex[n_v0+i]; ex[n_v0+i] = ex[n_v-i-1]; ex[n_v-i-1] = rev_t;
            if(res->a[k].qs > ex[n_v0+i].qs) res->a[k].qs = ex[n_v0+i].qs;
            if(res->a[k].qs > ex[n_v-i-1].qs) res->a[k].qs = ex[n_v-i-1].qs;
        }
        if(((uint32_t)idx[k])&1) {
            if(res->a[k].qs > ex[n_v0+i].qs) res->a[k].qs = ex[n_v0+i].qs;
        }
    }
    
    res->n = n_u;
    radix_sort_ul_ov_srt_qn(res->a, res->a + res->n);//sort by score
    // fprintf(stderr, "---[M::%s] n_u:%ld, n_v:%ld\n", __func__, n_u, n_v);
    return n_v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movsd %xmm1, 0x30(%rsp)
movsd %xmm0, 0x68(%rsp)
movq %r9, 0x60(%rsp)
movq %r8, 0x58(%rsp)
movq %rcx, 0x50(%rsp)
movq %rdx, 0x20(%rsp)
movq %rdi, 0x28(%rsp)
movq 0x8(%rsi), %rdx
testq %rdx, %rdx
je 0x1703b8
movq %rsi, %r13
movq 0xf0(%rsp), %r14
cmpl $0x0, 0x130(%rsp)
movq (%rsi), %rdi
je 0x17003b
movq %r14, %rbx
pushq $0x1
popq %r14
imulq $0x1c, %rdx, %rsi
addq %rdi, %rsi
callq 0x156f5c
pushq $0x1c
popq %r15
xorl %eax, %eax
movq 0x8(%r13), %rdx
cmpq %rdx, %r14
jg 0x170034
je 0x170003
movq (%r13), %rcx
movl 0x8(%rcx,%r15), %edx
imulq $0x1c, %rax, %rsi
cmpl 0x8(%rcx,%rsi), %edx
jne 0x170003
movq %rax, %rcx
jmp 0x170028
movq %r14, %rdx
subq %rax, %rdx
movq %r14, %rcx
cmpq $0x2, %rdx
jl 0x170028
movq (%r13), %rsi
imulq $0x1c, %rax, %rdi
addq %rsi, %rdi
addq %r15, %rsi
callq 0x1571fa
movq %r14, %rcx
incq %r14
addq $0x1c, %r15
movq %rcx, %rax
jmp 0x16ffe0
movq (%r13), %rdi
movq %rbx, %r14
movq 0x110(%rsp), %rbp
movl 0x8(%rdi), %eax
cmpq %r14, %rax
jne 0x17005a
imulq $0x1c, %rdx, %rax
cmpl $0x0, -0x18(%rdi,%rax)
je 0x1703c0
shlq $0x3, %rdx
movq 0x108(%rsp), %rdi
xorl %esi, %esi
callq 0x20e0
incq %r14
xorl %r15d, %r15d
movq %r13, 0x18(%rsp)
movq %r14, 0x70(%rsp)
movq 0x8(%r13), %rdx
cmpq %rdx, %r15
jge 0x17046c
movq (%r13), %r12
imulq $0x1c, %r15, %rbx
movl 0xc(%r12,%rbx), %eax
movl 0x18(%r12,%rbx), %ecx
shrdl $0x1f, %eax, %ecx
cmpq $0x0, 0x118(%rsp)
movl %ecx, 0x44(%rsp)
je 0x1700c8
movl %ecx, %esi
xorl $0x1, %esi
movq 0x58(%rsp), %rdi
movl %esi, 0xc(%rsp)
callq 0x15d49a
movq (%r13), %rsi
jmp 0x1700e5
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdi
movl %ecx, %esi
xorl $0x1, %esi
movl %esi, 0xc(%rsp)
callq 0x15d450
movq %r12, %rsi
addq %rbx, %r12
movq %r12, (%rsp)
movl 0x4(%r12), %ecx
addq %rax, %rcx
cvtsi2sd %rcx, %xmm0
mulsd 0x68(%rsp), %xmm0
cvttsd2si %xmm0, %rdx
movq 0x60(%rsp), %rax
cmpq %rax, %rdx
cmovleq %rax, %rdx
addq %rcx, %rdx
cmpq %r14, %rdx
cmovgeq %r14, %rdx
subl $-0x80, %edx
movq %r15, 0x38(%rsp)
movl %r15d, %edi
callq 0x160717
movq (%rsp), %rdi
movl (%rdi), %ecx
movl 0x8(%rdi), %r13d
subl 0x4(%rdi), %r13d
movq 0x28(%rsp), %rdx
movq (%rdx), %rdx
imulq $0xa8, %rcx, %rcx
movl 0x30(%rdx,%rcx), %ecx
cvtsi2sd %rcx, %xmm0
mulsd 0x30(%rsp), %xmm0
cvttsd2si %xmm0, %rcx
subq %rcx, %r13
cmpq $0x2, %r13
pushq $0x1
popq %rcx
cmovlq %rcx, %r13
andq $0x0, 0x80(%rsp)
movslq %eax, %r14
andq $0x0, 0x88(%rsp)
imulq $0x1c, %r14, %r15
movq %r13, 0x78(%rsp)
pushq $-0x1
popq %rax
movq %rax, 0x48(%rsp)
movq $0x0, 0x10(%rsp)
testq %r14, %r14
js 0x17034c
movq 0x18(%rsp), %rax
movq (%rax), %rbx
movl 0x8(%rbx,%r15), %ecx
subl $-0x80, %ecx
movl 0x4(%rdi), %eax
cmpl %eax, %ecx
jbe 0x17034c
subl $-0x80, %eax
cmpl %eax, 0x4(%rbx,%r15)
jbe 0x1701ce
movq %r13, %rcx
jmp 0x1702e6
movq %rbp, %r12
leaq (%rbx,%r15), %rsi
movl 0xc(%rbx,%r15), %eax
movl 0x18(%rbx,%r15), %ebp
shrdl $0x1f, %eax, %ebp
xorl %edx, %edx
xorl %ecx, %ecx
movq 0x120(%rsp), %r8
movq 0x128(%rsp), %r9
callq 0x3d261
cmpl %ebp, 0x44(%rsp)
je 0x1702dc
xorl $0x1, %ebp
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
movl 0xc(%rsp), %edx
movl %ebp, %ecx
movq 0x60(%rsp), %r8
movsd 0x68(%rsp), %xmm0
movq %rax, %r9
pushq $0x0
pushq 0x120(%rsp)
callq 0x1631f5
popq %rcx
popq %rdx
testq %rax, %rax
je 0x1702dc
movq (%rsp), %rdx
movl 0x8(%rdx), %eax
movl 0x4(%rbx,%r15), %ecx
movl 0x8(%rbx,%r15), %esi
cmpl %esi, %eax
cmovbl %eax, %esi
movl 0x4(%rdx), %eax
cmpl %ecx, %eax
cmoval %eax, %ecx
subl %ecx, %esi
movl $0x0, %eax
cmovbl %eax, %esi
movl (%rdx), %eax
imulq $0xa8, %rax, %rdx
movq 0x28(%rsp), %rax
addq (%rax), %rdx
movq 0x78(%rsp), %rdi
movsd 0x30(%rsp), %xmm0
leaq 0x88(%rsp), %rcx
leaq 0x80(%rsp), %r8
callq 0x16fda7
movq %r12, %rbp
movq (%r12,%r14,8), %rdx
movq %rdx, %rcx
shrq $0x20, %rcx
leaq -0x80000000(%rcx), %rsi
negq %rcx
testq %rdx, %rdx
cmovsq %rsi, %rcx
addq %rax, %rcx
cmpq %r13, %rcx
jle 0x1702f5
xorl %eax, %eax
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
setg %al
subq %rax, %rsi
movq %rsi, 0x10(%rsp)
movq %r14, 0x48(%rsp)
jmp 0x170328
movq %r13, %rcx
movq %r12, %rbp
movq (%rsp), %rdi
decq %r14
addq $-0x1c, %r15
movq %rcx, %r13
jmp 0x170198
movq 0x108(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq %rcx, (%rax,%r14,8)
jne 0x170325
movq 0x10(%rsp), %rax
cmpq 0xf8(%rsp), %rax
movq (%rsp), %rdi
jge 0x17034c
incq 0x10(%rsp)
movq %r13, %rcx
jmp 0x17032c
movq %r13, %rcx
movq (%rsp), %rdi
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andq %rax, %rdx
cmpq %rax, %rdx
je 0x1702e6
movq 0x108(%rsp), %rax
movq 0x38(%rsp), %rsi
movq %rsi, (%rax,%rdx,8)
jmp 0x1702e6
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
cmpq %rdx, %r13
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmovlq %r13, %rax
movl $0x80000000, %ecx       # imm = 0x80000000
orl %eax, %ecx
negl %eax
testq %r13, %r13
cmovnsq %rcx, %rax
shlq $0x20, %rax
movq 0x48(%rsp), %rcx
testq %rcx, %rcx
cmovsq %rdx, %rcx
orq %rax, %rcx
movq 0x38(%rsp), %r15
movq %rcx, (%rbp,%r15,8)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
orq %r15, %rcx
movq 0x100(%rsp), %rax
movq %rcx, (%rax,%r15,8)
incq %r15
movq 0x18(%rsp), %r13
movq 0x70(%rsp), %r14
jmp 0x17007d
xorl %r14d, %r14d
jmp 0x1706fa
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
addq $0x8, %rdi
xorl %ecx, %ecx
pushq $0x1
popq %rsi
cmpq %rdx, %rcx
jge 0x17046c
cmpl $0x0, -0x4(%rdi)
jne 0x17070f
movl (%rdi), %edx
cmpq %r14, %rdx
jne 0x17070f
movq 0x28(%rsp), %rdx
movq (%rdx), %rdx
movl -0x8(%rdi), %r8d
imulq $0xa8, %r8, %r8
movl 0x30(%rdx,%r8), %edx
cvtsi2sd %rdx, %xmm0
mulsd 0x30(%rsp), %xmm0
cvttsd2si %xmm0, %r8
movq %r14, %rdx
subq %r8, %rdx
cmpq $0x2, %rdx
jge 0x170428
movq %rsi, %rdx
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
cmpq %r8, %rdx
jl 0x170438
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
shlq $0x20, %rdx
addq %rax, %r8
addq %rdx, %r8
movq %r8, (%rbp,%rcx,8)
movq %rcx, %r8
orq %rax, %r8
orq %rdx, %r8
movq 0x100(%rsp), %rdx
movq %r8, (%rdx,%rcx,8)
incq %rcx
movq 0x8(%r13), %rdx
addq $0x1c, %rdi
jmp 0x1703d3
movq 0x100(%rsp), %rdi
leaq (%rdi,%rdx,8), %rsi
callq 0x156b0d
movq 0x8(%r13), %r8
xorl %ecx, %ecx
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
pushq $-0x1
popq %rsi
movq $-0x80000000, %rdi      # imm = 0x80000000
xorl %eax, %eax
movq %rcx, 0x18(%rsp)
imulq $0x1c, %rcx, %r9
addq 0x20(%rsp), %r9
testq %r8, %r8
jle 0x1705b8
movq %r8, %r11
decq %r8
movq 0x100(%rsp), %r10
movl -0x8(%r10,%r11,8), %r14d
movq %r9, %rbx
xorl %r10d, %r10d
testq %r14, %r14
js 0x17051a
movq (%rbp,%r14,8), %r15
testl %r15d, %r15d
js 0x170546
movq (%r13), %r15
imulq $0x1c, %r14, %r12
movupd (%r15,%r12), %xmm0
movups 0xc(%r15,%r12), %xmm1
movups %xmm1, 0xc(%rbx)
movupd %xmm0, (%rbx)
movq (%rbp,%r14,8), %r15
movq %r15, %r12
movl $0x80000000, %ecx       # imm = 0x80000000
orq %rcx, %r12
andq %rdx, %r15
cmpq %rdx, %r15
cmoveq %rsi, %r15
movq %r12, (%rbp,%r14,8)
decq %r10
addq $0x1c, %rbx
movq %r15, %r14
jmp 0x1704c4
testq %r10, %r10
je 0x1704a2
movq 0x100(%rsp), %rbx
movq -0x8(%rbx,%r11,8), %rbx
movq %rbx, %r11
shrq $0x20, %r11
leaq -0x80000000(%r11), %r14
negq %r11
testq %rbx, %rbx
cmovsq %r14, %r11
jmp 0x170589
testq %r10, %r10
je 0x1704a2
movq 0x100(%rsp), %rbx
movq -0x8(%rbx,%r11,8), %rbx
movq %rbx, %r11
shrq $0x20, %r11
leaq (%r11,%rdi), %r14
negq %r11
testq %rbx, %rbx
cmovsq %r14, %r11
movq %r15, %rbx
shrq $0x20, %rbx
leaq (%rbx,%rdi), %r14
negq %rbx
testq %r15, %r15
cmovsq %r14, %rbx
subq %rbx, %r11
testq %r11, %r11
js 0x1704a2
shlq $0x20, %r11
movq 0x18(%rsp), %rcx
subq %r10, %rcx
negq %r10
orq %r11, %r10
movq 0x108(%rsp), %r9
movq %r10, (%r9,%rax,8)
incq %rax
jmp 0x170494
movq 0x20(%rsp), %rcx
addq $-0x1c, %rcx
xorl %edx, %edx
pushq $-0x1
popq %rsi
xorl %r14d, %r14d
cmpq %rax, %rdx
je 0x1706e6
movq 0x108(%rsp), %rdi
movq (%rdi,%rdx,8), %r11
movl %r11d, %edi
addq %r14, %rdi
movq %r11, %r10
shrq $0x20, %r10
movq (%r13), %r9
imulq $0x1c, %rdx, %r8
movl %r10d, (%r9,%r8)
movl %r14d, 0x10(%r9,%r8)
movl %edi, 0x14(%r9,%r8)
shrl %r11d
orl $-0x1, 0x4(%r9,%r8)
imulq $0x1c, %r14, %rbx
movq 0x20(%rsp), %r14
leaq (%r14,%rbx), %r10
movl 0x8(%r14,%rbx), %ebx
movl %ebx, 0x8(%r9,%r8)
imulq $0x1c, %r11, %r11
imulq $0x1c, %rdi, %r14
addq %rcx, %r14
xorl %ebx, %ebx
movl %esi, %ebp
cmpq %rbx, %r11
je 0x1706be
movups (%r10,%rbx), %xmm0
movups 0xc(%r10,%rbx), %xmm1
movups %xmm1, 0x9c(%rsp)
movaps %xmm0, 0x90(%rsp)
movups (%r14), %xmm0
movups 0xc(%r14), %xmm1
movups %xmm1, 0xc(%r10,%rbx)
movups %xmm0, (%r10,%rbx)
movups 0x9c(%rsp), %xmm0
movups %xmm0, 0xc(%r14)
movapd 0x90(%rsp), %xmm0
movupd %xmm0, (%r14)
movq (%r13), %r9
leaq (%r9,%r8), %r15
addq $0x4, %r15
movl (%r15), %ebp
movl 0x4(%r10,%rbx), %r12d
cmpl %r12d, %ebp
jbe 0x1706a2
movl %r12d, (%r15)
movl %r12d, %ebp
movl 0x4(%r14), %r12d
cmpl %r12d, %ebp
jbe 0x1706b1
movl %r12d, (%r15)
movl %r12d, %ebp
addq $0x1c, %rbx
addq $-0x1c, %r14
jmp 0x170630
movq 0x108(%rsp), %rbx
testb $0x1, (%rbx,%rdx,8)
je 0x1706db
movl 0x4(%r10,%r11), %r10d
cmpl %r10d, %ebp
jbe 0x1706db
movl %r10d, 0x4(%r9,%r8)
incq %rdx
movq %rdi, %r14
jmp 0x1705c9
movq %rax, 0x8(%r13)
movq (%r13), %rdi
imulq $0x1c, %rax, %rsi
addq %rdi, %rsi
callq 0x15775d
movq %r14, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x82e60(%rip), %rdi     # 0x1f3576
leaq 0x81406(%rip), %rsi     # 0x1f1b23
leaq 0x82e70(%rip), %rcx     # 0x1f3594
movl $0x1a8a, %edx           # imm = 0x1A8A
callq 0x2110