// File: /workspace/github_cpp_makefile_star2_O3/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 0x167652
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq 0x12dc1a(%rip), %r13    # 0x294fe0
xorl %eax, %eax
xorl %ebp, %ebp
movq 0x28(%rbx), %rdx
leaq (%rax,%rax,4), %rsi
movq (%rdx,%rsi,8), %rax
movl %eax, %ecx
shrq $0x20, %rax
cmpq %rcx, %rax
je 0x16747e
movq 0x10(%rbx), %rdi
movq (%rdi,%rcx,8), %rdi
movq %rdi, %rcx
andq %r12, %rcx
je 0x167413
leaq (%rdx,%rsi,8), %r15
shrq $0x20, %rdi
leaq (%rdi,%rdi,4), %rsi
leaq (%rdx,%rsi,8), %r14
cmpl %eax, (%r14)
je 0x16741a
addq $0x28, %r14
decq %rcx
jne 0x167405
callq 0x1f1c1
jmp 0x16746a
movsd 0x8(%r15), %xmm0
ucomisd 0x8(%r14), %xmm0
jne 0x167485
jp 0x167485
movsd 0x20(%r15), %xmm0
ucomisd 0x20(%r14), %xmm0
jne 0x16749a
jp 0x16749a
movsd 0x10(%r15), %xmm0
ucomisd 0x18(%r14), %xmm0
jne 0x167528
jp 0x167528
movsd 0x18(%r15), %xmm0
ucomisd 0x10(%r14), %xmm0
jne 0x1675b6
jp 0x1675b6
incl %ebp
movq %rbp, %rax
cmpq %rbp, 0x18(%rbx)
ja 0x1673ca
jmp 0x167644
callq 0x1f1e0
jmp 0x16746a
leaq 0x8(%r15), %rsi
leaq 0x8(%r14), %rdx
movq %r15, %rdi
movq %r14, %rcx
callq 0x1f117
jmp 0x16742a
movq (%r13), %rdi
leaq 0xd58ff(%rip), %rsi     # 0x23cda4
leaq 0xd5842(%rip), %rdx     # 0x23ccee
xorl %eax, %eax
callq 0x22b0
movq (%r13), %rdi
movq (%r15), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
leaq 0xd5857(%rip), %rsi     # 0x23cd1f
xorl %eax, %eax
callq 0x22b0
movq (%r13), %rdi
movsd 0x8(%r15), %xmm0
movsd 0x10(%r15), %xmm1
movsd 0x18(%r15), %xmm2
movsd 0x20(%r15), %xmm3
leaq 0xd584a(%rip), %rsi     # 0x23cd3c
movb $0x4, %al
callq 0x22b0
movq (%r13), %rdi
movsd 0x8(%r14), %xmm0
movsd 0x10(%r14), %xmm1
movsd 0x18(%r14), %xmm2
movsd 0x20(%r14), %xmm3
leaq 0xd5854(%rip), %rsi     # 0x23cd70
movb $0x4, %al
callq 0x22b0
jmp 0x16743a
movq (%r13), %rdi
leaq 0xd5880(%rip), %rsi     # 0x23cdb3
leaq 0xd57b4(%rip), %rdx     # 0x23ccee
xorl %eax, %eax
callq 0x22b0
movq (%r13), %rdi
movq (%r15), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
leaq 0xd57c9(%rip), %rsi     # 0x23cd1f
xorl %eax, %eax
callq 0x22b0
movq (%r13), %rdi
movsd 0x8(%r15), %xmm0
movsd 0x10(%r15), %xmm1
movsd 0x18(%r15), %xmm2
movsd 0x20(%r15), %xmm3
leaq 0xd57bc(%rip), %rsi     # 0x23cd3c
movb $0x4, %al
callq 0x22b0
movq (%r13), %rdi
movsd 0x8(%r14), %xmm0
movsd 0x10(%r14), %xmm1
movsd 0x18(%r14), %xmm2
movsd 0x20(%r14), %xmm3
leaq 0xd57c6(%rip), %rsi     # 0x23cd70
movb $0x4, %al
callq 0x22b0
jmp 0x167452
movq (%r13), %rdi
leaq 0xd5801(%rip), %rsi     # 0x23cdc2
leaq 0xd5726(%rip), %rdx     # 0x23ccee
xorl %eax, %eax
callq 0x22b0
movq (%r13), %rdi
movq (%r15), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
leaq 0xd573b(%rip), %rsi     # 0x23cd1f
xorl %eax, %eax
callq 0x22b0
movq (%r13), %rdi
movsd 0x8(%r15), %xmm0
movsd 0x10(%r15), %xmm1
movsd 0x18(%r15), %xmm2
movsd 0x20(%r15), %xmm3
leaq 0xd572e(%rip), %rsi     # 0x23cd3c
movb $0x4, %al
callq 0x22b0
movq (%r13), %rdi
movsd 0x8(%r14), %xmm0
movsd 0x10(%r14), %xmm1
movsd 0x18(%r14), %xmm2
movsd 0x20(%r14), %xmm3
leaq 0xd5738(%rip), %rsi     # 0x23cd70
movb $0x4, %al
callq 0x22b0
jmp 0x16746a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq