// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: msgpack_compare_type
static inline msgpack_compare_t
msgpack_compare_type(as_unpacker *pk1, as_unpacker *pk2, as_val_t type,
		size_t depth)
{
	switch (type) {
	case AS_NIL:
		pk1->offset++;
		pk2->offset++;

		break;
	case AS_BOOLEAN: {
		unsigned char byte1 = pk1->buffer[pk1->offset++];
		unsigned char byte2 = pk2->buffer[pk2->offset++];

		if (byte1 < byte2) {
			return MSGPACK_COMPARE_LESS;
		}

		if (byte1 > byte2) {
			return MSGPACK_COMPARE_GREATER;
		}

		break;
	}
	case AS_INTEGER:
		return msgpack_compare_int(pk1, pk2);
	case AS_STRING:
		return msgpack_compare_blob(pk1, pk2);
	case AS_LIST:
		return msgpack_compare_list(pk1, pk2, depth);
	case AS_MAP:
		return msgpack_compare_map(pk1, pk2, depth);
	case AS_BYTES:
		return msgpack_compare_blob(pk1, pk2);
	case AS_DOUBLE:
		return msgpack_compare_double(pk1, pk2);
	case AS_GEOJSON:
		return msgpack_compare_blob(pk1, pk2);
	case AS_CMP_WILDCARD:
	case AS_CMP_INF:
		pk1->offset += 3;
		pk2->offset += 3;
		break;
	default:
		return MSGPACK_COMPARE_ERROR;
	}

	return MSGPACK_COMPARE_EQUAL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
pushq $-0x2
popq %rbp
leal -0x1(%rdx), %eax
cmpl $0xd, %eax
ja 0xc940
movq %rsi, %rbx
leaq 0x8a0b(%rip), %rsi      # 0x15314
movq %rcx, %r15
movq %rdi, %r14
movslq (%rsi,%rax,4), %rax
addq %rsi, %rax
pushq $0x1
popq %rdi
jmpq *%rax
movq %r14, %rdi
movq %rbx, %rsi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd0d3
pushq $0x3
popq %rdx
addl %edx, 0x8(%r14)
addl %edx, 0x8(%rbx)
movl %edi, %ebp
movl %ebp, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rsp), %rsi
andq $0x0, 0x40(%rsp)
movq %r14, %rdi
andq $0x0, (%rsi)
callq 0x8a50
pushq $-0x2
popq %rbp
testl %eax, %eax
jne 0xc940
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x8a50
testl %eax, %eax
jne 0xc940
movq 0x40(%rsp), %rax
xorl %ebp, %ebp
cmpq %rax, 0x10(%rsp)
jl 0xc940
setg %al
movzbl %al, %ebp
jmp 0xce80
movl 0x8(%r14), %ecx
movq (%r14), %rax
xorl %ebp, %ebp
leal 0x1(%rcx), %edx
movl %edx, 0x8(%r14)
movl 0x8(%rbx), %edx
movb (%rax,%rcx), %al
movq (%rbx), %rcx
leal 0x1(%rdx), %esi
movl %esi, 0x8(%rbx)
movb (%rcx,%rdx), %cl
cmpb %cl, %al
setae %al
je 0xc93e
movb %al, %bpl
addl %ebp, %ebp
jmp 0xc940
incq %r15
cmpq $0x101, %r15            # imm = 0x101
jb 0xcd51
xorl %edi, %edi
callq 0xc65e
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
callq 0xc679
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rax, %r12
callq 0xd1a1
testb %al, %al
je 0xce23
leaq 0x40(%rsp), %r15
movl 0xc(%r12), %eax
cmpl 0x8(%r12), %eax
jae 0xcab5
movzbl 0x11(%r12), %ecx
cmpl $0x6, %ecx
je 0xca37
cmpl $0x5, %ecx
je 0xca45
jmp 0xceec
cmpb $0x0, 0x10(%r12)
je 0xcaad
movb $0x0, 0x10(%r12)
incl %eax
movl %eax, 0xc(%r12)
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xc859
cmpl $-0x3, %eax
ja 0xceb7
movl %eax, %r13d
cmpl $0x1, %eax
jne 0xcebc
movzbl 0x40(%rsp), %eax
cmpl $0xd, %eax
je 0xcb23
cmpl $0x6, %eax
je 0xcbbc
cmpl $0x5, %eax
je 0xcb8e
movzbl %al, %edx
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0xc8e6
cmpl $0x1, %eax
je 0xca12
jmp 0xcee5
movb $0x1, 0x10(%r12)
jmp 0xca4c
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0xd234
testb %al, %al
je 0xceec
movq 0x10(%rsp), %rax
movl %ebp, 0x8(%rsp)
cmpq $0x0, (%rax)
jne 0xcae8
cmpq $0x1, 0x1808(%rax)
jbe 0xd0c2
movq %rbx, %r13
movl (%r12), %ebx
movl 0x4(%r12), %ebp
leaq 0x10(%rsp), %rdi
callq 0xc810
cmpl %ebp, %ebx
movl 0x8(%rsp), %ebp
movq %rax, %r12
movq %r13, %rbx
pushq $0x2
popq %rax
cmoval %eax, %ebp
movl $0x0, %eax
cmovbl %eax, %ebp
je 0xca12
jmp 0xcee7
movq %r14, %rdi
pushq $0x1
popq %r13
movq %r13, %rsi
callq 0xd202
testb %al, %al
je 0xceb7
movq %rbx, %rdi
movq %r13, %rsi
callq 0xd202
testb %al, %al
je 0xceb7
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0xd234
testb %al, %al
je 0xceb7
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xcb7c
cmpq $0x2, 0x1808(%rax)
jb 0xd0cc
leaq 0x10(%rsp), %rdi
callq 0xc810
movq %rax, %r12
jmp 0xca12
leaq 0x10(%rsp), %rdi
callq 0xc679
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rax, %r12
callq 0xd1a1
testb %al, %al
pushq $-0x2
popq %rax
cmovel %eax, %ebp
jne 0xca12
jmp 0xcee7
leaq 0x10(%rsp), %rdi
callq 0xc679
movq %r14, %rdi
movq %rax, %r12
callq 0x8b40
movq %rbx, %rdi
movq %rax, %r13
callq 0x8b40
cmpq %rax, %r13
movq %rax, %rdx
cmovlq %r13, %rdx
testq %rdx, %rdx
js 0xceb7
xorl %esi, %esi
cmpq %rax, %r13
movl %r13d, (%r12)
movl %eax, 0x4(%r12)
movw $0x600, 0x10(%r12)      # imm = 0x600
movl %edx, 0x8(%r12)
setg %sil
xorl %ecx, %ecx
incl %esi
cmpq %rax, %r13
cmovll %ecx, %esi
andl $0x0, 0xc(%r12)
cmpl %eax, %r13d
movl %esi, 0x14(%r12)
jb 0xcee1
jbe 0xca12
pushq $0x2
popq %rbp
jmp 0xcee7
movq %r14, %rdi
callq 0x8b40
movq %rbx, %rdi
movq %rax, %r13
callq 0x8b40
movq %r13, %rsi
cmpq %rax, %r13
movq %rax, %r13
cmovlq %rsi, %r13
testq %r13, %r13
js 0xc940
movq %rax, %r12
cmpq %rax, %rsi
jne 0xcdcf
testq %r13, %r13
je 0xd02b
movq %r14, %rdi
movq %rsi, 0x8(%rsp)
movq %r12, 0x28(%rsp)
callq 0x8430
movq %rbx, %rdi
movl %eax, %r12d
callq 0x8430
xorb $0xc, %r12b
xorb $0xc, %al
orb %r12b, %al
jne 0xcfd9
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x8af0
testl %eax, %eax
jne 0xc940
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x8af0
testl %eax, %eax
jne 0xc940
movb 0x50(%rsp), %al
xorl %r12d, %r12d
movq %rbx, 0x38(%rsp)
cmpb %al, 0x20(%rsp)
jb 0xcfa1
jbe 0xcf55
pushq $0x2
popq %r12
jmp 0xcfa1
leaq 0x10(%rsp), %rsi
andq $0x0, 0x40(%rsp)
movq %r14, %rdi
andq $0x0, (%rsi)
callq 0x8ae0
pushq $-0x2
popq %rbp
testl %eax, %eax
jne 0xc940
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x8ae0
testl %eax, %eax
jne 0xc940
movsd 0x10(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
xorl %ebp, %ebp
ucomisd %xmm0, %xmm1
ja 0xc940
xorl %ebp, %ebp
ucomisd %xmm1, %xmm0
seta %bpl
jmp 0xce80
movq %r14, %rdi
callq 0x8650
movq %rbx, %rdi
movq %rax, %r12
callq 0x8650
cmpq %rax, %r12
movq %rax, %rcx
movq %r12, 0x8(%rsp)
cmovlq %r12, %rcx
testq %rcx, %rcx
js 0xc940
movq %rbx, %r13
movq %rcx, %rbx
movq %rax, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
negq %rbx
pushq $0x1
popq %rbp
leaq (%rbx,%rbp), %rax
cmpq $0x1, %rax
je 0xce32
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
leaq 0x10(%rsp), %rcx
callq 0xc2e4
movl %eax, %r12d
cmpl $0x1, %eax
jne 0xce87
cmpb $0xd, 0x10(%rsp)
je 0xce87
incq %rbp
jmp 0xcd92
movq %r14, %rdi
movq %rsi, 0x8(%rsp)
callq 0xd202
testb %al, %al
je 0xc940
cmpq %r12, 0x8(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %rdi, 0x38(%rsp)
setl %bl
callq 0xd202
movl %eax, %ecx
xorb $0x1, %cl
orb %bl, %cl
jne 0xceab
movq 0x8(%rsp), %rsi
movq 0x38(%rsp), %rbx
cmpq %r12, %rsi
jle 0xcc6f
pushq $0x2
jmp 0xd02d
movq 0x10(%rsp), %rdi
callq 0xc7fb
jmp 0xc940
movq 0x8(%rsp), %r15
movq 0x28(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
subq %r12, %rsi
callq 0xd202
testb %al, %al
pushq $-0x2
popq %rbp
je 0xc940
movq 0x30(%rsp), %r14
movq %r13, %rdi
cmpq %r14, %r15
movq %r14, %rsi
setl %bl
subq %r12, %rsi
callq 0xd202
movl %eax, %ecx
xorb $0x1, %cl
orb %bl, %cl
jne 0xceab
xorl %ebp, %ebp
cmpq %r14, %r15
setg %bpl
incl %ebp
jmp 0xc940
movq 0x8(%rsp), %rsi
movq %r14, %rdi
subq %rbp, %rsi
callq 0xd202
testb %al, %al
je 0xcef6
movq 0x30(%rsp), %rsi
movq %r13, %rdi
subq %rbp, %rsi
jmp 0xd08d
movzbl %al, %eax
leal -0x2(%rax,%rax), %ebp
jmp 0xc940
pushq $-0x2
popq %rcx
jmp 0xcee1
movq %r14, %rdi
callq 0x8950
testq %rax, %rax
pushq $-0x2
popq %rcx
js 0xcee1
movq %rbx, %rdi
callq 0x8950
testq %rax, %rax
pushq $-0x2
popq %rax
cmovsl %eax, %r13d
movl %r13d, %ecx
movl %ecx, %ebp
jmp 0xcee7
movl %eax, %ebp
cmpl $-0x2, %ebp
jne 0xcefd
movq 0x10(%rsp), %rdi
callq 0xc7fb
pushq $-0x2
jmp 0xd02d
movq 0x10(%rsp), %rdi
movq 0x1808(%rdi), %rax
testq %rax, %rax
je 0xce28
imulq $0x18, %rax, %rax
leaq 0x10(%rsp), %r15
leaq -0x10(%rax,%rdi), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd234
testb %al, %al
je 0xceec
movq 0x10(%rsp), %rdi
cmpq $0x0, (%rdi)
jne 0xcf48
cmpq $0x2, 0x1808(%rdi)
jb 0xce28
movq %r15, %rdi
callq 0xc810
movq %rax, %rdx
jmp 0xcf20
movl 0x18(%rsp), %eax
movl 0x48(%rsp), %ebx
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rsi
cmpl %ebx, %eax
movl %ebx, %edx
movl %eax, 0x30(%rsp)
cmovbl %eax, %edx
callq 0x84b0
testl %eax, %eax
js 0xcfa1
movl 0x30(%rsp), %edx
cmpl %ebx, %edx
setb %cl
xorl %r12d, %r12d
testl %eax, %eax
setne %al
orb %al, %cl
je 0xcf98
movb %al, %r12b
addl %r12d, %r12d
jmp 0xcfa1
xorl %r12d, %r12d
cmpl %edx, %ebx
adcl $0x1, %r12d
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0xd202
testb %al, %al
je 0xc940
pushq $0x1
popq %rsi
movq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0xd202
testb %al, %al
je 0xc940
cmpl $0x1, %r12d
jne 0xd0a0
decq %r13
xorl %ebp, %ebp
subq $0x1, %r13
jb 0xd02b
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
leaq 0x10(%rsp), %rcx
callq 0xc2e4
movl %eax, %r12d
cmpl $0x1, %eax
jne 0xd033
cmpb $0xd, 0x10(%rsp)
je 0xd033
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
leaq 0x10(%rsp), %rcx
callq 0xc2e4
movl %eax, %r12d
cmpl $0x1, %eax
jne 0xd05c
cmpb $0xd, 0x10(%rsp)
je 0xd05c
addq $0x2, %rbp
jmp 0xcfdb
pushq $0x1
popq %rbp
jmp 0xc940
movq 0x8(%rsp), %rax
notq %rbp
movq %r14, %rdi
leaq (%rbp,%rax,2), %rsi
callq 0xd202
testb %al, %al
je 0xcef6
movq 0x28(%rsp), %rsi
leaq (%rbp,%rsi,2), %rsi
jmp 0xd08a
movq 0x8(%rsp), %rsi
movq %r14, %rdi
addq %rsi, %rsi
subq %rbp, %rsi
addq $-0x2, %rsi
callq 0xd202
testb %al, %al
je 0xcef6
movq 0x28(%rsp), %rsi
addq %rsi, %rsi
subq %rbp, %rsi
addq $-0x2, %rsi
movq %rbx, %rdi
callq 0xd202
testb %al, %al
pushq $-0x2
popq %rbp
cmovnel %r12d, %ebp
jmp 0xc940
movq 0x8(%rsp), %rsi
movq %r14, %rdi
decq %rsi
callq 0xd202
testb %al, %al
je 0xc940
movq 0x28(%rsp), %rsi
decq %rsi
jmp 0xd08a
movl 0x14(%r12), %ebp
jmp 0xcee7
pushq $0x1
jmp 0xceb9