// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/graph.c
// Function: asmg_subgraph
uint32_t *asmg_subgraph(asmg_t *g, uint32_t *seeds, uint32_t n, uint32_t step, 
        uint64_t dist, uint32_t *_nv, int modify_graph)
{
    // make a subgraph from given a vertex set and radius
    // if modify_graph
    //     all vertices and arcs in other components will be marked as deleted
    //     return 0
    // else
    //     keep graph unchanged
    //     return the list of vertices in the subgraph
    if (n == 0) {
        if (_nv) *_nv = 0;
        return 0;
    }

    uint32_t r;
    uint64_t i, v, x, rd, nv;
    int8_t *flag;
    kdq_u64_t *q;
    kdq_u64_t *d;
    asmg_arc_t *av;

    if (step == 0)
        step = UINT32_MAX;
    if (dist == 0)
        dist = UINT64_MAX;

    MYCALLOC(flag, asmg_vtx_n(g));
    // flag deleted segments
    for (i = 0; i < g->n_vtx; ++i) {
        if (g->vtx[i].del) {
            flag[i<<1|0] = -1;
            flag[i<<1|1] = -1;
        }
    }

    q = kdq_init(uint64_t, 0);
    d = kdq_init(uint64_t, 0);
    for (i = 0; i < n; ++i) {
        if (seeds[i] < g->n_vtx) {
            kdq_push(uint64_t, q, ((uint64_t)seeds[i]<<1|0)<<32);
            kdq_push(uint64_t, d, 0);
            kdq_push(uint64_t, q, ((uint64_t)seeds[i]<<1|1)<<32);
            kdq_push(uint64_t, d, 0);
        }
    }

    if (modify_graph) {
        for (i = 0; i < g->n_vtx; ++i) // mark all segments to be deleted
            g->vtx[i].del = 1;
        // for (i = 0; i < g->n_arc; ++i) // mark all arcs to be deleted
        //     g->arc[i].del = 1;
    }

    while (kdq_size(q) > 0) {
        x = *kdq_shift(uint64_t, q);
        v = x>>32;
        r = (uint32_t) x;
        rd = *kdq_shift(uint64_t, d);
        if (flag[v] != 0) continue; // already visited or deleted
        flag[v] = 1;
        if (modify_graph) g->vtx[v>>1].del = 0;
        if (r < step && rd < dist) {
            nv = asmg_arc_n(g, v);
            av = asmg_arc_a(g, v);
            for (i = 0; i < nv; ++i) {
                if (av[i].del) continue;
                // if (modify_graph) av[i].del = 0;
                if (flag[av[i].w] == 0) {
                    kdq_push(uint64_t, q, (uint64_t)av[i].w<<32 | (r + 1));
                    kdq_push(uint64_t, d, rd + g->vtx[av[i].w>>1].len - av[i].ls);
                }
                if (flag[av[i].w^1] == 0) {
                    kdq_push(uint64_t, q, (uint64_t)(av[i].w^1)<<32 | (r + 1));
                    kdq_push(uint64_t, d, rd + g->vtx[av[i].w>>1].len - av[i].ls);
                }
            }
        }
    }
    assert(kdq_size(d) == 0);

    // change flag index from vtx<<1 to vtx
    for (i = 0; i < g->n_vtx; ++i)
        flag[i] = (flag[i<<1|0] > 0 || flag[i<<1|1] > 0);

    uint32_t *vs;
    nv = 0;
    vs = 0;
    if (!modify_graph) {
        // make vlist
        kvec_t(uint32_t) vlist;
        kv_init(vlist);
        for (i = 0; i < g->n_vtx; ++i)
            if (flag[i])
                kv_push(uint32_t, vlist, i);
        MYREALLOC(vlist.a, vlist.n);
        vs = vlist.a;
        nv = vlist.n;
    } else {
        // delete dirty arcs
        for (i = 0; i < g->n_arc; ++i) {
            if (!flag[g->arc[i].v>>1] || !flag[g->arc[i].w>>1])
                g->arc[i].del = 1;
        }
        if (_nv) {
            for (i = 0; i < g->n_vtx; ++i)
                nv += flag[i];
        }
    }
    
    if (_nv) *_nv = nv;
    
    kdq_destroy(uint64_t, q);
    kdq_destroy(uint64_t, d);
    free(flag);

    return vs;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %r13
movq %rsi, 0x10(%rsp)
testl %edx, %edx
je 0x19b46
movq %r8, %r15
movl %ecx, %r12d
movl %edx, %r14d
xorl %eax, %eax
cmpl $0x1, %ecx
movl $0x0, %ecx
sbbl %ecx, %ecx
movl %ecx, 0x4c(%rsp)
cmpq $0x1, %r8
sbbq %rax, %rax
movq %rax, 0x50(%rsp)
movq %rdi, 0x20(%rsp)
movq (%rdi), %rbx
leaq (%rbx,%rbx), %rdi
movl $0x1, %esi
callq 0x2250
testq %rbx, %rbx
je 0x18ba7
movq 0x20(%rsp), %rcx
movq 0x10(%rcx), %rdx
addq $0x20, %rdx
xorl %ecx, %ecx
testb $0x40, 0x3(%rdx)
je 0x18b9b
movw $0xffff, (%rax,%rcx,2)  # imm = 0xFFFF
incq %rcx
addq $0x28, %rdx
cmpq %rcx, %rbx
jne 0x18b8f
movq %r13, 0x60(%rsp)
movq %rax, 0x18(%rsp)
orl %r12d, 0x4c(%rsp)
orq %r15, 0x50(%rsp)
movabsq $0x3ffffffffffffff, %rbp # imm = 0x3FFFFFFFFFFFFFF
xorl %r13d, %r13d
movl $0x1, %esi
movl $0x28, %edx
xorl %edi, %edi
callq 0x1d660
movq %rax, %r15
movq (%rax), %rax
andq %rbp, %rax
btsq $0x3b, %rax
movq %rax, (%r15)
movl $0x3, %ebx
movq %rbx, 0x10(%r15)
movl $0x20, %esi
xorl %edi, %edi
callq 0x1d7c1
movq %rax, 0x18(%r15)
movq %r13, 0x20(%r15)
movl $0x1, %esi
movl $0x28, %edx
xorl %edi, %edi
callq 0x1d660
movq %rax, %r12
movq (%rax), %rax
andq %rbp, %rax
btsq $0x3b, %rax
movq %rax, (%r12)
movq %rbx, 0x10(%r12)
movl $0x20, %esi
xorl %edi, %edi
callq 0x1d7c1
movq %r12, %r9
movq %rax, 0x18(%r12)
movq %r13, 0x20(%r12)
movl %r14d, %ecx
movq %r12, 0x8(%rsp)
movq 0x20(%rsp), %rsi
movq %rcx, 0x40(%rsp)
movq 0x10(%rsp), %rax
movl (%rax,%r13,4), %ebp
cmpq %rbp, (%rsi)
jbe 0x191fc
movq (%r15), %rsi
movq 0x8(%r15), %rbx
movq %rsi, %rax
shrq $0x3a, %rax
movl $0x1, %edx
movl %eax, %ecx
shlq %cl, %rdx
cmpq %rdx, %rbx
jne 0x18d63
leal 0x1(%rax), %r14d
movl $0x1, %r12d
movl %r14d, %ecx
shlq %cl, %r12
cmpq %rbx, %r12
jae 0x18ce8
movq $-0x1, %r14
incq %r14
movq %rbx, %rdx
movl %r14d, %ecx
shrq %cl, %rdx
cmpq $0x3f, %r14
ja 0x18cc0
testq %rdx, %rdx
jne 0x18ca9
cmpq %r14, %rax
movabsq $0x3ffffffffffffff, %rdi # imm = 0x3FFFFFFFFFFFFFF
je 0x18dbf
movl $0x1, %r12d
movl %r14d, %ecx
shlq %cl, %r12
cmpq %rax, %r14
jbe 0x1920a
movq 0x18(%r15), %rsi
movq 0x20(%r15), %rdi
movl $0x8, %edx
movl %r14d, %ecx
shlq %cl, %rdx
callq 0x1d8c9
movq %rax, 0x18(%r15)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x8(%rsp), %r9
movabsq $0x3ffffffffffffff, %rdi # imm = 0x3FFFFFFFFFFFFFF
movq %rsi, %rax
andq %rdi, %rax
addq %rax, %rdx
cmpq %rbx, %rdx
jbe 0x18d6f
movq 0x18(%r15), %rcx
movq %rbx, %rdx
subq %rax, %rdx
movq %r12, %rsi
subq %rdx, %rsi
leaq (%rcx,%rsi,8), %rdi
leaq (%rcx,%rax,8), %rsi
shlq $0x3, %rdx
callq 0x2370
movabsq $0x3ffffffffffffff, %rdi # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
subq %rbx, %r12
addq (%r15), %r12
movq %r12, %rsi
jmp 0x18d97
movabsq $0x3ffffffffffffff, %rdi # imm = 0x3FFFFFFFFFFFFFF
jmp 0x18dbf
subq %r12, %rdx
jbe 0x18d97
movq 0x18(%r15), %rdi
leaq (%rdi,%r12,8), %rsi
shlq $0x3, %rdx
callq 0x2370
movabsq $0x3ffffffffffffff, %rdi # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
movq (%r15), %rsi
movq %r14, %rax
shlq $0x3a, %rax
andq %rdi, %rsi
orq %rax, %rsi
movq $-0x1, %rax
movl %r14d, %ecx
shlq %cl, %rax
movq %rsi, (%r15)
notq %rax
movq %rax, 0x10(%r15)
movq 0x8(%r15), %rbx
movq 0x18(%r15), %rax
leaq 0x1(%rbx), %rcx
movq %rcx, 0x8(%r15)
andq %rdi, %rsi
addq %rbx, %rsi
andq 0x10(%r15), %rsi
shlq $0x21, %rbp
movq %rbp, (%rax,%rsi,8)
movq (%r9), %rsi
movq 0x8(%r9), %rbx
movq %rsi, %rax
shrq $0x3a, %rax
movl $0x1, %edx
movl %eax, %ecx
shlq %cl, %rdx
cmpq %rdx, %rbx
jne 0x18f1a
leal 0x1(%rax), %r14d
movl $0x1, %r12d
movl %r14d, %ecx
shlq %cl, %r12
cmpq %rbx, %r12
jae 0x18e4f
movq $-0x1, %r14
incq %r14
movq %rbx, %rdx
movl %r14d, %ecx
shrq %cl, %rdx
cmpq $0x3f, %r14
ja 0x18e31
testq %rdx, %rdx
jne 0x18e1a
cmpq %r14, %rax
je 0x18f1a
movl $0x1, %r12d
movl %r14d, %ecx
shlq %cl, %r12
cmpq %rax, %r14
jbe 0x19212
movq 0x18(%r9), %rsi
movq 0x20(%r9), %rdi
movl $0x8, %edx
movl %r14d, %ecx
shlq %cl, %rdx
callq 0x1d8c9
movq 0x8(%rsp), %r9
movq %rax, 0x18(%r9)
movq (%r9), %rsi
movq 0x8(%r9), %rdx
movabsq $0x3ffffffffffffff, %rdi # imm = 0x3FFFFFFFFFFFFFF
movq %rsi, %rax
andq %rdi, %rax
addq %rax, %rdx
cmpq %rbx, %rdx
jbe 0x18eca
movq 0x18(%r9), %rcx
movq %rbx, %rdx
subq %rax, %rdx
movq %r12, %rsi
subq %rdx, %rsi
leaq (%rcx,%rsi,8), %rdi
leaq (%rcx,%rax,8), %rsi
shlq $0x3, %rdx
callq 0x2370
movabsq $0x3ffffffffffffff, %rdi # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
subq %rbx, %r12
addq (%r9), %r12
movq %r12, %rsi
jmp 0x18ef2
subq %r12, %rdx
jbe 0x18ef2
movq 0x18(%r9), %rdi
leaq (%rdi,%r12,8), %rsi
shlq $0x3, %rdx
callq 0x2370
movabsq $0x3ffffffffffffff, %rdi # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
movq (%r9), %rsi
movq %r14, %rax
shlq $0x3a, %rax
andq %rdi, %rsi
orq %rax, %rsi
movq $-0x1, %rax
movl %r14d, %ecx
shlq %cl, %rax
movq %rsi, (%r9)
notq %rax
movq %rax, 0x10(%r9)
movq 0x8(%r9), %rbx
movq 0x18(%r9), %rax
leaq 0x1(%rbx), %rcx
movq %rcx, 0x8(%r9)
andq %rdi, %rsi
addq %rbx, %rsi
andq 0x10(%r9), %rsi
movq $0x0, (%rax,%rsi,8)
movq 0x10(%rsp), %rax
movl (%rax,%r13,4), %ebp
movq (%r15), %rsi
movq 0x8(%r15), %rbx
movq %rsi, %rax
shrq $0x3a, %rax
movl $0x1, %edx
movl %eax, %ecx
shlq %cl, %rdx
cmpq %rdx, %rbx
jne 0x19074
leal 0x1(%rax), %r14d
movl $0x1, %r12d
movl %r14d, %ecx
shlq %cl, %r12
cmpq %rbx, %r12
jae 0x18fb3
movq $-0x1, %r14
incq %r14
movq %rbx, %rdx
movl %r14d, %ecx
shrq %cl, %rdx
cmpq $0x3f, %r14
ja 0x18f95
testq %rdx, %rdx
jne 0x18f7e
cmpq %r14, %rax
je 0x19074
movl $0x1, %r12d
movl %r14d, %ecx
shlq %cl, %r12
cmpq %rax, %r14
jbe 0x1921a
movq 0x18(%r15), %rsi
movq 0x20(%r15), %rdi
movl $0x8, %edx
movl %r14d, %ecx
shlq %cl, %rdx
callq 0x1d8c9
movq %rax, 0x18(%r15)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movabsq $0x3ffffffffffffff, %rdi # imm = 0x3FFFFFFFFFFFFFF
movq %rsi, %rax
andq %rdi, %rax
addq %rax, %rdx
cmpq %rbx, %rdx
jbe 0x19024
movq 0x18(%r15), %rcx
movq %rbx, %rdx
subq %rax, %rdx
movq %r12, %rsi
subq %rdx, %rsi
leaq (%rcx,%rsi,8), %rdi
leaq (%rcx,%rax,8), %rsi
shlq $0x3, %rdx
callq 0x2370
movabsq $0x3ffffffffffffff, %rdi # imm = 0x3FFFFFFFFFFFFFF
subq %rbx, %r12
addq (%r15), %r12
movq %r12, %rsi
jmp 0x19047
subq %r12, %rdx
jbe 0x19047
movq 0x18(%r15), %rdi
leaq (%rdi,%r12,8), %rsi
shlq $0x3, %rdx
callq 0x2370
movabsq $0x3ffffffffffffff, %rdi # imm = 0x3FFFFFFFFFFFFFF
movq (%r15), %rsi
movq %r14, %rax
shlq $0x3a, %rax
andq %rdi, %rsi
orq %rax, %rsi
movq $-0x1, %rax
movl %r14d, %ecx
shlq %cl, %rax
movq %rsi, (%r15)
notq %rax
movq %rax, 0x10(%r15)
movq 0x8(%r15), %rbx
movq 0x8(%rsp), %r9
shlq $0x21, %rbp
movq 0x18(%r15), %rax
leaq 0x1(%rbx), %rcx
movq %rcx, 0x8(%r15)
andq %rdi, %rsi
addq %rbx, %rsi
andq 0x10(%r15), %rsi
btsq $0x20, %rbp
movq %rbp, (%rax,%rsi,8)
movq (%r9), %rsi
movq 0x8(%r9), %rbx
movq %rsi, %rax
shrq $0x3a, %rax
movl $0x1, %edx
movl %eax, %ecx
shlq %cl, %rdx
cmpq %rdx, %rbx
jne 0x191d4
leal 0x1(%rax), %r14d
movl $0x1, %r12d
movl %r14d, %ecx
shlq %cl, %r12
cmpq %rbx, %r12
jae 0x19109
movq $-0x1, %r14
incq %r14
movq %rbx, %rdx
movl %r14d, %ecx
shrq %cl, %rdx
cmpq $0x3f, %r14
ja 0x190eb
testq %rdx, %rdx
jne 0x190d4
cmpq %r14, %rax
je 0x191d4
movl $0x1, %r12d
movl %r14d, %ecx
shlq %cl, %r12
cmpq %rax, %r14
jbe 0x19222
movq 0x18(%r9), %rsi
movq 0x20(%r9), %rdi
movl $0x8, %edx
movl %r14d, %ecx
shlq %cl, %rdx
callq 0x1d8c9
movq 0x8(%rsp), %r9
movq %rax, 0x18(%r9)
movq (%r9), %rsi
movq 0x8(%r9), %rdx
movabsq $0x3ffffffffffffff, %rdi # imm = 0x3FFFFFFFFFFFFFF
movq %rsi, %rax
andq %rdi, %rax
addq %rax, %rdx
cmpq %rbx, %rdx
jbe 0x19184
movq 0x18(%r9), %rcx
movq %rbx, %rdx
subq %rax, %rdx
movq %r12, %rsi
subq %rdx, %rsi
leaq (%rcx,%rsi,8), %rdi
leaq (%rcx,%rax,8), %rsi
shlq $0x3, %rdx
callq 0x2370
movabsq $0x3ffffffffffffff, %rdi # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
subq %rbx, %r12
addq (%r9), %r12
movq %r12, %rsi
jmp 0x191ac
subq %r12, %rdx
jbe 0x191ac
movq 0x18(%r9), %rdi
leaq (%rdi,%r12,8), %rsi
shlq $0x3, %rdx
callq 0x2370
movabsq $0x3ffffffffffffff, %rdi # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
movq (%r9), %rsi
movq %r14, %rax
shlq $0x3a, %rax
andq %rdi, %rsi
orq %rax, %rsi
movq $-0x1, %rax
movl %r14d, %ecx
shlq %cl, %rax
movq %rsi, (%r9)
notq %rax
movq %rax, 0x10(%r9)
movq 0x8(%r9), %rbx
movq 0x18(%r9), %rax
leaq 0x1(%rbx), %rcx
movq %rcx, 0x8(%r9)
andq %rdi, %rsi
addq %rbx, %rsi
andq 0x10(%r9), %rsi
movq $0x0, (%rax,%rsi,8)
movq 0x20(%rsp), %rsi
movq 0x40(%rsp), %rcx
incq %r13
cmpq %rcx, %r13
jne 0x18c5a
jmp 0x1922a
movq %rbx, %rdx
jmp 0x18d1a
movq %rbx, %rdx
jmp 0x18e81
movq %rbx, %rdx
jmp 0x18fe0
movq %rbx, %rdx
jmp 0x1913b
cmpl $0x0, 0xa0(%rsp)
je 0x19258
cmpq $0x0, (%rsi)
je 0x19258
movl $0x20, %eax
xorl %ecx, %ecx
movq 0x10(%rsi), %rdx
orl $0x40000000, (%rdx,%rax) # imm = 0x40000000
incq %rcx
addq $0x28, %rax
cmpq (%rsi), %rcx
jb 0x19241
movq 0x8(%r15), %rax
testq %rax, %rax
movq 0x18(%rsp), %r8
movq %r15, 0x10(%rsp)
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
je 0x19aa3
movq (%r15), %rcx
movq 0x18(%r15), %rdx
movq %rcx, %rsi
andq %r10, %rsi
leaq 0x1(%rcx), %rdi
andq %r10, %rdi
movabsq $-0x400000000000000, %r11 # imm = 0xFC00000000000000
andq %r11, %rcx
andq 0x10(%r15), %rdi
orq %rcx, %rdi
movq %rdi, (%r15)
decq %rax
movq %rax, 0x8(%r15)
movq (%rdx,%rsi,8), %rdi
movq (%r9), %rcx
movq 0x18(%r9), %rdx
leaq 0x1(%rcx), %rax
andq %r10, %rax
movq %rcx, %rsi
andq %r11, %rsi
andq 0x10(%r9), %rax
orq %rsi, %rax
movq %rax, (%r9)
decq 0x8(%r9)
movq %rdi, %rax
shrq $0x20, %rax
cmpb $0x0, (%r8,%rax)
je 0x192ed
movq 0x8(%r15), %rax
testq %rax, %rax
jne 0x19279
jmp 0x19aa3
andq %r10, %rcx
movq (%rdx,%rcx,8), %rcx
movq %rcx, 0x40(%rsp)
movb $0x1, (%r8,%rax)
cmpl $0x0, 0xa0(%rsp)
je 0x19324
movq 0x20(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq %rdi, %rdx
shrq $0x21, %rdx
leaq (%rdx,%rdx,4), %rdx
andl $0xbfffffff, 0x20(%rcx,%rdx,8) # imm = 0xBFFFFFFF
cmpl %edi, 0x4c(%rsp)
jbe 0x192df
movq 0x40(%rsp), %rcx
cmpq 0x50(%rsp), %rcx
jae 0x192df
movq 0x20(%rsp), %rcx
movq 0x38(%rcx), %rcx
movq (%rcx,%rax,8), %r11
testq %r11, %r11
je 0x192df
movq 0x20(%rsp), %rdx
movq 0x30(%rdx), %rcx
movq (%rcx,%rax,8), %rax
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
addq 0x28(%rdx), %rax
incl %edi
xorl %r13d, %r13d
movq %rdi, 0x30(%rsp)
movq %r11, 0x28(%rsp)
movq %rax, 0x58(%rsp)
leaq (,%r13,2), %rbp
addq %r13, %rbp
shlq $0x4, %rbp
testb $0x40, 0x23(%rax,%rbp)
jne 0x19a72
addq %rax, %rbp
movq 0x8(%rbp), %rbx
cmpb $0x0, (%r8,%rbx)
jne 0x19704
movq (%r15), %rsi
movq 0x8(%r15), %r12
movq %rsi, %rax
shrq $0x3a, %rax
movl $0x1, %edx
movl %eax, %ecx
shlq %cl, %rdx
cmpq %rdx, %r12
jne 0x19512
leal 0x1(%rax), %r14d
movl $0x1, %edx
movl %r14d, %ecx
shlq %cl, %rdx
cmpq %r12, %rdx
jae 0x19407
movq $-0x1, %r14
incq %r14
movq %r12, %rdx
movl %r14d, %ecx
shrq %cl, %rdx
cmpq $0x3f, %r14
ja 0x193f4
testq %rdx, %rdx
jne 0x193dd
cmpq %r14, %rax
jne 0x195b9
movq 0x10(%rsp), %r15
jmp 0x19512
movq %rdx, 0x38(%rsp)
movq 0x10(%rsp), %r15
movq 0x18(%r15), %rsi
movq 0x20(%r15), %rdi
movl $0x8, %edx
movl %r14d, %ecx
shlq %cl, %rdx
callq 0x1d8c9
movq %rax, 0x18(%r15)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x8(%rsp), %r9
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %r15
movq %rsi, %rax
andq %r10, %rax
addq %rax, %rdx
cmpq %r12, %rdx
jbe 0x194a5
movq 0x10(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq %r12, %rdx
subq %rax, %rdx
movq %r15, %rsi
subq %rdx, %rsi
leaq (%rcx,%rsi,8), %rdi
leaq (%rcx,%rax,8), %rsi
shlq $0x3, %rdx
callq 0x2370
movq 0x10(%rsp), %r11
movq 0x30(%rsp), %rdi
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
subq %r12, %r15
addq (%r11), %r15
movq %r15, %rsi
jmp 0x194dd
subq %r15, %rdx
movq 0x10(%rsp), %r11
jbe 0x194dd
movq 0x18(%r11), %rdi
leaq (%rdi,%r15,8), %rsi
shlq $0x3, %rdx
movq %r11, %r15
callq 0x2370
movq %r15, %r11
movq 0x30(%rsp), %rdi
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
movq (%r15), %rsi
movq %r14, %rax
shlq $0x3a, %rax
andq %r10, %rsi
orq %rax, %rsi
movq $-0x1, %rax
movl %r14d, %ecx
shlq %cl, %rax
movq %rsi, (%r11)
notq %rax
movq %rax, 0x10(%r11)
movq 0x8(%r11), %r12
movq 0x18(%rsp), %r8
movq %r11, %r15
movq 0x28(%rsp), %r11
shlq $0x20, %rbx
movq 0x18(%r15), %rax
leaq 0x1(%r12), %rcx
movq %rcx, 0x8(%r15)
andq %r10, %rsi
addq %r12, %rsi
andq 0x10(%r15), %rsi
orq %rdi, %rbx
movq %rbx, (%rax,%rsi,8)
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rbp), %rcx
shrq %rcx
leaq (%rcx,%rcx,4), %rcx
movq 0x18(%rax,%rcx,8), %rbx
addq 0x40(%rsp), %rbx
subq 0x18(%rbp), %rbx
movq (%r9), %rsi
movq 0x8(%r9), %r12
movq %rsi, %rax
shrq $0x3a, %rax
movl $0x1, %edx
movl %eax, %ecx
shlq %cl, %rdx
cmpq %rdx, %r12
jne 0x196e0
leal 0x1(%rax), %r14d
movl $0x1, %r15d
movl %r14d, %ecx
shlq %cl, %r15
cmpq %r12, %r15
jae 0x195ed
movq $-0x1, %r14
incq %r14
movq %r12, %rdx
movl %r14d, %ecx
shrq %cl, %rdx
cmpq $0x3f, %r14
ja 0x195aa
testq %rdx, %rdx
jne 0x19593
cmpq %r14, %rax
jne 0x195d8
movq 0x10(%rsp), %r15
jmp 0x196e0
movl $0x1, %r15d
movl %r14d, %ecx
shlq %cl, %r15
cmpq %rax, %r14
jbe 0x19a83
movq %r15, 0x38(%rsp)
jmp 0x1940c
movl $0x1, %r15d
movl %r14d, %ecx
shlq %cl, %r15
cmpq %rax, %r14
jbe 0x19a93
movq 0x18(%r9), %rsi
movq 0x20(%r9), %rdi
movl $0x8, %edx
movl %r14d, %ecx
shlq %cl, %rdx
callq 0x1d8c9
movq 0x8(%rsp), %r9
movq %rax, 0x18(%r9)
movq (%r9), %rsi
movq 0x8(%r9), %rdx
movq 0x18(%rsp), %r8
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x28(%rsp), %r11
movq %rsi, %rax
andq %r10, %rax
addq %rax, %rdx
cmpq %r12, %rdx
jbe 0x1967c
movq 0x18(%r9), %rcx
movq %r12, %rdx
subq %rax, %rdx
movq %r15, %rsi
subq %rdx, %rsi
leaq (%rcx,%rsi,8), %rdi
leaq (%rcx,%rax,8), %rsi
shlq $0x3, %rdx
callq 0x2370
movq 0x28(%rsp), %r11
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
movq 0x18(%rsp), %r8
subq %r12, %r15
addq (%r9), %r15
movq %r15, %rsi
jmp 0x196ae
subq %r15, %rdx
jbe 0x196ae
movq 0x18(%r9), %rdi
leaq (%rdi,%r15,8), %rsi
shlq $0x3, %rdx
callq 0x2370
movq 0x28(%rsp), %r11
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
movq 0x18(%rsp), %r8
movq (%r9), %rsi
movq %r14, %rax
shlq $0x3a, %rax
andq %r10, %rsi
orq %rax, %rsi
movq $-0x1, %rax
movl %r14d, %ecx
shlq %cl, %rax
movq %rsi, (%r9)
notq %rax
movq %rax, 0x10(%r9)
movq 0x8(%r9), %r12
movq 0x10(%rsp), %r15
movq 0x30(%rsp), %rdi
movq 0x18(%r9), %rax
leaq 0x1(%r12), %rcx
movq %rcx, 0x8(%r9)
andq %r10, %rsi
addq %r12, %rsi
andq 0x10(%r9), %rsi
movq %rbx, (%rax,%rsi,8)
movq 0x8(%rbp), %rbx
movq 0x58(%rsp), %rax
xorq $0x1, %rbx
cmpb $0x0, (%r8,%rbx)
jne 0x19a72
movq (%r15), %rsi
movq 0x8(%r15), %r12
movq %rsi, %rax
shrq $0x3a, %rax
movl $0x1, %edx
movl %eax, %ecx
shlq %cl, %rdx
cmpq %rdx, %r12
jne 0x19884
leal 0x1(%rax), %r14d
movl $0x1, %edx
movl %r14d, %ecx
shlq %cl, %rdx
cmpq %r12, %rdx
jae 0x19779
movq $-0x1, %r14
incq %r14
movq %r12, %rdx
movl %r14d, %ecx
shrq %cl, %rdx
cmpq $0x3f, %r14
ja 0x19766
testq %rdx, %rdx
jne 0x1974f
cmpq %r14, %rax
jne 0x1992b
movq 0x10(%rsp), %r15
jmp 0x19884
movq %rdx, 0x38(%rsp)
movq 0x10(%rsp), %r15
movq 0x18(%r15), %rsi
movq 0x20(%r15), %rdi
movl $0x8, %edx
movl %r14d, %ecx
shlq %cl, %rdx
callq 0x1d8c9
movq %rax, 0x18(%r15)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x8(%rsp), %r9
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %r15
movq %rsi, %rax
andq %r10, %rax
addq %rax, %rdx
cmpq %r12, %rdx
jbe 0x19817
movq 0x10(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq %r12, %rdx
subq %rax, %rdx
movq %r15, %rsi
subq %rdx, %rsi
leaq (%rcx,%rsi,8), %rdi
leaq (%rcx,%rax,8), %rsi
shlq $0x3, %rdx
callq 0x2370
movq 0x10(%rsp), %r11
movq 0x30(%rsp), %rdi
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
subq %r12, %r15
addq (%r11), %r15
movq %r15, %rsi
jmp 0x1984f
subq %r15, %rdx
movq 0x10(%rsp), %r11
jbe 0x1984f
movq 0x18(%r11), %rdi
leaq (%rdi,%r15,8), %rsi
shlq $0x3, %rdx
movq %r11, %r15
callq 0x2370
movq %r15, %r11
movq 0x30(%rsp), %rdi
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
movq (%r15), %rsi
movq %r14, %rax
shlq $0x3a, %rax
andq %r10, %rsi
orq %rax, %rsi
movq $-0x1, %rax
movl %r14d, %ecx
shlq %cl, %rax
movq %rsi, (%r11)
notq %rax
movq %rax, 0x10(%r11)
movq 0x8(%r11), %r12
movq 0x18(%rsp), %r8
movq %r11, %r15
movq 0x28(%rsp), %r11
shlq $0x20, %rbx
movq 0x18(%r15), %rax
leaq 0x1(%r12), %rcx
movq %rcx, 0x8(%r15)
andq %r10, %rsi
addq %r12, %rsi
andq 0x10(%r15), %rsi
orq %rdi, %rbx
movq %rbx, (%rax,%rsi,8)
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rbp), %rcx
shrq %rcx
leaq (%rcx,%rcx,4), %rcx
movq 0x18(%rax,%rcx,8), %rbx
addq 0x40(%rsp), %rbx
subq 0x18(%rbp), %rbx
movq (%r9), %rsi
movq 0x8(%r9), %r12
movq %rsi, %rax
shrq $0x3a, %rax
movl $0x1, %edx
movl %eax, %ecx
shlq %cl, %rdx
cmpq %rdx, %r12
jne 0x19a52
leal 0x1(%rax), %r14d
movl $0x1, %r15d
movl %r14d, %ecx
shlq %cl, %r15
cmpq %r12, %r15
jae 0x1995f
movq $-0x1, %r14
incq %r14
movq %r12, %rdx
movl %r14d, %ecx
shrq %cl, %rdx
cmpq $0x3f, %r14
ja 0x1991c
testq %rdx, %rdx
jne 0x19905
cmpq %r14, %rax
jne 0x1994a
movq 0x10(%rsp), %r15
jmp 0x19a52
movl $0x1, %r15d
movl %r14d, %ecx
shlq %cl, %r15
cmpq %rax, %r14
jbe 0x19a8b
movq %r15, 0x38(%rsp)
jmp 0x1977e
movl $0x1, %r15d
movl %r14d, %ecx
shlq %cl, %r15
cmpq %rax, %r14
jbe 0x19a9b
movq 0x18(%r9), %rsi
movq 0x20(%r9), %rdi
movl $0x8, %edx
movl %r14d, %ecx
shlq %cl, %rdx
callq 0x1d8c9
movq 0x8(%rsp), %r9
movq %rax, 0x18(%r9)
movq (%r9), %rsi
movq 0x8(%r9), %rdx
movq 0x18(%rsp), %r8
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x28(%rsp), %r11
movq %rsi, %rax
andq %r10, %rax
addq %rax, %rdx
cmpq %r12, %rdx
jbe 0x199ee
movq 0x18(%r9), %rcx
movq %r12, %rdx
subq %rax, %rdx
movq %r15, %rsi
subq %rdx, %rsi
leaq (%rcx,%rsi,8), %rdi
leaq (%rcx,%rax,8), %rsi
shlq $0x3, %rdx
callq 0x2370
movq 0x28(%rsp), %r11
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
movq 0x18(%rsp), %r8
subq %r12, %r15
addq (%r9), %r15
movq %r15, %rsi
jmp 0x19a20
subq %r15, %rdx
jbe 0x19a20
movq 0x18(%r9), %rdi
leaq (%rdi,%r15,8), %rsi
shlq $0x3, %rdx
callq 0x2370
movq 0x28(%rsp), %r11
movabsq $0x3ffffffffffffff, %r10 # imm = 0x3FFFFFFFFFFFFFF
movq 0x8(%rsp), %r9
movq 0x18(%rsp), %r8
movq (%r9), %rsi
movq %r14, %rax
shlq $0x3a, %rax
andq %r10, %rsi
orq %rax, %rsi
movq $-0x1, %rax
movl %r14d, %ecx
shlq %cl, %rax
movq %rsi, (%r9)
notq %rax
movq %rax, 0x10(%r9)
movq 0x8(%r9), %r12
movq 0x10(%rsp), %r15
movq 0x30(%rsp), %rdi
movq 0x18(%r9), %rax
leaq 0x1(%r12), %rcx
movq %rcx, 0x8(%r9)
andq %r10, %rsi
addq %r12, %rsi
andq 0x10(%r9), %rsi
movq %rbx, (%rax,%rsi,8)
movq 0x58(%rsp), %rax
incq %r13
cmpq %r11, %r13
jne 0x19375
jmp 0x192df
movq %r12, %rdx
jmp 0x1944d
movq %r12, %rdx
jmp 0x197bf
movq %r12, %rdx
jmp 0x19629
movq %r12, %rdx
jmp 0x1999b
cmpq $0x0, 0x8(%r9)
jne 0x19c62
movq 0x20(%rsp), %r10
movq (%r10), %rax
testq %rax, %rax
movq 0x60(%rsp), %r13
je 0x19b5b
xorl %ecx, %ecx
movb $0x1, %dl
cmpb $0x0, (%r8,%rcx,2)
jg 0x19ad8
cmpb $0x0, 0x1(%r8,%rcx,2)
setg %dl
movb %dl, (%r8,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x19ac6
cmpl $0x0, 0xa0(%rsp)
jne 0x19b65
xorl %ebx, %ebx
movl $0x2, %r14d
xorl %r15d, %r15d
xorl %edi, %edi
xorl %r12d, %r12d
cmpb $0x0, (%r8,%r12)
je 0x19b39
cmpq %r15, %rbx
jne 0x19b32
leaq (%rbx,%rbx), %r15
testq %rbx, %rbx
cmoveq %r14, %r15
leaq (,%r15,4), %rsi
callq 0x2350
movq 0x18(%rsp), %r8
movq %rax, %rdi
movq 0x20(%rsp), %rax
movq (%rax), %rax
movl %r12d, (%rdi,%rbx,4)
incq %rbx
incq %r12
cmpq %rax, %r12
jb 0x19afe
jmp 0x19bdf
testq %r13, %r13
je 0x19b53
movl $0x0, (%r13)
xorl %r14d, %r14d
jmp 0x19c50
cmpl $0x0, 0xa0(%rsp)
je 0x19bdb
movq 0x18(%r10), %rax
testq %rax, %rax
je 0x19bac
movl $0x20, %ecx
xorl %edx, %edx
movq 0x28(%r10), %rsi
movq -0x20(%rsi,%rcx), %rdi
shrq %rdi
cmpb $0x0, (%r8,%rdi)
je 0x19b97
movq -0x18(%rsi,%rcx), %rdi
shrq %rdi
cmpb $0x0, (%r8,%rdi)
jne 0x19ba0
orb $0x40, 0x3(%rsi,%rcx)
movq 0x18(%r10), %rax
incq %rdx
addq $0x30, %rcx
cmpq %rax, %rdx
jb 0x19b75
testq %r13, %r13
je 0x19bd2
movq (%r10), %rax
xorl %r14d, %r14d
testq %rax, %rax
je 0x19bd7
xorl %ecx, %ecx
xorl %ebx, %ebx
movsbq (%r8,%rcx), %rdx
addq %rdx, %rbx
incq %rcx
cmpq %rcx, %rax
jne 0x19bc0
jmp 0x19bf9
xorl %r14d, %r14d
jmp 0x19c02
xorl %ebx, %ebx
jmp 0x19bfe
xorl %edi, %edi
xorl %ebx, %ebx
leaq (,%rbx,4), %rsi
callq 0x2350
movq %rax, %r14
movq 0x10(%rsp), %r15
movq 0x8(%rsp), %r9
testq %r13, %r13
je 0x19c02
movl %ebx, (%r13)
testq %r15, %r15
je 0x19c25
movq 0x18(%r15), %rsi
movq 0x20(%r15), %rdi
callq 0x1d6fb
movq 0x20(%r15), %rdi
movq %r15, %rsi
callq 0x1d6fb
movq 0x8(%rsp), %r9
testq %r9, %r9
je 0x19c46
movq 0x18(%r9), %rsi
movq 0x20(%r9), %rdi
movq %r9, %rbx
callq 0x1d6fb
movq 0x20(%rbx), %rdi
movq %rbx, %rsi
callq 0x1d6fb
movq 0x18(%rsp), %rdi
callq 0x2060
movq %r14, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7087(%rip), %rdi      # 0x20cf0
leaq 0x7091(%rip), %rsi      # 0x20d01
leaq 0x7092(%rip), %rcx      # 0x20d09
movl $0x4a6, %edx            # imm = 0x4A6
callq 0x21d0