// File: /workspace/github_c_makefile_star2_O0/c-zhou[P]oatk/graph.c
// Function: asmg_unitigging
asmg_t *asmg_unitigging(asmg_t *g)
{
    uint64_t i, j, k, n_vtx, n_arc, n_arc1, v, w, n, m, *vtx_p;
    asmg_arc_t *arc, *arc1;
    asmg_vtx_t *vtx, *vtx1;
    uint8_t *vtx_visited;
    asmg_t *utg_asmg;
    kvec_t(asmg_vtx_t) utgs = {0, 0, 0};
    kvec_t(asmg_arc_t) arcs = {0, 0, 0};
    vtx = g->vtx;
    n_vtx = g->n_vtx;
    MYCALLOC(vtx_visited, n_vtx);

    /* first visit for all untigs connected to a junction */
    for (i = 0; i < n_vtx; ++i) {
        if (vtx[i].del || !is_junction(g, i))
            continue;
        for (k = 0; k < 2; ++k) {
            v = i << 1 | k;
            n_arc = asmg_arc_n(g, v);
            n_arc1 = asmg_arc_n1(g, v);
            arc = asmg_arc_a(g, v);
            for (j = 0; j < n_arc; ++j) {
                if (arc[j].del)
                    continue;
                kvec_t(uint64_t) vec = {0, 0, 0};
                if (!vtx_visited[v>>1] && n_arc1 == 1)
                    kv_push(uint64_t, vec, v); /* add to utg vec */
                v = asmg_arc_tail(arc[j]);
                /* v can be the start point of a unitig */
                while (!vtx_visited[v>>1] && asmg_arc_n1(g, v^1) == 1) {
                    kv_push(uint64_t, vec, v);
                    vtx_visited[v>>1] = 1;
                    if (asmg_arc_n1(g, v) == 1) /* at most one outgoing edge */
                        v = asmg_arc_a1(g, v)->w;
                    else
                        break;
                }
                if (vec.n > 1) {
                    kv_pushp(asmg_vtx_t, utgs, &vtx1);
                    vtx1->n = vec.n;
                    vtx1->a = vec.a;
                    vtx1->seq = 0;
                    vtx1->len = 0;
                    vtx1->cov = vtx1->del = vtx1->circ = 0;
                    MYREALLOC(vtx1->a, vtx1->n);
                } else {
                    kv_destroy(vec);
                }
            }
        }
        vtx_visited[i] = 1;
    }

    /* second visit to get linear path */
    /* TODO */
    /* consider this special case as linear */
    /* v(-)->v(+) v(+)->w(+) w(+)->w(-) */
    for (i = 0; i < n_vtx; ++i) {
        if (vtx[i].del || vtx_visited[i] ||
                (asmg_arc_n1(g, i << 1) > 0 &&
                 asmg_arc_n1(g, i << 1 | 1) > 0))
            continue;
        v = asmg_arc_n1(g, i << 1) > 0? i << 1 : i << 1 | 1;
        kvec_t(uint64_t) vec = {0, 0, 0};
        kv_push(uint64_t, vec, v);
        vtx_visited[v>>1] = 1;
        while (asmg_arc_n1(g, v) == 1) { /* should always be 1 */
            v = asmg_arc_a1(g, v)->w;
            if (!vtx_visited[v>>1])
                kv_push(uint64_t, vec, v);
            else
                break;
            vtx_visited[v>>1] = 1;
        }
        if (vec.n > 1) {
            kv_pushp(asmg_vtx_t, utgs, &vtx1);
            vtx1->n = vec.n;
            vtx1->a = vec.a;
            vtx1->seq = 0;
            vtx1->len = 0;
            vtx1->cov = vtx1->del = vtx1->circ = 0;
            MYREALLOC(vtx1->a, vtx1->n);
        } else {
            kv_destroy(vec);
        }
    }

    /* last visit for the remaining unvisited non-juntions on circles */
    for (i = 0; i < n_vtx; ++i) {
        if (vtx[i].del || vtx_visited[i]) continue;
        v = i << 1; /* either direction would work */
        kvec_t(uint64_t) vec = {0, 0, 0};
        kv_push(uint64_t, vec, v);
        vtx_visited[v>>1] = 1;
        while (asmg_arc_n1(g, v) > 0) {
            v = asmg_arc_a1(g, v)->w;
            if (!vtx_visited[v>>1])
                kv_push(uint64_t, vec, v);
            else
                break;
            vtx_visited[v>>1] = 1;
        }
        if (vec.n > 1) {
            kv_pushp(asmg_vtx_t, utgs, &vtx1);
            vtx1->n = vec.n;
            vtx1->a = vec.a;
            vtx1->seq = 0;
            vtx1->len = 0;
            vtx1->cov = vtx1->del = 0;
            vtx1->circ = 1;
            MYREALLOC(vtx1->a, vtx1->n);
        } else {
            kv_destroy(vec);
        }
    }
    free(vtx_visited);

    /* singleton: UINT64_MAX; start: u << 1 | 0; end: u << 1 | 1; mid: UINT64_MAX - 1 */
    MYMALLOC(vtx_p, n_vtx);
    MYBONE(vtx_p, n_vtx);
    for (i = 0; i < utgs.n; ++i) {
        vtx1 = &utgs.a[i];
        vtx_p[vtx1->a[0]>>1] = i << 1;
        vtx_p[vtx1->a[vtx1->n-1]>>1] = i << 1 | 1;
        for (j = 1; j < vtx1->n-1; ++j) { /* vtx1->n > 1 */
            vtx_p[vtx1->a[j]>>1] = UINT64_MAX - 1;
            asmg_arc_del(g, vtx1->a[j-1], vtx1->a[j], 1);
            asmg_arc_del(g, vtx1->a[j]^1, vtx1->a[j-1]^1, 1);
        }
        asmg_arc_del(g, vtx1->a[vtx1->n-2], vtx1->a[vtx1->n-1], 1);
        asmg_arc_del(g, vtx1->a[vtx1->n-1]^1, vtx1->a[vtx1->n-2]^1, 1);
    }
    
    /* add singletons to utg set */
    for (i = 0; i < n_vtx; ++i) {
        if (vtx_p[i] == UINT64_MAX && !vtx[i].del) {
            vtx_p[i] = utgs.n << 1; /*update index*/
            kv_pushp(asmg_vtx_t, utgs, &vtx1);
            v = i << 1;
            vtx1->n = 1;
            MYMALLOC(vtx1->a, 1);
            vtx1->a[0] = v;
            vtx1->seq = 0;
            vtx1->len = 0;
            vtx1->cov = vtx1->del = 0;
            vtx1->circ = asmg_arc_exist1(g, v, v);
        }
    }

    /* add arcs */
    for (i = 0, n_arc = g->n_arc; i < n_arc; ++i) {
        arc = &g->arc[i];
        if (arc->del) continue;
        v = vtx_p[arc->v>>1];
        w = vtx_p[arc->w>>1];
        if (v == UINT64_MAX - 1 || w == UINT64_MAX - 1) continue;
        kv_pushp(asmg_arc_t, arcs, &arc1);
        arc1->v = utgs.a[v>>1].n>1? v^1 : v|(arc->v&1);
        arc1->w = utgs.a[w>>1].n>1?  w  : w|(arc->w&1);
        arc1->ln = arc->ln;
        arc1->ls = arc->ls;
        arc1->link_id = arc->link_id;
        arc1->cov = arc->cov;
        arc1->del = 0;
        arc1->comp = arc->comp;
    }
    free(vtx_p);

    /* expand utgs */
    for (i = 0, n = utgs.n; i < n; ++i) {
        vtx_p = utgs.a[i].a;
        m = utgs.a[i].n;
        u64_v_t v_vec = {0, 0, 0};
        for (j = 0; j < m; ++j) {
            if (j > 0)
                v_vec.n -= asmg_arc(g, vtx_p[j-1], vtx_p[j])->ln;
            vtx1 = &vtx[vtx_p[j]>>1];
            vec_add(&v_vec, vtx1->a, vtx1->n, !!(vtx_p[j]&1));
        }
        vtx1 = &utgs.a[i];
        free(vtx1->a);
        vtx1->n = v_vec.n;
        vtx1->a = v_vec.a;
        vtx1->cov = 0; // need to redo alignment and coverage estimation
        MYREALLOC(vtx1->a, vtx1->n);
    }

    /* finalize */
    MYCALLOC(utg_asmg, 1);
    utg_asmg->n_vtx = utgs.n;
    utg_asmg->m_vtx = utgs.m;
    utg_asmg->vtx = utgs.a;
    utg_asmg->n_arc = arcs.n;
    utg_asmg->m_arc = arcs.m;
    utg_asmg->arc = arcs.a;

    asmg_finalize(utg_asmg, 1);

    return utg_asmg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x8(%rbp)
leaq -0xa8(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x21f0
leaq -0xc0(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x21f0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0x2250
movq %rax, -0x88(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x22556
movq -0x78(%rbp), %rax
imulq $0x28, -0x10(%rbp), %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x22143
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x23480
cmpl $0x0, %eax
jne 0x22148
jmp 0x22545
movq $0x0, -0x20(%rbp)
cmpq $0x2, -0x20(%rbp)
jae 0x22536
movq -0x10(%rbp), %rax
shlq %rax
orq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x21690
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movq -0x40(%rbp), %rdx
imulq $0x30, (%rcx,%rdx,8), %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x22523
movq -0x68(%rbp), %rax
imulq $0x30, -0x18(%rbp), %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x221e4
jmp 0x22512
leaq -0xd8(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x21f0
movq -0x88(%rbp), %rax
movq -0x40(%rbp), %rcx
shrq %rcx
cmpb $0x0, (%rax,%rcx)
jne 0x222a9
cmpq $0x1, -0x38(%rbp)
jne 0x222a9
jmp 0x2221c
movq -0xd8(%rbp), %rax
cmpq -0xd0(%rbp), %rax
jne 0x22283
cmpq $0x0, -0xd0(%rbp)
je 0x22249
movq -0xd0(%rbp), %rax
shlq %rax
movq %rax, -0x128(%rbp)
jmp 0x22257
movl $0x2, %eax
movq %rax, -0x128(%rbp)
jmp 0x22257
movq -0x128(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xc8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0xc8(%rbp)
movq -0x40(%rbp), %rdx
movq -0xc8(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xd8(%rbp)
movq %rdx, (%rax,%rcx,8)
jmp 0x222a9
movq -0x68(%rbp), %rax
imulq $0x30, -0x18(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x88(%rbp), %rcx
movq -0x40(%rbp), %rdx
shrq %rdx
xorl %eax, %eax
cmpb $0x0, (%rcx,%rdx)
movb %al, -0x129(%rbp)
jne 0x222f7
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
xorq $0x1, %rsi
callq 0x21690
cmpq $0x1, %rax
sete %al
movb %al, -0x129(%rbp)
movb -0x129(%rbp), %al
testb $0x1, %al
jne 0x22306
jmp 0x223d6
jmp 0x22308
movq -0xd8(%rbp), %rax
cmpq -0xd0(%rbp), %rax
jne 0x2236f
cmpq $0x0, -0xd0(%rbp)
je 0x22335
movq -0xd0(%rbp), %rax
shlq %rax
movq %rax, -0x138(%rbp)
jmp 0x22343
movl $0x2, %eax
movq %rax, -0x138(%rbp)
jmp 0x22343
movq -0x138(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xc8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0xc8(%rbp)
movq -0x40(%rbp), %rdx
movq -0xc8(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xd8(%rbp)
movq %rdx, (%rax,%rcx,8)
movq -0x88(%rbp), %rax
movq -0x40(%rbp), %rcx
shrq %rcx
movb $0x1, (%rax,%rcx)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x21690
cmpq $0x1, %rax
jne 0x223cf
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x210c0
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x223d1
jmp 0x223d6
jmp 0x222bd
cmpq $0x1, -0xd8(%rbp)
jbe 0x22504
jmp 0x223e6
movq -0xa8(%rbp), %rax
cmpq -0xa0(%rbp), %rax
jne 0x2244a
cmpq $0x0, -0xa0(%rbp)
je 0x22413
movq -0xa0(%rbp), %rax
shlq %rax
movq %rax, -0x140(%rbp)
jmp 0x22421
movl $0x2, %eax
movq %rax, -0x140(%rbp)
jmp 0x22421
movq -0x140(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
imulq $0x28, -0xa0(%rbp), %rsi
callq 0x2360
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0xa8(%rbp)
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0xd8(%rbp), %rcx
movq -0x80(%rbp), %rax
movq %rcx, (%rax)
movq -0xc8(%rbp), %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x80(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x80(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x80(%rbp), %rax
movl 0x20(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x20(%rax)
movq -0x80(%rbp), %rax
movl 0x20(%rax), %ecx
andl $0xbfffffff, %ecx       # imm = 0xBFFFFFFF
orl $0x0, %ecx
movl %ecx, 0x20(%rax)
movq -0x80(%rbp), %rax
movl 0x20(%rax), %ecx
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl $0x0, %ecx
movl %ecx, 0x20(%rax)
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x80(%rbp), %rax
movq (%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x22510
movq -0xc8(%rbp), %rdi
callq 0x2060
jmp 0x22512
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x221b7
jmp 0x22525
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x22150
movq -0x88(%rbp), %rax
movq -0x10(%rbp), %rcx
movb $0x1, (%rax,%rcx)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x22109
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x228fb
movq -0x78(%rbp), %rax
imulq $0x28, -0x10(%rbp), %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x225ca
movq -0x88(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x225ca
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
shlq %rsi
callq 0x21690
cmpq $0x0, %rax
jbe 0x225cf
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
shlq %rsi
orq $0x1, %rsi
callq 0x21690
cmpq $0x0, %rax
jbe 0x225cf
jmp 0x228ea
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
shlq %rsi
callq 0x21690
cmpq $0x0, %rax
jbe 0x225f5
movq -0x10(%rbp), %rax
shlq %rax
movq %rax, -0x148(%rbp)
jmp 0x22607
movq -0x10(%rbp), %rax
shlq %rax
orq $0x1, %rax
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0xf0(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x21f0
movq -0xf0(%rbp), %rax
cmpq -0xe8(%rbp), %rax
jne 0x2268c
cmpq $0x0, -0xe8(%rbp)
je 0x22652
movq -0xe8(%rbp), %rax
shlq %rax
movq %rax, -0x150(%rbp)
jmp 0x22660
movl $0x2, %eax
movq %rax, -0x150(%rbp)
jmp 0x22660
movq -0x150(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0xe0(%rbp), %rdi
movq -0xe8(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0xe0(%rbp)
movq -0x40(%rbp), %rdx
movq -0xe0(%rbp), %rax
movq -0xf0(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xf0(%rbp)
movq %rdx, (%rax,%rcx,8)
movq -0x88(%rbp), %rax
movq -0x40(%rbp), %rcx
shrq %rcx
movb $0x1, (%rax,%rcx)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x21690
cmpq $0x1, %rax
jne 0x227ae
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x210c0
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x88(%rbp), %rax
movq -0x40(%rbp), %rcx
shrq %rcx
cmpb $0x0, (%rax,%rcx)
jne 0x22795
jmp 0x22708
movq -0xf0(%rbp), %rax
cmpq -0xe8(%rbp), %rax
jne 0x2276f
cmpq $0x0, -0xe8(%rbp)
je 0x22735
movq -0xe8(%rbp), %rax
shlq %rax
movq %rax, -0x158(%rbp)
jmp 0x22743
movl $0x2, %eax
movq %rax, -0x158(%rbp)
jmp 0x22743
movq -0x158(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0xe0(%rbp), %rdi
movq -0xe8(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0xe0(%rbp)
movq -0x40(%rbp), %rdx
movq -0xe0(%rbp), %rax
movq -0xf0(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xf0(%rbp)
movq %rdx, (%rax,%rcx,8)
jmp 0x22797
jmp 0x227ae
movq -0x88(%rbp), %rax
movq -0x40(%rbp), %rcx
shrq %rcx
movb $0x1, (%rax,%rcx)
jmp 0x226c2
cmpq $0x1, -0xf0(%rbp)
jbe 0x228dc
jmp 0x227be
movq -0xa8(%rbp), %rax
cmpq -0xa0(%rbp), %rax
jne 0x22822
cmpq $0x0, -0xa0(%rbp)
je 0x227eb
movq -0xa0(%rbp), %rax
shlq %rax
movq %rax, -0x160(%rbp)
jmp 0x227f9
movl $0x2, %eax
movq %rax, -0x160(%rbp)
jmp 0x227f9
movq -0x160(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
imulq $0x28, -0xa0(%rbp), %rsi
callq 0x2360
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0xa8(%rbp)
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0xf0(%rbp), %rcx
movq -0x80(%rbp), %rax
movq %rcx, (%rax)
movq -0xe0(%rbp), %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x80(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x80(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x80(%rbp), %rax
movl 0x20(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x20(%rax)
movq -0x80(%rbp), %rax
movl 0x20(%rax), %ecx
andl $0xbfffffff, %ecx       # imm = 0xBFFFFFFF
orl $0x0, %ecx
movl %ecx, 0x20(%rax)
movq -0x80(%rbp), %rax
movl 0x20(%rax), %ecx
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl $0x0, %ecx
movl %ecx, 0x20(%rax)
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x80(%rbp), %rax
movq (%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x228e8
movq -0xe0(%rbp), %rdi
callq 0x2060
jmp 0x228ea
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x2255e
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x22c3b
movq -0x78(%rbp), %rax
imulq $0x28, -0x10(%rbp), %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x2293f
movq -0x88(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x22944
jmp 0x22c2a
movq -0x10(%rbp), %rax
shlq %rax
movq %rax, -0x40(%rbp)
leaq -0x108(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x21f0
movq -0x108(%rbp), %rax
cmpq -0x100(%rbp), %rax
jne 0x229c9
cmpq $0x0, -0x100(%rbp)
je 0x2298f
movq -0x100(%rbp), %rax
shlq %rax
movq %rax, -0x168(%rbp)
jmp 0x2299d
movl $0x2, %eax
movq %rax, -0x168(%rbp)
jmp 0x2299d
movq -0x168(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0xf8(%rbp), %rdi
movq -0x100(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0xf8(%rbp)
movq -0x40(%rbp), %rdx
movq -0xf8(%rbp), %rax
movq -0x108(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x108(%rbp)
movq %rdx, (%rax,%rcx,8)
movq -0x88(%rbp), %rax
movq -0x40(%rbp), %rcx
shrq %rcx
movb $0x1, (%rax,%rcx)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x21690
cmpq $0x0, %rax
jbe 0x22aeb
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x210c0
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x88(%rbp), %rax
movq -0x40(%rbp), %rcx
shrq %rcx
cmpb $0x0, (%rax,%rcx)
jne 0x22ad2
jmp 0x22a45
movq -0x108(%rbp), %rax
cmpq -0x100(%rbp), %rax
jne 0x22aac
cmpq $0x0, -0x100(%rbp)
je 0x22a72
movq -0x100(%rbp), %rax
shlq %rax
movq %rax, -0x170(%rbp)
jmp 0x22a80
movl $0x2, %eax
movq %rax, -0x170(%rbp)
jmp 0x22a80
movq -0x170(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0xf8(%rbp), %rdi
movq -0x100(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0xf8(%rbp)
movq -0x40(%rbp), %rdx
movq -0xf8(%rbp), %rax
movq -0x108(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x108(%rbp)
movq %rdx, (%rax,%rcx,8)
jmp 0x22ad4
jmp 0x22aeb
movq -0x88(%rbp), %rax
movq -0x40(%rbp), %rcx
shrq %rcx
movb $0x1, (%rax,%rcx)
jmp 0x229ff
cmpq $0x1, -0x108(%rbp)
jbe 0x22c1c
jmp 0x22afb
movq -0xa8(%rbp), %rax
cmpq -0xa0(%rbp), %rax
jne 0x22b5f
cmpq $0x0, -0xa0(%rbp)
je 0x22b28
movq -0xa0(%rbp), %rax
shlq %rax
movq %rax, -0x178(%rbp)
jmp 0x22b36
movl $0x2, %eax
movq %rax, -0x178(%rbp)
jmp 0x22b36
movq -0x178(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
imulq $0x28, -0xa0(%rbp), %rsi
callq 0x2360
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0xa8(%rbp)
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x108(%rbp), %rcx
movq -0x80(%rbp), %rax
movq %rcx, (%rax)
movq -0xf8(%rbp), %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x80(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x80(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x80(%rbp), %rax
movl 0x20(%rax), %ecx
andl $0xbfffffff, %ecx       # imm = 0xBFFFFFFF
orl $0x0, %ecx
movl %ecx, 0x20(%rax)
movq -0x80(%rbp), %rax
movl 0x20(%rax), %ecx
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl $0x0, %ecx
movl %ecx, 0x20(%rax)
movq -0x80(%rbp), %rax
movl 0x20(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x80000000, %ecx       # imm = 0x80000000
movl %ecx, 0x20(%rax)
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x80(%rbp), %rax
movq (%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x22c28
movq -0xf8(%rbp), %rdi
callq 0x2060
jmp 0x22c2a
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x22903
movq -0x88(%rbp), %rdi
callq 0x2060
movq -0x28(%rbp), %rdi
shlq $0x3, %rdi
callq 0x2320
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
movq -0x28(%rbp), %rdx
shlq $0x3, %rdx
movl $0xff, %esi
callq 0x21f0
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0xa8(%rbp), %rax
jae 0x22e31
movq -0x98(%rbp), %rax
imulq $0x28, -0x10(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rdx
shlq %rdx
movq -0x60(%rbp), %rax
movq -0x80(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx), %rcx
shrq %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rdx
shlq %rdx
orq $0x1, %rdx
movq -0x60(%rbp), %rax
movq -0x80(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x80(%rbp), %rsi
movq (%rsi), %rsi
subq $0x1, %rsi
movq (%rcx,%rsi,8), %rcx
shrq %rcx
movq %rdx, (%rax,%rcx,8)
movq $0x1, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x80(%rbp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x22da0
movq -0x60(%rbp), %rax
movq -0x80(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x18(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq %rcx
movq $-0x2, (%rax,%rcx,8)
movq -0x8(%rbp), %rdi
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rsi
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movl $0x1, %ecx
callq 0x21ce0
movq -0x8(%rbp), %rdi
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
xorq $0x1, %rsi
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
xorq $0x1, %rdx
movl $0x1, %ecx
callq 0x21ce0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x22cec
movq -0x8(%rbp), %rdi
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x80(%rbp), %rcx
movq (%rcx), %rcx
subq $0x2, %rcx
movq (%rax,%rcx,8), %rsi
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x80(%rbp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
movl $0x1, %ecx
callq 0x21ce0
movq -0x8(%rbp), %rdi
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x80(%rbp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rsi
xorq $0x1, %rsi
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x80(%rbp), %rcx
movq (%rcx), %rcx
subq $0x2, %rcx
movq (%rax,%rcx,8), %rdx
xorq $0x1, %rdx
movl $0x1, %ecx
callq 0x21ce0
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x22c76
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x22fcf
movq -0x60(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq $-0x1, (%rax,%rcx,8)
jne 0x22fbc
movq -0x78(%rbp), %rax
imulq $0x28, -0x10(%rbp), %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x22fbc
movq -0xa8(%rbp), %rdx
shlq %rdx
movq -0x60(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0xa8(%rbp), %rax
cmpq -0xa0(%rbp), %rax
jne 0x22ef2
cmpq $0x0, -0xa0(%rbp)
je 0x22ebb
movq -0xa0(%rbp), %rax
shlq %rax
movq %rax, -0x180(%rbp)
jmp 0x22ec9
movl $0x2, %eax
movq %rax, -0x180(%rbp)
jmp 0x22ec9
movq -0x180(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
imulq $0x28, -0xa0(%rbp), %rsi
callq 0x2360
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0xa8(%rbp)
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
shlq %rax
movq %rax, -0x40(%rbp)
movq -0x80(%rbp), %rax
movq $0x1, (%rax)
movl $0x8, %edi
callq 0x2320
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rcx
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x80(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x80(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x80(%rbp), %rax
movl 0x20(%rax), %ecx
andl $0xbfffffff, %ecx       # imm = 0xBFFFFFFF
orl $0x0, %ecx
movl %ecx, 0x20(%rax)
movq -0x80(%rbp), %rax
movl 0x20(%rax), %ecx
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl $0x0, %ecx
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x234e0
movl %eax, %edx
movq -0x80(%rbp), %rax
movl 0x20(%rax), %ecx
andl $0x1, %edx
shll $0x1f, %edx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl %edx, %ecx
movl %ecx, 0x20(%rax)
jmp 0x22fbe
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x22e39
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x23228
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
imulq $0x30, -0x10(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movl 0x20(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2301c
jmp 0x23217
movq -0x60(%rbp), %rax
movq -0x68(%rbp), %rcx
movq (%rcx), %rcx
shrq %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x60(%rbp), %rax
movq -0x68(%rbp), %rcx
movq 0x8(%rcx), %rcx
shrq %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
cmpq $-0x2, -0x40(%rbp)
je 0x23057
cmpq $-0x2, -0x48(%rbp)
jne 0x2305c
jmp 0x23217
jmp 0x2305e
movq -0xc0(%rbp), %rax
cmpq -0xb8(%rbp), %rax
jne 0x230c2
cmpq $0x0, -0xb8(%rbp)
je 0x2308b
movq -0xb8(%rbp), %rax
shlq %rax
movq %rax, -0x188(%rbp)
jmp 0x23099
movl $0x2, %eax
movq %rax, -0x188(%rbp)
jmp 0x23099
movq -0x188(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rdi
imulq $0x30, -0xb8(%rbp), %rsi
callq 0x2360
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq -0xc0(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0xc0(%rbp)
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x98(%rbp), %rax
movq -0x40(%rbp), %rcx
shrq %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpq $0x1, (%rax)
jbe 0x23115
movq -0x40(%rbp), %rax
xorq $0x1, %rax
movq %rax, -0x190(%rbp)
jmp 0x2312e
movq -0x40(%rbp), %rax
movq -0x68(%rbp), %rcx
movq (%rcx), %rcx
andq $0x1, %rcx
orq %rcx, %rax
movq %rax, -0x190(%rbp)
movq -0x190(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, (%rax)
movq -0x98(%rbp), %rax
movq -0x48(%rbp), %rcx
shrq %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpq $0x1, (%rax)
jbe 0x23164
movq -0x48(%rbp), %rax
movq %rax, -0x198(%rbp)
jmp 0x2317e
movq -0x48(%rbp), %rax
movq -0x68(%rbp), %rcx
movq 0x8(%rcx), %rcx
andq $0x1, %rcx
orq %rcx, %rax
movq %rax, -0x198(%rbp)
movq -0x198(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x68(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x68(%rbp), %rax
movl 0x20(%rax), %edx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
movq -0x70(%rbp), %rax
movl 0x20(%rax), %ecx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl %edx, %ecx
movl %ecx, 0x20(%rax)
movq -0x70(%rbp), %rax
movl 0x20(%rax), %ecx
andl $0xbfffffff, %ecx       # imm = 0xBFFFFFFF
orl $0x0, %ecx
movl %ecx, 0x20(%rax)
movq -0x68(%rbp), %rax
movl 0x20(%rax), %edx
shrl $0x1f, %edx
movq -0x70(%rbp), %rax
movl 0x20(%rax), %ecx
andl $0x1, %edx
shll $0x1f, %edx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl %edx, %ecx
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x22fe3
movq -0x60(%rbp), %rdi
callq 0x2060
movq $0x0, -0x10(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x50(%rbp), %rax
jae 0x233d7
movq -0x98(%rbp), %rax
imulq $0x28, -0x10(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x98(%rbp), %rax
imulq $0x28, -0x10(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
leaq -0x120(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x21f0
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x23353
cmpq $0x0, -0x18(%rbp)
jbe 0x232e9
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rsi
movq -0x60(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
callq 0x1ff80
movq 0x10(%rax), %rcx
movq -0x120(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x120(%rbp)
movq -0x78(%rbp), %rax
movq -0x60(%rbp), %rcx
movq -0x18(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x80(%rbp), %rax
movq (%rax), %rdx
movq -0x60(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
andq $0x1, %rax
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %ecx
leaq -0x120(%rbp), %rdi
callq 0x23590
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x2329a
movq -0x98(%rbp), %rax
imulq $0x28, -0x10(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2060
movq -0x120(%rbp), %rcx
movq -0x80(%rbp), %rax
movq %rcx, (%rax)
movq -0x110(%rbp), %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x80(%rbp), %rax
movl 0x20(%rax), %ecx
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl $0x0, %ecx
movl %ecx, 0x20(%rax)
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x80(%rbp), %rax
movq (%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x23244
movl $0x1, %edi
movl $0x40, %esi
callq 0x2250
movq %rax, -0x90(%rbp)
movq -0xa8(%rbp), %rcx
movq -0x90(%rbp), %rax
movq %rcx, (%rax)
movq -0xa0(%rbp), %rcx
movq -0x90(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x98(%rbp), %rcx
movq -0x90(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0xc0(%rbp), %rcx
movq -0x90(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0xb8(%rbp), %rcx
movq -0x90(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0xb0(%rbp), %rcx
movq -0x90(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x90(%rbp), %rdi
movl $0x1, %esi
callq 0x20160
movq -0x90(%rbp), %rax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
nopl (%rax)