// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/ecovlp.cpp
// Function: refresh_ec_ovec_buf_t0(ec_ovec_buf_t0*, unsigned long)
inline void refresh_ec_ovec_buf_t0(ec_ovec_buf_t0 *z, uint64_t n)
{
    z->rr++;
    if((z->rr%n) == 0) {
        free(z->self_read.seq); memset(&(z->self_read), 0, sizeof(z->self_read));
        free(z->ovlp_read.seq); memset(&(z->ovlp_read), 0, sizeof(z->ovlp_read));

        destory_Candidates_list(&z->clist); memset(&(z->clist), 0, sizeof(z->clist));
        destory_overlap_region_alloc(&z->olist); memset(&(z->olist), 0, sizeof(z->olist)); init_overlap_region_alloc(&z->olist);

        kv_destroy(z->k_flag.a); kv_init(z->k_flag.a);
        kv_destroy(z->sp); kv_init(z->sp);
        kv_destroy(z->pidx); kv_init(z->pidx);
        kv_destroy(z->v64); kv_init(z->v64);
        kv_destroy(z->v32); kv_init(z->v32);
        kv_destroy(z->v16); kv_init(z->v16);
        kv_destroy(z->v8q); kv_init(z->v8q);
        kv_destroy(z->v8t); kv_init(z->v8t);

        destroy_bit_extz_t(&(z->exz)); init_bit_extz_t(&(z->exz), 31);

        ha_abuf_destroy(z->ab); z->ab = ha_abuf_init();

        destoryHaplotypeEvdience(&z->hap); memset(&(z->hap), 0, sizeof(z->hap)); InitHaplotypeEvdience(&z->hap);

        destroy_cns_gfa(&(z->cns)); memset(&(z->cns), 0, sizeof(z->cns)); z->cns.q = kdq_init(uint32_t);

        // z->rr = 1;
    }
}

