// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/ecovlp.cpp
// Function: push_correct1_fhc_indel_exz(asg16_v*, long, window_list*, cns_gfa*, char*, UC_Read*, bit_extz_t*, unsigned long, unsigned long, long, long)
uint64_t push_correct1_fhc_indel_exz(asg16_v *sc, int64_t sc0, window_list *idx, cns_gfa *cns, char *ostr, UC_Read* tu, bit_extz_t *exz, uint64_t gbeg, uint64_t c0, int64_t cl0, int64_t ok0)
{
    int64_t ck = sc->n, k, ok = 0, nk = 0, cn, cn0, nl, ol, diff, diff0, ml, ml0, e0 = 0; uint32_t on, f = 0, nec = 0; uint16_t bq, bt, op; 
    assert(c0 == 3);

    ///debug
    // char cm[4]; cm[0] = 'M'; cm[1] = 'S'; cm[2] = 'I'; cm[3] = 'D';

    // if(c0 != 2) ok += cl0;
    // if(c0 != 3) nk += cl0;
    ok += cl0; e0 += cl0;

    // fprintf(stderr, "\n%lu%c", cl0, cm[c0]);

    for (ck--; ck >= sc0/**0**/; ck--) {
        op = sc->a[ck]>>14;
        if(!op) break;

        if((op == 2) || (op == 3)) {
            on = sc->a[ck]&(0xfff);
        } else if(op == 1) {
            on = sc->a[ck]&(0x3ff);
        } else {
            on = sc->a[ck]&(0x3fff);
        }
        if(op != 2) ok += on;
        if(op != 3) nk += on;
        if(op != 0) e0 += on;
        if(c0 != op) f = 1;

        // fprintf(stderr, "%u%c(%c)", on, cm[op], "ACGT"[((sc->a[ck]>>12)&3)]);
    }
    cn0 = ck + 1; cn = sc->n;
    // fprintf(stderr, "\n");

    // fprintf(stderr, "+[M::%s] cn0::%ld, cn::%ld, ok::%ld, sc->n::%u, ok0::%ld, cl0::%ld\n", __func__, cn0, cn, ok, (uint32_t)sc->n, ok0, cl0);
    // f = 0;

    if((!f) || (!ok) || (!nk)) {
        for (k = 0, ck = ok0 + gbeg; k < cl0; k++, ck++) {
            push_trace_bp_f(sc, c0, cns->a[ck].c, (uint16_t)-1,  1, ((idx->clen>0)?1:0));
            idx->clen = sc->n - idx->cidx; nec++;
            // fprintf(stderr, "%c\n", "ACGT"[cns->a[ck].c]);
        }
    } else {
        char *oseq = NULL, *nseq = NULL; int64_t wo[2], wn[2];
        UC_Read_resize((*tu), nk); nseq = tu->seq; wo[0] = wo[1] = wn[0] = wn[1] = 0; 
        // if(c0 != 2) ok0 += cl0;
        ok0 += cl0;

        ok0 -= ok; 
        // if(!(ok0 >= 0)) {
        //     fprintf(stderr, "+[M::%s] rid::%u, cn0::%ld, cn::%ld, ok0::%ld, ok::%ld, sc->n::%u\n", __func__, rid, cn0, cn, ok0, ok, (uint32_t)sc->n);
        // }
        assert(ok0 >= 0);
        
        oseq = ostr + ok0;
        ol = ok; nl = nk; 
        ck = cn0; ok = nk = 0;
        while (ck < cn) {
            wo[0] = ok; wn[0] = nk;
            ck = pop_trace_bp_f(sc, ck, &op, &bq, &bt, &on);
            if(op != 2) ok += on;
            if(op != 3) nk += on;
            wo[1] = ok; wn[1] = nk;

            if(op == 0) {
                memcpy(nseq + wn[0], oseq + wo[0], (wo[1]-wo[0])*sizeof((*nseq)));
            } else if(op == 1 || op == 2) {
                for (k = wn[0]; k < wn[1]; k++) nseq[k] = s_H[bt];
            }
            // fprintf(stderr, "[M::%s] ck::%ld, wo::[%ld, %ld), wn::[%ld, %ld)\n", __func__, ck, wo[0], wo[1], wn[0], wn[1]);
        }
        // fprintf(stderr, "[M::%s] qstr::%.*s*\n", __func__, (int32_t)ol, oseq);
        // fprintf(stderr, "[M::%s] tstr::%.*s*\n", __func__, (int32_t)nl, nseq);
        
        assert(wo[1] + cl0 == ol); 
        assert(wn[1] == nl); ///since c0 must be 3
        // memcpy(nseq + wn[1], oseq + wo[1], cl0*sizeof((*nseq)));
        if(nl == ol && nl == 1) {
            sc->n = cn0;
            if(oseq[0] == nseq[0]) {
                push_trace_bp_f(sc, 0, (uint16_t)-1, (uint16_t)-1, 1, ((idx->clen>0)?1:0)); 
                idx->clen = sc->n - idx->cidx; 
            } else {
                push_trace_bp_f(sc, 1, seq_nt6_table[(uint32_t)(oseq[0])], seq_nt6_table[(uint32_t)(nseq[0])], 1, ((idx->clen>0)?1:0)); 
                idx->clen = sc->n - idx->cidx; nec++;
            }
        } else {
            ml = MAX(ol, nl); f = 0;
            
            diff = 31;
            if(diff > ml) diff = ml; 
            diff0 = diff; clear_align(*exz);
            cal_exz_global(nseq, nl, oseq, ol, diff, exz);
            if(is_align(*exz)) f = 1; 

            if(!f) {
                diff = 63;
                if(diff > ml) diff = ml; 
                if(diff > diff0) {
                    diff0 = diff; clear_align(*exz);
                    cal_exz_global(nseq, nl, oseq, ol, diff, exz);
                    if(is_align(*exz)) f = 1; 
                }
            }

            // fprintf(stderr, "[M::%s] f::%u, exz->err::%d, e0::%ld\n", __func__, f, exz->err, e0);

            if(f && exz->err < e0) {
                sc->n = cn0;
                cn = exz->cigar.n; ok = nk = 0;
                for (ck = 0; ck < cn;) {
                    wo[0] = ok; wn[0] = nk;
                    ck = pop_trace(&(exz->cigar), ck, &op, &on);
                    if(op!=2) ok += on;
                    if(op!=3) nk += on; 
                    wo[1] = ok; wn[1] = nk;

                    // fprintf(stderr, "%u%c(", on, cm[op]);

                    if(op == 0) {
                        push_trace_bp_f(sc, op, (uint16_t)-1, (uint16_t)-1, on, ((idx->clen>0)?1:0)); 
                        idx->clen = sc->n - idx->cidx; 
                    } else if(op == 1) {
                        for (k = 0; k < on; k++) {
                            push_trace_bp_f(sc, op, seq_nt6_table[(uint32_t)(oseq[wo[0]+k])], seq_nt6_table[(uint32_t)(nseq[wn[0]+k])], 1, ((idx->clen>0)?1:0)); 
                            idx->clen = sc->n - idx->cidx; nec++;
                            // fprintf(stderr, "<%c|%c>)", oseq[wo[0]+k], nseq[wn[0]+k]);
                        }
                    } else if(op == 2) {
                        for (k = 0; k < on; k++) {
                            push_trace_bp_f(sc, op, (uint16_t)-1, seq_nt6_table[(uint32_t)(nseq[wn[0]+k])], 1, ((idx->clen>0)?1:0)); 
                            idx->clen = sc->n - idx->cidx; nec++;
                            // fprintf(stderr, "<|%c>)", nseq[wn[0]+k]);
                        }
                    } else if(op == 3) {
                        for (k = 0; k < on; k++) {
                            push_trace_bp_f(sc, op, seq_nt6_table[(uint32_t)(oseq[wo[0]+k])], (uint16_t)-1, 1, ((idx->clen>0)?1:0)); 
                            idx->clen = sc->n - idx->cidx; nec++;
                            // fprintf(stderr, "<%c|>)", oseq[wo[0]+k]);
                        }
                    }
                    // fprintf(stderr, ")");
                }
                // fprintf(stderr, "\n");
            } else {
                if(ml < e0) {
                    sc->n = cn0;
                    ml0 = MIN(ol, nl); op = 1;
                    for (k = 0; k < ml0; k++) {
                        push_trace_bp_f(sc, op, seq_nt6_table[(uint32_t)(oseq[k])], seq_nt6_table[(uint32_t)(nseq[k])], 1, ((idx->clen>0)?1:0)); 
                        idx->clen = sc->n - idx->cidx; nec++;
                    }
                    
                    if(ol > ml0) {///op = 3
                        for (k = ml0, op = 3; k < ol; k++) {
                            push_trace_bp_f(sc, op, seq_nt6_table[(uint32_t)(oseq[k])], (uint16_t)-1, 1, ((idx->clen>0)?1:0)); 
                            idx->clen = sc->n - idx->cidx; nec++;
                        }
                    } else if(nl > ml0) {///op = 2
                        for (k = ml0, op = 2; k < nl; k++) {
                            push_trace_bp_f(sc, op, (uint16_t)-1, seq_nt6_table[(uint32_t)(nseq[k])], 1, ((idx->clen>0)?1:0)); 
                            idx->clen = sc->n - idx->cidx; nec++;
                        }
                    }
                } else {
                    for (k = 0, ck = ok0 + gbeg; k < cl0; k++, ck++) {
                        push_trace_bp_f(sc, c0, cns->a[ck].c, (uint16_t)-1,  1, ((idx->clen>0)?1:0));
                        idx->clen = sc->n - idx->cidx; nec++;
                    }
                }
            }
        }
    }

    // fprintf(stderr, "-[M::%s] cn0::%ld, cn::%ld, ok::%ld, sc->n::%u\n", __func__, cn0, cn, ok, (uint32_t)sc->n);
    return nec;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
cmpq $0x3, 0xb0(%rsp)
jne 0x17da71
movq %r9, %r15
movq %rdx, %rbp
movq %rdi, %r13
movq %rcx, 0x18(%rsp)
movq %r8, 0x20(%rsp)
movq 0xb8(%rsp), %r10
movq (%rdi), %r9
xorl %eax, %eax
cmpq %rsi, %r9
movq %r9, 0x10(%rsp)
jle 0x17d199
movq 0x10(%r13), %rdx
movl $0xfff, %edi            # imm = 0xFFF
movl $0x1, %r8d
xorl %ecx, %ecx
movq %r10, 0x50(%rsp)
movq %r9, %r12
movq %r10, %rbx
xorl %r14d, %r14d
movzwl -0x2(%rdx,%r12,2), %r11d
cmpl $0x4000, %r11d          # imm = 0x4000
jb 0x17d185
movzwl %r11w, %r10d
shrl $0xe, %r10d
movl $0x3ff, %r9d            # imm = 0x3FF
cmpw $0x1, %r10w
je 0x17d148
movl $0x3fff, %r9d           # imm = 0x3FFF
decq %r12
testw %r11w, %r11w
cmovsl %edi, %r9d
andl %r11d, %r9d
cmpw $0x2, %r10w
movq %r9, %r11
cmoveq %rax, %r11
addq %r11, %rbx
cmpw $0x3, %r10w
movq %r9, %r10
cmoveq %rax, %r10
cmovnel %r8d, %ecx
addq %r10, %r14
addq %r9, 0x50(%rsp)
cmpq %rsi, %r12
jg 0x17d11e
movq %rsi, %r12
testl %ecx, %ecx
setne %al
movq 0x10(%rsp), %r9
movq 0xb8(%rsp), %r10
jmp 0x17d1a7
xorl %r14d, %r14d
movq %r10, %rbx
movq %r9, %r12
movq %r10, 0x50(%rsp)
movq 0xc0(%rsp), %rcx
testb %al, %al
je 0x17d3db
testq %rbx, %rbx
je 0x17d3db
testq %r14, %r14
je 0x17d3db
cmpq %r14, 0x10(%r15)
movq %r14, 0x8(%rsp)
jge 0x17d200
movq (%r15), %rdi
movq 0x8(%rsp), %rsi
movq %r10, %r14
callq 0x2370
movq %r14, %r10
movq 0x10(%rsp), %r9
movq 0xc0(%rsp), %rcx
movq %rax, (%r15)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%r15)
addq %r10, %rcx
movq %rcx, %rdx
subq %rbx, %rdx
js 0x17da90
movq %rcx, 0x58(%rsp)
movq %rbx, 0x28(%rsp)
movq %r10, (%rsp)
movq %r13, 0x30(%rsp)
movq (%r15), %r8
movq 0x20(%rsp), %rax
movq %rdx, 0x38(%rsp)
addq %rdx, %rax
movq %rax, 0x48(%rsp)
cmpq %r9, %r12
movq %r8, 0x40(%rsp)
jge 0x17d445
xorl %ebx, %ebx
xorl %r14d, %r14d
movq %r12, %r13
movq %rbp, 0x60(%rsp)
movq %rbx, %rdi
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rsi
movl %r13d, %eax
movzwl (%rsi,%rax,2), %ecx
movl %ecx, %eax
shrl $0xe, %eax
leal -0x2(%rax), %edx
cmpl $0x2, %edx
jae 0x17d286
movl %ecx, %edx
shrl $0xc, %edx
andl $0x3, %edx
movl %ecx, %r9d
andl $0xfff, %r9d            # imm = 0xFFF
jmp 0x17d298
testl %eax, %eax
jne 0x17d2a0
movl %ecx, %r9d
andl $0x3fff, %r9d           # imm = 0x3FFF
movw $0xffff, %dx            # imm = 0xFFFF
movl $0xffff, %r8d           # imm = 0xFFFF
jmp 0x17d2bd
movl %ecx, %edx
shrl $0xc, %edx
andl $0x3, %edx
movl %ecx, %r8d
shrl $0xa, %r8d
andl $0x3, %r8d
movl %ecx, %r9d
andl $0x3ff, %r9d            # imm = 0x3FF
movzwl %r9w, %r9d
movq 0x30(%rsp), %r10
movq (%r10), %r10
incl %r13d
cmpq %r13, %r10
jbe 0x17d341
movzwl %ax, %r11d
movzwl (%rsi,%r13,2), %ebx
movl %ebx, %ebp
shrl $0xe, %ebp
cmpl %eax, %ebp
jne 0x17d341
leal -0x2(%r11), %ebp
cmpl $0x2, %ebp
jae 0x17d2fc
movl %ebx, %ebp
shrl $0xc, %ebp
andl $0x3, %ebp
andl $0xfff, %ebx            # imm = 0xFFF
jmp 0x17d30b
testl %r11d, %r11d
jne 0x17d313
andl $0x3fff, %ebx           # imm = 0x3FFF
movw $0xffff, %bp            # imm = 0xFFFF
movl $0xffff, %r15d          # imm = 0xFFFF
jmp 0x17d32c
movl %ebx, %ebp
shrl $0xc, %ebp
andl $0x3, %ebp
movl %ebx, %r15d
shrl $0xa, %r15d
andl $0x3, %r15d
andl $0x3ff, %ebx            # imm = 0x3FF
cmpl %r8d, %r15d
jne 0x17d341
cmpw %bp, %dx
jne 0x17d341
addl %ebx, %r9d
incl %r13d
cmpq %r13, %r10
ja 0x17d2d5
cmpw $0x2, %ax
movl %r9d, %esi
movq %rsi, %rbp
movl $0x0, %r8d
cmoveq %r8, %rbp
cmpw $0x3, %ax
movl $0xffff, %r9d           # imm = 0xFFFF
cmovel %r9d, %edx
cmoveq %r8, %rsi
leaq (%rsi,%rdi), %rbx
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x17d396
movq 0x40(%rsp), %r15
addq %r15, %rdi
movq 0x48(%rsp), %rax
leaq (%rax,%r14), %rsi
movq %rbp, %rdx
callq 0x2160
movq %r15, %r8
movq 0x10(%rsp), %r9
jmp 0x17d3c5
cmpw $0x3, %ax
movq 0x40(%rsp), %r8
movq 0x10(%rsp), %r9
leaq 0x10d385(%rip), %r10    # 0x28a730
je 0x17d3c5
testq %rsi, %rsi
je 0x17d3c5
movzwl %dx, %eax
movb (%r10,%rax), %cl
movb %cl, (%r8,%rdi)
incq %rdi
cmpq %rbx, %rdi
jb 0x17d3b5
addq %rbp, %r14
movl %r13d, %r13d
cmpq %r13, %r9
movq 0x60(%rsp), %rbp
jg 0x17d252
jmp 0x17d44a
testq %r10, %r10
jle 0x17d97d
addq 0xa8(%rsp), %rcx
shlq $0x3, %rcx
leaq (%rcx,%rcx,4), %rbx
movq %r10, (%rsp)
movq %r10, %r14
movq 0x18(%rsp), %r15
movq 0x10(%r15), %rax
movl (%rax,%rbx), %edx
xorl %r9d, %r9d
cmpl $0x0, 0x1c(%rbp)
setne %r9b
andl $0x3, %edx
movq %r13, %rdi
movl $0x3, %esi
movl $0xffff, %ecx           # imm = 0xFFFF
movl $0x1, %r8d
callq 0x18d9ca
movl (%r13), %eax
subl 0x18(%rbp), %eax
movl %eax, 0x1c(%rbp)
addq $0x28, %rbx
decq %r14
jne 0x17d400
jmp 0x17da5f
xorl %r14d, %r14d
xorl %ebx, %ebx
addq 0xb8(%rsp), %r14
cmpq 0x28(%rsp), %r14
jne 0x17daaf
movq 0x8(%rsp), %rsi
cmpq %rsi, %rbx
movq 0x30(%rsp), %r13
movq 0x48(%rsp), %rdx
jne 0x17dace
cmpq $0x1, %rsi
movq 0xb8(%rsp), %r14
movq 0x28(%rsp), %rcx
jne 0x17d4c9
cmpq $0x1, %rcx
jne 0x17d4c9
movq %r12, (%r13)
movsbq (%rdx), %rcx
movsbq (%r8), %rax
cmpb %al, %cl
jne 0x17d8d0
xorl %r9d, %r9d
cmpl $0x0, 0x1c(%rbp)
setne %r9b
movq $0x0, (%rsp)
movq %r13, %rdi
xorl %esi, %esi
movl $0xffff, %edx           # imm = 0xFFFF
movl $0xffff, %ecx           # imm = 0xFFFF
jmp 0x17d8ff
movq 0xa0(%rsp), %r15
cmpq %rsi, %rcx
movq %rsi, %rbx
cmovgq %rcx, %rbx
cmpq $0x1f, %rbx
movq %r8, %rdi
movl $0x1f, %r8d
cmovbq %rbx, %r8
movl $0x7fffffff, 0x2c(%r15) # imm = 0x7FFFFFFF
movq %r15, %r9
callq 0x6424a
movl 0x2c(%r15), %eax
cmpl 0x28(%r15), %eax
jle 0x17d550
cmpq $0x20, %rbx
jb 0x17d835
cmpq $0x3f, %rbx
movl $0x3f, %r8d
cmovbq %rbx, %r8
movl $0x7fffffff, 0x2c(%r15) # imm = 0x7FFFFFFF
movq 0x40(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq %r15, %r9
callq 0x6424a
movl 0x2c(%r15), %eax
cmpl 0x28(%r15), %eax
jg 0x17d835
movslq 0x2c(%r15), %rax
cmpq %rax, 0x50(%rsp)
jle 0x17d835
movq %r12, (%r13)
movq 0xa8(%r15), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
jle 0x17d97d
leaq 0x10d0b1(%rip), %r9     # 0x28a630
movq $0x0, (%rsp)
xorl %edi, %edi
xorl %r10d, %r10d
xorl %r11d, %r11d
movq 0xa8(%r15), %rdx
movq 0xb8(%r15), %rsi
movzwl (%rsi,%rdi,2), %ecx
movl %ecx, %eax
shrl $0xe, %eax
andl $0x3fff, %ecx           # imm = 0x3FFF
leal 0x1(%rdi), %r14d
cmpq %r14, %rdx
jbe 0x17d5d3
movzwl (%rsi,%r14,2), %edi
movl %edi, %r8d
shrl $0xe, %r8d
cmpl %eax, %r8d
jne 0x17d5d3
andl $0x3fff, %edi           # imm = 0x3FFF
addl %edi, %ecx
incl %r14d
jmp 0x17d5b0
cmpw $0x2, %ax
movl %ecx, %r12d
movq %r12, %rbx
movl $0x0, %ecx
cmoveq %rcx, %rbx
cmpw $0x3, %ax
movq %r12, %rsi
cmoveq %rcx, %rsi
movzwl %ax, %r13d
leaq 0xb4734(%rip), %rcx     # 0x231d30
movslq (%rcx,%r13,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %r9d, %r9d
cmpl $0x0, 0x1c(%rbp)
setne %r9b
movq 0x30(%rsp), %rdi
movq %rsi, 0x8(%rsp)
movl %r13d, %esi
movl $0xffff, %edx           # imm = 0xFFFF
movl $0xffff, %ecx           # imm = 0xFFFF
movl %r12d, %r8d
movq %r10, %r12
movq %r11, %r13
callq 0x18d9ca
movq 0x8(%rsp), %rsi
movq %r13, %r11
movq %r12, %r10
leaq 0x10cfe9(%rip), %r9     # 0x28a630
movq 0x30(%rsp), %rax
movl (%rax), %eax
subl 0x18(%rbp), %eax
movl %eax, 0x1c(%rbp)
jmp 0x17d81c
testq %r12, %r12
je 0x17d81c
movq %rsi, 0x8(%rsp)
movq %rbx, 0x38(%rsp)
movq %r10, 0x20(%rsp)
movq 0x40(%rsp), %rax
movq %r11, 0x18(%rsp)
addq %r11, %rax
movq %rax, 0x10(%rsp)
xorl %r15d, %r15d
movq 0x30(%rsp), %rbx
movq 0x10(%rsp), %rax
movsbq (%rax,%r15), %rax
movl %eax, %eax
movzbl (%r9,%rax), %ecx
xorl %r9d, %r9d
cmpl $0x0, 0x1c(%rbp)
setne %r9b
movq %rbx, %rdi
movl %r13d, %esi
movl $0xffff, %edx           # imm = 0xFFFF
movl $0x1, %r8d
callq 0x18d9ca
leaq 0x10cf6c(%rip), %r9     # 0x28a630
movl (%rbx), %eax
subl 0x18(%rbp), %eax
movl %eax, 0x1c(%rbp)
incq %r15
cmpq %r15, %r12
jne 0x17d68b
jmp 0x17d751
testq %r12, %r12
je 0x17d81c
movq %rsi, 0x8(%rsp)
movq %rbx, 0x38(%rsp)
movq %r11, 0x18(%rsp)
movq 0x48(%rsp), %rax
movq %r10, 0x20(%rsp)
addq %r10, %rax
movq %rax, 0x10(%rsp)
xorl %r15d, %r15d
movq 0x30(%rsp), %rbx
movq 0x10(%rsp), %rax
movsbq (%rax,%r15), %rax
movl %eax, %eax
movzbl (%r9,%rax), %edx
xorl %r9d, %r9d
cmpl $0x0, 0x1c(%rbp)
setne %r9b
movq %rbx, %rdi
movl %r13d, %esi
movl $0xffff, %ecx           # imm = 0xFFFF
movl $0x1, %r8d
callq 0x18d9ca
leaq 0x10ceef(%rip), %r9     # 0x28a630
movl (%rbx), %eax
subl 0x18(%rbp), %eax
movl %eax, 0x1c(%rbp)
incq %r15
cmpq %r15, %r12
jne 0x17d708
addl (%rsp), %r12d
movq %r12, (%rsp)
jmp 0x17d800
testq %r12, %r12
je 0x17d81c
movq %rsi, 0x8(%rsp)
movq %rbx, 0x38(%rsp)
movq 0x48(%rsp), %rax
movq %r10, 0x20(%rsp)
addq %r10, %rax
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rax
movq %r11, 0x18(%rsp)
addq %r11, %rax
movq %rax, 0x50(%rsp)
movq %rbp, %rbx
xorl %ebp, %ebp
movq 0x30(%rsp), %r15
movq 0x10(%rsp), %rax
movsbq (%rax,%rbp), %rax
movl %eax, %eax
movzbl (%r9,%rax), %edx
movq 0x50(%rsp), %rax
movsbq (%rax,%rbp), %rax
movl %eax, %eax
movzbl (%r9,%rax), %ecx
xorl %r9d, %r9d
cmpl $0x0, 0x1c(%rbx)
setne %r9b
movq %r15, %rdi
movl %r13d, %esi
movl $0x1, %r8d
callq 0x18d9ca
leaq 0x10ce4c(%rip), %r9     # 0x28a630
movl (%r15), %eax
subl 0x18(%rbx), %eax
movl %eax, 0x1c(%rbx)
incq %rbp
cmpq %rbp, %r12
jne 0x17d79f
addl (%rsp), %r12d
movq %r12, (%rsp)
movq %rbx, %rbp
movq 0xa0(%rsp), %r15
movq 0x20(%rsp), %r10
movq 0x18(%rsp), %r11
movq 0x38(%rsp), %rbx
movq 0x8(%rsp), %rsi
movl %r14d, %edi
addq %rbx, %r10
addq %rsi, %r11
cmpq %rdi, 0x28(%rsp)
jg 0x17d58f
jmp 0x17da5f
cmpq 0x50(%rsp), %rbx
jge 0x17d919
movq %r12, (%r13)
movq 0x28(%rsp), %rax
movq 0x8(%rsp), %rcx
cmpq %rcx, %rax
movq %rcx, %r15
cmovlq %rax, %r15
testq %r15, %r15
jle 0x17d98a
xorl %ebx, %ebx
movq 0x40(%rsp), %r12
movq 0x48(%rsp), %r14
movsbq (%r14,%rbx), %rax
movl %eax, %eax
leaq 0x10cdb5(%rip), %rcx    # 0x28a630
movzbl (%rcx,%rax), %edx
movsbq (%r12,%rbx), %rax
movl %eax, %eax
movzbl (%rcx,%rax), %ecx
xorl %r9d, %r9d
cmpl $0x0, 0x1c(%rbp)
setne %r9b
movq %r13, %rdi
movl $0x1, %esi
movl $0x1, %r8d
callq 0x18d9ca
movl (%r13), %eax
subl 0x18(%rbp), %eax
movl %eax, 0x1c(%rbp)
incq %rbx
cmpq %rbx, %r15
jne 0x17d86d
movl %r15d, %eax
movq %rax, (%rsp)
movq 0x28(%rsp), %rax
movq 0x8(%rsp), %rcx
jmp 0x17d992
movl %ecx, %ecx
leaq 0x10cd57(%rip), %rsi    # 0x28a630
movzbl (%rsi,%rcx), %edx
movl %eax, %eax
movzbl (%rsi,%rax), %ecx
xorl %r9d, %r9d
cmpl $0x0, 0x1c(%rbp)
setne %r9b
movl $0x1, %eax
movq %rax, (%rsp)
movq %r13, %rdi
movl $0x1, %esi
movl $0x1, %r8d
callq 0x18d9ca
movl (%r13), %eax
subl 0x18(%rbp), %eax
movl %eax, 0x1c(%rbp)
jmp 0x17da5f
testq %r14, %r14
jle 0x17d97d
movq 0x38(%rsp), %rax
addq 0xa8(%rsp), %rax
shlq $0x3, %rax
leaq (%rax,%rax,4), %rbx
movq 0x18(%rsp), %r15
movq 0x10(%r15), %rax
movl (%rax,%rbx), %edx
xorl %r9d, %r9d
cmpl $0x0, 0x1c(%rbp)
setne %r9b
andl $0x3, %edx
movq %r13, %rdi
movl $0x3, %esi
movl $0xffff, %ecx           # imm = 0xFFFF
movl $0x1, %r8d
callq 0x18d9ca
movl (%r13), %eax
subl 0x18(%rbp), %eax
movl %eax, 0x1c(%rbp)
addq $0x28, %rbx
decq %r14
jne 0x17d938
jmp 0x17da5f
movq $0x0, (%rsp)
jmp 0x17da5f
movq $0x0, (%rsp)
cmpq %rax, %rcx
movq 0x20(%rsp), %r14
jge 0x17d9fc
movq %r15, %r12
movq %r15, %rbx
subq %rax, %rbx
addq 0x58(%rsp), %r14
leaq 0x10cc7f(%rip), %r15    # 0x28a630
movsbq (%r14,%rbx), %rax
movl %eax, %eax
movzbl (%r15,%rax), %edx
xorl %r9d, %r9d
cmpl $0x0, 0x1c(%rbp)
setne %r9b
movq %r13, %rdi
movl $0x3, %esi
movl $0xffff, %ecx           # imm = 0xFFFF
movl $0x1, %r8d
callq 0x18d9ca
movl (%r13), %eax
subl 0x18(%rbp), %eax
movl %eax, 0x1c(%rbp)
incq %rbx
jne 0x17d9b1
movq (%rsp), %rax
addl 0x28(%rsp), %eax
subl %r12d, %eax
jmp 0x17da5b
jle 0x17da5f
leaq 0x10cc2b(%rip), %rbx    # 0x28a630
movq %r15, %r14
movq 0x40(%rsp), %r12
movsbq (%r12,%r15), %rax
movl %eax, %eax
movzbl (%rbx,%rax), %ecx
xorl %r9d, %r9d
cmpl $0x0, 0x1c(%rbp)
setne %r9b
movq %r13, %rdi
movl $0x2, %esi
movl $0xffff, %edx           # imm = 0xFFFF
movl $0x1, %r8d
callq 0x18d9ca
movq 0x8(%rsp), %rcx
movl (%r13), %eax
subl 0x18(%rbp), %eax
movl %eax, 0x1c(%rbp)
incq %r15
cmpq %r15, %rcx
jne 0x17da0d
movq (%rsp), %rax
addl %ecx, %eax
subl %r14d, %eax
movq %rax, (%rsp)
movl (%rsp), %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb4644(%rip), %rdi     # 0x2320bc
leaq 0xb436c(%rip), %rsi     # 0x231deb
leaq 0xb463e(%rip), %rcx     # 0x2320c4
movl $0x655, %edx            # imm = 0x655
callq 0x2110
leaq 0xb46c7(%rip), %rdi     # 0x23215e
leaq 0xb434d(%rip), %rsi     # 0x231deb
leaq 0xb461f(%rip), %rcx     # 0x2320c4
movl $0x688, %edx            # imm = 0x688
callq 0x2110
leaq 0xb46b1(%rip), %rdi     # 0x232167
leaq 0xb432e(%rip), %rsi     # 0x231deb
leaq 0xb4600(%rip), %rcx     # 0x2320c4
movl $0x69e, %edx            # imm = 0x69E
callq 0x2110
leaq 0xb46a4(%rip), %rdi     # 0x232179
leaq 0xb430f(%rip), %rsi     # 0x231deb
leaq 0xb45e1(%rip), %rcx     # 0x2320c4
movl $0x69f, %edx            # imm = 0x69F
callq 0x2110