// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x1306ab(%rip), %rbp    # 0x252fe0
xorl %r13d, %r13d
movl %r13d, %r13d
cmpq %r13, 0x18(%rbx)
jbe 0x122c49
movq 0x28(%rbx), %r12
imulq $0x28, %r13, %r15
movq (%r12,%r15), %rsi
movq %rsi, %rdx
shrq $0x20, %rdx
movl %esi, %eax
cmpq %rax, %rdx
je 0x1229d5
movq %rbx, %rdi
callq 0x122c5a
testq %rax, %rax
je 0x1229e2
movq %rax, %r14
addq %r15, %r12
movsd 0x8(%r12), %xmm0
ucomisd 0x8(%rax), %xmm0
jne 0x1229fd
jp 0x1229fd
movsd 0x20(%r12), %xmm0
ucomisd 0x20(%r14), %xmm0
jne 0x122a90
jp 0x122a90
movsd 0x10(%r12), %xmm0
ucomisd 0x18(%r14), %xmm0
jne 0x122b23
jp 0x122b23
movsd 0x18(%r12), %xmm0
ucomisd 0x10(%r14), %xmm0
jne 0x122bb6
jp 0x122bb6
incl %r13d
jmp 0x122938
movq (%rbp), %rdi
leaq 0xcc1c0(%rip), %rsi     # 0x1eeba0
jmp 0x1229ed
movq (%rbp), %rdi
leaq 0xcc1d5(%rip), %rsi     # 0x1eebc2
leaq 0xcc1ba(%rip), %rdx     # 0x1eebae
xorl %eax, %eax
callq 0x22b0
jmp 0x1229cd
movq (%rbp), %rdi
leaq 0xcc1c8(%rip), %rsi     # 0x1eebd0
leaq 0xcc19f(%rip), %rdx     # 0x1eebae
xorl %eax, %eax
callq 0x22b0
movq (%rbp), %rdi
movq (%r12), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
leaq 0xcc1b3(%rip), %rsi     # 0x1eebdf
xorl %eax, %eax
callq 0x22b0
movq (%rbp), %rdi
movsd 0x8(%r12), %xmm0
movsd 0x10(%r12), %xmm1
movsd 0x18(%r12), %xmm2
movsd 0x20(%r12), %xmm3
leaq 0xcc1a2(%rip), %rsi     # 0x1eebfc
movb $0x4, %al
callq 0x22b0
movq (%rbp), %rdi
movsd 0x8(%r14), %xmm0
movsd 0x10(%r14), %xmm1
movsd 0x18(%r14), %xmm2
movsd 0x20(%r14), %xmm3
leaq 0xcc1ac(%rip), %rsi     # 0x1eec30
movb $0x4, %al
callq 0x22b0
jmp 0x122982
movq (%rbp), %rdi
leaq 0xcc1c9(%rip), %rsi     # 0x1eec64
leaq 0xcc10c(%rip), %rdx     # 0x1eebae
xorl %eax, %eax
callq 0x22b0
movq (%rbp), %rdi
movq (%r12), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
leaq 0xcc120(%rip), %rsi     # 0x1eebdf
xorl %eax, %eax
callq 0x22b0
movq (%rbp), %rdi
movsd 0x8(%r12), %xmm0
movsd 0x10(%r12), %xmm1
movsd 0x18(%r12), %xmm2
movsd 0x20(%r12), %xmm3
leaq 0xcc10f(%rip), %rsi     # 0x1eebfc
movb $0x4, %al
callq 0x22b0
movq (%rbp), %rdi
movsd 0x8(%r14), %xmm0
movsd 0x10(%r14), %xmm1
movsd 0x18(%r14), %xmm2
movsd 0x20(%r14), %xmm3
leaq 0xcc119(%rip), %rsi     # 0x1eec30
movb $0x4, %al
callq 0x22b0
jmp 0x12299b
movq (%rbp), %rdi
leaq 0xcc145(%rip), %rsi     # 0x1eec73
leaq 0xcc079(%rip), %rdx     # 0x1eebae
xorl %eax, %eax
callq 0x22b0
movq (%rbp), %rdi
movq (%r12), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
leaq 0xcc08d(%rip), %rsi     # 0x1eebdf
xorl %eax, %eax
callq 0x22b0
movq (%rbp), %rdi
movsd 0x8(%r12), %xmm0
movsd 0x10(%r12), %xmm1
movsd 0x18(%r12), %xmm2
movsd 0x20(%r12), %xmm3
leaq 0xcc07c(%rip), %rsi     # 0x1eebfc
movb $0x4, %al
callq 0x22b0
movq (%rbp), %rdi
movsd 0x8(%r14), %xmm0
movsd 0x10(%r14), %xmm1
movsd 0x18(%r14), %xmm2
movsd 0x20(%r14), %xmm3
leaq 0xcc086(%rip), %rsi     # 0x1eec30
movb $0x4, %al
callq 0x22b0
jmp 0x1229b4
movq (%rbp), %rdi
leaq 0xcc0c1(%rip), %rsi     # 0x1eec82
leaq 0xcbfe6(%rip), %rdx     # 0x1eebae
xorl %eax, %eax
callq 0x22b0
movq (%rbp), %rdi
movq (%r12), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
leaq 0xcbffa(%rip), %rsi     # 0x1eebdf
xorl %eax, %eax
callq 0x22b0
movq (%rbp), %rdi
movsd 0x8(%r12), %xmm0
movsd 0x10(%r12), %xmm1
movsd 0x18(%r12), %xmm2
movsd 0x20(%r12), %xmm3
leaq 0xcbfe9(%rip), %rsi     # 0x1eebfc
movb $0x4, %al
callq 0x22b0
movq (%rbp), %rdi
movsd 0x8(%r14), %xmm0
movsd 0x10(%r14), %xmm1
movsd 0x18(%r14), %xmm2
movsd 0x20(%r14), %xmm3
leaq 0xcbff3(%rip), %rsi     # 0x1eec30
movb $0x4, %al
callq 0x22b0
jmp 0x1229cd
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq