// File: chhylp123[P]hifiasm/Correct.cpp
// Function: mask_ovlps(ul_idx_t const*, ug_opt_t const*, ma_ug_t*, overlap_region_alloc*, mask_ul_ov_t*, kv_ul_ov_t*, asg64_v*, asg64_v*, idx_emask_t*, double, unsigned long, long)
uint64_t mask_ovlps(const ul_idx_t *uref, const ug_opt_t *uopt, ma_ug_t *ug, overlap_region_alloc* ol, mask_ul_ov_t *mk, kv_ul_ov_t *ov_db, asg64_v *coor_srt, asg64_v* buf1, idx_emask_t *mm, double len_diff, uint64_t rlen, int64_t bd)
{
    mk->srt.n = mk->idx.n = 0;
    int64_t k, m, i, osrt_n, osrt_n1, on = ol->length; uint64_t wt, w[2], is_exact, sid, tot, tol, qi, ti; 
    overlap_region *z; ul_ov_t ou; kv_ul_ov_t *osrt = &(mk->srt); ul_ov_t p, q;
    for (k = osrt->n = 0; k < on; k++) {
        z = &(ol->list[k]); if(!(z->x_pos_strand)) continue;///x_pos_strand: how many masks
        if(gen_aln_ul_ov_t(k, ug->g->seq[z->y_id].len, z, &ou)) {
            kv_push(ul_ov_t, *osrt, ou);
        }
    }
    if(!(osrt->n)) return 0;

    osrt_n = osrt->n; memset(&ou, 0, sizeof(ou));
    radix_sort_uov_srt_qs(osrt->a, osrt->a+osrt->n); ///sort by qs; for quick filtering between overlaps
    for (k = tot = tol = 0; k < osrt_n; k++) {
        tol += osrt->a[k].qe-osrt->a[k].qs; 
        convert_ul_ov_t(&p, &(ol->list[osrt->a[k].qn]), ug); p.qn = osrt->a[k].qn;
        for (i = k+1; i < osrt_n && osrt->a[i].qs < osrt->a[k].qe; i++) {
            ///for a pair of overlap, only need to calculate it in one side
            if(ol->list[osrt->a[i].qn].y_id >= ol->list[osrt->a[k].qn].y_id) continue;
            is_exact = 0; sid = (uint32_t)-1;
            convert_ul_ov_t(&q, &(ol->list[osrt->a[i].qn]), ug); q.qn = osrt->a[i].qn;
            if(if_direct_mask(uref, uopt, &p, &q, 16, len_diff)) is_exact = 1;
            if((!is_exact) && (!check_mask_exist(ug, &(ol->list[osrt->a[i].qn]), &(ol->list[osrt->a[k].qn]), ov_db, mm, len_diff, &is_exact, &sid))) {
                continue;
            }
            
            if(is_exact) {///if two overlaps are exactly the same; no need to do anything
                ou.qs = 0; ou.qe = sid; ou.ts = ou.te = 0; ou.el = 1;
            } else {
                w[0] = ol->list[osrt->a[k].qn].non_homopolymer_errors;
                w[1] = ol->list[osrt->a[i].qn].non_homopolymer_errors;
                wt = w[0] + w[1] + ((w[0]>=w[1])?(w[0]-w[1]):(w[1]-w[0]));
                if(wt > (uint32_t)-1) wt = (uint32_t)-1;
                //qs: weight; qe: idx with in ov_db; el: exact match?
                ou.qs = wt; ou.qe = sid; ou.el = 0;
                ou.ts = osrt->a[i].qe-osrt->a[i].qs;
                ou.te = osrt->a[k].qe-osrt->a[k].qs;
            }
            ou.qn = osrt->a[i].qn; ou.tn = osrt->a[k].qn;///id of the ol->list, instead of real yid
            tot += ou.ts + ou.te;
            kv_push(ul_ov_t, *osrt, ou);
        }
        for (i = k-1; i >= 0; i--) {
            ///for a pair of overlap, only need to calculate it in one side
            if(ol->list[osrt->a[i].qn].y_id >= ol->list[osrt->a[k].qn].y_id) continue;
            is_exact = 0; sid = (uint32_t)-1;
            convert_ul_ov_t(&q, &(ol->list[osrt->a[i].qn]), ug); q.qn = osrt->a[i].qn;
            if(if_direct_mask(uref, uopt, &p, &q, 16, len_diff)) is_exact = 1;
            if((!is_exact) && (!check_mask_exist(ug, &(ol->list[osrt->a[i].qn]), &(ol->list[osrt->a[k].qn]), ov_db, mm, len_diff, &is_exact, &sid))) {
                continue;
            }
            
            if(is_exact) {
                ou.qs = 0; ou.qe = sid; ou.ts = ou.te = 0; ou.el = 1;
            } else {
                w[0] = ol->list[osrt->a[k].qn].non_homopolymer_errors;
                w[1] = ol->list[osrt->a[i].qn].non_homopolymer_errors;
                wt = w[0] + w[1] + ((w[0]>=w[1])?(w[0]-w[1]):(w[1]-w[0]));
                if(wt > (uint32_t)-1) wt = (uint32_t)-1;
                ou.qs = wt; ou.qe = sid; ou.el = 0;
                ou.ts = osrt->a[i].qe-osrt->a[i].qs;
                ou.te = osrt->a[k].qe-osrt->a[k].qs;
            }
            ou.qn = osrt->a[i].qn; ou.tn = osrt->a[k].qn;///id of the ol->list, instead of real yid
            tot += ou.ts + ou.te;
            kv_push(ul_ov_t, *osrt, ou);
        }
    }

    // fprintf(stderr, "0[M::%s]\tosrt_n::%u\tosrt->n::%u\n", __func__, (uint32_t)osrt_n, (uint32_t)osrt->n);

    if((tot > (rlen*256)) && (tot > (tol*32))) {
        tot = MAX((rlen*256), (tol*32)); osrt_n1 = osrt->n;
        radix_sort_uov_srt_qs(osrt->a+osrt_n, osrt->a+osrt->n); ///sort by weight (qs)
        for (k = osrt_n, wt = 0; k < osrt_n1 && wt <= tot; k++) {
            if(osrt->a[k].el) continue;///exact match, no additional work
            wt += (uint64_t)osrt->a[k].ts + (uint64_t)osrt->a[k].te;
        }
        osrt->n = k;
    }

    memset(&ou, 0, sizeof(ou)); osrt_n1 = osrt->n;
    ///note: osrt will be updated here, so do not use the address within osrt
    for (k = osrt_n, m = 0; k < osrt_n1; k++) {
        qi = osrt->a[k].qn; ti = osrt->a[k].tn; ///represent a pair of read ol->list[qi] <-> ol->list[ti]
        sid = osrt->a[k].qe; wt = 1;
        ///p->qn/p->tn:: id within the ol->list
        ///p->el:: if equally best
        ///p->qs:: err(query)-err(target)
        ///p->ts:: err(target)-err(query)
        if(osrt->a[k].el) {///exact match; no need base-check
            ou.qn = qi; ou.tn = ti; ou.el = 1; ou.qs = ou.ts = 0;
        } else {///do base-check
            wt = gen_mask_ovlp0(ug, ol->list, qi, ti, ov_db, osrt, mm, len_diff, rlen, sid, coor_srt, buf1, bd, &(ou));
        }
        if(wt) {
            osrt->a[m++] = ou;
            // fprintf(stderr, "[M::%s]\tutg%.6u%c\tqerr::%u\t\tutg%.6u%c\tterr::%u\tel::%u\n", 
            // __func__, ol->list[ou.qn].y_id+1, "lc"[ug->u.a[ol->list[ou.qn].y_id].circ], ou.qs, 
            // ol->list[ou.tn].y_id+1, "lc"[ug->u.a[ol->list[ou.tn].y_id].circ], ou.ts, ou.el);
        }
    }
    osrt->n = m;
    if(!(osrt->n)) return 0;

    ///double
    ///p->qn/p->tn:: id within the ol->list
    ///p->el:: if equally best
    ///p->qs:: err(query)-err(target)
    ///p->ts:: err(target)-err(query)
    kv_resize(ul_ov_t, *osrt, (osrt->n<<1)); 
    memcpy(osrt->a+osrt->n, osrt->a, (sizeof((*(osrt->a)))*osrt->n));
    osrt_n = osrt->n; osrt->n <<= 1; osrt_n1 = osrt->n;
    for (k = osrt_n; k < osrt_n1; k++) {
        m = osrt->a[k].qn; osrt->a[k].qn = osrt->a[k].tn; osrt->a[k].tn = m;
        m = osrt->a[k].qs; osrt->a[k].qs = osrt->a[k].ts; osrt->a[k].ts = m;
    }

    ///osrt = &(mk->srt);
    radix_sort_ul_ov_srt_qn1(osrt->a, osrt->a+osrt->n);
    kv_resize(uint64_t, mk->idx, ol->length); mk->idx.n = ol->length;
    memset(mk->idx.a, 0, sizeof((*(mk->idx.a)))*ol->length);
    for (k = 1, i = 0; k <= osrt_n1; k++) {
        if(k == osrt_n1 || osrt->a[i].qn != osrt->a[k].qn) {
            if(k - i > 1) radix_sort_ul_ov_srt_tn1(osrt->a+i, osrt->a+k);
            mk->idx.a[osrt->a[i].qn] = (((uint64_t)i)<<32)|((uint64_t)k);
            i = k;
        }
    }

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdx, -0x40(%rbp)
movq %rcx, -0x48(%rbp)
movq %r8, -0x50(%rbp)
movq %r9, -0x58(%rbp)
movsd %xmm0, -0x60(%rbp)
movq -0x50(%rbp), %rax
movq $0x0, (%rax)
movq -0x50(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x50(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movq $0x0, 0x8(%rax)
movq $0x0, -0x68(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x90(%rbp), %rax
jge 0x8259a
movq -0x48(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x68(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x8246b
jmp 0x82589
movq -0x68(%rbp), %rdi
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq -0xe8(%rbp), %rcx
movl 0x10(%rcx), %ecx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %esi
movq -0xe8(%rbp), %rdx
leaq -0x104(%rbp), %rcx
callq 0x7ab40
cmpq $0x0, %rax
je 0x82587
jmp 0x824b0
movq -0x110(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x110(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x82535
movq -0x110(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x824ed
movq -0x110(%rbp), %rax
movq 0x10(%rax), %rax
shlq %rax
movq %rax, -0x150(%rbp)
jmp 0x824fb
movl $0x2, %eax
movq %rax, -0x150(%rbp)
jmp 0x824fb
movq -0x150(%rbp), %rcx
movq -0x110(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x110(%rbp), %rax
movq (%rax), %rdi
movq -0x110(%rbp), %rax
imulq $0x1c, 0x10(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x110(%rbp), %rax
movq %rcx, (%rax)
movq -0x110(%rbp), %rax
movq (%rax), %rax
movq -0x110(%rbp), %rdx
movq 0x8(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x8(%rdx)
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq -0x104(%rbp), %rcx
movq %rcx, (%rax)
movq -0xfc(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xf4(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0xec(%rbp), %ecx
movl %ecx, 0x18(%rax)
jmp 0x82587
jmp 0x82589
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x8242f
movq -0x110(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x825b5
movq $0x0, -0x28(%rbp)
jmp 0x83841
movq -0x110(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x80(%rbp)
leaq -0x104(%rbp), %rdi
xorl %esi, %esi
movl $0x1c, %edx
callq 0x2100
movq -0x110(%rbp), %rax
movq (%rax), %rdi
movq -0x110(%rbp), %rax
movq (%rax), %rsi
movq -0x110(%rbp), %rax
imulq $0x1c, 0x8(%rax), %rax
addq %rax, %rsi
callq 0x2f8f0
movq $0x0, -0xd0(%rbp)
movq $0x0, -0xc8(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x80(%rbp), %rax
jge 0x83022
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x110(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x68(%rbp), %rdx
addq %rdx, %rcx
subl 0x4(%rcx), %eax
movl %eax, %eax
addq -0xd0(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rsi
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
imulq $0xa8, %rax, %rax
addq %rax, %rsi
movq -0x40(%rbp), %rdx
leaq -0x12c(%rbp), %rdi
callq 0x720e0
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x12c(%rbp)
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rcx
xorl %eax, %eax
cmpq -0x80(%rbp), %rcx
movb %al, -0x151(%rbp)
jge 0x82705
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x78(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x110(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x68(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
setb %al
movb %al, -0x151(%rbp)
movb -0x151(%rbp), %al
testb $0x1, %al
jne 0x82714
jmp 0x82b86
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq -0x110(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x78(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movq -0x48(%rbp), %rcx
movq (%rcx), %rcx
movq -0x110(%rbp), %rdx
movq (%rdx), %rdx
imulq $0x1c, -0x68(%rbp), %rsi
addq %rsi, %rdx
movl (%rdx), %edx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x10(%rcx), %eax
jb 0x8276b
jmp 0x82b75
movq $0x0, -0xb8(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0xc0(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rsi
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x78(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
imulq $0xa8, %rax, %rax
addq %rax, %rsi
movq -0x40(%rbp), %rdx
leaq -0x148(%rbp), %rdi
callq 0x720e0
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x78(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x148(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movsd -0x60(%rbp), %xmm0
leaq -0x12c(%rbp), %rdx
leaq -0x148(%rbp), %rcx
movl $0x10, %r8d
callq 0x821c0
cmpq $0x0, %rax
je 0x82808
movq $0x1, -0xb8(%rbp)
cmpq $0x0, -0xb8(%rbp)
jne 0x8288f
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rax
movq (%rax), %rsi
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x78(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
imulq $0xa8, %rax, %rax
addq %rax, %rsi
movq -0x48(%rbp), %rax
movq (%rax), %rdx
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
imulq $0xa8, %rax, %rax
addq %rax, %rdx
movq -0x58(%rbp), %rcx
movq 0x20(%rbp), %r8
movsd -0x60(%rbp), %xmm0
leaq -0xb8(%rbp), %r9
leaq -0xc0(%rbp), %rax
movq %rax, (%rsp)
callq 0x7c7b0
cmpq $0x0, %rax
jne 0x8288f
jmp 0x82b75
cmpq $0x0, -0xb8(%rbp)
je 0x828df
movl $0x0, -0x100(%rbp)
movq -0xc0(%rbp), %rax
movl %eax, -0xfc(%rbp)
movl $0x0, -0xf0(%rbp)
movl $0x0, -0xf4(%rbp)
movl -0xec(%rbp), %eax
andl $0xbfffffff, %eax       # imm = 0xBFFFFFFF
orl $0x40000000, %eax       # imm = 0x40000000
movl %eax, -0xec(%rbp)
jmp 0x82a4e
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq -0x110(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x68(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movl 0x30(%rax), %eax
movq %rax, -0xb0(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq -0x110(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x78(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movl 0x30(%rax), %eax
movq %rax, -0xa8(%rbp)
movq -0xb0(%rbp), %rax
addq -0xa8(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0xb0(%rbp), %rax
cmpq -0xa8(%rbp), %rax
jb 0x82979
movq -0xb0(%rbp), %rax
subq -0xa8(%rbp), %rax
movq %rax, -0x168(%rbp)
jmp 0x8298e
movq -0xa8(%rbp), %rax
subq -0xb0(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x160(%rbp), %rax
movq -0x168(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x98(%rbp)
jbe 0x829c0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movl %eax, -0x100(%rbp)
movq -0xc0(%rbp), %rax
movl %eax, -0xfc(%rbp)
movl -0xec(%rbp), %eax
andl $0xbfffffff, %eax       # imm = 0xBFFFFFFF
orl $0x0, %eax
movl %eax, -0xec(%rbp)
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x78(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x110(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x78(%rbp), %rdx
addq %rdx, %rcx
subl 0x4(%rcx), %eax
movl %eax, -0xf4(%rbp)
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x110(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x68(%rbp), %rdx
addq %rdx, %rcx
subl 0x4(%rcx), %eax
movl %eax, -0xf0(%rbp)
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x78(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x104(%rbp)
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0xf8(%rbp)
movl -0xf4(%rbp), %eax
addl -0xf0(%rbp), %eax
movl %eax, %eax
addq -0xc8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x110(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x110(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x82b23
movq -0x110(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x82adb
movq -0x110(%rbp), %rax
movq 0x10(%rax), %rax
shlq %rax
movq %rax, -0x170(%rbp)
jmp 0x82ae9
movl $0x2, %eax
movq %rax, -0x170(%rbp)
jmp 0x82ae9
movq -0x170(%rbp), %rcx
movq -0x110(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x110(%rbp), %rax
movq (%rax), %rdi
movq -0x110(%rbp), %rax
imulq $0x1c, 0x10(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x110(%rbp), %rax
movq %rcx, (%rax)
movq -0x110(%rbp), %rax
movq (%rax), %rax
movq -0x110(%rbp), %rdx
movq 0x8(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x8(%rdx)
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq -0x104(%rbp), %rcx
movq %rcx, (%rax)
movq -0xfc(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xf4(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0xec(%rbp), %ecx
movl %ecx, 0x18(%rax)
jmp 0x82b75
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x826c0
movq -0x68(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x78(%rbp)
jl 0x8300f
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq -0x110(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x78(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movq -0x48(%rbp), %rcx
movq (%rcx), %rcx
movq -0x110(%rbp), %rdx
movq (%rdx), %rdx
imulq $0x1c, -0x68(%rbp), %rsi
addq %rsi, %rdx
movl (%rdx), %edx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x10(%rcx), %eax
jb 0x82bf4
jmp 0x82ffe
movq $0x0, -0xb8(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0xc0(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rsi
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x78(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
imulq $0xa8, %rax, %rax
addq %rax, %rsi
movq -0x40(%rbp), %rdx
leaq -0x148(%rbp), %rdi
callq 0x720e0
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x78(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x148(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movsd -0x60(%rbp), %xmm0
leaq -0x12c(%rbp), %rdx
leaq -0x148(%rbp), %rcx
movl $0x10, %r8d
callq 0x821c0
cmpq $0x0, %rax
je 0x82c91
movq $0x1, -0xb8(%rbp)
cmpq $0x0, -0xb8(%rbp)
jne 0x82d18
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rax
movq (%rax), %rsi
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x78(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
imulq $0xa8, %rax, %rax
addq %rax, %rsi
movq -0x48(%rbp), %rax
movq (%rax), %rdx
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
imulq $0xa8, %rax, %rax
addq %rax, %rdx
movq -0x58(%rbp), %rcx
movq 0x20(%rbp), %r8
movsd -0x60(%rbp), %xmm0
leaq -0xb8(%rbp), %r9
leaq -0xc0(%rbp), %rax
movq %rax, (%rsp)
callq 0x7c7b0
cmpq $0x0, %rax
jne 0x82d18
jmp 0x82ffe
cmpq $0x0, -0xb8(%rbp)
je 0x82d68
movl $0x0, -0x100(%rbp)
movq -0xc0(%rbp), %rax
movl %eax, -0xfc(%rbp)
movl $0x0, -0xf0(%rbp)
movl $0x0, -0xf4(%rbp)
movl -0xec(%rbp), %eax
andl $0xbfffffff, %eax       # imm = 0xBFFFFFFF
orl $0x40000000, %eax       # imm = 0x40000000
movl %eax, -0xec(%rbp)
jmp 0x82ed7
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq -0x110(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x68(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movl 0x30(%rax), %eax
movq %rax, -0xb0(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq -0x110(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x78(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movl 0x30(%rax), %eax
movq %rax, -0xa8(%rbp)
movq -0xb0(%rbp), %rax
addq -0xa8(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0xb0(%rbp), %rax
cmpq -0xa8(%rbp), %rax
jb 0x82e02
movq -0xb0(%rbp), %rax
subq -0xa8(%rbp), %rax
movq %rax, -0x180(%rbp)
jmp 0x82e17
movq -0xa8(%rbp), %rax
subq -0xb0(%rbp), %rax
movq %rax, -0x180(%rbp)
movq -0x178(%rbp), %rax
movq -0x180(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x98(%rbp)
jbe 0x82e49
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movl %eax, -0x100(%rbp)
movq -0xc0(%rbp), %rax
movl %eax, -0xfc(%rbp)
movl -0xec(%rbp), %eax
andl $0xbfffffff, %eax       # imm = 0xBFFFFFFF
orl $0x0, %eax
movl %eax, -0xec(%rbp)
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x78(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x110(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x78(%rbp), %rdx
addq %rdx, %rcx
subl 0x4(%rcx), %eax
movl %eax, -0xf4(%rbp)
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x110(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x68(%rbp), %rdx
addq %rdx, %rcx
subl 0x4(%rcx), %eax
movl %eax, -0xf0(%rbp)
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x78(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x104(%rbp)
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0xf8(%rbp)
movl -0xf4(%rbp), %eax
addl -0xf0(%rbp), %eax
movl %eax, %eax
addq -0xc8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x110(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x110(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x82fac
movq -0x110(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x82f64
movq -0x110(%rbp), %rax
movq 0x10(%rax), %rax
shlq %rax
movq %rax, -0x188(%rbp)
jmp 0x82f72
movl $0x2, %eax
movq %rax, -0x188(%rbp)
jmp 0x82f72
movq -0x188(%rbp), %rcx
movq -0x110(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x110(%rbp), %rax
movq (%rax), %rdi
movq -0x110(%rbp), %rax
imulq $0x1c, 0x10(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x110(%rbp), %rax
movq %rcx, (%rax)
movq -0x110(%rbp), %rax
movq (%rax), %rax
movq -0x110(%rbp), %rdx
movq 0x8(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x8(%rdx)
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq -0x104(%rbp), %rcx
movq %rcx, (%rax)
movq -0xfc(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xf4(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0xec(%rbp), %ecx
movl %ecx, 0x18(%rax)
jmp 0x82ffe
movq -0x78(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x82b92
jmp 0x83011
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x8261d
movq -0xc8(%rbp), %rax
movq 0x28(%rbp), %rcx
shlq $0x8, %rcx
cmpq %rcx, %rax
jbe 0x831a8
movq -0xc8(%rbp), %rax
movq -0xd0(%rbp), %rcx
shlq $0x5, %rcx
cmpq %rcx, %rax
jbe 0x831a8
movq 0x28(%rbp), %rax
shlq $0x8, %rax
movq -0xd0(%rbp), %rcx
shlq $0x5, %rcx
cmpq %rcx, %rax
jb 0x8307e
movq 0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x190(%rbp)
jmp 0x83090
movq -0xd0(%rbp), %rax
shlq $0x5, %rax
movq %rax, -0x190(%rbp)
movq -0x190(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x110(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x110(%rbp), %rax
movq (%rax), %rdi
imulq $0x1c, -0x80(%rbp), %rax
addq %rax, %rdi
movq -0x110(%rbp), %rax
movq (%rax), %rsi
movq -0x110(%rbp), %rax
imulq $0x1c, 0x8(%rax), %rax
addq %rax, %rsi
callq 0x2f8f0
movq -0x80(%rbp), %rax
movq %rax, -0x68(%rbp)
movq $0x0, -0x98(%rbp)
movq -0x68(%rbp), %rcx
xorl %eax, %eax
cmpq -0x88(%rbp), %rcx
movb %al, -0x191(%rbp)
jge 0x8311f
movq -0x98(%rbp), %rax
cmpq -0xc8(%rbp), %rax
setbe %al
movb %al, -0x191(%rbp)
movb -0x191(%rbp), %al
testb $0x1, %al
jne 0x8312b
jmp 0x83199
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x8314d
jmp 0x83188
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movq -0x110(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x68(%rbp), %rdx
addq %rdx, %rcx
movl 0x14(%rcx), %ecx
addq %rcx, %rax
addq -0x98(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x830f3
movq -0x68(%rbp), %rcx
movq -0x110(%rbp), %rax
movq %rcx, 0x8(%rax)
leaq -0x104(%rbp), %rdi
xorl %esi, %esi
movl $0x1c, %edx
callq 0x2100
movq -0x110(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x68(%rbp)
movq $0x0, -0x70(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x88(%rbp), %rax
jge 0x83397
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movq %rax, -0xd8(%rbp)
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movq %rax, -0xe0(%rbp)
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq %rax, -0xc0(%rbp)
movq $0x1, -0x98(%rbp)
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x832b2
movq -0xd8(%rbp), %rax
movl %eax, -0x104(%rbp)
movq -0xe0(%rbp), %rax
movl %eax, -0xf8(%rbp)
movl -0xec(%rbp), %eax
andl $0xbfffffff, %eax       # imm = 0xBFFFFFFF
orl $0x40000000, %eax       # imm = 0x40000000
movl %eax, -0xec(%rbp)
movl $0x0, -0xf4(%rbp)
movl $0x0, -0x100(%rbp)
jmp 0x83331
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rax
movq (%rax), %rsi
movq -0xd8(%rbp), %rax
movl %eax, %edx
movq -0xe0(%rbp), %rax
movl %eax, %ecx
movq -0x58(%rbp), %r8
movq -0x110(%rbp), %r9
movq 0x20(%rbp), %r12
movsd -0x60(%rbp), %xmm0
movq 0x28(%rbp), %r15
movq -0xc0(%rbp), %r14
movq 0x10(%rbp), %rbx
movq 0x18(%rbp), %r11
movq 0x30(%rbp), %r10
leaq -0x104(%rbp), %rax
movq %r12, (%rsp)
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movq %r11, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movq %rax, 0x30(%rsp)
callq 0x81c00
movl %eax, %eax
movq %rax, -0x98(%rbp)
cmpq $0x0, -0x98(%rbp)
je 0x83384
movq -0x110(%rbp), %rax
movq (%rax), %rax
movq -0x70(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x70(%rbp)
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq -0x104(%rbp), %rcx
movq %rcx, (%rax)
movq -0xfc(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xf4(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0xec(%rbp), %ecx
movl %ecx, 0x18(%rax)
jmp 0x83386
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x831dd
movq -0x70(%rbp), %rcx
movq -0x110(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x110(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x833c1
movq $0x0, -0x28(%rbp)
jmp 0x83841
jmp 0x833c3
movq -0x110(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x110(%rbp), %rcx
movq 0x8(%rcx), %rcx
shlq %rcx
cmpq %rcx, %rax
jae 0x834e1
movq -0x110(%rbp), %rax
movq 0x8(%rax), %rcx
shlq %rcx
movq -0x110(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x110(%rbp), %rax
movq 0x10(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x110(%rbp), %rax
movq 0x10(%rax), %rcx
shrq %rcx
movq -0x110(%rbp), %rax
orq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x110(%rbp), %rax
movq 0x10(%rax), %rcx
shrq $0x2, %rcx
movq -0x110(%rbp), %rax
orq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x110(%rbp), %rax
movq 0x10(%rax), %rcx
shrq $0x4, %rcx
movq -0x110(%rbp), %rax
orq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x110(%rbp), %rax
movq 0x10(%rax), %rcx
shrq $0x8, %rcx
movq -0x110(%rbp), %rax
orq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x110(%rbp), %rax
movq 0x10(%rax), %rcx
shrq $0x10, %rcx
movq -0x110(%rbp), %rax
orq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x110(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x110(%rbp), %rax
movq (%rax), %rdi
movq -0x110(%rbp), %rax
imulq $0x1c, 0x10(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x110(%rbp), %rax
movq %rcx, (%rax)
jmp 0x834e3
movq -0x110(%rbp), %rax
movq (%rax), %rdi
movq -0x110(%rbp), %rax
imulq $0x1c, 0x8(%rax), %rax
addq %rax, %rdi
movq -0x110(%rbp), %rax
movq (%rax), %rsi
movq -0x110(%rbp), %rax
imulq $0x1c, 0x8(%rax), %rdx
callq 0x2180
movq -0x110(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x110(%rbp), %rax
movq 0x8(%rax), %rcx
shlq %rcx
movq %rcx, 0x8(%rax)
movq -0x110(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x88(%rbp), %rax
jge 0x8362e
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movq %rax, -0x70(%rbp)
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x70(%rbp), %rax
movl %eax, %ecx
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x70(%rbp)
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0x70(%rbp), %rax
movl %eax, %ecx
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x68(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x83552
movq -0x110(%rbp), %rax
movq (%rax), %rdi
movq -0x110(%rbp), %rax
movq (%rax), %rsi
movq -0x110(%rbp), %rax
imulq $0x1c, 0x8(%rax), %rax
addq %rax, %rsi
callq 0x311d0
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x48(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x83737
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rcx
shrq %rcx
movq -0x50(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x2, %rcx
movq -0x50(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x4, %rcx
movq -0x50(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x8, %rcx
movq -0x50(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x10, %rcx
movq -0x50(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x83739
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x50(%rbp), %rax
movq %rcx, (%rax)
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x2100
movq $0x1, -0x68(%rbp)
movq $0x0, -0x78(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x88(%rbp), %rax
jg 0x83839
movq -0x68(%rbp), %rax
cmpq -0x88(%rbp), %rax
je 0x837bb
movq -0x110(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x78(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x110(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x68(%rbp), %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
je 0x83826
movq -0x68(%rbp), %rax
subq -0x78(%rbp), %rax
cmpq $0x1, %rax
jle 0x837f2
movq -0x110(%rbp), %rax
movq (%rax), %rdi
imulq $0x1c, -0x78(%rbp), %rax
addq %rax, %rdi
movq -0x110(%rbp), %rax
movq (%rax), %rsi
imulq $0x1c, -0x68(%rbp), %rax
addq %rax, %rsi
callq 0x30c90
movq -0x78(%rbp), %rdx
shlq $0x20, %rdx
orq -0x68(%rbp), %rdx
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x110(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x78(%rbp), %rsi
addq %rsi, %rcx
movl (%rcx), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x83828
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x83773
movq $0x1, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)