// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: tuning_ext_offset(overlap_region*, k_mer_hit*, long, long, long, long, long, long, long*, long*, long*, long*, long*, long*, long*)
void tuning_ext_offset(overlap_region *z, k_mer_hit *ch_a, int64_t ch_n, int64_t ql, int64_t tl, int64_t wl, 
int64_t fusion_k_len, int64_t fusion_win_occ, int64_t *ch_s0, int64_t *ch_e0, int64_t *qs0, int64_t *qe0, int64_t *ts0, int64_t *te0, int64_t *mode)
{
    ///[qs, qe)
    if((*mode) != 1 && (*mode) != 2) return;
    int64_t qs = *qs0, qe = *qe0, ts = *ts0, te = *te0, ch_s = *ch_s0, ch_e = *ch_e0;
    int64_t ke, ks, p[3], we, ws, k, wid;
    int64_t sl, gq, gt, gl, gg, update, min_g = INT32_MAX, min_id = -1;
    adjust_ext_offset(&qs, &qe, &ts, &te, ql, tl, 0, *mode); p[0] = p[1] = p[2] = -1;
    if((*mode) == 1) {///forward extension
        //qs0 and ts0 are fixed; te0 = -1, qe0 is unreliable
        if(qe > (*qe0)) {
            ///find k-mer hit
            ke = ch_a[ch_s].self_offset;
            for (ch_e = ch_s; (ch_e < ch_n) && (ch_a[ch_e].self_offset < (*qe0)); ch_e++) {
                ke = ch_a[ch_e].self_offset;
            }
            for (ke += fusion_k_len; (ch_e < ch_n) && (ch_a[ch_e].self_offset < ke); ch_e++) {
                if(ch_a[ch_e].self_offset<(*qe0)) continue;
                if((ch_a[ch_e].offset<=(*ts0))||(ch_a[ch_e].self_offset<=(*qs0))) continue;//not co-linear
                if(is_pri_aln(ch_a[ch_e])) {
                    p[2] = ch_e; break;
                } else if(ch_a[ch_e].cnt > 1 && p[1] == -1) {
                    p[1] = ch_e;
                } else if(p[0] == -1) {
                    p[0] = ch_e;
                }
            }
            if(p[2] != -1) p[0] = p[2];
            else if(p[1] != -1) p[0] = p[1];
            if(p[0] != -1) {
                (*mode) = 0;///global
                (*qe0) = ch_a[p[0]].self_offset; (*te0) = ch_a[p[0]].offset; (*ch_e0) = p[0];
                return;
            }

            ///find aligned window
            we = (*qe0); we/=wl; we *= wl; we +=wl; we--; ///next window
            for (k = 0; we < qe && we <= z->x_pos_e && k < fusion_win_occ; we+=wl) {//[ws, we]; [qs, qe)
                wid = get_win_id_by_e(z, we, wl, NULL);
                if(z->w_list.a[wid].y_end == -1) continue;//unmapped
                if(z->w_list.a[wid].x_end < (*qs0)) continue;
                if(z->w_list.a[wid].y_end < (*ts0)) continue;
                sl = z->w_list.a[wid].x_end+1-z->w_list.a[wid].x_start;
                if(z->w_list.a[wid].error > (sl/A_L)) continue;
                gq = z->w_list.a[wid].x_end-(*qs0); 
                gt = z->w_list.a[wid].y_end-(*ts0); 
                gl = MIN(gq, gt); gl/=16; if(gl <= 0) gl = 1;
                gg = (gq>=gt)?(gq-gt):(gt-gq); gg /= gl;
                update = 0;
                if(min_g>gg) {
                    update = 1;
                } else if((min_g==gg)&&(z->w_list.a[min_id].error>z->w_list.a[wid].error)) {
                    update = 1;
                } 
                if(update) {
                    min_g = gg; min_id = wid;
                }
                k++;
            }
        }

        if(min_id != -1) {
            (*qe0) = z->w_list.a[min_id].x_end+1; 
            (*te0) = z->w_list.a[min_id].y_end+1; 
            (*mode) = 0;///global
        } else {
            (*qe0) = qe; (*te0) = te;//extension
        }
    } else if((*mode) == 2) {///backward extension
        //qe0 and te0 are fixed; ts0 = -1, qs0 is unreliable
        if(qs < (*qs0)) {
            ///find k-mer hit
            ks = ch_a[ch_e].self_offset;
            for (ch_s = ch_e; (ch_s >= 0) && (ch_a[ch_s].self_offset > (*qs0)); ch_s--) {
                ks = ch_a[ch_s].self_offset;
            }
            for (ks -= fusion_k_len; (ch_s >= 0) && (ch_a[ch_s].self_offset > ks); ch_s--) {
                if(ch_a[ch_s].self_offset>(*qs0)) continue;
                if((ch_a[ch_s].offset>=(*te0))||(ch_a[ch_s].self_offset>=(*qe0))) continue;//not co-linear
                if(is_pri_aln(ch_a[ch_s])) {
                    p[2] = ch_s; break;
                } else if(ch_a[ch_s].cnt > 1 && p[1] == -1) {
                    p[1] = ch_s;
                } else if(p[0] == -1) {
                    p[0] = ch_s;
                }
            }
            // fprintf(stderr, "-[M::%s::] utg%.6dl(%c), p[0]::%ld, p[1]::%ld, p[2]::%ld\n", 
            //             __func__, (int32_t)z->y_id+1, "+-"[z->y_pos_strand], p[0], p[1], p[2]);
            if(p[2] != -1) p[0] = p[2];
            else if(p[1] != -1) p[0] = p[1];
            if(p[0] != -1) {
                (*mode) = 0;///global
                (*qs0) = ch_a[p[0]].self_offset; (*ts0) = ch_a[p[0]].offset; (*ch_s0) = p[0];
                return;
            }

            ///find aligned window
            ws = (*qs0)-1; ws/=wl; ws*=wl; 
            for (k = 0; ws >= qs && ws >= z->x_pos_s && k < fusion_win_occ; ws-=wl) {//[ws, we]; [qs, qe)
                wid = get_win_id_by_s(z, ws, wl, NULL);
                if(z->w_list.a[wid].y_end == -1) continue;//unmapped
                if(z->w_list.a[wid].x_start >= (*qe0)) continue;
                if(z->w_list.a[wid].y_start >= (*te0)) continue;
                sl = z->w_list.a[wid].x_end+1-z->w_list.a[wid].x_start;
                if(z->w_list.a[wid].error > (sl/A_L)) continue;
                gq = (*qe0) - z->w_list.a[wid].x_start; 
                gt = (*te0) - z->w_list.a[wid].y_start; 
                gl = MIN(gq, gt); gl/=16; if(gl <= 0) gl = 1;
                gg = (gq>=gt)?(gq-gt):(gt-gq); gg /= gl;
                update = 0;
                if(min_g>gg) {
                    update = 1;
                } else if((min_g==gg)&&(z->w_list.a[min_id].error>z->w_list.a[wid].error)) {
                    update = 1;
                } 
                if(update) {
                    min_g = gg; min_id = wid;
                }
                k++;
            }
        }

        if(min_id != -1) {
            (*qs0) = z->w_list.a[min_id].x_start; 
            (*ts0) = z->w_list.a[min_id].y_start; 
            (*mode) = 0;///global
        } else {
            (*qs0) = qs; (*ts0) = ts; ///still extension
        }
    }

    if((*ch_e0) == -1) {
        for ((*ch_e0)=(*ch_s0);((*ch_e0)<ch_n)&&(ch_a[(*ch_e0)].self_offset>=(*qs0))&&(ch_a[(*ch_e0)].self_offset<=(*qe0)); (*ch_e0)++);
    }

    if((*ch_s0) == -1) {
        for ((*ch_s0)=(*ch_e0);((*ch_s0)>=0)&&(ch_a[(*ch_s0)].self_offset>=(*qs0))&&(ch_a[(*ch_s0)].self_offset<=(*qe0)); (*ch_s0)--);
        (*ch_s0)++;
    }
    ///boundry
    for (;((*ch_e0)<ch_n)&&(ch_a[(*ch_e0)].self_offset>=(*qs0))&&(ch_a[(*ch_e0)].self_offset<=(*qe0)); (*ch_e0)++);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, -0x20(%rsp)
movq %rdx, %rbx
movq 0x78(%rsp), %rax
movq (%rax), %rax
leaq -0x1(%rax), %rdx
cmpq $0x1, %rdx
ja 0x63c67
movq %rdi, %r12
movq %rsi, -0x28(%rsp)
movq 0x70(%rsp), %rdx
movq 0x68(%rsp), %rsi
movq 0x60(%rsp), %rbp
movq 0x58(%rsp), %r14
movq (%r14), %r13
movq (%rbp), %r10
movq (%rsi), %r15
movq (%rdx), %r9
cmpq $0x2, %rax
movq %r15, -0x30(%rsp)
je 0x6361f
cmpq $0x1, %rax
jne 0x6362c
movq %rcx, %rdi
subq %r13, %rdi
movq %r8, %rdx
subq %r15, %rdx
cmpq %rdx, %rdi
jle 0x63631
addq %r13, %rdx
movq %r13, %r11
movq %r8, %rdi
jmp 0x6364b
movq %r10, %r11
subq %r9, %r11
jle 0x6363c
xorl %r15d, %r15d
jmp 0x63645
movq %r13, %r11
jmp 0x63645
addq %r15, %rdi
movq %r13, %r11
movq %rcx, %rdx
jmp 0x6364b
movq %r9, %r15
subq %r10, %r15
xorl %r11d, %r11d
movq %r10, %rdx
movq %r9, %rdi
xorl %esi, %esi
testq %r11, %r11
cmovleq %rsi, %r11
testq %r15, %r15
cmovgq %r15, %rsi
movq 0x38(%rsp), %r15
cmpq %rcx, %rdx
cmovlq %rdx, %rcx
cmpq %r8, %rdi
cmovlq %rdi, %r8
cmpq $0x2, %rax
movq %r12, -0x38(%rsp)
je 0x636ed
cmpq $0x1, %rax
movq -0x28(%rsp), %r9
jne 0x63b89
movq $-0x1, %rsi
cmpq %r10, %rcx
jle 0x63a77
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq %rax, %rdx
shlq $0x4, %rdx
movl 0x8(%r9,%rdx), %esi
cmpq %rbx, %rax
jge 0x6381c
movl 0x8(%r9,%rdx), %edi
cmpq %rdi, %r10
jle 0x6381c
addq %r9, %rdx
addq $0x18, %rdx
leaq -0x1(%rbx), %r11
movq %rdi, %rsi
cmpq %rax, %r11
je 0x63819
movl (%rdx), %edi
addq $0x10, %rdx
incq %rax
cmpq %rdi, %r10
jg 0x636ce
jmp 0x6381c
movq $-0x1, -0x30(%rsp)
cmpq %r13, %r11
jge 0x63b3e
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq %rax, %rdx
shlq $0x4, %rdx
movq -0x28(%rsp), %r8
movl 0x8(%r8,%rdx), %ecx
testq %rax, %rax
js 0x6374d
movl 0x8(%r8,%rdx), %edi
cmpq %rdi, %r13
jge 0x6374d
addq %r8, %rdx
addq $-0x8, %rdx
movq %rdi, %rcx
testq %rax, %rax
jle 0x63746
decq %rax
movl (%rdx), %edi
addq $-0x10, %rdx
cmpq %rdi, %r13
jl 0x6372e
jmp 0x6374d
movq $-0x1, %rax
testq %rax, %rax
js 0x637ff
subq %r15, %rcx
movq %rax, %rdx
shlq $0x4, %rdx
movq -0x28(%rsp), %rdi
addq %rdx, %rdi
addq $0xc, %rdi
movq $-0x1, %rbp
movq $-0x1, %rdx
movq $-0x1, %r8
movl -0x4(%rdi), %r15d
cmpq %r15, %rcx
jge 0x63ace
cmpq %r15, %r13
jl 0x637ea
movl -0x8(%rdi), %r12d
cmpq %r12, %r9
setle %r12b
cmpq %r15, %r10
setle %r15b
orb %r12b, %r15b
jne 0x637e5
movl -0xc(%rdi), %r15d
movl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
andl %r12d, %r15d
cmpl %r12d, %r15d
je 0x63ac6
movl (%rdi), %r12d
cmpl %r15d, %r12d
jae 0x63ac6
cmpl $0x2, %r12d
jb 0x637dd
cmpq $-0x1, %r8
jne 0x637dd
movq %rax, %r8
jmp 0x637e5
cmpq $-0x1, %rdx
cmoveq %rax, %rdx
movq -0x38(%rsp), %r12
leaq -0x1(%rax), %r15
addq $-0x10, %rdi
testq %rax, %rax
movq %r15, %rax
jg 0x63781
jmp 0x63ace
movq $-0x1, %r8
movq $-0x1, %rdx
movq $-0x1, %rbp
jmp 0x63ace
movq %rbx, %rax
movq $-0x1, %r14
movq $-0x1, %r11
movq $-0x1, %rdx
cmpq %rbx, %rax
jge 0x638bc
addq %r15, %rsi
movq %rax, %rdx
shlq $0x4, %rdx
leaq (%rdx,%r9), %rdi
addq $0xc, %rdi
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl -0x4(%rdi), %r15d
cmpq %r15, %rsi
jle 0x638b5
cmpq %r15, %r10
jg 0x638a9
cmpq %r15, %r13
jge 0x638a9
movl -0x8(%rdi), %r15d
cmpq %r15, -0x30(%rsp)
jge 0x638a9
movl -0xc(%rdi), %r15d
andl %edx, %r15d
cmpl %edx, %r15d
je 0x63dd6
movl (%rdi), %r12d
cmpl %r15d, %r12d
jae 0x63dde
cmpl $0x2, %r12d
jb 0x6389c
cmpq $-0x1, %r14
jne 0x6389c
movq %rax, %r14
jmp 0x638a4
cmpq $-0x1, %r11
cmoveq %rax, %r11
movq -0x38(%rsp), %r12
incq %rax
addq $0x10, %rdi
cmpq %rax, %rbx
jne 0x63851
movq $-0x1, %rdx
cmpq $-0x1, %r14
cmovneq %r14, %r11
cmpq $-0x1, %rdx
cmovneq %rdx, %r11
cmpq $-0x1, %r11
je 0x63908
movq 0x78(%rsp), %rax
movq $0x0, (%rax)
movq %r11, %rax
shlq $0x4, %rax
movl 0x8(%r9,%rax), %ecx
movq %rcx, (%rbp)
movl 0x4(%r9,%rax), %eax
movq 0x70(%rsp), %rcx
movq %rax, (%rcx)
movq 0x50(%rsp), %rax
movq %r11, (%rax)
jmp 0x63c67
movq %r10, %rax
cqto
movq -0x20(%rsp), %rsi
idivq %rsi
movq %rdx, %r14
addq %rsi, %r10
notq %r14
addq %r10, %r14
movq $-0x1, %rsi
cmpq %rcx, %r14
jge 0x63a77
movl 0x8(%r12), %eax
movq %rax, -0x8(%rsp)
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, -0x18(%rsp)
movq $0x0, -0x10(%rsp)
cmpq -0x8(%rsp), %r14
jg 0x63a77
movq -0x10(%rsp), %rax
cmpq 0x40(%rsp), %rax
jge 0x63a77
movl 0x4(%r12), %r10d
movq %r10, %rax
xorl %edx, %edx
movq -0x20(%rsp), %rdi
idivq %rdi
subq %r10, %rdx
leaq (%rdx,%r14), %rax
cqto
idivq %rdi
movq %rax, %r10
movq 0x58(%r12), %rdi
movq %rax, %r15
shlq $0x5, %r15
movslq 0xc(%rdi,%r15), %rax
cmpq $-0x1, %rax
je 0x63a69
leaq (%rdi,%r15), %r12
movslq 0x4(%r12), %rdx
movq %rdx, %r11
subq %r13, %r11
jl 0x63a64
subq -0x30(%rsp), %rax
jl 0x63a64
movq %rbp, %r9
subl (%r12), %edx
leal 0x1(%rdx), %ebp
movswl 0x14(%r12), %r12d
addl $0x10, %edx
testl %ebp, %ebp
cmovnsl %ebp, %edx
sarl $0x4, %edx
cmpl %r12d, %edx
jge 0x639ea
movq %r9, %rbp
jmp 0x63a5f
movq %r11, %rdx
subq %rax, %rdx
cmovlq %r11, %rax
leaq 0xf(%rax), %r12
testq %rax, %rax
cmovnsq %rax, %r12
sarq $0x4, %r12
cmpq $0x2, %r12
movl $0x1, %eax
cmovlq %rax, %r12
movq %rdx, %rax
negq %rax
cmovsq %rdx, %rax
xorl %r11d, %r11d
xorl %edx, %edx
divq %r12
movq -0x18(%rsp), %r12
cmpq %rax, %r12
movq %r9, %rbp
jg 0x63a4a
movb $0x1, %r11b
jne 0x63a4a
movq %rsi, %rdx
shlq $0x5, %rdx
movzwl 0x14(%rdi,%rdx), %edx
cmpw 0x14(%rdi,%r15), %dx
setle %r11b
testb %r11b, %r11b
cmoveq %rax, %r12
movq %r12, -0x18(%rsp)
cmoveq %r10, %rsi
incq -0x10(%rsp)
movq -0x28(%rsp), %r9
movq -0x38(%rsp), %r12
addq -0x20(%rsp), %r14
cmpq %rcx, %r14
jl 0x6394e
cmpq $-0x1, %rsi
je 0x63ab0
movq 0x58(%r12), %rax
shlq $0x5, %rsi
movslq 0x4(%rax,%rsi), %rcx
incq %rcx
movq %rcx, (%rbp)
movslq 0xc(%rax,%rsi), %rax
incq %rax
movq 0x70(%rsp), %rcx
movq %rax, (%rcx)
movq 0x78(%rsp), %rax
movq $0x0, (%rax)
jmp 0x63abc
movq %rcx, (%rbp)
movq 0x70(%rsp), %rax
movq %r8, (%rax)
movq 0x58(%rsp), %r14
jmp 0x63b89
movq %rax, %rbp
movq -0x38(%rsp), %r12
cmpq $-0x1, %r8
cmovneq %r8, %rdx
cmpq $-0x1, %rbp
cmovneq %rbp, %rdx
cmpq $-0x1, %rdx
je 0x63b1c
movq 0x78(%rsp), %rax
movq $0x0, (%rax)
movq %rdx, %rax
shlq $0x4, %rax
movq -0x28(%rsp), %rsi
movl 0x8(%rsi,%rax), %ecx
movq %rcx, (%r14)
movl 0x4(%rsi,%rax), %eax
movq 0x68(%rsp), %rcx
movq %rax, (%rcx)
movq 0x48(%rsp), %rax
movq %rdx, (%rax)
jmp 0x63c67
decq %r13
movq %r13, %rax
cqto
idivq -0x20(%rsp)
subq %rdx, %r13
movq $-0x1, -0x30(%rsp)
cmpq %r11, %r13
jge 0x63c72
movq -0x30(%rsp), %rdx
cmpq $-0x1, %rdx
je 0x63b74
movq 0x58(%r12), %rax
shlq $0x5, %rdx
movslq (%rax,%rdx), %rcx
movq %rcx, (%r14)
movslq 0x8(%rax,%rdx), %rax
movq 0x68(%rsp), %rcx
movq %rax, (%rcx)
movq 0x78(%rsp), %rax
movq $0x0, (%rax)
jmp 0x63b7f
movq %r11, (%r14)
movq 0x68(%rsp), %rax
movq %rsi, (%rax)
movq 0x60(%rsp), %rbp
movq -0x28(%rsp), %r9
movq 0x50(%rsp), %rdi
cmpq $-0x1, (%rdi)
movq 0x48(%rsp), %r8
jne 0x63bdd
movq (%r8), %rdx
movq %rdx, (%rdi)
cmpq %rbx, %rdx
jge 0x63bdd
movq %rbx, %rax
negq %rax
leaq 0x1(%rdx), %rcx
shlq $0x4, %rdx
addq %r9, %rdx
addq $0x8, %rdx
movl (%rdx), %esi
cmpq %rsi, (%r14)
jg 0x63bdd
cmpq %rsi, (%rbp)
jl 0x63bdd
movq %rcx, (%rdi)
leaq (%rax,%rcx), %rsi
incq %rsi
incq %rcx
addq $0x10, %rdx
cmpq $0x1, %rsi
jne 0x63bb9
cmpq $-0x1, (%r8)
jne 0x63c29
movq (%rdi), %rax
movq %rax, (%r8)
testq %rax, %rax
js 0x63c23
movq %rax, %rcx
shlq $0x4, %rcx
addq %r9, %rcx
addq $0x8, %rcx
movl (%rcx), %edx
cmpq %rdx, (%r14)
jg 0x63c23
cmpq %rdx, (%rbp)
jl 0x63c23
leaq -0x1(%rax), %rdx
movq %rdx, (%r8)
addq $-0x10, %rcx
testq %rax, %rax
movq %rdx, %rax
jg 0x63bfc
movq $-0x1, %rax
incq %rax
movq %rax, (%r8)
movq (%rdi), %rcx
cmpq %rbx, %rcx
jge 0x63c67
negq %rbx
leaq 0x1(%rcx), %rax
shlq $0x4, %rcx
addq %r9, %rcx
addq $0x8, %rcx
movl (%rcx), %edx
cmpq %rdx, (%r14)
jg 0x63c67
cmpq %rdx, (%rbp)
jl 0x63c67
movq %rax, (%rdi)
leaq (%rbx,%rax), %rdx
incq %rdx
incq %rax
addq $0x10, %rcx
cmpq $0x1, %rdx
jne 0x63c43
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x4(%r12), %eax
movq %rax, %rcx
negq %rcx
movq %rcx, -0x8(%rsp)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq %rcx, -0x18(%rsp)
movq $-0x1, -0x30(%rsp)
movq $0x0, -0x10(%rsp)
cmpq %rax, %r13
jl 0x63b3e
movq -0x10(%rsp), %rcx
cmpq 0x40(%rsp), %rcx
jge 0x63b3e
movq %rax, %rbp
xorl %edx, %edx
movq -0x20(%rsp), %rcx
idivq %rcx
movq -0x8(%rsp), %rax
addq %r13, %rax
addq %rdx, %rax
cqto
idivq %rcx
movq 0x58(%r12), %rdi
movq %rax, %r8
shlq $0x5, %r8
cmpl $-0x1, 0xc(%rdi,%r8)
je 0x63d37
movq %rax, %r15
leaq (%rdi,%r8), %r12
movslq (%r12), %rcx
movq %r10, %rax
subq %rcx, %rax
jle 0x63d32
movslq 0x8(%r12), %r14
movq %r9, %rdx
subq %r14, %rdx
jle 0x63d2d
movl 0x4(%r12), %r14d
subl %ecx, %r14d
leal 0x1(%r14), %ecx
movswl 0x14(%r12), %r12d
addl $0x10, %r14d
testl %ecx, %ecx
cmovnsl %ecx, %r14d
sarl $0x4, %r14d
cmpl %r12d, %r14d
jge 0x63d4d
movq 0x58(%rsp), %r14
movq -0x38(%rsp), %r12
movq %rbp, %rax
subq -0x20(%rsp), %r13
cmpq %r11, %r13
jge 0x63c9e
jmp 0x63b3e
movq %rax, %rcx
subq %rdx, %rcx
cmovlq %rax, %rdx
leaq 0xf(%rdx), %r14
testq %rdx, %rdx
cmovnsq %rdx, %r14
sarq $0x4, %r14
cmpq $0x2, %r14
movl $0x1, %eax
cmovlq %rax, %r14
movq %rcx, %rax
negq %rax
cmovsq %rcx, %rax
xorl %ecx, %ecx
xorl %edx, %edx
divq %r14
movq -0x18(%rsp), %rdx
cmpq %rax, %rdx
movq -0x38(%rsp), %r12
jg 0x63dae
movb $0x1, %cl
jne 0x63dae
movq -0x30(%rsp), %rcx
shlq $0x5, %rcx
movzwl 0x14(%rdi,%rcx), %ecx
cmpw 0x14(%rdi,%r8), %cx
setle %cl
testb %cl, %cl
cmoveq %rax, %rdx
movq %rdx, -0x18(%rsp)
movq -0x30(%rsp), %rax
cmoveq %r15, %rax
movq %rax, -0x30(%rsp)
incq -0x10(%rsp)
movq 0x58(%rsp), %r14
jmp 0x63d37
movq %rax, %rdx
jmp 0x638bc
movq %rax, %rdx
movq -0x38(%rsp), %r12
jmp 0x638bc