// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: filter_sg_by_ug(asg_t*, ma_ug_t*, ug_opt_t*)
void filter_sg_by_ug(asg_t *rg, ma_ug_t *ug, ug_opt_t *uopt)
{
    uint32_t i, m, v, w, nv, n_vx, vx, wx; int32_t r;
    asg_arc_t *av = NULL; ma_utg_t *u = NULL; asg_arc_t *p, t;
    n_vx = rg->n_seq; rg->n_arc = 0;
    for (v = 0; v < n_vx; v++) rg->seq[v].del = (!!1);

    for (i = 0; i < ug->g->n_seq; ++i) {
        ug->g->seq[i].c = PRIMARY_LABLE;;
        if(ug->g->seq[i].del) continue;
        u = &(ug->u.a[i]);
        for (m = 0; m < u->n; m++) rg->seq[u->a[m]>>33].del = (!!0);
        for (m = 0; (m + 1) < u->n; m++) {
            v = u->a[m]>>32; w = u->a[m+1]>>32;
            r = gen_spec_edge(rg, uopt, v, w, &t);
            assert(r >= 0); p = asg_arc_pushp(rg); *p = t;

            r = gen_spec_edge(rg, uopt, w^1, v^1, &t);
            assert(r >= 0); p = asg_arc_pushp(rg); *p = t;
        }


        v = i<<1; nv = asg_arc_n(ug->g, v); av = asg_arc_a(ug->g, v);
        for (m = 0; m < nv; m++) {
            if(av[m].del) continue;
            w = av[m].v;
            vx = (v&1?((ug->u.a[v>>1].a[0]>>32)^1):(ug->u.a[v>>1].a[ug->u.a[v>>1].n-1]>>32));
            wx = (w&1?((ug->u.a[w>>1].a[ug->u.a[w>>1].n-1]>>32)^1):(ug->u.a[w>>1].a[0]>>32));

            r = gen_spec_edge(rg, uopt, vx, wx, &t);
            assert(r >= 0); p = asg_arc_pushp(rg); *p = t;

            // r = gen_spec_edge(rg, uopt, wx^1, vx^1, &t);
            // assert(r >= 0); p = asg_arc_pushp(rg); *p = t;
        }

        v = (i<<1)+1; nv = asg_arc_n(ug->g, v); av = asg_arc_a(ug->g, v);
        for (m = 0; m < nv; m++) {
            if(av[m].del) continue;
            w = av[m].v;
            vx = (v&1?((ug->u.a[v>>1].a[0]>>32)^1):(ug->u.a[v>>1].a[ug->u.a[v>>1].n-1]>>32));
            wx = (w&1?((ug->u.a[w>>1].a[ug->u.a[w>>1].n-1]>>32)^1):(ug->u.a[w>>1].a[0]>>32));

            r = gen_spec_edge(rg, uopt, vx, wx, &t);
            assert(r >= 0); p = asg_arc_pushp(rg); *p = t;

            // r = gen_spec_edge(rg, uopt, wx^1, vx^1, &t);
            // assert(r >= 0); p = asg_arc_pushp(rg); *p = t;
        }

        if(u->circ) {
            v = w = i<<1;
            vx = (v&1?((ug->u.a[v>>1].a[0]>>32)^1):(ug->u.a[v>>1].a[ug->u.a[v>>1].n-1]>>32));
            wx = (w&1?((ug->u.a[w>>1].a[ug->u.a[w>>1].n-1]>>32)^1):(ug->u.a[w>>1].a[0]>>32));
            r = gen_spec_edge(rg, uopt, vx, wx, &t);
            assert(r >= 0); p = asg_arc_pushp(rg); *p = t;

            v = w = (i<<1)^1;
            vx = (v&1?((ug->u.a[v>>1].a[0]>>32)^1):(ug->u.a[v>>1].a[ug->u.a[v>>1].n-1]>>32));
            wx = (w&1?((ug->u.a[w>>1].a[ug->u.a[w>>1].n-1]>>32)^1):(ug->u.a[w>>1].a[0]>>32));
            r = gen_spec_edge(rg, uopt, vx, wx, &t);
            assert(r >= 0); p = asg_arc_pushp(rg); *p = t;
        }
    }

    free(rg->idx);
    rg->idx = 0;
    rg->is_srt = 0;
    asg_cleanup(rg);
    asg_symm(rg);


    /*******************************for debug************************************/
    // ma_ug_t *dbg = ma_ug_gen(rg);
    // for (i = 0; i < dbg->g->n_seq; ++i) dbg->g->seq[i].c = PRIMARY_LABLE;  
    // cmp_untig_graph(dbg, ug);
    /*******************************for debug************************************/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0x80000000, %ecx       # imm = 0x80000000
orl $0x0, %ecx
movl %ecx, 0x4(%rax)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x30(%rbp), %eax
jae 0x31f7c0
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x24(%rbp), %ecx
movl (%rax,%rcx,8), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
orl $0x80000000, %edx       # imm = 0x80000000
movl %edx, (%rax,%rcx,8)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x31f790
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x320103
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x1c(%rbp), %ecx
movb $0x0, 0x4(%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x1c(%rbp), %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x31f816
jmp 0x3200f5
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x50(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x31f874
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x50(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x20(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
movl (%rax,%rcx,8), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
orl $0x0, %edx
movl %edx, (%rax,%rcx,8)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x31f833
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movq -0x50(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x31f9a5
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x24(%rbp)
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x24(%rbp), %edx
movl -0x28(%rbp), %ecx
leaq -0x70(%rbp), %r8
callq 0x31f5d0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jl 0x31f8e1
jmp 0x31f900
leaq 0x64f6a(%rip), %rdi     # 0x384852
leaq 0x768ca(%rip), %rsi     # 0x3961b9
movl $0xb30, %edx            # imm = 0xB30
leaq 0x76f5f(%rip), %rcx     # 0x39685a
callq 0x2130
movq -0x8(%rbp), %rdi
callq 0x31b110
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x70(%rbp), %rcx
movq %rcx, (%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x28(%rbp), %edx
xorl $0x1, %edx
movl -0x24(%rbp), %ecx
xorl $0x1, %ecx
leaq -0x70(%rbp), %r8
callq 0x31f5d0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jl 0x31f950
jmp 0x31f96f
leaq 0x64efb(%rip), %rdi     # 0x384852
leaq 0x7685b(%rip), %rsi     # 0x3961b9
movl $0xb33, %edx            # imm = 0xB33
leaq 0x76ef0(%rip), %rcx     # 0x39685a
callq 0x2130
movq -0x8(%rbp), %rdi
callq 0x31b110
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x70(%rbp), %rcx
movq %rcx, (%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x31f87b
movl -0x1c(%rbp), %eax
shll %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0x24(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jae 0x31fbaf
movq -0x48(%rbp), %rax
movl -0x20(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x31fa22
jmp 0x31fba1
movq -0x48(%rbp), %rax
movl -0x20(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x31fa6c
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
shrq $0x20, %rax
xorq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x31fab0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x24(%rbp), %edx
shrl %edx
movl %edx, %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movl %eax, -0x34(%rbp)
movl -0x28(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x31fb0c
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x28(%rbp), %edx
shrl %edx
movl %edx, %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
xorq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x31fb31
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
shrq $0x20, %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x34(%rbp), %edx
movl -0x38(%rbp), %ecx
leaq -0x70(%rbp), %r8
callq 0x31f5d0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jl 0x31fb5a
jmp 0x31fb79
leaq 0x64cf1(%rip), %rdi     # 0x384852
leaq 0x76651(%rip), %rsi     # 0x3961b9
movl $0xb3f, %edx            # imm = 0xB3F
leaq 0x76ce6(%rip), %rcx     # 0x39685a
callq 0x2130
movq -0x8(%rbp), %rdi
callq 0x31b110
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x70(%rbp), %rcx
movq %rcx, (%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x31f9f8
movl -0x1c(%rbp), %eax
shll %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0x24(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jae 0x31fdce
movq -0x48(%rbp), %rax
movl -0x20(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x31fc2f
jmp 0x31fdc0
movq -0x48(%rbp), %rax
movl -0x20(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x31fc7c
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
shrq $0x20, %rax
xorq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x31fcc3
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x24(%rbp), %edx
shrl %edx
movl %edx, %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movl %eax, -0x34(%rbp)
movl -0x28(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x31fd25
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x28(%rbp), %edx
shrl %edx
movl %edx, %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
xorq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0x31fd4d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
shrq $0x20, %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x34(%rbp), %edx
movl -0x38(%rbp), %ecx
leaq -0x70(%rbp), %r8
callq 0x31f5d0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jl 0x31fd79
jmp 0x31fd98
leaq 0x64ad2(%rip), %rdi     # 0x384852
leaq 0x76432(%rip), %rsi     # 0x3961b9
movl $0xb4d, %edx            # imm = 0xB4D
leaq 0x76ac7(%rip), %rcx     # 0x39685a
callq 0x2130
movq -0x8(%rbp), %rdi
callq 0x31b110
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x70(%rbp), %rcx
movq %rcx, (%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x31fc05
movq -0x50(%rbp), %rax
movl (%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x3200f3
movl -0x1c(%rbp), %eax
shll %eax
movl %eax, -0x28(%rbp)
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x31fe24
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
shrq $0x20, %rax
xorq $0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0x31fe6b
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x24(%rbp), %edx
shrl %edx
movl %edx, %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movl %eax, -0x34(%rbp)
movl -0x28(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x31fecd
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x28(%rbp), %edx
shrl %edx
movl %edx, %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
xorq $0x1, %rax
movq %rax, -0xa0(%rbp)
jmp 0x31fef5
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
shrq $0x20, %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x34(%rbp), %edx
movl -0x38(%rbp), %ecx
leaq -0x70(%rbp), %r8
callq 0x31f5d0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jl 0x31ff21
jmp 0x31ff40
leaq 0x6492a(%rip), %rdi     # 0x384852
leaq 0x7628a(%rip), %rsi     # 0x3961b9
movl $0xb58, %edx            # imm = 0xB58
leaq 0x7691f(%rip), %rcx     # 0x39685a
callq 0x2130
movq -0x8(%rbp), %rdi
callq 0x31b110
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x70(%rbp), %rcx
movq %rcx, (%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0x1c(%rbp), %eax
shll %eax
xorl $0x1, %eax
movl %eax, -0x28(%rbp)
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x31ffaf
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
shrq $0x20, %rax
xorq $0x1, %rax
movq %rax, -0xa8(%rbp)
jmp 0x31fff6
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x24(%rbp), %edx
shrl %edx
movl %edx, %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movl %eax, -0x34(%rbp)
movl -0x28(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x320058
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x28(%rbp), %edx
shrl %edx
movl %edx, %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
xorq $0x1, %rax
movq %rax, -0xb0(%rbp)
jmp 0x320080
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
shrq $0x20, %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x34(%rbp), %edx
movl -0x38(%rbp), %ecx
leaq -0x70(%rbp), %r8
callq 0x31f5d0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jl 0x3200ac
jmp 0x3200cb
leaq 0x6479f(%rip), %rdi     # 0x384852
leaq 0x760ff(%rip), %rsi     # 0x3961b9
movl $0xb5e, %edx            # imm = 0xB5E
leaq 0x76794(%rip), %rcx     # 0x39685a
callq 0x2130
movq -0x8(%rbp), %rdi
callq 0x31b110
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x70(%rbp), %rcx
movq %rcx, (%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x3200f5
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x31f7c7
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rdi
callq 0xcdd10
movq -0x8(%rbp), %rdi
callq 0xce020
addq $0xb0, %rsp
popq %rbp
retq
nopw (%rax,%rax)