// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq 0x18(%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %r12
leaq 0x121a0(%r12), %r14
leaq 0x121d8(%r12), %r15
movq %r15, %rdi
callq 0x3d0ea
movq 0x121f8(%r12), %rdi
callq 0x2220
movq 0x12210(%r12), %rdi
callq 0x2220
xorl %r13d, %r13d
movl $0xa8, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x20e0
movq %r15, %rdi
callq 0x3d002
movq %r13, 0x12210(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x12200(%r12)
movl $0x1, %r14d
movl $0x1, %edi
movl $0x20, %esi
callq 0x2120
movq %rax, 0x121f8(%r12)
movq %r14, 0x121f0(%r12)
movq %r14, 0x121e8(%r12)
movq 0xe8(%r12), %rdi
callq 0x1289f7
callq 0x128954
movq %rax, 0xe8(%r12)
movq 0x12260(%r12), %rdi
callq 0x2220
movq %r13, 0x12260(%r12)
xorps %xmm0, %xmm0
movaps %xmm0, 0x12250(%r12)
testl %ebx, %ebx
jne 0x1c652c
leaq 0x48(%r12), %rbx
movq %rbx, %rdi
callq 0x3f1c8
xorps %xmm0, %xmm0
movups %xmm0, 0x88(%r12)
movups %xmm0, 0x78(%r12)
movups %xmm0, 0x68(%r12)
movups %xmm0, 0x58(%r12)
movups %xmm0, 0x48(%r12)
movq $0x0, 0x98(%r12)
movq %rbx, %rdi
callq 0x3f19e
movl $0xa0, %r15d
leaq (%r12,%r15), %rbx
movq %rbx, %rdi
callq 0x3d066
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%r12)
movaps %xmm0, 0xa0(%r12)
movq %rbx, %rdi
callq 0x3cf92
leaq 0x8(%r12), %rbx
movq %rbx, %rdi
callq 0x32d68
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r12)
movups %xmm0, 0x8(%r12)
movq %rbx, %rdi
callq 0x32e2d
leaq 0x28(%r12), %rbx
movq %rbx, %rdi
callq 0x32d68
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%r12)
movups %xmm0, 0x28(%r12)
movq %rbx, %rdi
callq 0x32e2d
leaq 0x2c0(%r12), %rbx
movq %rbx, %rdi
callq 0x477cf
movl $0x8d80, %edx           # imm = 0x8D80
movq %rbx, %rdi
xorl %esi, %esi
callq 0x20e0
movq %rbx, %rdi
callq 0x4767f
leaq 0x12268(%r12), %r14
movq 0x122a8(%r12), %rdi
callq 0x2220
movq 0x12338(%r12), %rdi
callq 0x2220
movq 0x12320(%r12), %rdi
callq 0x2220
movl $0x180, %edi            # imm = 0x180
callq 0x2280
movq %rax, %rbx
movl $0xd8, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x20e0
movq %rbx, 0x122a8(%r12)
movq %rbx, 0x122b0(%r12)
leaq 0x20(%rbx), %rax
movq %rax, 0x122b8(%r12)
leaq 0x40(%rbx), %rax
movq %rax, 0x122c0(%r12)
leaq 0x60(%rbx), %rax
movq %rax, 0x122c8(%r12)
leaq 0x80(%rbx), %rax
movq %rax, 0x122d0(%r12)
addq %rbx, %r15
movq %r15, 0x122d8(%r12)
leaq 0xc0(%rbx), %rax
movq %rax, 0x122e0(%r12)
leaq 0xe0(%rbx), %rax
movq %rax, 0x122e8(%r12)
leaq 0x100(%rbx), %rax
movq %rax, 0x122f0(%r12)
leaq 0x120(%rbx), %rax
movq %rax, 0x122f8(%r12)
leaq 0x140(%rbx), %rax
movq %rax, 0x12300(%r12)
addq $0x160, %rbx            # imm = 0x160
movq %rbx, 0x12308(%r12)
movabsq $0x3000000004, %rax     # imm = 0x3000000004
movq %rax, 0x1229c(%r12)
movl $0x7f, 0x122a4(%r12)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq