LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_map.c
// Function: as_map_val_tostring
char * as_map_val_tostring(const as_val* v)
{
	as_map_val_tostring_data data = {
		.buf = NULL,
		.blk = 1024,
		.cap = 1024,
		.pos = 0,
		.sep = false
	};

	data.buf = (char *) cf_calloc(data.cap, sizeof(char));

	strcpy(data.buf, "{");
	data.pos += 1;
	
	if ( v ) {
		as_map_foreach((as_map*) v, as_map_val_tostring_foreach, &data);
	}

	if ( data.pos + 2 >= data.cap ) {
		data.buf = cf_realloc(data.buf, sizeof(char) * (data.cap + 2));
		data.cap += 2;
	}

	data.buf[data.pos] = '}';
	data.buf[data.pos + 1] = 0;
	
	return data.buf;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq 0xdd57(%rip), %rax      # 0x180a0
movq 0xdd48(%rip), %rdx      # 0x18098
movq 0xdd39(%rip), %rcx      # 0x18090
movq %rdi, %rbx
movl $0x400, %edi            # imm = 0x400
movl $0x1, %esi
movq %rax, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq %rcx, (%rsp)
callq 0x88b0
movl $0x1, %ecx
movl $0x400, %esi            # imm = 0x400
testq %rbx, %rbx
movq %rax, (%rsp)
movw $0x7b, (%rax)
movl $0x1, 0x10(%rsp)
je 0xa3c7
movq 0x10(%rbx), %rdx
testq %rdx, %rdx
je 0xa3c7
movq 0x40(%rdx), %r8
testq %r8, %r8
je 0xa3c7
movq %rsp, %r14
leaq 0x4e(%rip), %rsi        # 0xa401
movq %rbx, %rdi
movq %r14, %rdx
callq *%r8
movl 0x10(%r14), %ecx
movl 0xc(%r14), %esi
movq (%r14), %rax
leal 0x2(%rcx), %edx
cmpl %esi, %edx
jb 0xa3e1
addl $0x2, %esi
movq %rax, %rdi
callq 0x8510
movq %rax, (%rsp)
movl 0x10(%rsp), %ecx
movl %ecx, %ecx
movb $0x7d, (%rax,%rcx)
movl 0x10(%rsp), %ecx
movq (%rsp), %rax
incl %ecx
movb $0x0, (%rax,%rcx)
movq (%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_map.c
// Function: as_map_val_tostring_foreach
static bool as_map_val_tostring_foreach(const as_val* key, const as_val* val, void* udata)
{
	as_map_val_tostring_data * data = (as_map_val_tostring_data *) udata;

	char * keystr = as_val_tostring(key);
	if (!keystr) {
		return false;
	}
	int keylen = (int)strlen(keystr);

	char * valstr = as_val_tostring(val);
    if (!valstr) {
		cf_free(keystr);
    	return false;
    }
	int vallen = (int)strlen(valstr);

	uint32_t entlen = keylen + 2 + vallen + 2;

	if ( data->pos + entlen >= data->cap ) {
		uint32_t adj = entlen > data->blk ? entlen : data->blk;
		data->buf = cf_realloc(data->buf, sizeof(char) * (data->cap + adj));
		memset(data->buf + data->cap, 0, sizeof(char) * adj);
		data->cap += adj;
	}

	if ( data->sep ) {
		data->buf[data->pos] = ',';
		data->buf[data->pos + 1] = ' ';
		data->pos += 2;
	}

	strcpy(data->buf + data->pos, keystr);
	data->pos += keylen;

	strcpy(data->buf + data->pos, ":");
	data->pos += 1;

	strcpy(data->buf + data->pos, valstr);
	data->pos += vallen;

	data->sep = true;

	cf_free(keystr);
	keystr = NULL;

	cf_free(valstr);
	valstr = NULL;

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
callq 0x8290
testq %rax, %rax
je 0xa508
movq %rax, %rdi
movq %rax, %r14
callq 0x8260
movq %r15, %rdi
movq %rax, %r12
callq 0x8290
testq %rax, %rax
setne %bpl
je 0xa50c
movq %rax, %rdi
movq %rax, %r15
callq 0x8260
movq %rax, %r13
leal (%r12,%rax), %ecx
movl 0x10(%rbx), %eax
movl 0xc(%rbx), %esi
leal 0x4(%rax,%rcx), %ecx
cmpl %esi, %ecx
jb 0xa4a0
leal 0x4(%r12,%r13), %eax
movq %r13, (%rsp)
movl 0x8(%rbx), %r13d
movq (%rbx), %rdi
cmpl %r13d, %eax
cmoval %eax, %r13d
addl %r13d, %esi
callq 0x8510
movq %rax, (%rbx)
xorl %esi, %esi
movq %r13, %rdx
movl 0xc(%rbx), %edi
addq %rax, %rdi
callq 0x8400
addl %r13d, 0xc(%rbx)
movq (%rsp), %r13
movl 0x10(%rbx), %eax
cmpb $0x1, 0x14(%rbx)
jne 0xa4c4
movq (%rbx), %rcx
movl %eax, %eax
movb $0x2c, (%rcx,%rax)
movl 0x10(%rbx), %ecx
movq (%rbx), %rax
incl %ecx
movb $0x20, (%rax,%rcx)
movl 0x10(%rbx), %eax
addl $0x2, %eax
movl %eax, 0x10(%rbx)
movl %eax, %edi
movq %r14, %rsi
addq (%rbx), %rdi
callq 0x8180
addl 0x10(%rbx), %r12d
movq %r15, %rsi
movl %r12d, 0x10(%rbx)
movq (%rbx), %rax
movw $0x3a, (%rax,%r12)
movl 0x10(%rbx), %edi
incl %edi
movl %edi, 0x10(%rbx)
addq (%rbx), %rdi
callq 0x8180
addl %r13d, 0x10(%rbx)
movq %r14, %rdi
movb $0x1, 0x14(%rbx)
callq 0x8940
jmp 0xa50f
xorl %ebp, %ebp
jmp 0xa517
movq %r14, %r15
movq %r15, %rdi
callq 0x8940
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_O3/aerospike[P]aerospike-common/src/main/aerospike/as_module.c
// Function: as_module_configure
int as_module_configure(as_module * m, void * config) {
    as_module_event e = {
        .type = AS_MODULE_EVENT_CONFIGURE,
        .data.config = config
    };
    return as_module_update(m, &e);
}

// Assembly:
subq $0x18, %rsp
movl $0x1, %eax
testq %rdi, %rdi
movl $0x0, (%rsp)
movq %rsi, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
je 0xa58c
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0xa58c
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
je 0xa58c
movq %rsp, %rsi
callq *%rcx
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_val_cmp
msgpack_compare_t
as_val_cmp(const as_val* v1, const as_val* v2)
{
	as_val_t t1 = as_val_type(v1);
	as_val_t t2 = as_val_type(v2);

	MSGPACK_COMPARE_RET_LESS_OR_GREATER(t1, t2);

	if (t1 == AS_CMP_WILDCARD || t2 == AS_CMP_WILDCARD) {
		return MSGPACK_COMPARE_EQUAL;
	}

	switch (t1) {
	case AS_NIL:
		break;
	case AS_BOOLEAN:
		MSGPACK_COMPARE_RET_LESS_OR_GREATER(
				(unsigned int)((as_boolean*)v1)->value,
				(unsigned int)((as_boolean*)v2)->value);
		break;
	case AS_INTEGER:
		MSGPACK_COMPARE_RET_LESS_OR_GREATER(
				as_integer_get((const as_integer*)v1),
				as_integer_get((const as_integer*)v2));
		break;
	case AS_DOUBLE:
		MSGPACK_COMPARE_RET_LESS_OR_GREATER(as_double_get((const as_double*)v1),
				as_double_get((const as_double*)v2));
		break;
	case AS_STRING:
		return str_cmp(as_string_get((const as_string*)v1),
				as_string_get((const as_string*)v2));
	case AS_GEOJSON:
		return str_cmp(as_geojson_get((const as_geojson*)v1),
				as_geojson_get((const as_geojson*)v2));
	case AS_BYTES:
		return as_bytes_cmp((as_bytes*)v1, (as_bytes*)v2);
	case AS_LIST:
		return as_list_cmp((as_list*)v1, (as_list*)v2);
	case AS_MAP:
		return as_map_cmp((as_map*)v1, (as_map*)v2);
	default:
		return MSGPACK_COMPARE_ERROR;
	}

	return MSGPACK_COMPARE_EQUAL;
}

// Assembly:
pushq %rax
xorl %edx, %edx
testq %rdi, %rdi
movl $0x0, %ecx
je 0xa621
movzbl 0x4(%rdi), %ecx
testq %rsi, %rsi
je 0xa62a
movzbl 0x4(%rsi), %edx
xorl %eax, %eax
cmpl %edx, %ecx
jb 0xa64c
movl $0x2, %eax
ja 0xa64c
cmpl $0xd, %ecx
sete %al
cmpl $0xd, %edx
sete %dl
orb %al, %dl
movl $0x1, %eax
je 0xa64e
popq %rcx
retq
decl %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpl $0xa, %ecx
ja 0xa64c
leaq 0xda47(%rip), %rdx      # 0x180a8
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x10(%rdi), %rdi
movq 0x10(%rsi), %rsi
callq 0x8560
xorl %edx, %edx
testl %eax, %eax
movl %eax, %ecx
setne %dl
xorl %eax, %eax
incl %edx
testl %ecx, %ecx
cmovnsl %edx, %eax
jmp 0xa64c
testq %rdi, %rdi
je 0xa70f
movq 0x8(%rdi), %rcx
jmp 0xa711
popq %rax
jmp 0xa75b
movb 0x8(%rsi), %al
cmpb %al, 0x8(%rdi)
movl $0x0, %eax
jb 0xa64c
jmp 0xa6f6
xorpd %xmm0, %xmm0
testq %rdi, %rdi
xorpd %xmm1, %xmm1
je 0xa6bd
movsd 0x8(%rdi), %xmm1
testq %rsi, %rsi
je 0xa6c7
movsd 0x8(%rsi), %xmm0
ucomisd %xmm1, %xmm0
movl $0x0, %eax
ja 0xa64c
xorpd %xmm0, %xmm0
testq %rdi, %rdi
xorpd %xmm1, %xmm1
je 0xa6e8
movsd 0x8(%rdi), %xmm1
testq %rsi, %rsi
je 0xa6f2
movsd 0x8(%rsi), %xmm0
ucomisd %xmm0, %xmm1
movl $0x2, %eax
ja 0xa64c
jmp 0xa751
popq %rax
jmp 0xa7ce
popq %rax
jmp 0xa8fc
xorl %ecx, %ecx
xorl %eax, %eax
testq %rsi, %rsi
je 0xa71e
movq 0x8(%rsi), %rdx
jmp 0xa720
xorl %edx, %edx
cmpq %rdx, %rcx
jl 0xa64c
testq %rdi, %rdi
je 0xa734
movq 0x8(%rdi), %rax
jmp 0xa736
xorl %eax, %eax
testq %rsi, %rsi
je 0xa741
movq 0x8(%rsi), %rcx
jmp 0xa743
xorl %ecx, %ecx
cmpq %rcx, %rax
movl $0x2, %eax
jg 0xa64c
movl $0x1, %eax
jmp 0xa64c
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_bytes_cmp
static inline msgpack_compare_t
as_bytes_cmp(as_bytes* v1, as_bytes* v2)
{
	uint32_t s1 = as_bytes_size((const as_bytes*)v1);
	uint32_t s2 = as_bytes_size((const as_bytes*)v2);
	uint32_t min_sz = s1 < s2 ? s1 : s2;
	int c = memcmp(as_bytes_get((const as_bytes*)v1),
			as_bytes_get((const as_bytes*)v2), min_sz);

	MSGPACK_COMPARE_RET_LESS_OR_GREATER(c, 0);
	MSGPACK_COMPARE_RET_LESS_OR_GREATER(s1, s2);

	return MSGPACK_COMPARE_EQUAL;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %ebp, %ebp
testq %rdi, %rdi
movl $0x0, %r14d
je 0xa770
movl 0xc(%rdi), %r14d
testq %rsi, %rsi
je 0xa778
movl 0xc(%rsi), %ebp
cmpl %ebp, %r14d
movl %ebp, %eax
cmovbl %r14d, %eax
testq %rdi, %rdi
je 0xa78c
movq 0x10(%rdi), %rdi
jmp 0xa78e
xorl %edi, %edi
xorl %ebx, %ebx
testq %rsi, %rsi
je 0xa79b
movq 0x10(%rsi), %rsi
jmp 0xa79d
xorl %esi, %esi
movl %eax, %edx
callq 0x8480
testl %eax, %eax
js 0xa7c7
cmpl %ebp, %r14d
setb %cl
xorl %ebx, %ebx
testl %eax, %eax
setne %al
orb %al, %cl
je 0xa7bf
movb %al, %bl
addl %ebx, %ebx
jmp 0xa7c7
xorl %ebx, %ebx
cmpl %r14d, %ebp
adcl $0x1, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_list_cmp
static msgpack_compare_t
as_list_cmp(const as_list* list1, const as_list* list2)
{
	uint32_t s1 = as_list_size(list1);
	uint32_t s2 = as_list_size(list2);
	uint32_t min_sz = s1 < s2 ? s1 : s2;

	for (uint32_t i = 0; i < min_sz; i++) {
		as_val* v1 = as_list_get(list1, i);
		as_val* v2 = as_list_get(list2, i);

		if (as_val_type(v1) == AS_CMP_WILDCARD ||
				as_val_type(v2) == AS_CMP_WILDCARD) {
			return MSGPACK_COMPARE_EQUAL;
		}

		msgpack_compare_t cmp = as_val_cmp(v1, v2);

		if (cmp != MSGPACK_COMPARE_EQUAL) {
			return cmp;
		}
	}

	MSGPACK_COMPARE_RET_LESS_OR_GREATER(s1, s2);

	return MSGPACK_COMPARE_EQUAL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %r12d, %r12d
movq %rsi, %r14
movq %rdi, %r15
testq %rdi, %rdi
movl $0x0, %ebx
je 0xa805
movq 0x10(%r15), %rax
testq %rax, %rax
je 0xa805
movq 0x10(%rax), %rax
testq %rax, %rax
je 0xa805
movq %r15, %rdi
callq *%rax
movl %eax, %ebx
testq %r14, %r14
je 0xa824
movq 0x10(%r14), %rax
testq %rax, %rax
je 0xa824
movq 0x10(%rax), %rax
testq %rax, %rax
je 0xa824
movq %r14, %rdi
callq *%rax
movl %eax, %r12d
cmpl %r12d, %ebx
movl %r12d, %ebp
movl %ebx, 0x4(%rsp)
cmovbl %ebx, %ebp
testl %ebp, %ebp
je 0xa8c2
movl %r12d, (%rsp)
xorl %r12d, %r12d
movb $0x1, %bl
testq %r15, %r15
je 0xa866
movq 0x10(%r15), %rax
testq %rax, %rax
je 0xa866
movq 0x18(%rax), %rax
testq %rax, %rax
je 0xa866
movq %r15, %rdi
movl %r12d, %esi
callq *%rax
movq %rax, %r13
jmp 0xa869
xorl %r13d, %r13d
testq %r14, %r14
je 0xa88d
movq 0x10(%r14), %rax
testq %rax, %rax
je 0xa88d
movq 0x18(%rax), %rax
testq %rax, %rax
je 0xa88d
movq %r14, %rdi
movl %r12d, %esi
callq *%rax
movq %rax, %rsi
jmp 0xa88f
xorl %esi, %esi
testq %r13, %r13
je 0xa89b
cmpb $0xd, 0x4(%r13)
je 0xa8c8
testq %rsi, %rsi
je 0xa8a6
cmpb $0xd, 0x4(%rsi)
je 0xa8c8
movq %r13, %rdi
callq 0x8090
cmpl $0x1, %eax
jne 0xa8cd
incl %r12d
cmpl %ebp, %r12d
setb %bl
jne 0xa842
xorl %eax, %eax
jmp 0xa8cd
xorl %ebx, %ebx
xorl %eax, %eax
jmp 0xa8d1
movl $0x1, %eax
movl (%rsp), %r12d
movl 0x4(%rsp), %edx
xorl %ecx, %ecx
cmpl %r12d, %edx
seta %cl
incl %ecx
testb $0x1, %bl
cmovnel %eax, %ecx
cmpl %r12d, %edx
cmovbl %eax, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_map_cmp
static msgpack_compare_t
as_map_cmp(const as_map* map1, const as_map* map2)
{
	// Map ordering documented at https://docs.aerospike.com/server/guide/data-types/cdt-ordering
	uint32_t size1 = as_map_size(map1);
	uint32_t size2 = as_map_size(map2);

	MSGPACK_COMPARE_RET_LESS_OR_GREATER(size1, size2);

	uint32_t sz = as_map_size(map1);
	as_orderedmap_iterator it1;
	as_orderedmap_iterator it2;

	as_orderedmap_iterator_init(&it1, (const as_orderedmap*)map1);
	as_orderedmap_iterator_init(&it2, (const as_orderedmap*)map2);

	for (uint32_t i = 0; i < sz; i++) {
		as_pair* p1 = (as_pair*)as_orderedmap_iterator_next(&it1);
		as_pair* p2 = (as_pair*)as_orderedmap_iterator_next(&it2);
		msgpack_compare_t cmp = as_val_cmp(as_pair_1(p1), as_pair_1(p2));

		if (cmp != MSGPACK_COMPARE_EQUAL) {
			return cmp;
		}
	}

	return MSGPACK_COMPARE_EQUAL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
xorl %ebp, %ebp
movq %rsi, %rbx
movq %rdi, %r14
testq %rdi, %rdi
movl $0x0, %r12d
je 0xa938
movq 0x10(%r14), %rax
testq %rax, %rax
je 0xa938
movq 0x10(%rax), %rax
testq %rax, %rax
je 0xa938
movq %r14, %rdi
callq *%rax
movl %eax, %r12d
testq %rbx, %rbx
je 0xa956
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xa956
movq 0x10(%rax), %rax
testq %rax, %rax
je 0xa956
movq %rbx, %rdi
callq *%rax
movl %eax, %ebp
xorl %r15d, %r15d
cmpl %ebp, %r12d
jb 0xa9f9
movl $0x2, %r15d
ja 0xa9f9
xorl %ebp, %ebp
testq %r14, %r14
je 0xa98e
movq 0x10(%r14), %rax
testq %rax, %rax
je 0xa98e
movq 0x10(%rax), %rax
testq %rax, %rax
je 0xa98e
movq %r14, %rdi
callq *%rax
movl %eax, %ebp
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x84d0
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x84d0
movl $0x1, %r15d
testl %ebp, %ebp
je 0xa9f9
leaq 0x40(%rsp), %rbx
movq %rsp, %r14
movq %rbx, %rdi
callq 0x8250
movq %r14, %rdi
movq %rax, %r12
callq 0x8250
testq %r12, %r12
je 0xa9d7
movq 0x8(%r12), %rdi
jmp 0xa9d9
xorl %edi, %edi
testq %rax, %rax
je 0xa9e4
movq 0x8(%rax), %rsi
jmp 0xa9e6
xorl %esi, %esi
callq 0x8090
cmpl $0x1, %eax
jne 0xa9f6
decl %ebp
jne 0xa9b8
jmp 0xa9f9
movl %eax, %r15d
movl %r15d, %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: unpack_blob
static int
unpack_blob(as_unpacker *pk, uint32_t size, as_val **val)
{
	unsigned char type = 0;

	if (size != 0) {
		type = pk->buffer[pk->offset++];
		size--;
	}

	if (type == AS_BYTES_STRING) {
		char *v = cf_strndup((const char *)pk->buffer + pk->offset, size);
		*val = (as_val*)as_string_new(v, true);
	}
	else if (type == AS_BYTES_GEOJSON) {
		char *v = cf_strndup((const char *)pk->buffer + pk->offset, size);
		*val = (as_val *)as_geojson_new(v, true);
	}
	else {
		as_bytes *b;

		if (size != 0) {
			unsigned char *buf = cf_malloc(size);

			if (! buf) {
				return -1;
			}

			memcpy(buf, pk->buffer + pk->offset, size);
			b = as_bytes_new_wrap(buf, size, true);

			if (! b) {
				cf_free(buf);
				return -2;
			}
		}
		else {
			b = as_bytes_new_wrap(NULL, 0, false);
		}

		if (! b) {
			return -3;
		}

		b->type = (as_bytes_type) type;
		*val = (as_val *)b;
	}

	if (! *val) {
		return -4;
	}

	pk->offset += size;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
testl %esi, %esi
movl $0x0, %r13d
je 0xb565
movl 0x8(%rbx), %ecx
movq (%rbx), %rdi
movl %esi, %ebp
decl %ebp
leal 0x1(%rcx), %eax
movl %eax, 0x8(%rbx)
movzbl (%rdi,%rcx), %r13d
cmpl $0x17, %r13d
je 0xb4f2
cmpl $0x3, %r13d
jne 0xb51a
movl %eax, %eax
movl %ebp, %esi
addq %rax, %rdi
callq 0x8420
movq %rax, %rdi
movl $0x1, %esi
callq 0x8060
jmp 0xb50b
movl %eax, %eax
movl %ebp, %esi
addq %rax, %rdi
callq 0x8420
movq %rax, %rdi
movl $0x1, %esi
callq 0x8380
testq %rax, %rax
movq %rax, (%r14)
jne 0xb57e
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
jmp 0xb591
testl %ebp, %ebp
je 0xb565
movl %ebp, %r12d
movq %r12, %rdi
callq 0x8080
testq %rax, %rax
je 0xb58c
movl 0x8(%rbx), %esi
movq %rax, %rdi
movq %r12, %rdx
movq %rax, %r15
addq (%rbx), %rsi
callq 0x85c0
movq %r15, %rdi
movl %ebp, %esi
movl $0x1, %edx
callq 0x8070
testq %rax, %rax
jne 0xb577
movq %r15, %rdi
callq 0x8940
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0xb591
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8070
testq %rax, %rax
je 0xb585
xorl %ebp, %ebp
movl %r13d, 0x1c(%rax)
movq %rax, (%r14)
addl %ebp, 0x8(%rbx)
xorl %eax, %eax
jmp 0xb591
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
jmp 0xb591
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: unpack_list
static int
unpack_list(as_unpacker *pk, uint32_t size, as_val **val)
{
	uint8_t flags = 0;

	// Skip ext element key which is only at the start for metadata.
	if (size != 0 && as_unpack_peek_is_ext(pk)) {
		as_msgpack_ext ext;

		if (as_unpack_ext(pk, &ext) != 0) {
			return -1;
		}

		flags = ext.type;
		size--;
	}

	as_arraylist *list = as_arraylist_new(size, 8);

	if (! list) {
		return -2;
	}

	for (uint32_t i = 0; i < size; i++) {
		as_val *v = NULL;

		if (as_unpack_val(pk, &v) != 0 || ! v) {
			as_arraylist_destroy(list);
			return -3;
		}

		as_arraylist_set(list, i, v);
	}

	*val = (as_val *)list;
	list->_.flags = flags;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r12
testl %esi, %esi
je 0xb601
movl 0x8(%rdi), %eax
movl %esi, %ebp
movq %rdi, %r14
cmpl 0xc(%rdi), %eax
jae 0xb619
movq (%r14), %rcx
xorl %ebx, %ebx
movzbl (%rcx,%rax), %eax
addl $0xffffff39, %eax       # imm = 0xFFFFFF39
cmpl $0x11, %eax
ja 0xb61b
movl $0x3e007, %ecx          # imm = 0x3E007
btl %eax, %ecx
jae 0xb61b
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x8a20
testl %eax, %eax
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0xb69d
movb 0x20(%rsp), %bl
decl %ebp
jmp 0xb61b
xorl %edi, %edi
movl $0x8, %esi
xorl %ebx, %ebx
callq 0x8520
testq %rax, %rax
je 0xb689
movq %rax, %r15
jmp 0xb67a
xorl %ebx, %ebx
movl %ebp, %edi
movl $0x8, %esi
callq 0x8520
testq %rax, %rax
je 0xb689
movq %rax, %r15
testl %ebp, %ebp
je 0xb67a
movq %r12, 0x8(%rsp)
xorl %r12d, %r12d
leaq 0x10(%rsp), %r13
movq %r14, %rdi
movq %r13, %rsi
movq $0x0, 0x10(%rsp)
callq 0x8650
testl %eax, %eax
jne 0xb690
movq 0x10(%rsp), %rdx
testq %rdx, %rdx
je 0xb690
movq %r15, %rdi
movl %r12d, %esi
callq 0x8b20
incl %r12d
cmpl %r12d, %ebp
jne 0xb640
movq 0x8(%rsp), %r12
movzbl %bl, %eax
movq %r15, (%r12)
movl %eax, 0x8(%r15)
xorl %eax, %eax
jmp 0xb69d
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0xb69d
movq %r15, %rdi
callq 0x87a0
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_pack_nil
static inline int
pack_byte(as_packer *pk, uint8_t val, bool resize)
{
	if (pk->buffer) {
		if (pk->offset + 1 > pk->capacity) {
			if (! resize || pack_resize(pk, 1) != 0) {
				return -1;
			}
		}
		*(pk->buffer + pk->offset) = val;
	}
	return advance_offset(pk, 1);
}

// Assembly:
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0xb925
movl 0x18(%rdi), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leal 0x1(%rdx), %esi
cmpl 0x1c(%rdi), %esi
ja 0xb93c
movb $-0x40, (%rcx,%rdx)
movl 0x18(%rdi), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x7ffffffe, %ecx       # imm = 0x7FFFFFFE
ja 0xb93c
incl %ecx
xorl %eax, %eax
movl %ecx, 0x18(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_pack_append
static inline int
pack_append(as_packer *pk, const unsigned char *src, uint32_t sz, bool resize)
{
	if (pk->buffer) {
		if (pk->offset + sz > pk->capacity) {
			if (! resize || pack_resize(pk, sz) != 0) {
				return -1;
			}
		}
		memcpy(pk->buffer + pk->offset, src, (size_t)sz);
	}
	return advance_offset(pk, sz);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0xca24
movl 0x18(%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leal (%rcx,%rdx), %r8d
cmpl 0x1c(%rbx), %r8d
ja 0xca40
movl %edx, %r14d
addq %rcx, %rdi
movq %r14, %rdx
callq 0x85c0
jmp 0xca27
movl %edx, %r14d
movl 0x18(%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq %r14, %rcx
cmpq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
ja 0xca40
xorl %eax, %eax
movl %ecx, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_pack_int64_size
uint32_t
as_pack_int64_size(int64_t val)
{
	if (val >= 0) {
		return as_pack_uint64_size((uint64_t)val);
	}

	if (val >= -(1LL << 5)) {
		return 1;
	}

	if (val >= -(1LL << 7)) {
		return 1 + 1;
	}

	if (val >= -(1LL << 15)) {
		return 1 + 2;
	}

	if (val >= -(1LL << 31)) {
		return 1 + 4;
	}

	return 1 + 8;
}

// Assembly:
movl $0x1, %eax
testq %rdi, %rdi
js 0xba67
cmpq $0x80, %rdi
jb 0xba9c
movl $0x2, %eax
cmpq $0x100, %rdi            # imm = 0x100
jb 0xba9c
movl $0x3, %eax
cmpq $0x10000, %rdi          # imm = 0x10000
jb 0xba9c
xorl %eax, %eax
shrq $0x20, %rdi
setne %al
jmp 0xba95
cmpq $-0x21, %rdi
ja 0xba9c
movl $0x2, %eax
cmpq $-0x81, %rdi
ja 0xba9c
movl $0x3, %eax
cmpq $-0x8001, %rdi          # imm = 0xFFFF7FFF
ja 0xba9c
xorl %eax, %eax
cmpq $-0x80000000, %rdi      # imm = 0x80000000
setb %al
leal 0x5(,%rax,4), %eax
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_pack_float
static inline int
pack_type_uint32(as_packer *pk, unsigned char type, uint32_t val, bool resize)
{
	if (pk->buffer) {
		if (pk->offset + 5 > pk->capacity) {
			if (! resize || pack_resize(pk, 5) != 0) {
				return -1;
			}
		}
		uint32_t swapped = cf_swap_to_be32(val);
		unsigned char *p = pk->buffer + pk->offset;
		*p++ = type;
		memcpy(p, &swapped, 4);
	}
	return advance_offset(pk, 5);
}

// Assembly:
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0xbf2a
movl 0x18(%rdi), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leal 0x5(%rdx), %esi
cmpl 0x1c(%rdi), %esi
ja 0xbf42
movd %xmm0, %eax
movb $-0x36, (%rcx,%rdx)
bswapl %eax
movl %eax, 0x1(%rcx,%rdx)
movl 0x18(%rdi), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x7ffffffa, %ecx       # imm = 0x7FFFFFFA
ja 0xbf42
addl $0x5, %ecx
xorl %eax, %eax
movl %ecx, 0x18(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_pack_double
static inline int
pack_type_uint64(as_packer *pk, unsigned char type, uint64_t val, bool resize)
{
	if (pk->buffer) {
		if (pk->offset + 9 > pk->capacity) {
			if (! resize || pack_resize(pk, 9) != 0) {
				return -1;
			}
		}
		uint64_t swapped = cf_swap_to_be64(val);
		unsigned char *p = pk->buffer + pk->offset;
		*p++ = type;
		memcpy(p, &swapped, 8);
	}
	return advance_offset(pk, 9);
}

// Assembly:
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0xbf6d
movl 0x18(%rdi), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leal 0x9(%rdx), %esi
cmpl 0x1c(%rdi), %esi
ja 0xbf85
movq %xmm0, %rax
movb $-0x35, (%rcx,%rdx)
bswapq %rax
movq %rax, 0x1(%rcx,%rdx)
movl 0x18(%rdi), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x7ffffff6, %ecx       # imm = 0x7FFFFFF6
ja 0xbf85
addl $0x9, %ecx
xorl %eax, %eax
movl %ecx, 0x18(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_pack_str
int
as_pack_str(as_packer *pk, const uint8_t *buf, uint32_t sz)
{
	int rc = pack_string_header(pk, sz, false);

	if (rc == 0 && buf) {
		return pack_append(pk, buf, sz, false);
	}

	return rc;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movl %edx, %r15d
movl %edx, %esi
xorl %edx, %edx
movq %rdi, %rbx
callq 0xc10b
testl %eax, %eax
setne %cl
testq %r14, %r14
sete %dl
orb %cl, %dl
jne 0xc105
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xc0e9
movl 0x18(%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leal (%rcx,%r15), %edx
cmpl 0x1c(%rbx), %edx
ja 0xc105
movl %r15d, %r15d
addq %rcx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x85c0
jmp 0xc0ec
movl %r15d, %r15d
movl 0x18(%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq %r15, %rcx
cmpq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
ja 0xc105
xorl %eax, %eax
movl %ecx, 0x18(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: pack_string_header
static int
pack_string_header(as_packer *pk, uint32_t size, bool resize)
{
	if (size < 32) {
		return pack_byte(pk, (uint8_t)(0xa0 | size), resize);
	}

	if (size < 256) {
		return pack_type_uint8(pk, 0xd9, (uint8_t)size, resize);
	}

	if (size < 65536) {
		return pack_type_uint16(pk, 0xda, (uint16_t)size, resize);
	}

	return pack_type_uint32(pk, 0xdb, size, resize);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x1f, %esi
ja 0xc17b
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xc161
movl 0x18(%rbx), %ecx
movl %esi, %r14d
leal 0x1(%rcx), %esi
cmpl 0x1c(%rbx), %esi
jbe 0xc157
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %dl, %dl
je 0xc2b7
movq %rbx, %rdi
movl $0x1, %esi
callq 0xd5db
testl %eax, %eax
jne 0xc2b7
movq 0x10(%rbx), %rax
movl 0x18(%rbx), %ecx
orb $-0x60, %r14b
movl %ecx, %ecx
movb %r14b, (%rax,%rcx)
movl 0x18(%rbx), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
ja 0xc2b7
incl %eax
jmp 0xc2b2
cmpl $0xff, %esi
ja 0xc1e9
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xc1ce
movl 0x18(%rbx), %ecx
movl %esi, %r14d
leal 0x2(%rcx), %esi
cmpl 0x1c(%rbx), %esi
jbe 0xc1c3
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %dl, %dl
je 0xc2b7
movq %rbx, %rdi
movl $0x2, %esi
callq 0xd5db
testl %eax, %eax
jne 0xc2b7
movq 0x10(%rbx), %rax
movl 0x18(%rbx), %ecx
movl %ecx, %ecx
movb $-0x27, (%rax,%rcx)
movb %r14b, 0x1(%rax,%rcx)
movl 0x18(%rbx), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x7ffffffd, %eax       # imm = 0x7FFFFFFD
ja 0xc2b7
addl $0x2, %eax
jmp 0xc2b2
cmpl $0xffff, %esi           # imm = 0xFFFF
ja 0xc25a
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xc246
movl 0x18(%rbx), %ecx
movl %esi, %r14d
leal 0x3(%rcx), %esi
cmpl 0x1c(%rbx), %esi
jbe 0xc231
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %dl, %dl
je 0xc2b7
movq %rbx, %rdi
movl $0x3, %esi
callq 0xd5db
testl %eax, %eax
jne 0xc2b7
movq 0x10(%rbx), %rax
movl 0x18(%rbx), %ecx
movl %r14d, %edx
movl %ecx, %ecx
rolw $0x8, %dx
movb $-0x26, (%rax,%rcx)
movb %dl, 0x1(%rax,%rcx)
movb %dh, 0x2(%rax,%rcx)
movl 0x18(%rbx), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x7ffffffc, %eax       # imm = 0x7FFFFFFC
ja 0xc2b7
addl $0x3, %eax
jmp 0xc2b2
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xc2a0
movl 0x18(%rbx), %ecx
movl %esi, %r14d
leal 0x5(%rcx), %esi
cmpl 0x1c(%rbx), %esi
jbe 0xc292
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %dl, %dl
je 0xc2b7
movq %rbx, %rdi
movl $0x5, %esi
callq 0xd5db
testl %eax, %eax
jne 0xc2b7
movq 0x10(%rbx), %rax
movl 0x18(%rbx), %ecx
movl %ecx, %ecx
bswapl %r14d
movb $-0x25, (%rax,%rcx)
movl %r14d, 0x1(%rax,%rcx)
movl 0x18(%rbx), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x7ffffffa, %eax       # imm = 0x7FFFFFFA
ja 0xc2b7
addl $0x5, %eax
xorl %ebp, %ebp
movl %eax, 0x18(%rbx)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_pack_str_with_type
int
as_pack_str_with_type(as_packer *pk, uint8_t type, const uint8_t *buf,
		uint32_t sz)
{
	int rc = pack_string_header(pk, sz + 1, false);

	if (rc == 0 && buf) {
		if ((rc = pack_byte(pk, type, false)) == 0) {
			return pack_append(pk, buf, sz, false);
		}
	}

	return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r15d
movq %rdx, %r14
movl %esi, %r12d
xorl %edx, %edx
movq %rdi, %rbx
leal 0x1(%r15), %esi
callq 0xc10b
testl %eax, %eax
movl %eax, %ebp
setne %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0xc35e
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xc30b
movl 0x18(%rbx), %ecx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leal 0x1(%rcx), %edx
cmpl 0x1c(%rbx), %edx
ja 0xc35e
movb %r12b, (%rax,%rcx)
movl 0x18(%rbx), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq $0x7ffffffe, %rax       # imm = 0x7FFFFFFE
ja 0xc35e
incq %rax
movl %eax, 0x18(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xc349
leal (%rax,%r15), %ecx
cmpl 0x1c(%rbx), %ecx
ja 0xc35e
movl %r15d, %r15d
addq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x85c0
movl 0x18(%rbx), %eax
jmp 0xc34c
movl %r15d, %r15d
movl %eax, %eax
addq %r15, %rax
cmpq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
ja 0xc35e
xorl %ebp, %ebp
movl %eax, 0x18(%rbx)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_pack_bin
int
as_pack_bin(as_packer *pk, const uint8_t *buf, uint32_t sz)
{
	int rc;

	if (sz < (1 << 8)) {
		rc = pack_type_uint8(pk, 0xc4, (uint8_t)sz, false);
	}
	else if (sz < (1 << 16)) {
		rc = pack_type_uint16(pk, 0xc5, (uint16_t)sz, false);
	}
	else {
		rc = pack_type_uint32(pk, 0xc6, sz, false);
	}

	if (rc == 0 && buf) {
		return pack_append(pk, buf, sz, false);
	}

	return rc;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0xff, %edx
ja 0xc3bb
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0xc39f
movl 0x18(%rbx), %edi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leal 0x2(%rdi), %r8d
cmpl 0x1c(%rbx), %r8d
ja 0xc499
movb $-0x3c, (%rcx,%rdi)
movb %dl, 0x1(%rcx,%rdi)
movl 0x18(%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x7ffffffd, %ecx       # imm = 0x7FFFFFFD
ja 0xc499
addl $0x2, %ecx
jmp 0xc447
cmpl $0xffff, %edx           # imm = 0xFFFF
ja 0xc40d
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0xc3f4
movl 0x18(%rbx), %edi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leal 0x3(%rdi), %r8d
cmpl 0x1c(%rbx), %r8d
ja 0xc499
movl %edx, %eax
movb $-0x3b, (%rcx,%rdi)
rolw $0x8, %ax
movb %al, 0x1(%rcx,%rdi)
movb %ah, 0x2(%rcx,%rdi)
movl 0x18(%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x7ffffffc, %ecx       # imm = 0x7FFFFFFC
ja 0xc499
addl $0x3, %ecx
jmp 0xc447
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0xc434
movl 0x18(%rbx), %edi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leal 0x5(%rdi), %r8d
cmpl 0x1c(%rbx), %r8d
ja 0xc499
movl %edx, %eax
movb $-0x3a, (%rcx,%rdi)
bswapl %eax
movl %eax, 0x1(%rcx,%rdi)
movl 0x18(%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x7ffffffa, %ecx       # imm = 0x7FFFFFFA
ja 0xc499
addl $0x5, %ecx
xorl %eax, %eax
testq %rsi, %rsi
movl %ecx, 0x18(%rbx)
je 0xc499
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xc47e
leal (%rcx,%rdx), %r8d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0x1c(%rbx), %r8d
ja 0xc499
movl %edx, %r14d
movl %ecx, %eax
addq %rax, %rdi
movq %r14, %rdx
callq 0x85c0
movl 0x18(%rbx), %ecx
jmp 0xc481
movl %edx, %r14d
movl %ecx, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq %r14, %rcx
cmpq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
ja 0xc499
xorl %eax, %eax
movl %ecx, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_pack_list_header
int
as_pack_list_header(as_packer *pk, uint32_t ele_count)
{
	int rc;

	if (ele_count < 16) {
		rc = pack_byte(pk, (uint8_t)(0x90 | ele_count), false);
	}
	else if (ele_count < (1 << 16)) {
		rc = pack_type_uint16(pk, 0xdc, (uint16_t)ele_count, false);
	}
	else {
		rc = pack_type_uint32(pk, 0xdd, ele_count, false);
	}

	return rc;
}

// Assembly:
movl %esi, %ecx
cmpl $0xf, %esi
ja 0xc4e8
movq 0x10(%rdi), %rdx
testq %rdx, %rdx
je 0xc4cd
movl 0x18(%rdi), %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leal 0x1(%rsi), %r8d
cmpl 0x1c(%rdi), %r8d
ja 0xc56d
orb $-0x70, %cl
movb %cl, (%rdx,%rsi)
movl 0x18(%rdi), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x7ffffffe, %ecx       # imm = 0x7FFFFFFE
ja 0xc56d
incl %ecx
jmp 0xc568
cmpl $0xffff, %ecx           # imm = 0xFFFF
ja 0xc530
movq 0x10(%rdi), %rdx
testq %rdx, %rdx
je 0xc51b
movl 0x18(%rdi), %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leal 0x3(%rsi), %r8d
cmpl 0x1c(%rdi), %r8d
ja 0xc56d
rolw $0x8, %cx
movb $-0x24, (%rdx,%rsi)
movb %cl, 0x1(%rdx,%rsi)
movb %ch, 0x2(%rdx,%rsi)
movl 0x18(%rdi), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x7ffffffc, %ecx       # imm = 0x7FFFFFFC
ja 0xc56d
addl $0x3, %ecx
jmp 0xc568
movq 0x10(%rdi), %rdx
testq %rdx, %rdx
je 0xc555
movl 0x18(%rdi), %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leal 0x5(%rsi), %r8d
cmpl 0x1c(%rdi), %r8d
ja 0xc56d
bswapl %ecx
movb $-0x23, (%rdx,%rsi)
movl %ecx, 0x1(%rdx,%rsi)
movl 0x18(%rdi), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x7ffffffa, %ecx       # imm = 0x7FFFFFFA
ja 0xc56d
addl $0x5, %ecx
xorl %eax, %eax
movl %ecx, 0x18(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: pack_map_header_internal
static inline int
pack_map_header_internal(as_packer *pk, uint32_t ele_count, bool resize)
{
	int rc;

	if (ele_count < 16) {
		rc = pack_byte(pk, (uint8_t)(0x80 | ele_count), resize);
	}
	else if (ele_count < (1 << 16)) {
		rc = pack_type_uint16(pk, 0xde, (uint16_t)ele_count, resize);
	}
	else {
		rc = pack_type_uint32(pk, 0xdf, ele_count, resize);
	}

	return rc;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0xf, %esi
ja 0xc6c6
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xc6ac
movl 0x18(%rbx), %ecx
movl %esi, %r14d
leal 0x1(%rcx), %esi
cmpl 0x1c(%rbx), %esi
jbe 0xc6a2
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %dl, %dl
je 0xc794
movq %rbx, %rdi
movl $0x1, %esi
callq 0xd5db
testl %eax, %eax
jne 0xc794
movq 0x10(%rbx), %rax
movl 0x18(%rbx), %ecx
orb $-0x80, %r14b
movl %ecx, %ecx
movb %r14b, (%rax,%rcx)
movl 0x18(%rbx), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
ja 0xc794
incl %eax
jmp 0xc78f
cmpl $0xffff, %esi           # imm = 0xFFFF
ja 0xc737
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xc723
movl 0x18(%rbx), %ecx
movl %esi, %r14d
leal 0x3(%rcx), %esi
cmpl 0x1c(%rbx), %esi
jbe 0xc70e
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %dl, %dl
je 0xc794
movq %rbx, %rdi
movl $0x3, %esi
callq 0xd5db
testl %eax, %eax
jne 0xc794
movq 0x10(%rbx), %rax
movl 0x18(%rbx), %ecx
movl %r14d, %edx
movl %ecx, %ecx
rolw $0x8, %dx
movb $-0x22, (%rax,%rcx)
movb %dl, 0x1(%rax,%rcx)
movb %dh, 0x2(%rax,%rcx)
movl 0x18(%rbx), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x7ffffffc, %eax       # imm = 0x7FFFFFFC
ja 0xc794
addl $0x3, %eax
jmp 0xc78f
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xc77d
movl 0x18(%rbx), %ecx
movl %esi, %r14d
leal 0x5(%rcx), %esi
cmpl 0x1c(%rbx), %esi
jbe 0xc76f
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %dl, %dl
je 0xc794
movq %rbx, %rdi
movl $0x5, %esi
callq 0xd5db
testl %eax, %eax
jne 0xc794
movq 0x10(%rbx), %rax
movl 0x18(%rbx), %ecx
movl %ecx, %ecx
bswapl %r14d
movb $-0x21, (%rax,%rcx)
movl %r14d, 0x1(%rax,%rcx)
movl 0x18(%rbx), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x7ffffffa, %eax       # imm = 0x7FFFFFFA
ja 0xc794
addl $0x5, %eax
xorl %ebp, %ebp
movl %eax, 0x18(%rbx)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_unpack_blob_size
int64_t
as_unpack_blob_size(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 0xc4:
	case 0xd9: // string/raw bytes with 8 bit header
		if (size < 1) {
			return -2;
		}
		return (int64_t)pk->buffer[pk->offset++];

	case 0xc5:
	case 0xda: // string/raw bytes with 16 bit header
		if (size < 2) {
			return -3;
		}
		return (int64_t)extract_uint16(pk);

	case 0xc6:
	case 0xdb: // string/raw bytes with 32 bit header
		if (size < 4) {
			return -4;
		}
		return (int64_t)extract_uint32(pk);

	default:
		if ((type & 0xe0) == 0xa0) { // raw bytes with 8 bit combined header
			return type & 0x1f;
		}
		break;
	}

	return -5;
}

// Assembly:
movl 0x8(%rdi), %ecx
movl 0xc(%rdi), %esi
movq $-0x1, %rax
cmpl %esi, %ecx
jae 0xce95
movq (%rdi), %rdx
leaq 0x1(%rcx), %r9
movl %r9d, 0x8(%rdi)
movzbl (%rdx,%rcx), %r8d
leal -0xc4(%r8), %eax
cmpl $0x17, %eax
ja 0xce79
movl $0x200001, %r10d        # imm = 0x200001
btl %eax, %r10d
jb 0xce61
movl $0x400002, %r10d        # imm = 0x400002
subl %r9d, %esi
btl %eax, %r10d
jb 0xce42
movl $0x800004, %r9d         # imm = 0x800004
btl %eax, %r9d
jae 0xce79
movq $-0x4, %rax
cmpl $0x4, %esi
jb 0xce95
movl 0x1(%rdx,%rcx), %eax
addl $0x5, %ecx
movl %ecx, 0x8(%rdi)
bswapl %eax
retq
movq $-0x3, %rax
cmpl $0x2, %esi
jb 0xce95
movzwl 0x1(%rdx,%rcx), %eax
addl $0x3, %ecx
movl %ecx, 0x8(%rdi)
rolw $0x8, %ax
movzwl %ax, %eax
retq
movq $-0x2, %rax
cmpl %r9d, %esi
je 0xce95
leal 0x2(%rcx), %eax
movl %eax, 0x8(%rdi)
movzbl (%rdx,%r9), %eax
retq
movl %r8d, %ecx
movq $-0x5, %rax
andl $-0x20, %ecx
cmpl $0xa0, %ecx
jne 0xce95
andl $0x1f, %r8d
movq %r8, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_unpack_uint64
int
as_unpack_uint64(as_unpacker *pk, uint64_t *i)
{
	if (pk->offset >= pk->length) {
		return -1;
	}

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

	switch (type) {
	case 0xd0: // signed 8 bit integer
		if (size < 1) {
			return -1;
		}
		*i = (uint64_t)(int8_t)pk->buffer[pk->offset++];
		break;
	case 0xcc: // unsigned 8 bit integer
		if (size < 1) {
			return -2;
		}
		*i = (uint64_t)pk->buffer[pk->offset++];
		break;

	case 0xd1: // signed 16 bit integer
		if (size < 2) {
			return -3;
		}
		*i = (uint64_t)(int16_t)extract_uint16(pk);
		break;
	case 0xcd: // unsigned 16 bit integer
		if (size < 2) {
			return -4;
		}
		*i = (uint64_t)extract_uint16(pk);
		break;

	case 0xd2: // signed 32 bit integer
		if (size < 4) {
			return -5;
		}
		*i = (uint64_t)(int32_t)extract_uint32(pk);
		break;
	case 0xce: // unsigned 32 bit integer
		if (size < 4) {
			return -6;
		}
		*i = (uint64_t)extract_uint32(pk);
		break;

	case 0xd3: // signed 64 bit integer
	case 0xcf: // unsigned 64 bit integer
		if (size < 8) {
			return -7;
		}
		*i = extract_uint64(pk);
		break;

	default:
		if (type < 0x80) { // 8 bit combined unsigned integer
			*i = type;
			break;
		}

		if (type >= 0xe0) { // 8 bit combined signed integer
			*i = (uint64_t)(type & 0x1f) - 32;
			break;
		}

		return -8;
	}

	return 0;
}

// Assembly:
movl 0x8(%rdi), %ecx
movl 0xc(%rdi), %r10d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %r10d, %ecx
jae 0xcfce
pushq %rbx
movq (%rdi), %rdx
leaq 0x1(%rcx), %r9
movl %r9d, 0x8(%rdi)
movzbl (%rdx,%rcx), %r8d
leal -0xcc(%r8), %r11d
cmpl $0x7, %r11d
ja 0xcfb4
leaq 0xb3d8(%rip), %rbx      # 0x182ac
movl %r10d, %r8d
movslq (%rbx,%r11,4), %r11
subl %r9d, %r8d
addq %rbx, %r11
jmpq *%r11
movl $0xfffffff9, %eax       # imm = 0xFFFFFFF9
cmpl $0x8, %r8d
jb 0xcfcd
movq 0x1(%rdx,%rcx), %r8
leal 0x9(%rcx), %eax
movl %eax, 0x8(%rdi)
bswapq %r8
jmp 0xcfc8
movl $0xfffffffa, %eax       # imm = 0xFFFFFFFA
cmpl $0x4, %r8d
jb 0xcfcd
movl (%rdx,%r9), %r8d
leal 0x5(%rcx), %eax
movl %eax, 0x8(%rdi)
bswapl %r8d
jmp 0xcfc8
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpl %r9d, %r10d
je 0xcfcd
leal 0x2(%rcx), %eax
movl %eax, 0x8(%rdi)
movzbl 0x1(%rdx,%rcx), %r8d
jmp 0xcfc8
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
cmpl $0x2, %r8d
jb 0xcfcd
movzwl 0x1(%rdx,%rcx), %eax
addl $0x3, %ecx
movl %ecx, 0x8(%rdi)
rolw $0x8, %ax
movzwl %ax, %r8d
jmp 0xcfc8
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
cmpl $0x4, %r8d
jb 0xcfcd
movl 0x1(%rdx,%rcx), %eax
addl $0x5, %ecx
movl %ecx, 0x8(%rdi)
bswapl %eax
movslq %eax, %r8
jmp 0xcfc8
cmpl %r9d, %r10d
je 0xcfcd
leal 0x2(%rcx), %eax
movl %eax, 0x8(%rdi)
movsbq (%rdx,%r9), %r8
jmp 0xcfc8
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
cmpl $0x2, %r8d
jb 0xcfcd
movzwl (%rdx,%r9), %eax
addl $0x3, %ecx
movl %ecx, 0x8(%rdi)
rolw $0x8, %ax
movswq %ax, %r8
jmp 0xcfc8
testb %r8b, %r8b
jns 0xcfc8
movl $0xfffffff8, %eax       # imm = 0xFFFFFFF8
cmpb $-0x20, %r8b
jb 0xcfcd
orq $-0x20, %r8
xorl %eax, %eax
movq %r8, (%rsi)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_msgpack.c
// Function: as_unpack_double
int
as_unpack_double(as_unpacker *pk, double *x)
{
	if (pk->offset >= pk->length) {
		return -1;
	}

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

	switch (type) {
	case 0xca: // float
		if (size < 4) {
			return -2;
		}
		*x = (double)extract_float(pk);
		break;
	case 0xcb: // double
		if (size < 8) {
			return -3;
		}
		*x = extract_double(pk);
		break;
	default:
		return -4;
	}

	return 0;
}

// Assembly:
movl 0x8(%rdi), %ecx
movl 0xc(%rdi), %r8d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %r8d, %ecx
jae 0xd054
movq (%rdi), %rdx
leaq 0x1(%rcx), %r9
movl %r9d, 0x8(%rdi)
subl %r9d, %r8d
movzbl (%rdx,%rcx), %r10d
cmpl $0xcb, %r10d
je 0xd030
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
cmpl $0xca, %r10d
jne 0xd054
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpl $0x4, %r8d
jb 0xd054
movl (%rdx,%r9), %eax
addl $0x5, %ecx
movl %ecx, 0x8(%rdi)
bswapl %eax
movd %eax, %xmm0
cvtss2sd %xmm0, %xmm0
jmp 0xd04e
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
cmpl $0x8, %r8d
jb 0xd054
movq 0x1(%rdx,%rcx), %rax
addl $0x9, %ecx
movl %ecx, 0x8(%rdi)
bswapq %rax
movq %rax, %xmm0
xorl %eax, %eax
movq %xmm0, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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), %r8d
cmpl %r8d, %eax
jae 0xd10e
movq (%rdi), %rdx
leaq 0x1(%rax), %r9
movl %r9d, 0x8(%rdi)
movzbl (%rdx,%rax), %ecx
leal -0xc4(%rcx), %r10d
cmpl $0x17, %r10d
ja 0xd0e8
movl $0x200001, %r11d        # imm = 0x200001
btl %r10d, %r11d
jb 0xd0d6
movl $0x400002, %r11d        # imm = 0x400002
subl %r9d, %r8d
btl %r10d, %r11d
jb 0xd0bc
movl $0x800004, %r9d         # imm = 0x800004
btl %r10d, %r9d
jae 0xd0e8
cmpl $0x4, %r8d
jb 0xd10e
movl 0x1(%rdx,%rax), %ecx
addl $0x5, %eax
movl %eax, 0x8(%rdi)
bswapl %ecx
jmp 0xd0f7
cmpl $0x2, %r8d
jb 0xd10e
movzwl 0x1(%rdx,%rax), %ecx
addl $0x3, %eax
movl %eax, 0x8(%rdi)
rolw $0x8, %cx
movzwl %cx, %ecx
jmp 0xd0f7
cmpl %r9d, %r8d
je 0xd10e
addl $0x2, %eax
movl %eax, 0x8(%rdi)
movzbl (%rdx,%r9), %ecx
jmp 0xd0f7
movl %ecx, %eax
andl $-0x20, %eax
cmpl $0xa0, %eax
jne 0xd10e
andl $0x1f, %ecx
movl %ecx, (%rsi)
xorl %eax, %eax
movl 0x8(%rdi), %edx
addl %edx, %ecx
movl %ecx, 0x8(%rdi)
addq (%rdi), %rdx
cmpl 0xc(%rdi), %ecx
cmovbeq %rdx, %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xc(%rdi), %r8d
movl 0x8(%rdi), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %r8d, %edx
subl %ecx, %edx
cmpl $0x3, %edx
jb 0xd2c1
movq (%rdi), %rdx
leal 0x1(%rcx), %r9d
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
movl %r9d, 0x8(%rdi)
movzbl (%rdx,%rcx), %r10d
addl $0xffffff39, %r10d      # imm = 0xFFFFFF39
cmpl $0x11, %r10d
ja 0xd2c1
leaq 0xb0b8(%rip), %r11      # 0x182cc
movslq (%r11,%r10,4), %r10
addq %r11, %r10
jmpq *%r10
addl $0x2, %ecx
movl %r9d, %eax
movl %ecx, 0x8(%rdi)
movzbl (%rdx,%rax), %edx
jmp 0xd282
movl $0x4, %edx
jmp 0xd282
movl %r9d, %eax
addl $0x3, %ecx
movzwl (%rdx,%rax), %eax
movl %ecx, 0x8(%rdi)
rolw $0x8, %ax
movzwl %ax, %edx
jmp 0xd282
movl $0x8, %edx
jmp 0xd282
movl $0x10, %edx
jmp 0xd282
subl %r9d, %r8d
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpl $0x4, %r8d
jb 0xd2c1
movl %r9d, %eax
addl $0x5, %ecx
movl (%rdx,%rax), %edx
movl %ecx, 0x8(%rdi)
bswapl %edx
jmp 0xd282
movl $0x1, %edx
jmp 0xd282
movl $0x2, %edx
movl %edx, 0x8(%rsi)
incl %edx
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
movl 0x8(%rdi), %ecx
movl 0xc(%rdi), %r8d
subl %ecx, %r8d
cmpl %edx, %r8d
jb 0xd2c1
movl %ecx, 0xc(%rsi)
movl 0x8(%rdi), %ecx
movq (%rdi), %rax
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_O3/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), %esi
movq $-0x1, %rax
cmpl %esi, %ecx
jae 0xd36f
movq (%rdi), %rdx
leaq 0x1(%rcx), %r9
movl %r9d, 0x8(%rdi)
subl %r9d, %esi
movzbl (%rdx,%rcx), %r8d
cmpl $0xdd, %r8d
je 0xd33a
cmpl $0xdc, %r8d
jne 0xd353
movq $-0x2, %rax
cmpl $0x2, %esi
jb 0xd36f
movzwl (%rdx,%r9), %eax
addl $0x3, %ecx
movl %ecx, 0x8(%rdi)
rolw $0x8, %ax
movzwl %ax, %eax
retq
movq $-0x3, %rax
cmpl $0x4, %esi
jb 0xd36f
movl 0x1(%rdx,%rcx), %eax
addl $0x5, %ecx
movl %ecx, 0x8(%rdi)
bswapl %eax
retq
movl %r8d, %ecx
movq $-0x4, %rax
andl $-0x10, %ecx
cmpl $0x90, %ecx
jne 0xd36f
andl $0xf, %r8d
movq %r8, %rax
retq