LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_unpack_str
static inline const uint8_t *
unpack_str_bin(as_unpacker *pk, uint32_t *sz_r)
{
	if (pk->offset >= pk->length) {
		return NULL;
	}

	uint8_t type = pk->buffer[pk->offset++];
	uint32_t size = pk->length - pk->offset;

	switch (type) {
	case 0xd9:
	case 0xc4: // str/bin with 8 bit header
		if (size < 1) {
			return NULL;
		}
		*sz_r = (uint32_t)pk->buffer[pk->offset++];
		break;
	case 0xc5:
	case 0xda: // str/bin with 16 bit header
		if (size < 2) {
			return NULL;
		}
		*sz_r = (uint32_t)extract_uint16(pk);
		break;
	case 0xc6:
	case 0xdb: // str/bin with 32 bit header
		if (size < 4) {
			return NULL;
		}
		*sz_r = extract_uint32(pk);
		break;
	default:
		if ((type & 0xe0) == 0xa0) { // str bytes with 8 bit combined header
			*sz_r = (uint32_t)(type & 0x1f);
			break;
		}

		return NULL;
	}

	const uint8_t *buf = &pk->buffer[pk->offset];

	pk->offset += *sz_r;

	if (pk->offset > pk->length) {
		return NULL;
	}

	return buf;
}

// Assembly:
movl 0x8(%rdi), %eax
movl 0xc(%rdi), %r9d
cmpl %r9d, %eax
jae 0xd2f3
movq (%rdi), %rdx
leal 0x1(%rax), %r8d
movl %r8d, 0x8(%rdi)
movzbl (%rdx,%rax), %ecx
leal -0xc4(%rcx), %r10d
cmpl $0x17, %r10d
ja 0xd2cd
movl $0x200001, %r11d        # imm = 0x200001
btl %r10d, %r11d
jb 0xd2b9
subl %r8d, %r9d
movl $0x400002, %r11d        # imm = 0x400002
btl %r10d, %r11d
jb 0xd29d
movl $0x800004, %r11d        # imm = 0x800004
btl %r10d, %r11d
jae 0xd2cd
cmpl $0x4, %r9d
jb 0xd2f3
movl %r8d, %ecx
movl (%rdx,%rcx), %ecx
bswapl %ecx
addl $0x5, %eax
movl %eax, 0x8(%rdi)
jmp 0xd2dc
cmpl $0x2, %r9d
jb 0xd2f3
movl %r8d, %ecx
movzwl (%rdx,%rcx), %ecx
rolw $0x8, %cx
addl $0x3, %eax
movl %eax, 0x8(%rdi)
movzwl %cx, %ecx
jmp 0xd2dc
cmpl %r8d, %r9d
je 0xd2f3
addl $0x2, %eax
movl %eax, 0x8(%rdi)
movl %r8d, %eax
movzbl (%rdx,%rax), %ecx
jmp 0xd2dc
movl %ecx, %eax
andl $-0x20, %eax
cmpl $0xa0, %eax
jne 0xd2f3
andl $0x1f, %ecx
movl %ecx, (%rsi)
movl 0x8(%rdi), %edx
addl %edx, %ecx
movl %ecx, 0x8(%rdi)
addq (%rdi), %rdx
xorl %eax, %eax
cmpl 0xc(%rdi), %ecx
cmovbeq %rdx, %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_unpack_ext
int
as_unpack_ext(as_unpacker *pk, as_msgpack_ext *ext)
{
	// Need at least 3 bytes.
	if (pk->length - pk->offset < 3) {
		return -1;
	}

	uint8_t type = pk->buffer[pk->offset++];

	switch (type) {
	case 0xd4: // fixext 1
		ext->size = 1;
		break;
	case 0xd5: // fixext 2
		ext->size = 2;
		break;
	case 0xd6: // fixext 4
		ext->size = 4;
		break;
	case 0xd7: // fixext 8
		ext->size = 8;
		break;
	case 0xd8: // fixext 16
		ext->size = 16;
		break;
	case 0xc7: // ext 8
		ext->size = (uint32_t)pk->buffer[pk->offset++];
		break;
	case 0xc8: // ext 16
		ext->size = extract_uint16(pk);
		break;
	case 0xc9: // ext 32
		// Need at least 4 more bytes.
		if (pk->length - pk->offset < 4) {
			return -2;
		}
		ext->size = extract_uint32(pk);
		break;
	default:
		return -3;
	}

	if (pk->length - pk->offset < 1 + ext->size) {
		return -4;
	}

	ext->type_offset = pk->offset;
	ext->type = pk->buffer[pk->offset++];
	ext->data = pk->buffer + pk->offset;
	pk->offset += ext->size;

	return 0;
}

