// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Process_Read.cpp
// Function: append_ul_t(all_ul_t*, unsigned long*, char*, long, char*, long, ul_ov_t*, long, float, ug_opt_t const*, unsigned int)
void append_ul_t(all_ul_t *x, uint64_t *rid, char* id, int64_t id_l, char* str, int64_t str_l, ul_ov_t *o, int64_t on, float p_chain_rate, const ug_opt_t *uopt, uint32_t save_bases) {
	int64_t i, mine, maxs, ovlp, st, et, bl = 0, pc = 0, en = 0;
	uint32_t o_l, o_r;
	ul_vec_t *p = NULL;
	nid_t *np = NULL;
	ul_ov_t *z = NULL;
	uc_block_t *b = NULL, tt;

	if(id) {
		kv_pushp(nid_t, x->nid, &np);
		np->n = id_l; MALLOC(np->a, np->n+1); memcpy(np->a, id, id_l); np->a[id_l] = '\0';
	}

	if(str||str_l) {
		if(rid == NULL) {
			kv_pushp(ul_vec_t, *x, &p);
			memset(p, 0, sizeof(*p));
		} else {
			if((*rid) >= x->m) kv_resize(ul_vec_t, *x, (*rid) + 1);
			if((*rid) >= x->n) {
				memset(x->a+x->n, 0, sizeof(*p)*((*rid) + 1 - x->n));
				x->n = (*rid) + 1;
			}
			p = &(x->a[(*rid)]);
		}
		// if((*rid) == 23) fprintf(stderr, "#rid->%lu, on->%ld\n", *rid, on);

		p->bb.n = p->N_site.n = p->r_base.n = 0; p->dd = 0;
		p->rlen = str_l; 
		// fprintf(stderr, "str_l->%ld, str->%u\n", str_l, str?1:0);
		
		if(o == NULL || on == 0) on = 0; en = 0;
		for (i = on-1, st = et = str_l; i >= 0; i--) {
			z = &(o[i]);
			if(z->el) {
				if((z->tn&((uint32_t)(0x80000000)))) {
					mine = MIN(et, ((int64_t)z->qe)); maxs = MAX(st, ((int64_t)z->qs));
					ovlp = mine - maxs; 
					if(ovlp < 0) bl -= ovlp;
					if(save_bases && ovlp < 0) {///push original bases
						kv_pushp(uc_block_t, p->bb, &b);
						b->hid = 0/**x->mm**/; b->rev = 0; b->base = 1; b->pchain = 0; b->el = 0;
						b->qe = maxs; b->qs = b->qe + ovlp; //bl += (b->qe-b->qs);
						o_l = (b->qs >= UL_FLANK?UL_FLANK:b->qs);
						o_r = ((str_l-b->qe)>=UL_FLANK?UL_FLANK:(str_l-b->qe));
						b->pidx = b->pdis = b->aidx = (uint32_t)-1; 
						b->hid |= (o_l<<15); b->hid |= o_r;
						b->qs -= o_l; b->qe += o_r;
						b->ts = p->r_base.n; b->te = b->ts + B4L(b->qe-b->qs);
						kv_resize(uint8_t, p->r_base, b->te); p->r_base.n = b->te;
						// fprintf(stderr, "\n+rid->%lu, str_l->%ld, b->qs->%u, b->qe->%u\n", *rid, str_l, b->qs, b->qe);
						ha_encode_base(p->r_base.a+b->ts, str+b->qs, b->qe-b->qs, &(p->N_site), b->qs);
					} 

					st = MIN(st, z->qs);
				}

				///push ovlp bases
				kv_pushp(uc_block_t, p->bb, &b);
				b->hid = (z->tn<<1)>>1; b->rev = z->rev; b->base = 0; b->el = z->el;
				b->pchain = ((z->tn&((uint32_t)(0x80000000)))?1:0);
				b->qs = z->qs; b->qe = z->qe;
				b->ts = z->ts; b->te = z->te;
				if(b->pchain) pc++;				
				b->pidx = i; b->pdis = b->aidx = (uint32_t)-1; 
				en++; z->qn = p->bb.n - 1;
			}
		}

		if(st > 0) bl += st;
		if(save_bases && st > 0) {///push original bases
			kv_pushp(uc_block_t, p->bb, &b);
			b->hid = 0/**x->mm**/; b->rev = 0; b->base = 1; b->pchain = 0; b->el = 0;
			b->qe = st; b->qs = 0; //bl += (b->qe-b->qs);
			o_l = (b->qs >= UL_FLANK?UL_FLANK:b->qs);
			o_r = ((str_l-b->qe)>=UL_FLANK?UL_FLANK:(str_l-b->qe));
			b->pidx = b->pdis = b->aidx = (uint32_t)-1; 
			b->hid |= (o_l<<15); b->hid |= o_r;
			b->qs -= o_l; b->qe += o_r;
			b->ts = p->r_base.n; b->te = b->ts + B4L(b->qe-b->qs);
			kv_resize(uint8_t, p->r_base, b->te); p->r_base.n = b->te;
			// if(!str) fprintf(stderr, "-rid->%lu, st->%ld, str_l->%ld\n", *rid, st, str_l);
			ha_encode_base(p->r_base.a+b->ts, str+b->qs, b->qe-b->qs, &(p->N_site), b->qs);	
			// push_subblock_original_bases(str, x, p, end, str_l, 321);//for debug
		}

		if(pc > 0) p->dd = 3;
		if((pc == en) && ((str_l-bl) > (str_l*p_chain_rate))) p->dd = 2;
		if((pc == en) && (bl == 0)) p->dd = 1;
		// debug_append_ul_t(o, on, p);
		// char *sst = NULL; CALLOC(sst, str_l);//for debug
		// retrieve_ul_t(NULL, sst, x, rid?*rid:x->n-1, 0, 0, -1);
		// if(memcmp(sst, str, str_l)) {
		// 	fprintf(stderr, "ap-Wrong read, id: %ld, [%d, %ld)\n", (int64_t)(rid?*rid:x->n-1), 0, str_l);
		// 	for (i = 0; i < str_l; i++) {
		// 		if(sst[i] != str[i]) fprintf(stderr, "[%ld] input:%c, decompress:%c\n", i, str[i], sst[i]);
		// 	}
		// }
		// free(sst);
		ovlp = p->bb.n>>1;
		for (i = 0; i < ovlp; i++) {
			tt = p->bb.a[i]; 
			p->bb.a[i] = p->bb.a[p->bb.n-i-1];
			p->bb.a[p->bb.n-i-1] = tt;
			if(p->bb.a[i].pidx!=(uint32_t)-1) {
				o[p->bb.a[i].pidx].qn = p->bb.n-o[p->bb.a[i].pidx].qn-1;
				p->bb.a[i].pidx = (uint32_t)-1;
			}
			if(p->bb.a[p->bb.n-i-1].pidx!=(uint32_t)-1) {
				o[p->bb.a[p->bb.n-i-1].pidx].qn = p->bb.n-o[p->bb.a[p->bb.n-i-1].pidx].qn-1;
				p->bb.a[p->bb.n-i-1].pidx = (uint32_t)-1;
			}
		}
		if(((uint32_t)p->bb.n)&1) {
			o[p->bb.a[i].pidx].qn = p->bb.n-o[p->bb.a[i].pidx].qn-1;
			p->bb.a[i].pidx = (uint32_t)-1;
		}
		
		determine_chain_distance(o, on, p, uopt->sources, uopt->max_hang, uopt->min_ovlp, *rid);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movss %xmm0, 0x3c(%rsp)
movq %r9, %r12
movq %rsi, %r13
movq %rdi, %rbp
testq %rdx, %rdx
movq %r8, 0x30(%rsp)
je 0x929b
movq %rcx, %rbx
movq %rdx, %r14
movq %r13, 0x18(%rsp)
movq %r12, %r13
movq (%rbp), %r15
cmpq 0x8(%rbp), %r15
jne 0x9257
leaq (%r15,%r15), %rsi
testq %r15, %r15
pushq $0x2
popq %rax
cmoveq %rax, %rsi
movq %rsi, 0x8(%rbp)
movq 0x10(%rbp), %rdi
shlq $0x4, %rsi
callq 0x2370
movq %rax, %r12
movq %rax, 0x10(%rbp)
movq (%rbp), %r15
jmp 0x925b
movq 0x10(%rbp), %r12
leaq 0x1(%r15), %rax
movq %rax, (%rbp)
shlq $0x4, %r15
movl %ebx, 0x8(%r12,%r15)
leal 0x1(%rbx), %edi
callq 0x2280
movq %rax, (%r12,%r15)
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2160
movq (%r12,%r15), %rax
movb $0x0, (%rax,%rbx)
movq %r13, %r12
movq 0x30(%rsp), %r8
movq 0x18(%rsp), %r13
movq %r8, %rax
orq %r12, %rax
je 0x9a09
movq 0xc8(%rsp), %r15
movq 0xc0(%rsp), %r14
testq %r13, %r13
je 0x9365
movq (%r13), %rax
movq 0x58(%rbp), %rcx
cmpq %rcx, %rax
setb %dl
leaq 0x1(%rax), %rsi
cmpq %rsi, %rcx
setae %cl
orb %dl, %cl
jne 0x9329
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x10, %rcx
orq %rax, %rcx
incq %rcx
movq %rcx, 0x58(%rbp)
movq 0x48(%rbp), %rdi
imulq $0x58, %rcx, %rsi
callq 0x2370
movq %rax, 0x48(%rbp)
movq (%r13), %rax
movq 0x50(%rbp), %rdx
movq %rax, %rcx
subq %rdx, %rcx
jb 0x935b
imulq $0x58, %rdx, %rdi
addq 0x48(%rbp), %rdi
imulq $0x58, %rcx, %rdx
addq $0x58, %rdx
xorl %esi, %esi
callq 0x20e0
movq (%r13), %rax
incq %rax
movq %rax, 0x50(%rbp)
movq (%r13), %rax
imulq $0x58, %rax, %r13
addq 0x48(%rbp), %r13
jmp 0x93cd
movq 0x50(%rbp), %rcx
cmpq 0x58(%rbp), %rcx
jne 0x9398
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rax
movq %rax, 0x58(%rbp)
movq 0x48(%rbp), %rdi
imulq $0x58, %rax, %rsi
callq 0x2370
movq %rax, 0x48(%rbp)
movq 0x50(%rbp), %rcx
jmp 0x939c
movq 0x48(%rbp), %rax
leaq 0x1(%rcx), %rdx
movq %rdx, 0x50(%rbp)
imulq $0x58, %rcx, %rcx
leaq (%rax,%rcx), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rax,%rcx)
movups %xmm0, 0x30(%rax,%rcx)
movups %xmm0, 0x20(%rax,%rcx)
movups %xmm0, 0x10(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
andq $0x0, 0x50(%rax,%rcx)
movl 0xd8(%rsp), %esi
movq 0xd0(%rsp), %rbp
andq $0x0, (%r13)
leaq 0x38(%r13), %rax
movq %rax, 0x40(%rsp)
andq $0x0, 0x40(%r13)
andq $0x0, 0x20(%r13)
movb $0x0, 0x50(%r13)
movl %r12d, 0x18(%r13)
testq %r14, %r14
cmoveq %r14, %r15
xorl %ecx, %ecx
movq %r15, %rbx
movq %r12, 0x18(%rsp)
movq %r12, %r11
xorl %r8d, %r8d
xorl %r9d, %r9d
xorl %r10d, %r10d
imulq $0x1c, %rbx, %rax
addq %r14, %rax
testq %rbx, %rbx
jle 0x9729
decq %rbx
leaq -0x1c(%rax), %r12
testb $0x40, -0x1(%rax)
movq %r12, %rax
je 0x9421
cmpl $0x0, 0xc(%r12)
jns 0x9628
movq %r15, 0x28(%rsp)
movl 0x4(%r12), %eax
movl 0x8(%r12), %r15d
movq 0x18(%rsp), %rdx
cmpq %rdx, %r15
cmovgeq %rdx, %r15
cmpq %rax, %r11
movq %rax, %rbp
cmovgq %r11, %rbp
movq %r15, 0x58(%rsp)
subq %rbp, %r15
testl %esi, %esi
je 0x94c7
testq %r15, %r15
jns 0x94c7
movq 0x30(%r13), %rdi
cmpq 0x28(%r13), %rcx
movq %r8, 0x10(%rsp)
movq %r9, 0x20(%rsp)
movq %r10, 0x8(%rsp)
movq %r11, 0x50(%rsp)
movq %r15, 0x48(%rsp)
jne 0x94d4
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rax
movq %rax, 0x28(%r13)
imulq $0x24, %rax, %rsi
callq 0x2370
movq %rax, %r8
movq %rax, 0x30(%r13)
movq 0x20(%r13), %rcx
jmp 0x94d7
movq 0xd0(%rsp), %rbp
jmp 0x960f
movq %rdi, %r8
leaq 0x1(%rcx), %rax
movq %rax, 0x20(%r13)
imulq $0x24, %rcx, %rdx
movl $0x200, %edi            # imm = 0x200
movq 0x58(%rsp), %r9
cmpl %edi, %r9d
movl $0x200, %eax            # imm = 0x200
cmovbl %r9d, %eax
movl %ebp, %esi
movq 0x18(%rsp), %rcx
subq %rsi, %rcx
cmpq $0x200, %rcx            # imm = 0x200
cmovgel %edi, %ecx
movb $0x40, 0x20(%r8,%rdx)
orl $-0x1, 0x1c(%r8,%rdx)
orq $-0x1, 0x14(%r8,%rdx)
subl %eax, %r9d
shll $0xf, %eax
orl %ecx, %eax
movl %eax, (%r8,%rdx)
movl %r9d, 0x4(%r8,%rdx)
addl %ebp, %ecx
movl %ecx, 0x8(%r8,%rdx)
movl (%r13), %edi
movl %edi, 0xc(%r8,%rdx)
subl %r9d, %ecx
movl %ecx, %esi
shrl $0x2, %esi
movl %ecx, %eax
andl $0x3, %eax
cmpl $0x1, %eax
sbbl $-0x1, %esi
addl %edi, %esi
movl %esi, 0x10(%r8,%rdx)
movq 0x10(%r13), %rax
cmpq %rsi, 0x8(%r13)
jae 0x95c4
addq %rdx, %r8
decq %rsi
movq %rsi, %rcx
shrq %rcx
orq %rsi, %rcx
movq %rcx, %rdx
shrq $0x2, %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x4, %rcx
orq %rdx, %rcx
movq %rcx, %rdx
shrq $0x8, %rdx
orq %rcx, %rdx
movq %rdx, %rsi
shrq $0x10, %rsi
orq %rdx, %rsi
incq %rsi
movq %rsi, 0x8(%r13)
movq %rax, %rdi
movq %r8, %r15
callq 0x2370
movq %rax, 0x10(%r13)
movl 0x10(%r15), %esi
movl 0xc(%r15), %edi
movl 0x4(%r15), %r9d
movl 0x8(%r15), %ecx
subl %r9d, %ecx
movq 0xd0(%rsp), %rbp
movq %rsi, (%r13)
movl %edi, %edi
addq %rax, %rdi
movl %r9d, %r8d
movq 0x30(%rsp), %rax
leaq (%rax,%r8), %rsi
movl %ecx, %edx
movq 0x40(%rsp), %rcx
callq 0x7dde
movl 0x4(%r12), %eax
movq 0x20(%r13), %rcx
movq 0x10(%rsp), %r8
movq 0x20(%rsp), %r9
movq 0x8(%rsp), %r10
movq 0x50(%rsp), %r11
movq 0x48(%rsp), %r15
movq %r15, %rdx
sarq $0x3f, %rdx
andq %r15, %rdx
subq %rdx, %r8
cmpq %rax, %r11
cmovgeq %rax, %r11
movq 0x28(%rsp), %r15
movq 0x30(%r13), %rax
cmpq 0x28(%r13), %rcx
jne 0x968a
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rdx
movq %rdx, 0x28(%r13)
imulq $0x24, %rdx, %rsi
movq %rax, %rdi
movq %r15, 0x28(%rsp)
movq %r8, 0x10(%rsp)
movq %r9, %rbp
movq %r10, 0x8(%rsp)
movq %r11, %r15
callq 0x2370
movq %r15, %r11
movq 0x8(%rsp), %r10
movq %rbp, %r9
movq 0xd0(%rsp), %rbp
movq 0x10(%rsp), %r8
movq 0x28(%rsp), %r15
movq %rax, 0x30(%r13)
movq 0x20(%r13), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x20(%r13)
imulq $0x24, %rcx, %rcx
movl 0xc(%r12), %edx
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl %esi, %edx
movl %edx, (%rax,%rcx)
movl 0x18(%r12), %edx
movb 0x20(%rax,%rcx), %sil
shrl $0x1a, %edx
andb $0x20, %dl
andb $-0x61, %sil
orb %dl, %sil
movb %sil, 0x20(%rax,%rcx)
movl 0x18(%r12), %edi
shrl $0x17, %edi
andb $-0x80, %dil
andb $0x3f, %sil
orb %dil, %sil
movb %sil, 0x20(%rax,%rcx)
movl 0xc(%r12), %esi
shrl $0x1f, %esi
addq %rsi, %r9
orb %dl, %sil
orb %dil, %sil
movb %sil, 0x20(%rax,%rcx)
movsd 0x10(%r12), %xmm0
movsd 0x4(%r12), %xmm1
movlhps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movups %xmm1, 0x4(%rax,%rcx)
movl %ebx, 0x14(%rax,%rcx)
orq $-0x1, 0x18(%rax,%rcx)
incq %r10
movq 0x20(%r13), %rcx
leal -0x1(%rcx), %eax
movl %eax, (%r12)
movl 0xd8(%rsp), %esi
jmp 0x941a
xorl %ebx, %ebx
testq %r11, %r11
cmovgq %r11, %rbx
testl %esi, %esi
movq 0x18(%rsp), %r12
je 0x988e
testq %r11, %r11
jle 0x988e
movq 0x30(%r13), %rbp
cmpq 0x28(%r13), %rcx
movq %r8, 0x10(%rsp)
movq %r9, 0x20(%rsp)
movq %r10, 0x8(%rsp)
jne 0x9790
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rax
movq %rax, 0x28(%r13)
imulq $0x24, %rax, %rsi
movq %rbp, %rdi
movq %r11, %rbp
callq 0x2370
movq %rbp, %r11
movq %rax, %rbp
movq %rax, 0x30(%r13)
movq 0x20(%r13), %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0x20(%r13)
imulq $0x24, %rcx, %rdi
movb $0x40, 0x20(%rbp,%rdi)
andl $0x0, 0x4(%rbp,%rdi)
movl %r11d, %eax
movq %r12, %rcx
subq %rax, %rcx
cmpq $0x200, %rcx            # imm = 0x200
movl $0x200, %edx            # imm = 0x200
cmovll %ecx, %edx
orl $-0x1, 0x1c(%rbp,%rdi)
orq $-0x1, 0x14(%rbp,%rdi)
movl %edx, (%rbp,%rdi)
addl %r11d, %edx
movl %edx, 0x8(%rbp,%rdi)
movl (%r13), %esi
movl %esi, 0xc(%rbp,%rdi)
movl %edx, %ecx
shrl $0x2, %ecx
movl %edx, %eax
andl $0x3, %eax
cmpl $0x1, %eax
sbbl $-0x1, %ecx
addl %esi, %ecx
movl %ecx, 0x10(%rbp,%rdi)
movq 0x10(%r13), %rax
xorl %r9d, %r9d
cmpq %rcx, 0x8(%r13)
jae 0x9856
addq %rdi, %rbp
decq %rcx
movq %rcx, %rdx
shrq %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x2, %rcx
orq %rdx, %rcx
movq %rcx, %rdx
shrq $0x4, %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x8, %rcx
orq %rdx, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%r13)
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r13)
movl 0x10(%rbp), %ecx
movl 0xc(%rbp), %esi
movl 0x4(%rbp), %r9d
movl 0x8(%rbp), %edx
movq 0xd0(%rsp), %rbp
movq %rcx, (%r13)
movl %esi, %edi
addq %rax, %rdi
movl %r9d, %r8d
movq 0x30(%rsp), %rsi
addq %r8, %rsi
subl %r9d, %edx
movq 0x40(%rsp), %rcx
callq 0x7dde
movq 0x10(%rsp), %r8
movq 0x20(%rsp), %r9
movq 0x8(%rsp), %r10
testq %r9, %r9
je 0x9898
movb $0x3, 0x50(%r13)
cmpq %r10, %r9
jne 0x98c6
addq %rbx, %r8
je 0x98ba
cvtsi2ss %r12, %xmm0
subq %r8, %r12
cvtsi2ss %r12, %xmm1
mulss 0x3c(%rsp), %xmm0
ucomiss %xmm0, %xmm1
jbe 0x98c6
cmpq $0x1, %r8
movb $0x2, %al
sbbb $0x0, %al
movb %al, 0x50(%r13)
movq 0x20(%r13), %r8
movq %r8, %rax
shrq %rax
pushq $-0x24
popq %rcx
xorl %edx, %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %rax, %rdi
subq $0x1, %rdi
jb 0x99c7
movq 0x30(%r13), %r8
movl 0x20(%r8,%rdx), %r9d
movl %r9d, 0x80(%rsp)
movups (%r8,%rdx), %xmm0
movups 0x10(%r8,%rdx), %xmm1
movaps %xmm1, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
imulq $0x24, 0x20(%r13), %r9
addq %r8, %r9
movups (%rcx,%r9), %xmm0
movups 0x10(%rcx,%r9), %xmm1
movups %xmm0, (%r8,%rdx)
movups %xmm1, 0x10(%r8,%rdx)
movl 0x20(%rcx,%r9), %r9d
movl %r9d, 0x20(%r8,%rdx)
imulq $0x24, 0x20(%r13), %r8
addq 0x30(%r13), %r8
movl 0x80(%rsp), %r9d
movl %r9d, 0x20(%rcx,%r8)
movaps 0x60(%rsp), %xmm0
movaps 0x70(%rsp), %xmm1
movups %xmm1, 0x10(%rcx,%r8)
movups %xmm0, (%rcx,%r8)
movq 0x20(%r13), %r8
movq 0x30(%r13), %r9
movl 0x14(%r9,%rdx), %r10d
cmpq %rsi, %r10
je 0x998a
imulq $0x1c, %r10, %r10
movl (%r14,%r10), %r11d
notl %r11d
addl %r8d, %r11d
movl %r11d, (%r14,%r10)
orl $-0x1, 0x14(%r9,%rdx)
imulq $0x24, %r8, %r10
leaq (%r9,%r10), %r11
movl 0x14(%rcx,%r11), %r11d
cmpq %rsi, %r11
je 0x99ba
addq %r10, %r9
addq $0x14, %r9
imulq $0x1c, %r11, %r10
movl (%r14,%r10), %r11d
notl %r11d
addl %r8d, %r11d
movl %r11d, (%r14,%r10)
orl $-0x1, (%r9,%rcx)
addq $0x24, %rdx
addq $-0x24, %rcx
jmp 0x98dd
testb $0x1, %r8b
je 0x99ef
movq 0x30(%r13), %rcx
imulq $0x24, %rax, %rax
movl 0x14(%rcx,%rax), %edx
imulq $0x1c, %rdx, %rdx
movl (%r14,%rdx), %esi
notl %esi
addl %esi, %r8d
movl %r8d, (%r14,%rdx)
orl $-0x1, 0x14(%rcx,%rax)
movq 0x8(%rbp), %rcx
movslq 0x40(%rbp), %r8
movslq 0x44(%rbp), %r9
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x8dc4
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq