// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: extract_sub_cigar_sv(overlap_region*, long, long, All_reads*, char*, long, UC_Read*, kv_ul_ov_t*, unsigned long, long, long)
int64_t extract_sub_cigar_sv(overlap_region *z, int64_t zid, int64_t wk, All_reads *rref, char *qstr, int64_t ql, UC_Read* tu, kv_ul_ov_t *rr, uint64_t min_err, int64_t hpc_len, int64_t hpc_rr)
{
    int64_t xk = z->w_list.a[wk].x_start, yk = z->w_list.a[wk].y_start; ul_ov_t *cp, *ra; bit_extz_t ez;
    int64_t ck = 0, ex[2], ey[2], el0, tl = Get_READ_LENGTH((*rref), z->y_id), ox[2], oy[2], os, oe, ff, rn, rn1, k; uint32_t cl, rr_n0 = rr->n, is_srt = 1;
    set_bit_extz_t(ez, (*z), wk);
    if(!ez.cigar.n) return -1;
    int64_t cn = ez.cigar.n, wx[2], wy[2]; uint16_t op, op0;
    ex[0] = ex[1] = ey[0] = ey[1] = -1; 
    
    while (ck < cn) {//[s, e)
        wx[0] = xk; wy[0] = yk; el0 = 0;
        op = (ez.cigar.a[ck]>>14); 
        cl = (ez.cigar.a[ck]&(0x3fff));
        if(op!=2) xk += cl; if(op!=3) yk += cl; 
        op0 = op; el0 += cl;
        for (ck++; ck < cn; ck++) {
            op = (ez.cigar.a[ck]>>14); 
            if((!!op) != (!!op0)) break;
            cl = (ez.cigar.a[ck]&(0x3fff));
            if(op!=2) xk += cl; if(op!=3) yk += cl;
            el0 += cl;
        }
        wx[1] = xk; wy[1] = yk; 
        if(op0 == 0) continue;
        ff = 1;


        ox[0] = ((wx[0]>=el0)?(wx[0]-el0):(0)); ox[1] = ((wx[1]+el0<=ql)?(wx[1]+el0):(ql));
        oy[0] = ((wy[0]>=el0)?(wy[0]-el0):(0)); oy[1] = ((wy[1]+el0<=tl)?(wy[1]+el0):(tl));

        if(ex[0] < 0 || ex[1] < 0 || ey[0] < 0 || ey[1] < 0) ff = 0;

        if(ff) {
            os = MAX(ox[0], ex[0]); oe = MIN(ox[1], ex[1]);
            if(oe <= os) ff = 0;

            os = MAX(oy[0], ey[0]); oe = MIN(oy[1], ey[1]);
            if(oe <= os) ff = 0;
        }

        if(ff) {///extend
            ex[0] = MIN(ox[0], ex[0]); ex[1] = MAX(ox[1], ex[1]);
            ey[0] = MIN(oy[0], ey[0]); ey[1] = MAX(oy[1], ey[1]);
        } else {
            if(ex[0] >= 0 && ex[1] >= 0 && ey[0] >= 0 && ey[1] >= 0) {
                kv_pushp(ul_ov_t, *rr, &cp);
                cp->qs = ex[0]; cp->qe = ex[1];
                cp->ts = ey[0]; cp->te = ey[1];
                cp->sec = 0; cp->el = 0; cp->rev = 0;
                if((rr->n > rr_n0 + 1) && (cp->qs < rr->a[rr->n-2].qs)) is_srt = 0;
            } 
            ex[0] = ox[0]; ex[1] = ox[1];
            ey[0] = oy[0]; ey[1] = oy[1];
        }
    }

    if(ex[0] >= 0 && ex[1] >= 0 && ey[0] >= 0 && ey[1] >= 0) {
        kv_pushp(ul_ov_t, *rr, &cp);
        cp->qs = ex[0]; cp->qe = ex[1];
        cp->ts = ey[0]; cp->te = ey[1];
        cp->sec = 0; cp->el = 0; cp->rev = 0;
        if((rr->n > rr_n0 + 1) && (cp->qs < rr->a[rr->n-2].qs)) is_srt = 0;
    } 

    if(rr->n <= rr_n0) return 0;
    if(!is_srt) radix_sort_ul_ov_srt_qs1(rr->a + rr_n0, rr->a + rr->n);

    ra = rr->a + rr_n0; rn = rr->n - rr_n0;
    for (k = ck = 0; k < rn; k++) {
        if(ck > 0 && ra[k].qs < ra[ck - 1].qe) {
            if(ra[k].qe > ra[ck - 1].qe) ra[ck - 1].qe = ra[k].qe;
            if(ra[k].ts < ra[ck - 1].ts) ra[ck - 1].ts = ra[k].ts;
            if(ra[k].te > ra[ck - 1].te) ra[ck - 1].te = ra[k].te;
        } else {
            if((ck > 0) && (ra[ck - 1].qe - ra[ck - 1].qs < min_err) && (ra[ck - 1].te - ra[ck - 1].ts < min_err)) {
                ck--;
            }
            ra[ck++] = ra[k];
        }
    }
    if((ck > 0) && (ra[ck - 1].qe - ra[ck - 1].qs < min_err) && (ra[ck - 1].te - ra[ck - 1].ts < min_err)) ck--;
    if(ck == 0) {
        rr->n = rr_n0;
        return 0;
    }
    rn = ck; ck = 0; xk = z->w_list.a[wk].x_start; yk = z->w_list.a[wk].y_start;
    for (k = ck = rn1 = 0; k < rn; k++) {
        cp = &(ra[k]); 
        cp->qn = iter_sub_cigar_sv(zid, cp, &ez, &ck, &xk, &yk, NULL, -1, NULL, -1, -1, -1, -1, -1, &(ey[0]), &(ey[1]), -1);
        if(cp->qn < min_err) continue;
        assert(ey[0] >= 0 && ey[1] >= 0 && ey[1] >= ey[0]);
        ey[0] -= hpc_len; if(ey[0] < 0) ey[0] = 0;
        ey[1] += hpc_len; if(ey[1] > tl) ey[1] = tl;

        UC_Read_resize(*tu, (ey[1] - ey[0])); ///ystr = tu->seq; 
        recover_UC_Read_sub_region(tu->seq, ey[0], (ey[1] - ey[0]), z->y_pos_strand, rref, z->y_id);
        iter_sub_cigar_sv(zid, cp, &ez, &ck, &xk, &yk, qstr, ql, tu->seq, tl, ey[0], ey[1], hpc_len, hpc_rr, &(ey[0]), &(ey[1]), (min_err<<1));

        ra[rn1++] = *cp;
        // fprintf(stderr, "-[M::%s] rid::%u\t%.*s\tq0::[%u,%u)\tql::%ld\tq1::[%u,%u)\t\terr::%u\tel::%u\n", __func__, z->y_id, (int)Get_NAME_LENGTH(R_INF, z->y_id), Get_NAME(R_INF, z->y_id), cp->qs, cp->qe, ql, cp->ts, cp->te, cp->qn, cp->el);
    }

    // fprintf(stderr, "\n");
    
    rr->n = rr_n0 + rn1;
    if(rn1 > 0) return 1;
    else return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %r9, 0x90(%rsp)
movq %r8, 0xb8(%rsp)
movq %rdx, %r10
movq %rsi, 0x68(%rsp)
movq 0x1d8(%rsp), %r9
movq 0x58(%rdi), %rax
shlq $0x5, %r10
movslq (%rax,%r10), %r8
movq %r8, 0x48(%rsp)
movslq 0x8(%rax,%r10), %rdx
movq %rdx, 0x40(%rsp)
movq $0x0, 0x18(%rsp)
movq %rcx, 0xb0(%rsp)
movq 0x18(%rcx), %rsi
movl 0x10(%rdi), %ecx
movq (%rsi,%rcx,8), %rcx
movq %rcx, 0x78(%rsp)
movq 0x8(%r9), %rcx
movq %rcx, 0x70(%rsp)
movl 0x18(%rax,%r10), %r15d
addq %r15, %r15
movq %rdi, 0x88(%rsp)
addq 0x70(%rdi), %r15
movq %r15, 0x178(%rsp)
movl 0x1c(%rax,%r10), %r14d
movq %r14, 0x170(%rsp)
movq %r14, 0x168(%rsp)
movl %r8d, 0xdc(%rsp)
movl 0x4(%rax,%r10), %ecx
movl %ecx, 0xe0(%rsp)
movl %edx, 0xd0(%rsp)
movl 0xc(%rax,%r10), %ecx
movl %ecx, 0xd4(%rsp)
movswl 0x14(%rax,%r10), %eax
movl %eax, 0xec(%rsp)
movl %eax, 0xe8(%rsp)
testq %r14, %r14
je 0x6e580
leaq 0x58(%rsp), %rax
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, -0x8(%rax)
movq 0x18(%rsp), %r12
movq 0x48(%rsp), %r13
movq 0x40(%rsp), %rbp
movq 0x70(%rsp), %rax
incl %eax
movq %rax, 0xa8(%rsp)
movl $0x1, 0x14(%rsp)
movq $-0x1, %rbx
movq $-0x1, 0x30(%rsp)
movq $-0x1, %rdx
movq $-0x1, %r11
movq %r11, 0x38(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %rbx, 0x20(%rsp)
movq %r13, %rdx
movq %rbp, %rdi
cmpq %r14, %r12
jge 0x6e47b
movzwl (%r15,%r12,2), %eax
movl %eax, %ecx
shrl $0xe, %ecx
movl %eax, %r13d
andl $0x3fff, %r13d          # imm = 0x3FFF
movzwl %r13w, %ebx
movq %rdx, %r11
cmpw $0x2, %cx
je 0x6e1ee
addq %r11, %r13
movq %r13, %rdx
movq %rdi, %rbp
cmpw $0x3, %cx
je 0x6e1f5
leaq (%rdi,%rbx), %rbp
movq %rdx, %r13
incq %r12
movzwl %ax, %eax
cmpq %r14, %r12
jge 0x6e24b
cmpl $0x4000, %eax           # imm = 0x4000
setb %cl
movzwl (%r15,%r12,2), %edx
cmpq $0x4000, %rdx           # imm = 0x4000
setae %sil
cmpb %sil, %cl
je 0x6e24b
movl %edx, %esi
shrl $0xe, %esi
andl $0x3fff, %edx           # imm = 0x3FFF
movzwl %dx, %ecx
cmpw $0x2, %si
je 0x6e23a
addq %rdx, %r13
cmpw $0x3, %si
je 0x6e23d
addq %rcx, %rbp
addq %rcx, %rbx
incq %r12
cmpq %r12, %r14
jne 0x6e200
movq %r14, %r12
cmpl $0x4000, %eax           # imm = 0x4000
jb 0x6e1af
movq %r11, %rdx
subq %rbx, %rdx
movl $0x0, %ecx
cmovlq %rcx, %rdx
leaq (%rbx,%r13), %r11
movq 0x90(%rsp), %rax
cmpq %rax, %r11
cmovgeq %rax, %r11
subq %rbx, %rdi
cmovlq %rcx, %rdi
movq %rdi, 0x30(%rsp)
addq %rbp, %rbx
movq 0x78(%rsp), %rax
cmpq %rax, %rbx
cmovgeq %rax, %rbx
cmpq $0x0, 0x8(%rsp)
movq 0x38(%rsp), %rsi
js 0x6e356
testq %rsi, %rsi
js 0x6e356
cmpq $0x0, 0x28(%rsp)
js 0x6e356
cmpq $0x0, 0x20(%rsp)
js 0x6e356
movq 0x8(%rsp), %rax
cmpq %rax, %rdx
cmovgq %rdx, %rax
cmpq %rsi, %r11
movq %rsi, %rcx
cmovlq %r11, %rcx
movq 0x30(%rsp), %rsi
movq %r9, %r8
movq %r11, %r9
movq 0x28(%rsp), %r11
cmpq %r11, %rsi
movq %rdx, %rdi
movq %r11, %rdx
movq %r9, %r11
movq %r8, %r9
cmovgq %rsi, %rdx
movq 0x20(%rsp), %rsi
cmpq %rsi, %rbx
cmovlq %rbx, %rsi
cmpq %rdx, %rsi
movq %rdi, %rdx
movq 0x38(%rsp), %rsi
jle 0x6e356
cmpq %rax, %rcx
jle 0x6e356
movq 0x8(%rsp), %rax
cmpq %rax, %rdx
cmovgeq %rax, %rdx
cmpq %rsi, %r11
cmovleq %rsi, %r11
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
cmpq %rcx, %rax
cmovgeq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x20(%rsp), %rax
cmpq %rax, %rbx
cmovleq %rax, %rbx
jmp 0x6e196
cmpq $0x0, 0x8(%rsp)
js 0x6e196
testq %rsi, %rsi
js 0x6e196
cmpq $0x0, 0x28(%rsp)
js 0x6e196
cmpq $0x0, 0x20(%rsp)
js 0x6e196
movq %rdx, 0x80(%rsp)
movq 0x10(%r9), %rax
cmpq %rax, 0x8(%r9)
jne 0x6e3ec
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x10(%r9)
movq (%r9), %rdi
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rsi
addq %rcx, %rsi
movq %r10, 0xa0(%rsp)
movq %r11, 0x98(%rsp)
callq 0x2370
movq 0x98(%rsp), %r11
movq 0x38(%rsp), %rsi
movq 0xa0(%rsp), %r10
movq 0x1d8(%rsp), %r9
movq %rax, (%r9)
movq (%r9), %rax
movq 0x8(%r9), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%r9)
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
movq 0x8(%rsp), %rcx
movl %ecx, 0x4(%rax,%rdx)
movl %esi, 0x8(%rax,%rdx)
movq 0x28(%rsp), %rcx
movl %ecx, 0x10(%rax,%rdx)
movq 0x20(%rsp), %rcx
movl %ecx, 0x14(%rax,%rdx)
movl $0x0, 0x18(%rax,%rdx)
movq 0x8(%r9), %rax
cmpq 0xa8(%rsp), %rax
movq 0x80(%rsp), %rdx
jbe 0x6e196
movq (%r9), %rcx
leaq (%rax,%rax,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rax, %rdx
movq 0x8(%rsp), %rax
cmpl %eax, -0x34(%rcx,%rdx)
movq 0x80(%rsp), %rdx
movl $0x0, %eax
movl 0x14(%rsp), %ecx
cmoval %eax, %ecx
movl %ecx, 0x14(%rsp)
jmp 0x6e196
movq 0x28(%rsp), %rsi
movq %rsi, 0x50(%rsp)
movq 0x20(%rsp), %rcx
movq %rcx, 0x58(%rsp)
movq %r12, 0x18(%rsp)
movq %rdx, 0x48(%rsp)
movq %rdi, 0x40(%rsp)
movq 0x8(%rsp), %rax
movq 0x38(%rsp), %rdi
orq %rdi, %rax
orq %rsi, %rax
orq %rcx, %rax
js 0x6e58c
movq 0x10(%r9), %rax
cmpq %rax, 0x8(%r9)
movq 0x68(%rsp), %r14
movq 0x1e0(%rsp), %r13
jne 0x6e509
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmovneq %rcx, %rax
movq %rax, 0x10(%r9)
movq (%r9), %rdi
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rsi
addq %rax, %rsi
movq %r9, %rbx
movq %r10, %r15
callq 0x2370
movq 0x38(%rsp), %rdi
movq %r15, %r10
movq %rbx, %r9
movq %rax, (%rbx)
movq (%r9), %rax
movq 0x8(%r9), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%r9)
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
movq 0x8(%rsp), %rcx
movl %ecx, 0x4(%rax,%rdx)
movl %edi, 0x8(%rax,%rdx)
movq 0x28(%rsp), %rcx
movl %ecx, 0x10(%rax,%rdx)
movq 0x20(%rsp), %rcx
movl %ecx, 0x14(%rax,%rdx)
movl $0x0, 0x18(%rax,%rdx)
movq 0x8(%r9), %rax
movq 0x70(%rsp), %rcx
incl %ecx
cmpq %rcx, %rax
jbe 0x6e599
movq (%r9), %rcx
leaq (%rax,%rax,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rax, %rdx
xorl %eax, %eax
movq 0x8(%rsp), %rsi
cmpl %esi, -0x34(%rcx,%rdx)
movl 0x14(%rsp), %ecx
cmoval %eax, %ecx
movl %ecx, 0x14(%rsp)
jmp 0x6e599
movq $-0x1, %rax
jmp 0x6e93b
movq 0x68(%rsp), %r14
movq 0x1e0(%rsp), %r13
movq 0x8(%r9), %rax
movl 0x70(%rsp), %r12d
cmpq %r12, %rax
jbe 0x6e939
leaq (%r12,%r12,8), %rbx
cmpl $0x0, 0x14(%rsp)
jne 0x6e5e7
movq (%r9), %rsi
leaq (%rbx,%rbx,2), %rdi
addq %r12, %rdi
addq %rsi, %rdi
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rax, %rsi
addq %rcx, %rsi
movq %r9, %r14
movq %r10, %r15
callq 0x4751b
movq %r15, %r10
movq %r14, %r9
movq 0x68(%rsp), %r14
movq (%r9), %rax
movq 0x8(%r9), %rcx
leaq (%rbx,%rbx,2), %rdx
addq %r12, %rdx
leaq (%rax,%rdx), %rbp
subq %r12, %rcx
movq $0x0, 0x18(%rsp)
testq %rcx, %rcx
jle 0x6e6aa
addq %rax, %rdx
addq $0x14, %rdx
xorl %eax, %eax
testq %rax, %rax
jle 0x6e679
leaq (%rax,%rax,8), %rsi
leaq (%rsi,%rsi,2), %rdi
addq %rax, %rdi
leaq (%rdi,%rbp), %rsi
movl -0x14(%rbp,%rdi), %r8d
cmpl %r8d, -0x10(%rdx)
jae 0x6e658
movl -0xc(%rdx), %edi
cmpl %r8d, %edi
jbe 0x6e641
movl %edi, -0x14(%rsi)
movl -0x4(%rdx), %edi
cmpl -0xc(%rsi), %edi
jae 0x6e64c
movl %edi, -0xc(%rsi)
movl (%rdx), %edi
cmpl -0x8(%rsi), %edi
jbe 0x6e69b
movl %edi, -0x8(%rsi)
jmp 0x6e69b
testq %rax, %rax
jle 0x6e679
movl -0x14(%rbp,%rdi), %r8d
subl -0x18(%rbp,%rdi), %r8d
cmpq %r13, %r8
jae 0x6e679
movl -0x8(%rsi), %edi
subl -0xc(%rsi), %edi
cmpq %r13, %rdi
sbbq $0x0, %rax
leaq (%rax,%rax,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %rax, %rsi
incq %rax
movdqu -0x14(%rdx), %xmm0
movups -0x8(%rdx), %xmm1
movups %xmm1, 0xc(%rbp,%rsi)
movdqu %xmm0, (%rbp,%rsi)
addq $0x1c, %rdx
decq %rcx
jne 0x6e617
jmp 0x6e6ac
xorl %eax, %eax
movq %rax, 0x18(%rsp)
testq %rax, %rax
jle 0x6e6e4
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rax, %rcx
movl -0x14(%rbp,%rcx), %edx
subl -0x18(%rbp,%rcx), %edx
cmpq %r13, %rdx
jae 0x6e6e4
addq %rbp, %rcx
movl -0x8(%rcx), %edx
subl -0xc(%rcx), %edx
cmpq %r13, %rdx
jae 0x6e6e4
decq %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %r15
testq %r15, %r15
je 0x6e935
movq %r12, 0x30(%rsp)
xorl %edx, %edx
movq %rdx, 0x18(%rsp)
movq 0x88(%rsp), %rax
movq 0x58(%rax), %rax
movslq (%rax,%r10), %rcx
movq %rcx, 0x48(%rsp)
movslq 0x8(%rax,%r10), %rax
movq %rax, 0x40(%rsp)
movq $0x0, 0x8(%rsp)
movq %rdx, 0x18(%rsp)
testq %r15, %r15
jle 0x6e912
leaq (,%r13,2), %rax
movq %rax, 0x20(%rsp)
movq $-0x1, %rbx
movq %rbp, %r12
movq $0x0, 0x8(%rsp)
movq %rbp, 0x28(%rsp)
subq $0x8, %rsp
movq %r14, %rdi
movq %r12, %rsi
leaq 0xc8(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0x50(%rsp), %r8
leaq 0x48(%rsp), %r9
pushq %rbx
leaq 0x68(%rsp), %rax
pushq %rax
leaq 0x68(%rsp), %rax
pushq %rax
pushq %rbx
pushq %rbx
pushq %rbx
pushq %rbx
pushq %rbx
xorl %eax, %eax
pushq %rax
pushq %rbx
pushq %rax
callq 0x6dae8
addq $0x60, %rsp
movl %eax, (%r12)
movl %eax, %eax
cmpq %r13, %rax
jb 0x6e905
movq 0x50(%rsp), %r13
testq %r13, %r13
js 0x6e94d
movq 0x58(%rsp), %rbp
testq %rbp, %rbp
js 0x6e94d
cmpq %r13, %rbp
jl 0x6e94d
movq 0x1e8(%rsp), %rax
subq %rax, %r13
testq %r13, %r13
movl $0x0, %ecx
cmovleq %rcx, %r13
movq %r13, 0x50(%rsp)
addq %rax, %rbp
movq 0x78(%rsp), %rax
cmpq %rax, %rbp
cmovgeq %rax, %rbp
movq %rbp, 0x58(%rsp)
movq %rbp, %r14
subq %r13, %r14
movq 0x1d0(%rsp), %rax
cmpq %r14, 0x10(%rax)
jge 0x6e834
movq (%rax), %rdi
movq %r14, %rsi
callq 0x2370
movq 0x1d0(%rsp), %rcx
movq %rax, (%rcx)
movq 0x1d0(%rsp), %rax
movq %r14, 0x10(%rax)
movq (%rax), %rdi
movq 0x88(%rsp), %rax
movzbl 0x1c(%rax), %ecx
movl 0x10(%rax), %r9d
movq %r13, %rsi
movq %r14, %rdx
movq 0xb0(%rsp), %r8
callq 0x337f7
subq $0x8, %rsp
movq 0x70(%rsp), %rdi
movq %rdi, %r14
movq %r12, %rsi
leaq 0xc8(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0x50(%rsp), %r8
leaq 0x48(%rsp), %r9
pushq 0x28(%rsp)
leaq 0x68(%rsp), %rax
pushq %rax
leaq 0x68(%rsp), %rax
pushq %rax
pushq 0x210(%rsp)
pushq 0x210(%rsp)
pushq %rbp
pushq %r13
pushq 0xb8(%rsp)
movq 0x218(%rsp), %rax
pushq (%rax)
pushq 0xe0(%rsp)
pushq 0x110(%rsp)
callq 0x6dae8
addq $0x60, %rsp
movq 0x8(%rsp), %rcx
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rax
addq %rcx, %rax
incq %rcx
movdqu (%r12), %xmm0
movups 0xc(%r12), %xmm1
movq 0x28(%rsp), %rbp
movdqu %xmm0, (%rbp,%rax)
movups %xmm1, 0xc(%rbp,%rax)
movq %rcx, 0x8(%rsp)
movq 0x1e0(%rsp), %r13
addq $0x1c, %r12
decq %r15
jne 0x6e759
movq 0x30(%rsp), %rcx
movq 0x8(%rsp), %rdx
addq %rdx, %rcx
movq 0x1d8(%rsp), %rax
movq %rcx, 0x8(%rax)
xorl %eax, %eax
testq %rdx, %rdx
setg %al
jmp 0x6e93b
movq %r12, 0x8(%r9)
xorl %eax, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b94bd(%rip), %rdi    # 0x227e11
leaq 0x1b6ce8(%rip), %rsi    # 0x225643
leaq 0x1b94da(%rip), %rcx    # 0x227e3c
movl $0x49f1, %edx           # imm = 0x49F1
callq 0x2110