// Assembly:
movq 0xf0(%rdi), %rax
incq %rax
movq %rax, 0xf0(%rdi)
xorl %edx, %edx
divq %rsi
testq %rdx, %rdx
je 0x18db86
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2220
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq 0x20(%rbx), %rdi
callq 0x2220
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
leaq 0x40(%rbx), %rdi
callq 0x3fd27
xorl %r15d, %r15d
movq %r15, 0x90(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x80(%rbx)
movups %xmm0, 0x70(%rbx)
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x40(%rbx)
leaq 0x98(%rbx), %r14
movq %r14, %rdi
callq 0x3db85
xorps %xmm0, %xmm0
movups %xmm0, 0xa8(%rbx)
movups %xmm0, 0x98(%rbx)
movq %r14, %rdi
callq 0x3dab1
movq 0x558(%rbx), %rdi
callq 0x2220
movq %r15, 0x558(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x548(%rbx)
movq 0x578(%rbx), %rdi
callq 0x2220
movq %r15, 0x578(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x568(%rbx)
movq 0x4b8(%rbx), %rdi
callq 0x2220
movq %r15, 0x4c8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x4b8(%rbx)
movq 0x4e0(%rbx), %rdi
callq 0x2220
movq %r15, 0x4e0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x4d0(%rbx)
movq 0x4f8(%rbx), %rdi
callq 0x2220
movq %r15, 0x4f8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x4e8(%rbx)
movq 0x510(%rbx), %rdi
callq 0x2220
movq %r15, 0x510(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x500(%rbx)
movq 0x528(%rbx), %rdi
callq 0x2220
movq %r15, 0x528(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x518(%rbx)
movq 0x540(%rbx), %rdi
callq 0x2220
leaq 0x3e0(%rbx), %r14
movq %r15, 0x540(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x530(%rbx)
movq 0x420(%rbx), %rdi
callq 0x2220
movq 0x4b0(%rbx), %rdi
callq 0x2220
movq 0x498(%rbx), %rdi
callq 0x2220
movl $0xd8, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x20e0
cmpl $0x7e, 0x41c(%rbx)
jg 0x18de4d
movl $0x30, 0x41c(%rbx)
cmpl $0x2f, 0x418(%rbx)
ja 0x18de43
movq 0x420(%rbx), %rdi
movl $0x180, %esi            # imm = 0x180
callq 0x2370
movq %rax, 0x420(%rbx)
movl 0x41c(%rbx), %edx
movl $0xaaaaaaab, %ecx       # imm = 0xAAAAAAAB
imulq %rdx, %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
shrq $0x23, %rcx
movl %ecx, 0x41c(%rbx)
movq %rax, 0x428(%rbx)
andl $-0x8, %edx
leaq (%rax,%rdx), %rsi
movq %rsi, 0x430(%rbx)
leal (%rcx,%rcx), %esi
leaq (%rax,%rsi,8), %rdi
movq %rdi, 0x438(%rbx)
leal (%rcx,%rcx,2), %edi
leaq (%rax,%rdi,8), %rdi
movq %rdi, 0x440(%rbx)
leal (,%rcx,4), %edi
leaq (%rax,%rdi,8), %r8
movq %r8, 0x448(%rbx)
leal (%rcx,%rcx,4), %r8d
leaq (%rax,%r8,8), %r9
movq %r9, 0x450(%rbx)
leal (%rsi,%rsi,2), %r9d
leaq (%rax,%r9,8), %r9
movq %r9, 0x458(%rbx)
leal (,%rcx,8), %r9d
subl %ecx, %r9d
leaq (%rax,%r9,8), %r9
movq %r9, 0x460(%rbx)
leaq (%rax,%rdx,8), %rdx
movq %rdx, 0x468(%rbx)
leal (%rcx,%rcx,8), %edx
leaq (%rax,%rdx,8), %rdx
movq %rdx, 0x470(%rbx)
leal (%rsi,%rsi,4), %edx
leaq (%rax,%rdx,8), %rdx
movq %rdx, 0x478(%rbx)
leal (%rcx,%r8,2), %edx
leaq (%rax,%rdx,8), %rax
movq %rax, 0x480(%rbx)
leal (%rdi,%rdi,2), %eax
movl %eax, 0x418(%rbx)
movl %ecx, 0x414(%rbx)
movl $0x7f, 0x41c(%rbx)
movq 0xb8(%rbx), %rdi
callq 0x122a2b
callq 0x122988
movq %rax, 0xb8(%rbx)
leaq 0xf8(%rbx), %r14
movq %r14, %rdi
callq 0x3cbda
movl $0x2e8, %edx            # imm = 0x2E8
movq %r14, %rdi
xorl %esi, %esi
callq 0x20e0
movl $0x64, 0x10c(%rbx)
movl $0x64, %edi
movl $0x18, %esi
callq 0x2120
movq %rax, 0xf8(%rbx)
leaq 0x110(%rbx), %rdi
movl $0x1ac, %edx            # imm = 0x1AC
xorl %esi, %esi
callq 0x20e0
movl %r15d, 0x348(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x350(%rbx)
movups %xmm0, 0x35c(%rbx)
movups %xmm0, 0x370(%rbx)
movl %r15d, 0x380(%rbx)
movups %xmm0, 0x388(%rbx)
movq $-0x1, 0x3b8(%rbx)
movq %r15, 0x3d0(%rbx)
movq $0x3e8, 0x3c8(%rbx) # imm = 0x3E8
movl $0xfa0, %edi            # imm = 0xFA0
callq 0x2280
movq %rax, 0x3d8(%rbx)
movq %r15, 0x3b0(%rbx)
movq $0xa, 0x3a8(%rbx)
movl $0xa, %edi
movl $0x1c, %esi
callq 0x2120
movq %rax, 0x3c0(%rbx)
leaq 0x580(%rbx), %rdi
callq 0x179361
xorps %xmm0, %xmm0
movups %xmm0, 0x5b0(%rbx)
movups %xmm0, 0x5a0(%rbx)
movups %xmm0, 0x590(%rbx)
movups %xmm0, 0x580(%rbx)
movl $0x1, %edi
movl $0x20, %esi
callq 0x2120
movq %rax, %r14
movabsq $0x3ffffffffffffff, %rax # imm = 0x3FFFFFFFFFFFFFF
andq (%r14), %rax
btsq $0x3b, %rax
movq %rax, (%r14)
movq $0x3, 0x10(%r14)
movl $0x10, %edi
callq 0x2280
movq %rax, 0x18(%r14)
movq %r14, 0x5b8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop