// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./Levenshtein_distance.h
// Function: ed_band_cal_extension_infi_0_w_trace(char*, int, char*, int, int, int*, bit_extz_t*)
inline void ed_band_cal_extension_infi_0_w_trace(char *pstr, int32_t pn, char *tstr, int32_t tn, int32_t thre, int32_t *nword, bit_extz_t *ez)
{
	int32_t done = 1;//diff
	ez->cigar.n = 0; //diff
	if(ez->err > thre) {//diff
		init_base_ed(*ez, thre, pn, tn); ez->ps = ez->ts = 0; ez->pe = ez->te = -1;
		if(pn > tn + thre) pn = tn + thre;
		else if(tn > pn + thre) tn = pn + thre;
		done = 0;//diff
	} else if(ez->err == 0) {//diff
        push_trace(&(ez->cigar), 0, ez->te+1-ez->ts); return;//diff
    } else {
        pn = ez->pe + 1 - ez->ps; tn = ez->te + 1 - ez->ts; //diff
    }
    int32_t i, err, tn0 = tn - 1, cut = thre+(thre<<1), bd, i_bd, k_bd, wz, wz1, ws, Peq_i; w_sig c, ad, Peq_m;
    int32_t poff, pe = pn-1, tmp_e = INT32_MAX, k;
	if(nword) {
        ez->nword = (*nword);
    } else {
        bd = (((thre)<<1)+1); ez->nword = ((bd>>bitw)+(!!(bd&bitz)));
    }
    resize_bit_extz_t((*ez), (thre)); 
	wz = ws = sizeof(*(ez->a))*(ez->nword);//diff
    memset((ez->Peq[0]).a, 0, wz);
    memset((ez->Peq[1]).a, 0, wz);
    memset((ez->Peq[2]).a, 0, wz);
    memset((ez->Peq[3]).a, 0, wz);
    memset((ez->Peq[4]).a, 0, wz);

	bd = thre+1; bd = ((bd<=pn)?bd:pn); i_bd = thre;
    ed_init_core(i, bd, i_bd, pstr, ez->Peq);
    bd = thre+1, i_bd = thre;

	memset((ez->Peq[4]).a, 0, wz);
    err = thre;
	w_infi_set_bit_lsub(ez->VN, thre, ez->nword); /**VN = (((Word)1)<<(thre))-1;**/ 
    w_infi_set_bit_lsub(ez->VP, (thre<<1)+1, ez->nword); /**VP = (((Word)1)<<((thre<<1)+1))-1;**/
    w_infi_self_xor(ez->VP, ez->VN, ez->nword, wz) /**VP ^= VN;**/

	ez->path.n=(ez->nword*tn*5);//diff
    kv_resize(w_sig, ez->path, ez->path.n); ez->path.n=0;//diff

	i = 0;
	/**for the incoming char/last char; mm = ((Word)1 << (thre<<1))**/
    Peq_i = (((thre<<1))>>bitw); Peq_m = (((w_sig)1)<<(((thre<<1))&bitz));
	//for debug
	// memset((ez->X).a, 0, sizeof(*(ez->a))*(ez->nword));
	// memset((ez->D0).a, 0, sizeof(*(ez->a))*(ez->nword));
	// memset((ez->HN).a, 0, sizeof(*(ez->a))*(ez->nword));
	// memset((ez->HP).a, 0, sizeof(*(ez->a))*(ez->nword));
	while (i < tn0) {
		// fprintf(stderr, "i::%d\n", i);
		// prt_bit_extz_t((*ez), ((thre<<1)+1));
        ed_infi_core(ez->Peq, ez->VP, ez->VN, ez->X, ez->D0, ez->HN, ez->HP, (uint8_t)tstr[i], c, ad, wz, ez->nword);
        if (!(ez->D0.a[0]&(1ULL))) {
            ++err; if (err>cut) return;
        }

		if(!done) {//diff
            poff = i-thre; k = i+thre-pe;/**poff:[i-thre, i+thre]**/
			if(k >= 0) {
				if(tmp_e == INT32_MAX) {
					tmp_e = err;
					for ((k) = 0; (poff) < (pe); (poff)++, (k)++) {
						bd = (k>>bitw); k_bd = (k&bitz);
						(tmp_e) += (((*ez).VP.a[bd]>>k_bd)&((w_sig)1)); 
						(tmp_e) -= (((*ez).VN.a[bd]>>k_bd)&((w_sig)1));
					} 
				} else {
					k = (thre<<1) - k; 
					if(k >= 0) {
						bd = (k>>bitw); k_bd = (k&bitz);
						(tmp_e) += (((*ez).HP.a[bd]>>k_bd)&((w_sig)1)); 
						(tmp_e) -= (((*ez).HN.a[bd]>>k_bd)&((w_sig)1));
					}
				}
				if((tmp_e) <= (*ez).thre && (tmp_e) < (*ez).err) {
                    (*ez).err = tmp_e; (*ez).pe = pe; (*ez).te = i;
				}
			}
			// if(dbg_ext_err(i, thre, err, pe, &((*ez).VP), &((*ez).VN))!=tmp_e) {
			// 	fprintf(stderr, "i::%d, tmp_e::%d, dbg_ext_err::%d\n", i, tmp_e, dbg_ext_err(i, thre, err, pe, &((*ez).VP), &((*ez).VN)));
			// }
        }

        ed_infi_post_Peq(ez->Peq, wz, wz1, ez->nword);
        ++i; ++i_bd; c = 4;
        if(i_bd < pn) c = seq_nt4_table[(uint8_t)pstr[i_bd]];
        if(c < 4) ez->Peq[c].a[Peq_i]|=Peq_m;

		memcpy(ez->path.a+ez->path.n, ez->D0.a, ws); ez->path.n += ez->nword;//diff
        memcpy(ez->path.a+ez->path.n, ez->VP.a, ws); ez->path.n += ez->nword;//diff
        memcpy(ez->path.a+ez->path.n, ez->VN.a, ws); ez->path.n += ez->nword;//diff
        memcpy(ez->path.a+ez->path.n, ez->HP.a, ws); ez->path.n += ez->nword;//diff
        memcpy(ez->path.a+ez->path.n, ez->HN.a, ws); ez->path.n += ez->nword;//diff
    }
    ed_infi_core(ez->Peq, ez->VP, ez->VN, ez->X, ez->D0, ez->HN, ez->HP, (uint8_t)tstr[i], c, ad, wz, ez->nword);
    if (!(ez->D0.a[0]&(1ULL))) {
        ++err; if (err>cut) return;
    }
	memcpy(ez->path.a+ez->path.n, ez->D0.a, ws); ez->path.n += ez->nword;//diff
	memcpy(ez->path.a+ez->path.n, ez->VP.a, ws); ez->path.n += ez->nword;//diff
	memcpy(ez->path.a+ez->path.n, ez->VN.a, ws); ez->path.n += ez->nword;//diff
	memcpy(ez->path.a+ez->path.n, ez->HP.a, ws); ez->path.n += ez->nword;//diff
	memcpy(ez->path.a+ez->path.n, ez->HN.a, ws); ez->path.n += ez->nword;//diff

    int32_t site = tn - 1 - thre;/**up bound; site:[tn - 1 - thre, tn - 1 + thre]**/
	if(!done) {//diff
		for (cut = pn - 1, i = 0; site < cut; i++) {
			bd = (i>>bitw); i_bd = (i&bitz);
			err += (((*ez).VP.a[bd]>>i_bd)&((w_sig)1));
			err -= (((*ez).VN.a[bd]>>i_bd)&((w_sig)1));
			site++;
			if(err <= thre && err < ez->err) {
				ez->err = err; ez->pe = site; ez->te = tn-1;
			}
		}
		if(err <= thre && err < ez->err) {
			ez->err = err; ez->pe = site; ez->te = tn-1;
		}
	}

	if((ez->te-ez->ts+1) != tn) {//diff
        ez->path.n /= tn; ez->path.n *= (ez->te+1-ez->ts);//diff
    }//diff
    gen_trace(ez, thre, 1);//diff
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %r8d, %ebx
movq %rdx, 0x50(%rsp)
movq 0xc0(%rsp), %r14
andq $0x0, 0xa8(%r14)
movl 0x2c(%r14), %r12d
cmpl %r8d, %r12d
jle 0x5c3d5
movl %esi, %r15d
movl %ebx, 0x28(%r14)
movl $0x7fffffff, 0x2c(%r14) # imm = 0x7FFFFFFF
movl %esi, 0x18(%r14)
movl %ecx, 0x24(%r14)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x1c(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq %rax, 0x10(%r14)
leal (%rbx,%rcx), %eax
cmpl %esi, %eax
jge 0x5c3f5
movl %eax, %r15d
jmp 0x5c3fe
testl %r12d, %r12d
je 0x5ceb4
movl 0x14(%r14), %r15d
movl 0x20(%r14), %ecx
subl 0x10(%r14), %r15d
incl %r15d
subl 0x1c(%r14), %ecx
incl %ecx
jmp 0x5c3fe
leal (%rbx,%r15), %eax
cmpl %ecx, %eax
cmovll %eax, %ecx
leal (%rbx,%rbx), %eax
testq %r9, %r9
je 0x5c40b
movl (%r9), %esi
jmp 0x5c412
movl %eax, %esi
sarl $0x6, %esi
incl %esi
movl %ebx, %r13d
movl %esi, 0x30(%r14)
cmpl %ebx, 0x3c(%r14)
movq %rcx, 0x20(%rsp)
movq %rdi, 0x48(%rsp)
movl %eax, 0x8(%rsp)
jge 0x5c516
shrl $0x6, %eax
imull $0xc, %eax, %eax
addl $0xc, %eax
movl %eax, 0x3c(%r14)
cmpl 0x38(%r14), %eax
jbe 0x5c512
movq 0x40(%r14), %rdi
movl %eax, %esi
shlq $0x3, %rsi
callq 0x2370
movq 0x20(%rsp), %rcx
movq %rax, %r8
movq %rax, 0x40(%r14)
movl 0x30(%r14), %esi
movl 0x3c(%r14), %eax
pushq $0xc
popq %rdi
xorl %edx, %edx
divl %edi
movl %eax, 0x3c(%r14)
movq %r8, 0x48(%r14)
leal (,%rax,8), %edx
leaq (%r8,%rdx), %rdi
movq %rdi, 0x50(%r14)
leal (%rax,%rax), %edi
leaq (%r8,%rdi,8), %rdi
movq %rdi, 0x58(%r14)
leal (%rax,%rax,2), %edi
leaq (%r8,%rdi,8), %rdi
movq %rdi, 0x60(%r14)
leal (,%rax,4), %edi
leaq (%r8,%rdi,8), %rdi
movq %rdi, 0x68(%r14)
leal (%rax,%rax,4), %edi
leaq (%r8,%rdi,8), %rdi
movq %rdi, 0x70(%r14)
imull $0x6, %eax, %edi
leaq (%r8,%rdi,8), %rdi
movq %rdi, 0x78(%r14)
imull $0x7, %eax, %edi
leaq (%r8,%rdi,8), %rdi
movq %rdi, 0x80(%r14)
leaq (%r8,%rdx,8), %rdx
movq %rdx, 0x88(%r14)
leal (%rax,%rax,8), %edx
leaq (%r8,%rdx,8), %rdx
movq %rdx, 0x90(%r14)
imull $0xa, %eax, %edx
leaq (%r8,%rdx,8), %rdx
movq %rdx, 0x98(%r14)
imull $0xb, %eax, %edx
leaq (%r8,%rdx,8), %rdx
movq %rdx, 0xa0(%r14)
imull $0xc, %eax, %edx
movl %edx, 0x38(%r14)
movl %eax, 0x34(%r14)
movl %ebx, 0x3c(%r14)
leal -0x1(%rcx), %eax
movl %eax, 0x18(%rsp)
leal (%rbx,%rbx,2), %eax
movl %eax, 0x1c(%rsp)
leal -0x1(%r15), %eax
movl %eax, 0xc(%rsp)
shll $0x3, %esi
movq 0x48(%r14), %rdi
movq %r15, 0x28(%rsp)
movslq %esi, %rbp
movq %rbx, %r15
xorl %ebx, %ebx
xorl %esi, %esi
movq %rbp, %rdx
callq 0x20e0
movq 0x50(%r14), %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x20e0
movq 0x58(%r14), %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x20e0
movq 0x60(%r14), %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x20e0
movq 0x68(%r14), %rdi
xorl %esi, %esi
movq %rbp, 0x30(%rsp)
movq %rbp, %rdx
movq 0x28(%rsp), %rbp
callq 0x20e0
movq %r15, 0x10(%rsp)
leal 0x1(%r15), %eax
cmpl %ebp, %eax
cmovgel %ebp, %eax
testl %eax, %eax
cmovlel %ebx, %eax
movq 0x48(%rsp), %rdi
leaq 0x18f555(%rip), %r8     # 0x1ebb00
cmpq %rbx, %rax
je 0x5c5d7
leaq (%rbx,%r13), %rcx
pushq $0x1
popq %rdx
shlq %cl, %rdx
movzbl (%rdi,%rbx), %esi
movzbl (%r8,%rsi), %esi
movq 0x48(%r14,%rsi,8), %rsi
sarl $0x6, %ecx
movslq %ecx, %rcx
orq %rdx, (%rsi,%rcx,8)
incq %rbx
jmp 0x5c5ab
movq 0x68(%r14), %rdi
xorl %esi, %esi
movq 0x30(%rsp), %rdx
callq 0x20e0
movq 0x80(%r14), %rdi
movslq 0x30(%r14), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x20e0
movq 0x10(%rsp), %rbx
movl %ebx, %eax
sarl $0x6, %eax
movslq %eax, %r15
cmpl $0x40, %ebx
jb 0x5c628
movq 0x80(%r14), %rdi
leaq (,%r15,8), %rdx
movl $0xff, %esi
callq 0x20e0
movl %ebx, %ecx
pushq $-0x1
popq %rbx
andl $0x3f, %ecx
je 0x5c646
movq %rbx, %rax
shlq %cl, %rax
notq %rax
movq 0x80(%r14), %rcx
movq %rax, (%rcx,%r15,8)
movq 0x78(%r14), %rdi
movslq 0x30(%r14), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x20e0
movl 0x8(%rsp), %ecx
movl %ecx, %eax
sarl $0x6, %eax
cmpl $0x3f, %ecx
ja 0x5c66b
movl %eax, %eax
jmp 0x5c68b
movq 0x78(%r14), %rdi
movslq %eax, %r15
leaq (,%r15,8), %rdx
movl $0xff, %esi
callq 0x20e0
movq %r15, %rax
movl 0x8(%rsp), %ecx
movq 0x20(%rsp), %r8
movl %ecx, %r15d
andl $0x3e, %r15d
leal 0x1(%r15), %ecx
shlq %cl, %rbx
notq %rbx
movq 0x78(%r14), %rcx
movq %rax, 0x70(%rsp)
movq %rbx, (%rcx,%rax,8)
movl 0x30(%r14), %eax
xorl %edx, %edx
testl %eax, %eax
movl $0x0, %esi
cmovgl %eax, %esi
movq 0x10(%rsp), %rbx
cmpq %rdx, %rsi
je 0x5c6dc
movq 0x80(%r14), %rdi
movq (%rdi,%rdx,8), %rdi
xorq %rdi, (%rcx,%rdx,8)
incq %rdx
jmp 0x5c6c3
imull %r8d, %eax
leal (%rax,%rax,4), %eax
cltq
movq %rax, 0xc0(%r14)
cmpq %rax, 0xc8(%r14)
jae 0x5c74f
decq %rax
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
leaq 0x1(%rcx), %rax
movq %rax, 0xc8(%r14)
movq 0xd0(%r14), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq %rax, 0xd0(%r14)
movq %r13, 0x38(%rsp)
andq $0x0, 0xc0(%r14)
pushq $0x1
popq %rax
movl %r15d, %ecx
shlq %cl, %rax
movq %rax, 0x68(%rsp)
movl %ebx, %eax
subl %ebp, %eax
incl %eax
movl %eax, 0x40(%rsp)
movslq %ebx, %r13
xorl %edi, %edi
movl 0x18(%rsp), %eax
testl %eax, %eax
movl $0x0, %ecx
cmovgl %eax, %ecx
movq %rcx, 0x58(%rsp)
movslq %ebp, %rax
movq %rax, 0x78(%rsp)
movl %ebx, %eax
negl %eax
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movl %r12d, 0x44(%rsp)
movl 0x30(%r14), %ecx
testl %ecx, %ecx
movl $0x0, %edx
cmovgl %ecx, %edx
cmpq 0x58(%rsp), %rdi
je 0x5cb9a
movq %rax, 0x28(%rsp)
movq %r13, 0x80(%rsp)
movslq %ecx, %rax
movq 0x50(%rsp), %rsi
movq %rdi, 0x60(%rsp)
movzbl (%rsi,%rdi), %esi
leaq 0x18f320(%rip), %rdi    # 0x1ebb00
movzbl (%rdi,%rsi), %esi
xorl %edi, %edi
xorl %r9d, %r9d
cmpq %rdi, %rdx
je 0x5c88e
movq 0x48(%r14,%rsi,8), %r11
movq 0x80(%r14), %r8
movq (%r8,%rdi,8), %r10
orq (%r11,%rdi,8), %r10
movq 0x88(%r14), %r11
movq %r10, (%r11,%rdi,8)
movq 0x78(%r14), %r12
movq 0x90(%r14), %rbp
andq (%r12,%rdi,8), %r10
addq %r9, %r10
setb %r9b
movq %r10, (%rbp,%rdi,8)
addq (%r12,%rdi,8), %r10
movq %r10, (%rbp,%rdi,8)
movq (%r12,%rdi,8), %r15
cmpq %r15, %r10
setb %r13b
orb %r9b, %r13b
xorq %r15, %r10
movq %r10, (%rbp,%rdi,8)
orq (%r11,%rdi,8), %r10
movq %r10, (%rbp,%rdi,8)
andq (%r12,%rdi,8), %r10
movq 0x98(%r14), %r9
movq %r10, (%r9,%rdi,8)
movq (%rbp,%rdi,8), %r10
orq (%r12,%rdi,8), %r10
movzbl %r13b, %r9d
notq %r10
movq 0xa0(%r14), %r11
movq %r10, (%r11,%rdi,8)
orq (%r8,%rdi,8), %r10
movq %r10, (%r11,%rdi,8)
incq %rdi
jmp 0x5c7e9
xorl %edx, %edx
movl 0x44(%rsp), %r12d
movq 0x38(%rsp), %r10
movq 0x80(%rsp), %r13
movq 0x28(%rsp), %r11
testl %ecx, %ecx
jle 0x5c916
movq 0x88(%r14), %rsi
movq 0x90(%r14), %rdi
movq -0x8(%rdi,%rcx,8), %r8
shrq %r8
orq %rdx, %r8
movq %r8, -0x8(%rsi,%rcx,8)
movq -0x8(%rdi,%rcx,8), %rdx
movq 0x80(%r14), %rdi
movq 0xa0(%r14), %r9
andq -0x8(%r9,%rcx,8), %r8
movq %r8, -0x8(%rdi,%rcx,8)
movq -0x8(%r9,%rcx,8), %rdi
orq -0x8(%rsi,%rcx,8), %rdi
notq %rdi
movq 0x78(%r14), %rsi
movq %rdi, -0x8(%rsi,%rcx,8)
movq 0x98(%r14), %r8
orq -0x8(%r8,%rcx,8), %rdi
movq %rdi, -0x8(%rsi,%rcx,8)
decq %rcx
shlq $0x3f, %rdx
jmp 0x5c8a7
movq 0x90(%r14), %rsi
testb $0x1, (%rsi)
jne 0x5c937
cmpl 0x1c(%rsp), %r10d
movq 0x60(%rsp), %r9
jge 0x5ce48
incl %r10d
jmp 0x5c93c
movq 0x60(%rsp), %r9
cmpl 0x10(%rsp), %r12d
jle 0x5c9e4
movl 0x40(%rsp), %edx
addl %r9d, %edx
js 0x5c9e4
cmpl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
jne 0x5c995
xorl %ecx, %ecx
movl %r10d, %ebx
leal (%r11,%rcx), %edx
cmpl 0xc(%rsp), %edx
jge 0x5c9c8
movl %ecx, %edx
shrl $0x6, %edx
movq 0x78(%r14), %rdi
movq 0x80(%r14), %r8
movq (%rdi,%rdx,8), %rdi
btq %rcx, %rdi
adcl $0x0, %ebx
movq (%r8,%rdx,8), %rdx
btq %rcx, %rdx
sbbl $0x0, %ebx
incl %ecx
jmp 0x5c961
movl 0x8(%rsp), %ecx
subl %edx, %ecx
js 0x5c9c8
movq 0x98(%r14), %rdx
movq 0xa0(%r14), %rdi
movl %ecx, %r8d
shrl $0x6, %r8d
movq (%rdi,%r8,8), %rdi
btq %rcx, %rdi
adcl $0x0, %ebx
movq (%rdx,%r8,8), %rdx
btq %rcx, %rdx
sbbl $0x0, %ebx
cmpl 0x28(%r14), %ebx
jg 0x5c9e4
cmpl 0x2c(%r14), %ebx
jge 0x5c9e4
movl %ebx, 0x2c(%r14)
movl 0xc(%rsp), %ecx
movl %ecx, 0x14(%r14)
movl %r9d, 0x20(%r14)
pushq $0x1
popq %rcx
cmpq %rax, %rcx
jge 0x5ca4d
movq 0x48(%r14), %rdx
movq -0x8(%rdx,%rcx,8), %rdi
movq (%rdx,%rcx,8), %r8
shldq $0x3f, %rdi, %r8
movq %r8, -0x8(%rdx,%rcx,8)
movq 0x50(%r14), %rdx
movq -0x8(%rdx,%rcx,8), %rdi
movq (%rdx,%rcx,8), %r8
shldq $0x3f, %rdi, %r8
movq %r8, -0x8(%rdx,%rcx,8)
movq 0x58(%r14), %rdx
movq -0x8(%rdx,%rcx,8), %rdi
movq (%rdx,%rcx,8), %r8
shldq $0x3f, %rdi, %r8
movq %r8, -0x8(%rdx,%rcx,8)
movq 0x60(%r14), %rdx
movq -0x8(%rdx,%rcx,8), %rdi
movq (%rdx,%rcx,8), %r8
shldq $0x3f, %rdi, %r8
movq %r8, -0x8(%rdx,%rcx,8)
incq %rcx
jmp 0x5c9e7
movq 0x48(%r14), %rcx
shrq -0x8(%rcx,%rax,8)
movq 0x50(%r14), %rcx
shrq -0x8(%rcx,%rax,8)
movq 0x58(%r14), %rcx
shrq -0x8(%rcx,%rax,8)
movq 0x60(%r14), %rcx
shrq -0x8(%rcx,%rax,8)
incq %r13
cmpq 0x78(%rsp), %r13
jge 0x5caa9
movq 0x48(%rsp), %rax
movzbl (%rax,%r13), %eax
leaq 0x18f074(%rip), %rcx    # 0x1ebb00
movzbl (%rcx,%rax), %eax
cmpq $0x3, %rax
ja 0x5caa9
movq 0x48(%r14,%rax,8), %rax
movq 0x70(%rsp), %rcx
movq 0x68(%rsp), %rdx
orq %rdx, (%rax,%rcx,8)
movq %r10, 0x38(%rsp)
incq %r9
movq 0xc0(%r14), %rdi
shlq $0x3, %rdi
addq 0xd0(%r14), %rdi
movq 0x30(%rsp), %r15
movq %r15, %rdx
movq %r9, %rbp
callq 0x2160
movslq 0x30(%r14), %rdi
addq 0xc0(%r14), %rdi
movq %rdi, 0xc0(%r14)
shlq $0x3, %rdi
addq 0xd0(%r14), %rdi
movq 0x78(%r14), %rsi
movq %r15, %rdx
callq 0x2160
movslq 0x30(%r14), %rdi
addq 0xc0(%r14), %rdi
movq %rdi, 0xc0(%r14)
shlq $0x3, %rdi
addq 0xd0(%r14), %rdi
movq 0x80(%r14), %rsi
movq %r15, %rdx
callq 0x2160
movslq 0x30(%r14), %rdi
addq 0xc0(%r14), %rdi
movq %rdi, 0xc0(%r14)
shlq $0x3, %rdi
addq 0xd0(%r14), %rdi
movq 0xa0(%r14), %rsi
movq %r15, %rdx
callq 0x2160
movslq 0x30(%r14), %rdi
addq 0xc0(%r14), %rdi
movq %rdi, 0xc0(%r14)
shlq $0x3, %rdi
addq 0xd0(%r14), %rdi
movq 0x98(%r14), %rsi
movq %r15, %rdx
callq 0x2160
movq %rbp, %rdi
movslq 0x30(%r14), %rax
addq %rax, 0xc0(%r14)
movq 0x28(%rsp), %rax
incl %eax
jmp 0x5c7a2
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rdx
movzbl (%rax,%rdx), %eax
leaq 0x18ef51(%rip), %rdx    # 0x1ebb00
movzbl (%rdx,%rax), %eax
xorl %edx, %edx
testl %ecx, %ecx
movl $0x0, %esi
cmovgl %ecx, %esi
xorl %r8d, %r8d
movq 0x38(%rsp), %r13
cmpq %rdx, %rsi
je 0x5cc67
movq 0x48(%r14,%rax,8), %r10
movq 0x80(%r14), %rdi
movq (%rdi,%rdx,8), %r9
orq (%r10,%rdx,8), %r9
movq 0x88(%r14), %r10
movq %r9, (%r10,%rdx,8)
movq 0x78(%r14), %r11
movq 0x90(%r14), %rbx
andq (%r11,%rdx,8), %r9
addq %r8, %r9
setb %r8b
movq %r9, (%rbx,%rdx,8)
addq (%r11,%rdx,8), %r9
movq %r9, (%rbx,%rdx,8)
movq (%r11,%rdx,8), %r15
cmpq %r15, %r9
setb %bpl
orb %r8b, %bpl
xorq %r15, %r9
movq %r9, (%rbx,%rdx,8)
orq (%r10,%rdx,8), %r9
movq %r9, (%rbx,%rdx,8)
andq (%r11,%rdx,8), %r9
movq 0x98(%r14), %r8
movq %r9, (%r8,%rdx,8)
movq (%rbx,%rdx,8), %r9
orq (%r11,%rdx,8), %r9
movzbl %bpl, %r8d
notq %r9
movq 0xa0(%r14), %r10
movq %r9, (%r10,%rdx,8)
orq (%rdi,%rdx,8), %r9
movq %r9, (%r10,%rdx,8)
incq %rdx
jmp 0x5cbc7
xorl %eax, %eax
movq 0x10(%rsp), %rbx
testl %ecx, %ecx
jle 0x5ccdd
movq 0x88(%r14), %rdx
movq 0x90(%r14), %rsi
movq -0x8(%rsi,%rcx,8), %rdi
shrq %rdi
orq %rax, %rdi
movq %rdi, -0x8(%rdx,%rcx,8)
movq -0x8(%rsi,%rcx,8), %rax
movq 0x80(%r14), %rsi
movq 0xa0(%r14), %r8
andq -0x8(%r8,%rcx,8), %rdi
movq %rdi, -0x8(%rsi,%rcx,8)
movq -0x8(%r8,%rcx,8), %rsi
orq -0x8(%rdx,%rcx,8), %rsi
notq %rsi
movq 0x78(%r14), %rdx
movq %rsi, -0x8(%rdx,%rcx,8)
movq 0x98(%r14), %rdi
orq -0x8(%rdi,%rcx,8), %rsi
movq %rsi, -0x8(%rdx,%rcx,8)
decq %rcx
shlq $0x3f, %rax
jmp 0x5cc6e
movq 0x90(%r14), %rsi
testb $0x1, (%rsi)
jne 0x5ccfc
cmpl 0x1c(%rsp), %r13d
jge 0x5ce48
incl %r13d
movq 0x10(%rsp), %rbx
movq 0xc0(%r14), %rdi
shlq $0x3, %rdi
addq 0xd0(%r14), %rdi
movq 0x30(%rsp), %r15
movq %r15, %rdx
callq 0x2160
movslq 0x30(%r14), %rdi
addq 0xc0(%r14), %rdi
movq %rdi, 0xc0(%r14)
shlq $0x3, %rdi
addq 0xd0(%r14), %rdi
movq 0x78(%r14), %rsi
movq %r15, %rdx
callq 0x2160
movslq 0x30(%r14), %rdi
addq 0xc0(%r14), %rdi
movq %rdi, 0xc0(%r14)
shlq $0x3, %rdi
addq 0xd0(%r14), %rdi
movq 0x80(%r14), %rsi
movq %r15, %rdx
callq 0x2160
movslq 0x30(%r14), %rdi
addq 0xc0(%r14), %rdi
movq %rdi, 0xc0(%r14)
shlq $0x3, %rdi
addq 0xd0(%r14), %rdi
movq 0xa0(%r14), %rsi
movq %r15, %rdx
callq 0x2160
movslq 0x30(%r14), %rdi
addq 0xc0(%r14), %rdi
movq %rdi, 0xc0(%r14)
shlq $0x3, %rdi
addq 0xd0(%r14), %rdi
movq 0x98(%r14), %rsi
movq %r15, %rdx
callq 0x2160
movslq 0x30(%r14), %rax
addq 0xc0(%r14), %rax
movq %rax, 0xc0(%r14)
cmpl %ebx, %r12d
movq 0x20(%rsp), %r10
movl 0x18(%rsp), %r11d
jle 0x5ce71
movl %r11d, %ecx
subl %ebx, %ecx
movl %r10d, %edx
subl %ebx, %edx
xorl %esi, %esi
leal (%rcx,%rsi), %edi
cmpl 0xc(%rsp), %edi
jge 0x5ce5a
movl %esi, %edi
shrl $0x6, %edi
movq 0x78(%r14), %r8
movq 0x80(%r14), %r9
movq (%r8,%rdi,8), %r8
btq %rsi, %r8
adcl $0x0, %r13d
movq (%r9,%rdi,8), %rdi
btq %rsi, %rdi
sbbl $0x0, %r13d
cmpl %ebx, %r13d
jg 0x5ce44
cmpl 0x2c(%r14), %r13d
jge 0x5ce44
leal (%rdx,%rsi), %edi
movl %r13d, 0x2c(%r14)
movl %edi, 0x14(%r14)
movl %r11d, 0x20(%r14)
incl %esi
jmp 0x5cdf9
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl %ebx, %r13d
jg 0x5ce71
cmpl 0x2c(%r14), %r13d
jge 0x5ce71
movl %r13d, 0x2c(%r14)
movl %edi, 0x14(%r14)
movl %r11d, 0x20(%r14)
movl 0x20(%r14), %ecx
subl 0x1c(%r14), %ecx
incl %ecx
cmpl %r10d, %ecx
je 0x5ce96
movslq %r10d, %rsi
xorl %edx, %edx
divq %rsi
movslq %ecx, %rcx
imulq %rax, %rcx
movq %rcx, 0xc0(%r14)
pushq $0x1
popq %rdx
movq %r14, %rdi
movl %ebx, %esi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x65f7b
leaq 0xa8(%r14), %rdi
movl 0x20(%r14), %edx
subl 0x1c(%r14), %edx
incl %edx
xorl %esi, %esi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x62885