// File: /workspace/github_cpp_makefile_star2_O1/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 0x1f6882
movq %rdi, %rbx
leaq (%rsi,%rsi,2), %rsi
leaq (%rcx,%rsi,8), %rsi
movq 0x10(%rsi), %r14
movl 0x10(%rsi), %edi
testq %rdi, %rdi
je 0x1f61fd
cmpl $0x0, (%rsi)
jne 0x1f6882
movq %r14, %r10
shrq $0x21, %r10
movq %r9, %r11
shlq $0x5, %r11
addq %rdx, %r11
movq %r10, %r15
shlq $0x5, %r15
addq %rdx, %r15
movq %rdi, %r12
movl %edi, 0x18(%r8)
movl (%rsi), %edx
movq %rdx, %r13
movl %edx, 0x20(%r8)
decl %eax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rax
movl 0x10(%rax), %edi
incl %edi
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq %r11, 0x78(%rsp)
movl 0x18(%r11), %edx
andl %ecx, %edx
cmpl %edx, %edi
jae 0x1f625b
movl (%rax), %edx
incl %edx
andl 0x18(%r15), %ecx
cmpl %ecx, %edx
jb 0x1f6882
movl %edi, 0x1c(%r8)
movl (%rax), %ebp
incl %ebp
movl %ebp, 0x24(%r8)
xorl %eax, %eax
movl %edi, %ecx
subl %r12d, %ecx
jbe 0x1f6884
movl %ebp, %edx
subl %r13d, %edx
cmpl %edx, %ecx
jne 0x1f6884
shrq $0x20, %r14
andl $0x1, %r14d
movl %edi, %eax
movq %rax, 0x20(%rsp)
movl %ebp, %eax
movq %rax, 0x38(%rsp)
movq %r13, %rdx
movq %r12, %rax
movq %r12, %rsi
cmpl %edi, %eax
jae 0x1f6312
movq %r13, %rax
movq %r13, %rdx
movq %r12, %rsi
cmpl %eax, %ebp
jbe 0x1f6312
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movq %r13, %rdx
movq %r13, %rdi
notq %rdi
shlq $0x3, %rdi
movq %r12, %rsi
testq %r14, %r14
jne 0x1f62d9
movq 0x10(%r15), %r11
movl (%r11,%rdx,8), %r11d
jmp 0x1f62f4
movl 0x18(%r15), %r11d
andl $0x7fffffff, %r11d      # imm = 0x7FFFFFFF
shlq $0x3, %r11
addq 0x10(%r15), %r11
movl (%rdi,%r11), %r11d
xorl $0x1, %r11d
cmpl (%rax,%rsi,8), %r11d
jne 0x1f6312
incq %rsi
incq %rdx
cmpq 0x20(%rsp), %rsi
jae 0x1f6312
addq $-0x8, %rdi
cmpq 0x38(%rsp), %rdx
jb 0x1f62ca
xorl %eax, %eax
cmpq 0x20(%rsp), %rsi
jne 0x1f6884
cmpq 0x38(%rsp), %rdx
jne 0x1f6884
movq %r15, 0x30(%rsp)
movq %r8, 0x18(%rsp)
movq %r10, 0x28(%rsp)
movq %r9, 0x60(%rsp)
movq 0xe0(%rsp), %r15
xorl %eax, %eax
movq %rax, 0x90(%r15)
movq %rax, 0x78(%r15)
movq %rax, 0x48(%r15)
movq %rax, 0x60(%r15)
movl %ecx, %eax
cmpq %rax, 0x68(%r15)
jae 0x1f63b4
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, 0x68(%r15)
movq 0x70(%r15), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq %rax, 0x70(%r15)
movq 0x70(%r15), %rax
movq %rax, 0x68(%rsp)
movq 0x18(%rsp), %rcx
movl 0x1c(%rcx), %eax
subl 0x18(%rcx), %eax
cmpq %rax, 0x50(%r15)
jae 0x1f641f
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, 0x50(%r15)
movq 0x58(%r15), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq %rax, 0x58(%r15)
movq 0x58(%r15), %rax
movq %rax, 0x40(%rsp)
movq 0x18(%rsp), %rcx
movl 0x1c(%rcx), %eax
subl 0x18(%rcx), %eax
cmpq %rax, 0x80(%r15)
jae 0x1f6496
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, 0x80(%r15)
movq 0x88(%r15), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq %rax, 0x88(%r15)
movq 0x88(%r15), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rcx
movl 0x1c(%rcx), %eax
subl 0x18(%rcx), %eax
cmpq %rax, 0x98(%r15)
jae 0x1f6510
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, 0x98(%r15)
movq 0xa0(%r15), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq %rax, 0xa0(%r15)
movq 0xa0(%r15), %r15
movq $-0x1, 0x8(%rsp)
movb $0x1, %al
movq %r12, %rdi
cmpl 0x20(%rsp), %edi
movq %r14, 0x48(%rsp)
jae 0x1f687e
movq %r13, %r8
cmpl %ebp, %r8d
jae 0x1f687e
movl $0x0, 0x4(%rsp)
movq $-0x1, 0x8(%rsp)
imulq $0x58, 0x60(%rsp), %r9
imulq $0x58, 0x28(%rsp), %r10
movq $-0x1, 0x70(%rsp)
movl $0x1, (%rsp)
movq %rbx, 0x90(%rsp)
movq %r9, 0x88(%rsp)
movq %r10, 0x80(%rsp)
testq %r14, %r14
jne 0x1f659d
leaq (,%r8,8), %rax
movq 0x30(%rsp), %rcx
addq 0x10(%rcx), %rax
jmp 0x1f65bc
movq 0x30(%rsp), %rdx
movl 0x18(%rdx), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %r8, %rcx
notq %rcx
shlq $0x3, %rcx
addq 0x10(%rdx), %rcx
leaq (%rcx,%rax,8), %rax
movq 0x48(%rbx), %rcx
movq 0x78(%rsp), %rdx
movq 0x10(%rdx), %rdx
movl 0x4(%rdx,%rdi,8), %edx
leaq (%rdx,%rdx,8), %rdx
shlq $0x2, %rdx
addq 0x30(%rcx,%r9), %rdx
movq 0x30(%rcx,%r10), %rcx
movl 0x4(%rax), %eax
leaq (%rax,%rax,8), %rax
movl (%rdx), %esi
cmpl (%rcx,%rax,4), %esi
jne 0x1f6a3d
leaq (%rcx,%rax,4), %r13
movl 0xc(%rdx), %eax
movl 0x10(%rdx), %ecx
movl 0xc(%r13), %ebp
movl 0x10(%r13), %r12d
cmpl %ebp, %eax
cmoval %eax, %ebp
cmpl %r12d, %ecx
cmovbl %ecx, %r12d
cmpl %ebp, %r12d
jbe 0x1f685e
movq %r8, 0x98(%rsp)
movq %rdi, 0xa0(%rsp)
movl %ebp, %edi
movl %r12d, %esi
leaq 0x5c(%rsp), %rcx
leaq 0x58(%rsp), %r8
callq 0x1f60da
movl %ebp, %edi
movl %r12d, %esi
movq %r13, %rdx
leaq 0x54(%rsp), %rcx
leaq 0x50(%rsp), %r8
callq 0x1f60da
movl 0x5c(%rsp), %ecx
movl 0x4(%rsp), %r11d
movl %r11d, %eax
movq %rcx, %rsi
shlq $0x20, %rsi
movq 0x10(%rsp), %r12
movq %rsi, (%r12,%rax,8)
movl 0x58(%rsp), %edx
orq %rdx, %rsi
movq %rsi, (%r12,%rax,8)
movl 0x54(%rsp), %esi
movq %rsi, %r8
shlq $0x20, %r8
movq %r8, (%r15,%rax,8)
movl 0x50(%rsp), %edi
orq %rdi, %r8
movq %r8, (%r15,%rax,8)
leaq -0x1(%rax), %r9
movl %edx, %r8d
subl %ecx, %r8d
movl $0x1, %r10d
cmovel %r10d, %r8d
cmpl $0x0, (%rsp)
setne %r10b
testl %r11d, %r11d
setne %r11b
andb %r10b, %r11b
movb $0x1, %r13b
movq $-0x1, %r10
cmpb $0x1, %r11b
jne 0x1f6716
movq -0x8(%r12,%rax,8), %r12
movq %r12, %r11
shrq $0x20, %r11
movq -0x8(%r15,%rax,8), %rbp
movq %rbp, %rbx
shrq $0x20, %rbp
cmpl %r11d, %ecx
setb %r13b
cmpl %r12d, %edx
setb %r11b
orb %r13b, %r11b
testq %r14, %r14
jne 0x1f671b
cmpl %ebp, %esi
setb %bpl
movl $0x0, (%rsp)
orb %bpl, %r11b
jne 0x1f6762
movq %r8, %r11
cmpl %ebx, %edi
movb $0x1, %r13b
jae 0x1f6737
jmp 0x1f6768
movq %r8, %r11
jmp 0x1f6768
cmpl %ebp, %esi
seta %bpl
movl $0x0, (%rsp)
orb %bpl, %r11b
jne 0x1f6762
movq %r8, %r11
cmpl %ebx, %edi
movb $0x1, %r13b
ja 0x1f6768
movq 0x40(%rsp), %r10
movq -0x8(%r10,%rax,8), %r11
xorl %r13d, %r13d
testq %r11, %r11
cmovleq %r13, %r11
movq $-0x1, %r10
cmovgq %r9, %r10
addq %r8, %r11
movl $0x1, (%rsp)
jmp 0x1f6768
movq %r8, %r11
movb $0x1, %r13b
cmpl $0x0, 0x4(%rsp)
setne %bpl
cmpl $0x0, (%rsp)
sete %r12b
orb %r13b, %r12b
andb %bpl, %r12b
cmpb $0x1, %r12b
jne 0x1f67fc
movq 0x10(%rsp), %rbx
movq (%rbx,%r9,8), %rbx
movq %rbx, %rbp
shrq $0x20, %rbp
movq (%r15,%r9,8), %r12
movq %r12, %r13
shrq $0x20, %r13
cmpl %ebp, %ecx
setb %r14b
cmpl %ebx, %edx
setb %bpl
orb %r14b, %bpl
cmpq $0x0, 0x48(%rsp)
jne 0x1f67c9
cmpl %r13d, %esi
setb %bl
orb %bl, %bpl
jne 0x1f67f0
cmpl %r12d, %edi
jae 0x1f67d9
jmp 0x1f67f0
cmpl %r13d, %esi
seta %bl
orb %bl, %bpl
jne 0x1f67f0
cmpl %r12d, %edi
ja 0x1f67f0
movq 0x40(%rsp), %rbx
movq (%rbx,%r9,8), %rbx
addq %r8, %rbx
cmpq %r11, %rbx
cmovgq %rbx, %r11
cmovgq %r9, %r10
leaq -0x1(%r9), %rbx
testq %r9, %r9
movq %rbx, %r9
jg 0x1f6785
movq 0x40(%rsp), %rcx
movq %r11, (%rcx,%rax,8)
movq 0x70(%rsp), %rcx
cmpq %r11, %rcx
cmovleq %r11, %rcx
movq %rcx, 0x70(%rsp)
movq 0x68(%rsp), %rcx
movq %r10, (%rcx,%rax,8)
movq 0x8(%rsp), %rcx
cmovlq %rax, %rcx
movq %rcx, 0x8(%rsp)
incl 0x4(%rsp)
movq 0x48(%rsp), %r14
movq 0x90(%rsp), %rbx
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %r8
movq 0x88(%rsp), %r9
movq 0x80(%rsp), %r10
incq %rdi
cmpq 0x20(%rsp), %rdi
jae 0x1f6876
incq %r8
cmpq 0x38(%rsp), %r8
jb 0x1f6585
cmpl $0x0, 0x4(%rsp)
sete %al
testb %al, %al
je 0x1f6896
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x8(%rsp)
js 0x1f6a7b
movq %rbx, %r12
movq 0xe8(%rsp), %rax
leaq 0x10(%rax), %rdx
leaq 0xc(%rax), %rsi
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x4(%rax)
movq 0x28(%rsp), %rcx
movl %ecx, (%rax)
movb %r14b, 0x24(%rax)
movq 0x18(%rsp), %r8
movl 0x18(%r8), %ecx
movl %ecx, 0x14(%rax)
movl 0x1c(%r8), %ecx
movl %ecx, 0x18(%rax)
testq %r14, %r14
jne 0x1f68f1
movl 0x20(%r8), %ecx
movl %ecx, 0x1c(%rax)
movl 0x24(%r8), %ecx
movq %rdx, %r9
jmp 0x1f6913
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq 0x30(%rsp), %r9
movl 0x18(%r9), %edi
andl %ecx, %edi
subl 0x24(%r8), %edi
movl %edi, 0x1c(%rax)
andl 0x18(%r9), %ecx
subl 0x20(%r8), %ecx
movq %rsi, %r9
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rbx
movl %ecx, 0x20(%rax)
movq (%rdi,%rbx,8), %rdi
movl %edi, 0x8(%rax)
movq (%r15,%rbx,8), %r10
movl %r14d, %ecx
shll $0x5, %ecx
shrq %cl, %r10
leaq 0x4(%rax), %r8
testq %r14, %r14
movl %edi, %ecx
movl %r10d, (%r9)
movq %rdx, %r9
cmoveq %rsi, %r9
movq 0x68(%rsp), %r13
movq %rbx, %r10
movq (%r15,%rbx,8), %rbx
movq %rbx, %r11
shrq $0x20, %r11
testq %r14, %r14
cmovnel %ebx, %r11d
movq (%r13,%r10,8), %rbx
testq %rbx, %rbx
jns 0x1f694c
movq 0x10(%rsp), %rbx
movq (%rbx,%r10,8), %r10
movl %r11d, (%r9)
shrq $0x20, %r10
movl %r10d, (%r8)
cmpl %edi, %r10d
ja 0x1f6a5c
movl (%rsi), %r8d
movl (%rdx), %r9d
cmpl %r9d, %r8d
ja 0x1f6a5c
testq %r14, %r14
movq 0x60(%rsp), %r14
movq 0x28(%rsp), %r13
je 0x1f69c2
movq 0x48(%r12), %r11
imulq $0x58, %r13, %rbx
movl 0x18(%r11,%rbx), %r11d
movl %r11d, %ebx
subl %r9d, %ebx
subl %r8d, %r11d
movl %ebx, %r8d
movl %r11d, %r9d
movl %r9d, %ebx
xorl %ebp, %ebp
movl %r10d, %r11d
subl %r8d, %r11d
cmovbl %ebp, %r11d
subl %r10d, %r8d
cmovbl %ebp, %r8d
movq 0x48(%r12), %r10
imulq $0x58, %r14, %r14
movl 0x18(%r10,%r14), %r14d
movq %r14, %r15
subq %rcx, %r15
imulq $0x58, %r13, %rcx
movl 0x18(%r10,%rcx), %ecx
movq %rcx, %r10
subq %rbx, %r10
addl %r15d, %r9d
addl %r10d, %edi
cmpq %r10, %r15
cmovlel %r14d, %edi
cmovgl %ecx, %r9d
movl %r11d, 0x4(%rax)
movl %edi, 0x8(%rax)
movl %r8d, 0xc(%rax)
movl %r9d, 0x10(%rax)
movl $0x1, %eax
cmpq $0x0, 0x48(%rsp)
je 0x1f6884
movl %ecx, %edi
subl %r9d, %edi
movl %edi, (%rsi)
subl %r8d, %ecx
movl %ecx, (%rdx)
jmp 0x1f6884
leaq 0x43e44(%rip), %rdi     # 0x23a888
leaq 0x428da(%rip), %rsi     # 0x239325
leaq 0x43e49(%rip), %rcx     # 0x23a89b
movl $0x14a8, %edx           # imm = 0x14A8
callq 0x2110
leaq 0x43ec1(%rip), %rdi     # 0x23a924
leaq 0x428bb(%rip), %rsi     # 0x239325
leaq 0x43e2a(%rip), %rcx     # 0x23a89b
movl $0x14f1, %edx           # imm = 0x14F1
callq 0x2110
leaq 0x43e9a(%rip), %rdi     # 0x23a91c
leaq 0x4289c(%rip), %rsi     # 0x239325
leaq 0x43e0b(%rip), %rcx     # 0x23a89b
movl $0x14dd, %edx           # imm = 0x14DD
callq 0x2110