// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/hic.cpp
// Function: select_bmer(unsigned int, unsigned long, bubble_type const*, min_cut_t*, unsigned int)
uint64_t select_bmer(uint32_t src, uint64_t k, const bubble_type* bub, min_cut_t* x, uint32_t bub_only)
{
    uint32_t beg, sink, n, *a;
    uint32_t v, d, u, i, nv, b_mer_d, j;
    asg_t *sg = bub->ug->g;
    uint64_t *p = NULL;
    asg_arc_t *av = NULL;

    memset(x->rGraphVis.a, 0, x->rGraphVis.n);
    kdq_push(uint64_t, x->q, set_dv(src , 0));
    b_mer_d = 0; 

    x->rGraphVis.a[src] = 1;
    x->bmerVis.a[src] = 1;

    while (1)
    {
        p = kdq_shift(uint64_t, x->q);
        if(!p) break;
        v = (uint32_t)(*p); d = ((uint64_t)(*p))>>32;

        v = v<<1;
        av = asg_arc_a(sg, v);
        nv = asg_arc_n(sg, v);
        for (i = 0; i < nv; i++)
        {
            if(av[i].del) continue;
            u = av[i].v>>1;
            if(x->rGraphVis.a[u]) continue;
            x->rGraphVis.a[u] = 1;
            if(IF_HOM(u, *bub))
            {
                if(d < k) kdq_push(uint64_t, x->q, set_dv(u, d+1));
            }
            else
            {
                kdq_push(uint64_t, x->q, set_dv(u , d));
                b_mer_d = d;
                if(IF_BUB(u, *bub) && x->bmerVis.a[u] == 0)
                {
                    get_bubbles((bubble_type*)bub, bub->index[u], &beg, &sink, &a, &n, NULL);
                    for (j = 0; j < n; j++) x->bmerVis.a[(a[j]>>1)] = 1;
                }
                //must be here
                if(bub_only == 0) x->bmerVis.a[u] = 1;
            }            
        }


        v = v + 1;
        av = asg_arc_a(sg, v);
        nv = asg_arc_n(sg, v);
        for (i = 0; i < nv; i++)
        {
            if(av[i].del) continue;
            u = av[i].v>>1;
            if(x->rGraphVis.a[u]) continue;
            x->rGraphVis.a[u] = 1;
            if(IF_HOM(u, *bub))
            {
                if(d < k) kdq_push(uint64_t, x->q, set_dv(u, d+1));
            }
            else
            {
                kdq_push(uint64_t, x->q, set_dv(u , d));
                b_mer_d = d;
                if(IF_BUB(u, *bub) && x->bmerVis.a[u] == 0)
                {
                    get_bubbles((bubble_type*)bub, bub->index[u], &beg, &sink, &a, &n, NULL);
                    for (j = 0; j < n; j++) x->bmerVis.a[(a[j]>>1)] = 1;
                }
                //must be here
                if(bub_only == 0) x->bmerVis.a[u] = 1;
            }            
        }
    }

    return b_mer_d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r8d, 0x44(%rsp)
movq %rcx, %rbx
movq %rsi, 0x68(%rsp)
movl %edi, %ebp
movq %rdx, 0x8(%rsp)
movq 0x10(%rdx), %rax
movq 0x18(%rax), %rax
movq %rax, 0x60(%rsp)
movq 0xb0(%rcx), %rdx
movq 0xc0(%rcx), %rdi
xorl %esi, %esi
callq 0x20e0
movq %rbx, 0x30(%rsp)
movq 0xf8(%rbx), %r15
movl %ebp, %ebx
movq (%r15), %rsi
movq 0x8(%r15), %r14
movq %rsi, %rax
shrq $0x3a, %rax
movl $0x1, %r12d
movl $0x1, %edx
movl %eax, %ecx
shlq %cl, %rdx
cmpq %rdx, %r14
jne 0x148807
leal 0x1(%rax), %r13d
movl %r13d, %ecx
shlq %cl, %r12
cmpq %r14, %r12
jae 0x148790
movq $-0x1, %r13
movq 0x8(%rsp), %r9
incq %r13
movq %r14, %rdx
movl %r13d, %ecx
shrq %cl, %rdx
cmpq $0x3f, %r13
ja 0x148768
testq %rdx, %rdx
jne 0x148751
cmpq %r13, %rax
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
je 0x148868
movl $0x1, %r12d
movl %r13d, %ecx
shlq %cl, %r12
cmpq %rax, %r13
jbe 0x1491f1
movq 0x18(%r15), %rdi
movl $0x8, %esi
movl %r13d, %ecx
shlq %cl, %rsi
callq 0x2370
movq %rax, 0x18(%r15)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x8(%rsp), %r9
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq %rsi, %rax
andq %r10, %rax
addq %rax, %rdx
cmpq %r14, %rdx
jbe 0x148818
movq 0x18(%r15), %rcx
movq %r14, %rdx
subq %rax, %rdx
movq %r12, %rsi
subq %rdx, %rsi
leaq (%rcx,%rsi,8), %rdi
leaq (%rcx,%rax,8), %rsi
shlq $0x3, %rdx
callq 0x2360
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
subq %r14, %r12
addq (%r15), %r12
movq %r12, %rsi
jmp 0x148840
movq 0x8(%rsp), %r9
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
jmp 0x148868
subq %r12, %rdx
jbe 0x148840
movq 0x18(%r15), %rdi
leaq (%rdi,%r12,8), %rsi
shlq $0x3, %rdx
callq 0x2360
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
movq (%r15), %rsi
movq %r13, %rax
shlq $0x3a, %rax
andq %r10, %rsi
orq %rax, %rsi
movq $-0x1, %rax
movl %r13d, %ecx
shlq %cl, %rax
movq %rsi, (%r15)
notq %rax
movq %rax, 0x10(%r15)
movq 0x8(%r15), %r14
movq 0x18(%r15), %rax
leaq 0x1(%r14), %rcx
movq %rcx, 0x8(%r15)
andq %r10, %rsi
addq %r14, %rsi
andq 0x10(%r15), %rsi
movq %rbx, (%rax,%rsi,8)
movq 0x30(%rsp), %rdx
movq 0xc0(%rdx), %rax
movb $0x1, %cl
movb %cl, (%rax,%rbx)
movq 0xf0(%rdx), %rax
movb %cl, (%rax,%rbx)
movq 0xf8(%rdx), %rax
movq 0x8(%rax), %rcx
xorl %ebp, %ebp
testq %rcx, %rcx
je 0x1491df
movq %rdx, %rbx
movq (%rax), %rdx
movq 0x18(%rax), %rsi
leaq 0x1(%rdx), %rdi
andq %r10, %rdi
movq %rdx, %r8
movabsq $-0x400000000000000, %r11 # imm = 0xFC00000000000000
andq %r11, %r8
andq 0x10(%rax), %rdi
orq %r8, %rdi
movq %rdi, (%rax)
decq %rcx
movq %rcx, 0x8(%rax)
testq %rsi, %rsi
je 0x1491dd
andq %r10, %rdx
movq (%rsi,%rdx,8), %rsi
movq %rsi, %r8
shrq $0x20, %r8
leal (%rsi,%rsi), %edi
movq 0x60(%rsp), %rcx
movq 0x8(%rcx), %rax
movq 0x28(%rcx), %rcx
movq (%rcx,%rdi,8), %rdx
testl %edx, %edx
movq %r8, 0x50(%rsp)
je 0x148d7c
movq %rdi, 0x70(%rsp)
movq %rdx, %rcx
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %r11
movq %rsi, 0x58(%rsp)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
andq %rax, %rsi
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rsi, 0x38(%rsp)
addq %rsi, %rax
movq %rax, 0x18(%rsp)
movl %edx, %r13d
xorl %r15d, %r15d
movq %r11, 0x20(%rsp)
movq %r13, 0x10(%rsp)
leaq (%r15,%r15,2), %rax
cmpl $0x0, 0xc(%r11,%rax,8)
js 0x14898f
leaq (%r11,%rax,8), %rax
movl 0x8(%rax), %r12d
shrl %r12d
movq 0xc0(%rbx), %rax
cmpb $0x0, (%rax,%r12)
je 0x14899c
incq %r15
cmpq %r13, %r15
jne 0x14896a
jmp 0x148d65
movb $0x1, (%rax,%r12)
movq (%r9), %rax
movq 0x80(%r9), %rcx
movl (%rax,%r12,4), %edx
incq %rcx
cmpq %rdx, %rcx
jae 0x148ac8
cmpq 0x68(%rsp), %r8
jae 0x14898f
movq 0xf8(%rbx), %r13
movq (%r13), %rsi
movq 0x8(%r13), %r14
movq %rsi, %rax
shrq $0x3a, %rax
movl $0x1, %edx
movl %eax, %ecx
shlq %cl, %rdx
cmpq %rdx, %r14
jne 0x148d2c
movq %rbp, 0x28(%rsp)
leal 0x1(%rax), %ebp
movl $0x1, %edx
movl %ebp, %ecx
shlq %cl, %rdx
movq %rdx, 0x48(%rsp)
cmpq %r14, %rdx
jae 0x148a45
movq $-0x1, %rbp
incq %rbp
movq %r14, %rdx
movl %ebp, %ecx
shrq %cl, %rdx
cmpq $0x3f, %rbp
ja 0x148a24
testq %rdx, %rdx
jne 0x148a0e
cmpq %rbp, %rax
je 0x148d27
movl $0x1, %edx
movl %ebp, %ecx
shlq %cl, %rdx
movq %rdx, 0x48(%rsp)
cmpq %rax, %rbp
jbe 0x148d5d
movq 0x18(%r13), %rdi
movl $0x8, %esi
movl %ebp, %ecx
shlq %cl, %rsi
callq 0x2370
movq %rax, 0x18(%r13)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x20(%rsp), %r11
movq %rsi, %rax
andq %r10, %rax
addq %rax, %rdx
cmpq %r14, %rdx
jbe 0x148cc7
movq 0x18(%r13), %rcx
movq %r14, %rdx
subq %rax, %rdx
movq 0x48(%rsp), %rsi
subq %rdx, %rsi
leaq (%rcx,%rsi,8), %rdi
leaq (%rcx,%rax,8), %rsi
shlq $0x3, %rdx
callq 0x2360
movq 0x20(%rsp), %r11
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x48(%rsp), %rsi
subq %r14, %rsi
addq (%r13), %rsi
jmp 0x148cf5
movq 0xf8(%rbx), %rbp
movq (%rbp), %rsi
movq 0x8(%rbp), %r14
movq %rsi, %rax
shrq $0x3a, %rax
movl $0x1, %edi
movl %eax, %ecx
shlq %cl, %rdi
cmpq %rdi, %r14
jne 0x148c2c
leal 0x1(%rax), %r13d
movl $0x1, %ebx
movl %r13d, %ecx
shlq %cl, %rbx
cmpq %r14, %rbx
jae 0x148b46
movq $-0x1, %r13
incq %r13
movq %r14, %rdi
movl %r13d, %ecx
shrq %cl, %rdi
cmpq $0x3f, %r13
ja 0x148b23
testq %rdi, %rdi
jne 0x148b0c
cmpq %r13, %rax
jne 0x148b32
movq 0x30(%rsp), %rbx
jmp 0x148c27
movl $0x1, %ebx
movl %r13d, %ecx
shlq %cl, %rbx
cmpq %rax, %r13
jbe 0x148d55
movq 0x18(%rbp), %rdi
movl $0x8, %esi
movl %r13d, %ecx
shlq %cl, %rsi
callq 0x2370
movq %rax, 0x18(%rbp)
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq 0x8(%rsp), %r9
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq %rsi, %rax
andq %r10, %rax
addq %rax, %rdx
cmpq %r14, %rdx
jbe 0x148bbf
movq 0x18(%rbp), %rcx
movq %r14, %rdx
subq %rax, %rdx
movq %rbx, %rsi
subq %rdx, %rsi
leaq (%rcx,%rsi,8), %rdi
leaq (%rcx,%rax,8), %rsi
shlq $0x3, %rdx
callq 0x2360
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
subq %r14, %rbx
addq (%rbp), %rbx
movq %rbx, %rsi
jmp 0x148be8
subq %rbx, %rdx
jbe 0x148be8
movq 0x18(%rbp), %rdi
leaq (%rdi,%rbx,8), %rsi
shlq $0x3, %rdx
callq 0x2360
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
movq (%rbp), %rsi
movq %r13, %rax
shlq $0x3a, %rax
andq %r10, %rsi
orq %rax, %rsi
movq %rsi, (%rbp)
movq $-0x1, %rax
movl %r13d, %ecx
shlq %cl, %rax
notq %rax
movq %rax, 0x10(%rbp)
movq 0x8(%rbp), %r14
movq (%r9), %rax
movl (%rax,%r12,4), %edx
movq 0x30(%rsp), %rbx
movq 0x50(%rsp), %r8
movq 0x20(%rsp), %r11
movq 0x10(%rsp), %r13
movq 0x38(%rsp), %rax
orq %r12, %rax
movq 0x18(%rbp), %rcx
leaq 0x1(%r14), %rdi
movq %rdi, 0x8(%rbp)
andq %r10, %rsi
addq %r14, %rsi
andq 0x10(%rbp), %rsi
movq %rax, (%rcx,%rsi,8)
movq 0x80(%r9), %rax
incq %rax
cmpq %rdx, %rax
jbe 0x148ca5
movq 0xf0(%rbx), %rax
cmpb $0x0, (%rax,%r12)
jne 0x148ca5
movq 0x40(%r9), %rcx
movl (%rcx,%rdx,4), %eax
movl 0x4(%rcx,%rdx,4), %ecx
subl %eax, %ecx
addl $-0x2, %ecx
je 0x148ca5
movq 0x28(%r9), %rdx
leaq (%rdx,%rax,4), %rax
addq $0x8, %rax
movl %ecx, %ecx
xorl %edx, %edx
movq 0xf0(%rbx), %rsi
movl (%rax,%rdx,4), %edi
shrl %edi
movb $0x1, (%rsi,%rdi)
incq %rdx
cmpq %rdx, %rcx
jne 0x148c8d
movl %r8d, %ebp
cmpl $0x0, 0x44(%rsp)
jne 0x14898f
movq 0xf0(%rbx), %rax
movb $0x1, (%rax,%r12)
movl %r8d, %ebp
jmp 0x14898f
movq 0x48(%rsp), %rax
subq %rax, %rdx
jbe 0x148cf5
movq 0x18(%r13), %rdi
leaq (%rdi,%rax,8), %rsi
shlq $0x3, %rdx
callq 0x2360
movq 0x20(%rsp), %r11
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq (%r13), %rsi
movq %rbp, %rax
shlq $0x3a, %rax
andq %r10, %rsi
orq %rax, %rsi
movq $-0x1, %rax
movl %ebp, %ecx
shlq %cl, %rax
movq %rsi, (%r13)
notq %rax
movq %rax, 0x10(%r13)
movq 0x8(%r13), %r14
movq 0x8(%rsp), %r9
movq 0x50(%rsp), %r8
movq 0x28(%rsp), %rbp
orq 0x18(%rsp), %r12
movq 0x18(%r13), %rax
leaq 0x1(%r14), %rcx
movq %rcx, 0x8(%r13)
andq %r10, %rsi
addq %r14, %rsi
andq 0x10(%r13), %rsi
movq %r12, (%rax,%rsi,8)
movq 0x10(%rsp), %r13
jmp 0x14898f
movq %r14, %rdx
jmp 0x148b75
movq %r14, %rdx
jmp 0x148a73
movq 0x60(%rsp), %rcx
movq 0x8(%rcx), %rax
movq 0x28(%rcx), %rcx
movq 0x58(%rsp), %rsi
movq 0x70(%rsp), %rdi
movl %edi, %edx
movq 0x8(%rcx,%rdx,8), %rcx
testl %ecx, %ecx
je 0x1491c9
movq %rcx, %rdx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
leaq (%rax,%rdx,8), %r11
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
andq %rax, %rsi
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rsi, 0x58(%rsp)
addq %rsi, %rax
movq %rax, 0x20(%rsp)
movl %ecx, %r13d
xorl %r15d, %r15d
movq %r11, 0x10(%rsp)
movq %r13, 0x38(%rsp)
leaq (%r15,%r15,2), %rax
cmpl $0x0, 0xc(%r11,%rax,8)
js 0x148df3
leaq (%r11,%rax,8), %rax
movl 0x8(%rax), %r12d
shrl %r12d
movq 0xc0(%rbx), %rax
cmpb $0x0, (%rax,%r12)
je 0x148e00
incq %r15
cmpq %r13, %r15
jne 0x148dce
jmp 0x1491c9
movb $0x1, (%rax,%r12)
movq (%r9), %rax
movq 0x80(%r9), %rcx
movl (%rax,%r12,4), %edx
incq %rcx
cmpq %rdx, %rcx
jae 0x148f2c
cmpq 0x68(%rsp), %r8
jae 0x148df3
movq 0xf8(%rbx), %r13
movq (%r13), %rsi
movq 0x8(%r13), %r14
movq %rsi, %rax
shrq $0x3a, %rax
movl $0x1, %edx
movl %eax, %ecx
shlq %cl, %rdx
cmpq %rdx, %r14
jne 0x149190
movq %rbp, 0x28(%rsp)
leal 0x1(%rax), %ebp
movl $0x1, %edx
movl %ebp, %ecx
shlq %cl, %rdx
movq %rdx, 0x18(%rsp)
cmpq %r14, %rdx
jae 0x148ea9
movq $-0x1, %rbp
incq %rbp
movq %r14, %rdx
movl %ebp, %ecx
shrq %cl, %rdx
cmpq $0x3f, %rbp
ja 0x148e88
testq %rdx, %rdx
jne 0x148e72
cmpq %rbp, %rax
je 0x14918b
movl $0x1, %edx
movl %ebp, %ecx
shlq %cl, %rdx
movq %rdx, 0x18(%rsp)
cmpq %rax, %rbp
jbe 0x1491c1
movq 0x18(%r13), %rdi
movl $0x8, %esi
movl %ebp, %ecx
shlq %cl, %rsi
callq 0x2370
movq %rax, 0x18(%r13)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x10(%rsp), %r11
movq %rsi, %rax
andq %r10, %rax
addq %rax, %rdx
cmpq %r14, %rdx
jbe 0x14912b
movq 0x18(%r13), %rcx
movq %r14, %rdx
subq %rax, %rdx
movq 0x18(%rsp), %rsi
subq %rdx, %rsi
leaq (%rcx,%rsi,8), %rdi
leaq (%rcx,%rax,8), %rsi
shlq $0x3, %rdx
callq 0x2360
movq 0x10(%rsp), %r11
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x18(%rsp), %rsi
subq %r14, %rsi
addq (%r13), %rsi
jmp 0x149159
movq 0xf8(%rbx), %rbp
movq (%rbp), %rsi
movq 0x8(%rbp), %r14
movq %rsi, %rax
shrq $0x3a, %rax
movl $0x1, %edi
movl %eax, %ecx
shlq %cl, %rdi
cmpq %rdi, %r14
jne 0x149090
leal 0x1(%rax), %r13d
movl $0x1, %ebx
movl %r13d, %ecx
shlq %cl, %rbx
cmpq %r14, %rbx
jae 0x148faa
movq $-0x1, %r13
incq %r13
movq %r14, %rdi
movl %r13d, %ecx
shrq %cl, %rdi
cmpq $0x3f, %r13
ja 0x148f87
testq %rdi, %rdi
jne 0x148f70
cmpq %r13, %rax
jne 0x148f96
movq 0x30(%rsp), %rbx
jmp 0x14908b
movl $0x1, %ebx
movl %r13d, %ecx
shlq %cl, %rbx
cmpq %rax, %r13
jbe 0x1491b9
movq 0x18(%rbp), %rdi
movl $0x8, %esi
movl %r13d, %ecx
shlq %cl, %rsi
callq 0x2370
movq %rax, 0x18(%rbp)
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq 0x8(%rsp), %r9
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq %rsi, %rax
andq %r10, %rax
addq %rax, %rdx
cmpq %r14, %rdx
jbe 0x149023
movq 0x18(%rbp), %rcx
movq %r14, %rdx
subq %rax, %rdx
movq %rbx, %rsi
subq %rdx, %rsi
leaq (%rcx,%rsi,8), %rdi
leaq (%rcx,%rax,8), %rsi
shlq $0x3, %rdx
callq 0x2360
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
subq %r14, %rbx
addq (%rbp), %rbx
movq %rbx, %rsi
jmp 0x14904c
subq %rbx, %rdx
jbe 0x14904c
movq 0x18(%rbp), %rdi
leaq (%rdi,%rbx,8), %rsi
shlq $0x3, %rdx
callq 0x2360
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
movq (%rbp), %rsi
movq %r13, %rax
shlq $0x3a, %rax
andq %r10, %rsi
orq %rax, %rsi
movq %rsi, (%rbp)
movq $-0x1, %rax
movl %r13d, %ecx
shlq %cl, %rax
notq %rax
movq %rax, 0x10(%rbp)
movq 0x8(%rbp), %r14
movq (%r9), %rax
movl (%rax,%r12,4), %edx
movq 0x30(%rsp), %rbx
movq 0x50(%rsp), %r8
movq 0x10(%rsp), %r11
movq 0x38(%rsp), %r13
movq 0x58(%rsp), %rax
orq %r12, %rax
movq 0x18(%rbp), %rcx
leaq 0x1(%r14), %rdi
movq %rdi, 0x8(%rbp)
andq %r10, %rsi
addq %r14, %rsi
andq 0x10(%rbp), %rsi
movq %rax, (%rcx,%rsi,8)
movq 0x80(%r9), %rax
incq %rax
cmpq %rdx, %rax
jbe 0x149109
movq 0xf0(%rbx), %rax
cmpb $0x0, (%rax,%r12)
jne 0x149109
movq 0x40(%r9), %rcx
movl (%rcx,%rdx,4), %eax
movl 0x4(%rcx,%rdx,4), %ecx
subl %eax, %ecx
addl $-0x2, %ecx
je 0x149109
movq 0x28(%r9), %rdx
leaq (%rdx,%rax,4), %rax
addq $0x8, %rax
movl %ecx, %ecx
xorl %edx, %edx
movq 0xf0(%rbx), %rsi
movl (%rax,%rdx,4), %edi
shrl %edi
movb $0x1, (%rsi,%rdi)
incq %rdx
cmpq %rdx, %rcx
jne 0x1490f1
movl %r8d, %ebp
cmpl $0x0, 0x44(%rsp)
jne 0x148df3
movq 0xf0(%rbx), %rax
movb $0x1, (%rax,%r12)
movl %r8d, %ebp
jmp 0x148df3
movq 0x18(%rsp), %rax
subq %rax, %rdx
jbe 0x149159
movq 0x18(%r13), %rdi
leaq (%rdi,%rax,8), %rsi
shlq $0x3, %rdx
callq 0x2360
movq 0x10(%rsp), %r11
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq (%r13), %rsi
movq %rbp, %rax
shlq $0x3a, %rax
andq %r10, %rsi
orq %rax, %rsi
movq $-0x1, %rax
movl %ebp, %ecx
shlq %cl, %rax
movq %rsi, (%r13)
notq %rax
movq %rax, 0x10(%r13)
movq 0x8(%r13), %r14
movq 0x8(%rsp), %r9
movq 0x50(%rsp), %r8
movq 0x28(%rsp), %rbp
orq 0x20(%rsp), %r12
movq 0x18(%r13), %rax
leaq 0x1(%r14), %rcx
movq %rcx, 0x8(%r13)
andq %r10, %rsi
addq %r14, %rsi
andq 0x10(%r13), %rsi
movq %r12, (%rax,%rsi,8)
movq 0x38(%rsp), %r13
jmp 0x148df3
movq %r14, %rdx
jmp 0x148fd9
movq %r14, %rdx
jmp 0x148ed7
movq 0xf8(%rbx), %rax
movq 0x8(%rax), %rcx
testq %rcx, %rcx
jne 0x1488b6
movl %ebp, %ebp
movq %rbp, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdx
jmp 0x1487be