// Assembly:
movl 0x8(%rdi), %ecx
movl 0xc(%rdi), %r8d
movl %r8d, %edx
subl %ecx, %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x3, %edx
jb 0xd4ac
movq (%rdi), %rdx
leal 0x1(%rcx), %r9d
movl %r9d, 0x8(%rdi)
movzbl (%rdx,%rcx), %r10d
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
addl $0xffffff39, %r10d      # imm = 0xFFFFFF39
cmpl $0x11, %r10d
ja 0xd4ac
leaq 0xaecd(%rip), %r11      # 0x182cc
movslq (%r11,%r10,4), %r10
addq %r11, %r10
jmpq *%r10
addl $0x2, %ecx
movl %ecx, 0x8(%rdi)
movl %r9d, %eax
movzbl (%rdx,%rax), %edx
jmp 0xd46d
movl $0x4, %edx
jmp 0xd46d
movl %r9d, %eax
movzwl (%rdx,%rax), %eax
rolw $0x8, %ax
addl $0x3, %ecx
movl %ecx, 0x8(%rdi)
movzwl %ax, %edx
jmp 0xd46d
movl $0x8, %edx
jmp 0xd46d
movl $0x10, %edx
jmp 0xd46d
subl %r9d, %r8d
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpl $0x4, %r8d
jb 0xd4ac
movl %r9d, %eax
movl (%rdx,%rax), %edx
bswapl %edx
addl $0x5, %ecx
movl %ecx, 0x8(%rdi)
jmp 0xd46d
movl $0x1, %edx
jmp 0xd46d
movl $0x2, %edx
movl %edx, 0x8(%rsi)
movl 0x8(%rdi), %ecx
movl 0xc(%rdi), %r8d
subl %ecx, %r8d
incl %edx
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
cmpl %edx, %r8d
jb 0xd4ac
movl %ecx, 0xc(%rsi)
movq (%rdi), %rax
movl 0x8(%rdi), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x8(%rdi)
movb (%rax,%rcx), %al
movb %al, 0x10(%rsi)
movl 0x8(%rdi), %eax
addq (%rdi), %rax
movq %rax, (%rsi)
movl 0x8(%rsi), %eax
addl %eax, 0x8(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_unpack_list_header_element_count
int64_t
as_unpack_list_header_element_count(as_unpacker *pk)
{
	if (pk->offset >= pk->length) {
		return -1;
	}

	uint8_t type = pk->buffer[pk->offset++];
	uint32_t size = pk->length - pk->offset;

	switch (type) {
	case 0xdc: // list with 16 bit header
		if (size < 2) {
			return -2;
		}
		return extract_uint16(pk);
	case 0xdd: // list with 32 bit header
		if (size < 4) {
			return -3;
		}
		return (int64_t)extract_uint32(pk);
	default:
		break;
	}

	if ((type & 0xf0) == 0x90) { // list with 8 bit combined header
		return (int64_t)(type & 0x0f);
	}

	return -4;
}

// Assembly:
movl 0x8(%rdi), %ecx
movl 0xc(%rdi), %r8d
movq $-0x1, %rax
cmpl %r8d, %ecx
jae 0xd55e
movq (%rdi), %rdx
leal 0x1(%rcx), %esi
movl %esi, 0x8(%rdi)
movzbl (%rdx,%rcx), %r9d
subl %esi, %r8d
cmpl $0xdd, %r9d
je 0xd527
cmpl $0xdc, %r9d
jne 0xd542
movq $-0x2, %rax
cmpl $0x2, %r8d
jb 0xd55e
movl %esi, %eax
movzwl (%rdx,%rax), %eax
rolw $0x8, %ax
addl $0x3, %ecx
movl %ecx, 0x8(%rdi)
movzwl %ax, %eax
retq
movq $-0x3, %rax
cmpl $0x4, %r8d
jb 0xd55e
movl %esi, %eax
movl (%rdx,%rax), %eax
bswapl %eax
addl $0x5, %ecx
movl %ecx, 0x8(%rdi)
retq
movl %r9d, %ecx
andl $-0x10, %ecx
movq $-0x4, %rax
cmpl $0x90, %ecx
jne 0xd55e
andl $0xf, %r9d
movq %r9, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_unpack_map_header_element_count
int64_t
as_unpack_map_header_element_count(as_unpacker *pk)
{
	if (pk->offset >= pk->length) {
		return -1;
	}

	uint8_t type = pk->buffer[pk->offset++];
	uint32_t size = pk->length - pk->offset;

	switch (type) {
	case 0xde: // map with 16 bit header
		if (size < 2) {
			return -2;
		}
		return extract_uint16(pk);
	case 0xdf: // map with 32 bit header
		if (size < 4) {
			return -3;
		}
		return extract_uint32(pk);
	default:
		break;
	}

	if ((type & 0xf0) == 0x80) { // map with 8 bit combined header
		return type & 0x0f;
	}

	return -4;
}

// Assembly:
movl 0x8(%rdi), %ecx
movl 0xc(%rdi), %r8d
movq $-0x1, %rax
cmpl %r8d, %ecx
jae 0xd5ed
movq (%rdi), %rdx
leal 0x1(%rcx), %esi
movl %esi, 0x8(%rdi)
movzbl (%rdx,%rcx), %r9d
subl %esi, %r8d
cmpl $0xdf, %r9d
je 0xd5b6
cmpl $0xde, %r9d
jne 0xd5d1
movq $-0x2, %rax
cmpl $0x2, %r8d
jb 0xd5ed
movl %esi, %eax
movzwl (%rdx,%rax), %eax
rolw $0x8, %ax
addl $0x3, %ecx
movl %ecx, 0x8(%rdi)
movzwl %ax, %eax
retq
movq $-0x3, %rax
cmpl $0x4, %r8d
jb 0xd5ed
movl %esi, %eax
movl (%rdx,%rax), %eax
bswapl %eax
addl $0x5, %ecx
movl %ecx, 0x8(%rdi)
retq
movl %r9d, %ecx
andl $-0x10, %ecx
movq $-0x4, %rax
cmpl $0x80, %ecx
jne 0xd5ed
andl $0xf, %r9d
movq %r9, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: msgpack_compare_internal
static inline msgpack_compare_t
msgpack_compare_internal(as_unpacker *pk1, as_unpacker *pk2, size_t depth,
		as_val_t *type)
{
	msgpack_compare_t ret = msgpack_peek_compare_type(pk1, pk2, type);

	if (ret == MSGPACK_COMPARE_ERROR || ret == MSGPACK_COMPARE_END) {
		return MSGPACK_COMPARE_ERROR;
	}

	if (ret != MSGPACK_COMPARE_EQUAL || *type == AS_CMP_WILDCARD) {
		if (as_unpack_size(pk1) < 0) {
			return MSGPACK_COMPARE_ERROR;
		}

		if (as_unpack_size(pk2) < 0) {
			return MSGPACK_COMPARE_ERROR;
		}

		return ret;
	}

	return msgpack_compare_type(pk1, pk2, *type, depth);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movl 0xc(%rdi), %eax
subl 0x8(%rdi), %eax
movl 0xc(%rsi), %ecx
sete %dl
subl 0x8(%rsi), %ecx
movb $0x0, (%r12)
sete %sil
orb %dl, %sil
cmpb $0x1, %sil
jne 0xd688
cmpl %ecx, %eax
jge 0xd6cf
xorl %r13d, %r13d
jmp 0xd6da
movq %r15, %rdi
callq 0x8410
movl %eax, %ebp
movq %rbx, %rdi
callq 0x8410
testb %bpl, %bpl
sete %cl
testb %al, %al
sete %dl
orb %cl, %dl
movl $0xfffffffe, %r13d      # imm = 0xFFFFFFFE
jne 0xd6da
cmpb $0xd, %bpl
sete %cl
cmpb $0xd, %al
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0xd72c
movb $0xd, (%r12)
movl $0x1, %r13d
jmp 0xd6da
setg %al
movzbl %al, %eax
leal -0x1(%rax,%rax,2), %r13d
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
cmpl $-0x3, %r13d
ja 0xd71b
cmpl $0x1, %r13d
jne 0xd6f3
movb (%r12), %al
cmpb $0xd, %al
jne 0xd743
movq %r15, %rdi
xorl %esi, %esi
callq 0xcd02
testq %rax, %rax
js 0xd71b
movq %rbx, %rdi
xorl %esi, %esi
callq 0xcd02
testq %rax, %rax
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmovsl %eax, %r13d
movl %r13d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb %al, %bpl
jb 0xd683
movl $0x2, %r13d
ja 0xd6da
movb %bpl, (%r12)
jmp 0xd6c7
movzbl %al, %edx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xdc82
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: pack_resize
static int
pack_resize(as_packer *pk, uint32_t sz)
{
	// Add current buffer to linked list and allocate a new buffer
	as_packer_buffer *entry =
			(as_packer_buffer *)cf_malloc(sizeof(as_packer_buffer));

	if (! entry) {
		return -1;
	}

	entry->buffer = pk->buffer;
	entry->length = pk->offset;
	entry->next = 0;

	size_t newcap = (size_t)((sz > (uint32_t)pk->capacity) ? sz : pk->capacity);

	if (! (pk->buffer = (unsigned char *)cf_malloc(newcap))) {
		cf_free(entry);
		return -1;
	}

	pk->capacity = (int)newcap;
	pk->offset = 0;

	if (pk->tail) {
		pk->tail->next = entry;
		pk->tail = entry;
	}
	else {
		pk->head = entry;
		pk->tail = entry;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
movl $0x18, %edi
callq 0x8080
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0xd7ef
movq %rax, %r14
movq 0x10(%rbx), %rax
movq %rax, 0x8(%r14)
movl 0x18(%rbx), %eax
movl %eax, 0x10(%r14)
movq $0x0, (%r14)
movl 0x1c(%rbx), %eax
cmpl %r15d, %eax
cmoval %eax, %r15d
movq %r15, %rdi
callq 0x8080
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0xd7e7
movl %r15d, 0x1c(%rbx)
movl $0x0, 0x18(%rbx)
movq 0x8(%rbx), %rax
testq %rax, %rax
cmoveq %rbx, %rax
movq %r14, (%rax)
movq %r14, 0x8(%rbx)
xorl %ebp, %ebp
jmp 0xd7ef
movq %r14, %rdi
callq 0x8940
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: pack_map_foreach
static bool
pack_map_foreach(const as_val* key, const as_val* val, void* udata)
{
	as_packer* pk = (as_packer*)udata;
	int rc = as_pack_val(pk, (as_val*)key);

	if (rc == 0) {
		rc = as_pack_val(pk, (as_val*)val);
	}

	return rc == 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %rsi
movq %rdx, %rdi
callq 0x8a00
testl %eax, %eax
je 0xd82f
xorl %eax, %eax
jmp 0xd83f
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8a00
testl %eax, %eax
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: unpack_list_elements_size
static int64_t
unpack_list_elements_size(as_unpacker *pk, uint32_t ele_count, uint32_t depth)
{
	if (++depth > MSGPACK_COMPARE_MAX_DEPTH) {
		msgpack_parse_memblock *block = msgpack_parse_memblock_create(NULL);
		msgpack_parse_state *state = msgpack_parse_memblock_next(&block);

		state->index = 0;
		state->map_pair = 0;
		state->len = ele_count;
		state->type = AS_LIST;

		int64_t ret = unpack_size_non_recursive(pk, block, state);

		msgpack_parse_memblock_destroy(block);

		return ret;
	}

	int64_t total = 0;

	for (uint32_t i = 0; i < ele_count; i++) {
		int64_t ret = unpack_size_internal(pk, depth);

		if (ret < 0) {
			return -1;
		}

		total += ret;
	}

	return total;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %ebp
movq %rdi, %r14
incl %r15d
cmpl $0x100, %r15d           # imm = 0x100
jbe 0xd8b8
movl $0x1810, %edi           # imm = 0x1810
callq 0x8080
movq %rax, %r15
movq $0x0, (%rax)
leaq 0x8(%rax), %rdx
movq $0x1, 0x1808(%rax)
movl $0x0, 0x14(%rax)
movw $0x500, 0x18(%rax)      # imm = 0x500
movl %ebp, 0x10(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0xda12
movq %rax, %rbx
movq (%r15), %r14
movq %r15, %rdi
callq 0x8940
testq %r14, %r14
movq %r14, %r15
jne 0xd8a3
jmp 0xd8de
xorl %ebx, %ebx
testl %ebp, %ebp
je 0xd8de
movq %r14, %rdi
movl %r15d, %esi
callq 0xcd02
testq %rax, %rax
js 0xd8d7
addq %rax, %rbx
decl %ebp
jne 0xd8be
jmp 0xd8de
movq $-0x1, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: unpack_map_elements_size
static int64_t
unpack_map_elements_size(as_unpacker *pk, uint32_t ele_count, uint32_t depth)
{
	if (++depth > MSGPACK_COMPARE_MAX_DEPTH) {
		msgpack_parse_memblock *block = msgpack_parse_memblock_create(NULL);
		msgpack_parse_state *state = msgpack_parse_memblock_next(&block);

		state->index = 0;
		state->map_pair = 0;
		state->len = ele_count;
		state->type = AS_MAP;

		int64_t ret = unpack_size_non_recursive(pk, block, state);
		msgpack_parse_memblock_destroy(block);

		return ret;
	}

	int64_t total = 0;

	for (uint32_t i = 0; i < ele_count; i++) {
		int64_t ret = unpack_size_internal(pk, depth);

		if (ret < 0) {
			return -1;
		}

		total += ret;
		ret = unpack_size_internal(pk, depth);

		if (ret < 0) {
			return -2;
		}

		total += ret;
	}

	return total;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movl %esi, %ebp
movq %rdi, %rbx
incl %r15d
cmpl $0x100, %r15d           # imm = 0x100
jbe 0xd95e
movl $0x1810, %edi           # imm = 0x1810
callq 0x8080
movq %rax, %r15
movq $0x0, (%rax)
leaq 0x8(%rax), %rdx
movq $0x1, 0x1808(%rax)
movl $0x0, 0x14(%rax)
movw $0x600, 0x18(%rax)      # imm = 0x600
movl %ebp, 0x10(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0xda12
movq %rax, %r14
movq (%r15), %rbx
movq %r15, %rdi
callq 0x8940
testq %rbx, %rbx
movq %rbx, %r15
jne 0xd949
jmp 0xd9ae
xorl %r14d, %r14d
testl %ebp, %ebp
je 0xd9ae
movq %rbx, %rdi
movl %r15d, %esi
callq 0xcd02
testq %rax, %rax
js 0xd98f
addq %rax, %r14
movq %rbx, %rdi
movl %r15d, %esi
callq 0xcd02
testq %rax, %rax
js 0xd998
addq %rax, %r14
movb $0x1, %al
jmp 0xd9a1
movq $-0x1, %r12
jmp 0xd99f
movq $-0x2, %r12
xorl %eax, %eax
testb %al, %al
je 0xd9ab
decl %ebp
jne 0xd965
jmp 0xd9ae
movq %r12, %r14
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: msgpack_parse_memblock_next
static msgpack_parse_state *
msgpack_parse_memblock_next(msgpack_parse_memblock **block)
{
	msgpack_parse_memblock *ptr = *block;

	if (ptr->count >= MSGPACK_PARSE_MEMBLOCK_STATE_COUNT) {
		ptr = msgpack_parse_memblock_create(ptr);
		*block = ptr;
	}

	return &ptr->buffer[ptr->count++];
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
cmpq $0x100, 0x1808(%r14) # imm = 0x100
jb 0xd9ef
movq %rdi, %rbx
movl $0x1810, %edi           # imm = 0x1810
callq 0x8080
movq %r14, (%rax)
movq $0x0, 0x1808(%rax)
movq %rax, (%rbx)
movq %rax, %r14
movq 0x1808(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x1808(%r14)
leaq (%rax,%rax,2), %rax
leaq 0x8(%r14,%rax,8), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: msgpack_parse_memblock_prev
static msgpack_parse_state *
msgpack_parse_memblock_prev(msgpack_parse_memblock **block)
{
	msgpack_parse_memblock *ptr = *block;

	if (ptr->count <= 1) {
		ptr = ptr->prev;
		cf_free(*block);
		*block = ptr;
	}
	else {
		ptr->count--;
	}

	// No check for NULL ptr here, use has_prev to make sure it doesn't happen.

	return &ptr->buffer[ptr->count - 1];
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x1808(%rdi), %rax
cmpq $0x1, %rax
ja 0xdc60
movq (%rdi), %r14
callq 0x8940
movq %r14, (%rbx)
movq %r14, %rdi
jmp 0xdc6a
decq %rax
movq %rax, 0x1808(%rdi)
movq 0x1808(%rdi), %rax
leaq (%rax,%rax,2), %rax
leaq -0x10(%rdi,%rax,8), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: msgpack_compare_blob
static inline msgpack_compare_t
msgpack_compare_blob(as_unpacker *pk1, as_unpacker *pk2)
{
	int64_t len1 = msgpack_get_blob_len(pk1);
	int64_t len2 = msgpack_get_blob_len(pk2);

	if (len1 < 0 || len2 < 0) {
		return MSGPACK_COMPARE_ERROR;
	}

	return msgpack_compare_blob_internal(pk1, (uint32_t)len1, pk2, (uint32_t)len2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x81b0
movq $-0x1, %r15
testq %rax, %rax
movq $-0x1, %r12
je 0xe9d2
decq %rax
movl 0x8(%r14), %ecx
movl 0xc(%r14), %edx
incl %ecx
movl %ecx, 0x8(%r14)
subl %ecx, %edx
cmpq %rdx, %rax
cmovgeq %rdx, %rax
movq %rax, %r12
movq %rbx, %rdi
callq 0x81b0
testq %rax, %rax
je 0xe9f9
decq %rax
movl 0x8(%rbx), %ecx
movl 0xc(%rbx), %edx
incl %ecx
movl %ecx, 0x8(%rbx)
subl %ecx, %edx
cmpq %rdx, %rax
cmovgeq %rdx, %rax
movq %rax, %r15
testq %r12, %r12
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
js 0xeaad
testq %r15, %r15
js 0xeaad
cmpl %r15d, %r12d
movl %r15d, %eax
cmovbl %r12d, %eax
movl 0x8(%r14), %edx
movl 0x8(%rbx), %esi
leal (%rdx,%r12), %ecx
movl %ecx, 0x8(%r14)
addl %r15d, 0x8(%rbx)
testl %eax, %eax
setne %r9b
je 0xea8a
movq (%r14), %rdi
movq (%rbx), %r8
movb (%rdi,%rdx), %r9b
movb (%r8,%rsi), %r10b
xorl %ecx, %ecx
cmpb %r10b, %r9b
setae %cl
addl %ecx, %ecx
cmpb %r10b, %r9b
movb $0x1, %r9b
jne 0xea97
movl $0x1, %ebx
xorl %r9d, %r9d
movl $0x2, %r11d
movl %ebx, %r10d
cmpl %ebx, %eax
je 0xea8e
leal (%rsi,%r10), %r14d
leal (%rdx,%r10), %ebx
movb (%rdi,%rbx), %bpl
leal 0x1(%r10), %ebx
cmpb (%r8,%r14), %bpl
cmoval %r11d, %ecx
cmovbl %r9d, %ecx
je 0xea63
jmp 0xea90
xorl %ecx, %ecx
jmp 0xea97
xorl %ecx, %ecx
cmpl %eax, %r10d
setb %r9b
xorl %eax, %eax
cmpl %r15d, %r12d
seta %al
incl %eax
testb %r9b, %r9b
cmovnel %ecx, %eax
cmpl %r15d, %r12d
cmovbl %ecx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: msgpack_parse_state_list_cmp_init
static bool
msgpack_parse_state_list_cmp_init(msgpack_parse_state *state, as_unpacker *pk1,
		as_unpacker *pk2)
{
	int64_t len1 = as_unpack_list_header_element_count(pk1);
	int64_t len2 = as_unpack_list_header_element_count(pk2);
	int64_t minlen = (len1 < len2) ? len1 : len2;

	if (minlen < 0) {
		return false;
	}

	state->len1 = (uint32_t)len1;
	state->len2 = (uint32_t)len2;
	state->index = 0;
	state->map_pair = 0;
	state->len = (uint32_t)minlen;
	state->type = AS_LIST;
	state->default_compare_type = msgpack_compare_int64_t(len1, len2);

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x85e0
movq %rax, %r14
movq %r15, %rdi
callq 0x85e0
cmpq %rax, %r14
movq %rax, %rcx
cmovlq %r14, %rcx
testq %rcx, %rcx
js 0xeb0a
xorl %edx, %edx
cmpq %rax, %r14
setg %dl
incl %edx
xorl %esi, %esi
cmpq %rax, %r14
movl %r14d, (%rbx)
movl %eax, 0x4(%rbx)
movl %esi, 0xc(%rbx)
movw $0x500, 0x10(%rbx)      # imm = 0x500
movl %ecx, 0x8(%rbx)
cmovll %esi, %edx
movl %edx, 0x14(%rbx)
testq %rcx, %rcx
setns %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: msgpack_compare_unwind_all
static bool
msgpack_compare_unwind_all(as_unpacker *pk1, as_unpacker *pk2,
		msgpack_parse_memblock **block)
{
	if ((*block)->count == 0) {
		return true;
	}

	const msgpack_parse_state *state = &(*block)->buffer[(*block)->count - 1];

	while (true) {
		if (! msgpack_compare_unwind(pk1, pk2, state)) {
			return false;
		}

		if (! msgpack_parse_memblock_has_prev(*block)) {
			break;
		}

		state = msgpack_parse_memblock_prev(block);
	}

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rdx), %rax
movq 0x1808(%rax), %rcx
testq %rcx, %rcx
je 0xeb6b
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq (%rcx,%rcx,2), %rcx
leaq -0x10(%rax,%rcx,8), %rdx
callq 0xeb75
testb %al, %al
je 0xeb6d
movq (%rbx), %rcx
cmpq $0x0, (%rcx)
jne 0xeb58
cmpq $0x2, 0x1808(%rcx)
jb 0xeb6d
movq %rbx, %rdi
callq 0xdc39
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
jmp 0xeb3c
movb $0x1, %al
andb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: msgpack_compare_unwind
static bool
msgpack_compare_unwind(as_unpacker *pk1, as_unpacker *pk2,
		const msgpack_parse_state *state)
{
	if (state->type == AS_LIST) {
		if (! msgpack_skip(pk1, state->len1 - state->index)) {
			return false;
		}

		if (! msgpack_skip(pk2, state->len2 - state->index)) {
			return false;
		}
	}
	else if (state->type == AS_MAP) {
		if (! msgpack_skip(pk1,
				2 * (state->len1 - state->index) - state->map_pair)) {
			return false;
		}

		if (! msgpack_skip(pk2,
				2 * (state->len2 - state->index) - state->map_pair)) {
			return false;
		}
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movzbl 0x11(%rdx), %eax
cmpl $0x6, %eax
je 0xec39
cmpl $0x5, %eax
jne 0xece0
movl (%r14), %r12d
subl 0xc(%r14), %r12d
sete %bpl
je 0xebe2
movq %r15, %rdi
xorl %esi, %esi
callq 0xcd02
testq %rax, %rax
js 0xebe2
movl $0x1, %ecx
movq %rcx, %r13
cmpq %rcx, %r12
je 0xebdb
movq %r15, %rdi
xorl %esi, %esi
callq 0xcd02
leaq 0x1(%r13), %rcx
testq %rax, %rax
jns 0xebc0
cmpq %r12, %r13
setae %bpl
testb %bpl, %bpl
je 0xece4
movl 0x4(%r14), %r15d
subl 0xc(%r14), %r15d
sete %bpl
je 0xecdb
movq %rbx, %rdi
xorl %esi, %esi
callq 0xcd02
testq %rax, %rax
js 0xecdb
movl $0x1, %ecx
movq %rcx, %r14
cmpq %rcx, %r15
je 0xecd4
movq %rbx, %rdi
xorl %esi, %esi
callq 0xcd02
leaq 0x1(%r14), %rcx
testq %rax, %rax
jns 0xec15
jmp 0xecd4
movl (%r14), %r12d
subl 0xc(%r14), %r12d
addl %r12d, %r12d
movzbl 0x10(%r14), %eax
subl %eax, %r12d
sete %bpl
je 0xec87
movq %r15, %rdi
xorl %esi, %esi
callq 0xcd02
testq %rax, %rax
js 0xec87
movl $0x1, %ecx
movq %rcx, %r13
cmpq %rcx, %r12
je 0xec80
movq %r15, %rdi
xorl %esi, %esi
callq 0xcd02
leaq 0x1(%r13), %rcx
testq %rax, %rax
jns 0xec65
cmpq %r12, %r13
setae %bpl
testb %bpl, %bpl
je 0xece4
movl 0x4(%r14), %r15d
subl 0xc(%r14), %r15d
addl %r15d, %r15d
movzbl 0x10(%r14), %eax
subl %eax, %r15d
sete %bpl
je 0xecdb
movq %rbx, %rdi
xorl %esi, %esi
callq 0xcd02
testq %rax, %rax
js 0xecdb
movl $0x1, %ecx
movq %rcx, %r14
cmpq %rcx, %r15
je 0xecd4
movq %rbx, %rdi
xorl %esi, %esi
callq 0xcd02
leaq 0x1(%r14), %rcx
testq %rax, %rax
jns 0xecb9
cmpq %r15, %r14
setae %bpl
testb %bpl, %bpl
je 0xece4
movb $0x1, %al
jmp 0xece6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: compare_ext
static msgpack_compare_t
compare_ext(as_unpacker *pk1, as_unpacker *pk2)
{
	as_msgpack_ext ext1;
	as_msgpack_ext ext2;

	if (as_unpack_ext(pk1, &ext1) != 0) {
		return MSGPACK_COMPARE_ERROR;
	}

	if (as_unpack_ext(pk2, &ext2) != 0) {
		return MSGPACK_COMPARE_ERROR;
	}

	MSGPACK_COMPARE_RET_LESS_OR_GREATER(ext1.type, ext2.type);

	int64_t minsz = ext1.size < ext2.size ? ext1.size : ext2.size;
	int cmp = memcmp(ext1.data, ext2.data, minsz);

	MSGPACK_COMPARE_RET_LESS_OR_GREATER(cmp, 0);
	MSGPACK_COMPARE_RET_LESS_OR_GREATER(ext1.size, ext2.size);

	return MSGPACK_COMPARE_EQUAL;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
leaq 0x18(%rsp), %rsi
callq 0x8a20
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
testl %eax, %eax
jne 0xed7d
movq %rsp, %rsi
movq %r14, %rdi
callq 0x8a20
testl %eax, %eax
jne 0xed7d
movb 0x10(%rsp), %al
xorl %ebx, %ebx
cmpb %al, 0x28(%rsp)
jb 0xed7d
movl $0x2, %ebx
ja 0xed7d
movl 0x20(%rsp), %ebp
movl 0x8(%rsp), %r14d
cmpl %r14d, %ebp
movl %r14d, %edx
cmovbl %ebp, %edx
movq 0x18(%rsp), %rdi
movq (%rsp), %rsi
callq 0x8480
testl %eax, %eax
movl $0x0, %ebx
js 0xed7d
cmpl %r14d, %ebp
setb %cl
xorl %ebx, %ebx
testl %eax, %eax
setne %al
orb %al, %cl
je 0xed75
movb %al, %bl
addl %ebx, %ebx
jmp 0xed7d
xorl %ebx, %ebx
cmpl %ebp, %r14d
adcl $0x1, %ebx
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack_serializer.c
// Function: as_msgpack_serializer_deserialize
static int as_msgpack_serializer_deserialize(as_serializer *s, as_buffer *buff, as_val **v)
{
	as_unpacker unpacker = {
			.buffer = buff->data,
			.length = buff->size,
			.offset = 0,
	};

	return as_unpack_val(&unpacker, v);
}

// Assembly:
subq $0x18, %rsp
movq 0x8(%rsi), %rax
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movl $0x0, 0x8(%rdi)
movl 0x4(%rsi), %eax
movl %eax, 0xc(%rdi)
movq %rdx, %rsi
callq 0x8650
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_orderedmap.c
// Function: as_orderedmap_init
as_orderedmap*
as_orderedmap_init(as_orderedmap* map, uint32_t capacity)
{
	if (map == NULL) {
		return NULL;
	}

	as_map_cons((as_map*)map, false, 1, &as_orderedmap_map_hooks);

	return as_orderedmap_cons(map, capacity);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xf009
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x10b66(%rip), %rcx     # 0x1fb28
xorl %esi, %esi
movl $0x1, %edx
callq 0x8820
movl $0x0, 0x18(%rbx)
andl $-0x8, %r14d
addl $0x8, %r14d
movl %r14d, 0x1c(%rbx)
shlq $0x4, %r14
movq %r14, %rdi
callq 0x8080
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0xf009
movl $0x0, 0x28(%rbx)
xorl %eax, %eax
movq %rax, 0x30(%rbx)
movq %rax, 0x38(%rbx)
jmp 0xf00b
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_orderedmap.c
// Function: as_orderedmap_new
as_orderedmap*
as_orderedmap_new(uint32_t capacity)
{
	as_orderedmap* map = (as_orderedmap*)cf_malloc(sizeof(as_orderedmap));

	if (map == NULL) {
		return NULL;
	}

	as_map_cons((as_map*)map, true, 1, &as_orderedmap_map_hooks);

	return as_orderedmap_cons(map, capacity);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %r14d
movl $0x40, %edi
callq 0x8080
testq %rax, %rax
je 0xf083
movq %rax, %rbx
leaq 0x10af2(%rip), %rcx     # 0x1fb28
movq %rax, %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x8820
movl $0x0, 0x18(%rbx)
andl $-0x8, %r14d
addl $0x8, %r14d
movl %r14d, 0x1c(%rbx)
shlq $0x4, %r14
movq %r14, %rdi
callq 0x8080
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0xf083
movl $0x0, 0x28(%rbx)
xorl %eax, %eax
movq %rax, 0x30(%rbx)
movq %rax, 0x38(%rbx)
jmp 0xf085
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_orderedmap.c
// Function: as_orderedmap_release
bool
as_orderedmap_release(as_orderedmap* map)
{
	if (map == NULL) {
		return false;
	}

	as_orderedmap_clear(map);
	cf_free(map->table);

	if (map->hold_table != NULL) {
		cf_free(map->hold_table);
		cf_free(map->hold_locations);
	}

	return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0xf0c1
movq %rbx, %rdi
callq 0x8190
movq 0x20(%rbx), %rdi
callq 0x8940
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0xf0c1
callq 0x8940
movq 0x38(%rbx), %rdi
callq 0x8940
testq %rbx, %rbx
setne %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_orderedmap.c
// Function: as_orderedmap_clear
int
as_orderedmap_clear(as_orderedmap* map)
{
	if (map == NULL) {
		return -1;
	}

	for (uint32_t ix = 0; ix < map->count; ix++) {
		as_val_destroy(map->table[ix].key);
		as_val_destroy(map->table[ix].value);
	}

	map->count = 0;

	for (uint32_t ix = 0; ix < map->hold_count; ix++) {
		as_val_destroy(map->hold_table[ix].key);
		as_val_destroy(map->hold_table[ix].value);
	}

	map->hold_count = 0;

	return 0;
}

// Assembly:
testq %rdi, %rdi
je 0xf15c
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x18(%rdi)
je 0xf110
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x20(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x84b0
movq 0x20(%rbx), %rax
movq 0x8(%rax,%r14), %rdi
callq 0x84b0
incq %r15
movl 0x18(%rbx), %eax
addq $0x10, %r14
cmpq %rax, %r15
jb 0xf0e6
movl $0x0, 0x18(%rbx)
cmpl $0x0, 0x28(%rbx)
je 0xf14d
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x30(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x84b0
movq 0x30(%rbx), %rax
movq 0x8(%rax,%r14), %rdi
callq 0x84b0
incq %r15
movl 0x28(%rbx), %eax
addq $0x10, %r14
cmpq %rax, %r15
jb 0xf123
movl $0x0, 0x28(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_orderedmap.c
// Function: as_orderedmap_get
as_val*
as_orderedmap_get(const as_orderedmap* map, const as_val* key)
{
	if (map == NULL || ! is_valid_key_type(key)) {
		return NULL;
	}

	uint32_t ix;

	if (key_find(map->table, map->count, key, &ix, false)) {
		return (as_val*)map->table[ix].value;
	}

	if (key_find(map->hold_table, map->hold_count, key, &ix, false)) {
		return (as_val*)map->hold_table[ix].value;
	}

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0xf194
xorl %r15d, %r15d
jmp 0xf207
movq %rsi, %r14
movq %rdi, %rbx
movzbl 0x4(%rsi), %eax
leal -0x3(%rax), %ecx
cmpl $0x2, %ecx
jae 0xf1c7
movq 0x20(%rbx), %rdi
movl 0x18(%rbx), %esi
leaq 0xc(%rsp), %rcx
movq %r14, %rdx
xorl %r8d, %r8d
callq 0xf214
testb %al, %al
je 0xf1d5
addq $0x20, %rbx
jmp 0xf1f7
cmpl $0x9, %eax
jne 0xf18f
cmpl $0x4, 0x1c(%r14)
jne 0xf18f
jmp 0xf1a6
movq 0x30(%rbx), %rdi
movl 0x28(%rbx), %esi
leaq 0xc(%rsp), %rcx
xorl %r15d, %r15d
movq %r14, %rdx
xorl %r8d, %r8d
callq 0xf214
testb %al, %al
je 0xf207
addq $0x30, %rbx
movq (%rbx), %rax
movl 0xc(%rsp), %ecx
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %r15
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_orderedmap.c
// Function: key_find
static bool
key_find(const map_entry* table, uint32_t count, const as_val* key,
		uint32_t* ix_r, bool check_last_first)
{
	int64_t low = 0;
	int64_t high = (int64_t)count - 1;

	while (low <= high) {
		int64_t ix;

		// On the first iteration, probe at the end when 'check_last_first' is
		// set. Otherwise, fall back to binary search.
		if (check_last_first) {
			check_last_first = false;
			ix = high;
		}
		else {
			ix = (low + high) / 2;
		}

		msgpack_compare_t cmp = as_val_cmp(key, table[ix].key);

		if (cmp == MSGPACK_COMPARE_GREATER) {
			low = ix + 1;
		}
		else if (cmp == MSGPACK_COMPARE_LESS) {
			high = ix - 1;
		}
		else if (cmp == MSGPACK_COMPARE_EQUAL) {
			*ix_r = (uint32_t)ix;
			return true;
		}
		else {
			*ix_r = UINT32_MAX; // error
			return false;
		}
	}

	*ix_r = (uint32_t)low; // location to insert the key at

	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebp
movq %rcx, 0x10(%rsp)
movq %rdx, %r14
movq %rdi, %r15
movl %esi, %r12d
decq %r12
xorl %ebx, %ebx
movl %eax, 0xc(%rsp)
cmpq %r12, %rbx
jg 0xf2c7
testb $0x1, %bpl
je 0xf252
xorl %ebp, %ebp
movq %r12, %r13
jmp 0xf263
leaq (%r12,%rbx), %rax
movq %rax, %r13
shrq $0x3f, %r13
addq %rax, %r13
sarq %r13
movq %r13, %rax
shlq $0x4, %rax
movq (%r15,%rax), %rsi
movq %r14, %rdi
callq 0x8090
testl %eax, %eax
je 0xf29e
cmpl $0x1, %eax
je 0xf28e
cmpl $0x2, %eax
jne 0xf2a8
incq %r13
movb $0x1, %al
movq %r13, %rbx
jmp 0xf2bd
movq 0x10(%rsp), %rax
movl %r13d, (%rax)
movb $0x1, %al
movl %eax, 0xc(%rsp)
jmp 0xf2bb
decq %r13
movb $0x1, %al
movq %r13, %r12
jmp 0xf2bd
movq 0x10(%rsp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movl $0x0, 0xc(%rsp)
xorl %eax, %eax
testb %al, %al
jne 0xf23c
jmp 0xf2d6
movq 0x10(%rsp), %rax
movl %ebx, (%rax)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
andb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_orderedmap.c
// Function: as_orderedmap_merge
static bool
as_orderedmap_merge(as_orderedmap* map)
{
	if (map->hold_count == 0) {
		return true;
	}

	uint32_t new_capacity = map->count + map->hold_count;

	if (new_capacity < map->capacity) {
		new_capacity = map->capacity;
	}

	map_entry* new_table = cf_malloc(new_capacity * sizeof(map_entry));

	if (new_table == NULL) {
		return false;
	}

	uint32_t src_ix = 0;
	uint32_t dst_ix = 0;

	for (uint32_t ix = 0; ix < map->hold_count; ix++) {
		uint32_t n_entries = map->hold_locations[ix] - src_ix;

		memcpy(new_table + dst_ix, map->table + src_ix,
				n_entries * sizeof(map_entry));

		src_ix += n_entries;
		dst_ix += n_entries;

		new_table[dst_ix].key = map->hold_table[ix].key;
		new_table[dst_ix].value = map->hold_table[ix].value;

		dst_ix++;
	}

	memcpy(new_table + dst_ix, map->table + src_ix,
			(map->count - src_ix) * sizeof(map_entry));

	cf_free(map->table);

	map->count += map->hold_count;
	map->capacity = new_capacity;
	map->table = new_table;

	map->hold_count = 0;

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl 0x28(%rdi), %r15d
testl %r15d, %r15d
je 0xf63b
movq %rdi, %r14
addl 0x18(%rdi), %r15d
movl 0x1c(%rdi), %eax
cmpl %eax, %r15d
cmovbel %eax, %r15d
movq %r15, %rdi
shlq $0x4, %rdi
callq 0x8080
testq %rax, %rax
setne %bpl
je 0xf68e
cmpl $0x0, 0x28(%r14)
je 0xf640
movb %bpl, 0x7(%rsp)
movq %r15, 0x8(%rsp)
xorl %r13d, %r13d
xorl %r15d, %r15d
xorl %ebp, %ebp
xorl %r8d, %r8d
movq %rax, 0x10(%rsp)
movq 0x38(%r14), %rcx
movl (%rcx,%r13), %ebx
movl %ebx, %r12d
subl %r8d, %r12d
movl %ebp, %edi
shlq $0x4, %rdi
addq %rax, %rdi
movl %r8d, %esi
shlq $0x4, %rsi
addq 0x20(%r14), %rsi
movq %r12, %rdx
shlq $0x4, %rdx
callq 0x85c0
movq %rbx, %r8
movq 0x10(%rsp), %rax
leal (%r12,%rbp), %edx
movq 0x30(%r14), %rcx
movq (%rcx,%r13,4), %rcx
shlq $0x4, %rdx
movq %rcx, (%rax,%rdx)
movq 0x30(%r14), %rcx
movq 0x8(%rcx,%r13,4), %rcx
movq %rcx, 0x8(%rax,%rdx)
leal 0x1(%r12,%rbp), %ebp
incq %r15
movl 0x28(%r14), %ecx
addq $0x4, %r13
cmpq %rcx, %r15
jb 0xf5c0
movl %ebp, %ecx
movq 0x8(%rsp), %r15
movb 0x7(%rsp), %bpl
jmp 0xf645
movb $0x1, %bpl
jmp 0xf68e
xorl %r8d, %r8d
xorl %ecx, %ecx
shlq $0x4, %rcx
movq %rax, %rdi
addq %rcx, %rdi
movl %r8d, %esi
shlq $0x4, %rsi
addq 0x20(%r14), %rsi
movq %rax, %rbx
movl 0x18(%r14), %edx
subl %r8d, %edx
shlq $0x4, %rdx
callq 0x85c0
movq 0x20(%r14), %rdi
callq 0x8940
movl 0x28(%r14), %eax
addl %eax, 0x18(%r14)
movl %r15d, 0x1c(%r14)
movq %rbx, 0x20(%r14)
movl $0x0, 0x28(%r14)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_orderedmap.c
// Function: as_orderedmap_remove
int
as_orderedmap_remove(as_orderedmap* map, const as_val* key)
{
	if (map == NULL || ! is_valid_key_type(key)) {
		return -1;
	}

	if (! as_orderedmap_merge(map)) {
		return -1;
	}

	uint32_t ix;

	if (key_find(map->table, map->count, key, &ix, false)) {
		as_val_destroy(map->table[ix].key);
		as_val_destroy(map->table[ix].value);
		memmove(&map->table[ix], &map->table[ix + 1],
				sizeof(map_entry) * (map->count - (ix + 1)));
		map->count--;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jne 0xf766
movq %rsi, %r15
movq %rdi, %r14
movzbl 0x4(%rsi), %eax
leal -0x3(%rax), %ecx
cmpl $0x2, %ecx
jae 0xf756
movq %r14, %rdi
callq 0xf556
testb %al, %al
je 0xf766
movq 0x20(%r14), %rdi
movl 0x18(%r14), %esi
leaq 0x4(%rsp), %rcx
xorl %ebx, %ebx
movq %r15, %rdx
xorl %r8d, %r8d
callq 0xf214
testb %al, %al
je 0xf766
movq 0x20(%r14), %rax
movl 0x4(%rsp), %r12d
movq %r12, %r15
shlq $0x4, %r15
movq (%rax,%r15), %rdi
callq 0x84b0
movq 0x20(%r14), %rax
movq 0x8(%rax,%r15), %rdi
callq 0x84b0
movq 0x20(%r14), %rax
addq %rax, %r15
leal 0x1(%r12), %esi
movl 0x18(%r14), %edx
subl %esi, %edx
shlq $0x4, %rsi
addq %rax, %rsi
shlq $0x4, %rdx
movq %r15, %rdi
callq 0x8850
decl 0x18(%r14)
jmp 0xf766
cmpl $0x9, %eax
jne 0xf766
cmpl $0x4, 0x1c(%r15)
je 0xf6d6
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_orderedmap.c
// Function: as_orderedmap_foreach
bool
as_orderedmap_foreach(const as_orderedmap* map,
		as_map_foreach_callback callback, void* udata)
{
	if (map == NULL) {
		return false;
	}

	if (! as_orderedmap_merge((as_orderedmap*)map)) {
		return false;
	}

	for (uint32_t ix = 0; ix < map->count; ix++) {
		if (! callback(map->table[ix].key, map->table[ix].value, udata)) {
			return false;
		}
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xf7ee
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0xf556
testb %al, %al
je 0xf7ee
cmpl $0x0, 0x18(%r15)
sete %bpl
je 0xf7f0
movq 0x20(%r15), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movq %rbx, %rdx
callq *%r14
testb %al, %al
je 0xf7f0
movl $0x18, %eax
xorl %r12d, %r12d
incq %r12
movl 0x18(%r15), %ecx
cmpq %rcx, %r12
setae %bpl
jae 0xf7f0
leaq 0x10(%rax), %r13
movq 0x20(%r15), %rcx
movq -0x8(%rcx,%rax), %rdi
movq (%rcx,%rax), %rsi
movq %rbx, %rdx
callq *%r14
testb %al, %al
movq %r13, %rax
jne 0xf7be
jmp 0xf7f0
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_orderedmap.c
// Function: as_orderedmap_iterator_init
as_orderedmap_iterator*
as_orderedmap_iterator_init(as_orderedmap_iterator* it,
		const as_orderedmap* map)
{
	if (map != NULL && ! as_orderedmap_merge((as_orderedmap*)map)) {
		return NULL;
	}

	if (it == NULL) {
		return NULL;
	}

	as_iterator_init((as_iterator*)it, false, NULL,
			&as_orderedmap_iterator_hooks);
	it->ix = 0;
	it->map = map;

	return it;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0xf826
movq %r14, %rdi
callq 0xf556
testq %rbx, %rbx
setne %cl
testb %al, %cl
jne 0xf82b
xorl %ebx, %ebx
jmp 0xf849
testq %rbx, %rbx
je 0xf822
leaq 0x1034e(%rip), %rcx     # 0x1fb80
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8950
movl $0x0, 0x20(%rbx)
movq %r14, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_orderedmap.c
// Function: as_orderedmap_iterator_new
as_orderedmap_iterator*
as_orderedmap_iterator_new(const as_orderedmap* map)
{
	if (map != NULL && ! as_orderedmap_merge((as_orderedmap*)map)) {
		return NULL;
	}

	as_orderedmap_iterator* it =
			(as_orderedmap_iterator*)cf_malloc(sizeof(as_orderedmap_iterator));

	if (it == NULL) {
		return NULL;
	}

	as_iterator_init((as_iterator*)it, true, NULL,
			&as_orderedmap_iterator_hooks);
	it->ix = 0;
	it->map = map;

	return it;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0xf86c
movq %rbx, %rdi
callq 0xf556
testb %al, %al
je 0xf8a2
movl $0x40, %edi
callq 0x8080
testq %rax, %rax
je 0xf8a2
movq %rax, %r14
leaq 0x102fb(%rip), %rcx     # 0x1fb80
movq %rax, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x8950
movl $0x0, 0x20(%r14)
movq %rbx, 0x18(%r14)
jmp 0xf8a5
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_orderedmap.c
// Function: as_orderedmap_iterator_next
const as_val*
as_orderedmap_iterator_next(as_orderedmap_iterator* it)
{
	if (it->ix >= it->map->count) {
		return NULL;
	}

	as_pair_init(&it->pair, it->map->table[it->ix].key,
			it->map->table[it->ix].value);
	it->ix++;

	return (as_val*)&it->pair;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x20(%rdi), %eax
movq 0x18(%rdi), %rcx
cmpl 0x18(%rcx), %eax
jae 0xf90a
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
movq 0x20(%rcx), %rcx
shlq $0x4, %rax
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
movq %r14, %rdi
callq 0x83a0
incl 0x20(%rbx)
jmp 0xf90d
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_pair.c
// Function: as_pair_init
as_pair * as_pair_init(as_pair * pair, as_val * _1, as_val * _2)
{
	if ( !pair ) return pair;

	as_val_init((as_val *) pair, AS_PAIR, false);
	pair->_1 = _1;
	pair->_2 = _2;
	return pair;
}

// Assembly:
movq %rdi, %rax
testq %rdi, %rdi
je 0xf9b0
movw $0x8, 0x4(%rax)
movl $0x1, (%rax)
movq %rsi, 0x8(%rax)
movq %rdx, 0x10(%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_pair.c
// Function: as_pair_new
as_pair * as_pair_new(as_val * _1, as_val * _2)
{
	as_pair * pair = (as_pair *) cf_malloc(sizeof(as_pair));
	if ( !pair ) return pair;

	as_val_init((as_val *) pair, AS_PAIR, true);
	pair->_1 = _1;
	pair->_2 = _2;
	return pair;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x18, %edi
callq 0x8080
testq %rax, %rax
je 0xf9de
movw $0x108, 0x4(%rax)       # imm = 0x108
movl $0x1, (%rax)
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_pair.c
// Function: as_pair_val_tostring
char *as_pair_val_tostring(const as_val * v)
{
	as_pair * p = as_pair_fromval(v);
	if ( p == NULL ) return NULL;

	char * a = as_val_tostring(p->_1);
	size_t al = strlen(a);
	char * b = as_val_tostring(p->_2);
	size_t bl = strlen(b);
	
	size_t l = al + bl + 5;
	char * str = (char *) cf_malloc(sizeof(char) * l);
	if (!str) return str;

	strcpy(str, "(");
	strcpy(str+1, a);
	strcpy(str+1+al,", ");
	strcpy(str+1+al+2, b);
	strcpy(str+1+al+2+bl,")");
	*(str+1+al+2+bl+1) = '\0';
	
	cf_free(a);
	cf_free(b);

	return str;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %r14d, %r14d
testq %rdi, %rdi
je 0xfa27
cmpb $0x8, 0x4(%rdi)
cmoveq %rdi, %r14
testq %r14, %r14
je 0xfac4
movq 0x8(%r14), %rdi
callq 0x8290
movq %rax, %rbx
movq %rax, %rdi
callq 0x8260
movq %rax, %r12
movq 0x10(%r14), %rdi
callq 0x8290
movq %rax, %r15
movq %rax, %rdi
callq 0x8260
movq %rax, %r13
leaq 0x5(%r12,%rax), %rdi
callq 0x8080
movq %rax, %r14
testq %rax, %rax
je 0xfac7
movw $0x28, (%r14)
leaq 0x1(%r14), %rdi
movq %rbx, %rsi
callq 0x8180
leaq 0x1(%r14,%r12), %rbp
xorl %eax, %eax
movb %al, 0x3(%r14,%r12)
movw $0x202c, 0x1(%r14,%r12) # imm = 0x202C
leaq 0x3(%r14,%r12), %rdi
movq %r15, %rsi
callq 0x8180
movw $0x29, 0x2(%r13,%rbp)
xorl %eax, %eax
movb %al, 0x3(%r13,%rbp)
movq %rbx, %rdi
callq 0x8940
movq %r15, %rdi
callq 0x8940
jmp 0xfac7
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_password.c
// Function: as_password_prompt_hash
bool
as_password_prompt_hash(const char* password, char* hash)
{
	char pass[AS_PASSWORD_HASH_SIZE];
	
	if (password && *password) {
		as_strncpy(pass, password, sizeof(pass));
	}
	else {
		as_password_prompt(pass, sizeof(pass));
	}
	
	return as_password_get_constant_hash(pass, hash);
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
testq %rdi, %rdi
je 0xfbad
movq %rdi, %rsi
cmpb $0x0, (%rdi)
je 0xfbad
movq %rsp, %rdi
movl $0x40, %edx
callq 0x81a0
jmp 0xfbba
movq %rsp, %rdi
movl $0x40, %esi
callq 0xfbdd
leaq 0x87bf(%rip), %rsi      # 0x18380
movq %rsp, %rdi
movq %rbx, %rdx
movl $0x40, %ecx
callq 0x89d0
testq %rax, %rax
setne %al
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_password.c
// Function: as_password_prompt
static void
as_password_prompt(char* password, int size)
{
	// Turn off echo.
	as_set_echo(false);

	// Prompt for password.
	printf("Enter Password: ");
	fflush(stdout);

	// Read password until newline.
	char* s = fgets(password, size, stdin);

	if (s) {
		int len = (int)strlen(password);

		if (password[len - 1] == '\n') {
			password[--len] = 0;
		}
	}
	else {
		password[0] = 0;
	}

	// Restore echo.
	as_set_echo(true);
	printf("\n");
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x4(%rsp), %r14
xorl %edi, %edi
movq %r14, %rsi
callq 0x88e0
andb $-0x9, 0xc(%r14)
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rdx
callq 0x88f0
leaq 0x878d(%rip), %rdi      # 0x1839e
xorl %eax, %eax
callq 0x82b0
movq 0x10361(%rip), %rax     # 0x1ff80
movq (%rax), %rdi
callq 0x8690
movq 0x10362(%rip), %rax     # 0x1ff90
movq (%rax), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8490
testq %rax, %rax
je 0xfc55
movq %rbx, %rdi
callq 0x8260
decl %eax
cltq
cmpb $0xa, (%rbx,%rax)
jne 0xfc58
addq %rax, %rbx
movb $0x0, (%rbx)
leaq 0x4(%rsp), %rbx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x88e0
orb $0x8, 0xc(%rbx)
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x88f0
movl $0xa, %edi
callq 0x8100
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_queue.c
// Function: as_queue_init
bool
as_queue_init(as_queue* queue, uint32_t item_size, uint32_t capacity)
{
	queue->data = cf_malloc(capacity * item_size);
	
	if (! queue->data) {
		return false;
	}
	queue->capacity = capacity;
	queue->head = queue->tail = 0;
	queue->item_size = item_size;
	queue->total = 0;
	queue->flags = ITEMS_ON_HEAP;
	return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
movl %edx, %edi
imull %esi, %edi
callq 0x8080
movq %rax, (%rbx)
testq %rax, %rax
je 0xfcdb
movl %r14d, 0x8(%rbx)
movq $0x0, 0xc(%rbx)
movl %ebp, 0x14(%rbx)
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %rcx, 0x18(%rbx)
testq %rax, %rax
setne %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_queue.c
// Function: as_queue_create
as_queue*
as_queue_create(uint32_t item_size, uint32_t capacity)
{
	as_queue* queue = (as_queue*)cf_malloc(sizeof(as_queue));
	
	if (! queue) {
		return 0;
	}

	if (! as_queue_init(queue, item_size, capacity)) {
		cf_free(queue);
		return 0;
	}
	queue->flags = ITEMS_ON_HEAP | ALL_ON_HEAP;
	return queue;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movl %edi, %ebp
movl $0x20, %edi
callq 0x8080
testq %rax, %rax
je 0xfd3b
movq %rax, %rbx
movl %r14d, %edi
imull %ebp, %edi
callq 0x8080
movq %rax, (%rbx)
testq %rax, %rax
je 0xfd33
movl %r14d, 0x8(%rbx)
movq $0x0, 0xc(%rbx)
movl %ebp, 0x14(%rbx)
movabsq $0x300000000, %rax      # imm = 0x300000000
movq %rax, 0x18(%rbx)
jmp 0xfd3d
movq %rbx, %rdi
callq 0x8940
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq