// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/ecovlp.cpp
// Function: gen_updated_trace(asg16_v*, asg16_v*, asg16_v*, char*, unsigned long, char*, unsigned long, asg64_v*, bit_extz_t*, unsigned long)
void gen_updated_trace(asg16_v *qcc, asg16_v *tcc, asg16_v *tcc_res, char *qstr, uint64_t ql, char *tstr, uint64_t tl, asg64_v *srt, bit_extz_t *exz, uint64_t rid)
{
    uint64_t k, ck, qk, tk, wq[2], wt[2], old_dp, dp, s, e, srt_n, si, ei, so, os, oe, *qd, *td, qs, qe, ts, te, q0, t0; 
    asg16_v *cc; uint32_t len; uint16_t c, bq, bt;

    srt->n = 0;

    cc = qcc;
    ck = qk = tk = wq[0] = wq[1] = wt[0] = wt[1] = 0;
    while (ck < cc->n) {
        wq[0] = qk; wt[0] = tk;
        ck = pop_trace_bp_f(cc, ck, &c, &bq, &bt, &len);
        if(c != 2) qk += len;
        if(c != 3) tk += len;
        wq[1] = qk; wt[1] = tk;
        if(c != 0) continue;

        kv_push(uint64_t, (*srt), (wq[0]<<1));
        kv_push(uint64_t, (*srt), ((wq[1]<<1)|1));
    }

    cc = tcc;
    ck = qk = tk = wq[0] = wq[1] = wt[0] = wt[1] = 0;
    while (ck < cc->n) {
        wq[0] = qk; wt[0] = tk;
        ck = pop_trace_bp_f(cc, ck, &c, &bq, &bt, &len);
        if(c != 2) qk += len;
        if(c != 3) tk += len;
        wq[1] = qk; wt[1] = tk;
        if(c != 0) continue;

        kv_push(uint64_t, (*srt), (wt[0]<<1));
        kv_push(uint64_t, (*srt), ((wt[1]<<1)|1));
    }

    // fprintf(stderr, "[M::%s] rid::%lu, ql::%lu, tl::%lu\n", __func__, rid, ql, tl);

    radix_sort_ec64(srt->a, srt->a + srt->n);
    for (k = 0, dp = e = srt_n = 0, s = (uint64_t)-1; k < srt->n; k++) {
        old_dp = dp;
        //if a[k] is qe
        if (srt->a[k]&1) --dp;
        else ++dp;

        if(old_dp >= 2 && s != (uint64_t)-1) {
            e = srt->a[k]>>1;
            if(e > s) srt->a[srt_n++] = ((s<<32)|(e));
        }

        s = (uint64_t)-1;
        if(dp >= 2) s = srt->a[k]>>1;
        // if (old_dp < 2 && dp >= 2) {///old_dp < dp, a[k] is qs
        //     s = srt->a[k]>>1;
        // } else if (old_dp >= 2 && dp < 2) {///old_dp > dp, a[k] is qe
        //     e = srt->a[k]>>1;
        //     if(e > s) {
        //         srt->a[srt_n++] = ((s<<32)|(e));
        //         fprintf(stderr, "[M::%s] x::[%lu,\t%lu)\n", __func__, s, e);
        //     }
        // }
    }

    
    // for (k = 0; k < srt_n; k++) {
    //     fprintf(stderr, "[M::%s] x[%lu]::[%lu,\t%u)\n", __func__, k, srt->a[k]>>32, (uint32_t)srt->a[k]);
    // }
    

    if(srt_n > 0) {
        srt->n = srt_n;

        cc = qcc;
        k = ck = qk = tk = wq[0] = wq[1] = wt[0] = wt[1] = 0;
        while (ck < cc->n) {
            wq[0] = qk; wt[0] = tk;
            ck = pop_trace_bp_f(cc, ck, &c, &bq, &bt, &len);
            if(c != 2) qk += len;
            if(c != 3) tk += len;
            wq[1] = qk; wt[1] = tk;
            if(c != 0) continue;
            si = wq[0]; ei = wq[1];
            so = wt[0]; ///eo = wt[1];

            for (; (k > 0) && ((k >= srt_n) || (((uint32_t)(srt->a[k])) > si)); k--);
            for (; k < srt_n; k++) {
                s = srt->a[k]>>32; e = (uint32_t)(srt->a[k]);
                if(s >= ei) break;
                if(s >= si && e <= ei) {
                    os = so + s - si;
                    oe = so + e - si; 
                    kv_push(uint64_t, (*srt), ((os<<32)|(oe)));
                }
            }
        }
        assert(srt->n == (srt_n<<1));

        cc = tcc;
        k = ck = qk = tk = wq[0] = wq[1] = wt[0] = wt[1] = 0;
        while (ck < cc->n) {
            wq[0] = qk; wt[0] = tk;
            ck = pop_trace_bp_f(cc, ck, &c, &bq, &bt, &len);
            if(c != 2) qk += len;
            if(c != 3) tk += len;
            wq[1] = qk; wt[1] = tk;
            if(c != 0) continue;
            si = wt[0]; ei = wt[1];
            so = wq[0]; ///eo = wq[1];

            for (; (k > 0) && ((k >= srt_n) || (((uint32_t)(srt->a[k])) > si)); k--);
            for (; k < srt_n; k++) {
                s = srt->a[k]>>32; e = (uint32_t)(srt->a[k]);
                // fprintf(stderr, "######[M::%s] t[%lu]::[%lu,\t%lu) i::[%lu,\t%lu)\n", __func__, k, s, e, si, ei);
                if(s >= ei) break;
                if(s >= si && e <= ei) {
                    os = so + s - si;
                    oe = so + e - si; 
                    kv_push(uint64_t, (*srt), ((os<<32)|(oe)));
                    // fprintf(stderr, "[M::%s] ******\n", __func__);
                }
            }
        }
        // if(!(srt->n == (srt_n*3))) {
        //     fprintf(stderr, "[M::%s] rid::%lu, srt_n::%lu, srt->n::%lu\n", __func__, rid, srt_n, (uint64_t)srt->n);
        // }
        assert(srt->n == (srt_n*3));

        
        tcc_res->n = 0; ///reset tcc
        qd = srt->a + srt_n; td = srt->a + srt_n + srt_n; uint64_t nl = 0;///, dbg_ql, dbg_tl;
        for (k = q0 = t0 = 0; k < srt_n; k++) {
            qs = qd[k]>>32; qe = (uint32_t)qd[k];
            ts = td[k]>>32; te = (uint32_t)td[k];
            nl += qs - qe;
            // assert((qe - qs) == (te - ts));
            // assert(!memcmp(qstr + qs, tstr + ts, sizeof((*qstr))*(qe - qs)));

            // if(t0 > ts || q0 > qs) {
            //     fprintf(stderr, "[M::%s] rid::%lu, ql::%lu, tl::%lu\n", __func__, rid, ql, tl);
            // }
            // fprintf(stderr, "[M::%s] qseq::[%lu,%lu), ql::%lu, tseq::[%lu,%lu), tl::%lu\n", __func__, t0, ts, tl, q0, qs, ql);

            gen_cc_fly(tcc_res, tstr + t0, ts - t0, qstr + q0, qs - q0, exz, 0.25, MAX_SIN_L, MAX_SIN_E);

            // cal_updated_trace_len(tcc_res, &dbg_ql, &dbg_tl);
            // assert(dbg_ql == ts && dbg_tl == qs);

            // fprintf(stderr, "******\n");
            
            push_trace_bp_f(tcc_res, 0, (uint16_t)-1, (uint16_t)-1,  qe - qs, 1);

            // cal_updated_trace_len(tcc_res, &dbg_ql, &dbg_tl);
            // assert(dbg_ql == te && dbg_tl == qe);

            q0 = qe; t0 = te;
        }

        qs = ql; ts = tl;
        // fprintf(stderr, "[M::%s] qseq::[%lu,%lu), ql::%lu, tseq::[%lu,%lu), tl::%lu\n", __func__, t0, ts, tl, q0, qs, ql);
        gen_cc_fly(tcc_res, tstr + t0, ts - t0, qstr + q0, qs - q0, exz, 0.25, MAX_SIN_L, MAX_SIN_E);
        // if(!(dbg_ql == ts && dbg_tl == qs)) {
        //     fprintf(stderr, "[M::%s] rid::%lu, qseq::[%lu,%lu), ql::%lu, tseq::[%lu,%lu), tl::%lu\n", __func__, rid, t0, ts, tl, q0, qs, ql);
        // }
        // cal_updated_trace_len(tcc_res, &dbg_ql, &dbg_tl);
        // assert(dbg_ql == ts && dbg_tl == qs);

        // fprintf(stderr, "[M::%s] srt_n::%lu, nl::%lu, ql::%lu, tl::%lu\n", __func__, srt_n, nl, ql, tl);
    } else {
        gen_cc_fly(tcc_res, tstr, tl, qstr, ql, exz, 0.25, MAX_SIN_L, MAX_SIN_E);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %rcx, 0x30(%rsp)
movq %rdx, 0x48(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x98(%rsp), %rax
movq $0x0, (%rax)
movq %rdi, 0x10(%rsp)
movq (%rdi), %rax
testq %rax, %rax
je 0x190968
xorl %ecx, %ecx
movw $0xffff, %bp            # imm = 0xFFFF
xorl %r13d, %r13d
xorl %r15d, %r15d
movq 0x10(%rsp), %rdx
movq 0x10(%rdx), %rdi
movzwl (%rdi,%rcx,2), %r8d
movl %r8d, %edx
shrl $0xe, %edx
movw %bp, 0xc(%rsp)
movw %bp, 0xe(%rsp)
leal -0x2(%rdx), %ecx
movzwl %r8w, %esi
cmpl $0x2, %ecx
jae 0x1907c4
movw $0xfff, %r9w            # imm = 0xFFF
movw $0xc, %cx
leaq 0xc(%rsp), %r10
jmp 0x1907e9
movw $0x3fff, %r9w           # imm = 0x3FFF
testl %edx, %edx
je 0x1907f7
movl %r8d, %ecx
shrl $0xc, %ecx
andl $0x3, %ecx
movw %cx, 0xc(%rsp)
movw $0x3ff, %r9w            # imm = 0x3FF
movw $0xa, %cx
leaq 0xe(%rsp), %r10
movl %esi, %r11d
shrl %cl, %r11d
andl $0x3, %r11d
movw %r11w, (%r10)
movzwl %r9w, %ecx
andl %r8d, %ecx
incl %r13d
cmpq %r13, %rax
jbe 0x190891
movzwl 0xe(%rsp), %r8d
movzwl 0xc(%rsp), %r9d
movzwl (%rdi,%r13,2), %r10d
movl %r10d, %r11d
shrl $0xe, %r11d
cmpl %edx, %r11d
jne 0x190891
movzwl %dx, %r11d
leal -0x2(%r11), %ebx
cmpl $0x2, %ebx
jae 0x190848
movl %r10d, %r11d
shrl $0xc, %r11d
andl $0x3, %r11d
andl $0xfff, %r10d           # imm = 0xFFF
jmp 0x190859
testl %r11d, %r11d
jne 0x190860
andl $0x3fff, %r10d          # imm = 0x3FFF
movw $0xffff, %r11w          # imm = 0xFFFF
movl $0xffff, %ebx           # imm = 0xFFFF
jmp 0x19087b
movl %r10d, %r11d
shrl $0xc, %r11d
andl $0x3, %r11d
movl %r10d, %ebx
shrl $0xa, %ebx
andl $0x3, %ebx
andl $0x3ff, %r10d           # imm = 0x3FF
cmpl %r8d, %ebx
jne 0x190891
cmpw %r11w, %r9w
jne 0x190891
addl %r10d, %ecx
incl %r13d
cmpq %r13, %rax
ja 0x190816
cmpw $0x3, %dx
jne 0x1908a8
movzwl 0xc(%rsp), %edi
movw %di, 0xe(%rsp)
movw $0xffff, 0xc(%rsp)      # imm = 0xFFFF
movl %ecx, %ebx
addq %r15, %rbx
cmpw $0x2, %dx
movq %rbx, %r12
cmoveq %r15, %r12
cmpl $0x3fff, %esi           # imm = 0x3FFF
ja 0x190959
movq 0x98(%rsp), %r14
movq (%r14), %rcx
movq 0x10(%r14), %rax
cmpq 0x8(%r14), %rcx
jne 0x190900
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r14)
movq (%r14), %rcx
addq %r15, %r15
leaq 0x1(%rcx), %rdx
movq %rdx, (%r14)
movq %r15, (%rax,%rcx,8)
movq (%r14), %rcx
cmpq 0x8(%r14), %rcx
jne 0x19093e
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r14)
movq (%r14), %rcx
leaq 0x1(,%rbx,2), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%r14)
movq %rdx, (%rax,%rcx,8)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movl %r13d, %ecx
movq %r12, %r15
cmpq %rcx, %rax
ja 0x19078a
movq 0x20(%rsp), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x190b63
xorl %ecx, %ecx
movw $0xffff, %bp            # imm = 0xFFFF
xorl %r13d, %r13d
xorl %r15d, %r15d
movq 0x20(%rsp), %rdx
movq 0x10(%rdx), %rdi
movzwl (%rdi,%rcx,2), %r8d
movl %r8d, %edx
shrl $0xe, %edx
movw %bp, 0xc(%rsp)
movw %bp, 0xe(%rsp)
leal -0x2(%rdx), %ecx
movzwl %r8w, %esi
cmpl $0x2, %ecx
jae 0x1909bf
movw $0xfff, %r9w            # imm = 0xFFF
movw $0xc, %cx
leaq 0xc(%rsp), %r10
jmp 0x1909e4
movw $0x3fff, %r9w           # imm = 0x3FFF
testl %edx, %edx
je 0x1909f2
movl %r8d, %ecx
shrl $0xc, %ecx
andl $0x3, %ecx
movw %cx, 0xc(%rsp)
movw $0x3ff, %r9w            # imm = 0x3FF
movw $0xa, %cx
leaq 0xe(%rsp), %r10
movl %esi, %r11d
shrl %cl, %r11d
andl $0x3, %r11d
movw %r11w, (%r10)
movzwl %r9w, %ecx
andl %r8d, %ecx
incl %r13d
cmpq %r13, %rax
jbe 0x190a8c
movzwl 0xe(%rsp), %r8d
movzwl 0xc(%rsp), %r9d
movzwl %dx, %r10d
leal -0x2(%r10), %r11d
movzwl (%rdi,%r13,2), %ebx
movl %ebx, %r14d
shrl $0xe, %r14d
cmpl %edx, %r14d
jne 0x190a8c
cmpl $0x2, %r11d
jae 0x190a43
movl %ebx, %r12d
shrl $0xc, %r12d
andl $0x3, %r12d
andl $0xfff, %ebx            # imm = 0xFFF
jmp 0x190a53
testl %r10d, %r10d
jne 0x190a5b
andl $0x3fff, %ebx           # imm = 0x3FFF
movw $0xffff, %r12w          # imm = 0xFFFF
movl $0xffff, %r14d          # imm = 0xFFFF
jmp 0x190a77
movl %ebx, %r12d
shrl $0xc, %r12d
andl $0x3, %r12d
movl %ebx, %r14d
shrl $0xa, %r14d
andl $0x3, %r14d
andl $0x3ff, %ebx            # imm = 0x3FF
cmpl %r8d, %r14d
jne 0x190a8c
cmpw %r12w, %r9w
jne 0x190a8c
addl %ebx, %ecx
incl %r13d
cmpq %r13, %rax
ja 0x190a19
cmpw $0x3, %dx
jne 0x190aa3
movzwl 0xc(%rsp), %edi
movw %di, 0xe(%rsp)
movw $0xffff, 0xc(%rsp)      # imm = 0xFFFF
movl %ecx, %ebx
addq %r15, %rbx
cmpw $0x3, %dx
movq %rbx, %r12
cmoveq %r15, %r12
cmpl $0x3fff, %esi           # imm = 0x3FFF
ja 0x190b54
movq 0x98(%rsp), %r14
movq (%r14), %rcx
movq 0x10(%r14), %rax
cmpq 0x8(%r14), %rcx
jne 0x190afb
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r14)
movq (%r14), %rcx
addq %r15, %r15
leaq 0x1(%rcx), %rdx
movq %rdx, (%r14)
movq %r15, (%rax,%rcx,8)
movq (%r14), %rcx
cmpq 0x8(%r14), %rcx
jne 0x190b39
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r14)
movq (%r14), %rcx
leaq 0x1(,%rbx,2), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%r14)
movq %rdx, (%rax,%rcx,8)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movl %r13d, %ecx
movq %r12, %r15
cmpq %rcx, %rax
ja 0x190985
movq 0xa0(%rsp), %r14
movq 0x90(%rsp), %r15
movq 0x98(%rsp), %rbx
movq (%rbx), %rax
movq 0x10(%rbx), %rdi
leaq (%rdi,%rax,8), %rsi
callq 0x17fc92
cmpq $0x0, (%rbx)
movq 0x38(%rsp), %rsi
movq 0x48(%rsp), %rdi
je 0x190e76
movq 0x10(%rbx), %rax
movq $-0x1, %r9
xorl %ecx, %ecx
xorl %r12d, %r12d
xorl %edx, %edx
movq (%rax,%rcx,8), %r10
cmpq $0x2, %rdx
jb 0x190bda
cmpq $-0x1, %r9
je 0x190bda
movq %r10, %r8
shrq %r8
cmpq %r9, %r8
jbe 0x190bda
shlq $0x20, %r9
orq %r9, %r8
movq %r8, (%rax,%r12,8)
incq %r12
andl $0x1, %r10d
negq %r10
orq $0x1, %r10
addq %r10, %rdx
movq $-0x1, %r9
cmpq $0x2, %rdx
jb 0x190bfc
movq (%rax,%rcx,8), %r9
shrq %r9
incq %rcx
cmpq (%rbx), %rcx
jb 0x190bb1
testq %r12, %r12
je 0x190e76
movq %r12, (%rbx)
xorl %r15d, %r15d
xorl %ebx, %ebx
xorl %r13d, %r13d
xorl %r14d, %r14d
movq %r12, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movl %r13d, %r13d
cmpq %r13, %rax
jbe 0x190e93
movq 0x10(%rsp), %rcx
movq 0x10(%rcx), %rdi
movzwl (%rdi,%r13,2), %r8d
movl %r8d, %edx
shrl $0xe, %edx
movw $0xffff, %cx            # imm = 0xFFFF
movw %cx, 0xc(%rsp)
movw %cx, 0xe(%rsp)
leal -0x2(%rdx), %ecx
movzwl %r8w, %esi
cmpl $0x2, %ecx
movq %r15, 0x28(%rsp)
movq %rbx, %rbp
jae 0x190c7a
movw $0xfff, %r9w            # imm = 0xFFF
movw $0xc, %cx
leaq 0xc(%rsp), %r10
jmp 0x190c9f
movw $0x3fff, %r9w           # imm = 0x3FFF
testl %edx, %edx
je 0x190cad
movl %r8d, %ecx
shrl $0xc, %ecx
andl $0x3, %ecx
movw %cx, 0xc(%rsp)
movw $0x3ff, %r9w            # imm = 0x3FF
movw $0xa, %cx
leaq 0xe(%rsp), %r10
movl %esi, %r11d
shrl %cl, %r11d
andl $0x3, %r11d
movw %r11w, (%r10)
movzwl %r9w, %ecx
andl %r8d, %ecx
incl %r13d
cmpq %r13, %rax
jbe 0x190d47
movzwl 0xe(%rsp), %r8d
movzwl 0xc(%rsp), %r9d
movzwl (%rdi,%r13,2), %r10d
movl %r10d, %r11d
shrl $0xe, %r11d
cmpl %edx, %r11d
jne 0x190d47
movzwl %dx, %r11d
leal -0x2(%r11), %ebx
cmpl $0x2, %ebx
jae 0x190cfe
movl %r10d, %r11d
shrl $0xc, %r11d
andl $0x3, %r11d
andl $0xfff, %r10d           # imm = 0xFFF
jmp 0x190d0f
testl %r11d, %r11d
jne 0x190d16
andl $0x3fff, %r10d          # imm = 0x3FFF
movw $0xffff, %r11w          # imm = 0xFFFF
movl $0xffff, %ebx           # imm = 0xFFFF
jmp 0x190d31
movl %r10d, %r11d
shrl $0xc, %r11d
andl $0x3, %r11d
movl %r10d, %ebx
shrl $0xa, %ebx
andl $0x3, %ebx
andl $0x3ff, %r10d           # imm = 0x3FF
cmpl %r8d, %ebx
jne 0x190d47
cmpw %r11w, %r9w
jne 0x190d47
addl %r10d, %ecx
incl %r13d
cmpq %r13, %rax
ja 0x190ccc
cmpw $0x3, %dx
jne 0x190d5e
movzwl 0xc(%rsp), %edi
movw %di, 0xe(%rsp)
movw $0xffff, 0xc(%rsp)      # imm = 0xFFFF
cmpw $0x2, %dx
movl %ecx, %r15d
movq %r15, %rbx
movl $0x0, %ecx
cmoveq %rcx, %rbx
addq %rbp, %rbx
cmpw $0x3, %dx
cmoveq %rcx, %r15
movq 0x28(%rsp), %r9
addq %r9, %r15
cmpl $0x3fff, %esi           # imm = 0x3FFF
ja 0x190c28
movq %rbp, %r8
testq %r14, %r14
je 0x190db7
cmpq %r12, %r14
jae 0x190db2
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rax
movl (%rax,%r14,8), %eax
cmpq %r8, %rax
jbe 0x190dba
decq %r14
jne 0x190d98
xorl %r14d, %r14d
subq %r8, %r9
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rax
movq %r8, 0x50(%rsp)
movq %r9, 0x28(%rsp)
movq (%rax,%r14,8), %rbp
movl %ebp, %r12d
shrq $0x20, %rbp
cmpq %rbx, %rbp
jae 0x190e6c
cmpq %r8, %rbp
jb 0x190e53
cmpq %rbx, %r12
ja 0x190e53
movq 0x98(%rsp), %rdi
movq (%rdi), %rcx
cmpq 0x8(%rdi), %rcx
jne 0x190e3b
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%rdi)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq 0x98(%rsp), %rdi
movq 0x28(%rsp), %r9
movq 0x50(%rsp), %r8
movq %rax, 0x10(%rdi)
movq (%rdi), %rcx
addq %r9, %rbp
addq %r9, %r12
shlq $0x20, %rbp
orq %r12, %rbp
leaq 0x1(%rcx), %rdx
movq %rdx, (%rdi)
movq %rbp, (%rax,%rcx,8)
incq %r14
movq 0x18(%rsp), %r12
cmpq %r14, %r12
jne 0x190dd3
movq %r12, %r14
jmp 0x190c20
movq 0x18(%rsp), %r12
jmp 0x190c20
movsd 0xa0752(%rip), %xmm0    # 0x2315d0
movq %r15, %rdx
movq 0x30(%rsp), %rcx
movq 0x40(%rsp), %r8
movq %r14, %r9
jmp 0x191210
leaq (%r12,%r12), %rax
movq 0x98(%rsp), %r15
cmpq %rax, (%r15)
jne 0x19122e
xorl %r14d, %r14d
xorl %ebp, %ebp
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x20(%rsp), %rax
movq (%rax), %rax
movl %r12d, %r12d
cmpq %r12, %rax
jbe 0x191100
movq 0x20(%rsp), %rcx
movq 0x10(%rcx), %rdi
movzwl (%rdi,%r12,2), %r8d
movl %r8d, %edx
shrl $0xe, %edx
movw $0xffff, %cx            # imm = 0xFFFF
movw %cx, 0xc(%rsp)
movw %cx, 0xe(%rsp)
leal -0x2(%rdx), %ecx
movzwl %r8w, %esi
cmpl $0x2, %ecx
movq %r14, 0x10(%rsp)
movq %rbp, %r15
jae 0x190f0d
movw $0xfff, %r9w            # imm = 0xFFF
movw $0xc, %cx
leaq 0xc(%rsp), %r10
jmp 0x190f32
movw $0x3fff, %r9w           # imm = 0x3FFF
testl %edx, %edx
je 0x190f40
movl %r8d, %ecx
shrl $0xc, %ecx
andl $0x3, %ecx
movw %cx, 0xc(%rsp)
movw $0x3ff, %r9w            # imm = 0x3FF
movw $0xa, %cx
leaq 0xe(%rsp), %r10
movl %esi, %r11d
shrl %cl, %r11d
andl $0x3, %r11d
movw %r11w, (%r10)
movzwl %r9w, %ecx
andl %r8d, %ecx
incl %r12d
cmpq %r12, %rax
jbe 0x190fda
movzwl 0xe(%rsp), %r8d
movzwl 0xc(%rsp), %r9d
movzwl (%rdi,%r12,2), %r10d
movl %r10d, %r11d
shrl $0xe, %r11d
cmpl %edx, %r11d
jne 0x190fda
movzwl %dx, %r11d
leal -0x2(%r11), %ebx
cmpl $0x2, %ebx
jae 0x190f91
movl %r10d, %r11d
shrl $0xc, %r11d
andl $0x3, %r11d
andl $0xfff, %r10d           # imm = 0xFFF
jmp 0x190fa2
testl %r11d, %r11d
jne 0x190fa9
andl $0x3fff, %r10d          # imm = 0x3FFF
movw $0xffff, %r11w          # imm = 0xFFFF
movl $0xffff, %ebx           # imm = 0xFFFF
jmp 0x190fc4
movl %r10d, %r11d
shrl $0xc, %r11d
andl $0x3, %r11d
movl %r10d, %ebx
shrl $0xa, %ebx
andl $0x3, %ebx
andl $0x3ff, %r10d           # imm = 0x3FF
cmpl %r8d, %ebx
jne 0x190fda
cmpw %r11w, %r9w
jne 0x190fda
addl %r10d, %ecx
incl %r12d
cmpq %r12, %rax
ja 0x190f5f
cmpw $0x3, %dx
jne 0x190ff1
movzwl 0xc(%rsp), %edi
movw %di, 0xe(%rsp)
movw $0xffff, 0xc(%rsp)      # imm = 0xFFFF
cmpw $0x2, %dx
movl %ecx, %r14d
movq %r14, %rbp
movl $0x0, %ecx
cmoveq %rcx, %rbp
addq %r15, %rbp
cmpw $0x3, %dx
cmoveq %rcx, %r14
movq 0x10(%rsp), %r9
addq %r9, %r14
cmpl $0x3fff, %esi           # imm = 0x3FFF
ja 0x190ebb
movq %r15, %r8
testq %r13, %r13
je 0x191051
movq 0x98(%rsp), %rcx
cmpq 0x18(%rsp), %r13
jae 0x191047
movq 0x10(%rcx), %rax
movl (%rax,%r13,8), %eax
cmpq %r9, %rax
jbe 0x19105c
decq %r13
jne 0x191033
xorl %r13d, %r13d
jmp 0x19105c
xorl %r13d, %r13d
movq 0x98(%rsp), %rcx
subq %r9, %r8
movq 0x10(%rcx), %rax
movq %r8, 0x28(%rsp)
movq (%rax,%r13,8), %rbx
movl %ebx, %r15d
shrq $0x20, %rbx
cmpq %r14, %rbx
jae 0x190eb3
cmpq %r9, %rbx
jb 0x1910e8
cmpq %r14, %r15
ja 0x1910e8
movq 0x98(%rsp), %rdi
movq (%rdi), %rcx
cmpq 0x8(%rdi), %rcx
jne 0x1910d0
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%rdi)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq 0x98(%rsp), %rdi
movq 0x10(%rsp), %r9
movq 0x28(%rsp), %r8
movq %rax, 0x10(%rdi)
movq (%rdi), %rcx
addq %r8, %rbx
addq %r8, %r15
shlq $0x20, %rbx
orq %r15, %rbx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rdi)
movq %rbx, (%rax,%rcx,8)
incq %r13
cmpq %r13, 0x18(%rsp)
jne 0x191068
movq 0x18(%rsp), %r13
jmp 0x190eb3
movq 0x18(%rsp), %rcx
leaq (%rcx,%rcx,2), %rax
movq 0x98(%rsp), %rdx
cmpq %rax, (%rdx)
jne 0x19124d
movq 0x48(%rsp), %rbx
movq $0x0, (%rbx)
leaq (,%rcx,8), %rax
addq 0x10(%rdx), %rax
movq %rax, 0x20(%rsp)
leaq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
xorl %ebp, %ebp
xorl %r12d, %r12d
xorl %r15d, %r15d
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq (%rax,%r15,8), %r13
movq %r13, %r14
shrq $0x20, %r14
addq %r12, %rcx
movq %r14, %r8
subq %r12, %r8
movl %r13d, %r12d
movq 0x10(%rsp), %rax
movq (%rax,%r15,8), %rax
movq %rax, %rdx
shrq $0x20, %rdx
movq 0x38(%rsp), %rsi
addq %rbp, %rsi
subq %rbp, %rdx
movl %eax, %ebp
movq %rbx, %rdi
movq 0xa0(%rsp), %r9
movsd 0xa0437(%rip), %xmm0    # 0x2315d0
pushq $0x7ff                  # imm = 0x7FF
pushq $0x2710                 # imm = 0x2710
callq 0x18ffd2
addq $0x10, %rsp
subl %r14d, %r13d
movq %rbx, %rdi
xorl %esi, %esi
movl $0xffff, %edx           # imm = 0xFFFF
movl $0xffff, %ecx           # imm = 0xFFFF
movl %r13d, %r8d
movl $0x1, %r9d
callq 0x1967e1
movq 0x30(%rsp), %rcx
incq %r15
cmpq %r15, 0x18(%rsp)
jne 0x19114d
movq 0x38(%rsp), %rsi
addq %rbp, %rsi
movq 0x90(%rsp), %rdx
subq %rbp, %rdx
addq %r12, %rcx
movq 0x40(%rsp), %r8
subq %r12, %r8
movsd 0xa03cb(%rip), %xmm0    # 0x2315d0
movq %rbx, %rdi
movq 0xa0(%rsp), %r9
pushq $0x7ff                  # imm = 0x7FF
pushq $0x2710                 # imm = 0x2710
callq 0x18ffd2
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xae16e(%rip), %rdi     # 0x23f3a3
leaq 0xacdff(%rip), %rsi     # 0x23e03b
leaq 0xae175(%rip), %rcx     # 0x23f3b8
movl $0x15e4, %edx           # imm = 0x15E4
callq 0x2110
leaq 0xae1e3(%rip), %rdi     # 0x23f437
leaq 0xacde0(%rip), %rsi     # 0x23e03b
leaq 0xae156(%rip), %rcx     # 0x23f3b8
movl $0x1602, %edx           # imm = 0x1602
callq 0x2110