// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: clear_count_buf(ug_trans_t*, unsigned int, unsigned int)
void clear_count_buf(ug_trans_t *s, uint32_t tid, uint32_t free_count)
{
	// fprintf(stderr, "[M::%s]\n", __func__);
	ha_ovec_buf_t *b = s->hab[tid];
	destory_fake_cigar(&(b->tmp_region.f_cigar));
	free(b->tmp_region.w_list.a); free(b->tmp_region.w_list.c.a);
	memset(&(b->tmp_region), 0, sizeof(b->tmp_region));
	init_fake_cigar(&(b->tmp_region.f_cigar));
	memset(&(b->tmp_region.w_list), 0, sizeof(b->tmp_region.w_list));
	CALLOC(b->tmp_region.w_list.a, 1); b->tmp_region.w_list.n = b->tmp_region.w_list.m = 1;

	ha_abufl_destroy(b->abl); b->abl = ha_abufl_init();

	kv_destroy(b->sp); memset(&(b->sp), 0, sizeof((b->sp)));
	if(free_count) return;

	destory_Candidates_list(&b->clist); 
	memset((&(b->clist)), 0, sizeof(b->clist));
	init_Candidates_list(&b->clist);

    destory_overlap_region_alloc(&b->olist); 
	memset((&(b->olist)), 0, sizeof(b->olist));
	init_overlap_region_alloc(&b->olist);

	destory_UC_Read(&b->self_read);
	memset((&(b->self_read)), 0, sizeof(b->self_read));
	init_UC_Read(&b->self_read);

    destory_UC_Read(&b->ovlp_read);
	memset((&(b->ovlp_read)), 0, sizeof(b->ovlp_read));
	init_UC_Read(&b->ovlp_read);

	destory_Correct_dumy(&b->correct);
	memset((&(b->correct)), 0, sizeof(b->correct));
	init_Correct_dumy(&b->correct);

	destroy_bit_extz_t(&(b->exz));
	memset((&(b->exz)), 0, sizeof(b->exz));
	init_bit_extz_t(&(b->exz), 31);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq 0x18(%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rbx
leaq 0x121a0(%rbx), %r14
leaq 0x121d8(%rbx), %r15
movq %r15, %rdi
callq 0x119da
movq 0x121f8(%rbx), %rdi
callq 0x2220
movq 0x12210(%rbx), %rdi
callq 0x2220
movl $0xa8, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x20e0
movq %r15, %rdi
callq 0x1191f
xorps %xmm0, %xmm0
movups %xmm0, 0x12200(%rbx)
andq $0x0, 0x12210(%rbx)
pushq $0x1
popq %r14
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x2120
movq %rax, 0x121f8(%rbx)
movq %r14, 0x121f0(%rbx)
movq %r14, 0x121e8(%rbx)
movq 0xe8(%rbx), %rdi
callq 0xe3aac
callq 0xe3a10
movq %rax, 0xe8(%rbx)
movq 0x12260(%rbx), %rdi
callq 0x2220
xorps %xmm0, %xmm0
movaps %xmm0, 0x12250(%rbx)
andq $0x0, 0x12260(%rbx)
testl %ebp, %ebp
je 0x17ad98
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x48(%rbx), %r14
movq %r14, %rdi
callq 0x13d2f
xorps %xmm0, %xmm0
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x68(%rbx)
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x48(%rbx)
andq $0x0, 0x98(%rbx)
movq %r14, %rdi
callq 0x13d08
leaq 0xa0(%rbx), %r14
movq %r14, %rdi
callq 0x11985
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rbx)
movaps %xmm0, 0xa0(%rbx)
movq %r14, %rdi
callq 0x1189e
leaq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x6b07
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movups %xmm0, 0x8(%rbx)
movq %r14, %rdi
callq 0x6bd1
leaq 0x28(%rbx), %r14
movq %r14, %rdi
callq 0x6b07
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x28(%rbx)
movq %r14, %rdi
callq 0x6bd1
leaq 0x2c0(%rbx), %r14
movq %r14, %rdi
callq 0x1b400
movl $0x8d80, %edx           # imm = 0x8D80
movq %r14, %rdi
xorl %esi, %esi
callq 0x20e0
movq %r14, %rdi
callq 0x1b29e
addq $0x12268, %rbx          # imm = 0x12268
movq %rbx, %rdi
callq 0x108b7
movl $0xd8, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x20e0
pushq $0x1f
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x10710