// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Overlaps.cpp
// Function: asg_arc_del_short_diploid_by_length_trio(asg_t*, float, int, ma_hit_t_alloc*, long long, unsigned int, int, int, int, R_to_U*)
int asg_arc_del_short_diploid_by_length_trio(asg_t *g, float drop_ratio, int max_ext, 
ma_hit_t_alloc* reverse_sources, long long miniedgeLen, uint32_t stops_threshold,
int if_skip_bubble, int if_drop, int if_check_hap, R_to_U* ruIndex)
{
    double startTime = Get_T();
    kvec_t(uint64_t) b;
    memset(&b, 0, sizeof(b));

	uint32_t v, n_vtx = g->n_seq * 2;
    long long n_cut = 0;
    
    for (v = 0; v < n_vtx; ++v) 
    {
        if(if_skip_bubble && g->seq_vis[v] != 0) continue;
        if(if_drop && g->seq[v>>1].c == ALTER_LABLE) continue;
        asg_arc_t *av = asg_arc_a(g, v);
        uint32_t nv = asg_arc_n(g, v);
        if (nv < 2) continue;
        uint64_t i;
        for (i = 0; i < nv; ++i)
        {
            kv_push(uint64_t, b, (uint64_t)((uint64_t)av[i].ol << 32 | (av - g->arc + i)));   
        }
	}

    radix_sort_arch64(b.a, b.a + b.n);

    uint64_t k;
    for (k = 0; k < b.n; k++)
    {
        asg_arc_t *a = &g->arc[(uint32_t)b.a[k]];
		///v is self id, w is the id of another end
		uint32_t i, iv, iw, v = (a->ul)>>32, w = a->v^1, to_del = 0;
		uint32_t nv = asg_arc_n(g, v), nw = asg_arc_n(g, w), kv, kw;
		uint32_t ov_max = 0, ow_max = 0, ov_max_i = 0, ow_max_i = 0, trio_flag, non_trio_flag;
		asg_arc_t *av, *aw;
		///nv must be >= 2
		if (nv == 1 && nw == 1) continue;
        av = asg_arc_a(g, v);
		aw = asg_arc_a(g, w);
        kv = get_real_length(g, v, NULL);
        kw = get_real_length(g, w, NULL);
        if (kv <= 1 && kw <= 1) continue;
        trio_flag = get_tip_trio_infor(g, v^1);
        non_trio_flag = (uint32_t)-1;
        if(trio_flag == FATHER) non_trio_flag = MOTHER;
        if(trio_flag == MOTHER) non_trio_flag = FATHER;
        
        ///calculate the longest edge for v and w
		for (i = 0, kv = 0; i < nv; ++i) {
			if (av[i].del) continue;
            kv++; 
            if(get_tip_trio_infor(g, av[i].v) == non_trio_flag) continue;
			if (ov_max < av[i].ol) ov_max = av[i].ol, ov_max_i = i;
            ///kv++; 
		}
		if (kv >= 2 && a->ol > ov_max * drop_ratio) continue;

		for (i = 0, kw = 0; i < nw; ++i) {
			if (aw[i].del) continue;
            kw++;
            if (get_tip_trio_infor(g, aw[i].v) == non_trio_flag) continue;
			if (ow_max < aw[i].ol) ow_max = aw[i].ol, ow_max_i = i;
            ///kw++;
		}
		if (kw >= 2 && a->ol > ow_max * drop_ratio) continue;

        if (kv <= 1 && kw <= 1) continue;

        ///to see which one is the current edge (from v and w)
		for (iv = 0; iv < nv; ++iv)
			if (av[iv].v == (w^1)) break;
		for (iw = 0; iw < nw; ++iw)
			if (aw[iw].v == (v^1)) break;
        ///if one edge has been deleted, it should be deleted in both direction
        if (av[iv].del && aw[iw].del) continue;

        ///kv and kw is the avialiable 
		if (kv > 1 && kw > 1) {
			if (a->ol < ov_max * drop_ratio && a->ol < ow_max * drop_ratio)
				to_del = 1;
            if(if_check_hap == 1 && to_del == 1)
            {
                
                if(check_if_diploid_primary_complex(av[ov_max_i].v, w^1, g, reverse_sources, 
                miniedgeLen, stops_threshold, if_drop, ruIndex) == 1 
                   || 
                   check_if_diploid_primary_complex(aw[ow_max_i].v, v^1, g, reverse_sources, 
                miniedgeLen, stops_threshold, if_drop, ruIndex) == 1)
                {
                    to_del = 0;
                }
            }
        
		} else if (kw == 1) {
			if (asg_topocut_aux(g, w^1, max_ext) < max_ext) to_del = 1;
            ///kv > 1
            if(if_check_hap == 1 && to_del == 1)
            {
                if(check_if_diploid_primary_complex(av[ov_max_i].v, w^1, g, reverse_sources, 
                miniedgeLen, stops_threshold, if_drop, ruIndex) == 1)
                {
                    to_del = 0;
                }
            }
		} else if (kv == 1) {
			if (asg_topocut_aux(g, v^1, max_ext) < max_ext) to_del = 1;
            ///kw > 1
            if(if_check_hap == 1 && to_del == 1)
            {
                if(check_if_diploid_primary_complex(aw[ow_max_i].v, v^1, g, reverse_sources, 
                miniedgeLen, stops_threshold, if_drop, ruIndex) == 1)
                {
                    to_del = 0;
                }
            }
		}
		if (to_del)
			av[iv].del = aw[iw].del = 1, ++n_cut;
        
    }
    
    free(b.a);
	if (n_cut) 
    {
		asg_cleanup(g);
		asg_symm(g);
	}

    if(VERBOSE >= 1)
    {
        fprintf(stderr, "[M::%s] removed %lld short overlaps\n", __func__, n_cut);
        fprintf(stderr, "[M::%s] takes %0.2f s\n\n", __func__, Get_T()-startTime);
    }
	return n_cut;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %r9d, 0x48(%rsp)
movl %r8d, %r15d
movq %rcx, %rbp
movq %rdx, %rbx
movl %esi, 0x34(%rsp)
movss %xmm0, 0x50(%rsp)
movq %rdi, %r13
callq 0x300fc
movl 0x14(%r13), %eax
addl %eax, %eax
movq %r13, 0x38(%rsp)
movl %r15d, 0x54(%rsp)
movq %rbp, 0xa8(%rsp)
movq %rbx, 0xa0(%rsp)
je 0xabb5a
movl %eax, %eax
movq %rax, 0x60(%rsp)
xorl %esi, %esi
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movabsq $-0x5555555555555555, %r9 # imm = 0xAAAAAAAAAAAAAAAB
movq $0x0, 0x68(%rsp)
xorl %eax, %eax
xorl %edi, %edi
cmpl $0x0, 0x48(%rsp)
movq %rsi, 0x28(%rsp)
je 0xaba62
movq 0x30(%r13), %rcx
cmpb $0x0, (%rcx,%rsi)
jne 0xabb35
cmpl $0x0, 0x110(%rsp)
je 0xaba7f
movq 0x20(%r13), %rcx
movl %esi, %edx
shrl %edx
cmpb $0x1, 0x4(%rcx,%rdx,8)
je 0xabb35
movq 0x28(%r13), %rcx
movq (%rcx,%rsi,8), %rcx
testl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
je 0xabb35
movq %rcx, %r12
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
andq %rdx, %r12
je 0xabb35
movq 0x8(%r13), %rdx
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rdx,%rcx,8), %r14
leaq (%rdx,%rcx,8), %r15
addq $0xc, %r15
xorl %ebx, %ebx
cmpq %rax, 0x68(%rsp)
jne 0xabaf9
leaq (%rax,%rax), %r13
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %r13
leaq (,%r13,8), %rsi
movq %r9, %rbp
callq 0x2370
movq %rbp, %r9
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movq %rax, %rdi
movq %r13, %rax
movq 0x38(%rsp), %r13
movl (%r15), %ecx
andl %r8d, %ecx
shlq $0x20, %rcx
movq %r14, %rdx
subq 0x8(%r13), %rdx
sarq $0x3, %rdx
imulq %r9, %rdx
addq %rbx, %rdx
orq %rcx, %rdx
movq 0x68(%rsp), %rcx
movq %rdx, (%rdi,%rcx,8)
incq %rcx
movq %rcx, 0x68(%rsp)
incq %rbx
addq $0x18, %r15
cmpq %rbx, %r12
jne 0xababe
movq 0x28(%rsp), %rsi
incq %rsi
cmpq 0x60(%rsp), %rsi
movq 0xa8(%rsp), %rbp
movq 0xa0(%rsp), %rbx
jne 0xaba48
jmp 0xabb65
xorl %edi, %edi
movq $0x0, 0x68(%rsp)
movq 0x68(%rsp), %r14
leaq (%rdi,%r14,8), %rsi
movq %rdi, 0x28(%rsp)
callq 0x9d53f
testq %r14, %r14
je 0xac29a
movq $0x0, 0x90(%rsp)
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
xorl %edx, %edx
movq 0x28(%rsp), %rdi
movq 0x8(%r13), %r8
movq 0x28(%r13), %rax
movl (%rdi,%rdx,8), %ecx
leaq (%rcx,%rcx,2), %rcx
movq (%r8,%rcx,8), %rsi
shrq $0x20, %rsi
movq %r8, 0x20(%rsp)
movq %rcx, 0x58(%rsp)
movl 0x8(%r8,%rcx,8), %ecx
movq %rcx, 0x78(%rsp)
xorq $0x1, %rcx
movq %rsi, %r10
movq (%rax,%rsi,8), %rsi
movq (%rax,%rcx,8), %rcx
movq %rsi, 0xb8(%rsp)
cmpl $0x1, %esi
jne 0xabbea
cmpl $0x1, %ecx
je 0xac235
movq %rcx, 0x88(%rsp)
movq %rdx, 0x40(%rsp)
movq (%rax,%r10,8), %rdx
xorl %eax, %eax
movq %rdx, %rsi
movl $0x0, %ecx
andq %r14, %rsi
je 0xabc43
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rcx
movq 0x20(%rsp), %rdx
leaq (%rdx,%rcx,8), %rdx
addq $0xc, %rdx
shlq $0x3, %rsi
leaq (%rsi,%rsi,2), %rsi
xorl %r9d, %r9d
xorl %ecx, %ecx
movl (%rdx,%r9), %r8d
notl %r8d
shrl $0x1f, %r8d
addl %r8d, %ecx
addq $0x18, %r9
cmpq %r9, %rsi
jne 0xabc2c
movq 0x88(%rsp), %rsi
movq %rsi, %rdx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
movq %rdx, 0x80(%rsp)
andq %r14, %rsi
movq %rsi, 0x60(%rsp)
je 0xabcaa
movq 0x20(%rsp), %rax
movq 0x80(%rsp), %rdx
leaq (%rax,%rdx,8), %rdx
addq $0xc, %rdx
movq 0x60(%rsp), %rax
leaq (,%rax,8), %rax
leaq (%rax,%rax,2), %rsi
xorl %r9d, %r9d
xorl %eax, %eax
movl (%rdx,%r9), %r8d
notl %r8d
shrl $0x1f, %r8d
addl %r8d, %eax
addq $0x18, %r9
cmpq %r9, %rsi
jne 0xabc93
orl %ecx, %eax
cmpl $0x2, %eax
jb 0xac230
movq 0xb8(%rsp), %r14
movq %r14, %rax
shrq $0x20, %rax
leaq (%rax,%rax,2), %r15
movq %r10, %rsi
xorl $0x1, %esi
movq %r13, %rdi
movq %rsi, 0x70(%rsp)
callq 0xab815
xorl %ecx, %ecx
cmpb $0x1, %al
sete %cl
leal (%rcx,%rcx,2), %ecx
decl %ecx
cmpb $0x2, %al
movl $0x1, %eax
cmovel %eax, %ecx
movl %ecx, 0x48(%rsp)
testl %r14d, %r14d
movq %r15, 0xb0(%rsp)
je 0xabdb4
movl %r14d, %ebp
movq 0x20(%rsp), %rax
leaq (%rax,%r15,8), %rbx
addq $0xc, %rbx
xorl %r15d, %r15d
movl $0x0, 0x18(%rsp)
xorl %r13d, %r13d
xorl %r12d, %r12d
movl 0x34(%rsp), %edx
movq 0x28(%rsp), %rdi
movl (%rbx), %r14d
testl %r14d, %r14d
js 0xabd6d
incl %r12d
movl -0x4(%rbx), %esi
movq 0x38(%rsp), %rdi
callq 0xab815
movzbl %al, %eax
cmpl %eax, 0x48(%rsp)
je 0xabd64
cmpl %r14d, %r13d
cmovbel %r14d, %r13d
movl 0x18(%rsp), %eax
cmovbl %r15d, %eax
movl %eax, 0x18(%rsp)
movl 0x34(%rsp), %edx
movq 0x28(%rsp), %rdi
incq %r15
addq $0x18, %rbx
cmpq %r15, %rbp
jne 0xabd30
cvtsi2ss %r13d, %xmm0
movaps %xmm0, 0xc0(%rsp)
movl 0x18(%rsp), %eax
movq %rax, 0x98(%rsp)
movq 0x38(%rsp), %r13
movl 0x54(%rsp), %r15d
movq 0xa8(%rsp), %rbp
movq 0xa0(%rsp), %rbx
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0xabde2
xorps %xmm0, %xmm0
movaps %xmm0, 0xc0(%rsp)
xorl %r12d, %r12d
movq $0x0, 0x98(%rsp)
movl 0x34(%rsp), %edx
movq 0x28(%rsp), %rdi
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl 0x54(%rsp), %r15d
movq 0x20(%rsp), %rax
movq 0x58(%rsp), %rsi
leaq (%rax,%rsi,8), %rax
cmpl $0x2, %r12d
movq %r12, 0x18(%rsp)
movq %rax, 0x58(%rsp)
jb 0xabe37
movq 0x58(%rsp), %rax
movl 0xc(%rax), %eax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl %ecx, %eax
movq 0x18(%rsp), %r12
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movq 0x58(%rsp), %rax
movaps 0xc0(%rsp), %xmm1
mulss 0x50(%rsp), %xmm1
ucomiss %xmm1, %xmm0
ja 0xac230
cmpl $0x0, 0x88(%rsp)
je 0xabee7
movq 0x20(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq (%rax,%rcx,8), %rbx
addq $0xc, %rbx
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %esi, %esi
movl (%rbx), %ebp
testl %ebp, %ebp
js 0xabe9d
incl %esi
movq %rsi, %r14
movl -0x4(%rbx), %esi
movq 0x38(%rsp), %rdi
callq 0xab815
movzbl %al, %eax
cmpl %eax, 0x48(%rsp)
je 0xabe91
cmpl %ebp, %r13d
cmovbel %ebp, %r13d
cmovbl %r15d, %r12d
movl 0x34(%rsp), %edx
movq 0x28(%rsp), %rdi
movq %r14, %rsi
incq %r15
addq $0x18, %rbx
cmpq %r15, 0x60(%rsp)
jne 0xabe65
xorps %xmm0, %xmm0
cvtsi2ss %r13d, %xmm0
movl %r12d, %eax
movq %rax, 0x48(%rsp)
movq 0x38(%rsp), %r13
movl 0x54(%rsp), %r15d
movq 0xa8(%rsp), %rbp
movq 0xa0(%rsp), %rbx
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movq 0x18(%rsp), %r12
movq 0x58(%rsp), %rax
jmp 0xabef5
xorps %xmm0, %xmm0
xorl %esi, %esi
movq $0x0, 0x48(%rsp)
cmpl $0x2, %esi
jb 0xabf24
movl 0xc(%rax), %eax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl %ecx, %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
movaps %xmm0, %xmm2
mulss 0x50(%rsp), %xmm2
ucomiss %xmm2, %xmm1
ja 0xac230
movq 0x18(%rsp), %rax
jmp 0xabf27
movl %r12d, %eax
orl %esi, %eax
cmpl $0x2, %eax
jb 0xac230
movq %rsi, %r13
movq 0xb8(%rsp), %r10
testl %r10d, %r10d
je 0xabf81
movq 0x20(%rsp), %rax
movq 0xb0(%rsp), %r11
leaq (%rax,%r11,8), %rcx
addq $0x8, %rcx
xorl %eax, %eax
movq 0x70(%rsp), %r8
movq 0x78(%rsp), %rsi
movq 0x88(%rsp), %r9
cmpl %esi, (%rcx)
je 0xabf7d
incl %eax
addq $0x18, %rcx
cmpl %eax, %r10d
jne 0xabf6b
movl %r10d, %eax
movl %eax, %eax
jmp 0xabf98
xorl %eax, %eax
movq 0x70(%rsp), %r8
movq 0x88(%rsp), %r9
movq 0xb0(%rsp), %r11
testl %r9d, %r9d
je 0xabfcc
movq 0x20(%rsp), %rcx
movq 0x80(%rsp), %rsi
leaq (%rcx,%rsi,8), %rsi
addq $0x8, %rsi
xorl %ecx, %ecx
cmpl %r8d, (%rsi)
je 0xabfc7
incl %ecx
addq $0x18, %rsi
cmpl %ecx, %r9d
jne 0xabfb4
movl %r9d, %ecx
movl %ecx, %r8d
jmp 0xabfcf
xorl %r8d, %r8d
movq 0x20(%rsp), %rcx
leaq (%rcx,%r11,8), %r9
movq 0x80(%rsp), %rsi
leaq (%rcx,%rsi,8), %rsi
leaq (%rax,%rax,2), %rcx
cmpl $0x0, 0xc(%r9,%rcx,8)
jns 0xabfff
leaq (%r8,%r8,2), %rax
cmpl $0x0, 0xc(%rsi,%rax,8)
js 0xac22b
movq %rcx, 0x60(%rsp)
cmpl $0x2, %r13d
setb %al
cmpl $0x2, 0x18(%rsp)
setb %cl
orb %al, %cl
jne 0xac0dc
movq 0x58(%rsp), %rax
movl 0xc(%rax), %eax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl %ecx, %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
movss 0x50(%rsp), %xmm2
movaps 0xc0(%rsp), %xmm3
mulss %xmm2, %xmm3
mulss %xmm2, %xmm0
movaps %xmm1, %xmm2
cmpltps %xmm0, %xmm2
cmpltps %xmm3, %xmm1
andps %xmm2, %xmm1
movd %xmm1, %ecx
cmpl $0x1, 0x118(%rsp)
jne 0xac1f8
testb $0x1, %cl
movq 0x120(%rsp), %rdx
je 0xac1f8
movq %rsi, %r13
movq %r8, 0x18(%rsp)
movq 0x98(%rsp), %rax
leaq (%rax,%rax,2), %rax
movq %r9, 0x20(%rsp)
movl 0x8(%r9,%rax,8), %edi
movq %rdx, 0x8(%rsp)
movq 0x78(%rsp), %rsi
movq %rbx, %r14
movq 0x38(%rsp), %rbx
movq %rdx, %r12
movq %rbx, %rdx
movq %r14, %rcx
movq %rbp, %r8
movl %r15d, %r9d
callq 0xa9f5e
cmpq $0x1, %rax
jne 0xac245
movq %rbx, %r13
movq %r14, %rbx
movq 0x28(%rsp), %rdi
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0xac230
cmpl $0x1, %r13d
jne 0xac14d
movq %r9, 0x20(%rsp)
movq %rsi, %r13
movq %r8, 0x18(%rsp)
movq 0x38(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0xaa77e
movl 0x34(%rsp), %edx
cmpl %edx, %eax
setl %cl
cmpl $0x1, 0x118(%rsp)
jne 0xac1e6
cmpl %edx, %eax
movq 0x28(%rsp), %rdi
movq 0x120(%rsp), %rdx
movq 0x18(%rsp), %r8
movq %r13, %rsi
movq 0x20(%rsp), %r9
jge 0xac1f8
movq 0x98(%rsp), %rax
leaq (%rax,%rax,2), %rax
leaq (%r9,%rax,8), %rax
addq $0x8, %rax
jmp 0xac1c0
cmpl $0x1, 0x18(%rsp)
jne 0xac22b
movq %r9, 0x20(%rsp)
movq %rsi, %r13
movq %r8, 0x18(%rsp)
movq 0x38(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0xaa77e
movl 0x34(%rsp), %edx
cmpl %edx, %eax
setl %cl
cmpl $0x1, 0x118(%rsp)
jne 0xac1e6
cmpl %edx, %eax
movq 0x28(%rsp), %rdi
movq 0x120(%rsp), %rdx
movq 0x18(%rsp), %r8
movq %r13, %rsi
movq 0x20(%rsp), %r9
jge 0xac1f8
movq 0x48(%rsp), %rax
leaq (%rax,%rax,2), %rax
leaq (%rsi,%rax,8), %rax
addq $0x8, %rax
movq 0x70(%rsp), %rcx
movq %rcx, 0x78(%rsp)
movl (%rax), %edi
movq %rdx, 0x8(%rsp)
movq 0x78(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %rbx, %rcx
movq %rbp, %r8
movl %r15d, %r9d
callq 0xa9f5e
cmpq $0x1, %rax
setne %cl
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %r8
movq %r13, %rsi
movq 0x20(%rsp), %r9
testb $0x1, %cl
movq 0x40(%rsp), %rdx
je 0xac224
movq 0x60(%rsp), %rax
leaq (%r9,%rax,8), %rax
addq $0xc, %rax
leaq (%r8,%r8,2), %rcx
orb $-0x80, 0xf(%rsi,%rcx,8)
orb $-0x80, 0x3(%rax)
incq 0x90(%rsp)
movq 0x38(%rsp), %r13
jmp 0xac235
movq 0x38(%rsp), %r13
movq 0x40(%rsp), %rdx
incq %rdx
cmpq 0x68(%rsp), %rdx
jne 0xabb9a
jmp 0xac2ab
movq 0x48(%rsp), %rax
leaq (%rax,%rax,2), %rax
movl 0x8(%r13,%rax,8), %edi
movq %r12, 0x8(%rsp)
movq 0x70(%rsp), %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %rbp, %r8
movl %r15d, %r9d
callq 0xa9f5e
movq %r13, %rsi
cmpq $0x1, %rax
movq %r14, %rbx
movq 0x28(%rsp), %rdi
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movq 0x40(%rsp), %rdx
movq 0x18(%rsp), %r8
movq 0x20(%rsp), %r9
jne 0xac202
jmp 0xac224
movq $0x0, 0x90(%rsp)
movq 0x28(%rsp), %rdi
callq 0x2220
movq 0x90(%rsp), %rbx
testq %rbx, %rbx
je 0xac2da
movq %r13, %rdi
callq 0xa02fa
movq %r13, %rdi
callq 0xa0333
movq %r13, %rdi
callq 0xa03e9
orb $-0x80, 0x17(%r13)
movl %ebx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq