// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: update_exact_ul_ovlps(all_ul_t*, ma_ug_t*, ul_str_t*, integer_aln_t*, ul_chain_t*, long, integer_t*, ul2ul_t*)
int64_t update_exact_ul_ovlps(all_ul_t *ul_idx, ma_ug_t *ug, ul_str_t *str, integer_aln_t *aln, ul_chain_t *idx, int64_t qid, 
integer_t *buf, ul2ul_t *res)
{
    if(idx->e<=idx->s) return 0;
    int64_t qk, tk, is_rev, tid, q_end, t_end; 
    ul_str_t *q_str, *t_str; integer_aln_t *x; 
    tid = aln[idx->s].tn_rev_qk>>33; is_rev = ((aln[idx->s].tn_rev_qk>>32)&1);
    q_str = &(str[qid]); t_str = &(str[tid]); 
    uint64_t os, oe; uint32_t v, w, q_ns, q_ne, t_ns, t_ne, acc, chained, qbs, qbe, tbs, tbe;
    // if(qid == 95 || qid == 36) {
    //     fprintf(stderr,"[M::%s::qid->%ld::tid->%ld] qs_idx::%u, qe_idx::%u, ts_idx::%u, te_idx::%u\n", __func__, qid, tid, 
    //     (uint32_t)(aln[idx->s].tn_rev_qk), (uint32_t)(aln[idx->e-1].tn_rev_qk), 
    //     aln[idx->s].tk, aln[idx->e-1].tk);
    // }
    //beg
    x = &(aln[idx->s]);
    qk = (uint32_t)(x->tn_rev_qk); tk = ((is_rev == 0)? (x->tk):(t_str->cn - x->tk - 1));
    if((qk > 0) && (x->tk > 0)) return 0;
    idx->q_sidx = (uint32_t)(x->tn_rev_qk); idx->t_sidx = x->tk;

    //end
    x = &(aln[idx->e-1]);
    qk = (uint32_t)(x->tn_rev_qk); tk = ((is_rev == 0)? (x->tk):(t_str->cn - x->tk - 1));
    if((((uint32_t)qk + 1) < q_str->cn) && ((x->tk + 1) < t_str->cn)) return 0;
    idx->q_eidx = (uint32_t)(x->tn_rev_qk)+1; idx->t_eidx = x->tk+1;

    if((idx->q_eidx - idx->q_sidx) != (idx->t_eidx - idx->t_sidx)) return 0;
    if(idx->q_eidx <= idx->q_sidx) return 0;

    qk = idx->q_sidx; q_end = idx->q_eidx;
    tk = idx->t_sidx; t_end = idx->t_eidx; 
    for (; qk < q_end && tk < t_end; qk++, tk++){
        v = ((uint32_t)q_str->a[qk]); 
        if(!is_rev) w = ((uint32_t)t_str->a[tk]);
        else w = ((uint32_t)t_str->a[t_str->cn-tk-1])^1;
        if(v != w) break;
    }
    if(qk!=q_end || tk!=t_end) return 0;
    
    uc_block_t *qi, *ti;
    qk = idx->q_sidx; q_end = idx->q_eidx;
    tk = idx->t_sidx; t_end = idx->t_eidx; 

    buf->p.n = buf->f.n = buf->o.n = buf->u.n = 0;
    kv_resize(int64_t, buf->p, idx->q_eidx - idx->q_sidx); int64_t *p = buf->p.a;
    kv_resize(int64_t, buf->f, idx->q_eidx - idx->q_sidx); int64_t *f = buf->f.a;
    kv_resize(uint64_t, buf->o, idx->q_eidx - idx->q_sidx); uint64_t *qc = buf->o.a;
    kv_resize(uint64_t, buf->u, idx->q_eidx - idx->q_sidx); uint64_t *tc = buf->u.a;
    int64_t max_f, max_z, csc, ps, sc, tf, tz, z;
    for (acc = 0, chained = 1, tf = tz = -1; qk < q_end && tk < t_end; qk++, tk++) {
        qi = &(ul_idx->a[qid].bb.a[q_str->a[qk]>>32]); 
        if(!is_rev) ti = &(ul_idx->a[tid].bb.a[t_str->a[tk]>>32]);
        else ti = &(ul_idx->a[tid].bb.a[t_str->a[t_str->cn-tk-1]>>32]);
        assert(qi->hid == ti->hid);
        os = MAX(qi->ts, ti->ts); oe = MIN(qi->te, ti->te);
        if(oe <= os) continue;
        uc_block_qse_cutoff(os, oe, qi, &q_ns, &q_ne);
        uc_block_qse_cutoff(os, oe, ti, &t_ns, &t_ne);
        qc[acc] = q_ns; qc[acc] <<= 32; qc[acc] |= q_ne;
        tc[acc] = t_ns; tc[acc] <<= 32; tc[acc] |= t_ne;

        z = acc; z -= 1; csc = q_ne - q_ns; if(csc <= 0) csc = 1;
        max_f = csc; max_z = -1; ps = 0;
        if(chained && z >= 0) {
            qbs = qc[z]>>32; qbe = (uint32_t)qc[z]; 
            tbs = tc[z]>>32; tbe = (uint32_t)tc[z];
            if(!is_rev) {
                if(qbs <= q_ns && qbe <= q_ne && tbs <= t_ns && tbe <= t_ne) ps = 1;
            } else {
                if(qbs <= q_ns && qbe <= q_ne && tbs >= t_ns && tbe >= t_ne) ps = 1;
            }
            if(ps) {
                sc = csc + f[z];
                if(sc > max_f) {
                    max_f = sc; max_z = z;
                }
            } else {
                chained = 0;
            }
        }

        if((!ps) || (!chained)) {
            for (; z >= 0; z--) {
                qbs = qc[z]>>32; qbe = (uint32_t)qc[z]; 
                tbs = tc[z]>>32; tbe = (uint32_t)tc[z];
                ps = 0;
                if(!is_rev) {
                    if(qbs <= q_ns && qbe <= q_ne && tbs <= t_ns && tbe <= t_ne) ps = 1;
                } else {
                    if(qbs <= q_ns && qbe <= q_ne && tbs >= t_ns && tbe >= t_ne) ps = 1;
                }
                if(!ps) continue;
                sc = csc + f[z];
                if(sc > max_f) {
                    max_f = sc; max_z = z;
                }
            }
        }

        f[acc] = max_f; p[acc] = max_z;
        if(tf < max_f) {
            tf = max_f; tz = acc;
        }
        acc++;
    }
    if(acc <= 0) return 0;
    assert(tz >= 0);
    res->hid = res->qs = res->qe = res->ts = res->te = (uint32_t)-1;
    res->hid = tid; res->is_rev = !!is_rev; res->is_del = 0; res->is_ct = 0;
    res->qs_k = idx->q_sidx; res->qe_k = idx->q_eidx;
    if(!is_rev) {
        res->ts_k = idx->t_sidx; res->te_k = idx->t_eidx;
    } else {
        res->ts_k = t_str->cn - idx->t_eidx; res->te_k = t_str->cn - idx->t_sidx;
    }
    

    res->qe = (uint32_t)qc[tz];
    if(!is_rev) res->te = (uint32_t)tc[tz];
    else res->ts = tc[tz]>>32;
    
    for (z = tz; z >= 0; z = p[z]) {
        res->qs = qc[z]>>32; 
        if(!is_rev) res->ts = tc[z]>>32;
        else res->te = (uint32_t)tc[z];
    }
    assert(res->qs <= res->qe && res->ts <= res->te);


    int64_t qs = 0, qe = 0, rs = 0, re = 0, qtail = 0, rtail = 0; 
    qs = res->qs; qe = res->qe; rs = res->ts; re = res->te;
    if(is_rev) {
        rs = ul_idx->a[tid].rlen - res->te; re = ul_idx->a[tid].rlen - res->ts;
    }
    if(qs <= rs) {
        rs -= qs; qs = 0;
    } else {
        qs -= rs; rs = 0;
    }

    qtail = ul_idx->a[qid].rlen - qe; rtail = ul_idx->a[tid].rlen - re;
    if(qtail <= rtail) {
        qe = ul_idx->a[qid].rlen; re += qtail;
    }
    else {
        re = ul_idx->a[tid].rlen; qe += rtail; 
    }
    res->qs = qs; res->qe = qe;
    res->ts = rs; res->te = re;
    if(is_rev) {
        res->ts = ul_idx->a[tid].rlen - re; 
        res->te = ul_idx->a[tid].rlen - rs;
    }
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl (%r8), %esi
movl 0x4(%r8), %eax
cmpl %esi, %eax
jbe 0x1b6165
movq %r8, %r14
movq %rdi, %r12
imulq $0x18, %rsi, %rsi
movq 0x10(%rcx,%rsi), %rbp
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
andq %rbp, %r10
sete %dil
movl (%rcx,%rsi), %esi
testl %esi, %esi
sete %r8b
orb %dil, %r8b
cmpb $0x1, %r8b
jne 0x1b6165
movq %r9, %r15
movq %rbp, %r13
shrq $0x21, %r13
movq %r9, %r11
shlq $0x5, %r11
addq %rdx, %r11
movq %r13, %r9
shlq $0x5, %r9
addq %rdx, %r9
movl %ebp, 0x18(%r14)
movl %esi, 0x20(%r14)
decl %eax
imulq $0x18, %rax, %rax
movl (%rcx,%rax), %edx
movl 0x10(%rcx,%rax), %edi
incl %edi
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl 0x18(%r11), %ecx
andl %eax, %ecx
incl %edx
cmpl %ecx, %edi
jae 0x1b5b0d
andl 0x18(%r9), %eax
cmpl %eax, %edx
jb 0x1b6165
movl %edi, 0x1c(%r14)
movl %edx, 0x24(%r14)
xorl %eax, %eax
movl %edi, %ecx
subl %ebp, %ecx
jbe 0x1b6167
movl %edx, %r8d
subl %esi, %r8d
cmpl %r8d, %ecx
jne 0x1b6167
movq 0xe0(%rsp), %rbx
shrq $0x20, %rbp
andl $0x1, %ebp
movl %esi, %esi
movl %edi, %eax
movq %rax, 0x50(%rsp)
movl %edx, %eax
movq %rax, 0x48(%rsp)
movq %rsi, %rax
notq %rax
shlq $0x3, %rax
movq %rsi, 0x28(%rsp)
movq %rsi, %rdx
movq %r10, %rsi
cmpq 0x50(%rsp), %rsi
jae 0x1b5bab
cmpq 0x48(%rsp), %rdx
jae 0x1b5bab
movq 0x10(%r9), %rdi
testq %rbp, %rbp
jne 0x1b5b80
movl (%rdi,%rdx,8), %edi
jmp 0x1b5b95
movl 0x18(%r9), %r8d
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
leaq (%rdi,%r8,8), %rdi
movl (%rax,%rdi), %edi
xorl $0x1, %edi
movq 0x10(%r11), %r8
cmpl (%r8,%rsi,8), %edi
jne 0x1b5bab
incq %rsi
incq %rdx
addq $-0x8, %rax
jmp 0x1b5b64
xorl %eax, %eax
cmpq %rsi, 0x50(%rsp)
jne 0x1b6167
cmpq %rdx, 0x48(%rsp)
jne 0x1b6167
andq $0x0, 0x90(%rbx)
andq $0x0, 0x78(%rbx)
andq $0x0, 0x48(%rbx)
andq $0x0, 0x60(%rbx)
movl %ecx, %edx
cmpq %rdx, 0x68(%rbx)
movq %r9, 0x40(%rsp)
movq %r11, 0x38(%rsp)
movq %r10, 0x20(%rsp)
jae 0x1b5c4c
decq %rdx
movq %rdx, %rcx
shrq %rcx
orq %rdx, %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, 0x68(%rbx)
movq 0x70(%rbx), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq %rax, 0x70(%rbx)
movl 0x1c(%r14), %edx
subl 0x18(%r14), %edx
jmp 0x1b5c50
movq 0x70(%rbx), %rax
cmpq %rdx, 0x50(%rbx)
movq %rax, 0x70(%rsp)
jae 0x1b5cbb
decq %rdx
movq %rdx, %rcx
shrq %rcx
orq %rdx, %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, 0x50(%rbx)
movq 0x58(%rbx), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq %rax, 0x30(%rsp)
movq %rax, 0x58(%rbx)
movl 0x1c(%r14), %edx
subl 0x18(%r14), %edx
jmp 0x1b5cc4
movq 0x58(%rbx), %rax
movq %rax, 0x30(%rsp)
cmpq %rdx, 0x80(%rbx)
jae 0x1b5d31
decq %rdx
movq %rdx, %rcx
shrq %rcx
orq %rdx, %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, 0x80(%rbx)
movq 0x88(%rbx), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq %rax, 0x88(%rbx)
movl 0x1c(%r14), %edx
subl 0x18(%r14), %edx
jmp 0x1b5d38
movq 0x88(%rbx), %rax
movq %rax, 0x18(%rsp)
movq %r13, 0x68(%rsp)
movq %r14, 0x88(%rsp)
cmpq %rdx, 0x98(%rbx)
jae 0x1b5db2
decq %rdx
movq %rdx, %rcx
shrq %rcx
orq %rdx, %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, 0x98(%rbx)
movq 0xa0(%rbx), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq %rax, %r13
movq %rax, 0xa0(%rbx)
jmp 0x1b5db9
movq 0xa0(%rbx), %r13
movq 0xe8(%rsp), %r9
movq 0x40(%rsp), %rsi
movq 0x20(%rsp), %rdi
movq 0x38(%rsp), %r8
movq 0x28(%rsp), %r10
pushq $-0x1
popq %rcx
pushq $0x1
popq %rdx
movl $0x0, 0xc(%rsp)
imulq $0x58, %r15, %r11
imulq $0x58, 0x68(%rsp), %rax
movq %rax, 0x80(%rsp)
movl %edx, 0x8(%rsp)
movq %rcx, 0x78(%rsp)
movq %rcx, 0x10(%rsp)
movq %r12, 0x98(%rsp)
movq %r11, 0x90(%rsp)
cmpq 0x50(%rsp), %rdi
jae 0x1b60f9
cmpq 0x48(%rsp), %r10
jae 0x1b60f9
movq 0x10(%rsi), %rax
testq %rbp, %rbp
jne 0x1b5e38
leaq (%rax,%r10,8), %rax
jmp 0x1b5e4f
movl 0x18(%rsi), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq %r10, %rdx
notq %rdx
leaq (%rax,%rdx,8), %rax
leaq (%rax,%rcx,8), %rax
movq 0x48(%r12), %rcx
movq 0x10(%r8), %rdx
movl 0x4(%rdx,%rdi,8), %edx
imulq $0x24, %rdx, %rdx
addq 0x30(%rcx,%r11), %rdx
movq 0x80(%rsp), %rbx
movq 0x30(%rcx,%rbx), %r15
movl 0x4(%rax), %eax
imulq $0x24, %rax, %rax
movl (%rdx), %ecx
cmpl (%r15,%rax), %ecx
jne 0x1b6298
addq %rax, %r15
movl 0xc(%rdx), %eax
movl 0x10(%rdx), %ecx
movl 0xc(%r15), %ebx
movl 0x10(%r15), %r14d
cmpl %ebx, %eax
cmoval %eax, %ebx
cmpl %r14d, %ecx
cmovbl %ecx, %r14d
cmpl %ebx, %r14d
jbe 0x1b60ee
movq %r10, 0x28(%rsp)
movq %rdi, 0x20(%rsp)
movl %ebx, %edi
movl %r14d, %esi
leaq 0x64(%rsp), %rcx
leaq 0x60(%rsp), %r8
callq 0x1b5996
movl %ebx, %edi
movl %r14d, %esi
movq %r15, %rdx
leaq 0x5c(%rsp), %rcx
leaq 0x58(%rsp), %r8
callq 0x1b5996
movl 0x64(%rsp), %ecx
movl 0xc(%rsp), %r11d
movl %r11d, %r12d
movq %rcx, %rsi
shlq $0x20, %rsi
movl 0x60(%rsp), %edx
orq %rdx, %rsi
movq 0x18(%rsp), %rax
movq %rsi, (%rax,%r12,8)
movl 0x5c(%rsp), %esi
movq %rsi, %r8
shlq $0x20, %r8
movl 0x58(%rsp), %edi
orq %rdi, %r8
movq %r8, (%r13,%r12,8)
movl %edx, %r8d
subl %ecx, %r8d
pushq $0x1
popq %r9
cmovel %r9d, %r8d
leaq -0x1(%r12), %r9
cmpl $0x0, 0x8(%rsp)
setne %r10b
testl %r11d, %r11d
setne %r11b
andb %r10b, %r11b
movb $0x1, %bl
cmpb $0x1, %r11b
jne 0x1b5fdf
movq -0x8(%rax,%r12,8), %r10
movq %r10, %r15
shrq $0x20, %r15
movq -0x8(%r13,%r12,8), %r14
movq %r14, %r11
shrq $0x20, %r11
cmpl %r15d, %ecx
setb %r15b
cmpl %r10d, %edx
setb %r10b
orb %r15b, %r10b
testq %rbp, %rbp
jne 0x1b5f9c
cmpl %r11d, %esi
setb %r11b
movl $0x0, 0x8(%rsp)
orb %r11b, %r10b
jne 0x1b5fdf
movq %r8, %r10
pushq $-0x1
popq %r11
cmpl %r14d, %edi
jae 0x1b5fbc
jmp 0x1b5fe6
cmpl %r11d, %esi
seta %r11b
movl $0x0, 0x8(%rsp)
orb %r11b, %r10b
jne 0x1b5fdf
movq %r8, %r10
pushq $-0x1
popq %r11
cmpl %r14d, %edi
ja 0x1b5fe6
movq 0x30(%rsp), %rax
movq -0x8(%rax,%r12,8), %r10
xorl %ebx, %ebx
testq %r10, %r10
cmovleq %rbx, %r10
cmovgq %r9, %r11
addq %r8, %r10
pushq $0x1
popq %rax
movl %eax, 0x8(%rsp)
jmp 0x1b5fe6
movq %r8, %r10
pushq $-0x1
popq %r11
movq %r12, 0xa0(%rsp)
movq %rbp, %r12
cmpl $0x0, 0xc(%rsp)
setne %r14b
cmpl $0x0, 0x8(%rsp)
sete %r15b
orb %bl, %r15b
andb %r14b, %r15b
cmpb $0x1, %r15b
jne 0x1b6082
movq 0x18(%rsp), %rax
movq (%rax,%r9,8), %rbp
movq %rbp, %r15
shrq $0x20, %r15
movq (%r13,%r9,8), %rbx
movq %rbx, %r14
shrq $0x20, %r14
cmpl %r15d, %ecx
setb %al
cmpl %ebp, %edx
setb %r15b
orb %al, %r15b
testq %r12, %r12
jne 0x1b6050
cmpl %r14d, %esi
setb %al
orb %al, %r15b
jne 0x1b6076
cmpl %ebx, %edi
jae 0x1b605f
jmp 0x1b6076
cmpl %r14d, %esi
seta %al
orb %al, %r15b
jne 0x1b6076
cmpl %ebx, %edi
ja 0x1b6076
movq 0x30(%rsp), %rax
movq (%rax,%r9,8), %rax
addq %r8, %rax
cmpq %r10, %rax
cmovgq %rax, %r10
cmovgq %r9, %r11
leaq -0x1(%r9), %rax
testq %r9, %r9
movq %rax, %r9
jg 0x1b600f
movq 0x30(%rsp), %rax
movq 0xa0(%rsp), %rcx
movq %r10, (%rax,%rcx,8)
movq 0x78(%rsp), %rax
cmpq %r10, %rax
cmovleq %r10, %rax
movq %rax, 0x78(%rsp)
movq 0x70(%rsp), %rax
movq %r11, (%rax,%rcx,8)
movq 0x10(%rsp), %rax
cmovlq %rcx, %rax
movq %rax, 0x10(%rsp)
incl 0xc(%rsp)
movq %r12, %rbp
movq 0x98(%rsp), %r12
movq 0xe8(%rsp), %r9
movq 0x40(%rsp), %rsi
movq 0x20(%rsp), %rdi
movq 0x38(%rsp), %r8
movq 0x28(%rsp), %r10
movq 0x90(%rsp), %r11
incq %rdi
incq %r10
jmp 0x1b5e13
cmpl $0x0, 0xc(%rsp)
je 0x1b6165
cmpq $0x0, 0x10(%rsp)
js 0x1b62b7
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x4(%r9)
movq 0x68(%rsp), %rax
movl %eax, (%r9)
movb %bpl, 0x24(%r9)
movq 0x88(%rsp), %rdx
movq 0x18(%rdx), %rax
movq %rax, 0x14(%r9)
pushq $-0x1
popq %rax
testq %rbp, %rbp
movq 0x70(%rsp), %r10
jne 0x1b6179
movl 0x20(%rdx), %ecx
movl %ecx, 0x1c(%r9)
movl 0x24(%rdx), %r8d
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %rdx
movl (%rcx,%rdx,8), %ecx
movl (%r13,%rdx,8), %edx
movl %edx, 0x10(%r9)
pushq $-0x1
popq %rsi
jmp 0x1b61ac
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movl 0x18(%rsi), %ecx
andl %r8d, %ecx
subl 0x24(%rdx), %ecx
movl %ecx, 0x1c(%r9)
andl 0x18(%rsi), %r8d
subl 0x20(%rdx), %r8d
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %rdx
movl (%rcx,%rdx,8), %ecx
movl 0x4(%r13,%rdx,8), %esi
movl %esi, 0xc(%r9)
movl %eax, %edx
leaq 0x4(%r9), %rdi
movl %r8d, 0x20(%r9)
movl %ecx, 0x8(%r9)
movq 0x10(%rsp), %r8
testq %r8, %r8
js 0x1b61f5
movq 0x18(%rsp), %rax
movl 0x4(%rax,%r8,8), %eax
movl %eax, (%rdi)
movq %r8, %rbx
movq (%r13,%r8,8), %r8
testq %rbp, %rbp
jne 0x1b61e8
shrq $0x20, %r8
movl %r8d, 0xc(%r9)
movl %r8d, %esi
jmp 0x1b61ef
movl %r8d, 0x10(%r9)
movl %r8d, %edx
movq (%r10,%rbx,8), %r8
jmp 0x1b61bd
cmpl %ecx, %eax
ja 0x1b62d6
cmpl %edx, %esi
ja 0x1b62d6
movq 0x48(%r12), %r9
movq 0x80(%rsp), %rdi
movl 0x18(%r9,%rdi), %edi
movl %edi, %r8d
subl %edx, %r8d
movl %edi, %r10d
subl %esi, %r10d
testq %rbp, %rbp
cmovel %esi, %r8d
cmovel %edx, %r10d
xorl %edx, %edx
movl %eax, %esi
subl %r8d, %esi
cmovbl %edx, %esi
subl %eax, %r8d
cmovbl %edx, %r8d
movl 0x18(%r9,%r11), %eax
movq %rax, %r9
subq %rcx, %r9
movq %rdi, %r11
subq %r10, %r11
leal (%r9,%r10), %edx
addl %r11d, %ecx
cmpq %r11, %r9
cmovlel %eax, %ecx
cmovgl %edi, %edx
movq 0xe8(%rsp), %r9
movl %esi, 0x4(%r9)
movl %ecx, 0x8(%r9)
movl %r8d, 0xc(%r9)
movl %edx, 0x10(%r9)
pushq $0x1
popq %rax
testq %rbp, %rbp
je 0x1b6167
movl %edi, %ecx
subl %edx, %ecx
movl %ecx, 0xc(%r9)
subl %r8d, %edi
movl %edi, 0x10(%r9)
jmp 0x1b6167
leaq 0x42829(%rip), %rdi     # 0x1f8ac8
leaq 0x41233(%rip), %rsi     # 0x1f74d9
leaq 0x4282e(%rip), %rcx     # 0x1f8adb
movl $0x14a8, %edx           # imm = 0x14A8
callq 0x2110
leaq 0x4289e(%rip), %rdi     # 0x1f8b5c
leaq 0x41214(%rip), %rsi     # 0x1f74d9
leaq 0x4280f(%rip), %rcx     # 0x1f8adb
movl $0x14dd, %edx           # imm = 0x14DD
callq 0x2110
leaq 0x42887(%rip), %rdi     # 0x1f8b64
leaq 0x411f5(%rip), %rsi     # 0x1f74d9
leaq 0x427f0(%rip), %rcx     # 0x1f8adb
movl $0x14f1, %edx           # imm = 0x14F1
callq 0x2110