// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/rcut.cpp
// Function: debug_mb_edges_symm(mb_match_t*)
uint32_t debug_mb_edges_symm(mb_match_t *ma)
{
	uint32_t i, n = 0;
	mb_edge_t *t = NULL, *m = NULL;

	for (i = 0; i < ma->ma.n; ++i) {
		m = &ma->ma.a[i];
		if (ma_x(*m) == ma_y(*m))
		{
			fprintf(stderr, "ERROR-0-::%s\n", __func__);
			continue;
		}
		t = get_mb_edge(ma, ma_y(*m), ma_x(*m));
		if(!t)
		{
			fprintf(stderr, "ERROR-1-::%s\n", __func__);
			continue;
		} 

		if(m->w[0] != t->w[0])
		{
			fprintf(stderr, "\nERROR-2-::%s\n", __func__);
			fprintf(stderr, "ma_x(*m): %lu, ma_y(*m): %u\n", ma_x(*m), ma_y(*m));
			// fprintf(stderr, "m->w[0]: %ld, m->w[1]: %ld, m->w[2]: %ld, m->w[3]: %ld\n", 
			// 										m->w[0], m->w[1], m->w[2], m->w[3]);
			// fprintf(stderr, "t->w[0]: %ld, t->w[1]: %ld, t->w[2]: %ld, t->w[3]: %ld\n", 
			// 										t->w[0], t->w[1], t->w[2], t->w[3]);
			fprintf(stderr, "m->w[0]: %f, m->w[1]: %f, m->w[2]: %f, m->w[3]: %f\n", 
													m->w[0], m->w[1], m->w[2], m->w[3]);
			fprintf(stderr, "t->w[0]: %f, t->w[1]: %f, t->w[2]: %f, t->w[3]: %f\n", 
													t->w[0], t->w[1], t->w[2], t->w[3]);
		} 
		
		if(m->w[3] != t->w[3])
		{
			fprintf(stderr, "\nERROR-3-::%s\n", __func__);
			fprintf(stderr, "ma_x(*m): %lu, ma_y(*m): %u\n", ma_x(*m), ma_y(*m));
			// fprintf(stderr, "m->w[0]: %ld, m->w[1]: %ld, m->w[2]: %ld, m->w[3]: %ld\n", 
			// 										m->w[0], m->w[1], m->w[2], m->w[3]);
			// fprintf(stderr, "t->w[0]: %ld, t->w[1]: %ld, t->w[2]: %ld, t->w[3]: %ld\n", 
			// 										t->w[0], t->w[1], t->w[2], t->w[3]);
			fprintf(stderr, "m->w[0]: %f, m->w[1]: %f, m->w[2]: %f, m->w[3]: %f\n", 
													m->w[0], m->w[1], m->w[2], m->w[3]);
			fprintf(stderr, "t->w[0]: %f, t->w[1]: %f, t->w[2]: %f, t->w[3]: %f\n", 
													t->w[0], t->w[1], t->w[2], t->w[3]);
		} 
		
		if(m->w[1] != t->w[2])
		{
			fprintf(stderr, "\nERROR-4-::%s\n", __func__);
			fprintf(stderr, "ma_x(*m): %lu, ma_y(*m): %u\n", ma_x(*m), ma_y(*m));
			// fprintf(stderr, "m->w[0]: %ld, m->w[1]: %ld, m->w[2]: %ld, m->w[3]: %ld\n", 
			// 										m->w[0], m->w[1], m->w[2], m->w[3]);
			// fprintf(stderr, "t->w[0]: %ld, t->w[1]: %ld, t->w[2]: %ld, t->w[3]: %ld\n", 
			// 										t->w[0], t->w[1], t->w[2], t->w[3]);
			fprintf(stderr, "m->w[0]: %f, m->w[1]: %f, m->w[2]: %f, m->w[3]: %f\n", 
													m->w[0], m->w[1], m->w[2], m->w[3]);
			fprintf(stderr, "t->w[0]: %f, t->w[1]: %f, t->w[2]: %f, t->w[3]: %f\n", 
													t->w[0], t->w[1], t->w[2], t->w[3]);
		} 
		
		
		
		if(m->w[2] != t->w[1])
		{
			fprintf(stderr, "\nERROR-5-::%s\n", __func__);
			fprintf(stderr, "ma_x(*m): %lu, ma_y(*m): %u\n", ma_x(*m), ma_y(*m));
			// fprintf(stderr, "m->w[0]: %ld, m->w[1]: %ld, m->w[2]: %ld, m->w[3]: %ld\n", 
			// 										m->w[0], m->w[1], m->w[2], m->w[3]);
			// fprintf(stderr, "t->w[0]: %ld, t->w[1]: %ld, t->w[2]: %ld, t->w[3]: %ld\n", 
			// 										t->w[0], t->w[1], t->w[2], t->w[3]);
			fprintf(stderr, "m->w[0]: %f, m->w[1]: %f, m->w[2]: %f, m->w[3]: %f\n", 
													m->w[0], m->w[1], m->w[2], m->w[3]);
			fprintf(stderr, "t->w[0]: %f, t->w[1]: %f, t->w[2]: %f, t->w[3]: %f\n", 
													t->w[0], t->w[1], t->w[2], t->w[3]);
		} 
		
	}

	return n;
}

