// File: /workspace/github_c_makefile_star2_O3/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 $0x118, %rsp            # imm = 0x118
movq %r8, -0xd0(%rbp)
movl %ecx, %ebx
movq %rsi, -0xb8(%rbp)
movq %rdi, -0xb0(%rbp)
movq %rdx, -0x88(%rbp)
movsd 0x18(%rdx), %xmm0
movsd %xmm0, -0x38(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x21a0
movapd %xmm0, %xmm1
cmpltsd 0x14579(%rip), %xmm1    # 0x1f880
movsd 0x14539(%rip), %xmm2    # 0x1f848
andpd %xmm1, %xmm2
andnpd %xmm0, %xmm1
orpd %xmm1, %xmm2
movsd -0x38(%rbp), %xmm0
subsd %xmm2, %xmm0
callq 0x2110
movq %rsp, -0xc8(%rbp)
movl %ebx, %ecx
movq %rsp, %r14
leaq (%rcx,%rcx,2), %rax
leaq 0xf(,%rax,8), %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
movl %ebx, -0x2c(%rbp)
testl %ebx, %ebx
movq %r14, -0x98(%rbp)
movq %rcx, -0x58(%rbp)
je 0xba68
movq -0xb8(%rbp), %rax
addq $-0x8, %rax
movq %rax, -0xe0(%rbp)
xorl %eax, %eax
movq %rax, %rsi
shlq $0x5, %rsi
movq %rax, %rdx
movq -0x88(%rbp), %rax
movl 0x8(%rax,%rsi), %edi
movq %rdx, -0xd8(%rbp)
leaq (%rdx,%rdx,2), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, (%r14,%rax,8)
movq $0x0, 0x10(%r14,%rax,8)
movq %rdi, -0xf8(%rbp)
testq %rdi, %rdi
je 0xba55
addq -0x88(%rbp), %rsi
leaq (%r14,%rax,8), %r15
xorl %r14d, %r14d
xorl %r12d, %r12d
movq %rsi, -0xf0(%rbp)
movq %r15, -0xe8(%rbp)
movq %r12, -0x128(%rbp)
movq 0x10(%rsi), %rsi
movq %r14, -0x130(%rbp)
shlq $0x5, %r14
movq (%rsi,%r14), %rax
movq 0x8(%rsi,%r14), %r10
movq %rax, %rcx
shrq %rcx
movq 0x10(%rsi,%r14), %r12
movq %r12, -0x40(%rbp)
subq %r10, %r12
leaq 0x1(%r12), %r15
movl 0x1c(%rsi,%r14), %edx
movq %rdx, -0x50(%rbp)
movl 0x18(%rsi,%r14), %edx
movq %rdx, -0x48(%rbp)
leaq (%rcx,%rcx,4), %r13
testb $0x1, %al
jne 0xb44c
movq -0xb0(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
leaq (,%r10,8), %r11
addq 0x8(%rax,%r13,8), %r11
movq -0x40(%rbp), %r12
jmp 0xb4e8
movq %rsi, -0x70(%rbp)
movq %r15, -0x38(%rbp)
leaq (,%r15,8), %rbx
movq %rbx, %rdi
movq %r10, %r15
callq 0x2310
movq %rax, %rdi
movq -0xb0(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
leaq (,%r15,8), %rsi
addq 0x8(%rax,%r13,8), %rsi
movq %rdi, %r13
movq %rbx, %rdx
callq 0x22b0
decq %r12
cmpq $-0x3, %r12
ja 0xb4d6
movq %r15, %rax
notq %rax
movq -0x40(%rbp), %r12
addq %r12, %rax
xorl %ecx, %ecx
movq %r13, %r11
movq %r15, %r10
movq (%r11,%rcx,8), %rdx
movq 0x8(%r11,%rax,8), %rsi
movq %rsi, (%r11,%rcx,8)
movq %rdx, 0x8(%r11,%rax,8)
incq %rcx
leaq -0x1(%rax), %rdx
cmpq %rax, %rcx
movq %rdx, %rax
jb 0xb4af
movq -0x70(%rbp), %rsi
jmp 0xb4e4
movq -0x70(%rbp), %rsi
movq %r13, %r11
movq -0x40(%rbp), %r12
movq %r15, %r10
movq -0x38(%rbp), %r15
movq -0x50(%rbp), %rax
movl %eax, %r8d
movq -0x48(%rbp), %rcx
subl %ecx, %r8d
incl %r8d
movq -0xb8(%rbp), %rax
leaq (%rax,%rcx,8), %rbx
cmpl %r15d, %r8d
movl %r15d, %r9d
cmovll %r8d, %r9d
testl %r9d, %r9d
jle 0xb530
movl %r9d, %eax
xorl %ecx, %ecx
movq (%r11,%rcx,8), %rdx
xorq (%rbx,%rcx,8), %rdx
cmpq $0x1, %rdx
ja 0xb535
incq %rcx
cmpq %rcx, %rax
jne 0xb518
jmp 0xb538
xorl %r9d, %r9d
jmp 0xb538
movl %ecx, %r9d
addq %r14, %rsi
movq %rsi, -0x70(%rbp)
movq -0x48(%rbp), %rdi
movslq %edi, %r14
movl %r8d, -0xa4(%rbp)
movslq %r8d, %rax
movq %r9, -0x78(%rbp)
movslq %r9d, %rcx
movslq %r15d, %rdx
leaq (%r11,%rdx,8), %rsi
addq $-0x8, %rsi
leaq (,%rdi,8), %rdi
leaq (%rdi,%rax,8), %rdi
addq -0xe0(%rbp), %rdi
movl %r12d, %r8d
subl %ecx, %r8d
movq %r10, -0x38(%rbp)
subl %r10d, %r8d
addl $0x2, %r8d
xorl %r9d, %r9d
movq %r9, %r15
movl %r8d, %r13d
leaq (%rax,%r9), %r8
cmpq %rcx, %r8
jle 0xb5b7
leaq (%rdx,%r15), %r8
cmpq %rcx, %r8
jle 0xb5b7
movq (%rsi,%r15,8), %r10
xorq (%rdi,%r15,8), %r10
leaq -0x1(%r15), %r9
leal -0x1(%r13), %r8d
cmpq $0x2, %r10
jb 0xb589
movq -0x78(%rbp), %rsi
testl %esi, %esi
movq %r15, -0x60(%rbp)
je 0xb602
movl $0x10, %edi
movq %r11, %r15
callq 0x2310
movq -0x78(%rbp), %rsi
movq %r15, %r11
movq -0x60(%rbp), %r15
shlq $0x20, %r14
movl %esi, %ecx
orq %rcx, %r14
movq %rax, -0x68(%rbp)
movq %r14, (%rax)
movl $0x1, %eax
movq %rax, -0x80(%rbp)
movl $0x2, %eax
movq %rax, -0xa0(%rbp)
jmp 0xb61f
xorl %ecx, %ecx
movq $0x0, -0x68(%rbp)
movq $0x0, -0xa0(%rbp)
movq $0x0, -0x80(%rbp)
leaq (%rbx,%rcx,8), %rax
movq %rax, -0x90(%rbp)
movq %r11, -0x108(%rbp)
leaq (%r11,%rcx,8), %r14
movq -0x50(%rbp), %rax
subl %esi, %eax
movl %eax, %edx
movq -0x48(%rbp), %rcx
subl %ecx, %edx
movq %rdx, -0x100(%rbp)
leaq (%rdx,%r15), %r12
movq -0x40(%rbp), %rdx
subl %esi, %edx
subl -0x38(%rbp), %edx
leaq (%rdx,%r15), %rsi
movq %rsi, -0x120(%rbp)
subl %ecx, %eax
leal (%rax,%r15), %ebx
addl $0x2, %ebx
movq %rdx, -0x40(%rbp)
leaq (%rdx,%r15), %rcx
addq $0x2, %rcx
movq %rcx, %rax
movq %rcx, -0x110(%rbp)
imull %ebx, %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x2250
movq %rax, %r15
movslq %ebx, %rdi
shlq $0x3, %rdi
callq 0x2310
movq %r15, -0xc0(%rbp)
movq %rax, -0x38(%rbp)
movq %r15, (%rax)
movq %r12, -0x118(%rbp)
testl %r12d, %r12d
movq -0x120(%rbp), %r12
js 0xb769
movq -0x50(%rbp), %rdx
subl -0x78(%rbp), %edx
subl -0x48(%rbp), %edx
addq -0x60(%rbp), %rdx
movslq -0x110(%rbp), %rax
movslq %r12d, %rcx
movl %edx, %edx
incq %rdx
movslq %r13d, %rsi
movq -0xc0(%rbp), %r8
leaq (%r8,%rsi,4), %rdi
addq $0x4, %rdi
shlq $0x2, %rsi
movl $0x1, %r9d
leaq (%r8,%rax,4), %r8
movq -0x38(%rbp), %r10
movq %r8, (%r10,%r9,8)
testl %r12d, %r12d
js 0xb75a
movq -0x90(%rbp), %r10
movq -0x8(%r10,%r9,8), %r10
movq -0x38(%rbp), %r11
movq -0x8(%r11,%r9,8), %r11
xorl %r13d, %r13d
movq (%r14,%r13,8), %r15
xorq %r10, %r15
cmpq $0x1, %r15
ja 0xb73d
movl (%r11,%r13,4), %r15d
incl %r15d
jmp 0xb74e
movl 0x4(%r11,%r13,4), %ebx
movl -0x4(%rdi,%r13,4), %r15d
cmpl %r15d, %ebx
cmovgl %ebx, %r15d
movl %r15d, (%rdi,%r13,4)
incq %r13
cmpq %rcx, %r13
jle 0xb727
leaq 0x1(%r9), %r10
addq %rsi, %rdi
cmpq %rdx, %r9
movq %r10, %r9
jne 0xb6fe
cmpl $-0x1, %r12d
je 0xb85d
cmpl $-0x1, -0x118(%rbp)
movq -0x80(%rbp), %rbx
je 0xb861
movq -0x60(%rbp), %rax
movq -0x100(%rbp), %rcx
leaq (%rcx,%rax), %r13
incq %r13
movq -0x40(%rbp), %rcx
leaq (%rcx,%rax), %r15
incq %r15
movq -0x78(%rbp), %r8
addl -0x48(%rbp), %r8d
movq -0xa0(%rbp), %r12
movslq %r13d, %rcx
movslq %r15d, %rax
movq -0x8(%r14,%rax,8), %rdx
movq -0x90(%rbp), %rsi
xorq -0x8(%rsi,%rcx,8), %rdx
cmpq $0x1, %rdx
ja 0xb806
cmpq %r12, %rbx
jne 0xb821
movq %rbx, -0x40(%rbp)
leaq (%r12,%r12), %rbx
testq %r12, %r12
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,8), %rsi
movq -0x68(%rbp), %rdi
movq %r8, %r12
callq 0x2350
movq %r12, %r8
movq %rbx, %r12
movq -0x40(%rbp), %rbx
jmp 0xb825
movq -0x38(%rbp), %rsi
movq -0x8(%rsi,%rcx,8), %rdx
movq (%rsi,%rcx,8), %rcx
movl -0x4(%rcx,%rax,4), %ecx
cmpl (%rdx,%rax,4), %ecx
jg 0xb84a
decl %r13d
jmp 0xb84d
movq -0x68(%rbp), %rax
leal (%r8,%r13), %esi
decl %esi
movl %r13d, %ecx
decl %ecx
shlq $0x20, %rsi
incq %rsi
movq %rax, -0x68(%rbp)
movq %rsi, (%rax,%rbx,8)
incq %rbx
decl %r15d
movl %ecx, %r13d
jmp 0xb84d
decl %r15d
testl %r13d, %r13d
je 0xb868
testl %r15d, %r15d
jne 0xb7b0
jmp 0xb868
movq -0x80(%rbp), %rbx
movq -0xa0(%rbp), %r12
movq -0xc0(%rbp), %rdi
callq 0x2060
movq -0x38(%rbp), %rdi
callq 0x2060
movq -0x80(%rbp), %rcx
cmpq %rcx, %rbx
movq -0x68(%rbp), %r13
je 0xb8d3
movq %rcx, %rax
notq %rax
addq %rbx, %rax
je 0xb8d3
leaq (,%rcx,8), %rcx
addq %r13, %rcx
leaq -0x8(,%rbx,8), %rdx
addq %r13, %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 0xb8b0
movq -0x50(%rbp), %rax
subl -0x48(%rbp), %eax
movq -0x60(%rbp), %rcx
addq %rcx, %rax
incq %rax
cmpl %eax, -0xa4(%rbp)
movq -0xe8(%rbp), %r15
jle 0xb936
cmpq %r12, %rbx
jne 0xb916
movq %r12, %rsi
shlq $0x4, %rsi
testq %r12, %r12
movl $0x10, %eax
cmoveq %rax, %rsi
movq %r13, %rdi
callq 0x2350
movq %rax, %r13
movq -0x50(%rbp), %rax
movq -0x60(%rbp), %rcx
addl %ecx, %eax
incl %eax
shlq $0x20, %rax
negl %ecx
movslq %ecx, %rcx
orq %rax, %rcx
movq %rcx, (%r13,%rbx,8)
incq %rbx
cmpq $0x2, %rbx
movq -0x128(%rbp), %rax
jb 0xb98f
movl $0x1, %ecx
xorl %r9d, %r9d
movq (%r13,%r9,8), %rdx
movq %rdx, %rsi
shrq $0x20, %rsi
movl %edx, %edi
addq %rsi, %rdi
movq (%r13,%rcx,8), %rsi
movq %rsi, %r8
shrq $0x20, %r8
cmpq %r8, %rdi
jne 0xb979
movl %esi, %esi
addq %rdx, %rsi
movq %rsi, (%r13,%r9,8)
jmp 0xb981
movq %rsi, 0x8(%r13,%r9,8)
incq %r9
incq %rcx
cmpq %rcx, %rbx
jne 0xb94b
incq %r9
movq %r9, %rbx
movq (%r15), %r14
movq %rbx, %r12
movslq %ebx, %rbx
addq %r14, %rbx
cmpq 0x8(%r15), %rbx
jbe 0xb9ee
leaq -0x1(%rbx), %rdx
movq %rdx, %rcx
shrq %rcx
orq %rdx, %rcx
movq %rcx, %rdx
shrq $0x2, %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x4, %rcx
orq %rdx, %rcx
movq %rcx, %rdx
shrq $0x8, %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x10, %rcx
orq %rdx, %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%r15)
leaq 0x8(,%rcx,8), %rsi
movq %rax, %rdi
callq 0x2350
movq %r12, %rdx
shlq $0x20, %rdx
movq %rax, %r12
leaq (%rax,%r14,8), %rdi
sarq $0x1d, %rdx
movq %r13, %rsi
callq 0x22b0
movq %rbx, (%r15)
movq %r13, %rdi
callq 0x2060
movq -0x70(%rbp), %rax
testb $0x1, (%rax)
je 0xba28
movq -0x108(%rbp), %rdi
callq 0x2060
movq -0x130(%rbp), %r14
incq %r14
cmpq -0xf8(%rbp), %r14
movq -0xf0(%rbp), %rsi
jne 0xb3d7
movq %r12, 0x10(%r15)
movq -0x98(%rbp), %r14
movq -0x58(%rbp), %rcx
movq -0xd8(%rbp), %rax
incq %rax
cmpq %rcx, %rax
jne 0xb375
movq %rsp, %rbx
leaq 0xf(,%rcx,8), %rax
andq $-0x10, %rax
subq %rax, %rbx
movq %rbx, %rsp
movq %rsp, %r12
subq %rax, %r12
movq %r12, %rsp
movq %rsp, %rdi
subq %rax, %rdi
movq %rdi, %rsp
movq %rsp, %rdx
subq %rax, %rdx
movq %rdx, -0x40(%rbp)
movq %rdx, %rsp
movq %rsp, %rdx
subq %rax, %rdx
movq %rdx, -0x38(%rbp)
movq %rdx, %rsp
leaq (,%rcx,8), %r15
movq %rdi, -0x68(%rbp)
xorl %esi, %esi
movq %r15, %rdx
callq 0x21e0
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x21e0
movq %rbx, %r9
movq %r12, %r10
cmpl $0x0, -0x2c(%rbp)
movq %r15, -0x80(%rbp)
je 0xbb6b
xorl %eax, %eax
movl %eax, %eax
leaq (%rax,%rax,2), %rcx
cmpq $0x0, (%r14,%rcx,8)
je 0xbe7e
leaq (%r14,%rcx,8), %rcx
movq 0x10(%rcx), %rcx
movq -0x68(%rbp), %rdx
movq (%rdx,%rax,8), %rdx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %edx
shrq $0x20, %rcx
movq -0x40(%rbp), %rsi
movq %rcx, (%rsi,%rax,8)
movq -0x38(%rbp), %rsi
movq %rdx, (%rsi,%rax,8)
movq %rax, %rdx
shlq $0x5, %rdx
movq -0x88(%rbp), %rsi
movq 0x10(%rsi,%rdx), %rsi
movq (%r10,%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 0xbb43
movq %rdx, (%r10,%rax,8)
movq -0x3c(%rsi), %rcx
shrq %rcx
movq %rcx, (%r9,%rax,8)
incl %eax
cmpl -0x2c(%rbp), %eax
jne 0xbae2
movq $0x0, -0x48(%rbp)
movq $0x0, -0x78(%rbp)
xorl %esi, %esi
movq $0x0, -0x60(%rbp)
xorl %r14d, %r14d
xorl %r15d, %r15d
movq -0x58(%rbp), %rcx
movq %r9, -0x90(%rbp)
movq %r10, -0x70(%rbp)
movq -0x68(%rbp), %r11
movq -0x40(%rbp), %rbx
movq -0x38(%rbp), %r8
movl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
cmpl $0x0, -0x2c(%rbp)
je 0xbc3f
xorl %eax, %eax
xorl %r13d, %r13d
movq %r13, %rcx
movq (%rbx,%rax,8), %r13
cmpq %r13, %rcx
cmovaq %rcx, %r13
movq -0x58(%rbp), %rcx
incq %rax
cmpq %rax, %rcx
jne 0xbbbb
cmpl $0x0, -0x2c(%rbp)
je 0xbc42
movl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %eax, %eax
movl %r12d, %ecx
movl (%r8,%rax,8), %r12d
subl %r13d, %r12d
addl (%rbx,%rax,8), %r12d
cmpl %r12d, %ecx
cmovll %ecx, %r12d
movq -0x58(%rbp), %rcx
incq %rax
cmpq %rax, %rcx
jne 0xbbe3
testl %r12d, %r12d
jg 0xbc42
movq %rsi, %r12
cmpl $0x2, -0x2c(%rbp)
jb 0xbdeb
xorl %ecx, %ecx
movl $0x1, %eax
movq (%rbx,%rax,8), %rsi
movl %ecx, %edi
movl %eax, %edx
cmpq (%rbx,%rdi,8), %rsi
jb 0xbc2d
movl %ecx, %edx
incq %rax
movl %edx, %ecx
cmpq %rax, -0x58(%rbp)
jne 0xbc1d
movl %edx, %eax
jmp 0xbded
xorl %r13d, %r13d
movq -0x78(%rbp), %rax
cmpq %rax, %rsi
jne 0xbc95
leaq (%rax,%rax), %rbx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rbx
movq %rsi, -0x50(%rbp)
leaq (,%rbx,4), %rsi
movq -0x48(%rbp), %rdi
callq 0x2350
movq -0x50(%rbp), %rsi
movq -0x38(%rbp), %r8
movq -0x90(%rbp), %r9
movq -0x58(%rbp), %rcx
movq %rbx, -0x78(%rbp)
movq -0x40(%rbp), %rbx
movq -0x68(%rbp), %r11
movq -0x70(%rbp), %r10
jmp 0xbc99
movq -0x48(%rbp), %rax
leaq 0x1(%rsi), %rdi
movq %rax, -0x48(%rbp)
movl %r12d, (%rax,%rsi,4)
movq %rdi, -0x50(%rbp)
movq %rdi, %rsi
cmpl $0x0, -0x2c(%rbp)
je 0xbba6
xorl %ebx, %ebx
movq -0x60(%rbp), %rdi
cmpq %r14, %r15
jne 0xbcf0
leaq (%r15,%r15), %r14
testq %r15, %r15
movl $0x2, %eax
cmoveq %rax, %r14
leaq (,%r14,8), %rsi
callq 0x2350
movq -0x38(%rbp), %r8
movq -0x90(%rbp), %r9
movq -0x58(%rbp), %rcx
movq %rax, %rdi
movq (%r9,%rbx,8), %rax
movq %rax, (%rdi,%r15,8)
incq %r15
incq %rbx
cmpq %rcx, %rbx
jne 0xbcbc
movq %rdi, -0x60(%rbp)
movq -0x50(%rbp), %rsi
cmpl $0x0, -0x2c(%rbp)
movq -0x70(%rbp), %r10
movq -0x68(%rbp), %r11
movq -0x40(%rbp), %rbx
je 0xbba6
movl %r12d, %eax
addq %r13, %rax
xorl %ecx, %ecx
movl (%r8,%rcx,8), %edx
subl %r13d, %edx
addl (%rbx,%rcx,8), %edx
subl %r12d, %edx
jne 0xbdc6
movq (%r11,%rcx,8), %rdx
leaq 0x1(%rdx), %rdi
movq %rdi, (%r11,%rcx,8)
leaq (%rcx,%rcx,2), %rsi
movq -0x98(%rbp), %r8
cmpq (%r8,%rsi,8), %rdi
je 0xbe78
leaq (%r8,%rsi,8), %rsi
movq 0x10(%rsi), %rsi
movq 0x8(%rsi,%rdx,8), %rdx
movl %edx, %esi
shrq $0x20, %rdx
movq %rdx, (%rbx,%rcx,8)
movq -0x38(%rbp), %rdi
movq %rsi, (%rdi,%rcx,8)
movq %rcx, %rsi
shlq $0x5, %rsi
movq -0x88(%rbp), %rdi
movq 0x10(%rdi,%rsi), %rdi
movq (%r10,%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 0xbda2
movq %rsi, (%r10,%rcx,8)
movq -0x3c(%rdi), %rdx
shrq %rdx
movq %rdx, (%r9,%rcx,8)
movq -0x38(%rbp), %r8
jmp 0xbdd1
movq %rax, (%rbx,%rcx,8)
movslq %edx, %rdx
movq %rdx, (%r8,%rcx,8)
incq %rcx
cmpq -0x58(%rbp), %rcx
jne 0xbd29
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rcx
jmp 0xbba6
xorl %eax, %eax
movq (%r11,%rax,8), %rcx
leaq 0x1(%rcx), %rsi
movq %rsi, (%r11,%rax,8)
leaq (%rax,%rax,2), %rdx
movq -0x98(%rbp), %rdi
cmpq (%rdi,%rdx,8), %rsi
je 0xbe91
leaq (%rdi,%rdx,8), %rdx
movq 0x10(%rdx), %rdx
movq 0x8(%rdx,%rcx,8), %rcx
movl %ecx, %edx
shrq $0x20, %rcx
movq %rcx, (%rbx,%rax,8)
movq %rdx, (%r8,%rax,8)
movq %rax, %rdx
shlq $0x5, %rdx
movq -0x88(%rbp), %rsi
movq 0x10(%rsi,%rdx), %rsi
movq (%r10,%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 0xbe4f
movq %rdx, (%r10,%rax,8)
movq -0x3c(%rsi), %rcx
shrq %rcx
movq %rcx, (%r9,%rax,8)
movq -0x58(%rbp), %rcx
movq %r12, %rsi
jmp 0xbba6
movq -0x50(%rbp), %r12
jmp 0xbe91
movq $0x0, -0x48(%rbp)
xorl %r12d, %r12d
movq $0x0, -0x60(%rbp)
cmpl $0x0, -0x2c(%rbp)
movq -0x98(%rbp), %r15
je 0xbebc
movq -0x80(%rbp), %rax
leaq (%rax,%rax,2), %rbx
xorl %r14d, %r14d
movq 0x10(%r15,%r14), %rdi
callq 0x2060
addq $0x18, %r14
cmpq %r14, %rbx
jne 0xbea9
movq -0xd0(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
movl %r12d, 0x4(%rax)
movq -0x48(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0xc8(%rbp), %rsp
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq