// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9HashmapCmp
JX9_PRIVATE sxi32 jx9HashmapCmp(
	jx9_hashmap *pLeft,  /* Left hashmap */
	jx9_hashmap *pRight, /* Right hashmap */
	int bStrict          /* TRUE for strict comparison */
	)
{
	jx9_hashmap_node *pLe, *pRe;
	sxi32 rc;
	sxu32 n;
	if( pLeft == pRight ){
		/* Same hashmap instance. This can easily happen since hashmaps are passed by reference.
		 * Unlike the  engine.
		 */
		return 0;
	}
	if( pLeft->nEntry != pRight->nEntry ){
		/* Must have the same number of entries */
		return pLeft->nEntry > pRight->nEntry ? 1 : -1;
	}
	/* Point to the first inserted entry of the left hashmap */
	pLe = pLeft->pFirst;
	pRe = 0; /* cc warning */
	/* Perform the comparison */
	n = pLeft->nEntry;
	for(;;){
		if( n < 1 ){
			break;
		}
		if( pLe->iType == HASHMAP_INT_NODE){
			/* Int key */
			rc = HashmapLookupIntKey(&(*pRight), pLe->xKey.iKey, &pRe);
		}else{
			SyBlob *pKey = &pLe->xKey.sKey;
			/* Blob key */
			rc = HashmapLookupBlobKey(&(*pRight), SyBlobData(pKey), SyBlobLength(pKey), &pRe);
		}
		if( rc != SXRET_OK ){
			/* No such entry in the right side */
			return 1;
		}
		rc = 0;
		if( bStrict ){
			/* Make sure, the keys are of the same type */
			if( pLe->iType != pRe->iType ){
				rc = 1;
			}
		}
		if( !rc ){
			/* Compare nodes */
			rc = HashmapNodeCmp(pLe, pRe, bStrict);
		}
		if( rc != 0 ){
			/* Nodes key/value differ */
			return rc;
		}
		/* Point to the next entry */
		pLe = pLe->pPrev; /* Reverse link */
		n--;
	}
	return 0; /* Hashmaps are equals */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x78d09
movl $0x0, -0x4(%rbp)
jmp 0x78e33
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x2c(%rcx), %eax
je 0x78d3e
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %edx
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x1, %ecx
cmpl %esi, %edx
cmoval %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x78e33
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x38(%rbp)
cmpl $0x1, -0x38(%rbp)
jae 0x78d67
jmp 0x78e2c
movq -0x28(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jne 0x78d8b
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x30(%rbp), %rdx
callq 0x702a0
movl %eax, -0x34(%rbp)
jmp 0x78db6
movq -0x28(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x40(%rbp), %rax
movl 0x10(%rax), %edx
leaq -0x30(%rbp), %rcx
callq 0x70050
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x78dc5
movl $0x1, -0x4(%rbp)
jmp 0x78e33
movl $0x0, -0x34(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x78deb
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x30(%rbp), %rcx
cmpl 0x8(%rcx), %eax
je 0x78de9
movl $0x1, -0x34(%rbp)
jmp 0x78deb
cmpl $0x0, -0x34(%rbp)
jne 0x78e04
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x78e40
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x78e12
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x78e33
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x28(%rbp)
movl -0x38(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x78d5c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)