// File: /workspace/github_c_makefile_star2_O3/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 $0x38, %rsp
movq %rsi, %rbx
testq %rdi, %rdi
je 0x39f79
movb (%rdi), %al
testb %al, %al
sete %cl
testq %rbx, %rbx
sete %sil
orb %cl, %sil
je 0x39f90
movl $0x1, %r15d
testb %al, %al
jne 0x3a2cb
testq %rbx, %rbx
je 0x3a1f2
xorl %r15d, %r15d
cmpb (%rbx), %r15b
sbbl %r15d, %r15d
jmp 0x3a2cb
cmpb $0x0, (%rbx)
je 0x3a1fa
testl %edx, %edx
je 0x3a1f2
movl %edx, %eax
leaq -0x1(%rax), %rcx
movq %rcx, -0x60(%rbp)
leaq -0x2(%rax), %rcx
movq %rcx, -0x58(%rbp)
movq %rax, -0x48(%rbp)
addq $-0x3, %rax
movq %rax, -0x50(%rbp)
xorl %r12d, %r12d
movq %rbx, %rax
movq %rdi, -0x40(%rbp)
movzbl (%rdi,%r12), %r13d
testq %r13, %r13
je 0x3a205
movq %rax, -0x38(%rbp)
movzbl (%rbx,%r12), %r14d
testq %r14, %r14
je 0x3a210
cmpb $-0x41, %r13b
ja 0x39fff
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%r13,2)
jne 0x3a004
movl %r13d, %r15d
jmp 0x3a010
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%r13,4), %r15d
cmpb $-0x41, %r14b
ja 0x3a032
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%r14,2)
je 0x3a032
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%r14,4), %r14d
cmpl %r14d, %r15d
jne 0x3a216
xorl %r15d, %r15d
cmpl %r12d, -0x60(%rbp)
je 0x3a2cb
movq -0x40(%rbp), %rax
movzbl 0x1(%rax,%r12), %r13d
testq %r13, %r13
je 0x3a21e
movzbl 0x1(%rbx,%r12), %r14d
testq %r14, %r14
je 0x3a227
cmpb $-0x41, %r13b
ja 0x3a080
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%r13,2)
jne 0x3a085
movl %r13d, %eax
jmp 0x3a091
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%r13,4), %eax
cmpb $-0x41, %r14b
ja 0x3a0bc
movl %eax, -0x2c(%rbp)
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%r14,2)
movl -0x2c(%rbp), %eax
je 0x3a0bc
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%r14,4), %r14d
movl -0x2c(%rbp), %eax
cmpl %r14d, %eax
jne 0x3a230
cmpl %r12d, -0x58(%rbp)
je 0x3a2cb
movq -0x40(%rbp), %rax
movzbl 0x2(%rax,%r12), %r13d
testq %r13, %r13
je 0x3a239
movzbl 0x2(%rbx,%r12), %r14d
testq %r14, %r14
je 0x3a243
cmpb $-0x41, %r13b
ja 0x3a107
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%r13,2)
jne 0x3a10c
movl %r13d, %eax
jmp 0x3a118
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%r13,4), %eax
cmpb $-0x41, %r14b
ja 0x3a143
movl %eax, -0x2c(%rbp)
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%r14,2)
movl -0x2c(%rbp), %eax
je 0x3a143
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%r14,4), %r14d
movl -0x2c(%rbp), %eax
cmpl %r14d, %eax
jne 0x3a24d
cmpl %r12d, -0x50(%rbp)
je 0x3a2cb
movq -0x40(%rbp), %rax
movzbl 0x3(%rax,%r12), %r13d
testq %r13, %r13
je 0x3a257
movzbl 0x3(%rbx,%r12), %r14d
testq %r14, %r14
je 0x3a264
cmpb $-0x41, %r13b
ja 0x3a18e
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%r13,2)
jne 0x3a193
movl %r13d, %eax
jmp 0x3a19f
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%r13,4), %eax
cmpb $-0x41, %r14b
ja 0x3a1ca
movl %eax, -0x2c(%rbp)
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%r14,2)
movl -0x2c(%rbp), %eax
je 0x3a1ca
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%r14,4), %r14d
movl -0x2c(%rbp), %eax
cmpl %r14d, %eax
jne 0x3a26e
movq -0x38(%rbp), %rax
addq $0x4, %rax
addq $0x4, %r12
cmpl %r12d, -0x48(%rbp)
movq -0x40(%rbp), %rdi
jne 0x39fc9
jmp 0x3a2cb
xorl %r15d, %r15d
jmp 0x3a2cb
movl $0x1, %r15d
jmp 0x3a2cb
addq %r12, %rbx
xorl %r13d, %r13d
movq %rbx, %r14
jmp 0x3a27c
movq -0x38(%rbp), %r14
jmp 0x3a276
addq %r12, %rbx
movq %rbx, %r14
jmp 0x3a276
leaq (%rbx,%r12), %r14
incq %r14
jmp 0x3a25f
leaq (%rbx,%r12), %r14
incq %r14
jmp 0x3a276
movq -0x38(%rbp), %r14
incq %r14
jmp 0x3a276
leaq (%rbx,%r12), %r14
addq $0x2, %r14
jmp 0x3a25f
movq -0x38(%rbp), %r14
addq $0x2, %r14
jmp 0x3a276
leaq (%rbx,%r12), %r14
addq $0x2, %r14
jmp 0x3a276
leaq (%rbx,%r12), %r14
addq $0x3, %r14
xorl %r13d, %r13d
jmp 0x3a27c
leaq (%rbx,%r12), %r14
addq $0x3, %r14
jmp 0x3a276
movq -0x38(%rbp), %r14
addq $0x3, %r14
cmpb $-0x40, %r13b
jae 0x3a28f
callq 0xc170
movq (%rax), %rax
movzbl %r13b, %ebx
testb $0x1, 0x1(%rax,%rbx,2)
jne 0x3a295
movzbl %r13b, %r15d
jmp 0x3a2a1
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%rbx,4), %r15d
movzbl (%r14), %ebx
cmpq $0xbf, %rbx
ja 0x3a2c8
callq 0xc170
movq (%rax), %rax
testb $0x1, 0x1(%rax,%rbx,2)
je 0x3a2c8
callq 0xc4a0
movq (%rax), %rax
movl (%rax,%rbx,4), %ebx
subl %ebx, %r15d
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq