LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_geojson.c
// Function: as_geojson_val_hashcode
uint32_t as_geojson_val_hashcode(const as_val * v)
{
	as_geojson * string = as_geojson_fromval(v);
	if ( string == NULL || string->value == NULL) return 0;
	uint32_t hash = 0;
	int c;
	char * str = string->value;
	while ( (c = *str++) ) {
		hash = c + (hash << 6) + (hash << 16) - hash;
	}
	return hash;
}

// Assembly:
xorl %eax, %eax
xorl %ecx, %ecx
testq %rdi, %rdi
je 0x9f83
cmpb $0xb, 0x4(%rdi)
cmoveq %rdi, %rcx
testq %rcx, %rcx
je 0x9fb0
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
je 0x9fb0
movb (%rcx), %dl
testb %dl, %dl
je 0x9fb0
incq %rcx
xorl %eax, %eax
movsbl %dl, %edx
imull $0x1003f, %eax, %eax    # imm = 0x1003F
addl %edx, %eax
movb (%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x9f9c
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_geojson.c
// Function: as_geojson_val_tostring
char * as_geojson_val_tostring(const as_val * v)
{
	as_geojson * s = (as_geojson *) v;
	if (s->value == NULL) return(NULL);
	size_t sl = as_geojson_len(s);
	size_t st = 3 + sl;
	char * str = (char *) cf_malloc(sizeof(char) * st);
	if (!str) return str;
	*(str + 0) = '\"';
	strcpy(str + 1, s->value);
	*(str + 1 + sl) = '\"';
	*(str + 1 + sl + 1) = '\0';
	return str;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0xa004
cmpq $-0x1, 0x18(%rbx)
jne 0x9fd2
callq 0x8260
movq %rax, 0x18(%rbx)
movq 0x18(%rbx), %r15
leaq 0x3(%r15), %rdi
callq 0x8080
movq %rax, %r14
testq %rax, %rax
je 0xa007
movb $0x22, (%r14)
movq %r14, %rdi
incq %rdi
movq 0x10(%rbx), %rsi
callq 0x8180
movw $0x22, 0x1(%r14,%r15)
jmp 0xa007
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_integer.c
// Function: as_integer_val_tostring
char * as_integer_val_tostring(const as_val * v)
{
	as_integer * i = (as_integer *) v;
	char * str = (char *) cf_malloc(sizeof(char) * 32);
	memset(str, 0, 32);
	sprintf(str, "%" PRId64, i->value);
	return str;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x20, %edi
callq 0x8080
movq %rax, %r14
xorl %eax, %eax
movq %rax, (%r14)
movq %rax, 0x8(%r14)
movq %rax, 0x10(%r14)
movq %rax, 0x18(%r14)
movq 0x8(%rbx), %rdx
leaq 0xdf8c(%rip), %rsi      # 0x18047
movq %r14, %rdi
xorl %eax, %eax
callq 0x89f0
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_iterator.c
// Function: as_iterator_destroy
void as_iterator_destroy(as_iterator * iterator)
{
    as_util_hook(destroy, 1, iterator);
	iterator->data = NULL;
	iterator->hooks = NULL;
    if ( iterator->free ) {
    	cf_free(iterator);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0xa103
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xa103
movq (%rax), %rax
testq %rax, %rax
je 0xa103
movq %rbx, %rdi
callq *%rax
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movq %rax, 0x8(%rbx)
cmpb $0x1, (%rbx)
jne 0xa11b
movq %rbx, %rdi
popq %rbx
jmp 0x8940
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_list.c
// Function: as_list_cons
as_list * as_list_cons(as_list * list, bool free, const as_list_hooks * hooks)
{
	if ( !list ) return list;

	as_val_cons((as_val *) list, AS_LIST, free);
	list->hooks = hooks;
	list->flags = 0;
	return list;
}

// Assembly:
movq %rdi, %rax
testq %rdi, %rdi
je 0xa141
movb $0x5, 0x4(%rax)
movb %sil, 0x5(%rax)
movl $0x1, (%rax)
movq %rdx, 0x10(%rax)
movl $0x0, 0x8(%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_list.c
// Function: as_list_val_tostring
char * as_list_val_tostring(const as_val * v) 
{
	as_list_val_tostring_data data = {
		.buf = NULL,
		.blk = 256,
		.cap = 1024,
		.pos = 0,
		.sep = false
	};

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

	strcpy(data.buf, "[");
	data.pos += 1;

	if ( v ) {
		as_list_foreach((as_list *) v, as_list_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 %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0xde62(%rip), %rax      # 0x18060
movq %rax, 0x10(%rsp)
movq 0xde5e(%rip), %rax      # 0x18068
movq %rax, 0x18(%rsp)
movq 0xde42(%rip), %rax      # 0x18058
movq %rax, 0x8(%rsp)
movl 0x14(%rsp), %edi
movl $0x1, %esi
callq 0x88b0
movq %rax, 0x8(%rsp)
movw $0x5b, (%rax)
incl 0x18(%rsp)
testq %rbx, %rbx
je 0xa262
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xa262
movq 0xf0(%rax), %rax
testq %rax, %rax
je 0xa262
leaq 0x57(%rip), %rsi        # 0xa2af
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq *%rax
movl 0x14(%rsp), %esi
movl 0x18(%rsp), %eax
addl $0x2, %eax
cmpl %esi, %eax
jb 0xa288
movq 0x8(%rsp), %rdi
addl $0x2, %esi
callq 0x8510
movq %rax, 0x8(%rsp)
addl $0x2, 0x14(%rsp)
movq 0x8(%rsp), %rax
movl 0x18(%rsp), %ecx
movb $0x5d, (%rax,%rcx)
movq 0x8(%rsp), %rax
movl 0x18(%rsp), %ecx
incl %ecx
movb $0x0, (%rax,%rcx)
movq 0x8(%rsp), %rax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_list.c
// Function: as_list_val_tostring_foreach
static bool as_list_val_tostring_foreach(as_val * val, void * udata)
{
	as_list_val_tostring_data * data = (as_list_val_tostring_data *) udata;

	char * str = as_val_tostring(val);

	if ( !str ) {
		str = (char *)NULL_STR;
	}

	uint32_t len = (uint32_t)strlen(str);

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

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

	memcpy(data->buf + data->pos, str, len);
	data->pos += len;
	data->sep = true;

	if ( str != NULL_STR ) {
		cf_free(str);
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0x8290
movq %rax, %r14
testq %rax, %rax
jne 0xa2cd
movq 0x15ccb(%rip), %r14     # 0x1ff98
movq %r14, %rdi
callq 0x8260
movq %rax, %r15
movl 0xc(%rbx), %esi
movl 0x10(%rbx), %eax
leal 0x2(%r15,%rax), %eax
cmpl %esi, %eax
jb 0xa303
leal 0x2(%r15), %eax
movl 0x8(%rbx), %ebp
cmpl %ebp, %eax
cmoval %eax, %ebp
movq (%rbx), %rdi
addl %ebp, %esi
callq 0x8510
movq %rax, (%rbx)
addl %ebp, 0xc(%rbx)
cmpb $0x1, 0x14(%rbx)
jne 0xa323
movq (%rbx), %rax
movl 0x10(%rbx), %ecx
movb $0x2c, (%rax,%rcx)
movq (%rbx), %rax
movl 0x10(%rbx), %ecx
incl %ecx
movb $0x20, (%rax,%rcx)
addl $0x2, 0x10(%rbx)
movl 0x10(%rbx), %edi
addq (%rbx), %rdi
movl %r15d, %edx
movq %r14, %rsi
callq 0x85c0
addl %r15d, 0x10(%rbx)
movb $0x1, 0x14(%rbx)
cmpq 0x15c55(%rip), %r14     # 0x1ff98
je 0xa34d
movq %r14, %rdi
callq 0x8940
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/aerospike/as_map.c
// Function: as_map_cons
as_map* as_map_cons(as_map* map, bool free, uint32_t flags, const as_map_hooks* hooks)
{
	if ( !map ) return map;

	as_val_cons((as_val*) map, AS_MAP, free);
	map->flags = flags;
	map->hooks = hooks;
	return map;
}

// Assembly:
movq %rdi, %rax
testq %rdi, %rdi
je 0xa379
movb $0x6, 0x4(%rax)
movb %sil, 0x5(%rax)
movl $0x1, (%rax)
movl %edx, 0x8(%rax)
movq %rcx, 0x10(%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0xdc62(%rip), %rax      # 0x18098
movq %rax, 0x10(%rsp)
movq 0xdc5e(%rip), %rax      # 0x180a0
movq %rax, 0x18(%rsp)
movq 0xdc42(%rip), %rax      # 0x18090
movq %rax, 0x8(%rsp)
movl 0x14(%rsp), %edi
movl $0x1, %esi
callq 0x88b0
movq %rax, 0x8(%rsp)
movw $0x7b, (%rax)
incl 0x18(%rsp)
testq %rbx, %rbx
je 0xa497
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xa497
movq 0x40(%rax), %rax
testq %rax, %rax
je 0xa497
leaq 0x57(%rip), %rsi        # 0xa4e4
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq *%rax
movl 0x14(%rsp), %esi
movl 0x18(%rsp), %eax
addl $0x2, %eax
cmpl %esi, %eax
jb 0xa4bd
movq 0x8(%rsp), %rdi
addl $0x2, %esi
callq 0x8510
movq %rax, 0x8(%rsp)
addl $0x2, 0x14(%rsp)
movq 0x8(%rsp), %rax
movl 0x18(%rsp), %ecx
movb $0x7d, (%rax,%rcx)
movq 0x8(%rsp), %rax
movl 0x18(%rsp), %ecx
incl %ecx
movb $0x0, (%rax,%rcx)
movq 0x8(%rsp), %rax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xa5df
movq %rax, %r14
movq %rax, %rdi
callq 0x8260
movq %rax, %r12
movq %r15, %rdi
callq 0x8290
testq %rax, %rax
setne %bpl
je 0xa5e3
movq %rax, %r15
movq %rax, %rdi
callq 0x8260
movq %rax, %r13
leal 0x4(%r12,%rax), %eax
movl 0x10(%rbx), %ecx
addl %eax, %ecx
movl 0xc(%rbx), %esi
cmpl %esi, %ecx
jb 0xa57a
movq %r13, (%rsp)
movl 0x8(%rbx), %r13d
cmpl %r13d, %eax
cmoval %eax, %r13d
movq (%rbx), %rdi
addl %r13d, %esi
callq 0x8510
movq %rax, (%rbx)
movl 0xc(%rbx), %edi
addq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x8400
addl %r13d, 0xc(%rbx)
movq (%rsp), %r13
cmpb $0x1, 0x14(%rbx)
jne 0xa59a
movq (%rbx), %rax
movl 0x10(%rbx), %ecx
movb $0x2c, (%rax,%rcx)
movq (%rbx), %rax
movl 0x10(%rbx), %ecx
incl %ecx
movb $0x20, (%rax,%rcx)
addl $0x2, 0x10(%rbx)
movl 0x10(%rbx), %edi
addq (%rbx), %rdi
movq %r14, %rsi
callq 0x8180
addl 0x10(%rbx), %r12d
movl %r12d, 0x10(%rbx)
movq (%rbx), %rax
movw $0x3a, (%rax,%r12)
movl 0x10(%rbx), %edi
incl %edi
movl %edi, 0x10(%rbx)
addq (%rbx), %rdi
movq %r15, %rsi
callq 0x8180
addl %r13d, 0x10(%rbx)
movb $0x1, 0x14(%rbx)
movq %r14, %rdi
callq 0x8940
jmp 0xa5e6
xorl %ebp, %ebp
jmp 0xa5ee
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
nop
// File: /workspace/github_c_makefile_star2_O1/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 $0x0, (%rsp)
movq %rsi, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x1, %eax
testq %rdi, %rdi
je 0xa664
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0xa664
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
je 0xa664
movq %rsp, %rsi
callq *%rcx
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xa6f9
movzbl 0x4(%rdi), %ecx
testq %rsi, %rsi
je 0xa702
movzbl 0x4(%rsi), %edx
xorl %eax, %eax
cmpl %edx, %ecx
jb 0xa724
movl $0x2, %eax
ja 0xa724
cmpl $0xd, %ecx
sete %al
cmpl $0xd, %edx
sete %dl
orb %al, %dl
movl $0x1, %eax
je 0xa726
popq %rcx
retq
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
decl %ecx
cmpl $0xa, %ecx
ja 0xa724
leaq 0xd96f(%rip), %rdx      # 0x180a8
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x10(%rdi), %rdi
movq 0x10(%rsi), %rsi
callq 0x8560
movl %eax, %ecx
xorl %edx, %edx
testl %eax, %eax
setne %dl
incl %edx
xorl %eax, %eax
testl %ecx, %ecx
cmovnsl %edx, %eax
jmp 0xa724
testq %rdi, %rdi
je 0xa7e7
movq 0x8(%rdi), %rcx
jmp 0xa7e9
popq %rax
jmp 0xa833
movb 0x8(%rsi), %al
cmpb %al, 0x8(%rdi)
movl $0x0, %eax
jb 0xa724
jmp 0xa7ce
xorpd %xmm0, %xmm0
testq %rdi, %rdi
xorpd %xmm1, %xmm1
je 0xa795
movsd 0x8(%rdi), %xmm1
testq %rsi, %rsi
je 0xa79f
movsd 0x8(%rsi), %xmm0
ucomisd %xmm1, %xmm0
movl $0x0, %eax
ja 0xa724
xorpd %xmm0, %xmm0
testq %rdi, %rdi
xorpd %xmm1, %xmm1
je 0xa7c0
movsd 0x8(%rdi), %xmm1
testq %rsi, %rsi
je 0xa7ca
movsd 0x8(%rsi), %xmm0
ucomisd %xmm0, %xmm1
movl $0x2, %eax
ja 0xa724
jmp 0xa829
popq %rax
jmp 0xa8a6
popq %rax
jmp 0xa9ea
xorl %ecx, %ecx
xorl %eax, %eax
testq %rsi, %rsi
je 0xa7f6
movq 0x8(%rsi), %rdx
jmp 0xa7f8
xorl %edx, %edx
cmpq %rdx, %rcx
jl 0xa724
testq %rdi, %rdi
je 0xa80c
movq 0x8(%rdi), %rax
jmp 0xa80e
xorl %eax, %eax
testq %rsi, %rsi
je 0xa819
movq 0x8(%rsi), %rcx
jmp 0xa81b
xorl %ecx, %ecx
cmpq %rcx, %rax
movl $0x2, %eax
jg 0xa724
movl $0x1, %eax
jmp 0xa724
// File: /workspace/github_c_makefile_star2_O1/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 0xa848
movl 0xc(%rdi), %r14d
testq %rsi, %rsi
je 0xa850
movl 0xc(%rsi), %ebp
cmpl %ebp, %r14d
movl %ebp, %eax
cmovbl %r14d, %eax
testq %rdi, %rdi
je 0xa864
movq 0x10(%rdi), %rdi
jmp 0xa866
xorl %edi, %edi
xorl %ebx, %ebx
testq %rsi, %rsi
je 0xa873
movq 0x10(%rsi), %rsi
jmp 0xa875
xorl %esi, %esi
movl %eax, %edx
callq 0x8480
testl %eax, %eax
js 0xa89f
cmpl %ebp, %r14d
setb %cl
xorl %ebx, %ebx
testl %eax, %eax
setne %al
orb %al, %cl
je 0xa897
movb %al, %bl
addl %ebx, %ebx
jmp 0xa89f
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_O1/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
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
testq %rdi, %rdi
movl $0x0, %ebx
je 0xa8e0
movq 0x10(%r15), %rax
testq %rax, %rax
je 0xa8e0
movq 0x10(%rax), %rax
testq %rax, %rax
je 0xa8e0
movq %r15, %rdi
callq *%rax
movl %eax, %ebx
testq %r14, %r14
je 0xa8ff
movq 0x10(%r14), %rax
testq %rax, %rax
je 0xa8ff
movq 0x10(%rax), %rax
testq %rax, %rax
je 0xa8ff
movq %r14, %rdi
callq *%rax
movl %eax, %r12d
cmpl %r12d, %ebx
movl %r12d, %eax
movl %ebx, 0x10(%rsp)
cmovbl %ebx, %eax
movl %eax, 0x14(%rsp)
testl %eax, %eax
setne %bl
je 0xa9bf
movl %r12d, 0xc(%rsp)
xorl %r12d, %r12d
testq %r15, %r15
je 0xa947
movq 0x10(%r15), %rax
testq %rax, %rax
je 0xa947
movq 0x18(%rax), %rax
testq %rax, %rax
je 0xa947
movq %r15, %rdi
movl %r12d, %esi
callq *%rax
movq %rax, %r13
jmp 0xa94a
xorl %r13d, %r13d
testq %r14, %r14
je 0xa96e
movq 0x10(%r14), %rax
testq %rax, %rax
je 0xa96e
movq 0x18(%rax), %rax
testq %rax, %rax
je 0xa96e
movq %r14, %rdi
movl %r12d, %esi
callq *%rax
movq %rax, %rsi
jmp 0xa970
xorl %esi, %esi
testq %r13, %r13
je 0xa97c
cmpb $0xd, 0x4(%r13)
je 0xa987
testq %rsi, %rsi
je 0xa990
cmpb $0xd, 0x4(%rsi)
jne 0xa990
movl $0x1, %ebp
xorl %ecx, %ecx
jmp 0xa9a1
movq %r13, %rdi
callq 0x8090
cmpl $0x1, %eax
sete %cl
cmovnel %eax, %ebp
testb %cl, %cl
je 0xa9b8
incl %r12d
cmpl 0x14(%rsp), %r12d
setb %bl
jne 0xa923
xorl %ebp, %ebp
movl 0xc(%rsp), %r12d
jmp 0xa9c1
xorl %ebp, %ebp
xorl %eax, %eax
movl 0x10(%rsp), %ecx
cmpl %r12d, %ecx
seta %al
incl %eax
testb $0x1, %bl
cmovnel %ebp, %eax
cmpl %r12d, %ecx
cmovbl %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_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 %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %ebp, %ebp
testq %rdi, %rdi
movl $0x0, %r12d
je 0xaa28
movq 0x10(%r14), %rax
testq %rax, %rax
je 0xaa28
movq 0x10(%rax), %rax
testq %rax, %rax
je 0xaa28
movq %r14, %rdi
callq *%rax
movl %eax, %r12d
testq %rbx, %rbx
je 0xaa46
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xaa46
movq 0x10(%rax), %rax
testq %rax, %rax
je 0xaa46
movq %rbx, %rdi
callq *%rax
movl %eax, %ebp
xorl %r15d, %r15d
cmpl %ebp, %r12d
jb 0xaaf1
movl $0x2, %r15d
ja 0xaaf1
xorl %ebp, %ebp
testq %r14, %r14
je 0xaa7e
movq 0x10(%r14), %rax
testq %rax, %rax
je 0xaa7e
movq 0x10(%rax), %rax
testq %rax, %rax
je 0xaa7e
movq %r14, %rdi
callq *%rax
movl %eax, %ebp
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x84d0
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x84d0
movl $0x1, %r15d
testl %ebp, %ebp
je 0xaaf1
leaq 0x48(%rsp), %rbx
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
callq 0x8250
movq %rax, %r12
movq %r14, %rdi
callq 0x8250
testq %r12, %r12
je 0xaacb
movq 0x8(%r12), %rdi
jmp 0xaacd
xorl %edi, %edi
testq %rax, %rax
je 0xaad8
movq 0x8(%rax), %rsi
jmp 0xaada
xorl %esi, %esi
callq 0x8090
cmpl $0x1, %eax
cmovnel %eax, %r13d
jne 0xaaee
decl %ebp
jne 0xaaac
jmp 0xaaf1
movl %r13d, %r15d
movl %r15d, %eax
addq $0x88, %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: 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
je 0xb5a6
movl %esi, %ebp
movq (%rbx), %rax
movl 0x8(%rbx), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x8(%rbx)
movzbl (%rax,%rcx), %r13d
decl %ebp
jmp 0xb5ab
xorl %r13d, %r13d
xorl %ebp, %ebp
cmpl $0x17, %r13d
je 0xb5d3
cmpl $0x3, %r13d
jne 0xb600
movl 0x8(%rbx), %edi
addq (%rbx), %rdi
movl %ebp, %esi
callq 0x8420
movq %rax, %rdi
movl $0x1, %esi
callq 0x8060
jmp 0xb5ed
movl 0x8(%rbx), %edi
addq (%rbx), %rdi
movl %ebp, %esi
callq 0x8420
movq %rax, %rdi
movl $0x1, %esi
callq 0x8380
movq %rax, (%r14)
cmpq $0x0, (%r14)
je 0xb643
addl %ebp, 0x8(%rbx)
xorl %eax, %eax
jmp 0xb697
testl %ebp, %ebp
je 0xb64a
movl %ebp, %r12d
movq %r12, %rdi
callq 0x8080
testq %rax, %rax
je 0xb65a
movq %rax, %r15
movl 0x8(%rbx), %esi
addq (%rbx), %rsi
movq %rax, %rdi
movq %r12, %rdx
callq 0x85c0
movq %r15, %rdi
movl %ebp, %esi
movl $0x1, %edx
callq 0x8070
testq %rax, %rax
je 0xb663
movq %rax, %rcx
movb $0x1, %dl
jmp 0xb674
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
jmp 0xb697
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8070
movq %rax, %rcx
jmp 0xb678
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %edx, %edx
jmp 0xb674
movq %r15, %rdi
callq 0x8940
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
xorl %ecx, %ecx
xorl %edx, %edx
testb %dl, %dl
je 0xb68d
testq %rcx, %rcx
je 0xb688
movl %r13d, 0x1c(%rcx)
movq %rcx, (%r14)
movb $0x1, %cl
jmp 0xb68f
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
xorl %ecx, %ecx
testb %cl, %cl
jne 0xb5f0
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: 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, %rbx
movq %rdi, %r14
testl %esi, %esi
je 0xb717
movl %esi, %ebp
movl 0x8(%r14), %eax
cmpl 0xc(%r14), %eax
jae 0xb719
movq (%r14), %rcx
movzbl (%rcx,%rax), %eax
xorl %r12d, %r12d
addl $0xffffff39, %eax       # imm = 0xFFFFFF39
cmpl $0x11, %eax
ja 0xb71c
movl $0x3e007, %ecx          # imm = 0x3E007
btl %eax, %ecx
jae 0xb71c
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x8a20
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
subl %ecx, %ebp
xorl %r12d, %r12d
testl %eax, %eax
jne 0xb70a
movl 0x20(%rsp), %r12d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0xb7d3
jmp 0xb71c
xorl %ebp, %ebp
xorl %r12d, %r12d
movl %ebp, %edi
movl $0x8, %esi
callq 0x8520
testq %rax, %rax
je 0xb7a8
movq %rax, %r15
movl %r12d, 0x4(%rsp)
movq %rbx, 0x8(%rsp)
testl %ebp, %ebp
setne %bl
je 0xb7af
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
xorl %r13d, %r13d
movq $0x0, 0x10(%rsp)
movq %r14, %r12
movq %r14, %rdi
leaq 0x10(%rsp), %rsi
callq 0x8650
testl %eax, %eax
sete %al
movq 0x10(%rsp), %rdx
testq %rdx, %rdx
setne %r14b
movq %r15, %rdi
andb %al, %r14b
je 0xb787
movl %r13d, %esi
callq 0x8b20
jmp 0xb793
callq 0x87a0
movl $0xfffffffd, (%rsp)     # imm = 0xFFFFFFFD
testb %r14b, %r14b
je 0xb7b6
incl %r13d
cmpl %ebp, %r13d
setb %bl
movq %r12, %r14
jne 0xb74b
jmp 0xb7b6
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0xb7d3
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
testb $0x1, %bl
movq 0x8(%rsp), %rdx
movl 0x4(%rsp), %ecx
movl (%rsp), %eax
jne 0xb7d3
movq %r15, (%rdx)
movzbl %cl, %eax
movl %eax, 0x8(%r15)
xorl %eax, %eax
addq $0x28, %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: 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 0xbae6
movl 0x18(%rdi), %edx
leal 0x1(%rdx), %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0x1c(%rdi), %esi
ja 0xbafd
movb $-0x40, (%rcx,%rdx)
movl 0x18(%rdi), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x7ffffffe, %ecx       # imm = 0x7FFFFFFE
ja 0xbafd
incl %ecx
movl %ecx, 0x18(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl %edx, %r14d
je 0xcbac
movl 0x18(%rbx), %ecx
addl %ecx, %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0x1c(%rbx), %edx
ja 0xcbc6
addq %rcx, %rdi
movq %r14, %rdx
callq 0x85c0
movl 0x18(%rbx), %eax
addq %rax, %r14
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x7fffffff, %r14       # imm = 0x7FFFFFFF
ja 0xcbc6
movl %r14d, 0x18(%rbx)
xorl %eax, %eax
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: 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 0xbc28
cmpq $0x80, %rdi
jb 0xbc5d
movl $0x2, %eax
cmpq $0x100, %rdi            # imm = 0x100
jb 0xbc5d
movl $0x3, %eax
cmpq $0x10000, %rdi          # imm = 0x10000
jb 0xbc5d
xorl %eax, %eax
shrq $0x20, %rdi
setne %al
jmp 0xbc56
cmpq $-0x21, %rdi
jg 0xbc5d
movl $0x2, %eax
cmpq $-0x81, %rdi
jg 0xbc5d
movl $0x3, %eax
cmpq $-0x8001, %rdi          # imm = 0xFFFF7FFF
jg 0xbc5d
xorl %eax, %eax
cmpq $-0x80000000, %rdi      # imm = 0x80000000
setl %al
leal 0x5(,%rax,4), %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xc0de
movl 0x18(%rdi), %edx
leal 0x5(%rdx), %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0x1c(%rdi), %esi
ja 0xc0f6
movd %xmm0, %eax
bswapl %eax
movb $-0x36, (%rcx,%rdx)
movl %eax, 0x1(%rcx,%rdx)
movl 0x18(%rdi), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x7ffffffa, %ecx       # imm = 0x7FFFFFFA
ja 0xc0f6
addl $0x5, %ecx
movl %ecx, 0x18(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xc121
movl 0x18(%rdi), %edx
leal 0x9(%rdx), %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0x1c(%rdi), %esi
ja 0xc139
movq %xmm0, %rax
bswapq %rax
movb $-0x35, (%rcx,%rdx)
movq %rax, 0x1(%rcx,%rdx)
movl 0x18(%rdi), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x7ffffff6, %ecx       # imm = 0x7FFFFFF6
ja 0xc139
addl $0x9, %ecx
movl %ecx, 0x18(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, %esi
xorl %edx, %edx
callq 0xc2c6
testl %eax, %eax
setne %cl
testq %r14, %r14
sete %dl
orb %cl, %dl
jne 0xc2bb
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
movl %ebp, %r15d
je 0xc2a1
movl 0x18(%rbx), %ecx
addl %ecx, %ebp
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0x1c(%rbx), %ebp
ja 0xc2bb
addq %rcx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x85c0
movl 0x18(%rbx), %eax
addq %rax, %r15
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x7fffffff, %r15       # imm = 0x7FFFFFFF
ja 0xc2bb
movl %r15d, 0x18(%rbx)
xorl %eax, %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_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
movl %esi, %ecx
movq %rdi, %rbx
cmpl $0x1f, %esi
ja 0xc336
cmpq $0x0, 0x10(%rbx)
je 0xc31c
movl 0x18(%rbx), %eax
incl %eax
cmpl 0x1c(%rbx), %eax
jbe 0xc30d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %dl, %dl
je 0xc46f
movq %rbx, %rdi
movl $0x1, %esi
movl %ecx, %r14d
callq 0xd771
movl %r14d, %ecx
testl %eax, %eax
jne 0xc46f
orb $-0x60, %cl
movq 0x10(%rbx), %rax
movl %ecx, %edx
movl 0x18(%rbx), %ecx
movb %dl, (%rax,%rcx)
movl 0x18(%rbx), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
ja 0xc46f
incl %eax
jmp 0xc46a
cmpl $0xff, %ecx
ja 0xc3a4
cmpq $0x0, 0x10(%rbx)
je 0xc389
movl 0x18(%rbx), %eax
addl $0x2, %eax
cmpl 0x1c(%rbx), %eax
jbe 0xc378
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %dl, %dl
je 0xc46f
movq %rbx, %rdi
movl $0x2, %esi
movl %ecx, %r14d
callq 0xd771
movl %r14d, %ecx
testl %eax, %eax
jne 0xc46f
movq 0x10(%rbx), %rax
movl %ecx, %edx
movl 0x18(%rbx), %ecx
movb $-0x27, (%rax,%rcx)
movb %dl, 0x1(%rax,%rcx)
movl 0x18(%rbx), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x7ffffffd, %eax       # imm = 0x7FFFFFFD
ja 0xc46f
addl $0x2, %eax
jmp 0xc46a
cmpl $0xffff, %ecx           # imm = 0xFFFF
ja 0xc413
cmpq $0x0, 0x10(%rbx)
je 0xc3ff
movl 0x18(%rbx), %eax
addl $0x3, %eax
cmpl 0x1c(%rbx), %eax
jbe 0xc3e6
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %dl, %dl
je 0xc46f
movq %rbx, %rdi
movl $0x3, %esi
movl %ecx, %r14d
callq 0xd771
movl %r14d, %ecx
testl %eax, %eax
jne 0xc46f
rolw $0x8, %cx
movq 0x10(%rbx), %rax
movl %ecx, %edx
movl 0x18(%rbx), %ecx
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 0xc46f
addl $0x3, %eax
jmp 0xc46a
cmpq $0x0, 0x10(%rbx)
je 0xc458
movl 0x18(%rbx), %eax
addl $0x5, %eax
cmpl 0x1c(%rbx), %eax
jbe 0xc445
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %dl, %dl
je 0xc46f
movq %rbx, %rdi
movl $0x5, %esi
movl %ecx, %r14d
callq 0xd771
movl %r14d, %ecx
testl %eax, %eax
jne 0xc46f
bswapl %ecx
movq 0x10(%rbx), %rax
movl %ecx, %edx
movl 0x18(%rbx), %ecx
movb $-0x25, (%rax,%rcx)
movl %edx, 0x1(%rax,%rcx)
movl 0x18(%rbx), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x7ffffffa, %eax       # imm = 0x7FFFFFFA
ja 0xc46f
addl $0x5, %eax
movl %eax, 0x18(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movq %rdi, %rbx
leal 0x1(%r15), %esi
xorl %edx, %edx
callq 0xc2c6
movl %eax, %ebp
testl %eax, %eax
setne %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0xc512
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xc4c3
movl 0x18(%rbx), %ecx
leal 0x1(%rcx), %edx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl 0x1c(%rbx), %edx
ja 0xc512
movb %r12b, (%rax,%rcx)
movl 0x18(%rbx), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
ja 0xc512
incl %eax
movl %eax, 0x18(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
movl %r15d, %r12d
je 0xc4fd
movl 0x18(%rbx), %eax
addl %eax, %r15d
cmpl 0x1c(%rbx), %r15d
ja 0xc512
addq %rax, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x85c0
movl 0x18(%rbx), %eax
addq %rax, %r12
cmpq $0x7fffffff, %r12       # imm = 0x7FFFFFFF
ja 0xc512
movl %r12d, 0x18(%rbx)
xorl %ebp, %ebp
movl %ebp, %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: 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 %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0xff, %edx
ja 0xc55e
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xc54c
movl 0x18(%rbx), %ecx
leal 0x2(%rcx), %edi
cmpl 0x1c(%rbx), %edi
ja 0xc5cb
movb $-0x3c, (%rax,%rcx)
movb %dl, 0x1(%rax,%rcx)
movl 0x18(%rbx), %ecx
xorl %eax, %eax
cmpl $0x7ffffffd, %ecx       # imm = 0x7FFFFFFD
ja 0xc5cb
addl $0x2, %ecx
jmp 0xc5d7
cmpl $0xffff, %edx           # imm = 0xFFFF
ja 0xc59e
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xc58c
movl 0x18(%rbx), %ebp
leal 0x3(%rbp), %edi
cmpl 0x1c(%rbx), %edi
ja 0xc5cb
movl %edx, %ecx
rolw $0x8, %cx
movb $-0x3b, (%rax,%rbp)
movb %cl, 0x1(%rax,%rbp)
movb %ch, 0x2(%rax,%rbp)
movl 0x18(%rbx), %ecx
xorl %eax, %eax
cmpl $0x7ffffffc, %ecx       # imm = 0x7FFFFFFC
ja 0xc5cb
addl $0x3, %ecx
jmp 0xc5d7
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xc5be
movl 0x18(%rbx), %ecx
leal 0x5(%rcx), %edi
cmpl 0x1c(%rbx), %edi
ja 0xc5cb
movl %edx, %edi
bswapl %edi
movb $-0x3a, (%rax,%rcx)
movl %edi, 0x1(%rax,%rcx)
movl 0x18(%rbx), %ecx
xorl %eax, %eax
cmpl $0x7ffffffa, %ecx       # imm = 0x7FFFFFFA
jbe 0xc5d4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
jmp 0xc5dc
addl $0x5, %ecx
movl %ecx, 0x18(%rbx)
movb $0x1, %cl
testq %rsi, %rsi
sete %dil
xorb $0x1, %cl
orb %dil, %cl
jne 0xc62b
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
movl %edx, %r14d
je 0xc611
movl 0x18(%rbx), %ecx
addl %ecx, %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0x1c(%rbx), %edx
ja 0xc62b
addq %rcx, %rdi
movq %r14, %rdx
callq 0x85c0
movl 0x18(%rbx), %eax
addq %rax, %r14
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x7fffffff, %r14       # imm = 0x7FFFFFFF
ja 0xc62b
movl %r14d, 0x18(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xc677
movq 0x10(%rdi), %rdx
testq %rdx, %rdx
je 0xc65c
movl 0x18(%rdi), %esi
leal 0x1(%rsi), %r8d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0x1c(%rdi), %r8d
ja 0xc6fc
orb $-0x70, %cl
movb %cl, (%rdx,%rsi)
movl 0x18(%rdi), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x7ffffffe, %ecx       # imm = 0x7FFFFFFE
ja 0xc6fc
incl %ecx
jmp 0xc6f7
cmpl $0xffff, %ecx           # imm = 0xFFFF
ja 0xc6bf
movq 0x10(%rdi), %rdx
testq %rdx, %rdx
je 0xc6aa
movl 0x18(%rdi), %esi
leal 0x3(%rsi), %r8d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0x1c(%rdi), %r8d
ja 0xc6fc
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 0xc6fc
addl $0x3, %ecx
jmp 0xc6f7
movq 0x10(%rdi), %rdx
testq %rdx, %rdx
je 0xc6e4
movl 0x18(%rdi), %esi
leal 0x5(%rsi), %r8d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0x1c(%rdi), %r8d
ja 0xc6fc
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 0xc6fc
addl $0x5, %ecx
movl %ecx, 0x18(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl %esi, %ecx
movq %rdi, %rbx
cmpl $0xf, %esi
ja 0xc855
cmpq $0x0, 0x10(%rbx)
je 0xc83b
movl 0x18(%rbx), %eax
incl %eax
cmpl 0x1c(%rbx), %eax
jbe 0xc82c
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %dl, %dl
je 0xc920
movq %rbx, %rdi
movl $0x1, %esi
movl %ecx, %r14d
callq 0xd771
movl %r14d, %ecx
testl %eax, %eax
jne 0xc920
orb $-0x80, %cl
movq 0x10(%rbx), %rax
movl %ecx, %edx
movl 0x18(%rbx), %ecx
movb %dl, (%rax,%rcx)
movl 0x18(%rbx), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
ja 0xc920
incl %eax
jmp 0xc91b
cmpl $0xffff, %ecx           # imm = 0xFFFF
ja 0xc8c4
cmpq $0x0, 0x10(%rbx)
je 0xc8b0
movl 0x18(%rbx), %eax
addl $0x3, %eax
cmpl 0x1c(%rbx), %eax
jbe 0xc897
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %dl, %dl
je 0xc920
movq %rbx, %rdi
movl $0x3, %esi
movl %ecx, %r14d
callq 0xd771
movl %r14d, %ecx
testl %eax, %eax
jne 0xc920
rolw $0x8, %cx
movq 0x10(%rbx), %rax
movl %ecx, %edx
movl 0x18(%rbx), %ecx
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 0xc920
addl $0x3, %eax
jmp 0xc91b
cmpq $0x0, 0x10(%rbx)
je 0xc909
movl 0x18(%rbx), %eax
addl $0x5, %eax
cmpl 0x1c(%rbx), %eax
jbe 0xc8f6
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %dl, %dl
je 0xc920
movq %rbx, %rdi
movl $0x5, %esi
movl %ecx, %r14d
callq 0xd771
movl %r14d, %ecx
testl %eax, %eax
jne 0xc920
bswapl %ecx
movq 0x10(%rbx), %rax
movl %ecx, %edx
movl 0x18(%rbx), %ecx
movb $-0x21, (%rax,%rcx)
movl %edx, 0x1(%rax,%rcx)
movl 0x18(%rbx), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x7ffffffa, %eax       # imm = 0x7FFFFFFA
ja 0xc920
addl $0x5, %eax
movl %eax, 0x18(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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), %r8d
movq $-0x1, %rax
cmpl %r8d, %ecx
jae 0xd062
movq (%rdi), %rdx
leal 0x1(%rcx), %esi
movl %esi, 0x8(%rdi)
movzbl (%rdx,%rcx), %r9d
leal -0xc4(%r9), %eax
cmpl $0x17, %eax
ja 0xd046
movl $0x200001, %r10d        # imm = 0x200001
btl %eax, %r10d
jb 0xd02d
subl %esi, %r8d
movl $0x400002, %r10d        # imm = 0x400002
btl %eax, %r10d
jb 0xd00c
movl $0x800004, %r10d        # imm = 0x800004
btl %eax, %r10d
jae 0xd046
movq $-0x4, %rax
cmpl $0x4, %r8d
jb 0xd062
movl %esi, %eax
movl (%rdx,%rax), %eax
bswapl %eax
addl $0x5, %ecx
movl %ecx, 0x8(%rdi)
retq
movq $-0x3, %rax
cmpl $0x2, %r8d
jb 0xd062
movl %esi, %eax
movzwl (%rdx,%rax), %eax
rolw $0x8, %ax
addl $0x3, %ecx
movl %ecx, 0x8(%rdi)
movzwl %ax, %eax
retq
movq $-0x2, %rax
cmpl %esi, %r8d
je 0xd062
addl $0x2, %ecx
movl %ecx, 0x8(%rdi)
movl %esi, %eax
movzbl (%rdx,%rax), %eax
retq
movl %r9d, %ecx
andl $-0x20, %ecx
movq $-0x5, %rax
cmpl $0xa0, %ecx
jne 0xd062
andl $0x1f, %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_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), %r9d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %r9d, %ecx
jae 0xd233
movq (%rdi), %rdx
leal 0x1(%rcx), %r8d
movl %r8d, 0x8(%rdi)
movzbl (%rdx,%rcx), %r10d
subl %r8d, %r9d
cmpl $0xcb, %r10d
je 0xd20d
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
cmpl $0xca, %r10d
jne 0xd233
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpl $0x4, %r9d
jb 0xd233
movl %r8d, %eax
movl (%rdx,%rax), %eax
bswapl %eax
addl $0x5, %ecx
movl %ecx, 0x8(%rdi)
movd %eax, %xmm0
cvtss2sd %xmm0, %xmm0
jmp 0xd22d
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
cmpl $0x8, %r9d
jb 0xd233
movl %r8d, %eax
movq (%rdx,%rax), %rax
bswapq %rax
addl $0x9, %ecx
movl %ecx, 0x8(%rdi)
movq %rax, %xmm0
movq %xmm0, (%rsi)
xorl %eax, %eax
retq