// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]oatk/syncasm.c
// Function: make_ma_block
static void make_ma_block(scg_t *g, sr_t *sr, scg_ra_t *ra, uint32_t n, ma_t *ma)
{
    uint32_t i, j, n_scm, n_frg;
    uint64_t uid, *scm, *u_scm, *lcs_b, s_beg, u_n, s_n;
    double score, intpart;
    int max_d, n_b;
    ra_frg_t *frg;

    // collect syncmers on read
    n_scm = sr->n;
    scm = sr->k_mer;

    score = modf(ra[0].s, &intpart);
    if (score < FLT_EPSILON) score = 1.0;
    max_d = n_scm - lround(ra[0].s - score);
    
    // find LCS blocks for each alignment record
    lcs_block_t lcs_blocks[n];
    for (i = 0; i < n; ++i) {
        n_frg = ra[i].n;
        kv_init(lcs_blocks[i]);

        for (j = 0; j < n_frg; ++j) {
            frg = &ra[i].a[j];
            uid = frg->uid >> 1;
            u_n = frg->u_end - frg->u_beg + 1;
            s_n = frg->s_end - frg->s_beg + 1;
            if (frg->uid & 1) {
                // mapped to reverse strand
                MYMALLOC(u_scm, u_n);
                memcpy(u_scm, &g->utg_asmg->vtx[uid].a[frg->u_beg], sizeof(uint64_t) * u_n);
                array_reverse(u_scm, u_n);
            } else {
                u_scm = &g->utg_asmg->vtx[uid].a[frg->u_beg];
            }
            // find LCS
            lcs_b = find_lcs(&scm[frg->s_beg], s_n, u_scm, u_n, frg->s_beg, max_d, &n_b);
            // add LCS blocks
            kv_pushn(uint64_t, lcs_blocks[i], lcs_b, n_b);
            free(lcs_b);
            if (frg->uid & 1) free(u_scm);
        }
        // merge blocks
        // lcs_block_merge(&lcs_blocks[i]);
    }

    // make multiple alignment
    uint64_t uids[n], frgs[n], lcsb[n], begs[n], lens[n];
    int m_ext, ext;
    kvec_t(uint32_t) n_match;
    kvec_t(uint64_t) u_match;
    kv_init(n_match);
    kv_init(u_match);
    MYBZERO(lcsb, n);
    MYBZERO(frgs, n);

    for (i = 0; i < n; ++i) {
        if (lcs_blocks[i].n == 0)
            goto ma_done;
        shift_lcs_block(i);
    }

    while (1) {
        // find left alignment position
        s_beg = 0;
        for (i = 0; i < n; ++i)
            s_beg = MAX(s_beg, begs[i]);
        // find max extension
        m_ext = INT32_MAX;
        for (i = 0; i < n; ++i) {
            ext = (int) lens[i] - s_beg + begs[i];
            m_ext = MIN(m_ext, ext);
        }
        if (m_ext > 0) {
            // add ma block
            kv_push(uint32_t, n_match, m_ext);
            for (i = 0; i < n; ++i)
                kv_push(uint64_t, u_match, uids[i]);
            // shift LCS blocks
            for (i = 0; i < n; ++i) {
                ext = (int) lens[i] - s_beg + begs[i];
                if (ext == m_ext) {
                    // shift the block
                    ++lcsb[i];
                    if (lcsb[i] == lcs_blocks[i].n)
                        goto ma_done;
                    shift_lcs_block(i);
                } else {
                    begs[i] = s_beg + m_ext;
                    lens[i] = ext - m_ext;
                }
            }
        } else {
            // shift the block with smallest begs
            for (i = 0, j = 1; j < n; ++j)
                if (begs[j] < begs[i])
                    i = j;
            ++lcsb[i];
            if (lcsb[i] == lcs_blocks[i].n)
                goto ma_done;
            shift_lcs_block(i);
        }
    }

ma_done:
    for (i = 0; i < n; ++i)
        kv_destroy(lcs_blocks[i]);

    ma->a = n;
    ma->b = n_match.n;
    ma->n = n_match.a;
    ma->u = u_match.a;

#ifdef DEBUG_LCS_MALIGN
    fprintf(stderr, "[DEBUG_LCS_MALIGN::%s] MA BLOCKs of read %lu - %s\n", __func__, sr->sid, sr->sname);
    for (i = 0; i < ma->a; ++i) {
        fprintf(stderr, "[DEBUG_LCS_MALIGN::%s] MA_RECORD %u -", __func__, i);
        for (j = 0; j < ma->b; ++j)
            fprintf(stderr, " BLOCK %u: %lu %u;", j, ma->u[j * (ma->a) + i], ma->n[j]);
        fputc('\n', stderr);
    }
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %r8, -0xe0(%rbp)
movl %ecx, %ebx
movq %rdi, -0xc8(%rbp)
movq 0x50(%rsi), %rax
movq %rax, -0xd0(%rbp)
movq %rdx, -0x98(%rbp)
movsd 0x18(%rdx), %xmm0
movsd %xmm0, -0x30(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x21a0
movapd %xmm0, %xmm1
cmpltsd 0x12df5(%rip), %xmm1    # 0x1d808
movsd 0x12db5(%rip), %xmm2    # 0x1d7d0
andpd %xmm1, %xmm2
andnpd %xmm0, %xmm1
orpd %xmm1, %xmm2
movsd -0x30(%rbp), %xmm0
subsd %xmm2, %xmm0
callq 0x2110
movq %rsp, -0xd8(%rbp)
movl %ebx, %r14d
movq %rsp, %rcx
leaq (%r14,%r14,2), %rax
leaq 0xf(,%rax,8), %rax
andq $-0x10, %rax
subq %rax, %rcx
movq %rcx, -0x88(%rbp)
movq %rcx, %rsp
movl %ebx, -0x64(%rbp)
testl %ebx, %ebx
movq %r14, -0x50(%rbp)
je 0xb0b1
movq -0xd0(%rbp), %rax
addq $-0x8, %rax
movq %rax, -0xf0(%rbp)
xorl %ecx, %ecx
movq %rcx, %rdx
shlq $0x5, %rdx
movq -0x98(%rbp), %rax
movq %rdx, -0xb8(%rbp)
movl 0x8(%rax,%rdx), %edx
movq %rcx, -0xe8(%rbp)
leaq (%rcx,%rcx,2), %rax
movq -0x88(%rbp), %rcx
xorpd %xmm0, %xmm0
movupd %xmm0, (%rcx,%rax,8)
movq $0x0, 0x10(%rcx,%rax,8)
movq %rdx, -0x100(%rbp)
testq %rdx, %rdx
je 0xb09a
movq -0xb8(%rbp), %rcx
addq -0x98(%rbp), %rcx
movq %rcx, -0xb8(%rbp)
movq -0x88(%rbp), %rcx
leaq (%rcx,%rax,8), %r13
xorl %r15d, %r15d
movq %r13, -0xf8(%rbp)
movq -0xb8(%rbp), %rax
movq 0x10(%rax), %rdx
movq %r15, -0x120(%rbp)
shlq $0x5, %r15
movq (%rdx,%r15), %rax
movq 0x8(%rdx,%r15), %r13
movq %rax, %rcx
shrq %rcx
movq 0x10(%rdx,%r15), %r11
movq %r11, %r14
subq %r13, %r14
leaq 0x1(%r14), %r9
movl 0x1c(%rdx,%r15), %esi
movl %esi, -0x60(%rbp)
movl 0x18(%rdx,%r15), %esi
movl %esi, -0x58(%rbp)
leaq (%rcx,%rcx,4), %r12
testb $0x1, %al
jne 0xab66
movq -0xc8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
leaq (,%r13,8), %r10
addq 0x8(%rax,%r12,8), %r10
jmp 0xabfd
movq %r11, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq %r9, -0x30(%rbp)
leaq (,%r9,8), %rbx
movq %rbx, %rdi
callq 0x2320
movq %rax, %rdi
movq -0xc8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
leaq (,%r13,8), %rsi
addq 0x8(%rax,%r12,8), %rsi
movq %rdi, %r12
movq %rbx, %rdx
callq 0x22c0
decq %r14
cmpq $-0x3, %r14
ja 0xabee
movq %r13, %rax
notq %rax
movq -0x40(%rbp), %r11
addq %r11, %rax
xorl %ecx, %ecx
movq %r12, %r10
movq (%r10,%rcx,8), %rdx
movq 0x8(%r10,%rax,8), %rsi
movq %rsi, (%r10,%rcx,8)
movq %rdx, 0x8(%r10,%rax,8)
incq %rcx
leaq -0x1(%rax), %rdx
cmpq %rax, %rcx
movq %rdx, %rax
jb 0xabc7
movq -0x38(%rbp), %rdx
jmp 0xabf9
movq -0x38(%rbp), %rdx
movq %r12, %r10
movq -0x40(%rbp), %r11
movq -0x30(%rbp), %r9
addq %r15, %rdx
movl -0x60(%rbp), %eax
subl -0x58(%rbp), %eax
movq %rax, -0x118(%rbp)
leal 0x1(%rax), %edi
movq %rdx, -0x38(%rbp)
movl 0x18(%rdx), %ecx
movq -0xd0(%rbp), %rax
movq %rcx, -0xa8(%rbp)
leaq (%rax,%rcx,8), %r15
xorpd %xmm0, %xmm0
movapd %xmm0, -0x80(%rbp)
movq $0x0, -0x70(%rbp)
cmpl %r9d, %edi
movl %r9d, %r12d
cmovll %edi, %r12d
testl %r12d, %r12d
jle 0xac66
movl %r12d, %eax
xorl %ecx, %ecx
movq (%r10,%rcx,8), %rdx
xorq (%r15,%rcx,8), %rdx
cmpq $0x1, %rdx
ja 0xac6b
incq %rcx
cmpq %rcx, %rax
jne 0xac4e
jmp 0xac6e
xorl %r12d, %r12d
jmp 0xac6e
movl %ecx, %r12d
movq -0xa8(%rbp), %rsi
movslq %esi, %rax
movq %rax, -0x30(%rbp)
movl %edi, -0xbc(%rbp)
movslq %edi, %rax
movslq %r12d, %r14
movslq %r9d, %rcx
leaq (%r10,%rcx,8), %rdx
addq $-0x8, %rdx
leaq (,%rsi,8), %rsi
leaq (%rsi,%rax,8), %rsi
addq -0xf0(%rbp), %rsi
movl %r11d, %edi
subl %r14d, %edi
movq %r13, -0x48(%rbp)
subl %r13d, %edi
addl $0x2, %edi
xorl %r8d, %r8d
movq %r8, %rbx
movl %edi, %r13d
leaq (%rax,%r8), %rdi
cmpq %r14, %rdi
jle 0xace7
leaq (%rcx,%rbx), %rdi
cmpq %r14, %rdi
jle 0xace7
movq (%rdx,%rbx,8), %r9
xorq (%rsi,%rbx,8), %r9
leaq -0x1(%rbx), %r8
leal -0x1(%r13), %edi
cmpq $0x2, %r9
jb 0xacb9
testl %r12d, %r12d
movq %r10, -0xa0(%rbp)
movl %r12d, -0x90(%rbp)
je 0xad3a
movq $0x2, -0x78(%rbp)
movl $0x10, %edi
movq %r11, %r12
callq 0x2320
movq %r12, %r11
movl -0x90(%rbp), %r12d
movq -0xa0(%rbp), %r10
movq %rax, -0x70(%rbp)
movq -0x30(%rbp), %rcx
shlq $0x20, %rcx
orq %r14, %rcx
movq $0x1, -0x80(%rbp)
movq %rcx, (%rax)
movl -0x60(%rbp), %eax
movl %eax, %edx
subl %r12d, %edx
subl -0x58(%rbp), %edx
movl %r12d, %eax
leaq (%r15,%rax,8), %rcx
movq %rcx, -0x30(%rbp)
leaq (%r10,%rax,8), %r14
movq %rdx, -0xb0(%rbp)
leaq (%rdx,%rbx), %rax
movq %rax, -0x108(%rbp)
subl %r12d, %r11d
subl -0x48(%rbp), %r11d
leal 0x2(%rax), %r12d
movq %r11, -0x40(%rbp)
leaq (%r11,%rbx), %rcx
addq $0x2, %rcx
movq %rcx, %rax
movq %rcx, -0x48(%rbp)
imull %r12d, %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x2250
movq %rax, %r15
movslq %r12d, %rdi
shlq $0x3, %rdi
callq 0x2320
movq %rax, %r12
movq %r15, -0x110(%rbp)
movq %r15, (%rax)
cmpl $0x0, -0x108(%rbp)
js 0xae58
movq -0xb0(%rbp), %rsi
addq %rbx, %rsi
movq -0x40(%rbp), %rax
addq %rbx, %rax
movslq -0x48(%rbp), %rcx
movslq %eax, %rdx
movl %esi, %esi
incq %rsi
movslq %r13d, %rdi
shlq $0x2, %rdi
movq %rdi, -0x48(%rbp)
movl $0x1, %r8d
movq -0x8(%r12,%r8,8), %r11
leaq (%r11,%rcx,4), %r9
movq %r9, (%r12,%r8,8)
testl %eax, %eax
js 0xae4c
movq -0x30(%rbp), %rdi
movq -0x8(%rdi,%r8,8), %r9
movq -0x8(%r12,%r8,8), %r10
movq -0x48(%rbp), %rdi
addq %rdi, %r11
addq $0x4, %r11
xorl %r13d, %r13d
movq (%r14,%r13,8), %r15
xorq %r9, %r15
cmpq $0x1, %r15
ja 0xae2f
movl (%r10,%r13,4), %r15d
incl %r15d
jmp 0xae40
movl 0x4(%r10,%r13,4), %edi
movl -0x4(%r11,%r13,4), %r15d
cmpl %r15d, %edi
cmovgl %edi, %r15d
movl %r15d, (%r11,%r13,4)
incq %r13
cmpq %rdx, %r13
jle 0xae19
leaq 0x1(%r8), %rdi
cmpq %rsi, %r8
movq %rdi, %r8
jne 0xadec
movq -0xb0(%rbp), %rax
leaq (%rax,%rbx), %rdx
incq %rdx
movq -0x40(%rbp), %rax
leaq (%rax,%rbx), %r8
incq %r8
movl -0x80(%rbp), %r13d
movq -0x30(%rbp), %rsi
addq $-0x8, %rsi
addq $-0x8, %r14
movl -0x90(%rbp), %r9d
addl -0xa8(%rbp), %r9d
subq $0x8, %rsp
movq %r12, %rdi
movq %r14, %rcx
leaq -0x80(%rbp), %rax
pushq %rax
callq 0xcc71
addq $0x10, %rsp
movq -0x110(%rbp), %rdi
callq 0x2060
movq %r12, %rdi
callq 0x2060
movq -0x80(%rbp), %rdx
cmpq %r13, %rdx
je 0xaf07
movq %r13, %rax
notq %rax
addq %rdx, %rax
je 0xaf07
movq -0x70(%rbp), %rsi
leaq (%rsi,%r13,8), %rcx
leaq (%rsi,%rdx,8), %rdx
addq $-0x8, %rdx
movl $0x1, %esi
movq -0x8(%rcx,%rsi,8), %rdi
movq (%rdx), %r8
movq %r8, -0x8(%rcx,%rsi,8)
movq %rdi, (%rdx)
decq %rax
addq $-0x8, %rdx
leaq 0x1(%rsi), %rdi
cmpq %rax, %rsi
movq %rdi, %rsi
jb 0xaee4
movq -0x118(%rbp), %rax
addq %rbx, %rax
incq %rax
cmpl %eax, -0xbc(%rbp)
movq -0xf8(%rbp), %r13
jle 0xaf83
movq -0x78(%rbp), %rax
cmpq %rax, -0x80(%rbp)
jne 0xaf52
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, -0x78(%rbp)
movq -0x70(%rbp), %rdi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0x70(%rbp)
movq -0xa8(%rbp), %rax
addl -0x60(%rbp), %eax
subl -0x58(%rbp), %eax
addl %ebx, %eax
incl %eax
shlq $0x20, %rax
negl %ebx
movslq %ebx, %rcx
orq %rax, %rcx
movq -0x80(%rbp), %rax
movq -0x70(%rbp), %rdx
leaq 0x1(%rax), %rsi
movq %rsi, -0x80(%rbp)
movq %rcx, (%rdx,%rax,8)
cmpq $0x2, -0x80(%rbp)
jb 0xafd9
movl $0x1, %ecx
movq -0x70(%rbp), %rdx
xorl %eax, %eax
movq (%rdx,%rax,8), %rsi
movq %rsi, %rdi
shrq $0x20, %rdi
movl %esi, %r8d
addq %rdi, %r8
movq (%rdx,%rcx,8), %rdi
movq %rdi, %r9
shrq $0x20, %r9
cmpq %r9, %r8
jne 0xafc1
movl %edi, %edi
addq %rsi, %rdi
movq %rdi, (%rdx,%rax,8)
jmp 0xafc9
movq %rdi, 0x8(%rdx,%rax,8)
incq %rax
incq %rcx
cmpq -0x80(%rbp), %rcx
jb 0xaf95
incq %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %r14
movq -0x70(%rbp), %rbx
movq (%r13), %r15
movslq %r14d, %r12
addq %r15, %r12
cmpq 0x8(%r13), %r12
jbe 0xb044
leaq -0x1(%r12), %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(%r13)
movq 0x10(%r13), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2360
movq %rax, 0x10(%r13)
shlq $0x20, %r14
shlq $0x3, %r15
addq 0x10(%r13), %r15
sarq $0x1d, %r14
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x22c0
movq %r12, (%r13)
movq %rbx, %rdi
callq 0x2060
movq -0x38(%rbp), %rax
testb $0x1, (%rax)
je 0xb083
movq -0xa0(%rbp), %rdi
callq 0x2060
movq -0x120(%rbp), %r15
incq %r15
cmpq -0x100(%rbp), %r15
jne 0xaaf9
movq -0xe8(%rbp), %rcx
incq %rcx
movq -0x50(%rbp), %r14
cmpq %r14, %rcx
jne 0xaa82
movq %rsp, %rcx
leaq 0xf(,%r14,8), %rax
andq $-0x10, %rax
subq %rax, %rcx
movq %rcx, -0x58(%rbp)
movq %rcx, %rsp
movq %rsp, %rbx
subq %rax, %rbx
movq %rbx, %rsp
movq %rsp, %rdi
subq %rax, %rdi
movq %rdi, %rsp
movq %rsp, %rcx
subq %rax, %rcx
movq %rcx, -0x48(%rbp)
movq %rcx, %rsp
movq %rsp, %rcx
subq %rax, %rcx
movq %rcx, -0x40(%rbp)
movq %rcx, %rsp
leaq (,%r14,8), %r12
xorl %r13d, %r13d
movq %rdi, -0x60(%rbp)
xorl %esi, %esi
movq %r12, %rdx
callq 0x21e0
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x21e0
movl -0x64(%rbp), %r15d
testl %r15d, %r15d
movq -0x88(%rbp), %r12
je 0xb1bf
xorl %eax, %eax
movl %eax, %eax
leaq (%rax,%rax,2), %rcx
cmpq $0x0, (%r12,%rcx,8)
je 0xb4d4
leaq (%r12,%rcx,8), %rcx
movq 0x10(%rcx), %rcx
movq -0x60(%rbp), %rdx
movq (%rdx,%rax,8), %rdx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %edx
shrq $0x20, %rcx
movq -0x48(%rbp), %rsi
movq %rcx, (%rsi,%rax,8)
movq -0x40(%rbp), %rsi
movq %rdx, (%rsi,%rax,8)
movq %rax, %rdx
shlq $0x5, %rdx
movq -0x98(%rbp), %rsi
movq 0x10(%rsi,%rdx), %rsi
movq (%rbx,%rax,8), %rdi
leaq -0x1(%rdi), %rdx
shlq $0x5, %rdi
addq %rdi, %rsi
addq $0x1c, %rsi
movq %rsi, %rdi
incq %rdx
addq $0x20, %rsi
cmpl %ecx, (%rdi)
jb 0xb193
movq %rdx, (%rbx,%rax,8)
movq -0x3c(%rsi), %rcx
shrq %rcx
movq -0x58(%rbp), %rdx
movq %rcx, (%rdx,%rax,8)
incl %eax
cmpl %r15d, %eax
jne 0xb132
xorl %r13d, %r13d
movq $0x0, -0xa0(%rbp)
movq $0x0, -0x38(%rbp)
xorl %r11d, %r11d
movq $0x0, -0x90(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x48(%rbp), %r9
movq -0x40(%rbp), %r10
movq %rbx, -0xa8(%rbp)
testl %r15d, %r15d
je 0xb21f
xorl %eax, %eax
xorl %ecx, %ecx
movq -0x50(%rbp), %rdx
movq (%r9,%rax,8), %r12
cmpq %r12, %rcx
cmovaq %rcx, %r12
incq %rax
movq %r12, %rcx
cmpq %rax, %rdx
jne 0xb207
jmp 0xb222
xorl %r12d, %r12d
movl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
testl %r15d, %r15d
je 0xb24d
xorl %eax, %eax
movq -0x50(%rbp), %rdx
movl (%r10,%rax,8), %ecx
subl %r12d, %ecx
addl (%r9,%rax,8), %ecx
cmpl %ecx, %r14d
cmovgel %ecx, %r14d
incq %rax
cmpq %rax, %rdx
jne 0xb233
testl %r14d, %r14d
jle 0xb3ff
movq -0xa0(%rbp), %rax
cmpq %rax, -0x38(%rbp)
jne 0xb29b
leaq (%rax,%rax), %r15
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %r15
leaq (,%r15,4), %rsi
movq %r13, %rdi
movq %r11, %r13
callq 0x2360
movq %r13, %r11
movq -0x40(%rbp), %r10
movq -0x48(%rbp), %r9
movq %rax, %r13
movq %r15, -0xa0(%rbp)
movq -0x30(%rbp), %rcx
movq -0x90(%rbp), %rdx
movq %r13, -0xb0(%rbp)
movq -0x38(%rbp), %rax
movl %r14d, (%r13,%rax,4)
movq -0x50(%rbp), %r13
movq -0x58(%rbp), %r15
cmpl $0x0, -0x64(%rbp)
je 0xb319
cmpq %rdx, %rcx
jne 0xb306
leaq (%rdx,%rdx), %rbx
testq %rdx, %rdx
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,8), %rsi
movq %r11, %rdi
movq %rcx, -0x30(%rbp)
callq 0x2360
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %r10
movq -0x48(%rbp), %r9
movq %rax, %r11
movq %rbx, %rdx
movq -0xa8(%rbp), %rbx
movq (%r15), %rax
movq %rax, (%r11,%rcx,8)
incq %rcx
addq $0x8, %r15
decq %r13
jne 0xb2c4
movq %rdx, -0x90(%rbp)
movq %rcx, -0x30(%rbp)
incq -0x38(%rbp)
movl -0x64(%rbp), %r15d
testl %r15d, %r15d
movq -0xb0(%rbp), %r13
je 0xb1fa
movl %r14d, %eax
addq %r12, %rax
xorl %ecx, %ecx
movl (%r10,%rcx,8), %edx
subl %r12d, %edx
addl (%r9,%rcx,8), %edx
subl %r14d, %edx
jne 0xb3e2
movq -0x60(%rbp), %rsi
movq (%rsi,%rcx,8), %rdx
leaq 0x1(%rdx), %rdi
movq %rdi, (%rsi,%rcx,8)
leaq (%rcx,%rcx,2), %rsi
movq -0x88(%rbp), %r8
cmpq (%r8,%rsi,8), %rdi
je 0xb4c7
leaq (%r8,%rsi,8), %rsi
movq 0x10(%rsi), %rsi
movq 0x8(%rsi,%rdx,8), %rdx
movl %edx, %esi
shrq $0x20, %rdx
movq %rdx, (%r9,%rcx,8)
movq %rsi, (%r10,%rcx,8)
movq %rcx, %rsi
shlq $0x5, %rsi
movq -0x98(%rbp), %rdi
movq 0x10(%rdi,%rsi), %rdi
movq (%rbx,%rcx,8), %r8
leaq -0x1(%r8), %rsi
shlq $0x5, %r8
addq %r8, %rdi
addq $0x1c, %rdi
movq %rdi, %r8
incq %rsi
addq $0x20, %rdi
cmpl %edx, (%r8)
jb 0xb3be
movq %rsi, (%rbx,%rcx,8)
movq -0x3c(%rdi), %rdx
shrq %rdx
movq -0x58(%rbp), %rsi
movq %rdx, (%rsi,%rcx,8)
jmp 0xb3ed
movq %rax, (%r9,%rcx,8)
movslq %edx, %rdx
movq %rdx, (%r10,%rcx,8)
incq %rcx
cmpq -0x50(%rbp), %rcx
jne 0xb344
jmp 0xb1fa
cmpl $0x2, %r15d
jb 0xb435
xorl %ecx, %ecx
movl $0x1, %eax
movq -0x88(%rbp), %r12
movq -0x50(%rbp), %r14
movq (%r9,%rax,8), %rsi
movl %ecx, %edi
movl %eax, %edx
cmpq (%r9,%rdi,8), %rsi
jb 0xb427
movl %ecx, %edx
incq %rax
movl %edx, %ecx
cmpq %rax, %r14
jne 0xb417
movl %edx, %eax
jmp 0xb442
xorl %eax, %eax
movq -0x88(%rbp), %r12
movq -0x50(%rbp), %r14
movq -0x60(%rbp), %rdx
movq (%rdx,%rax,8), %rcx
leaq 0x1(%rcx), %rsi
movq %rsi, (%rdx,%rax,8)
leaq (%rax,%rax,2), %rdx
cmpq (%r12,%rdx,8), %rsi
je 0xb53a
leaq (%r12,%rdx,8), %rdx
movq 0x10(%rdx), %rdx
movq 0x8(%rdx,%rcx,8), %rcx
movl %ecx, %edx
shrq $0x20, %rcx
movq %rcx, (%r9,%rax,8)
movq %rdx, (%r10,%rax,8)
movq %rax, %rdx
shlq $0x5, %rdx
movq -0x98(%rbp), %rsi
movq 0x10(%rsi,%rdx), %rsi
movq (%rbx,%rax,8), %rdi
leaq -0x1(%rdi), %rdx
shlq $0x5, %rdi
addq %rdi, %rsi
addq $0x1c, %rsi
movq %rsi, %rdi
incq %rdx
addq $0x20, %rsi
cmpl %ecx, (%rdi)
jb 0xb4a1
movq %rdx, (%rbx,%rax,8)
movq -0x3c(%rsi), %rcx
shrq %rcx
movq -0x58(%rbp), %rdx
movq %rcx, (%rdx,%rax,8)
jmp 0xb1fa
movq %r11, -0x30(%rbp)
movq %r8, %r12
movq -0x50(%rbp), %r14
jmp 0xb4e4
movq $0x0, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
testl %r15d, %r15d
je 0xb507
shlq $0x3, %r14
leaq (%r14,%r14,2), %rbx
xorl %r14d, %r14d
movq 0x10(%r12,%r14), %rdi
callq 0x2060
addq $0x18, %r14
cmpq %r14, %rbx
jne 0xb4f4
movq -0xe0(%rbp), %rax
movl %r15d, (%rax)
movq -0x38(%rbp), %rcx
movl %ecx, 0x4(%rax)
movq %r13, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0xd8(%rbp), %rsp
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r11, -0x30(%rbp)
jmp 0xb4e4