// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
movq 0xf0(%rdi), %rax
incq %rax
movq %rax, 0xf0(%rdi)
xorl %r15d, %r15d
xorl %edx, %edx
divq %rsi
testq %rdx, %rdx
jne 0x196d68
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 0x3f1c8
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 0x3d066
xorps %xmm0, %xmm0
movups %xmm0, 0xa8(%rbx)
movups %xmm0, 0x98(%rbx)
movq %r14, %rdi
callq 0x3cf92
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
movl $0x180, %edi            # imm = 0x180
callq 0x2280
movq %rax, 0x420(%rbx)
movq %rax, 0x428(%rbx)
leaq 0x20(%rax), %rcx
movq %rcx, 0x430(%rbx)
leaq 0x40(%rax), %rcx
movq %rcx, 0x438(%rbx)
leaq 0x60(%rax), %rcx
movq %rcx, 0x440(%rbx)
leaq 0x80(%rax), %rcx
movq %rcx, 0x448(%rbx)
leaq 0xa0(%rax), %rcx
movq %rcx, 0x450(%rbx)
leaq 0xc0(%rax), %rcx
movq %rcx, 0x458(%rbx)
leaq 0xe0(%rax), %rcx
movq %rcx, 0x460(%rbx)
movl $0x100, %r14d           # imm = 0x100
leaq (%rax,%r14), %rcx
movq %rcx, 0x468(%rbx)
leaq 0x120(%rax), %rcx
movq %rcx, 0x470(%rbx)
leaq 0x140(%rax), %rcx
movq %rcx, 0x478(%rbx)
addq $0x160, %rax            # imm = 0x160
movq %rax, 0x480(%rbx)
movabsq $0x3000000004, %rax     # imm = 0x3000000004
movq %rax, 0x414(%rbx)
movl $0x7f, 0x41c(%rbx)
movq 0xb8(%rbx), %rdi
callq 0x1288ff
callq 0x12885c
movq %rax, 0xb8(%rbx)
leaq 0xf8(%rbx), %rdi
callq 0x3c0c0
addq %rbx, %r14
movl $0x2a8, %edx            # imm = 0x2A8
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 0x17ffcd
movq %r15, 0x5b0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x5a0(%rbx)
movups %xmm0, 0x590(%rbx)
movups %xmm0, 0x580(%rbx)
movl $0x1, %edi
movl $0x20, %esi
callq 0x2120
movq %rax, %r14
movabsq $0x800000000000000, %rax # imm = 0x800000000000000
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