// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: rphase_lidel_cc(overlap_region_alloc*, ul_ov_t*, long, double, unsigned long, double, unsigned long, unsigned long, asg64_v*, asg64_v*)
int64_t rphase_lidel_cc(overlap_region_alloc* oa, ul_ov_t *a, int64_t an, double len_st, uint64_t len_w, double err_dif, uint64_t c_sz, uint64_t rid, asg64_v *buf, asg64_v *idx)
{
    int64_t k, z, mk, gni; uint64_t ol, ck, v, *ia, *ca, iak, ii, ian; double sw, msw = -1; 
    kv_resize(uint64_t, *idx, (oa->length<<1)); 
    ia = idx->a; ian = oa->length; iak = 0;
    ca = idx->a + oa->length; memset(ca, 0, sizeof((*ca))*oa->length);

    for (k = 0; k < an; k++) {
        ol = (a[k].qe - a[k].qs) * len_st; if(ol < len_w) ol = len_w;
        if((a[k].qe - a[k].qs) < ol) continue;
        for (z = k + 1; (z < an) && (a[z].qs < a[k].qe); z++) {
            if(cal_lindel_dd(&(a[k]), &(a[z]), len_st, len_w, err_dif, c_sz) >= 0) {
                a[k].sec++; a[z].sec++; 
                // fprintf(stderr, "(0)[M::%s] k(%ld)sec::%u\trid::%u\t%.*s\tq::[%u,%u)\terr::%u\n", __func__, k, a[k].sec, oa->list[a[k].tn].y_id, (int)Get_NAME_LENGTH(R_INF, oa->list[a[k].tn].y_id), Get_NAME(R_INF, oa->list[a[k].tn].y_id), a[k].qs, a[k].qe, a[k].qn);
                // fprintf(stderr, "(1)[M::%s] z(%ld)sec::%u\trid::%u\t%.*s\tq::[%u,%u)\terr::%u\n", __func__, z, a[z].sec, oa->list[a[z].tn].y_id, (int)Get_NAME_LENGTH(R_INF, oa->list[a[z].tn].y_id), Get_NAME(R_INF, oa->list[a[z].tn].y_id), a[z].qs, a[z].qe, a[z].qn);
            }
        }
    }
    
    for (k = z = 0; k < an; k++) {
        if(a[k].sec == 0) {
            // fprintf(stderr, "#[M::%s] z::%ld, sec::%u\trid::%u\t%.*s\tq::[%u,%u)\terr::%u\tel::%u\n", __func__, z, a[k].sec, oa->list[a[k].tn].y_id, (int)Get_NAME_LENGTH(R_INF, oa->list[a[k].tn].y_id), Get_NAME(R_INF, oa->list[a[k].tn].y_id), a[k].qs, a[k].qe, a[k].qn, a[k].el);
            continue;
        }
        a[k].ts = a[k].te = ((uint32_t)-1);///cluster
        // fprintf(stderr, "[M::%s] z::%ld, tn::%u, sec::%u\trid::%u\t%.*s\tq::[%u,%u)\terr::%u\n", __func__, z, a[k].tn, a[k].sec, oa->list[a[k].tn].y_id, (int)Get_NAME_LENGTH(R_INF, oa->list[a[k].tn].y_id), Get_NAME(R_INF, oa->list[a[k].tn].y_id), a[k].qs, a[k].qe, a[k].qn);
        a[z++] = a[k];
    }
    an = z;
    if(an == 0) return 0;

    // fprintf(stderr, "*0*[M::%s] rid::%lu, an::%ld\n", __func__, rid, an);
    for (k = ck = buf->n = gni = 0; k < an; k++) {
        if((a[k].sec < c_sz) || (a[k].ts != ((uint32_t)-1))) continue;
        // fprintf(stderr, "\n[M::%s] k::%ld\tsec::%u\tcc::%u\tck::%lu\ttn::%u\n", __func__, k, a[k].sec, a[k].ts, ck, a[k].tn);

        buf->n = 0; kv_push(uint64_t, *buf, k); iak = 0;
        while (buf->n) {
            v = buf->a[--buf->n];
            ol = (a[v].qe - a[v].qs) * len_st; if(ol < len_w) ol = len_w;
            if((a[v].qe - a[v].qs) < ol) continue;
            
            // fprintf(stderr, "*0*[M::%s] v::%lu\n", __func__, v);
            if((set_cgid(&(a[v]), ia, &iak, ian, ca, ck, oa->list, &gni)) || (a[v].ts == ck)) {
                // fprintf(stderr, "*1*[M::%s] v::%lu\n", __func__, v);
                for (z = 0; (z < an) && (a[z].qs < a[v].qe); z++) {
                    // fprintf(stderr, "*0*[M::%s] a[z].tn::%u, a[z].sec::%u, c_sz::%lu, a[z].ts:%u, v::%lu, z::%ld\n", __func__, a[z].tn, a[z].sec, c_sz, a[z].ts, v, z);
                    if((a[z].sec < c_sz) || (a[z].ts != ((uint32_t)-1)) || (((int64_t)v) == z)) continue;
                    // fprintf(stderr, "*1*[M::%s] a[z].tn::%u\n", __func__, a[z].tn);
                    if((cal_lindel_dd(&(a[v]), &(a[z]), len_st, len_w, err_dif, c_sz) >= 0) && (set_cgid(&(a[z]), ia, &iak, ian, ca, ck, oa->list, &gni))) {
                        kv_push(uint64_t, *buf, z);
                        // fprintf(stderr, "*2*[M::%s] z::%ld, a[z].tn::%u\n", __func__, z, a[z].tn);
                    }
                }
            }
        }

        for (ii = 0; ii < iak; ii++) ia[ii] = 0;
        ck++;
    }

    // for (k = 0; k < an; k++) {
    //     fprintf(stderr, "*0*[M::%s] z::%ld, tn::%u, sec::%u\trid::%u\t%.*s\tq::[%u,%u)\terr::%u\tgid::%u\n", __func__, k, a[k].tn, a[k].sec, oa->list[a[k].tn].y_id, (int)Get_NAME_LENGTH(R_INF, oa->list[a[k].tn].y_id), Get_NAME(R_INF, oa->list[a[k].tn].y_id), a[k].qs, a[k].qe, a[k].qn, a[k].ts);
    // }
    // fprintf(stderr, "*1*[M::%s] rid::%lu, an::%ld, ck::%lu\n", __func__, rid, an, ck);
    if(ck <= 0 || gni <= 0) return 0;

    if(gni < an) {
        ///build index for cluster
        buf->n = an + ck; kv_resize(uint64_t, *buf, buf->n); 
        memset(buf->a, -1, sizeof((*(buf->a)))*buf->n);
        ca = buf->a; ia = buf->a + ck;
        for (k = 0; k < an; k++) {
            if(a[k].ts == ((uint32_t)-1)) continue;
            if(ca[a[k].ts] != ((uint64_t)-1)) {
                ///set the previous one 
                assert(ia[((uint32_t)ca[a[k].ts])] == ((uint64_t)-1));
                ia[((uint32_t)ca[a[k].ts])] = k;
                ca[a[k].ts] >>= 32; ca[a[k].ts] <<= 32; ca[a[k].ts] |= k;
            } else {
                ca[a[k].ts] = k; ca[a[k].ts] <<= 32; ca[a[k].ts] |= ((uint64_t)k);
            }
        }
        

        for (k = ck = 0; k < an; k++) {
            if(a[k].ts != ((uint32_t)-1)) {
                ck++; continue;
            }
            ol = (a[k].qe - a[k].qs) * len_st; if(ol < len_w) ol = len_w;
            if((a[k].qe - a[k].qs) < ol) continue;
            mk = -1; msw = -1;
            for (z = 0/**k + 1**/; (z < an) && (a[z].qs < a[k].qe); z++) {
                if(a[z].sec < c_sz) continue;
                if(a[z].ts == ((uint32_t)-1)) continue;
                if(z == k) continue;
                sw = cal_lindel_dd(&(a[k]), &(a[z]), len_st, len_w, err_dif, c_sz);
                if(sw < 0) continue;
                if((sw > msw) && (is_get_group(a, /**an, rid,**/ ca, ia, a[z].ts, a[k].tn))) {
                    mk = a[z].ts; msw = sw;
                }
            }
            if(mk != -1) {
                ck++; a[k].ts = mk;
                ///set the previous one 
                assert(ia[((uint32_t)ca[a[k].ts])] == ((uint64_t)-1));
                ia[((uint32_t)ca[a[k].ts])] = k;
                ca[a[k].ts] >>= 32; ca[a[k].ts] <<= 32; ca[a[k].ts] |= k;
            }
        }
    } else {
        ck = gni;
    }
    radix_sort_ul_ov_srt_ts1(a, a + an);
    // for (k = 0; k < an; k++) {
    //     fprintf(stderr, "*1*[M::%s] z::%ld, tn::%u, sec::%u\trid::%u\t%.*s\tq::[%u,%u)\terr::%u\tgid::%u\n", __func__, k, a[k].tn, a[k].sec, oa->list[a[k].tn].y_id, (int)Get_NAME_LENGTH(R_INF, oa->list[a[k].tn].y_id), Get_NAME(R_INF, oa->list[a[k].tn].y_id), a[k].qs, a[k].qe, a[k].qn, a[k].ts);
    // }
    return ck;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, 0x10(%rsp)
movsd %xmm1, 0x58(%rsp)
movq %rcx, 0x48(%rsp)
movsd %xmm0, 0x40(%rsp)
movq %rdx, %r13
movq %rsi, 0x18(%rsp)
movq %rdi, %rbx
movq 0xa8(%rsp), %r14
movq 0x10(%rdi), %rax
addq %rax, %rax
cmpq %rax, 0x8(%r14)
jae 0x7159c
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, 0x8(%r14)
movq 0x10(%r14), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq %rax, 0x10(%r14)
movq 0x10(%r14), %rax
movq 0x10(%rbx), %rcx
movq %rax, 0x50(%rsp)
leaq (%rax,%rcx,8), %rdi
movq %rcx, 0x60(%rsp)
leaq (,%rcx,8), %rdx
movq %rdi, 0x30(%rsp)
xorl %esi, %esi
callq 0x20e0
testq %r13, %r13
movq 0x18(%rsp), %rdi
jle 0x716c0
leaq 0x1c(%rdi), %r15
xorl %ebp, %ebp
leaq (,%rbp,8), %rax
addq %rbp, %rax
leaq (%rax,%rax,2), %rbx
addq %rbp, %rbx
movl 0x8(%rdi,%rbx), %eax
subl 0x4(%rdi,%rbx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x40(%rsp), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
subsd 0x1b3c56(%rip), %xmm0   # 0x225268
cvttsd2si %xmm0, %rsi
sarq $0x3f, %rdx
andq %rdx, %rsi
orq %rcx, %rsi
movq 0x48(%rsp), %rcx
cmpq %rcx, %rsi
cmovbeq %rcx, %rsi
cmpq %rax, %rsi
ja 0x716ab
leaq 0x1(%rbp), %r14
cmpq %r13, %r14
jge 0x716ab
addq 0x18(%rsp), %rbx
movq %r15, %r12
movl 0x4(%r12), %eax
cmpl 0x8(%rbx), %eax
jae 0x716ab
movq %rbx, %rdi
movq %r12, %rsi
movsd 0x40(%rsp), %xmm0
movq 0x48(%rsp), %rdx
movsd 0x58(%rsp), %xmm1
callq 0x713a9
ucomisd 0x1b3ea7(%rip), %xmm0   # 0x225518
jb 0x7169f
movl 0x18(%rbx), %eax
leal 0x1(%rax), %ecx
movl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
andl %edx, %ecx
movl $0xc0000000, %esi       # imm = 0xC0000000
andl %esi, %eax
orl %ecx, %eax
movl %eax, 0x18(%rbx)
movl 0x18(%r12), %eax
leal 0x1(%rax), %ecx
andl %edx, %ecx
andl %esi, %eax
orl %ecx, %eax
movl %eax, 0x18(%r12)
incq %r14
addq $0x1c, %r12
cmpq %r13, %r14
jl 0x71643
incq %rbp
addq $0x1c, %r15
cmpq %r13, %rbp
movq 0x18(%rsp), %rdi
jne 0x715da
testq %r13, %r13
jle 0x71712
leaq 0x18(%rdi), %rax
xorl %r10d, %r10d
movq 0x10(%rsp), %r9
testl $0x3fffffff, (%rax)     # imm = 0x3FFFFFFF
je 0x71707
leaq -0x18(%rax), %rcx
movq $-0x1, -0x8(%rax)
leaq (%r10,%r10,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %r10, %rdx
incq %r10
movupd (%rcx), %xmm0
movupd 0xc(%rcx), %xmm1
movupd %xmm1, 0xc(%rdi,%rdx)
movupd %xmm0, (%rdi,%rdx)
addq $0x1c, %rax
decq %r13
jne 0x716d1
jmp 0x7171a
xorl %r10d, %r10d
movq 0x10(%rsp), %r9
testq %r10, %r10
je 0x71a83
movq 0xa0(%rsp), %rbx
movq $0x0, (%rbx)
movq %r10, 0x20(%rsp)
jle 0x71a8a
xorl %r12d, %r12d
movsd 0x1b3b20(%rip), %xmm1   # 0x225268
movq $0x0, 0x8(%rsp)
movq $0x0, 0x38(%rsp)
leaq (%r12,%r12,8), %rax
leaq (%rax,%rax,2), %rax
addq %r12, %rax
movl 0x18(%rdi,%rax), %ecx
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
cmpq %r9, %rcx
jb 0x71a75
addq %rdi, %rax
cmpl $-0x1, 0x10(%rax)
jne 0x71a75
movq $0x0, (%rbx)
cmpq $0x0, 0x8(%rbx)
jne 0x717c4
movq $0x2, 0x8(%rbx)
movq 0x10(%rbx), %rdi
movl $0x10, %esi
callq 0x2370
movsd 0x1b3ab7(%rip), %xmm1   # 0x225268
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
movq 0x18(%rsp), %rdi
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movq %r12, (%rcx,%rax,8)
movq $0x0, 0x28(%rsp)
movq 0xa0(%rsp), %rbx
movq (%rbx), %rax
decq %rax
cmpq $-0x1, %rax
je 0x71a3f
movq 0x10(%rbx), %rcx
movq %rax, (%rbx)
movq (%rcx,%rax,8), %r13
leaq (,%r13,8), %rcx
addq %r13, %rcx
leaq (%rcx,%rcx,2), %rbp
addq %r13, %rbp
movl 0x8(%rdi,%rbp), %ecx
subl 0x4(%rdi,%rbp), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
mulsd 0x40(%rsp), %xmm0
cvttsd2si %xmm0, %rdx
movq %rdx, %rsi
sarq $0x3f, %rsi
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %r8
andq %rsi, %r8
orq %rdx, %r8
movq 0x48(%rsp), %rdx
cmpq %rdx, %r8
cmovbeq %rdx, %r8
decq %rax
cmpq %rcx, %r8
ja 0x717ed
addq %rdi, %rbp
movl 0xc(%rbp), %ecx
movq 0x30(%rsp), %rax
movq (%rax,%rcx,8), %rax
cmpq $0x2, %rax
jae 0x71dd6
cmpl $-0x1, 0x10(%rbp)
setne %dl
testq %rax, %rax
setne %al
orb %dl, %al
jne 0x718be
movq 0x8(%rsp), %rdx
movl %edx, 0x10(%rbp)
movq 0x30(%rsp), %rdx
movq $0x1, (%rdx,%rcx,8)
movq 0x50(%rsp), %rdx
movq 0x28(%rsp), %rsi
movq %rcx, (%rdx,%rsi,8)
incq %rsi
movq %rsi, 0x28(%rsp)
cmpq 0x60(%rsp), %rsi
ja 0x71df5
incq 0x38(%rsp)
testb %al, %al
je 0x718d0
movl 0x10(%rbp), %eax
cmpq %rax, 0x8(%rsp)
jne 0x717df
movq %rdi, %rbx
xorl %r15d, %r15d
movl 0x4(%rbx), %eax
cmpl 0x8(%rbp), %eax
jae 0x717df
movl 0x18(%rbx), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
cmpq %r9, %rax
jb 0x71a2a
movl 0x10(%rbx), %r14d
cmpl $-0x1, %r14d
setne %al
cmpq %r15, %r13
sete %cl
orb %al, %cl
jne 0x71a2a
movq %rbp, %rdi
movq %rbx, %rsi
movsd 0x40(%rsp), %xmm0
movq 0x48(%rsp), %rdx
movsd 0x58(%rsp), %xmm1
callq 0x713a9
ucomisd 0x1b3be8(%rip), %xmm0   # 0x225518
jae 0x7194e
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %r9
movq 0x20(%rsp), %r10
movsd 0x1b391f(%rip), %xmm1   # 0x225268
jmp 0x71a2a
movl 0xc(%rbx), %ecx
movq 0x30(%rsp), %rax
movq (%rax,%rcx,8), %rax
cmpq $0x2, %rax
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %r10
movsd 0x1b38f8(%rip), %xmm1   # 0x225268
jae 0x71dd6
cmpl $-0x1, %r14d
setne %dl
testq %rax, %rax
setne %al
orb %dl, %al
movq 0x10(%rsp), %r9
jne 0x719c7
movq 0x8(%rsp), %rdx
movl %edx, 0x10(%rbx)
movq 0x30(%rsp), %rdx
movq $0x1, (%rdx,%rcx,8)
movq 0x50(%rsp), %rdx
movq 0x28(%rsp), %rsi
movq %rcx, (%rdx,%rsi,8)
incq %rsi
movq %rsi, 0x28(%rsp)
cmpq 0x60(%rsp), %rsi
ja 0x71df5
incq 0x38(%rsp)
testb %al, %al
jne 0x71a2a
movq 0xa0(%rsp), %r14
movq 0x8(%r14), %rax
cmpq %rax, (%r14)
jne 0x71a18
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x8(%r14)
movq 0x10(%r14), %rdi
shlq $0x3, %rsi
callq 0x2370
movsd 0x1b3863(%rip), %xmm1   # 0x225268
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
movq 0x18(%rsp), %rdi
movq %rax, 0x10(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
movq %r15, (%rcx,%rax,8)
incq %r15
addq $0x1c, %rbx
cmpq %r15, %r10
jne 0x718d6
jmp 0x717df
movq 0x28(%rsp), %rdx
testq %rdx, %rdx
je 0x71a70
shlq $0x3, %rdx
movq 0x50(%rsp), %rdi
xorl %esi, %esi
callq 0x20e0
movsd 0x1b3807(%rip), %xmm1   # 0x225268
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
movq 0x18(%rsp), %rdi
incq 0x8(%rsp)
incq %r12
cmpq %r10, %r12
jne 0x7175a
jmp 0x71a9c
xorl %eax, %eax
jmp 0x71dc7
movq $0x0, 0x38(%rsp)
movq $0x0, 0x8(%rsp)
xorl %eax, %eax
cmpq $0x0, 0x8(%rsp)
je 0x71dc7
movq 0x38(%rsp), %r14
testq %r14, %r14
jle 0x71dc7
cmpq %r10, %r14
jge 0x71dae
movq 0x8(%rsp), %rax
addq %r10, %rax
movq %rax, (%rbx)
cmpq %rax, 0x8(%rbx)
jae 0x71b23
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, 0x8(%rbx)
movq 0x10(%rbx), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq %rax, 0x10(%rbx)
movabsq $-0x100000000, %r14     # imm = 0xFFFFFFFF00000000
movq (%rbx), %rdx
movq 0x10(%rbx), %rdi
shlq $0x3, %rdx
movl $0xff, %esi
callq 0x20e0
movq 0x10(%rbx), %r12
movq 0x8(%rsp), %rax
leaq (%r12,%rax,8), %rbp
movq 0x20(%rsp), %r10
testq %r10, %r10
movq 0x18(%rsp), %rdi
jle 0x71bc1
leaq 0x10(%rdi), %rax
xorl %ecx, %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movabsq $0x100000000, %rsi      # imm = 0x100000000
xorl %r11d, %r11d
movl (%rax), %r8d
cmpq %rdx, %r8
je 0x71bb2
movq (%r12,%r8,8), %r10
movq %rcx, %r9
cmpq $-0x1, %r10
je 0x71ba6
movl %r10d, %r9d
cmpq $-0x1, (%rbp,%r9,8)
jne 0x71e14
movq %r11, (%rbp,%r9,8)
movq (%r12,%r8,8), %r9
andq %r14, %r9
orq %r11, %r9
movq %r9, (%r12,%r8,8)
movq 0x20(%rsp), %r10
incq %r11
addq $0x1c, %rax
addq %rsi, %rcx
cmpq %r11, %r10
jne 0x71b76
testq %r10, %r10
movq 0x10(%rsp), %r8
jle 0x71dab
xorl %ebx, %ebx
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %r14d, %r14d
movq %r12, 0x30(%rsp)
leaq (%rbx,%rbx,8), %rax
leaq (%rax,%rax,2), %r13
addq %rbx, %r13
cmpl $-0x1, 0x10(%rdi,%r13)
je 0x71bfa
incq %r14
jmp 0x71d9d
addq %rdi, %r13
movl 0x8(%r13), %r15d
movl %r15d, %eax
subl 0x4(%r13), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x40(%rsp), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
subsd 0x1b3642(%rip), %xmm0   # 0x225268
cvttsd2si %xmm0, %rsi
sarq $0x3f, %rdx
andq %rdx, %rsi
orq %rcx, %rsi
movq 0x48(%rsp), %rcx
cmpq %rcx, %rsi
cmovbeq %rcx, %rsi
cmpq %rax, %rsi
ja 0x71d9d
movq %r14, 0x38(%rsp)
movq $-0x1, 0x8(%rsp)
movsd 0x1b38d8(%rip), %xmm0   # 0x225538
movsd %xmm0, 0x28(%rsp)
xorl %r12d, %r12d
leaq (%r12,%r12,8), %rax
leaq (%rax,%rax,2), %rsi
addq %r12, %rsi
cmpl %r15d, 0x4(%rdi,%rsi)
jae 0x71d50
addq %rdi, %rsi
movl 0x18(%rsi), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
cmpq %r8, %rax
jb 0x71d44
movl 0x10(%rsi), %r14d
cmpq %r9, %r14
sete %al
cmpq %rbx, %r12
sete %cl
orb %al, %cl
jne 0x71d44
movq %r13, %rdi
movsd 0x40(%rsp), %xmm0
movq 0x48(%rsp), %rdx
movsd 0x58(%rsp), %xmm1
callq 0x713a9
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x71d2f
ucomisd 0x28(%rsp), %xmm0
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %r10
jbe 0x71d28
movl 0xc(%r13), %eax
movq 0x30(%rsp), %rcx
movl 0x4(%rcx,%r14,8), %ecx
movq 0x10(%rsp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
movl 0xc(%rdi,%rdx), %edx
cmpl %eax, %edx
je 0x71d44
movq (%rbp,%rcx,8), %rcx
cmpq $-0x1, %rcx
jne 0x71cf9
cmpl %eax, %edx
je 0x71d44
movq %r14, 0x8(%rsp)
movsd %xmm0, 0x28(%rsp)
jmp 0x71d44
movq 0x10(%rsp), %r8
jmp 0x71d3e
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %r8
movq 0x20(%rsp), %r10
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
incq %r12
cmpq %r10, %r12
jne 0x71c69
movq 0x8(%rsp), %rcx
cmpq $-0x1, %rcx
movq 0x38(%rsp), %r14
je 0x71d9d
movl %ecx, 0x10(%r13)
movl %ecx, %eax
movq 0x30(%rsp), %r12
movl (%r12,%rax,8), %eax
cmpq $-0x1, (%rbp,%rax,8)
jne 0x71e33
incq %r14
movq %rbx, (%rbp,%rax,8)
movl %ecx, %eax
movq (%r12,%rax,8), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
andq %rdx, %rcx
orq %rbx, %rcx
movq %rcx, (%r12,%rax,8)
incq %rbx
cmpq %r10, %rbx
jne 0x71bdf
jmp 0x71dae
xorl %r14d, %r14d
leaq (%r10,%r10,8), %rax
leaq (%rax,%rax,2), %rax
addq %rdi, %r10
addq %rax, %r10
movq %r10, %rsi
callq 0x47f77
movq %r14, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b7ce1(%rip), %rdi    # 0x229abe
leaq 0x1b385f(%rip), %rsi    # 0x225643
leaq 0x1b7ce2(%rip), %rcx    # 0x229acd
movl $0x4d32, %edx           # imm = 0x4D32
callq 0x2110
leaq 0x1b7d43(%rip), %rdi    # 0x229b3f
leaq 0x1b3840(%rip), %rsi    # 0x225643
leaq 0x1b7cc3(%rip), %rcx    # 0x229acd
movl $0x4d3b, %edx           # imm = 0x4D3B
callq 0x2110
leaq 0x1b6419(%rip), %rdi    # 0x228234
leaq 0x1b3821(%rip), %rsi    # 0x225643
leaq 0x1b6439(%rip), %rcx    # 0x228262
movl $0x4da0, %edx           # imm = 0x4DA0
callq 0x2110
leaq 0x1b63fa(%rip), %rdi    # 0x228234
leaq 0x1b3802(%rip), %rsi    # 0x225643
leaq 0x1b641a(%rip), %rcx    # 0x228262
movl $0x4dbd, %edx           # imm = 0x4DBD
callq 0x2110