// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: usg_arc_cut_tips(usg_t*, unsigned int, unsigned int, asg64_v*)
uint32_t usg_arc_cut_tips(usg_t *g, uint32_t max_ext, uint32_t ignore_ul, asg64_v *in)
{
    asg64_v tx = {0,0,0}, *b = NULL;
    uint32_t n_vtx = g->n<<1, v, w, i, k, cnt = 0, nv, kv, pb, ff, is_telo;
    usg_arc_t *av = NULL, *p; uint64_t lw;
    if(in) b = in;
    else b = &tx;

    for (v = b->n = 0; v < n_vtx; ++v) {
        if (g->a[v>>1].del) continue;

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

        if(kv) continue;
        
        is_telo = 0; if(g->a[v>>1].telo) is_telo = 1;
        for (i = 0, w = v, kv = g->a[v>>1].occ; i < max_ext; i++) {
            if(usg_end(g, w^1, &lw)!=0) break;
            w = (uint32_t)lw; kv += g->a[w>>1].occ;
            if(g->a[w>>1].telo) is_telo = 1;
        }
        if((kv <= max_ext) && (!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->a[v>>1].del) continue;

        av = usg_arc_a(g, v^1); nv = usg_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); 
        is_telo = 0; if(g->a[v>>1].telo) is_telo = 1;
        for (i = 0, w = v, kv = g->a[v>>1].occ; i < max_ext; i++) {
            if(usg_end(g, w^1, &lw)!=0) break;
            w = (uint32_t)lw; kv += g->a[w>>1].occ; kv_push(uint64_t, *b, lw);
            if(g->a[w>>1].telo) is_telo = 1;
        }
        // if((v>>1) == 308) {
        //     fprintf(stderr, "[M::%s::] v>>1::%u, v&1::%u, kv::%u\n", 
        //     __func__, v>>1, v&1, kv);
        // }


        if((kv <= max_ext) && (!is_telo)) {
            ff = 0;
            if(!ignore_ul) {///consider UL
                for (i = pb; i + 1 < b->n; i++) {
                    p = get_usg_arc(g, ((uint32_t)b->a[i]), ((uint32_t)b->a[i+1])); assert(p);
                    if(p->ou > 1) {//ignore ou == 1
                        ff = 1;
                        break;
                    }
                }

                if(ff == 0 && i < b->n) {
                    av = usg_arc_a(g, ((uint32_t)b->a[i])); nv = usg_arc_n(g, ((uint32_t)b->a[i]));
                    for (i = 0; i < nv; i++) {
                        if(av[i].del) continue;
                        if(av[i].ou > 1) {//ignore ou == 1
                            ff = 1;
                            break;
                        }
                    }
                }
            }

            // if((v>>1) == 139131) {
            //     fprintf(stderr, "+[M::%s::] v>>1::%u, v&1::%u, kv::%u, ff::%u, pb::%u, b->n::%u, w>>1::%u, w&1::%u\n", __func__, v>>1, v&1, kv,
            //     ff, pb, (uint32_t)b->n, ((uint32_t)b->a[b->n-1])>>1, ((uint32_t)b->a[b->n-1])&1);
            // }

            if((ff == 0) && (pb < b->n) && (!usg_real_tip(g, ((uint32_t)b->a[b->n-1]), 0.75))) {
                ff = 1;
            }

            // if((v>>1) == 139131) {
            //     fprintf(stderr, "-[M::%s::] v>>1::%u, v&1::%u, kv::%u, ff::%u, pb::%u, b->n::%u, w>>1::%u, w&1::%u\n", __func__, v>>1, v&1, kv,
            //     ff, pb, (uint32_t)b->n, ((uint32_t)b->a[b->n-1])>>1, ((uint32_t)b->a[b->n-1])&1);
            // }

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

            // if((v>>1) == 139131) {
            //     fprintf(stderr, ">[M::%s::] v>>1::%u, v&1::%u, kv::%u, ff::%u, pb::%u, b->n::%u, w>>1::%u, w&1::%u, del::%u\n", __func__, v>>1, v&1, kv,
            //     ff, pb, (uint32_t)b->n, ((uint32_t)b->a[b->n-1])>>1, ((uint32_t)b->a[b->n-1])&1, 
            //     g->a[((uint32_t)b->a[b->n-1])>>1].del);
            // }
        }
        b->n = pb; 
    }

    if(!in) free(tx.a);
    if(cnt > 0) usg_cleanup(g);

    return cnt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, 0x44(%rsp)
movl %esi, 0x14(%rsp)
movq %rdi, %rbp
movl 0x8(%rdi), %eax
addl %eax, %eax
testq %rcx, %rcx
je 0x208689
movq $0x0, (%rcx)
testl %eax, %eax
movq %rbp, 0x38(%rsp)
movq %rcx, 0x20(%rsp)
je 0x208970
movl %eax, %eax
xorl %r8d, %r8d
movq $0x0, 0x8(%rsp)
xorl %esi, %esi
xorl %r11d, %r11d
movq %rax, 0x18(%rsp)
movq (%rbp), %r14
movl %r8d, %edx
shrl %edx
imulq $0x78, %rdx, %rdx
cmpb $0x0, 0x70(%r14,%rdx)
je 0x2086d3
movq %rsi, %rbx
movq %rdi, %r15
jmp 0x20895c
movq %rsi, 0x28(%rsp)
movq %r8, 0x30(%rsp)
movl %r8d, %esi
notl %esi
andl $0x1, %esi
leaq (%r14,%rdx), %r8
leaq (%rsi,%rsi,2), %r9
movl 0x10(%r8,%r9,8), %esi
testl %esi, %esi
movl $0x1, %ecx
je 0x208716
movq 0x20(%r8,%r9,8), %r8
addq $0xc, %r8
cmpl $0x0, (%r8)
jns 0x20884f
addq $0x20, %r8
decl %esi
jne 0x208704
movb 0x71(%r14,%rdx), %r8b
testb %r8b, %r8b
setne %sil
movl 0x4(%r14,%rdx), %ebp
cmpl $0x0, 0x14(%rsp)
je 0x20886b
xorl %edx, %edx
testb %r8b, %r8b
setne %dl
xorl %esi, %esi
movq 0x30(%rsp), %r15
movl %r15d, %r8d
shrl %r8d
movl %r15d, %r9d
andl $0x1, %r9d
imulq $0x78, %r8, %r8
addq %r14, %r8
leaq (%r9,%r9,2), %r9
movq 0x10(%r8,%r9,8), %r10
movq 0x20(%r8,%r9,8), %r8
xorl %r9d, %r9d
testl %r10d, %r10d
jle 0x2087ad
movq %r11, %r12
andl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
leaq 0xc(%r8), %rbx
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
xorl %r13d, %r13d
xorl %eax, %eax
cmpl $0x0, (%rbx)
setns %al
cmovnsl %r13d, %r11d
addl %eax, %r9d
incq %r13
addq $0x20, %rbx
cmpq %r13, %r10
jne 0x208782
movslq %r11d, %r10
cmpl $0x1, %r9d
sete %r9b
movq %r12, %r11
jmp 0x2087b4
movq $-0x1, %r10
testb %r9b, %r9b
je 0x208816
shlq $0x20, %r15
shlq $0x5, %r10
movl 0x8(%r8,%r10), %eax
movl %eax, %edi
notl %edi
orq %rax, %r15
shrl %eax
andl $0x1, %edi
imulq $0x78, %rax, %r9
addq %r14, %r9
leaq (%rdi,%rdi,2), %r10
movq 0x10(%r9,%r10,8), %rdi
xorl %r8d, %r8d
testl %edi, %edi
jle 0x20881c
movq 0x20(%r9,%r10,8), %r9
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
addq $0xc, %r9
movl (%r9), %eax
notl %eax
shrl $0x1f, %eax
addl %eax, %r8d
addq $0x20, %r9
decq %rdi
jne 0x2087f8
cmpl $0x1, %r8d
sete %r8b
jmp 0x20881c
xorl %r8d, %r8d
movq %rdi, %r15
testb %r8b, %r8b
je 0x208847
movl %r15d, %eax
shrl %eax
imulq $0x78, %rax, %rax
addl 0x4(%r14,%rax), %ebp
cmpb $0x0, 0x71(%r14,%rax)
cmovnel %ecx, %edx
incl %esi
movq %r15, %rdi
cmpl 0x14(%rsp), %esi
jne 0x208741
testl %edx, %edx
setne %sil
jmp 0x20886e
movq 0x28(%rsp), %rbx
movq %rdi, %r15
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %r8
jmp 0x20895c
movq %rdi, %r15
movq 0x20(%rsp), %rcx
cmpl 0x14(%rsp), %ebp
movq 0x30(%rsp), %r8
ja 0x2088c6
testb %sil, %sil
jne 0x2088c6
movq %r11, %rax
testq %rcx, %rcx
movq 0x28(%rsp), %rbx
je 0x208893
movq (%rcx), %rax
movq %rbx, %rdx
testq %rcx, %rcx
je 0x20889f
movq 0x8(%rcx), %rdx
cmpq %rdx, %rax
jne 0x20891d
movq %rbx, %rax
testq %rcx, %rcx
je 0x2088b0
movq 0x8(%rcx), %rax
testq %rax, %rax
je 0x2088d0
movq %rbx, %rsi
testq %rcx, %rcx
je 0x2088c1
movq 0x8(%rcx), %rsi
addq %rsi, %rsi
jmp 0x2088d5
movq 0x28(%rsp), %rbx
jmp 0x208952
movl $0x2, %esi
movq %rsi, %rbx
testq %rcx, %rcx
je 0x2088e6
movq %rsi, 0x8(%rcx)
movq 0x28(%rsp), %rbx
movq %r11, %r12
movq 0x8(%rsp), %rdi
testq %rcx, %rcx
je 0x2088f7
movq 0x10(%rcx), %rdi
shlq $0x3, %rsi
callq 0x2370
movq 0x20(%rsp), %rcx
testq %rcx, %rcx
je 0x208910
movq %rax, 0x10(%rcx)
jmp 0x208915
movq %rax, 0x8(%rsp)
movq %r12, %r11
movq 0x30(%rsp), %r8
movq 0x8(%rsp), %rax
testq %rcx, %rcx
je 0x20892b
movq 0x10(%rcx), %rax
movq %r11, %rsi
testq %rcx, %rcx
je 0x208936
movq (%rcx), %rsi
leaq 0x1(%rsi), %rdx
testq %rcx, %rcx
je 0x208944
movq %rdx, (%rcx)
jmp 0x208947
movq %rdx, %r11
shlq $0x20, %rbp
orq %r8, %rbp
movq %rbp, (%rax,%rsi,8)
movq 0x38(%rsp), %rbp
movq 0x18(%rsp), %rax
incq %r8
movq %r15, %rdi
movq %rbx, %rsi
cmpq %rax, %r8
jne 0x2086b3
jmp 0x20897e
xorl %r11d, %r11d
xorl %ebx, %ebx
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rdi
testq %rcx, %rcx
je 0x20898c
movq 0x10(%rcx), %rdi
movq %r11, %r12
movq %r11, %rax
testq %rcx, %rcx
je 0x20899a
movq (%rcx), %rax
leaq (%rdi,%rax,8), %rsi
callq 0x1e3b6a
movq 0x20(%rsp), %r8
xorl %r13d, %r13d
movl $0x0, 0x40(%rsp)
movq %r12, %r11
movq %r11, %rax
testq %r8, %r8
je 0x2089c1
movq (%r8), %rax
movl %r13d, %r13d
cmpq %r13, %rax
jbe 0x208f09
movq 0x8(%rsp), %rax
testq %r8, %r8
je 0x2089db
movq 0x10(%r8), %rax
movq %r13, 0x28(%rsp)
movq (%rax,%r13,8), %r12
movq (%rbp), %rcx
movl %r12d, %eax
shrl %eax
imulq $0x78, %rax, %r13
cmpb $0x0, 0x70(%rcx,%r13)
je 0x208a0f
movq %rbx, %r14
movq %r15, %r12
movq 0x28(%rsp), %r13
incl %r13d
movq %r14, %rbx
movq %r12, %r15
jmp 0x2089b6
movl %r12d, %eax
notl %eax
andl $0x1, %eax
addq %r13, %rcx
leaq (%rax,%rax,2), %rdx
movl 0x10(%rcx,%rdx,8), %eax
testl %eax, %eax
je 0x208a3c
movq 0x20(%rcx,%rdx,8), %rcx
addq $0xc, %rcx
cmpl $0x0, (%rcx)
jns 0x2089f9
addq $0x20, %rcx
decl %eax
jne 0x208a2f
movq %r11, 0x18(%rsp)
testq %r8, %r8
je 0x208a4e
movq (%r8), %rax
movq %rax, 0x18(%rsp)
movq %rbx, %rax
testq %r8, %r8
je 0x208a5a
movq 0x8(%r8), %rax
cmpq %rax, 0x18(%rsp)
jne 0x208a83
movq %rbx, %rax
testq %r8, %r8
je 0x208a6d
movq 0x8(%r8), %rax
testq %rax, %rax
je 0x208a88
movq %rbx, %rsi
testq %r8, %r8
je 0x208a7e
movq 0x8(%r8), %rsi
addq %rsi, %rsi
jmp 0x208a8d
movq %rbx, %r14
jmp 0x208ace
movl $0x2, %esi
movq %rsi, %r14
testq %r8, %r8
je 0x208a9c
movq %rsi, 0x8(%r8)
movq %rbx, %r14
movq %r11, %rbx
movq 0x8(%rsp), %rdi
testq %r8, %r8
je 0x208aad
movq 0x10(%r8), %rdi
shlq $0x3, %rsi
callq 0x2370
movq 0x20(%rsp), %r8
testq %r8, %r8
je 0x208ac6
movq %rax, 0x10(%r8)
jmp 0x208acb
movq %rax, 0x8(%rsp)
movq %rbx, %r11
movq 0x8(%rsp), %rax
testq %r8, %r8
je 0x208adc
movq 0x10(%r8), %rax
movq %r11, %rcx
testq %r8, %r8
je 0x208ae7
movq (%r8), %rcx
leaq 0x1(%rcx), %rdx
testq %r8, %r8
je 0x208af5
movq %rdx, (%r8)
jmp 0x208af8
movq %rdx, %r11
movl %r12d, %edx
movq %rdx, (%rax,%rcx,8)
movq (%rbp), %rdx
movb 0x71(%rdx,%r13), %cl
testb %cl, %cl
setne %al
movl 0x4(%rdx,%r13), %edx
cmpl $0x0, 0x14(%rsp)
je 0x208d27
movl %edx, 0x30(%rsp)
xorl %r13d, %r13d
testb %cl, %cl
setne %r13b
xorl %ebx, %ebx
movq (%rbp), %rax
movl %r12d, %ecx
shrl %ecx
movl %r12d, %edx
andl $0x1, %edx
imulq $0x78, %rcx, %rcx
addq %rax, %rcx
leaq (%rdx,%rdx,2), %rdx
movq 0x10(%rcx,%rdx,8), %rsi
movq 0x20(%rcx,%rdx,8), %rcx
xorl %edx, %edx
testl %esi, %esi
jle 0x208b96
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
leaq 0xc(%rcx), %r8
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
xorl %r10d, %r10d
cmpl $0x0, (%r8)
setns %r10b
cmovnsl %r9d, %edi
addl %r10d, %edx
incq %r9
addq $0x20, %r8
cmpq %r9, %rsi
jne 0x208b68
movslq %edi, %rsi
cmpl $0x1, %edx
sete %dl
movq 0x20(%rsp), %r8
jmp 0x208b9d
movq $-0x1, %rsi
testb %dl, %dl
je 0x208bf8
shlq $0x20, %r12
shlq $0x5, %rsi
movl 0x8(%rcx,%rsi), %ecx
movl %ecx, %edx
notl %edx
orq %rcx, %r12
shrl %ecx
andl $0x1, %edx
imulq $0x78, %rcx, %rsi
addq %rax, %rsi
leaq (%rdx,%rdx,2), %rdi
movq 0x10(%rsi,%rdi,8), %rdx
xorl %ecx, %ecx
testl %edx, %edx
jle 0x208bfd
movq 0x20(%rsi,%rdi,8), %rsi
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
addq $0xc, %rsi
movl (%rsi), %edi
notl %edi
shrl $0x1f, %edi
addl %edi, %ecx
addq $0x20, %rsi
decq %rdx
jne 0x208bde
cmpl $0x1, %ecx
sete %cl
jmp 0x208bfd
xorl %ecx, %ecx
movq %r15, %r12
testb %cl, %cl
je 0x208d1b
movq %r11, %rcx
testq %r8, %r8
je 0x208c10
movq (%r8), %rcx
movq %r14, %rdx
testq %r8, %r8
je 0x208c1c
movq 0x8(%r8), %rdx
movl %r12d, %esi
shrl %esi
imulq $0x78, %rsi, %r15
movl 0x30(%rsp), %esi
addl 0x4(%rax,%r15), %esi
movl %esi, 0x30(%rsp)
cmpq %rdx, %rcx
jne 0x208ccb
movq %r14, %rax
testq %r8, %r8
je 0x208c47
movq 0x8(%r8), %rax
testq %rax, %rax
je 0x208c60
movq %r14, %rsi
testq %r8, %r8
je 0x208c58
movq 0x8(%r8), %rsi
movq %r14, %rax
addq %rsi, %rsi
jmp 0x208c68
movq %r14, %rax
movl $0x2, %esi
movq %r12, %r14
movq %rsi, %rbp
testq %r8, %r8
je 0x208c7a
movq %rsi, 0x8(%r8)
movq %rax, %rbp
movq %r11, %r12
movq 0x8(%rsp), %rdi
testq %r8, %r8
je 0x208c8b
movq 0x10(%r8), %rdi
shlq $0x3, %rsi
callq 0x2370
movq 0x20(%rsp), %r8
testq %r8, %r8
je 0x208cb5
movq %rax, 0x10(%r8)
movq %rbp, %rax
movq 0x38(%rsp), %rbp
movq %r12, %r11
movq %r14, %r12
movq %rax, %r14
jmp 0x208ccb
movq %rbp, %rcx
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rbp
movq %r12, %r11
movq %r14, %r12
movq %rcx, %r14
movq 0x8(%rsp), %rax
testq %r8, %r8
je 0x208cd9
movq 0x10(%r8), %rax
movq %r11, %rcx
testq %r8, %r8
je 0x208ce4
movq (%r8), %rcx
leaq 0x1(%rcx), %rdx
testq %r8, %r8
je 0x208cf2
movq %rdx, (%r8)
jmp 0x208cf5
movq %rdx, %r11
movq %r12, (%rax,%rcx,8)
movq (%rbp), %rax
cmpb $0x0, 0x71(%rax,%r15)
movl $0x1, %eax
cmovnel %eax, %r13d
incl %ebx
movq %r12, %r15
cmpl 0x14(%rsp), %ebx
jne 0x208b2c
testl %r13d, %r13d
setne %al
movl 0x30(%rsp), %edx
jmp 0x208d2a
movq %r15, %r12
cmpl 0x14(%rsp), %edx
movq 0x28(%rsp), %r13
ja 0x208e56
testb %al, %al
jne 0x208e56
cmpl $0x0, 0x44(%rsp)
je 0x208de5
movq %r11, %rax
testq %r8, %r8
je 0x208d57
movq (%r8), %rax
movl 0x18(%rsp), %ecx
cmpq %rax, %rcx
movq %r11, %r15
jae 0x208da0
movq 0x8(%rsp), %rax
testq %r8, %r8
je 0x208d71
movq 0x10(%r8), %rax
movq %r11, %rcx
testq %r8, %r8
je 0x208d7c
movq (%r8), %rcx
movl -0x8(%rax,%rcx,8), %esi
movq %rbp, %rdi
movsd 0x1c7a5(%rip), %xmm0    # 0x225530
callq 0x20856b
movq 0x20(%rsp), %r8
testl %eax, %eax
movq %r15, %r11
je 0x208e56
movq 0x18(%rsp), %rax
movq %r11, %rcx
testq %r8, %r8
je 0x208db0
movq (%r8), %rcx
movl %eax, %ebx
cmpq %rbx, %rcx
jbe 0x208ddf
movq 0x8(%rsp), %rax
testq %r8, %r8
je 0x208dc5
movq 0x10(%r8), %rax
movl (%rax,%rbx,8), %esi
shrl %esi
movq %rbp, %rdi
callq 0x208f6d
movq 0x20(%rsp), %r8
leal 0x1(%rbx), %eax
movq %r15, %r11
jmp 0x208da5
incl 0x40(%rsp)
jmp 0x208e56
movq 0x18(%rsp), %rcx
movq %r11, %rdx
testq %r8, %r8
je 0x208df5
movq (%r8), %rdx
leal 0x1(%rcx), %eax
cmpq %rax, %rdx
jbe 0x208e6f
movq 0x8(%rsp), %rdx
testq %r8, %r8
je 0x208e0b
movq 0x10(%r8), %rdx
movl %ecx, %ecx
movq (%rdx,%rcx,8), %rsi
movl %esi, %ecx
shrl %ecx
imulq $0x78, %rcx, %rcx
addq (%rbp), %rcx
andl $0x1, %esi
leaq (%rsi,%rsi,2), %rdi
movl 0x10(%rcx,%rdi,8), %esi
testq %rsi, %rsi
je 0x208e43
movl (%rdx,%rax,8), %edx
movq 0x20(%rcx,%rdi,8), %rcx
cmpl %edx, 0x8(%rcx)
je 0x208e45
addq $0x20, %rcx
decq %rsi
jne 0x208e35
xorl %ecx, %ecx
testq %rcx, %rcx
je 0x208f4e
cmpl $0x1, 0x10(%rcx)
movl %eax, %ecx
jbe 0x208dea
movl 0x18(%rsp), %eax
testq %r8, %r8
je 0x208e67
movq %rax, (%r8)
jmp 0x208a04
movq %rax, %r11
jmp 0x208a04
movq %r11, %rdx
testq %r8, %r8
je 0x208e7a
movq (%r8), %rdx
movl %ecx, %eax
cmpq %rax, %rdx
jbe 0x208d4c
movq 0x8(%rsp), %rdx
testq %r8, %r8
je 0x208e93
movq 0x10(%r8), %rdx
movq 0x8(%rsp), %rcx
testq %r8, %r8
je 0x208ea1
movq 0x10(%r8), %rcx
movq (%rbp), %rsi
movq (%rcx,%rax,8), %rcx
movl %ecx, %edi
shrl %edi
andl $0x1, %ecx
imulq $0x78, %rdi, %rdi
addq %rsi, %rdi
leaq (%rcx,%rcx,2), %rcx
movl 0x10(%rdi,%rcx,8), %ecx
testq %rcx, %rcx
je 0x208d4c
movq (%rdx,%rax,8), %rax
movl %eax, %edx
shrl %edx
andl $0x1, %eax
imulq $0x78, %rdx, %rdx
addq %rdx, %rsi
leaq (%rax,%rax,2), %rax
movq 0x20(%rsi,%rax,8), %rax
shlq $0x5, %rcx
xorl %edx, %edx
cmpl $0x0, 0xc(%rax,%rdx)
js 0x208efb
cmpl $0x1, 0x10(%rax,%rdx)
ja 0x208e56
addq $0x20, %rdx
cmpq %rdx, %rcx
jne 0x208ee9
jmp 0x208d4c
testq %r8, %r8
jne 0x208f18
movq 0x8(%rsp), %rdi
callq 0x2220
movl 0x40(%rsp), %ebx
testl %ebx, %ebx
je 0x208f3d
leaq 0x81831(%rip), %rax     # 0x28a758
movl 0x7c(%rax), %edi
movq 0x8(%rbp), %rcx
leaq -0xc4d(%rip), %rsi      # 0x2082e8
movq %rbp, %rdx
callq 0x1047b4
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b653(%rip), %rdi     # 0x2245a8
leaq 0x303c9(%rip), %rsi     # 0x239325
leaq 0x33293(%rip), %rcx     # 0x23c1f6
movl $0x2a16, %edx           # imm = 0x2A16
callq 0x2110