// Assembly:
cmpq $0x0, 0x18(%rdi)
je 0x160d6e
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x129509(%rip), %r12    # 0x289fe0
leaq 0xd0042(%rip), %rbp     # 0x230b20
xorl %ecx, %ecx
xorl %r13d, %r13d
movq 0x28(%rbx), %rax
leaq (%rcx,%rcx,4), %rcx
movq (%rax,%rcx,8), %rsi
movq %rsi, %rdx
shrq $0x20, %rdx
movl %esi, %edi
cmpq %rdi, %rdx
je 0x160b9f
movq 0x10(%rbx), %rdi
movl %esi, %esi
movq (%rdi,%rsi,8), %rsi
testl %esi, %esi
je 0x160b2e
movq %rsi, %rdi
shrq $0x20, %rdi
leaq (%rdi,%rdi,4), %rdi
leaq (%rax,%rdi,8), %r14
movl %esi, %esi
cmpl %edx, (%r14)
je 0x160b31
addq $0x28, %r14
decq %rsi
jne 0x160b20
xorl %r14d, %r14d
testq %r14, %r14
je 0x160ba6
leaq (%rax,%rcx,8), %r15
movsd 0x8(%r15), %xmm0
ucomisd 0x8(%r14), %xmm0
jne 0x160bad
jp 0x160bad
movsd 0x20(%r15), %xmm0
ucomisd 0x20(%r14), %xmm0
jne 0x160bc2
jp 0x160bc2
movsd 0x10(%r15), %xmm0
ucomisd 0x18(%r14), %xmm0
jne 0x160c4c
jp 0x160c4c
movsd 0x18(%r15), %xmm0
ucomisd 0x10(%r14), %xmm0
jne 0x160cd6
jp 0x160cd6
incl %r13d
movq %r13, %rcx
cmpq %r13, 0x18(%rbx)
ja 0x160ae3
jmp 0x160d60
callq 0x1fe60
jmp 0x160b8a
callq 0x1fe41
jmp 0x160b8a
leaq 0x8(%r15), %rsi
leaq 0x8(%r14), %rdx
movq %r15, %rdi
movq %r14, %rcx
callq 0x1fd97
jmp 0x160b4a
movq (%r12), %rdi
leaq 0xcff87(%rip), %rsi     # 0x230b54
leaq 0xcfeca(%rip), %rdx     # 0x230a9e
xorl %eax, %eax
callq 0x22b0
movq (%r12), %rdi
movq (%r15), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
leaq 0xcfedf(%rip), %rsi     # 0x230acf
xorl %eax, %eax
callq 0x22b0
movq (%r12), %rdi
movsd 0x8(%r15), %xmm0
movsd 0x10(%r15), %xmm1
movsd 0x18(%r15), %xmm2
movsd 0x20(%r15), %xmm3
leaq 0xcfed2(%rip), %rsi     # 0x230aec
movb $0x4, %al
callq 0x22b0
movq (%r12), %rdi
movsd 0x8(%r14), %xmm0
movsd 0x10(%r14), %xmm1
movsd 0x18(%r14), %xmm2
movsd 0x20(%r14), %xmm3
movq %rbp, %rsi
movb $0x4, %al
callq 0x22b0
jmp 0x160b5a
movq (%r12), %rdi
leaq 0xcff0c(%rip), %rsi     # 0x230b63
leaq 0xcfe40(%rip), %rdx     # 0x230a9e
xorl %eax, %eax
callq 0x22b0
movq (%r12), %rdi
movq (%r15), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
leaq 0xcfe55(%rip), %rsi     # 0x230acf
xorl %eax, %eax
callq 0x22b0
movq (%r12), %rdi
movsd 0x8(%r15), %xmm0
movsd 0x10(%r15), %xmm1
movsd 0x18(%r15), %xmm2
movsd 0x20(%r15), %xmm3
leaq 0xcfe48(%rip), %rsi     # 0x230aec
movb $0x4, %al
callq 0x22b0
movq (%r12), %rdi
movsd 0x8(%r14), %xmm0
movsd 0x10(%r14), %xmm1
movsd 0x18(%r14), %xmm2
movsd 0x20(%r14), %xmm3
movq %rbp, %rsi
movb $0x4, %al
callq 0x22b0
jmp 0x160b72
movq (%r12), %rdi
leaq 0xcfe91(%rip), %rsi     # 0x230b72
leaq 0xcfdb6(%rip), %rdx     # 0x230a9e
xorl %eax, %eax
callq 0x22b0
movq (%r12), %rdi
movq (%r15), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
leaq 0xcfdcb(%rip), %rsi     # 0x230acf
xorl %eax, %eax
callq 0x22b0
movq (%r12), %rdi
movsd 0x8(%r15), %xmm0
movsd 0x10(%r15), %xmm1
movsd 0x18(%r15), %xmm2
movsd 0x20(%r15), %xmm3
leaq 0xcfdbe(%rip), %rsi     # 0x230aec
movb $0x4, %al
callq 0x22b0
movq (%r12), %rdi
movsd 0x8(%r14), %xmm0
movsd 0x10(%r14), %xmm1
movsd 0x18(%r14), %xmm2
movsd 0x20(%r14), %xmm3
movq %rbp, %rsi
movb $0x4, %al
callq 0x22b0
jmp 0x160b8a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq