// File: chhylp123[P]hifiasm/inter.cpp
// Function: qry_bub_sc(ul_idx_t const*, ma_ug_t*, scaf_res_t*, bubble_type*, unsigned long, unsigned long, unsigned long, ul_vec_t*, unsigned int, kv_ul_ov_t*)
uint64_t qry_bub_sc(const ul_idx_t *uref, ma_ug_t *gfa, scaf_res_t *ref_sc, bubble_type *bub, uint64_t bid, uint64_t qsidx, uint64_t qeidx, ul_vec_t *qstr, uint32_t avoid_id, kv_ul_ov_t *res)
{
	// fprintf(stderr, "qsidx::%lu(utg%.6u%c), qeidx::%lu(utg%.6u%c)\n", qsidx, (qstr->bb.a[qsidx].hid)+1, "lc"[gfa->u.a[qstr->bb.a[qsidx].hid].circ], qeidx, (qstr->bb.a[qeidx].hid)+1, "lc"[gfa->u.a[qstr->bb.a[qeidx].hid].circ]);
	uint32_t beg, sink, v, w, z, si, ei, qrev = (uint32_t)-1, qv, qw, trev, nn = 0, tn;
	get_bubbles(bub, bid, &beg, &sink, NULL, NULL, NULL);
	if((beg == ((uint32_t)-1)) || (sink == ((uint32_t)-1))) return 0;
	utg_rid_dt *a; uint64_t a_n, i, k; ul_vec_t *q; ul_ov_t p;
	qv = qstr->bb.a[qsidx].hid; qv <<= 1; qv |= ((uint32_t)qstr->bb.a[qsidx].rev);
	qw = qstr->bb.a[qeidx].hid; qw <<= 1; qw |= ((uint32_t)qstr->bb.a[qeidx].rev);
	if((qv == beg) && (qw == (sink^1))) qrev = 0;
	if((qv == sink) && (qw == (beg^1))) qrev = 1;
	assert(qrev != (uint32_t)-1);
	memset(&p, 0, sizeof(p));

	v = beg; w = sink^1; trev = 0;
	a = get_r_ug_region(uref->r_ug, &a_n, v>>1);
	// fprintf(stderr, "+a_n::%lu\n", a_n);
	for (i = 0; i < a_n; i++) {
		// fprintf(stderr, "+(0)i::%lu\n", i);
		if((a[i].u&1) != (v&1)) continue;
		if((a[i].u>>1) == avoid_id) continue;
		q = &(ref_sc->a[a[i].u>>1]); si = ei = a[i].off; 
		assert((q->bb.a[si].hid == (v>>1)) && (q->bb.a[si].rev == (v&1)));
		// fprintf(stderr, "+(1)i::%lu\n", i);
		for (k = tn = 0; k < q->bb.n; k++) tn += q->bb.a[k].te - q->bb.a[k].ts;
		for (k = si + 1; (k < tn) && (q->bb.a[k].aidx == q->bb.a[si].aidx); k++) {
			z = (((uint32_t)q->bb.a[k].hid)<<1)|((uint32_t)q->bb.a[k].rev);
			if(z == w) {ei = k; break;}
			if(bub->index[z>>1] != bid) break;
		}
		
		if(ei > si) {////found a bubble
			// fprintf(stderr, "+(2)i::%lu, si::%u, ei::%u, ref_id::%u\nn", i, si, ei, a[i].u>>1);
			p.qn = q->bb.a[si].aidx; p.qs = qsidx; p.qe = qeidx; 
        	p.tn = a[i].u>>1; p.ts = si; p.te = ei; 
        	p.rev = (qrev == trev?0:1); 
			kv_push(ul_ov_t, *res, p);
			nn++;
		}
	}


	v = sink; w = beg^1; trev = 1;
	a = get_r_ug_region(uref->r_ug, &a_n, v>>1);
	// fprintf(stderr, "-a_n::%lu\n", a_n);
	for (i = 0; i < a_n; i++) {
		if((a[i].u&1) != (v&1)) continue;
		if((a[i].u>>1) == avoid_id) continue;
		q = &(ref_sc->a[a[i].u>>1]); si = ei = a[i].off; 
		assert((q->bb.a[si].hid == (v>>1)) && (q->bb.a[si].rev == (v&1)));
		for (k = tn = 0; k < q->bb.n; k++) tn += q->bb.a[k].te - q->bb.a[k].ts;
		for (k = si + 1; (k < tn) && (q->bb.a[k].aidx == q->bb.a[si].aidx); k++) {
			z = (((uint32_t)q->bb.a[k].hid)<<1)|((uint32_t)q->bb.a[k].rev);
			if(z == w) {ei = k; break;}
			if(bub->index[z>>1] != bid) break;
		}

		if(ei > si) {////found a bubble
			// fprintf(stderr, "-(2)i::%lu, si::%u, ei::%u, ref_id::%u\nn", i, si, ei, a[i].u>>1);
			p.qn = q->bb.a[si].aidx; p.qs = qsidx; p.qe = qeidx; 
        	p.tn = a[i].u>>1; p.ts = si; p.te = ei; 
        	p.rev = (qrev == trev?0:1); 
			kv_push(ul_ov_t, *res, p);
			nn++;
		}
	}
	
	return nn;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq 0x28(%rbp), %rax
movl 0x20(%rbp), %eax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0xffffffff, -0x58(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x68(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x3c(%rbp), %rdx
leaq -0x40(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
movq $0x0, (%rsp)
callq 0x1c4b20
cmpl $-0x1, -0x3c(%rbp)
je 0x2df4b1
cmpl $-0x1, -0x40(%rbp)
jne 0x2df4be
movq $0x0, -0x8(%rbp)
jmp 0x2dfe11
movq 0x18(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x38(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
shll %eax
movl %eax, -0x5c(%rbp)
movq 0x18(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x38(%rbp), %rcx
addq %rcx, %rax
movb 0x20(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
orl -0x5c(%rbp), %eax
movl %eax, -0x5c(%rbp)
movq 0x18(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, 0x10(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x60(%rbp)
movl -0x60(%rbp), %eax
shll %eax
movl %eax, -0x60(%rbp)
movq 0x18(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, 0x10(%rbp), %rcx
addq %rcx, %rax
movb 0x20(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
orl -0x60(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jne 0x2df556
movl -0x60(%rbp), %eax
movl -0x40(%rbp), %ecx
xorl $0x1, %ecx
cmpl %ecx, %eax
jne 0x2df556
movl $0x0, -0x58(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jne 0x2df572
movl -0x60(%rbp), %eax
movl -0x3c(%rbp), %ecx
xorl $0x1, %ecx
cmpl %ecx, %eax
jne 0x2df572
movl $0x1, -0x58(%rbp)
cmpl $-0x1, -0x58(%rbp)
je 0x2df57a
jmp 0x2df599
leaq 0xb4b3f(%rip), %rdi     # 0x3940c0
leaq 0xb12a7(%rip), %rsi     # 0x39082f
movl $0x40fd, %edx           # imm = 0x40FD
leaq 0xb4b41(%rip), %rcx     # 0x3940d5
callq 0x2130
leaq -0xb4(%rbp), %rdi
xorl %esi, %esi
movl $0x1c, %edx
callq 0x2100
movl -0x3c(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x40(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x48(%rbp)
movl $0x0, -0x64(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movl -0x44(%rbp), %eax
shrl %eax
movl %eax, %eax
movl %eax, %edx
leaq -0x80(%rbp), %rsi
callq 0x2cf9e0
movq %rax, -0x78(%rbp)
movq $0x0, -0x88(%rbp)
movq -0x88(%rbp), %rax
cmpq -0x80(%rbp), %rax
jae 0x2df9db
movq -0x78(%rbp), %rax
imulq $0xc, -0x88(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x1, %eax
movl -0x44(%rbp), %ecx
andl $0x1, %ecx
cmpl %ecx, %eax
je 0x2df61f
jmp 0x2df9c4
movq -0x78(%rbp), %rax
imulq $0xc, -0x88(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl %eax
cmpl 0x20(%rbp), %eax
jne 0x2df63c
jmp 0x2df9c4
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x78(%rbp), %rcx
imulq $0xc, -0x88(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x58, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x78(%rbp), %rax
imulq $0xc, -0x88(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x54(%rbp)
movl %eax, -0x50(%rbp)
movq -0x98(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
movl -0x44(%rbp), %edx
shrl %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0xb5(%rbp)
jne 0x2df6d7
movq -0x98(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movb 0x20(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
movl -0x44(%rbp), %ecx
andl $0x1, %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0xb5(%rbp)
movb -0xb5(%rbp), %al
testb $0x1, %al
jne 0x2df6e3
jmp 0x2df6e5
jmp 0x2df704
leaq 0xb4a79(%rip), %rdi     # 0x394165
leaq 0xb113c(%rip), %rsi     # 0x39082f
movl $0x4108, %edx           # imm = 0x4108
leaq 0xb49d6(%rip), %rcx     # 0x3940d5
callq 0x2130
movl $0x0, -0x6c(%rbp)
movq $0x0, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq -0x98(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x2df776
movq -0x98(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x90(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movq -0x98(%rbp), %rcx
movq 0x30(%rcx), %rcx
imulq $0x24, -0x90(%rbp), %rdx
addq %rdx, %rcx
subl 0xc(%rcx), %eax
addl -0x6c(%rbp), %eax
movl %eax, -0x6c(%rbp)
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0x2df716
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rcx
movl -0x6c(%rbp), %eax
movl %eax, %edx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0xb6(%rbp)
jae 0x2df7d8
movq -0x98(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x90(%rbp), %rcx
addq %rcx, %rax
movl 0x1c(%rax), %eax
movq -0x98(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x50(%rbp), %edx
imulq $0x24, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x1c(%rcx), %eax
sete %al
movb %al, -0xb6(%rbp)
movb -0xb6(%rbp), %al
testb $0x1, %al
jne 0x2df7e7
jmp 0x2df86e
movq -0x98(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x90(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
shll %eax
movq -0x98(%rbp), %rcx
movq 0x30(%rcx), %rcx
imulq $0x24, -0x90(%rbp), %rdx
addq %rdx, %rcx
movb 0x20(%rcx), %cl
shrb $0x5, %cl
andb $0x1, %cl
movzbl %cl, %ecx
orl %ecx, %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x48(%rbp), %eax
jne 0x2df83c
movq -0x90(%rbp), %rax
movl %eax, -0x54(%rbp)
jmp 0x2df86e
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl -0x4c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
cmpq -0x30(%rbp), %rax
je 0x2df855
jmp 0x2df86e
jmp 0x2df857
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0x2df785
movl -0x54(%rbp), %eax
cmpl -0x50(%rbp), %eax
jbe 0x2df9c2
movq -0x98(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %eax
movl %eax, -0xb4(%rbp)
movq -0x38(%rbp), %rax
movl %eax, -0xb0(%rbp)
movq 0x10(%rbp), %rax
movl %eax, -0xac(%rbp)
movq -0x78(%rbp), %rax
imulq $0xc, -0x88(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl %eax
movl %eax, -0xa8(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0xa4(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0xa0(%rbp)
movl -0x58(%rbp), %edx
movl -0x64(%rbp), %esi
movl $0x1, %ecx
xorl %eax, %eax
cmpl %esi, %edx
cmovel %eax, %ecx
movl -0x9c(%rbp), %eax
andl $0x1, %ecx
shll $0x1f, %ecx
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
orl %ecx, %eax
movl %eax, -0x9c(%rbp)
movq 0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x2df96f
movq 0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x2df933
movq 0x28(%rbp), %rax
movq 0x10(%rax), %rax
shlq %rax
movq %rax, -0xc0(%rbp)
jmp 0x2df941
movl $0x2, %eax
movq %rax, -0xc0(%rbp)
jmp 0x2df941
movq -0xc0(%rbp), %rcx
movq 0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x28(%rbp), %rax
movq (%rax), %rdi
movq 0x28(%rbp), %rax
imulq $0x1c, 0x10(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq 0x28(%rbp), %rax
movq %rcx, (%rax)
movq 0x28(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rbp), %rdx
movq 0x8(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x8(%rdx)
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq -0xb4(%rbp), %rcx
movq %rcx, (%rax)
movq -0xac(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xa4(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0x9c(%rbp), %ecx
movl %ecx, 0x18(%rax)
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x2df9c4
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x2df5eb
movl -0x40(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x3c(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x48(%rbp)
movl $0x1, -0x64(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movl -0x44(%rbp), %eax
shrl %eax
movl %eax, %eax
movl %eax, %edx
leaq -0x80(%rbp), %rsi
callq 0x2cf9e0
movq %rax, -0x78(%rbp)
movq $0x0, -0x88(%rbp)
movq -0x88(%rbp), %rax
cmpq -0x80(%rbp), %rax
jae 0x2dfe0a
movq -0x78(%rbp), %rax
imulq $0xc, -0x88(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x1, %eax
movl -0x44(%rbp), %ecx
andl $0x1, %ecx
cmpl %ecx, %eax
je 0x2dfa4e
jmp 0x2dfdf3
movq -0x78(%rbp), %rax
imulq $0xc, -0x88(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl %eax
cmpl 0x20(%rbp), %eax
jne 0x2dfa6b
jmp 0x2dfdf3
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x78(%rbp), %rcx
imulq $0xc, -0x88(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x58, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x78(%rbp), %rax
imulq $0xc, -0x88(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x54(%rbp)
movl %eax, -0x50(%rbp)
movq -0x98(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
movl -0x44(%rbp), %edx
shrl %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0xc1(%rbp)
jne 0x2dfb06
movq -0x98(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movb 0x20(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
movl -0x44(%rbp), %ecx
andl $0x1, %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0xc1(%rbp)
movb -0xc1(%rbp), %al
testb $0x1, %al
jne 0x2dfb12
jmp 0x2dfb14
jmp 0x2dfb33
leaq 0xb464a(%rip), %rdi     # 0x394165
leaq 0xb0d0d(%rip), %rsi     # 0x39082f
movl $0x4123, %edx           # imm = 0x4123
leaq 0xb45a7(%rip), %rcx     # 0x3940d5
callq 0x2130
movl $0x0, -0x6c(%rbp)
movq $0x0, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq -0x98(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x2dfba5
movq -0x98(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x90(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movq -0x98(%rbp), %rcx
movq 0x30(%rcx), %rcx
imulq $0x24, -0x90(%rbp), %rdx
addq %rdx, %rcx
subl 0xc(%rcx), %eax
addl -0x6c(%rbp), %eax
movl %eax, -0x6c(%rbp)
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0x2dfb45
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rcx
movl -0x6c(%rbp), %eax
movl %eax, %edx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0xc2(%rbp)
jae 0x2dfc07
movq -0x98(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x90(%rbp), %rcx
addq %rcx, %rax
movl 0x1c(%rax), %eax
movq -0x98(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x50(%rbp), %edx
imulq $0x24, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x1c(%rcx), %eax
sete %al
movb %al, -0xc2(%rbp)
movb -0xc2(%rbp), %al
testb $0x1, %al
jne 0x2dfc16
jmp 0x2dfc9d
movq -0x98(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x90(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
shll %eax
movq -0x98(%rbp), %rcx
movq 0x30(%rcx), %rcx
imulq $0x24, -0x90(%rbp), %rdx
addq %rdx, %rcx
movb 0x20(%rcx), %cl
shrb $0x5, %cl
andb $0x1, %cl
movzbl %cl, %ecx
orl %ecx, %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x48(%rbp), %eax
jne 0x2dfc6b
movq -0x90(%rbp), %rax
movl %eax, -0x54(%rbp)
jmp 0x2dfc9d
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl -0x4c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
cmpq -0x30(%rbp), %rax
je 0x2dfc84
jmp 0x2dfc9d
jmp 0x2dfc86
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0x2dfbb4
movl -0x54(%rbp), %eax
cmpl -0x50(%rbp), %eax
jbe 0x2dfdf1
movq -0x98(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %eax
movl %eax, -0xb4(%rbp)
movq -0x38(%rbp), %rax
movl %eax, -0xb0(%rbp)
movq 0x10(%rbp), %rax
movl %eax, -0xac(%rbp)
movq -0x78(%rbp), %rax
imulq $0xc, -0x88(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl %eax
movl %eax, -0xa8(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0xa4(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0xa0(%rbp)
movl -0x58(%rbp), %edx
movl -0x64(%rbp), %esi
movl $0x1, %ecx
xorl %eax, %eax
cmpl %esi, %edx
cmovel %eax, %ecx
movl -0x9c(%rbp), %eax
andl $0x1, %ecx
shll $0x1f, %ecx
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
orl %ecx, %eax
movl %eax, -0x9c(%rbp)
movq 0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x2dfd9e
movq 0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x2dfd62
movq 0x28(%rbp), %rax
movq 0x10(%rax), %rax
shlq %rax
movq %rax, -0xd0(%rbp)
jmp 0x2dfd70
movl $0x2, %eax
movq %rax, -0xd0(%rbp)
jmp 0x2dfd70
movq -0xd0(%rbp), %rcx
movq 0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x28(%rbp), %rax
movq (%rax), %rdi
movq 0x28(%rbp), %rax
imulq $0x1c, 0x10(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq 0x28(%rbp), %rax
movq %rcx, (%rax)
movq 0x28(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rbp), %rdx
movq 0x8(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x8(%rdx)
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq -0xb4(%rbp), %rcx
movq %rcx, (%rax)
movq -0xac(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xa4(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0x9c(%rbp), %ecx
movl %ecx, 0x18(%rax)
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x2dfdf3
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x2dfa1a
movl -0x68(%rbp), %eax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
nop