// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: ulg_arc_cut_tips(ul_resolve_t*, ma_ug_t*, unsigned int, unsigned int, unsigned int, asg64_v*, asg64_v*)
uint32_t ulg_arc_cut_tips(ul_resolve_t *uidx, ma_ug_t *ug, uint32_t max_ext, uint32_t max_ext_hifi, uint32_t is_double_check, asg64_v *in, asg64_v *ib)
{
    asg64_v tx = {0,0,0}, tb = {0,0,0}, *b = NULL, *ub = NULL; asg_t *g = ug->g;
    uint32_t n_vtx = g->n_seq<<1, v, w, i, k, cnt = 0, nv, kv, pb, w_occ, a_occ, ul_occ, del_occ, is_telo;
    asg_arc_t *av = NULL; uint64_t lw;
    b = (in?(in):(&tx)); ub = (ib?(ib):(&tb));
    for (v = 0, 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;
        // kv = ug->u.a[v>>1].n;/// get_ul_occ(uidx, v>>1);
        get_iug_u_raw_occ(uidx, v>>1, &ul_occ, NULL); kv = ul_occ;
        is_telo = 0; if(uidx->uovl.telo && uidx->uovl.telo[v>>1]) is_telo = 1;
        for (i = 0, w = v; i < max_ext; i++) {
            if(asg_end(g, w^1, &lw, NULL)!=0) break;
            w = (uint32_t)lw; 
            // kv += ug->u.a[w>>1].n; ///get_ul_occ(uidx, w>>1);
            get_iug_u_raw_occ(uidx, w>>1, &ul_occ, NULL); kv += ul_occ;
            if(uidx->uovl.telo && uidx->uovl.telo[w>>1]) 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->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;

        pb = b->n; kv_push(uint64_t, *b, v); 
        // kv = ug->u.a[v>>1].n;/// get_ul_occ(uidx, v>>1);
        get_iug_u_raw_occ(uidx, v>>1, &ul_occ, NULL); kv = ul_occ;
        is_telo = 0; if(uidx->uovl.telo && uidx->uovl.telo[v>>1]) is_telo = 1;
        for (i = 0, w = v; i < max_ext; i++) {
            if(asg_end(g, w^1, &lw, NULL)!=0) break;
            w = (uint32_t)lw; kv_push(uint64_t, *b, w); 
            // kv += ug->u.a[w>>1].n; ///get_ul_occ(uidx, w>>1);
            get_iug_u_raw_occ(uidx, w>>1, &ul_occ, NULL); kv += ul_occ;
            if(uidx->uovl.telo && uidx->uovl.telo[w>>1]) is_telo = 1;
        }

        

        if((!is_telo) && (kv <= max_ext) && (get_remove_hifi_occ(uidx, max_ext_hifi, b->a + pb, b->n - pb, ub, &del_occ))) {
            // fprintf(stderr, "*[M::%s::] k::%u, v>>1::%u, v&1::%u, kv::%u, max_ext::%u, max_ext_hifi::%u\n\n", 
            // __func__, k, v>>1, v&1, kv, max_ext, max_ext_hifi);
            if(is_double_check) get_bridges(uidx, b->a + pb, b->n - pb, &w_occ, &a_occ);
            if(is_double_check == 0 || w_occ > 0 || a_occ > 0 || kv == 0 || del_occ == 0) {
                for (i = pb; i < b->n; i++) ulg_seq_del(ug, (b->a[i]>>1));
                cnt += b->n - pb;
            }
        }
        b->n = pb; 
    }

    // stats_sysm(g);
    if(!in) free(tx.a); if(!ib) free(tb.a);
    if (cnt > 0) asg_cleanup(g);

    return cnt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r9, %r14
movl %r8d, 0x4c(%rsp)
movl %ecx, 0x58(%rsp)
movl %edx, 0x24(%rsp)
movq %rdi, 0x40(%rsp)
movq 0xd0(%rsp), %rcx
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rdx
movaps %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
movq %rsi, 0x70(%rsp)
movq 0x18(%rsi), %r12
movl 0x14(%r12), %eax
addl %eax, %eax
testq %rcx, %rcx
cmovneq %rcx, %rdx
movq %rdx, 0x78(%rsp)
testq %r9, %r9
je 0x200904
movq $0x0, (%r14)
testl %eax, %eax
movq %r12, 0x50(%rsp)
je 0x200bcc
movl %eax, %eax
movq %rax, 0x30(%rsp)
xorl %esi, %esi
movq $0x0, (%rsp)
xorl %r9d, %r9d
movq $0x0, 0x8(%rsp)
movq 0x20(%r12), %rax
movl %esi, %r10d
shrl %r10d
cmpl $0x0, (%rax,%r10,8)
js 0x2009aa
movq 0x8(%r12), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%r12), %rdx
movl %esi, %eax
xorq $0x1, %rax
movq (%rdx,%rax,8), %rax
testl %eax, %eax
je 0x200982
movq %rax, %rcx
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rsp), %rdi
leaq (%rdi,%rcx,8), %rcx
addq $0xc, %rcx
cmpl $0x0, (%rcx)
jns 0x2009aa
addq $0x18, %rcx
decl %eax
jne 0x200975
movq %rsi, 0x18(%rsp)
movq 0x40(%rsp), %rax
movq 0x2a8(%rax), %rdi
testq %rdi, %rdi
movq %r9, 0x28(%rsp)
je 0x2009b5
xorl %esi, %esi
cmpb $0x0, (%rdi,%r10)
setne %sil
jmp 0x2009b7
movq %r9, %r10
movq %r8, %rbp
jmp 0x200bb6
xorl %esi, %esi
movq 0x40(%rsp), %rax
movq 0x258(%rax), %r9
movl (%r9,%r10,4), %r12d
cmpl $0x0, 0x24(%rsp)
je 0x200ad9
movq 0x10(%rsp), %rax
addq $0xc, %rax
movq %rax, 0x38(%rsp)
xorl %r11d, %r11d
movq 0x18(%rsp), %rbp
movl %ebp, %eax
movq (%rdx,%rax,8), %r13
movq %r13, %rax
shrq $0x20, %rax
leaq (%rax,%rax,2), %rbx
xorl %ebp, %ebp
testl %r13d, %r13d
jle 0x200a40
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movq 0x38(%rsp), %rax
leaq (%rax,%rbx,8), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %r15d, %r15d
xorl %r10d, %r10d
cmpl $0x0, (%rcx)
setns %r10b
cmovnsl %r15d, %eax
addl %r10d, %ebp
incq %r15
addq $0x18, %rcx
cmpq %r15, %r13
jne 0x200a18
cltq
cmpl $0x1, %ebp
sete %bpl
jmp 0x200a47
movq $-0x1, %rax
testb %bpl, %bpl
je 0x200aa4
movq 0x10(%rsp), %rcx
leaq (%rcx,%rbx,8), %rcx
leaq (%rax,%rax,2), %rax
movl 0x8(%rcx,%rax,8), %ebp
movq %rbp, %rax
xorq $0x1, %rax
movq (%rdx,%rax,8), %r8
xorl %ebx, %ebx
testl %r8d, %r8d
jle 0x200aa9
movq %r8, %rax
shrq $0x20, %rax
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
leaq (%rax,%rax,2), %rax
movq 0x38(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
movl (%rax), %ecx
notl %ecx
shrl $0x1f, %ecx
addl %ecx, %ebx
addq $0x18, %rax
decq %r8
jne 0x200a8a
cmpl $0x1, %ebx
sete %bl
jmp 0x200aa9
xorl %ebx, %ebx
movq %r8, %rbp
testb %bl, %bl
je 0x200adc
movl %ebp, %eax
shrl %eax
testq %rdi, %rdi
je 0x200ac2
cmpb $0x0, (%rdi,%rax)
movl $0x1, %ecx
cmovnel %ecx, %esi
addl (%r9,%rax,4), %r12d
incl %r11d
movq %rbp, %r8
cmpl 0x24(%rsp), %r11d
jne 0x2009e8
jmp 0x200adc
movq %r8, %rbp
cmpl 0x24(%rsp), %r12d
ja 0x200b57
testl %esi, %esi
movq 0x28(%rsp), %rdx
jne 0x200b52
movq 0x8(%rsp), %rax
testq %r14, %r14
movq 0x18(%rsp), %rsi
je 0x200afe
movq (%r14), %rax
movq %rdx, %rcx
testq %r14, %r14
je 0x200b0a
movq 0x8(%r14), %rcx
cmpq %rcx, %rax
jne 0x200b68
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, %rax
testq %r14, %r14
je 0x200b2e
movq %rsi, 0x8(%r14)
movq %rdx, %rax
movq %rax, %rbx
movq (%rsp), %rdi
testq %r14, %r14
je 0x200b3e
movq 0x10(%r14), %rdi
shlq $0x3, %rsi
callq 0x2370
testq %r14, %r14
je 0x200b6d
movq %rax, 0x10(%r14)
jmp 0x200b71
movq %rdx, %r10
jmp 0x200b5c
movq 0x28(%rsp), %r10
movq 0x50(%rsp), %r12
movq 0x18(%rsp), %rsi
jmp 0x200bb6
movq %rdx, %r10
jmp 0x200b79
movq %rax, (%rsp)
movq 0x18(%rsp), %rsi
movq %rbx, %r10
movq (%rsp), %rax
testq %r14, %r14
je 0x200b86
movq 0x10(%r14), %rax
movq 0x8(%rsp), %rcx
testq %r14, %r14
je 0x200b93
movq (%r14), %rcx
leaq 0x1(%rcx), %rdx
testq %r14, %r14
je 0x200ba1
movq %rdx, (%r14)
jmp 0x200ba6
movq %rdx, 0x8(%rsp)
shlq $0x20, %r12
orq %rsi, %r12
movq %r12, (%rax,%rcx,8)
movq 0x50(%rsp), %r12
incq %rsi
movq %rbp, %r8
movq %r10, %r9
cmpq 0x30(%rsp), %rsi
jne 0x20092e
jmp 0x200be0
movq $0x0, 0x8(%rsp)
xorl %r10d, %r10d
movq $0x0, (%rsp)
movq (%rsp), %rdi
testq %r14, %r14
je 0x200bed
movq 0x10(%r14), %rdi
movq %r10, %rbx
movq 0x8(%rsp), %rax
testq %r14, %r14
je 0x200bfd
movq (%r14), %rax
leaq (%rdi,%rax,8), %rsi
callq 0x1e3b6a
movl 0x58(%rsp), %eax
movq %rax, 0x58(%rsp)
xorl %ecx, %ecx
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl $0x0, 0x48(%rsp)
movq %rbx, %r8
movq 0x8(%rsp), %rax
testq %r14, %r14
je 0x200c2f
movq (%r14), %rax
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x2011ba
movq (%rsp), %rax
testq %r14, %r14
je 0x200c47
movq 0x10(%r14), %rax
movq %rcx, 0x30(%rsp)
movq (%rax,%rcx,8), %rdi
movq 0x20(%r12), %rax
movl %edi, %ebx
shrl %ebx
cmpl $0x0, (%rax,%rbx,8)
js 0x200d13
movq 0x28(%r12), %rax
movl %edi, %r15d
movq %r15, %rcx
xorq $0x1, %rcx
movq (%rax,%rcx,8), %rax
testl %eax, %eax
je 0x200c9f
movq 0x8(%r12), %rcx
movq %rax, %rdx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
leaq (%rcx,%rdx,8), %rcx
addq $0xc, %rcx
cmpl $0x0, (%rcx)
jns 0x200d13
addq $0x18, %rcx
decl %eax
jne 0x200c92
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
testq %r14, %r14
je 0x200cb6
movq (%r14), %rax
movq %rax, 0x28(%rsp)
movq %r8, %rax
testq %r14, %r14
je 0x200cc2
movq 0x8(%r14), %rax
cmpq %rax, 0x28(%rsp)
jne 0x200d2e
movq %rdi, 0x10(%rsp)
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, %rax
testq %r14, %r14
je 0x200ced
movq %rsi, 0x8(%r14)
movq %r8, %rax
movq %rax, 0x18(%rsp)
movq (%rsp), %rdi
testq %r14, %r14
je 0x200cff
movq 0x10(%r14), %rdi
shlq $0x3, %rsi
callq 0x2370
testq %r14, %r14
je 0x200d20
movq %rax, 0x10(%r14)
jmp 0x200d24
movq %rbp, %rdi
movq 0x30(%rsp), %rcx
jmp 0x2011b0
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r8
movq (%rsp), %rax
testq %r14, %r14
je 0x200d3b
movq 0x10(%r14), %rax
movq 0x8(%rsp), %rcx
testq %r14, %r14
je 0x200d48
movq (%r14), %rcx
leaq 0x1(%rcx), %rdx
testq %r14, %r14
je 0x200d56
movq %rdx, (%r14)
jmp 0x200d5b
movq %rdx, 0x8(%rsp)
movq %r15, (%rax,%rcx,8)
movq 0x40(%rsp), %rax
movq 0x258(%rax), %rcx
movq 0x2a8(%rax), %rax
movl (%rcx,%rbx,4), %ecx
movl %ecx, 0x38(%rsp)
testq %rax, %rax
je 0x200d8d
xorl %ecx, %ecx
cmpb $0x0, (%rax,%rbx)
setne %cl
movl %ecx, 0x10(%rsp)
jmp 0x200d95
movl $0x0, 0x10(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x200f66
xorl %ebx, %ebx
movq 0x8(%r12), %rax
movq 0x28(%r12), %rcx
movl %edi, %edx
movq (%rcx,%rdx,8), %rdi
movq %rdi, %rdx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
testl %edi, %edi
jle 0x200e0a
movq %r8, %r15
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 0x200ddd
movslq %r8d, %rdi
cmpl $0x1, %esi
sete %sil
movq %r15, %r8
jmp 0x200e11
movq $-0x1, %rdi
testb %sil, %sil
je 0x200e66
leaq (%rax,%rdx,8), %rdx
leaq (%rdi,%rdi,2), %rsi
movl 0x8(%rdx,%rsi,8), %edi
movq %rdi, %rdx
xorq $0x1, %rdx
movq (%rcx,%rdx,8), %rdx
xorl %ecx, %ecx
testl %edx, %edx
jle 0x200e6b
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 0x200e4c
cmpl $0x1, %ecx
sete %cl
jmp 0x200e6b
xorl %ecx, %ecx
movq %rbp, %rdi
testb %cl, %cl
je 0x200f69
movq 0x8(%rsp), %rax
testq %r14, %r14
je 0x200e80
movq (%r14), %rax
movq %r8, %rcx
testq %r14, %r14
je 0x200e8c
movq 0x8(%r14), %rcx
cmpq %rcx, %rax
jne 0x200ee7
movq %r12, %r15
movq %rdi, %r12
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, %rbp
testq %r14, %r14
je 0x200eb6
movq %rsi, 0x8(%r14)
movq %r8, %rbp
movq (%rsp), %rdi
testq %r14, %r14
je 0x200ec3
movq 0x10(%r14), %rdi
shlq $0x3, %rsi
callq 0x2370
testq %r14, %r14
je 0x200eda
movq %rax, 0x10(%r14)
movq %rbp, %r8
jmp 0x200ee1
movq %rbp, %r8
movq %rax, (%rsp)
movq %r12, %rdi
movq %r15, %r12
movl 0x38(%rsp), %esi
movq (%rsp), %rax
testq %r14, %r14
je 0x200ef8
movq 0x10(%r14), %rax
movq 0x8(%rsp), %rcx
testq %r14, %r14
je 0x200f05
movq (%r14), %rcx
leaq 0x1(%rcx), %rdx
testq %r14, %r14
je 0x200f13
movq %rdx, (%r14)
jmp 0x200f18
movq %rdx, 0x8(%rsp)
movl %edi, %edx
movq %rdx, (%rax,%rcx,8)
movl %edi, %eax
shrl %eax
movq 0x40(%rsp), %rcx
movq 0x258(%rcx), %rdx
movq 0x2a8(%rcx), %rcx
addl (%rdx,%rax,4), %esi
testq %rcx, %rcx
movl %esi, 0x38(%rsp)
je 0x200f55
cmpb $0x0, (%rcx,%rax)
movl $0x1, %eax
movl 0x10(%rsp), %ecx
cmovnel %eax, %ecx
movl %ecx, 0x10(%rsp)
incl %ebx
movq %rdi, %rbp
cmpl 0x24(%rsp), %ebx
jne 0x200da2
jmp 0x200f69
movq %rbp, %rdi
cmpl $0x0, 0x10(%rsp)
jne 0x201198
movl 0x38(%rsp), %ebp
cmpl 0x24(%rsp), %ebp
movq 0x30(%rsp), %rcx
ja 0x20119d
movq (%rsp), %rax
testq %r14, %r14
je 0x200f94
movq 0x10(%r14), %rax
movq %r8, 0x18(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x8(%rsp), %rcx
testq %r14, %r14
je 0x200fab
movq (%r14), %rcx
movl 0x28(%rsp), %ebx
leaq (%rax,%rbx,8), %rdx
subq %rbx, %rcx
movq 0x40(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x78(%rsp), %r8
leaq 0x64(%rsp), %r9
callq 0x22129a
testq %rax, %rax
je 0x20117f
cmpl $0x0, 0x4c(%rsp)
je 0x201014
movq (%rsp), %rax
testq %r14, %r14
je 0x200fec
movq 0x10(%r14), %rax
movq 0x8(%rsp), %rdx
testq %r14, %r14
je 0x200ff9
movq (%r14), %rdx
leaq (%rax,%rbx,8), %rsi
subq %rbx, %rdx
movq 0x40(%rsp), %rdi
leaq 0x6c(%rsp), %rcx
leaq 0x68(%rsp), %r8
callq 0x2218f9
cmpl $0x0, 0x4c(%rsp)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r8
je 0x201042
cmpl $0x0, 0x6c(%rsp)
jne 0x201042
cmpl $0x0, 0x68(%rsp)
jne 0x201042
testl %ebp, %ebp
je 0x201042
cmpl $0x0, 0x64(%rsp)
jne 0x201198
movq 0x28(%rsp), %rbx
movq 0x8(%rsp), %rax
testq %r14, %r14
je 0x201054
movq (%r14), %rax
movl %ebx, %ebx
cmpq %rbx, %rax
jbe 0x201190
movq (%rsp), %rax
testq %r14, %r14
je 0x20106c
movq 0x10(%r14), %rax
movq (%rax,%rbx,8), %rax
movq %rax, %rcx
shrq %rcx
movq 0x70(%rsp), %rdx
movq 0x18(%rdx), %rdx
movq 0x20(%rdx), %rsi
movl %ecx, %ecx
orl $0x80000000, (%rsi,%rcx,8) # imm = 0x80000000
andl $-0x2, %eax
xorl %esi, %esi
leaq (%rsi,%rax), %rdi
movq 0x28(%rdx), %r8
movq (%r8,%rdi,8), %r9
movq %r9, %r8
andq %r13, %r8
je 0x201121
shrq $0x20, %r9
leaq (%r9,%r9,2), %r9
shlq $0x3, %r9
addq 0x8(%rdx), %r9
xorl %r10d, %r10d
leaq (%r10,%r10,2), %r11
orb $-0x80, 0xf(%r9,%r11,8)
movl 0x8(%r9,%r11,8), %r11d
xorq $0x1, %r11
movq 0x28(%rdx), %r15
movq (%r15,%r11,8), %r15
movq %r15, %r11
andq %r13, %r11
je 0x201119
movq 0x8(%rdx), %rbp
shrq $0x20, %r15
shlq $0x3, %r11
leaq (%r11,%r11,2), %r11
leaq (%r15,%r15,2), %r15
leaq 0xc(,%r15,8), %r15
addq %rbp, %r15
xorl %ebp, %ebp
movl -0x4(%r15,%rbp), %r12d
xorl %edi, %r12d
cmpl $0x1, %r12d
jne 0x201110
orb $-0x80, 0x3(%r15,%rbp)
addq $0x18, %rbp
cmpq %rbp, %r11
jne 0x2010fc
incq %r10
cmpq %r8, %r10
jne 0x2010b8
leaq 0x1(%rsi), %rdi
testq %rsi, %rsi
movq %rdi, %rsi
je 0x201091
movq 0x70(%rsp), %r12
movq 0x10(%r12), %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,4), %r15
movq 0x18(%rax,%r15), %rdi
callq 0x2220
movq 0x10(%r12), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax,%r15)
movups %xmm0, (%rax,%r15)
movq $0x0, 0x20(%rax,%r15)
incl %ebx
movq 0x50(%rsp), %r12
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r8
jmp 0x201047
movq 0x30(%rsp), %rcx
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r8
jmp 0x20119d
subl 0x28(%rsp), %eax
addl %eax, 0x48(%rsp)
movq 0x30(%rsp), %rcx
movl 0x28(%rsp), %eax
testq %r14, %r14
je 0x2011ab
movq %rax, (%r14)
jmp 0x2011b0
movq %rax, 0x8(%rsp)
incl %ecx
movq %rdi, %rbp
jmp 0x200c22
testq %r14, %r14
jne 0x2011c8
movq (%rsp), %rdi
callq 0x2220
cmpq $0x0, 0xd0(%rsp)
movl 0x48(%rsp), %ebx
jne 0x2011e4
movq 0x90(%rsp), %rdi
callq 0x2220
testl %ebx, %ebx
je 0x2011f0
movq %r12, %rdi
callq 0xa02fa
movl %ebx, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq