// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: SyStrnicmp
JX9_PRIVATE sxi32 SyStrnicmp(const char *zLeft, const char *zRight, sxu32 SLen)
{
  	register unsigned char *p = (unsigned char *)zLeft;
	register unsigned char *q = (unsigned char *)zRight;
	
	if( SX_EMPTY_STR(p) || SX_EMPTY_STR(q) ){
		return SX_EMPTY_STR(p)? SX_EMPTY_STR(q) ? 0 : -1 :1;
	}
	for(;;){
		if( !SLen ){ return 0; }if( !*p || !*q || SyCharToLower(*p) != SyCharToLower(*q) ){ break; }p++;q++;--SLen;
		if( !SLen ){ return 0; }if( !*p || !*q || SyCharToLower(*p) != SyCharToLower(*q) ){ break; }p++;q++;--SLen;
		if( !SLen ){ return 0; }if( !*p || !*q || SyCharToLower(*p) != SyCharToLower(*q) ){ break; }p++;q++;--SLen;
		if( !SLen ){ return 0; }if( !*p || !*q || SyCharToLower(*p) != SyCharToLower(*q) ){ break; }p++;q++;--SLen;
		
	}
	return (sxi32)(SyCharToLower(p[0]) - SyCharToLower(q[0]));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
testq %rdi, %rdi
je 0x3aaf1
movq %rdi, %r13
movb (%rdi), %al
testb %al, %al
sete %cl
testq %rbx, %rbx
sete %sil
orb %cl, %sil
jne 0x3aae3
cmpb $0x0, (%rbx)
je 0x3aae3
testl %edx, %edx
je 0x3ab04
movl %edx, %eax
leaq -0x1(%rax), %rcx
movq %rcx, -0x70(%rbp)
leaq -0x2(%rax), %rcx
movq %rcx, -0x68(%rbp)
movq %rax, -0x58(%rbp)
addq $-0x3, %rax
movq %rax, -0x60(%rbp)
xorl %r12d, %r12d
movq %r13, -0x40(%rbp)
movq %rbx, -0x48(%rbp)
movq %rbx, -0x50(%rbp)
movq %r13, -0x30(%rbp)
movzbl (%r13,%r12), %r14d
testq %r14, %r14
je 0x3ab0c
movzbl (%rbx,%r12), %r15d
testq %r15, %r15
je 0x3ab0c
cmpb $-0x41, %r14b
ja 0x3a8ef
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%r14,2)
je 0x3a8ef
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%r14,4), %r14d
cmpb $-0x41, %r15b
ja 0x3a911
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%r15,2)
je 0x3a911
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%r15,4), %r15d
cmpl %r15d, %r14d
jne 0x3ab1a
xorl %r15d, %r15d
cmpl %r12d, -0x70(%rbp)
je 0x3aba6
movq -0x48(%rbp), %rax
incq %rax
movq %rax, -0x38(%rbp)
movzbl 0x1(%r13,%r12), %r13d
testq %r13, %r13
je 0x3ab29
movq -0x40(%rbp), %rax
leaq 0x1(%rax), %r14
movzbl 0x1(%rbx,%r12), %ebx
testq %rbx, %rbx
je 0x3ab50
cmpb $-0x41, %r13b
ja 0x3a97a
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%r13,2)
je 0x3a97a
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%r13,4), %r13d
cmpb $-0x41, %bl
ja 0x3a999
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%rbx,2)
je 0x3a999
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%rbx,4), %ebx
cmpl %ebx, %r13d
jne 0x3ab50
cmpl %r12d, -0x68(%rbp)
je 0x3aba6
movq -0x40(%rbp), %rax
leaq 0x2(%rax), %r14
movq -0x48(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movzbl 0x2(%rax,%r12), %r13d
testq %r13, %r13
je 0x3ab50
movq -0x50(%rbp), %rax
movzbl 0x2(%rax,%r12), %ebx
testq %rbx, %rbx
je 0x3ab50
cmpb $-0x41, %r13b
ja 0x3aa08
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%r13,2)
je 0x3aa08
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%r13,4), %r13d
cmpb $-0x41, %bl
ja 0x3aa27
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%rbx,2)
je 0x3aa27
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%rbx,4), %ebx
cmpl %ebx, %r13d
jne 0x3ab36
cmpl %r12d, -0x60(%rbp)
movq -0x30(%rbp), %rax
je 0x3aba6
movq -0x48(%rbp), %rcx
addq $0x3, %rcx
movq %rcx, -0x38(%rbp)
movzbl 0x3(%rax,%r12), %r13d
testq %r13, %r13
je 0x3ab44
movq -0x40(%rbp), %rax
leaq 0x3(%rax), %r14
movq -0x50(%rbp), %rax
movzbl 0x3(%rax,%r12), %ebx
testq %rbx, %rbx
je 0x3ab50
cmpb $-0x41, %r13b
ja 0x3aa96
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%r13,2)
je 0x3aa96
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%r13,4), %r13d
cmpb $-0x41, %bl
ja 0x3aab5
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%rbx,2)
je 0x3aab5
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%rbx,4), %ebx
cmpl %ebx, %r13d
jne 0x3ab50
addq $0x4, -0x40(%rbp)
addq $0x4, -0x48(%rbp)
addq $0x4, %r12
cmpl %r12d, -0x58(%rbp)
movq -0x50(%rbp), %rbx
movq -0x30(%rbp), %r13
jne 0x3a8b0
jmp 0x3aba6
movl $0x1, %r15d
testb %al, %al
jne 0x3aba6
testq %rbx, %rbx
je 0x3ab04
xorl %r15d, %r15d
cmpb (%rbx), %r15b
sbbl %r15d, %r15d
jmp 0x3aba6
xorl %r15d, %r15d
jmp 0x3aba6
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %r14
jmp 0x3ab50
addq %r12, %r13
addq %r12, %rbx
movq %rbx, -0x38(%rbp)
movq %r13, %r14
jmp 0x3ab50
movq -0x30(%rbp), %rax
leaq (%rax,%r12), %r14
incq %r14
jmp 0x3ab50
movq -0x30(%rbp), %rax
leaq (%rax,%r12), %r14
addq $0x2, %r14
jmp 0x3ab50
movq -0x30(%rbp), %rax
leaq (%rax,%r12), %r14
addq $0x3, %r14
movzbl (%r14), %r15d
cmpq $0xbf, %r15
ja 0x3ab79
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%r15,2)
je 0x3ab79
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%r15,4), %r15d
movq -0x38(%rbp), %rax
movzbl (%rax), %ebx
cmpq $0xbf, %rbx
ja 0x3aba3
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%rbx,2)
je 0x3aba3
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%rbx,4), %ebx
subl %ebx, %r15d
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq