// File: chhylp123[P]hifiasm/Correct.cpp
// Function: ul_lalign(overlap_region_alloc*, Candidates_list*, ul_idx_t const*, ug_opt_t const*, char*, unsigned long, UC_Read*, UC_Read*, Correct_dumy*, bit_extz_t*, haplotype_evdience_alloc*, kvec_t_u64_warp*, overlap_region*, double, long, kv_ul_ov_t*, long, unsigned long, st_mt_t*, idx_emask_t*, mask_ul_ov_t*, void*)
void ul_lalign(overlap_region_alloc* ol, Candidates_list *cl, const ul_idx_t *uref, const ug_opt_t *uopt, 
        char *qstr, uint64_t ql, UC_Read* qu, UC_Read* tu, Correct_dumy* dumy, bit_extz_t *exz, haplotype_evdience_alloc* hap, 
        kvec_t_u64_warp* v_idx, overlap_region *aux_o, double e_rate, int64_t wl, kv_ul_ov_t *aln, int64_t sid, uint64_t khit, 
        st_mt_t *stb, idx_emask_t *mm, mask_ul_ov_t *mk, void *km)
{
    uint64_t i, bs, k, ovl/**, on**/; Window_Pool w; double err; 
    /**int64_t sc;**/ overlap_region t; overlap_region *z; asg64_v iidx, buf, buf1;
    ol->mapped_overlaps_length = 0;
    if(ol->length <= 0) return;

    ///base alignment
    clear_Correct_dumy(dumy, ol, km); err = e_rate; 
    init_Window_Pool(&w, ql, wl, (int)(1.0/err));
    bs = (w.window_length)+(THRESHOLD_MAX_SIZE<<1)+1;
    resize_UC_Read(tu, bs<<1);

    if(!aln) {    
        resize_UC_Read(qu, ql); qu->length = ql; memcpy(qu->seq, qstr, ql);
        for (i = 0; i < ol->length; i++) {
            z = &(ol->list[i]); ovl = z->x_pos_e+1-z->x_pos_s; 
            z->shared_seed = z->non_homopolymer_errors;///for index
            if(!align_ul_ed_post_extz(z, uref, NULL, qu->seq, tu->seq, exz, err, w.window_length, -1, 0, km)) {
                continue;
            }
            if(uref && simi_pass(ovl, z->align_length, uref?1:0, -1, NULL)) {
                z->is_match = 3; ol->mapped_overlaps_length += z->align_length;
            }
        }

        if(uref && ol->mapped_overlaps_length > 0) {
            set_herror_win(ol, dumy, v_idx, err, ql, w.window_length);
        }

        double e_max = err*1.5, rr; int64_t re;
        for (i = k = 0; i < ol->length; i++) {
            z = &(ol->list[i]); ovl = z->x_pos_e + 1 - z->x_pos_s;
            rr = gen_extend_err_exz(z, uref, NULL, NULL, qu->seq, tu->seq, exz, v_idx?v_idx->a.a:NULL, w.window_length, -1, err, (e_max+0.000001), THRESHOLD_MAX_SIZE, 1, &re);
            z->is_match = 0;///must be here;


            // fprintf(stderr, "[M::%s::utg%.6dl::%c] sid::%ld, q::[%d, %d), t::[%d, %d), err::%ld\n", 
            //     __func__, (int32_t)z->y_id+1, "+-"[z->y_pos_strand], sid, z->x_pos_s, z->x_pos_e+1, z->y_pos_s, z->y_pos_e+1,
            //     re);

            if (rr <= err) {
                if(k != i) {
                    t = ol->list[k];
                    ol->list[k] = ol->list[i];
                    ol->list[i] = t;
                }
                ol->list[k].is_match = 1; ol->list[k].non_homopolymer_errors = re;
                // fprintf(stderr, "+[M::%s] on::%lu\n", __func__, ol->length);
                /****for debug****/
                // z = &(ol->list[k]);
                // fprintf(stderr, "[M::%s::utg%.6dl::%c] sid::%ld, q::[%d, %d), t::[%d, %d), err::%u\n", 
                // __func__, (int32_t)z->y_id+1, "+-"[z->y_pos_strand], sid, z->x_pos_s, z->x_pos_e+1, z->y_pos_s, z->y_pos_e+1,
                // z->non_homopolymer_errors);
                /****for debug****/
                k++;
            } 
        }

        ol->length = k;
        // fprintf(stderr, "+[M::%s] on::%lu\n", __func__, ol->length);
        if(ol->length <= 0) return;
    } else {
        // fprintf(stderr, "-[M::%s] on::%lu\n", __func__, ol->length);
        if(ol->length <= 1) {
            if(ol->length == 1) {
                window_list *p;
                z = &(ol->list[0]); z->w_list.n = 0;
                kv_pushp(window_list, z->w_list, &p);
                memset(p, 0, sizeof((*p)));
                p->x_start = z->x_pos_s; p->x_end = z->x_pos_e+1; p->clen = 0;
                z->align_length = z->overlapLen = z->x_pos_e+1-z->x_pos_s;
                z->non_homopolymer_errors = 0;
            }
            return;
        }
        ///coordinates for all intervals with cov > 1
        copy_asg_arr(iidx, hap->snp_srt); copy_asg_arr(buf, v_idx->a); copy_asg_arr(buf1, (*stb));
        // fprintf(stderr, "\n[M::%s] iidx_n::%ld\n", __func__, (int64_t)iidx.n);
        ul_gap_filling_adv(ol, cl, aln, wl, uref, NULL, NULL, qu->seq, tu, exz, aux_o, &buf, &iidx, err, ql, sid, khit, 1, MAX_LGAP(ql));
        copy_asg_arr(hap->snp_srt, iidx); copy_asg_arr(v_idx->a, buf); copy_asg_arr((*stb), buf1);

        copy_asg_arr(iidx, hap->snp_srt); copy_asg_arr(buf, v_idx->a); copy_asg_arr(buf1, (*stb));
        // region_phase(ol, uref, uopt, aln, &iidx, &buf, &buf1, sid);
        rphase_hl(ol, uref, uopt, aln, &iidx, &buf, &buf1, sid, 64, ql, mk, mm, err);
        copy_asg_arr(hap->snp_srt, iidx); copy_asg_arr(v_idx->a, buf); copy_asg_arr((*stb), buf1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq 0x80(%rbp), %rax
movq 0x78(%rbp), %rax
movq 0x70(%rbp), %rax
movq 0x68(%rbp), %rax
movq 0x60(%rbp), %rax
movq 0x58(%rbp), %rax
movq 0x50(%rbp), %rax
movq 0x48(%rbp), %rax
movq 0x40(%rbp), %rax
movq 0x38(%rbp), %rax
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 -0x30(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
ja 0x89d5c
jmp 0x8a7e9
movq 0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq 0x80(%rbp), %rdx
callq 0x4c460
movsd -0x60(%rbp), %xmm0
movsd %xmm0, -0xc0(%rbp)
movq -0x58(%rbp), %rsi
movq 0x48(%rbp), %rdx
movsd 0x2f8273(%rip), %xmm0   # 0x382000
divsd -0xc0(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movslq %eax, %rcx
leaq -0xb8(%rbp), %rdi
callq 0x9f470
movq -0xb0(%rbp), %rax
addq $0x3e, %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
movq 0x18(%rbp), %rdi
movq -0x70(%rbp), %rsi
shlq %rsi
callq 0xa62c0
cmpq $0x0, 0x50(%rbp)
jne 0x8a1e8
movq 0x10(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0xa62c0
movq -0x58(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x2180
movq $0x0, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x89f37
movq -0x30(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x68(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movq -0x170(%rbp), %rcx
subl 0x4(%rcx), %eax
movl %eax, %eax
movq %rax, -0x80(%rbp)
movq -0x170(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x170(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x170(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq 0x10(%rbp), %rax
movq (%rax), %rcx
movq 0x18(%rbp), %rax
movq (%rax), %r8
movq 0x28(%rbp), %r9
movsd -0xc0(%rbp), %xmm0
movq -0xb0(%rbp), %r10
movq 0x80(%rbp), %rax
xorl %edx, %edx
movsd 0x2f83d4(%rip), %xmm1   # 0x382278
movq %r10, (%rsp)
movq $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x50850
cmpl $0x0, %eax
jne 0x89ec2
jmp 0x89f26
cmpq $0x0, -0x40(%rbp)
je 0x89f24
movq -0x80(%rbp), %rdi
movq -0x170(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, %esi
movq -0x40(%rbp), %rcx
xorl %edx, %edx
movl $0x1, %eax
cmpq $0x0, %rcx
cmovnel %eax, %edx
movsd 0x2f8385(%rip), %xmm0   # 0x382278
xorl %eax, %eax
movl %eax, %ecx
callq 0xa7100
cmpl $0x0, %eax
je 0x89f24
movq -0x170(%rbp), %rax
movb $0x3, 0x2c(%rax)
movq -0x170(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, %ecx
movq -0x30(%rbp), %rax
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
jmp 0x89f26
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x89e0b
cmpq $0x0, -0x40(%rbp)
je 0x89f6d
movq -0x30(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jle 0x89f6d
movq -0x30(%rbp), %rdi
movq 0x20(%rbp), %rsi
movq 0x38(%rbp), %rdx
movsd -0xc0(%rbp), %xmm0
movq -0x58(%rbp), %rcx
movq -0xb0(%rbp), %r8
callq 0x37650
movsd 0x2f828b(%rip), %xmm0   # 0x382200
mulsd -0xc0(%rbp), %xmm0
movsd %xmm0, -0x1c0(%rbp)
movq $0x0, -0x78(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x8a1c7
movq -0x30(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x68(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movq -0x170(%rbp), %rcx
subl 0x4(%rcx), %eax
movl %eax, %eax
movq %rax, -0x80(%rbp)
movq -0x170(%rbp), %rax
movq %rax, -0x200(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movq 0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1f0(%rbp)
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1e8(%rbp)
movq 0x28(%rbp), %rax
movq %rax, -0x1e0(%rbp)
cmpq $0x0, 0x38(%rbp)
je 0x8a035
movq 0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x208(%rbp)
jmp 0x8a040
xorl %eax, %eax
movq %rax, -0x208(%rbp)
jmp 0x8a040
movq -0x1e0(%rbp), %rbx
movq -0x1e8(%rbp), %r9
movq -0x1f0(%rbp), %r8
movq -0x1f8(%rbp), %rsi
movq -0x200(%rbp), %rdi
movq -0x208(%rbp), %r11
movq -0xb0(%rbp), %r10
movsd -0xc0(%rbp), %xmm1
movsd 0x2f81ff(%rip), %xmm2   # 0x382280
addsd -0x1c0(%rbp), %xmm2
xorl %eax, %eax
movl %eax, %ecx
movsd 0x2f81e3(%rip), %xmm0   # 0x382278
leaq -0x1d0(%rbp), %rax
movq %rcx, %rdx
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq $0x1f, 0x18(%rsp)
movq $0x1, 0x20(%rsp)
movq %rax, 0x28(%rsp)
callq 0x52e60
movsd %xmm0, -0x1c8(%rbp)
movq -0x170(%rbp), %rax
movb $0x0, 0x2c(%rax)
movsd -0x1c8(%rbp), %xmm1
movsd -0xc0(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x8a1b4
movq -0x78(%rbp), %rax
cmpq -0x68(%rbp), %rax
je 0x8a174
movq -0x30(%rbp), %rax
movq (%rax), %rsi
imulq $0xa8, -0x78(%rbp), %rax
addq %rax, %rsi
leaq -0x168(%rbp), %rdi
movl $0xa8, %edx
callq 0x2180
movq -0x30(%rbp), %rax
movq (%rax), %rsi
imulq $0xa8, -0x68(%rbp), %rax
addq %rax, %rsi
movq -0x30(%rbp), %rax
movq (%rax), %rdi
imulq $0xa8, -0x78(%rbp), %rax
addq %rax, %rdi
movl $0xa8, %edx
callq 0x2180
movq -0x30(%rbp), %rax
movq (%rax), %rdi
imulq $0xa8, -0x68(%rbp), %rax
addq %rax, %rdi
leaq -0x168(%rbp), %rsi
movl $0xa8, %edx
callq 0x2180
movq -0x30(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x78(%rbp), %rcx
addq %rcx, %rax
movb $0x1, 0x2c(%rax)
movq -0x1d0(%rbp), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x78(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x30(%rax)
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x8a1b6
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x89f95
movq -0x78(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
ja 0x8a1e3
jmp 0x8a7e9
jmp 0x8a7e9
movq -0x30(%rbp), %rax
cmpq $0x1, 0x10(%rax)
ja 0x8a365
movq -0x30(%rbp), %rax
cmpq $0x1, 0x10(%rax)
jne 0x8a360
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x170(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x170(%rbp), %rcx
cmpq 0x50(%rcx), %rax
jne 0x8a2ad
movq -0x170(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x8a260
movq -0x170(%rbp), %rax
movq 0x50(%rax), %rax
shlq %rax
movq %rax, -0x210(%rbp)
jmp 0x8a26e
movl $0x2, %eax
movq %rax, -0x210(%rbp)
jmp 0x8a26e
movq -0x210(%rbp), %rcx
movq -0x170(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x170(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x170(%rbp), %rax
movq 0x50(%rax), %rsi
shlq $0x5, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x170(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x170(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x170(%rbp), %rdx
movq 0x48(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x48(%rdx)
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x1d8(%rbp)
movq -0x1d8(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x2100
movq -0x170(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x1d8(%rbp), %rax
movl %ecx, (%rax)
movq -0x170(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movq -0x1d8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x1d8(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x170(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movq -0x170(%rbp), %rax
subl 0x4(%rax), %ecx
movq -0x170(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x170(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x170(%rbp), %rax
movl $0x0, 0x30(%rax)
jmp 0x8a7e9
movq 0x30(%rbp), %rax
movq 0x248(%rax), %rax
movq %rax, -0x178(%rbp)
movq 0x30(%rbp), %rax
movq 0x238(%rax), %rax
movq %rax, -0x188(%rbp)
movq 0x30(%rbp), %rax
movq 0x240(%rax), %rax
movq %rax, -0x180(%rbp)
movq 0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x190(%rbp)
movq 0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1a0(%rbp)
movq 0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x198(%rbp)
movq 0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x1a8(%rbp)
movq 0x68(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1b8(%rbp)
movq 0x68(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x1b0(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x270(%rbp)
movq 0x50(%rbp), %rax
movq %rax, -0x268(%rbp)
movq 0x48(%rbp), %rax
movq %rax, -0x260(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x258(%rbp)
movq 0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x250(%rbp)
movq 0x18(%rbp), %rax
movq %rax, -0x248(%rbp)
movq 0x28(%rbp), %rax
movq %rax, -0x240(%rbp)
movq 0x40(%rbp), %rax
movq %rax, -0x238(%rbp)
movsd -0xc0(%rbp), %xmm0
movsd %xmm0, -0x230(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x228(%rbp)
movq 0x58(%rbp), %rcx
movq %rcx, -0x220(%rbp)
movq 0x60(%rbp), %rcx
movq %rcx, -0x218(%rbp)
movq %rax, %xmm1
movaps 0x2f7b7a(%rip), %xmm0   # 0x382010
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x2f7b7e(%rip), %xmm0   # 0x382020
subpd %xmm0, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movsd 0x2f4b57(%rip), %xmm0   # 0x37f010
mulsd %xmm0, %xmm1
movsd 0x2f7e1b(%rip), %xmm0   # 0x3822e0
ucomisd %xmm1, %xmm0
jbe 0x8a508
movaps 0x2f7b3e(%rip), %xmm1   # 0x382010
movq -0x58(%rbp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x2f7b3d(%rip), %xmm1   # 0x382020
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x2f4b16(%rip), %xmm1   # 0x37f010
mulsd %xmm1, %xmm0
movsd %xmm0, -0x280(%rbp)
jmp 0x8a51a
movsd 0x2f7dd0(%rip), %xmm0   # 0x3822e0
movsd %xmm0, -0x280(%rbp)
jmp 0x8a51a
movq -0x220(%rbp), %r11
movq -0x228(%rbp), %rbx
movsd -0x230(%rbp), %xmm0
movq -0x238(%rbp), %r12
movq -0x240(%rbp), %r13
movq -0x250(%rbp), %r10
movq -0x258(%rbp), %r8
movq -0x260(%rbp), %rcx
movq -0x268(%rbp), %rdx
movq -0x270(%rbp), %rsi
movq -0x278(%rbp), %rdi
movsd -0x280(%rbp), %xmm1
cvttsd2si %xmm1, %rax
xorl %r9d, %r9d
leaq -0x1a0(%rbp), %r15
leaq -0x188(%rbp), %r14
movq $0x0, (%rsp)
movq %r10, 0x8(%rsp)
movq -0x248(%rbp), %r10
movq %r10, 0x10(%rsp)
movq -0x218(%rbp), %r10
movq %r13, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movq %r14, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movq %r11, 0x40(%rsp)
movq %r10, 0x48(%rsp)
movq $0x1, 0x50(%rsp)
movq %rax, 0x58(%rsp)
callq 0x87e30
movq -0x178(%rbp), %rcx
movq 0x30(%rbp), %rax
movq %rcx, 0x248(%rax)
movq -0x188(%rbp), %rcx
movq 0x30(%rbp), %rax
movq %rcx, 0x238(%rax)
movq -0x180(%rbp), %rcx
movq 0x30(%rbp), %rax
movq %rcx, 0x240(%rax)
movq -0x190(%rbp), %rcx
movq 0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x1a0(%rbp), %rcx
movq 0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x198(%rbp), %rcx
movq 0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x1a8(%rbp), %rcx
movq 0x68(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x1b8(%rbp), %rcx
movq 0x68(%rbp), %rax
movq %rcx, (%rax)
movq -0x1b0(%rbp), %rcx
movq 0x68(%rbp), %rax
movq %rcx, 0x8(%rax)
movq 0x30(%rbp), %rax
movq 0x248(%rax), %rax
movq %rax, -0x178(%rbp)
movq 0x30(%rbp), %rax
movq 0x238(%rax), %rax
movq %rax, -0x188(%rbp)
movq 0x30(%rbp), %rax
movq 0x240(%rax), %rax
movq %rax, -0x180(%rbp)
movq 0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x190(%rbp)
movq 0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1a0(%rbp)
movq 0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x198(%rbp)
movq 0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x1a8(%rbp)
movq 0x68(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1b8(%rbp)
movq 0x68(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x1b0(%rbp)
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0x50(%rbp), %rcx
movq 0x58(%rbp), %rbx
movq -0x58(%rbp), %r11
movq 0x78(%rbp), %r10
movq 0x70(%rbp), %rax
movsd -0xc0(%rbp), %xmm0
leaq -0x188(%rbp), %r8
leaq -0x1a0(%rbp), %r9
leaq -0x1b8(%rbp), %r14
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq $0x40, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rax, 0x28(%rsp)
callq 0x85660
movq -0x178(%rbp), %rcx
movq 0x30(%rbp), %rax
movq %rcx, 0x248(%rax)
movq -0x188(%rbp), %rcx
movq 0x30(%rbp), %rax
movq %rcx, 0x238(%rax)
movq -0x180(%rbp), %rcx
movq 0x30(%rbp), %rax
movq %rcx, 0x240(%rax)
movq -0x190(%rbp), %rcx
movq 0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x1a0(%rbp), %rcx
movq 0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x198(%rbp), %rcx
movq 0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x1a8(%rbp), %rcx
movq 0x68(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x1b8(%rbp), %rcx
movq 0x68(%rbp), %rax
movq %rcx, (%rax)
movq -0x1b0(%rbp), %rcx
movq 0x68(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)