// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: ava_pass_unique_bridge_tips(usg_t*, asg64_v*, unsigned long, unsigned long, unsigned long*, unsigned char*, unsigned long, double, unsigned long)
uint32_t ava_pass_unique_bridge_tips(usg_t *g, asg64_v *b64, uint64_t g_s, uint64_t g_e, uint64_t *integer_seq, uint8_t *f, uint64_t max_ext, double max_ext_rate, uint64_t ext_up)
{
    uint64_t i, k, z, s, e, v, nv, bn = b64->n, kv, kv_t, n_ext = 0, nkeep = 0, ncut = 0, is_telo; usg_arc_t *av;
    for (i = g_s; i < g_e; i++) {///available intervals within the same cluster
        s = b64->a[((uint32_t)b64->a[i])]>>32; e = ((uint32_t)b64->a[((uint32_t)b64->a[i])]); assert(s < e);
        for (k = s + 1; k < e; k++) {///note: here is [s, e]
            f[integer_seq[k]] = f[integer_seq[k]^1] = 1; 
            nkeep += g->a[integer_seq[k]>>1].occ;
        }
        f[integer_seq[s]] = f[integer_seq[e]^1] = 1;
    }
    nkeep = nkeep*max_ext_rate;

    ///collect nodes within raw unitig graph that are linked by the clusters but not in the cluster
    for (i = g_s; i < g_e; i++) {
        s = b64->a[((uint32_t)b64->a[i])]>>32; e = ((uint32_t)b64->a[((uint32_t)b64->a[i])]); assert(s < e);
        for (k = s + 1; k < e; k++) {///note: here is [s, e]
            v = integer_seq[k]; av = usg_arc_a(g, v); nv = usg_arc_n(g, v);
            for (z = 0; z < nv; z++) {
                if(av[z].del || f[av[z].v^1]) continue;
                kv_push(uint64_t, *b64, av[z].v);
            }

            v = integer_seq[k]^1; av = usg_arc_a(g, v); nv = usg_arc_n(g, v);
            for (z = 0; z < nv; z++) {
                if(av[z].del || f[av[z].v^1]) continue;
                kv_push(uint64_t, *b64, av[z].v);
            }
        }

        v = integer_seq[s]; av = usg_arc_a(g, v); nv = usg_arc_n(g, v);
        for (z = 0; z < nv; z++) {
            if(av[z].del || f[av[z].v^1]) continue;
            kv_push(uint64_t, *b64, av[z].v);
        }

        v = integer_seq[e]^1; av = usg_arc_a(g, v); nv = usg_arc_n(g, v);
        for (z = 0; z < nv; z++) {
            if(av[z].del || f[av[z].v^1]) continue;
            kv_push(uint64_t, *b64, av[z].v);
        }
    }

    ncut = MAX(nkeep, max_ext); is_telo = 0;
    if(ncut > ext_up) ncut = ext_up;
    if(ncut < max_ext) ncut = max_ext;
    while ((b64->n > bn) && (n_ext < ncut) && (!is_telo)) {
        v = b64->a[--b64->n]; if(f[v]) continue;
        av = usg_arc_a(g, v^1); nv = usg_arc_n(g, v^1);
        for (i = kv = 0; i < nv && kv < 1; i++) {
            if (av[i].del || f[av[i].v^1]) continue;
            kv++; 
        }
        if(kv > 0) continue;
        n_ext += g->a[v>>1].occ; f[v] = f[v^1] = 1;

        av = usg_arc_a(g, v); nv = usg_arc_n(g, v);
        for (i = kv_t = 0; i < nv; i++) {
            if(av[i].del) continue;
            kv_t++;
            if (f[av[i].v^1]) continue;
            kv_push(uint64_t, *b64, av[i].v);
        }
        if((!kv_t) && (g->a[v>>1].telo)) is_telo = 1;     
    }

    ///reset f[] to 0
    for (i = g_s; i < g_e; i++) { 
        s = b64->a[((uint32_t)b64->a[i])]>>32; e = ((uint32_t)b64->a[((uint32_t)b64->a[i])]); assert(s < e);
        for (k = s + 1; k < e; k++) {///note: here is [s, e]
            kv_push(uint64_t, *b64, integer_seq[k]); 
            kv_push(uint64_t, *b64, (integer_seq[k]^1));
            f[integer_seq[k]] = f[integer_seq[k]^1] = 0; 
        }
        kv_push(uint64_t, *b64, integer_seq[s]); 
        kv_push(uint64_t, *b64, (integer_seq[e]^1));
        f[integer_seq[s]] = f[integer_seq[e]^1] = 0;
    }

    while (b64->n > bn) {
        v = b64->a[--b64->n]; 
        f[v] = f[v^1] = 0;

        av = usg_arc_a(g, v); nv = usg_arc_n(g, v);
        for (i = 0; i < nv; i++) {
            if (av[i].del) continue;
            if(f[av[i].v] || f[av[i].v^1]) {
                kv_push(uint64_t, *b64, av[i].v);
            }
        }

        av = usg_arc_a(g, v^1); nv = usg_arc_n(g, v^1);
        for (i = 0; i < nv; i++) {
            if (av[i].del) continue;
            if(f[av[i].v] || f[av[i].v^1]) {
                kv_push(uint64_t, *b64, av[i].v);
            }
        }
    }
    if((n_ext < ncut) && (n_ext > max_ext - 1)) n_ext = max_ext - 1;
    if(is_telo) n_ext = max_ext + 1;
    return n_ext;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %rbx
movq %r8, %r12
movq %rsi, %r14
movq %rdi, %rbp
movq (%rsi), %rax
movq %rax, 0x48(%rsp)
movq %rcx, 0x28(%rsp)
cmpq %rcx, %rdx
movq %rdi, 0x8(%rsp)
movq %rdx, 0x40(%rsp)
jae 0x219371
xorl %eax, %eax
movb $0x1, %cl
movq %rdx, %r11
movq 0x10(%r14), %rsi
movl (%rsi,%r11,8), %edi
movq (%rsi,%rdi,8), %rsi
movl %esi, %edi
shrq $0x20, %rsi
cmpq %rdi, %rsi
jae 0x219908
leaq 0x1(%rsi), %r8
cmpq %rdi, %r8
jae 0x219042
movq (%r12,%r8,8), %r9
xorq $0x1, %r9
movb %cl, (%rbx,%r9)
movq (%r12,%r8,8), %r9
movb %cl, (%rbx,%r9)
movq (%rbp), %r9
movq (%r12,%r8,8), %r10
shrq %r10
imulq $0x78, %r10, %r10
movl 0x4(%r9,%r10), %r9d
addq %r9, %rax
incq %r8
cmpq %r8, %rdi
jne 0x21900f
movq (%r12,%rdi,8), %rdi
xorq $0x1, %rdi
movb %cl, (%rbx,%rdi)
movq (%r12,%rsi,8), %rsi
movb %cl, (%rbx,%rsi)
incq %r11
cmpq 0x28(%rsp), %r11
jne 0x218feb
movq %rax, %xmm1
punpckldq 0x18215(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1821d(%rip), %xmm1    # 0x231290
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
cmpq 0x28(%rsp), %rdx
jae 0x21937d
movq 0x10(%r14), %rax
movapd %xmm2, 0x30(%rsp)
movl (%rax,%rdx,8), %ecx
movq (%rax,%rcx,8), %rcx
movl %ecx, %edi
shrq $0x20, %rcx
cmpq %rdi, %rcx
jae 0x219946
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
leaq 0x1(%rcx), %rbp
cmpq %rdi, %rbp
movq %rdi, 0x10(%rsp)
jae 0x219219
movq (%r12,%rbp,8), %rcx
movq 0x8(%rsp), %rdx
movq (%rdx), %rdx
movq %rcx, %rsi
shrq %rsi
andl $0x1, %ecx
imulq $0x78, %rsi, %rdi
addq %rdx, %rdi
leaq (%rcx,%rcx,2), %r8
movq 0x10(%rdi,%r8,8), %r15
testq %r15, %r15
je 0x21917e
movq 0x20(%rdi,%r8,8), %r13
addq $0x8, %r13
cmpl $0x0, 0x4(%r13)
js 0x219160
movl (%r13), %ecx
movq %rcx, %rdx
xorq $0x1, %rdx
cmpb $0x0, (%rbx,%rdx)
jne 0x219160
movq (%r14), %rdx
cmpq 0x8(%r14), %rdx
jne 0x219153
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movapd 0x30(%rsp), %xmm2
movq %rax, 0x10(%r14)
movl (%r13), %ecx
movq (%r14), %rdx
movl %ecx, %ecx
leaq 0x1(%rdx), %rsi
movq %rsi, (%r14)
movq %rcx, (%rax,%rdx,8)
addq $0x20, %r13
decq %r15
jne 0x219101
movq (%r12,%rbp,8), %rcx
movq 0x8(%rsp), %rdx
movq (%rdx), %rdx
movq %rcx, %rsi
shrq %rsi
andl $0x1, %ecx
xorq $0x1, %rcx
imulq $0x78, %rsi, %rsi
addq %rdx, %rsi
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rsi,%rcx,8), %r15
testq %r15, %r15
je 0x219208
movq 0x20(%rsi,%rcx,8), %r13
addq $0x8, %r13
cmpl $0x0, 0x4(%r13)
js 0x2191ff
movl (%r13), %ecx
movq %rcx, %rdx
xorq $0x1, %rdx
cmpb $0x0, (%rbx,%rdx)
jne 0x2191ff
movq (%r14), %rdx
cmpq 0x8(%r14), %rdx
jne 0x2191f2
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movapd 0x30(%rsp), %xmm2
movq %rax, 0x10(%r14)
movl (%r13), %ecx
movq (%r14), %rdx
movl %ecx, %ecx
leaq 0x1(%rdx), %rsi
movq %rsi, (%r14)
movq %rcx, (%rax,%rdx,8)
addq $0x20, %r13
decq %r15
jne 0x2191a0
incq %rbp
movq 0x10(%rsp), %rdi
cmpq %rdi, %rbp
jne 0x2190ca
movq 0x18(%rsp), %rcx
movq (%r12,%rcx,8), %rsi
movq 0x8(%rsp), %rbp
movq (%rbp), %rcx
movq %rsi, %rdx
shrq %rdx
andl $0x1, %esi
imulq $0x78, %rdx, %rdx
addq %rcx, %rdx
leaq (%rsi,%rsi,2), %rsi
movq 0x10(%rdx,%rsi,8), %r15
testq %r15, %r15
je 0x2192c3
movq 0x20(%rdx,%rsi,8), %r13
addq $0x8, %r13
cmpl $0x0, 0x4(%r13)
js 0x2192b1
movl (%r13), %ecx
movq %rcx, %rdx
xorq $0x1, %rdx
cmpb $0x0, (%rbx,%rdx)
jne 0x2192b1
movq (%r14), %rdx
cmpq 0x8(%r14), %rdx
jne 0x2192a4
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movapd 0x30(%rsp), %xmm2
movq %rax, 0x10(%r14)
movl (%r13), %ecx
movq (%r14), %rdx
movl %ecx, %ecx
leaq 0x1(%rdx), %rsi
movq %rsi, (%r14)
movq %rcx, (%rax,%rdx,8)
addq $0x20, %r13
decq %r15
jne 0x219252
movq (%rbp), %rcx
movq 0x10(%rsp), %rdi
movq (%r12,%rdi,8), %rdx
movl %edx, %esi
notl %esi
shrq %rdx
andl $0x1, %esi
imulq $0x78, %rdx, %rdx
addq %rcx, %rdx
leaq (%rsi,%rsi,2), %rcx
movq 0x10(%rdx,%rcx,8), %r15
testq %r15, %r15
je 0x219357
movq 0x20(%rdx,%rcx,8), %r13
addq $0x8, %r13
cmpl $0x0, 0x4(%r13)
js 0x21934e
movl (%r13), %ecx
movq %rcx, %rdx
xorq $0x1, %rdx
cmpb $0x0, (%rbx,%rdx)
jne 0x21934e
movq (%r14), %rdx
cmpq 0x8(%r14), %rdx
jne 0x219341
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movapd 0x30(%rsp), %xmm2
movq %rax, 0x10(%r14)
movl (%r13), %ecx
movq (%r14), %rdx
movl %ecx, %ecx
leaq 0x1(%rdx), %rsi
movq %rsi, (%r14)
movq %rcx, (%rax,%rdx,8)
addq $0x20, %r13
decq %r15
jne 0x2192ef
movq 0x20(%rsp), %rdx
incq %rdx
cmpq 0x28(%rsp), %rdx
jne 0x219098
movq 0x40(%rsp), %rdx
jmp 0x21937d
xorpd %xmm1, %xmm1
mulsd %xmm1, %xmm0
movapd %xmm0, %xmm2
movq 0x90(%rsp), %rsi
cvttsd2si %xmm2, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x17f6f(%rip), %xmm2    # 0x231308
cvttsd2si %xmm2, %r15
andq %rcx, %r15
orq %rax, %r15
cmpq %rsi, %r15
cmovbeq %rsi, %r15
movq 0x98(%rsp), %rax
cmpq %rax, %r15
cmovaeq %rax, %r15
cmpq %rsi, %r15
cmovbeq %rsi, %r15
movq (%r14), %rax
testq %r15, %r15
setne 0x20(%rsp)
je 0x2195ac
movq $0x0, 0x18(%rsp)
movb $0x1, %r13b
movq %r15, 0x50(%rsp)
movb $0x1, 0x10(%rsp)
cmpq 0x48(%rsp), %rax
jbe 0x2195bc
movq 0x10(%r14), %rcx
leaq -0x1(%rax), %r11
movq %r11, (%r14)
movq -0x8(%rcx,%rax,8), %rcx
cmpb $0x0, (%rbx,%rcx)
je 0x219418
movq %r11, %rax
testb $0x1, 0x20(%rsp)
jne 0x2193e3
jmp 0x2195c3
movq (%rbp), %rsi
movq %rcx, %rdi
xorq $0x1, %rdi
movq %rcx, %rax
shrq %rax
movl %edi, %r9d
andl $0x1, %r9d
imulq $0x78, %rax, %rax
movq %rax, 0x30(%rsp)
leaq (%rsi,%rax), %r8
leaq (%r9,%r9,2), %r9
movq 0x10(%r8,%r9,8), %rax
testq %rax, %rax
je 0x21948f
movq 0x20(%r8,%r9,8), %r8
xorl %r9d, %r9d
movq %r9, %r10
shlq $0x5, %r10
cmpl $0x0, 0xc(%r8,%r10)
js 0x219487
addq %r8, %r10
movl 0x8(%r10), %r10d
xorq $0x1, %r10
movb (%rbx,%r10), %r10b
incq %r9
cmpq %rax, %r9
jae 0x21959b
testb %r10b, %r10b
jne 0x219453
jmp 0x21959b
incq %r9
cmpq %rax, %r9
jb 0x219453
movq 0x30(%rsp), %r8
movl 0x4(%rsi,%r8), %eax
movl %eax, 0x10(%rsp)
movb %r13b, (%rbx,%rdi)
movb %r13b, (%rbx,%rcx)
andl $0x1, %ecx
movq (%rbp), %rax
addq %r8, %rax
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rax,%rcx,8), %rbp
testq %rbp, %rbp
je 0x21954b
movq 0x20(%rax,%rcx,8), %r13
addq $0x8, %r13
xorl %r15d, %r15d
cmpl $0x0, 0x4(%r13)
js 0x21952d
incq %r15
movl (%r13), %ecx
movq %rcx, %rax
xorq $0x1, %rax
cmpb $0x0, (%rbx,%rax)
jne 0x21952d
movq (%r14), %rdx
movq 0x10(%r14), %rax
cmpq 0x8(%r14), %rdx
jne 0x219520
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r14)
movl (%r13), %ecx
movq (%r14), %rdx
movl %ecx, %ecx
leaq 0x1(%rdx), %rsi
movq %rsi, (%r14)
movq %rcx, (%rax,%rdx,8)
addq $0x20, %r13
decq %rbp
jne 0x2194cd
movb $0x1, %sil
testq %r15, %r15
movq 0x40(%rsp), %rdx
movq 0x50(%rsp), %r15
movb $0x1, %r13b
jne 0x219561
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x30(%rsp), %rcx
cmpb $0x0, 0x71(%rax,%rcx)
sete %sil
movl 0x10(%rsp), %eax
movq 0x18(%rsp), %rcx
addq %rax, %rcx
cmpq %r15, %rcx
setb 0x20(%rsp)
movq (%r14), %rax
movb %sil, 0x10(%rsp)
testb %sil, %sil
movq %rcx, 0x18(%rsp)
je 0x2198fe
cmpq %r15, %rcx
movq 0x8(%rsp), %rbp
jb 0x2193e3
jmp 0x2195c6
movq %r11, %rax
testb %r10b, %r10b
je 0x2193e3
jmp 0x21948f
movq $0x0, 0x18(%rsp)
movb $0x1, 0x10(%rsp)
jmp 0x2195c6
movb $0x1, 0x20(%rsp)
jmp 0x2195c6
movq %r11, %rax
cmpq 0x28(%rsp), %rdx
jae 0x2198ba
xorl %ebp, %ebp
movq 0x10(%r14), %rax
movq %rdx, 0x40(%rsp)
movl (%rax,%rdx,8), %ecx
movq (%rax,%rcx,8), %rcx
movl %ecx, %r13d
shrq $0x20, %rcx
cmpq %r13, %rcx
jae 0x219927
movq %rcx, 0x30(%rsp)
leaq 0x1(%rcx), %r15
cmpq %r13, %r15
jae 0x2196af
movq (%r14), %rcx
movq 0x10(%r14), %rax
cmpq 0x8(%r14), %rcx
jne 0x219639
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r14)
movq (%r14), %rcx
movq (%r12,%r15,8), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%r14)
movq %rdx, (%rax,%rcx,8)
movq (%r14), %rcx
cmpq 0x8(%r14), %rcx
jne 0x219678
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r14)
movq (%r14), %rcx
movq (%r12,%r15,8), %rdx
xorq $0x1, %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%r14)
movq %rdx, (%rax,%rcx,8)
movq (%r12,%r15,8), %rax
xorq $0x1, %rax
movb %bpl, (%rbx,%rax)
movq (%r12,%r15,8), %rax
movb %bpl, (%rbx,%rax)
incq %r15
cmpq %r15, %r13
jne 0x219605
movq 0x10(%r14), %rax
movq (%r14), %rcx
cmpq 0x8(%r14), %rcx
jne 0x2196df
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r14)
movq (%r14), %rcx
movq 0x30(%rsp), %r15
movq (%r12,%r15,8), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%r14)
movq %rdx, (%rax,%rcx,8)
movq (%r14), %rcx
cmpq 0x8(%r14), %rcx
jne 0x219723
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r14)
movq (%r14), %rcx
movq (%r12,%r13,8), %rdx
xorq $0x1, %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%r14)
movq %rdx, (%rax,%rcx,8)
movq (%r12,%r13,8), %rax
xorq $0x1, %rax
movb %bpl, (%rbx,%rax)
movq (%r12,%r15,8), %rax
movb %bpl, (%rbx,%rax)
movq 0x40(%rsp), %rdx
incq %rdx
cmpq 0x28(%rsp), %rdx
jne 0x2195d3
movq (%r14), %rax
movq 0x8(%rsp), %rbp
jmp 0x2198ba
movq 0x10(%r14), %rcx
leaq -0x1(%rax), %rdx
movq %rdx, (%r14)
movq -0x8(%rcx,%rax,8), %rdx
movq %rdx, %r15
xorq $0x1, %r15
xorl %eax, %eax
movb %al, (%rbx,%r15)
movb %al, (%rbx,%rdx)
movq (%rbp), %rax
movq %rdx, %rcx
shrq %rcx
andl $0x1, %edx
imulq $0x78, %rcx, %r13
leaq (%rax,%r13), %rcx
leaq (%rdx,%rdx,2), %rdx
movq 0x10(%rcx,%rdx,8), %rbp
testq %rbp, %rbp
je 0x219829
movq 0x20(%rcx,%rdx,8), %r12
addq $0x8, %r12
cmpl $0x0, 0x4(%r12)
js 0x219818
movl (%r12), %ecx
cmpb $0x0, (%rbx,%rcx)
jne 0x2197d5
movq %rcx, %rax
xorq $0x1, %rax
cmpb $0x0, (%rbx,%rax)
je 0x219818
movq (%r14), %rdx
movq 0x10(%r14), %rax
cmpq 0x8(%r14), %rdx
jne 0x21980d
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r14)
movl (%r12), %ecx
movq (%r14), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, (%r14)
movq %rcx, (%rax,%rdx,8)
addq $0x20, %r12
decq %rbp
jne 0x2197b6
movq 0x8(%rsp), %rax
movq (%rax), %rax
andl $0x1, %r15d
addq %r13, %rax
leaq (%r15,%r15,2), %rcx
movq 0x10(%rax,%rcx,8), %r15
testq %r15, %r15
movq 0x8(%rsp), %rbp
je 0x2198b7
movq 0x20(%rax,%rcx,8), %r12
addq $0x8, %r12
cmpl $0x0, 0x4(%r12)
js 0x2198ae
movl (%r12), %ecx
cmpb $0x0, (%rbx,%rcx)
jne 0x21986b
movq %rcx, %rax
xorq $0x1, %rax
cmpb $0x0, (%rbx,%rax)
je 0x2198ae
movq (%r14), %rdx
movq 0x10(%r14), %rax
cmpq 0x8(%r14), %rdx
jne 0x2198a3
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r14)
movl (%r12), %ecx
movq (%r14), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, (%r14)
movq %rcx, (%rax,%rdx,8)
addq $0x20, %r12
decq %r15
jne 0x21984c
movq (%r14), %rax
cmpq 0x48(%rsp), %rax
ja 0x21976a
movq 0x90(%rsp), %rcx
leaq -0x1(%rcx), %rdx
movq 0x18(%rsp), %rax
cmpq %rdx, %rax
cmovbq %rax, %rdx
incl %ecx
testb $0x1, 0x20(%rsp)
cmovnel %edx, %eax
cmpb $0x0, 0x10(%rsp)
cmovel %ecx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rbp
jmp 0x2195c6
leaq 0x2f079(%rip), %rdi     # 0x248988
leaq 0x2bcf3(%rip), %rsi     # 0x245609
leaq 0x2f071(%rip), %rcx     # 0x24898e
movl $0x2fdd, %edx           # imm = 0x2FDD
callq 0x2110
leaq 0x2f05a(%rip), %rdi     # 0x248988
leaq 0x2bcd4(%rip), %rsi     # 0x245609
leaq 0x2f052(%rip), %rcx     # 0x24898e
movl $0x301d, %edx           # imm = 0x301D
callq 0x2110
leaq 0x2f03b(%rip), %rdi     # 0x248988
leaq 0x2bcb5(%rip), %rsi     # 0x245609
leaq 0x2f033(%rip), %rcx     # 0x24898e
movl $0x2fe8, %edx           # imm = 0x2FE8
callq 0x2110