// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: asg_arc_cut_tips(asg_t*, unsigned int, asg64_v*, unsigned int, R_to_U*, telo_end_t*)
uint32_t asg_arc_cut_tips(asg_t *g, uint32_t max_ext, asg64_v *in, uint32_t is_ou, R_to_U *ru, telo_end_t *te)
{
    asg64_v tx = {0,0,0}, *b = NULL;
    uint32_t n_vtx = g->n_seq<<1, v, w, i, k, cnt = 0, nv, kv, pb, ou, mm_ou, rr, is_u, is_telo;
    asg_arc_t *av = NULL; uint64_t lw;
	if(in) b = in;
    else b = &tx;
    b->n = 0;
    for (v = 0; v < n_vtx; ++v) {
        if (g->seq[v>>1].del) continue;
        if(te && te->hh[v>>1]) continue;

        av = asg_arc_a(g, v^1); nv = asg_arc_n(g, v^1);
        for (i = kv = 0; i < nv; i++) {
            if (av[i].del) continue;
            kv++; break;
        }
        if(kv) continue;
        
        kv = 1; mm_ou = (uint32_t)-1; ou = 0; is_telo = 0;
        if(te && te->hh[v>>1]) is_telo = 1;
        for (i = 0, w = v; i < max_ext; i++) {
            if(asg_end(g, w^1, &lw, is_ou?&ou:NULL)!=0) break;
            w = (uint32_t)lw; kv++; mm_ou = MIN(mm_ou, ou);
            if(te && te->hh[w>>1]) is_telo = 1;
        }

		if(mm_ou == (uint32_t)-1) mm_ou = 0;
		kv += mm_ou; i += mm_ou;
        if((i < max_ext/** + (!!is_ou)**/) && (!is_telo)) kv_push(uint64_t, *b, (((uint64_t)kv)<<32)|v);  
    }

    radix_sort_srt64(b->a, b->a + b->n);

    for (k = 0; k < b->n; k++) {
        v = (uint32_t)(b->a[k]);

        if (g->seq[v>>1].del) continue;
        if(te && te->hh[v>>1]) continue;

        av = asg_arc_a(g, v^1); nv = asg_arc_n(g, v^1);
        for (i = kv = 0; i < nv; i++) {
            if (av[i].del) continue;
            kv++; break;
        }

        if(kv) continue;
        
        pb = b->n; kv_push(uint64_t, *b, v); mm_ou = (uint32_t)-1; ou = 0; is_telo = 0;
        if(te && te->hh[v>>1]) is_telo = 1;
        for (i = 0, w = v; i < max_ext; i++) {
            if(asg_end(g, w^1, &lw, is_ou?&ou:NULL)!=0) break;
            w = (uint32_t)lw; kv_push(uint64_t, *b, lw); mm_ou = MIN(mm_ou, ou);
            if(te && te->hh[w>>1]) is_telo = 1;
        }
		if(mm_ou == (uint32_t)-1) mm_ou = 0;
		i += mm_ou;

        if((i < max_ext/** + (!!is_ou)**/) && (!is_telo)) {
            for (i = pb; i < b->n; i++) asg_seq_del(g, ((uint32_t)b->a[i])>>1);
            cnt++;
        }
        b->n = pb; 
    }

    if(ru && is_ou) {
        for (v = b->n = 0; v < n_vtx; ++v) {
            if (g->seq[v>>1].del) continue;
            av = asg_arc_a(g, v^1); nv = asg_arc_n(g, v^1);
            for (i = kv = 0; i < nv; i++) {
                if (av[i].del) continue;
                kv++; break;
            }
            if(kv) continue;


            get_R_to_U(ru, v>>1, &rr, &is_u);
            if(rr == (uint32_t)-1 || is_u == 1) continue;
            if(te && te->hh[v>>1]) continue;
            kv_push(uint64_t, *b, v); 

            for (i = 0, w = v; i < max_ext; i++) {
                if(asg_end(g, w^1, &lw, NULL)!=0) break;
                w = (uint32_t)lw; 

                get_R_to_U(ru, w>>1, &rr, &is_u);
                if(rr == (uint32_t)-1 || is_u == 1) break;
                if(te && te->hh[w>>1]) break;

                kv_push(uint64_t, *b, lw);
            }

            for (i = 0; i < b->n; i++) {
                asg_seq_del(g, ((uint32_t)b->a[i])>>1);
            }
            if(b->n) cnt++;
        }
    }
    

    /**
    for (v = 0; v < n_vtx; ++v) {
        if (g->seq[v>>1].del) continue;

        av = asg_arc_a(g, v^1); nv = asg_arc_n(g, v^1);
        for (i = kv = 0; i < nv; i++) {
            if (av[i].del) continue;
            kv++;
        }

        if(kv) continue;
        pb = b->n; kv_push(uint64_t, *b, v);
        for (i = 0, w = v; i < max_ext; i++) {
            if(asg_is_utg_end(g, w^1, &lw)!=0) break;
            w = (uint32_t)lw; kv_push(uint64_t, *b, lw);
        }

        if(i < max_ext) {
            for (i = pb; i < b->n; i++) asg_seq_del(g, ((uint32_t)b->a[i])>>1);
            cnt++;
        }
        b->n = pb; 
    }
    **/
    // stats_sysm(g);
    if(!in) free(tx.a);
    if (cnt > 0) asg_cleanup(g);

    return cnt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r9, 0x20(%rsp)
movq %r8, 0x70(%rsp)
movl %ecx, 0x4c(%rsp)
movq %rdx, %r14
movq %rsi, 0x30(%rsp)
movq %rdi, %rbx
movl 0x14(%rdi), %ecx
addl %ecx, %ecx
testq %rdx, %rdx
je 0x1e536b
movq $0x0, (%r14)
testl %ecx, %ecx
movl %ecx, 0x64(%rsp)
je 0x1e56df
movq 0x30(%rsp), %rax
incl %eax
movl %eax, 0x68(%rsp)
movl %ecx, %esi
xorl %r9d, %r9d
movq $0x0, 0x10(%rsp)
xorl %r10d, %r10d
movq $0x0, 0x8(%rsp)
movq 0x20(%rsp), %rcx
movq %rsi, 0x38(%rsp)
movq 0x20(%rbx), %rax
movl %r9d, %r8d
shrl %r8d
cmpl $0x0, (%rax,%r8,8)
js 0x1e5632
testq %rcx, %rcx
je 0x1e53cf
movq 0x10(%rcx), %rax
cmpb $0x0, (%rax,%r8)
jne 0x1e5632
movq 0x8(%rbx), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rbx), %rdx
movl %r9d, %eax
xorq $0x1, %rax
movq (%rdx,%rax,8), %rax
testl %eax, %eax
je 0x1e5414
movq %rax, %rcx
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x28(%rsp), %rdi
leaq (%rdi,%rcx,8), %rcx
addq $0xc, %rcx
cmpl $0x0, (%rcx)
jns 0x1e55c3
addq $0x18, %rcx
decl %eax
jne 0x1e5403
xorl %edi, %edi
movl $0x0, %r11d
movq 0x20(%rsp), %rcx
testq %rcx, %rcx
je 0x1e5436
movq 0x10(%rcx), %rax
xorl %r11d, %r11d
cmpb $0x0, (%rax,%r8)
setne %r11b
movl %r11d, (%rsp)
cmpl $0x0, 0x30(%rsp)
je 0x1e55cb
movq %r10, 0x58(%rsp)
movq 0x28(%rsp), %rax
addq $0xc, %rax
movq %rax, 0x18(%rsp)
xorl %edi, %edi
movl $0x1, %ebp
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movq %r9, 0x40(%rsp)
movq %r9, %r10
xorl %r9d, %r9d
movq %r13, %r12
movl %r10d, %eax
movq (%rdx,%rax,8), %r13
movq %r13, %rax
shrq $0x20, %rax
leaq (%rax,%rax,2), %r10
xorl %r11d, %r11d
testl %r13d, %r13d
jle 0x1e54ce
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movq 0x18(%rsp), %rax
leaq (%rax,%r10,8), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
xorl %esi, %esi
cmpl $0x0, (%rax)
setns %sil
cmovnsl %r8d, %ecx
addl %esi, %r11d
incq %r8
addq $0x18, %rax
cmpq %r8, %r13
jne 0x1e54a5
movslq %ecx, %rcx
cmpl $0x1, %r11d
sete %r11b
jmp 0x1e54d5
movq $-0x1, %rcx
testb %r11b, %r11b
je 0x1e5557
movq 0x28(%rsp), %rax
leaq (%rax,%r10,8), %rax
leaq (%rcx,%rcx,2), %rcx
cmpl $0x0, 0x4c(%rsp)
je 0x1e54fb
movzwl 0x10(%rax,%rcx,8), %r9d
andl $0x3fff, %r9d           # imm = 0x3FFF
movq (%rax,%rcx,8), %rsi
shlq $0x20, %rsi
movl 0x8(%rax,%rcx,8), %r10d
orq %rsi, %r10
movl 0x8(%rax,%rcx,8), %eax
xorq $0x1, %rax
movq (%rdx,%rax,8), %r13
xorl %r11d, %r11d
testl %r13d, %r13d
jle 0x1e555d
movq %r13, %rax
shrq $0x20, %rax
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
leaq (%rax,%rax,2), %rax
movq 0x18(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
movl (%rax), %ecx
notl %ecx
shrl $0x1f, %ecx
addl %ecx, %r11d
addq $0x18, %rax
decq %r13
jne 0x1e553a
cmpl $0x1, %r11d
sete %r11b
jmp 0x1e555d
xorl %r11d, %r11d
movq %r12, %r10
testb %r11b, %r11b
movq 0x20(%rsp), %rcx
je 0x1e55af
cmpl %r9d, %r15d
cmovael %r9d, %r15d
testq %rcx, %rcx
je 0x1e5593
movq 0x10(%rcx), %rax
movl %r10d, %ecx
shrl %ecx
cmpb $0x0, (%rax,%rcx)
movq 0x20(%rsp), %rcx
movl $0x1, %eax
movl (%rsp), %esi
cmovnel %eax, %esi
movl %esi, (%rsp)
incl %ebp
incl %edi
movq %r10, %r13
cmpl 0x30(%rsp), %edi
jne 0x1e5470
movq 0x30(%rsp), %rax
movl %eax, %edi
movl 0x68(%rsp), %ebp
movq %r10, %r13
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %r9
movq 0x58(%rsp), %r10
jmp 0x1e55d6
movq %r10, %rdi
jmp 0x1e56c9
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl $0x1, %ebp
cmpl $-0x1, %r15d
movl $0x0, %eax
cmovel %eax, %r15d
addl %r15d, %edi
cmpl 0x30(%rsp), %edi
jae 0x1e5632
cmpl $0x0, (%rsp)
jne 0x1e5632
movq 0x8(%rsp), %rax
testq %r14, %r14
je 0x1e55ff
movq (%r14), %rax
movq %r10, %rcx
testq %r14, %r14
je 0x1e560b
movq 0x8(%r14), %rcx
cmpq %rcx, %rax
jne 0x1e563a
movq %r10, %rax
testq %r14, %r14
je 0x1e561c
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x1e563f
movq %r10, %rsi
testq %r14, %r14
je 0x1e562d
movq 0x8(%r14), %rsi
addq %rsi, %rsi
jmp 0x1e5644
movq %r10, %rdi
jmp 0x1e56ce
movq %r10, %rdi
jmp 0x1e568d
movl $0x2, %esi
movq %rsi, %rax
testq %r14, %r14
je 0x1e5653
movq %rsi, 0x8(%r14)
movq %r10, %rax
movq %rax, (%rsp)
movq %r9, %r12
movq 0x10(%rsp), %rdi
testq %r14, %r14
je 0x1e5668
movq 0x10(%r14), %rdi
shlq $0x3, %rsi
callq 0x2370
testq %r14, %r14
je 0x1e567c
movq %rax, 0x10(%r14)
jmp 0x1e5681
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rsi
movq %r12, %r9
movq (%rsp), %rdi
movq 0x10(%rsp), %rax
testq %r14, %r14
je 0x1e569b
movq 0x10(%r14), %rax
movq 0x8(%rsp), %rcx
testq %r14, %r14
je 0x1e56a8
movq (%r14), %rcx
leaq 0x1(%rcx), %rdx
testq %r14, %r14
je 0x1e56b6
movq %rdx, (%r14)
jmp 0x1e56bb
movq %rdx, 0x8(%rsp)
addl %ebp, %r15d
shlq $0x20, %r15
orq %r9, %r15
movq %r15, (%rax,%rcx,8)
movq 0x20(%rsp), %rcx
incq %r9
movq %rdi, %r10
cmpq %rsi, %r9
jne 0x1e53a6
jmp 0x1e56f3
movq $0x0, 0x8(%rsp)
xorl %edi, %edi
movq $0x0, 0x10(%rsp)
movq %rdi, %r15
movq 0x10(%rsp), %rdi
testq %r14, %r14
je 0x1e5704
movq 0x10(%r14), %rdi
movq 0x8(%rsp), %rax
testq %r14, %r14
je 0x1e5711
movq (%r14), %rax
leaq (%rdi,%rax,8), %rsi
callq 0x1e3b6a
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq $0x0, 0x28(%rsp)
movl $0x0, 0x48(%rsp)
movq 0x20(%rsp), %rcx
movq %r15, %rdi
movq 0x8(%rsp), %rax
testq %r14, %r14
je 0x1e5746
movq (%r14), %rax
movq 0x28(%rsp), %rsi
movl %esi, %esi
movq %rsi, 0x28(%rsp)
cmpq %rsi, %rax
jbe 0x1e5c47
movq %r13, 0x38(%rsp)
movq 0x10(%rsp), %rax
testq %r14, %r14
je 0x1e576e
movq 0x10(%r14), %rax
movq 0x28(%rsp), %rdx
movq (%rax,%rdx,8), %r15
movq 0x20(%rbx), %rax
movl %r15d, %r13d
shrl %r13d
cmpl $0x0, (%rax,%r13,8)
js 0x1e5798
testq %rcx, %rcx
je 0x1e57a5
movq 0x10(%rcx), %rax
cmpb $0x0, (%rax,%r13)
je 0x1e57a5
movq %rdi, %rdx
movq 0x38(%rsp), %r13
jmp 0x1e5c33
movq 0x28(%rbx), %rax
movl %r15d, %esi
movq %rsi, %rcx
xorq $0x1, %rcx
movq (%rax,%rcx,8), %rax
testl %eax, %eax
je 0x1e57df
movq 0x8(%rbx), %rcx
movq %rax, %rdx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
leaq (%rcx,%rdx,8), %rcx
addq $0xc, %rcx
cmpl $0x0, (%rcx)
jns 0x1e582a
addq $0x18, %rcx
decl %eax
jne 0x1e57d2
movq 0x8(%rsp), %rcx
testq %r14, %r14
je 0x1e57ec
movq (%r14), %rcx
movq %rdi, %rax
testq %r14, %r14
je 0x1e57f8
movq 0x8(%r14), %rax
cmpq %rax, %rcx
jne 0x1e5824
movq %rdi, %rax
testq %r14, %r14
je 0x1e5809
movq 0x8(%r14), %rax
movq %rsi, 0x18(%rsp)
testq %rax, %rax
je 0x1e5837
movq %rdi, %rsi
testq %r14, %r14
je 0x1e581f
movq 0x8(%r14), %rsi
addq %rsi, %rsi
jmp 0x1e583c
movq %rdi, (%rsp)
jmp 0x1e587f
movq %rdi, %rdx
movq 0x20(%rsp), %rcx
jmp 0x1e579b
movl $0x2, %esi
movq %rsi, (%rsp)
testq %r14, %r14
je 0x1e584d
movq %rsi, 0x8(%r14)
movq %rdi, (%rsp)
movq %rcx, %rbp
movq 0x10(%rsp), %rdi
testq %r14, %r14
je 0x1e585e
movq 0x10(%r14), %rdi
shlq $0x3, %rsi
callq 0x2370
testq %r14, %r14
je 0x1e5872
movq %rax, 0x10(%r14)
jmp 0x1e5877
movq %rax, 0x10(%rsp)
movq %rbp, %rcx
movq 0x18(%rsp), %rsi
movq %rcx, 0x68(%rsp)
movq 0x10(%rsp), %rax
testq %r14, %r14
je 0x1e5892
movq 0x10(%r14), %rax
movq 0x8(%rsp), %rcx
testq %r14, %r14
je 0x1e589f
movq (%r14), %rcx
leaq 0x1(%rcx), %rdx
testq %r14, %r14
je 0x1e58ad
movq %rdx, (%r14)
jmp 0x1e58b2
movq %rdx, 0x8(%rsp)
xorl %ebp, %ebp
movq %rsi, (%rax,%rcx,8)
movl $0x0, 0x40(%rsp)
movq 0x20(%rsp), %rcx
testq %rcx, %rcx
je 0x1e58dc
movq 0x10(%rcx), %rax
xorl %edx, %edx
cmpb $0x0, (%rax,%r13)
setne %dl
movl %edx, 0x40(%rsp)
cmpl $0x0, 0x30(%rsp)
je 0x1e5b01
xorl %ebp, %ebp
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
movl $0x0, 0x58(%rsp)
movq 0x38(%rsp), %r13
movq 0x8(%rbx), %rax
movq 0x28(%rbx), %rcx
movl %r15d, %edx
movq (%rcx,%rdx,8), %rdi
movq %rdi, %rdx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
testl %edi, %edi
jle 0x1e595f
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
leaq (%rax,%rdx,8), %r9
addq $0xc, %r9
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r10d, %r10d
xorl %r11d, %r11d
cmpl $0x0, (%r9)
setns %r11b
cmovnsl %r10d, %r8d
addl %r11d, %esi
incq %r10
addq $0x18, %r9
cmpq %r10, %rdi
jne 0x1e5935
movslq %r8d, %rdi
cmpl $0x1, %esi
sete %sil
jmp 0x1e5966
movq $-0x1, %rdi
testb %sil, %sil
je 0x1e59e2
leaq (%rax,%rdx,8), %rdx
leaq (%rdi,%rdi,2), %rsi
cmpl $0x0, 0x4c(%rsp)
je 0x1e5989
movzwl 0x10(%rdx,%rsi,8), %edi
andl $0x3fff, %edi           # imm = 0x3FFF
movl %edi, 0x58(%rsp)
movq (%rdx,%rsi,8), %rdi
shlq $0x20, %rdi
movl 0x8(%rdx,%rsi,8), %r15d
orq %rdi, %r15
movl 0x8(%rdx,%rsi,8), %edx
xorq $0x1, %rdx
movq (%rcx,%rdx,8), %rdx
xorl %ecx, %ecx
testl %edx, %edx
movq (%rsp), %r13
jle 0x1e59eb
movq %rdx, %rsi
shrq $0x20, %rsi
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
leaq (%rsi,%rsi,2), %rsi
leaq (%rax,%rsi,8), %rax
addq $0xc, %rax
movl (%rax), %esi
notl %esi
shrl $0x1f, %esi
addl %esi, %ecx
addq $0x18, %rax
decq %rdx
jne 0x1e59c8
cmpl $0x1, %ecx
sete %cl
jmp 0x1e59eb
xorl %ecx, %ecx
movq %r13, %r15
movq (%rsp), %r13
testb %cl, %cl
je 0x1e5af3
movq 0x8(%rsp), %rax
testq %r14, %r14
je 0x1e5a00
movq (%r14), %rax
movq %r13, %rcx
testq %r14, %r14
je 0x1e5a0c
movq 0x8(%r14), %rcx
cmpq %rcx, %rax
jne 0x1e5a6f
movq %r13, %rax
testq %r14, %r14
je 0x1e5a1d
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x1e5a33
movq %r13, %rsi
testq %r14, %r14
je 0x1e5a2e
movq 0x8(%r14), %rsi
addq %rsi, %rsi
jmp 0x1e5a38
movl $0x2, %esi
movq %rsi, %r13
testq %r14, %r14
je 0x1e5a48
movq %rsi, 0x8(%r14)
movq (%rsp), %r13
movq 0x10(%rsp), %rdi
testq %r14, %r14
je 0x1e5a56
movq 0x10(%r14), %rdi
shlq $0x3, %rsi
callq 0x2370
testq %r14, %r14
je 0x1e5a6a
movq %rax, 0x10(%r14)
jmp 0x1e5a6f
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
testq %r14, %r14
je 0x1e5a7d
movq 0x10(%r14), %rax
movq 0x8(%rsp), %rcx
testq %r14, %r14
je 0x1e5a8a
movq (%r14), %rcx
leaq 0x1(%rcx), %rdx
testq %r14, %r14
je 0x1e5a98
movq %rdx, (%r14)
jmp 0x1e5a9d
movq %rdx, 0x8(%rsp)
movl 0x18(%rsp), %edx
movl 0x58(%rsp), %esi
cmpl %esi, %edx
cmovael %esi, %edx
movl %edx, 0x18(%rsp)
movq %r15, (%rax,%rcx,8)
movq 0x20(%rsp), %rax
testq %rax, %rax
movq %r13, (%rsp)
je 0x1e5add
movq 0x10(%rax), %rax
movl %r15d, %ecx
shrl %ecx
cmpb $0x0, (%rax,%rcx)
movl $0x1, %eax
movl 0x40(%rsp), %ecx
cmovnel %eax, %ecx
movl %ecx, 0x40(%rsp)
incl %ebp
movq %r15, %r13
cmpl 0x30(%rsp), %ebp
jne 0x1e58fe
movq 0x30(%rsp), %rax
movl %eax, %ebp
movq %r15, %r13
movq 0x20(%rsp), %rcx
movl 0x18(%rsp), %edx
jmp 0x1e5b0b
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq 0x38(%rsp), %r13
cmpl $-0x1, %edx
movl $0x0, %eax
cmovel %eax, %edx
addl %ebp, %edx
cmpl 0x30(%rsp), %edx
jae 0x1e5c1c
cmpl $0x0, 0x40(%rsp)
jne 0x1e5c1c
movq 0x68(%rsp), %rax
movq 0x8(%rsp), %rcx
testq %r14, %r14
je 0x1e5b3f
movq (%r14), %rcx
movl %eax, %eax
cmpq %rax, %rcx
jbe 0x1e5c13
movq 0x10(%rsp), %rcx
testq %r14, %r14
je 0x1e5b58
movq 0x10(%r14), %rcx
movq (%rcx,%rax,8), %rcx
movl %ecx, %edx
shrl %edx
movq 0x20(%rbx), %rsi
orl $0x80000000, (%rsi,%rdx,8) # imm = 0x80000000
andl $-0x2, %ecx
xorl %edx, %edx
leaq (%rdx,%rcx), %rsi
movq 0x28(%rbx), %rdi
movq (%rdi,%rsi,8), %r8
movq %r8, %rdi
andq %r12, %rdi
je 0x1e5bfc
shrq $0x20, %r8
leaq (%r8,%r8,2), %r8
shlq $0x3, %r8
addq 0x8(%rbx), %r8
xorl %r9d, %r9d
leaq (%r9,%r9,2), %r10
orb $-0x80, 0xf(%r8,%r10,8)
movl 0x8(%r8,%r10,8), %r10d
xorq $0x1, %r10
movq 0x28(%rbx), %r11
movq (%r11,%r10,8), %r11
movq %r11, %r10
andq %r12, %r10
je 0x1e5bf4
movq 0x8(%rbx), %r15
shrq $0x20, %r11
shlq $0x3, %r10
leaq (%r10,%r10,2), %r10
leaq (%r11,%r11,2), %r11
leaq (%r15,%r11,8), %r11
addq $0xc, %r11
xorl %r15d, %r15d
movl -0x4(%r11,%r15), %ebp
xorl %esi, %ebp
cmpl $0x1, %ebp
jne 0x1e5beb
orb $-0x80, 0x3(%r11,%r15)
addq $0x18, %r15
cmpq %r15, %r10
jne 0x1e5bd9
incq %r9
cmpq %rdi, %r9
jne 0x1e5b97
leaq 0x1(%rdx), %rsi
testq %rdx, %rdx
movq %rsi, %rdx
je 0x1e5b70
incl %eax
jmp 0x1e5b32
incl 0x48(%rsp)
movq 0x20(%rsp), %rcx
movl 0x68(%rsp), %eax
testq %r14, %r14
je 0x1e5c2a
movq %rax, (%r14)
jmp 0x1e5c2f
movq %rax, 0x8(%rsp)
movq (%rsp), %rdx
movq 0x28(%rsp), %rax
incl %eax
movq %rax, 0x28(%rsp)
movq %rdx, %rdi
jmp 0x1e5739
cmpq $0x0, 0x70(%rsp)
sete %al
cmpl $0x0, 0x4c(%rsp)
sete %cl
orb %al, %cl
jne 0x1e6123
testq %r14, %r14
je 0x1e5c6e
movq $0x0, (%r14)
jmp 0x1e5c77
movq $0x0, 0x8(%rsp)
movl 0x64(%rsp), %eax
testl %eax, %eax
je 0x1e6123
movl %eax, %eax
movq %rax, 0x28(%rsp)
xorl %ecx, %ecx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq 0x20(%rbx), %rax
movl %ecx, %r12d
shrl %r12d
cmpl $0x0, (%rax,%r12,8)
js 0x1e5d2b
movq 0x28(%rbx), %rax
movq %rcx, 0x18(%rsp)
movl %ecx, %ecx
xorq $0x1, %rcx
movq (%rax,%rcx,8), %rax
testl %eax, %eax
je 0x1e5ce1
movq 0x8(%rbx), %rcx
movq %rax, %rdx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
leaq (%rcx,%rdx,8), %rcx
addq $0xc, %rcx
cmpl $0x0, (%rcx)
jns 0x1e5d36
addq $0x18, %rcx
decl %eax
jne 0x1e5cd4
movq %rdi, %r15
movq 0x70(%rsp), %rdi
movl %r12d, %esi
leaq 0x54(%rsp), %rdx
leaq 0x50(%rsp), %rcx
callq 0xa306f
cmpl $-0x1, 0x54(%rsp)
je 0x1e5d7b
cmpl $0x1, 0x50(%rsp)
movq 0x20(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %r15, %rdx
je 0x1e5d26
testq %rax, %rax
je 0x1e5d3b
movq 0x10(%rax), %rax
cmpb $0x0, (%rax,%r12)
je 0x1e5d3b
movq %rdx, %rax
jmp 0x1e5d2e
movq %rdi, %rax
movq %r13, %r15
jmp 0x1e610f
movq %rdi, %rax
jmp 0x1e5d7e
movq 0x8(%rsp), %rax
testq %r14, %r14
je 0x1e5d48
movq (%r14), %rax
movq %rdx, %rcx
testq %r14, %r14
je 0x1e5d54
movq 0x8(%r14), %rcx
cmpq %rcx, %rax
jne 0x1e5d8b
movq %rdx, %rax
testq %r14, %r14
je 0x1e5d65
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x1e5d91
movq %rdx, %rsi
testq %r14, %r14
je 0x1e5d76
movq 0x8(%r14), %rsi
addq %rsi, %rsi
jmp 0x1e5d96
movq %r15, %rax
movq %r13, %r15
movq 0x18(%rsp), %rcx
jmp 0x1e610f
movq %rdx, (%rsp)
jmp 0x1e5dd0
movl $0x2, %esi
movq %rsi, %rax
testq %r14, %r14
je 0x1e5da5
movq %rsi, 0x8(%r14)
movq %rdx, %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
testq %r14, %r14
je 0x1e5db7
movq 0x10(%r14), %rdi
shlq $0x3, %rsi
callq 0x2370
testq %r14, %r14
je 0x1e5dcb
movq %rax, 0x10(%r14)
jmp 0x1e5dd0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
testq %r14, %r14
je 0x1e5dde
movq 0x10(%r14), %rax
movq 0x8(%rsp), %rcx
testq %r14, %r14
je 0x1e5deb
movq (%r14), %rcx
leaq 0x1(%rcx), %rdx
testq %r14, %r14
je 0x1e5df9
movq %rdx, (%r14)
jmp 0x1e5dfe
movq %rdx, 0x8(%rsp)
movq 0x18(%rsp), %r15
movq %r15, (%rax,%rcx,8)
cmpl $0x0, 0x30(%rsp)
je 0x1e6008
movq %r13, %r12
xorl %r13d, %r13d
movq 0x8(%rbx), %rax
movq 0x28(%rbx), %rcx
movl %r15d, %edx
movq (%rcx,%rdx,8), %rdi
movq %rdi, %rdx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
testl %edi, %edi
jle 0x1e5e79
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
leaq (%rax,%rdx,8), %r9
addq $0xc, %r9
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r10d, %r10d
xorl %r11d, %r11d
cmpl $0x0, (%r9)
setns %r11b
cmovnsl %r10d, %r8d
addl %r11d, %esi
incq %r10
addq $0x18, %r9
cmpq %r10, %rdi
jne 0x1e5e4f
movslq %r8d, %rdi
cmpl $0x1, %esi
sete %sil
jmp 0x1e5e80
movq $-0x1, %rdi
testb %sil, %sil
je 0x1e5edd
leaq (%rax,%rdx,8), %rdx
leaq (%rdi,%rdi,2), %rsi
movq (%rdx,%rsi,8), %r15
shlq $0x20, %r15
movl 0x8(%rdx,%rsi,8), %edx
orq %rdx, %r15
xorq $0x1, %rdx
movq (%rcx,%rdx,8), %rdx
xorl %ecx, %ecx
testl %edx, %edx
jle 0x1e5ee2
movq %rdx, %rsi
shrq $0x20, %rsi
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
leaq (%rsi,%rsi,2), %rsi
leaq (%rax,%rsi,8), %rax
addq $0xc, %rax
movl (%rax), %esi
notl %esi
shrl $0x1f, %esi
addl %esi, %ecx
addq $0x18, %rax
decq %rdx
jne 0x1e5ec3
cmpl $0x1, %ecx
sete %cl
jmp 0x1e5ee2
xorl %ecx, %ecx
movq %r12, %r15
testb %cl, %cl
je 0x1e600b
movl %r15d, %r12d
shrl %r12d
movq 0x70(%rsp), %rdi
movl %r12d, %esi
leaq 0x54(%rsp), %rdx
leaq 0x50(%rsp), %rcx
callq 0xa306f
cmpl $-0x1, 0x54(%rsp)
je 0x1e600b
cmpl $0x1, 0x50(%rsp)
je 0x1e600b
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x1e5f36
movq 0x10(%rax), %rax
cmpb $0x0, (%rax,%r12)
jne 0x1e600b
movq 0x8(%rsp), %rax
testq %r14, %r14
je 0x1e5f43
movq (%r14), %rax
movq (%rsp), %rcx
testq %r14, %r14
je 0x1e5f50
movq 0x8(%r14), %rcx
cmpq %rcx, %rax
jne 0x1e5fc3
movq (%rsp), %rax
testq %r14, %r14
je 0x1e5f62
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x1e5f7c
movq (%rsp), %rax
movq %rax, %rsi
testq %r14, %r14
je 0x1e5f77
movq 0x8(%r14), %rsi
addq %rsi, %rsi
jmp 0x1e5f85
movl $0x2, %esi
movq (%rsp), %rax
movq %rsi, %r12
testq %r14, %r14
je 0x1e5f94
movq %rsi, 0x8(%r14)
movq %rax, %r12
movq 0x10(%rsp), %rdi
testq %r14, %r14
je 0x1e5fa2
movq 0x10(%r14), %rdi
shlq $0x3, %rsi
callq 0x2370
testq %r14, %r14
je 0x1e5fba
movq %rax, 0x10(%r14)
movq %r12, (%rsp)
jmp 0x1e5fc3
movq %r12, (%rsp)
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
testq %r14, %r14
je 0x1e5fd1
movq 0x10(%r14), %rax
movq 0x8(%rsp), %rcx
testq %r14, %r14
je 0x1e5fde
movq (%r14), %rcx
leaq 0x1(%rcx), %rdx
testq %r14, %r14
je 0x1e5fec
movq %rdx, (%r14)
jmp 0x1e5ff1
movq %rdx, 0x8(%rsp)
movq %r15, (%rax,%rcx,8)
incl %r13d
movq %r15, %r12
cmpl 0x30(%rsp), %r13d
jne 0x1e5e18
jmp 0x1e600b
movq %r13, %r15
xorl %eax, %eax
movq 0x8(%rsp), %rcx
testq %r14, %r14
je 0x1e601a
movq (%r14), %rcx
movl %eax, %eax
cmpq %rax, %rcx
jbe 0x1e60f0
movq 0x10(%rsp), %rcx
testq %r14, %r14
je 0x1e6033
movq 0x10(%r14), %rcx
movq (%rcx,%rax,8), %rcx
movl %ecx, %edx
shrl %edx
movq 0x20(%rbx), %rsi
orl $0x80000000, (%rsi,%rdx,8) # imm = 0x80000000
andl $-0x2, %ecx
xorl %edx, %edx
leaq (%rdx,%rcx), %rsi
movq 0x28(%rbx), %rdi
movq (%rdi,%rsi,8), %r8
movq %r8, %rdi
andq %rbp, %rdi
je 0x1e60d9
shrq $0x20, %r8
leaq (%r8,%r8,2), %r8
shlq $0x3, %r8
addq 0x8(%rbx), %r8
xorl %r9d, %r9d
leaq (%r9,%r9,2), %r10
orb $-0x80, 0xf(%r8,%r10,8)
movl 0x8(%r8,%r10,8), %r10d
xorq $0x1, %r10
movq 0x28(%rbx), %r11
movq (%r11,%r10,8), %r11
movq %r11, %r10
andq %rbp, %r10
je 0x1e60d1
movq 0x8(%rbx), %r12
shrq $0x20, %r11
shlq $0x3, %r10
leaq (%r10,%r10,2), %r10
leaq (%r11,%r11,2), %r11
leaq (%r12,%r11,8), %r11
addq $0xc, %r11
xorl %r12d, %r12d
movl -0x4(%r11,%r12), %r13d
xorl %esi, %r13d
cmpl $0x1, %r13d
jne 0x1e60c8
orb $-0x80, 0x3(%r11,%r12)
addq $0x18, %r12
cmpq %r12, %r10
jne 0x1e60b4
incq %r9
cmpq %rdi, %r9
jne 0x1e6072
leaq 0x1(%rdx), %rsi
testq %rdx, %rdx
movq %rsi, %rdx
je 0x1e604b
incl %eax
jmp 0x1e600d
movq 0x8(%rsp), %rax
testq %r14, %r14
je 0x1e60fd
movq (%r14), %rax
cmpq $0x1, %rax
sbbl $-0x1, 0x48(%rsp)
movq 0x18(%rsp), %rcx
movq (%rsp), %rax
incq %rcx
movq %r15, %r13
movq %rax, %rdi
cmpq 0x28(%rsp), %rcx
jne 0x1e5c91
testq %r14, %r14
jne 0x1e6132
movq 0x10(%rsp), %rdi
callq 0x2220
movl 0x48(%rsp), %ebp
testl %ebp, %ebp
je 0x1e6142
movq %rbx, %rdi
callq 0xa02fa
movl %ebp, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq