LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/42Bastian[P]lyxass/jaguar.c
// Function: cond_rel
int cond_rel(int op )
{
  int cond;
  int32_t dest;
  int err;

  if ( GetCondition( & cond ) ) return 1;

  if ( cond && !TestAtom(',') ) return Error(SYNTAX_ERR,"");

  if ( (err = Expression(&dest)) == EXPR_ERR) return 1;

  op = ( op << 10 ) | cond;

  if ( (Global.pc < 0xf03000) && (Global.pc & 3) ){
    Warning("JR not long-aligned ! NOP inserted !");
    writeOp(0xe400); /* NOP */
  }

  if ( err == EXPR_UNSOLVED ){
    saveCurrentLine();
  } else {
    int32_t dist = (int32_t)dest - (Global.pc + 2);
    if ( dist < -32 || dist > 30 ) {
      return Error(DISTANCE_ERR,"");
    }
    dist >>= 1;
    op  |= (dist & 31) << 5;
  }

  writeOp( op );
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0xc(%rsp), %rdi
callq 0xb25a
movl $0x1, %ebp
testl %eax, %eax
je 0xb38e
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl 0xc(%rsp), %r15d
testl %r15d, %r15d
je 0xb3a6
movl $0x2c, %edi
callq 0x4fa8
testl %eax, %eax
je 0xb417
leaq 0x8(%rsp), %rdi
callq 0x9d6c
cmpl $0x11, %eax
je 0xb37f
movl %eax, %r14d
shll $0xa, %ebx
leaq 0x8fee(%rip), %r12      # 0x143b0
movl (%r12), %eax
cmpl $0xf03000, %eax         # imm = 0xF03000
setae %cl
testb $0x3, %al
sete %al
orb %cl, %al
jne 0xb401
leaq 0x2813(%rip), %rdi      # 0xdbf1
callq 0xa81b
movl $0x39, 0x8d33(%rip)     # 0x14120
movl (%r12), %eax
movl %eax, 0x8d2d(%rip)      # 0x14124
movl $0xffffe400, %edi       # imm = 0xFFFFE400
callq 0x35cf
orl %ebx, %r15d
cmpl $0x2, %r14d
jne 0xb434
xorl %eax, %eax
callq 0xa118
movl (%r12), %eax
jmp 0xb455
leaq 0x1b74(%rip), %rsi      # 0xcf92
movl $0x12, %edi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xa1d8
movl 0x8(%rsp), %ecx
movl (%r12), %eax
subl %eax, %ecx
leal 0x1e(%rcx), %edx
cmpl $0x3e, %edx
ja 0xb47a
addl $-0x2, %ecx
andl $0x3e, %ecx
shll $0x4, %ecx
orl %r15d, %ecx
movl %ecx, %r15d
movl %r15d, %ecx
shrl $0xa, %ecx
andl $0x3f, %ecx
movl %ecx, 0x8cbc(%rip)      # 0x14120
movl %eax, 0x8cba(%rip)      # 0x14124
movswl %r15w, %edi
callq 0x35cf
xorl %ebp, %ebp
jmp 0xb37f
leaq 0x1b11(%rip), %rsi      # 0xcf92
movl $0x16, %edi
callq 0xa1d8
movl %eax, %ebp
jmp 0xb37f
// File: /workspace/github_c_makefile_star2_O3/42Bastian[P]lyxass/jaguar.c
// Function: cond_abs
int cond_abs(int op )
{
  int cond;
  int reg;

  if ( GetCondition( &cond ) ) return 1;

  if ( cond && !TestAtom(',') ) return Error(SYNTAX_ERR,"");

  op = ( op << 10 ) | cond;

  if ( !TestAtom('(') ) return Error(SYNTAX_ERR,"");

  if ( GetRegister( &reg ) ) return 1;

  if ( !TestAtom(')') ) return Error(SYNTAX_ERR,"");

  op |= reg << 5;

  if ( (Global.pc < 0xf03000) && (Global.pc & 3) ){
    Warning("JUMP not long-aligned ! NOP inserted !");
    writeOp((short)0xe400);
  }

  writeOp( op );
  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0xc(%rsp), %rdi
callq 0xb25a
movl $0x1, %ebp
testl %eax, %eax
je 0xb4ba
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl 0xc(%rsp), %r14d
testl %r14d, %r14d
je 0xb4d6
movl $0x2c, %edi
callq 0x4fa8
testl %eax, %eax
je 0xb57d
movl $0x28, %edi
callq 0x4fa8
testl %eax, %eax
je 0xb57d
leaq 0x8(%rsp), %rdi
callq 0xab43
testl %eax, %eax
jne 0xb4af
movl $0x29, %edi
callq 0x4fa8
testl %eax, %eax
je 0xb57d
shll $0xa, %ebx
movl 0x8(%rsp), %eax
shll $0x5, %eax
orl %r14d, %ebx
orl %eax, %ebx
leaq 0x8e96(%rip), %r14      # 0x143b0
movl (%r14), %eax
cmpl $0xf03000, %eax         # imm = 0xF03000
setae %cl
testb $0x3, %al
sete %dl
orb %cl, %dl
jne 0xb55a
leaq 0x26e1(%rip), %rdi      # 0xdc16
callq 0xa81b
movl $0x39, 0x8bdc(%rip)     # 0x14120
movl (%r14), %eax
movl %eax, 0x8bd7(%rip)      # 0x14124
movl $0xffffe400, %edi       # imm = 0xFFFFE400
callq 0x35cf
movl (%r14), %eax
movl %ebx, %ecx
shrl $0xa, %ecx
andl $0x3f, %ecx
movl %ecx, 0x8bb8(%rip)      # 0x14120
movl %eax, 0x8bb6(%rip)      # 0x14124
movswl %bx, %edi
callq 0x35cf
xorl %ebp, %ebp
jmp 0xb4af
leaq 0x1a0e(%rip), %rsi      # 0xcf92
movl $0x12, %edi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0xa1d8
// File: /workspace/github_c_makefile_star2_O3/42Bastian[P]lyxass/jaguar.c
// Function: load2_reg
int load2_reg(int op )
{
  int reg1,reg2;

  if ( !TestAtom('(') ) return Error(SYNTAX_ERR,"");

  if ( GetRegister(&reg1) ) return 1;

  if ( !TestAtom(')') || !TestAtom(',') ) return Error(SYNTAX_ERR,"");

  if ( GetRegister( &reg2 ) ) return 1;

  op = ( op << 10 ) | ( reg1 << 5 ) | reg2;

  writeOp( op );

  return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x28, %edi
callq 0x4fa8
testl %eax, %eax
je 0xb7f8
leaq 0x4(%rsp), %rdi
callq 0xab43
movl $0x1, %ebp
testl %eax, %eax
je 0xb79a
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0x29, %edi
callq 0x4fa8
testl %eax, %eax
je 0xb7f8
movl $0x2c, %edi
callq 0x4fa8
testl %eax, %eax
je 0xb7f8
movq %rsp, %rdi
callq 0xab43
testl %eax, %eax
jne 0xb791
shll $0xa, %ebx
movl 0x4(%rsp), %eax
shll $0x5, %eax
orl %ebx, %eax
orl (%rsp), %eax
movswl %ax, %edi
shrl $0xa, %eax
andl $0x3f, %eax
movl %eax, 0x8940(%rip)      # 0x14120
leaq 0x8bc9(%rip), %rax      # 0x143b0
movl (%rax), %eax
movl %eax, 0x8935(%rip)      # 0x14124
callq 0x35cf
xorl %ebp, %ebp
jmp 0xb791
leaq 0x1793(%rip), %rsi      # 0xcf92
movl $0x12, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xa1d8
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_3/exercise_3_04/itoa.c
// Function: int_to_array
void int_to_array(int n, char s[])
{
  int i, sign;

  sign = n;

  i = 0;
  do
  {
    s[i++] = abs(n % 10) + '0';
  } while (n /= 10);

  if (sign < 0)
  {
    s[i++] = '-';
  }

  s[i] = '\0';

  int s_len = strlen(s);
  str_reverse(s, 0, s_len - 1);
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
xorl %eax, %eax
movl %edi, %ecx
movslq %ecx, %rdx
imulq $0x66666667, %rdx, %rcx # imm = 0x66666667
movq %rcx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rcx
addl %esi, %ecx
leal (%rcx,%rcx), %esi
leal (%rsi,%rsi,4), %esi
movl %edx, %r8d
subl %esi, %r8d
movl %r8d, %esi
negl %esi
cmovsl %r8d, %esi
addb $0x30, %sil
movb %sil, (%rbx,%rax)
incq %rax
addl $0x9, %edx
cmpl $0x12, %edx
ja 0x117f
testl %edi, %edi
jns 0x11cb
movl %eax, %ecx
incq %rax
movb $0x2d, (%rbx,%rcx)
cltq
movb $0x0, (%rbx,%rax)
movq %rbx, %rdi
callq 0x1040
leal -0x1(%rax), %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
decl %ecx
sarl %ecx
movslq %eax, %rdx
movslq %ecx, %rax
incq %rax
leaq (%rdx,%rbx), %rcx
decq %rcx
xorl %edx, %edx
movb (%rbx,%rdx), %sil
movb (%rcx), %dil
movb %dil, (%rbx,%rdx)
movb %sil, (%rcx)
incq %rdx
decq %rcx
cmpq %rdx, %rax
jne 0x11f7
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_aerospike.c
// Function: as_aerospike_new
as_aerospike * as_aerospike_new(void * s, const as_aerospike_hooks * h)
{
	as_aerospike * a = (as_aerospike *) cf_rc_alloc(sizeof(as_aerospike));
	a->is_rcalloc = true;
	a->source = s;
	a->hooks = h;
	return a;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x18, %edi
movq %rsi, %rbx
callq 0x87b0
movb $0x1, 0x10(%rax)
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_arraylist.c
// Function: as_arraylist_init
as_arraylist*
as_arraylist_init(as_arraylist* list, uint32_t capacity, uint32_t block_size)
{
	if (!list) return list;

	as_list_cons((as_list *) list, false, &as_arraylist_list_hooks);
	list->block_size = block_size;
	list->capacity = capacity;
	list->size = 0;
	if (list->capacity > 0) {
		list->free = true;
		list->elements = (as_val**) cf_calloc(capacity, sizeof(as_val*));
	}
	else {
		list->free = false;
		list->elements = NULL;
	}
	return list;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x8c90
movl %edx, %r14d
movq 0x17362(%rip), %rdx     # 0x1ffb8
movl %esi, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8aa0
testl %ebp, %ebp
movl %r14d, 0x18(%rbx)
movl %ebp, 0x1c(%rbx)
movl $0x0, 0x20(%rbx)
je 0x8c86
movl %ebp, %edi
movl $0x8, %esi
movb $0x1, 0x30(%rbx)
callq 0x88b0
jmp 0x8c8c
xorl %eax, %eax
movb $0x0, 0x30(%rbx)
movq %rax, 0x28(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_arraylist.c
// Function: as_arraylist_new
as_arraylist*
as_arraylist_new(uint32_t capacity, uint32_t block_size)
{
	as_arraylist* list = (as_arraylist*) cf_malloc(sizeof(as_arraylist));
	if (!list) return list;

	as_list_cons((as_list *) list, true, &as_arraylist_list_hooks);
	list->block_size = block_size;
	list->capacity = capacity;
	list->size = 0;
	if (list->capacity > 0) {
		list->free = true;
		list->elements = (as_val**) cf_calloc(capacity, sizeof(as_val*));
	}
	else {
		list->free = false;
		list->elements = NULL;
	}
	return list;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebp
movl $0x38, %edi
movl %esi, %r14d
callq 0x8080
movq %rax, %rbx
testq %rax, %rax
je 0x8cf5
movq 0x172fe(%rip), %rdx     # 0x1ffb8
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8aa0
testl %ebp, %ebp
movl %r14d, 0x18(%rbx)
movl %ebp, 0x1c(%rbx)
movl $0x0, 0x20(%rbx)
je 0x8ceb
movl %ebp, %edi
movl $0x8, %esi
movb $0x1, 0x30(%rbx)
callq 0x88b0
jmp 0x8cf1
xorl %eax, %eax
movb $0x0, 0x30(%rbx)
movq %rax, 0x28(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_arraylist.c
// Function: as_arraylist_release
bool
as_arraylist_release(as_arraylist* list)
{
	if (list->elements) {
		for (uint32_t i = 0; i < list->size; i++) {
			if (list->elements[i]) {
				as_val_destroy(list->elements[i]);
			}
			list->elements[i] = NULL;
		}

		if (list->free) {
			cf_free(list->elements);
		}
	}
	
	list->elements = NULL;
	list->size = 0;
	list->capacity = 0;

	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x28(%rdi)
movq %rdi, %rbx
je 0x8d4c
cmpl $0x0, 0x20(%rbx)
je 0x8d3d
xorl %r14d, %r14d
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x8d2a
callq 0x84b0
movq 0x28(%rbx), %rax
movq $0x0, (%rax,%r14,8)
incq %r14
movl 0x20(%rbx), %eax
cmpq %rax, %r14
jb 0x8d14
cmpb $0x0, 0x30(%rbx)
je 0x8d4c
movq 0x28(%rbx), %rdi
callq 0x8940
xorl %eax, %eax
movq %rax, 0x28(%rbx)
movq %rax, 0x1c(%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_arraylist.c
// Function: as_arraylist_set
int
as_arraylist_set(as_arraylist* list, uint32_t index, as_val* value)
{
	int rc = AS_ARRAYLIST_OK;

	if (index >= list->capacity) {
		rc = as_arraylist_ensure(list, (index + 1) - list->size);

		if (rc != AS_ARRAYLIST_OK) {
			return rc;
		}
	}

	// Make sure that, before we free (destroy) something, it is within the
	// legal bounds of the object.
	if (index < list->size) {
		as_val_destroy(list->elements[index]);
	}

	list->elements[index] = value ? value : (as_val*)&as_nil;

	if (index == list->size) {
		list->size++;
	}
	else if (index > list->size) {
		for (uint32_t i = list->size; i < index; i++) {
			list->elements[i] = (as_val*)&as_nil;
		}

		list->size = index + 1;
	}

	return rc;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl %esi, 0x1c(%rdi)
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
ja 0x8e0f
movl %ebx, %esi
movq %r14, %rdi
subl 0x20(%r14), %esi
incl %esi
callq 0x8e77
testl %eax, %eax
jne 0x8e6b
cmpl %ebx, 0x20(%r14)
jbe 0x8e27
movq 0x28(%r14), %rax
movl %ebx, %r12d
movq (%rax,%r12,8), %rdi
callq 0x84b0
jmp 0x8e2a
movl %ebx, %r12d
testq %r15, %r15
jne 0x8e36
movq 0x171aa(%rip), %r15     # 0x1ffe0
movq 0x28(%r14), %rax
movq %r15, (%rax,%r12,8)
movl 0x20(%r14), %ecx
cmpl %ebx, %ecx
je 0x8e63
xorl %eax, %eax
cmpl %ebx, %ecx
jae 0x8e6b
movq 0x1718d(%rip), %rax     # 0x1ffe0
movq 0x28(%r14), %rdx
movq %rax, (%rdx,%rcx,8)
incq %rcx
cmpq %rcx, %r12
jne 0x8e53
incl %ebx
xorl %eax, %eax
movl %ebx, 0x20(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_arraylist.c
// Function: as_arraylist_ensure
static int
as_arraylist_ensure(as_arraylist* list, uint32_t delta)
{
	// Check for capacity (in terms of elements, NOT size in bytes), and if we
	// need to allocate more, do a realloc.
	if ((list->size + delta) > list->capacity) {
		// by convention - we allocate more space ONLY when the unit of
		// (new) allocation is > 0.
		if (list->block_size == 0) {
			return AS_ARRAYLIST_ERR_MAX;
		}
		// Compute how much room we're missing for the new stuff
		int new_room = (list->size + delta) - list->capacity;
		// Compute new capacity in terms of multiples of block_size
		// This will get us (conservatively) at least one block
		int new_blocks = (new_room + list->block_size) / list->block_size;
		int new_capacity = list->capacity + (new_blocks * list->block_size);
		size_t new_bytes = sizeof(as_val*) * new_capacity;
		as_val** elements = (as_val**) cf_realloc(list->elements, new_bytes);
		if (! elements) {
			return AS_ARRAYLIST_ERR_ALLOC;
		}
		// Zero everything beyond the old pointers.
		size_t old_bytes = sizeof(as_val*) * list->capacity;
		memset((uint8_t *)elements + old_bytes, 0, new_bytes - old_bytes);
		// Set the new array pointer and capacity.
		list->elements = elements;
		list->capacity = new_capacity;
		list->free = true;
	}

	return AS_ARRAYLIST_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movl 0x1c(%rdi), %ecx
xorl %r14d, %r14d
addl 0x20(%rdi), %ebp
subl %ecx, %ebp
jbe 0x8ef5
movl 0x18(%rdi), %esi
movq %rdi, %rbx
testl %esi, %esi
je 0x8ee7
addl %esi, %ebp
xorl %edx, %edx
xorl %r14d, %r14d
movl %ebp, %eax
divl %esi
movq 0x28(%rbx), %rdi
subl %edx, %ebp
addl %ecx, %ebp
movslq %ebp, %r15
shlq $0x3, %r15
movq %r15, %rsi
callq 0x8510
testq %rax, %rax
je 0x8eef
movq %rax, %r12
movl 0x1c(%rbx), %eax
xorl %esi, %esi
leaq (%r12,%rax,8), %rdi
shlq $0x3, %rax
subq %rax, %r15
movq %r15, %rdx
callq 0x8400
movq %r12, 0x28(%rbx)
movl %ebp, 0x1c(%rbx)
movb $0x1, 0x30(%rbx)
jmp 0x8ef5
movl $0x2, %r14d
jmp 0x8ef5
movl $0x1, %r14d
movl %r14d, %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_arraylist.c
// Function: as_arraylist_insert
int
as_arraylist_insert(as_arraylist* list, uint32_t index, as_val* value)
{
	uint32_t delta = 1;

	if (index > list->size) {
		delta = index + 1 - list->size;
	}

	int rc = as_arraylist_ensure(list, delta);

	if (rc != AS_ARRAYLIST_OK) {
		return rc;
	}

	for (uint32_t i = list->size; i > index; i--) {
		list->elements[i] = list->elements[i - 1];
	}

	list->elements[index] = value ? value : (as_val*)&as_nil;

	if (index <= list->size) {
		list->size++;
	}
	else {
		for (uint32_t i = list->size; i < index; i++) {
			list->elements[i] = (as_val*)&as_nil;
		}

		list->size = index + 1;
	}

	return AS_ARRAYLIST_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0x20(%rdi), %eax
movl %esi, %r14d
movq %rdx, %r15
movq %rdi, %rbx
leal 0x1(%r14), %ebp
movl %ebp, %ecx
subl %eax, %ecx
cmpl %esi, %eax
movl $0x1, %esi
cmovbl %ecx, %esi
callq 0x8e77
testl %eax, %eax
jne 0x8ff9
movl 0x20(%rbx), %ecx
movl %r14d, %eax
cmpl %r14d, %ecx
jbe 0x8fbb
movq 0x28(%rbx), %rdx
movq -0x8(%rdx,%rcx,8), %rsi
movq %rsi, (%rdx,%rcx,8)
decq %rcx
cmpq %rax, %rcx
ja 0x8fa6
testq %r15, %r15
jne 0x8fc7
movq 0x17019(%rip), %r15     # 0x1ffe0
movq 0x28(%rbx), %rcx
movq %r15, (%rcx,%rax,8)
movl 0x20(%rbx), %ecx
cmpl %r14d, %ecx
jae 0x8ff0
movq 0x17002(%rip), %rdx     # 0x1ffe0
movq 0x28(%rbx), %rsi
movq %rdx, (%rsi,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x8fde
jmp 0x8ff4
incl %ecx
movl %ecx, %ebp
xorl %eax, %eax
movl %ebp, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_arraylist.c
// Function: as_arraylist_remove
int
as_arraylist_remove(as_arraylist* list, uint32_t index)
{
	if (index >= list->size) {
		return AS_ARRAYLIST_ERR_INDEX;
	}

	if (list->elements[index]) {
		as_val_destroy(list->elements[index]);
	}

	for (uint32_t i = index + 1; i < list->size; i++) {
		list->elements[i - 1] = list->elements[i];
	}

	list->size--;
	list->elements[list->size] = NULL; // clean vacated pointer slot

	return AS_ARRAYLIST_OK;
}

// Assembly:
movl 0x20(%rdi), %ecx
movl $0x3, %eax
cmpl %esi, %ecx
jbe 0x918c
pushq %r14
pushq %rbx
pushq %rax
movq 0x28(%rdi), %rax
movl %esi, %edx
movq %rdi, %rbx
movl %esi, %r14d
movq (%rax,%rdx,8), %rdi
testq %rdi, %rdi
je 0x914b
callq 0x84b0
movl 0x20(%rbx), %ecx
leal 0x1(%r14), %eax
cmpl %ecx, %eax
jae 0x9172
movl %eax, %eax
movq 0x28(%rbx), %rcx
movl %r14d, %esi
incl %r14d
movq (%rcx,%rax,8), %rdx
incq %rax
movq %rdx, (%rcx,%rsi,8)
movl 0x20(%rbx), %ecx
cmpq %rcx, %rax
jb 0x9155
decl %ecx
movl %ecx, 0x20(%rbx)
movq 0x28(%rbx), %rax
movq $0x0, (%rax,%rcx,8)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_arraylist.c
// Function: as_arraylist_concat
int
as_arraylist_concat(as_arraylist* list, const as_arraylist* list2)
{
	int rc = as_arraylist_ensure(list, list2->size);

	if (rc != AS_ARRAYLIST_OK) {
		return rc;
	}

	for (uint32_t i = 0; i < list2->size; i++) {
		if (list2->elements[i]) {
			as_val_reserve(list2->elements[i]);
		}

		list->elements[list->size++] = list2->elements[i];
	}

	return AS_ARRAYLIST_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl 0x20(%rsi), %esi
movq %rdi, %r14
callq 0x8e77
testl %eax, %eax
jne 0x91eb
cmpl $0x0, 0x20(%rbx)
je 0x91e9
xorl %r15d, %r15d
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x91c9
callq 0x83b0
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rax
jmp 0x91cb
xorl %eax, %eax
movl 0x20(%r14), %edx
movq 0x28(%r14), %rcx
incq %r15
leal 0x1(%rdx), %esi
movl %esi, 0x20(%r14)
movq %rax, (%rcx,%rdx,8)
movl 0x20(%rbx), %eax
cmpq %rax, %r15
jb 0x91ad
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_arraylist.c
// Function: as_arraylist_trim
int
as_arraylist_trim(as_arraylist* list, uint32_t index)
{
	if (index >= list->size) {
		return AS_ARRAYLIST_ERR_INDEX;
	}

	for (uint32_t i = index; i < list->size; i++) {
		if (list->elements[i]) {
			as_val_destroy(list->elements[i]);
			list->elements[i] = NULL;
		}
	}

	list->size = index;

	return AS_ARRAYLIST_OK;
}

// Assembly:
movl 0x20(%rdi), %ecx
movl $0x3, %eax
cmpl %esi, %ecx
jbe 0x9241
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %r15d
movq 0x28(%r14), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x922c
callq 0x84b0
movq 0x28(%r14), %rax
movq $0x0, (%rax,%r15,8)
movl 0x20(%r14), %ecx
incq %r15
movl %ecx, %eax
cmpq %rax, %r15
jb 0x920a
xorl %eax, %eax
movl %ebx, 0x20(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_arraylist.c
// Function: as_arraylist_tail
as_arraylist*
as_arraylist_tail(const as_arraylist* list)
{
	if (list->size == 0) return NULL;

	as_arraylist* list2 = as_arraylist_new(list->size-1, list->block_size);

	for(uint32_t i = 1, j = 0; i < list->size; i++, j++) {
		if (list->elements[i]) {
			as_val_reserve(list->elements[i]);
			list2->elements[j] = list2->elements[i];
		}
		else {
			list2->elements[j] = 0;
		}
	}

	return list2;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x20(%rdi), %edi
testl %edi, %edi
je 0x92a6
movl 0x18(%rbx), %esi
decl %edi
callq 0x8520
cmpl $0x2, 0x20(%rbx)
movq %rax, %r14
jb 0x92a9
movl $0x1, %r15d
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x928e
callq 0x83b0
movq 0x28(%r14), %rax
movq (%rax,%r15,8), %rcx
jmp 0x9294
movq 0x28(%r14), %rax
xorl %ecx, %ecx
movq %rcx, -0x8(%rax,%r15,8)
incq %r15
movl 0x20(%rbx), %eax
cmpq %rax, %r15
jb 0x9272
jmp 0x92a9
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_arraylist.c
// Function: as_arraylist_drop
as_arraylist*
as_arraylist_drop(const as_arraylist* list, uint32_t n)
{
	uint32_t		sz		= list->size;
	uint32_t		c		= n < sz ? n : sz;
	as_arraylist*	list2	= as_arraylist_new(sz-c, list->block_size);
	
	list2->size = sz-c;
	for(uint32_t i = c, j = 0; j < list2->size; i++, j++) {
		if (list->elements[i]) {
			as_val_reserve(list->elements[i]);
			list2->elements[j] = list->elements[i];
		}
		else {
			list2->elements[j] = 0;
		}
	}

	return list2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x20(%rdi), %r12d
movl %esi, %ebp
movl 0x18(%rdi), %esi
xorl %eax, %eax
movq %rdi, %rbx
movl %r12d, %r15d
subl %ebp, %r15d
cmovbl %eax, %r15d
movl %r15d, %edi
callq 0x8520
movq %rax, %r14
cmpl %ebp, %r12d
movl %r15d, 0x20(%rax)
jbe 0x932c
movl %ebp, %r15d
cmpq %r15, %r12
cmovbq %r12, %r15
xorl %r12d, %r12d
movq 0x28(%rbx), %rax
leal (%r15,%r12), %r13d
movq (%rax,%r13,8), %rdi
testq %rdi, %rdi
je 0x9316
callq 0x83b0
movq 0x28(%rbx), %rax
movq (%rax,%r13,8), %rax
jmp 0x9318
xorl %eax, %eax
movq 0x28(%r14), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
movl 0x20(%r14), %eax
cmpq %rax, %r12
jb 0x92f6
movq %r14, %rax
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_arraylist.c
// Function: as_arraylist_take
as_arraylist*
as_arraylist_take(const as_arraylist* list, uint32_t n)
{
	uint32_t		sz		= list->size;
	uint32_t		c		= n < sz ? n : sz;
	as_arraylist*	list2	= as_arraylist_new(c, list->block_size);

	list2->size = c;
	for(uint32_t i = 0; i < c; i++) {
		if (list->elements[i]) {
			as_val_reserve(list->elements[i]);
			list2->elements[i] = list->elements[i];
		}
		else {
			list2->elements[i] = 0;
		}
	}

	return list2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x20(%rdi), %eax
movl %esi, %ebp
movl 0x18(%rdi), %esi
movq %rdi, %rbx
cmpl %ebp, %eax
cmovbl %eax, %ebp
movl %ebp, %edi
callq 0x8520
movq %rax, %r14
testl %ebp, %ebp
movl %ebp, 0x20(%rax)
je 0x939b
movl %ebp, %r15d
xorl %r12d, %r12d
movq 0x28(%rbx), %rax
movq (%rax,%r12,8), %rdi
testq %rdi, %rdi
je 0x9389
callq 0x83b0
movq 0x28(%rbx), %rax
movq (%rax,%r12,8), %rax
jmp 0x938b
xorl %eax, %eax
movq 0x28(%r14), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
cmpq %r12, %r15
jne 0x936d
movq %r14, %rax
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_arraylist_iterator.c
// Function: as_arraylist_iterator_init
as_arraylist_iterator * as_arraylist_iterator_init(as_arraylist_iterator * iterator, const as_arraylist * list)
{
	if ( !iterator ) return iterator;

	as_iterator_init((as_iterator *) iterator, false, NULL, &as_arraylist_iterator_hooks);
	iterator->list = list;
	iterator->pos = 0;
	return iterator;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x94cd
movq 0x16b15(%rip), %rcx     # 0x1ffc8
movq %rsi, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8950
movq %r14, 0x18(%rbx)
movl $0x0, 0x20(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_arraylist_iterator.c
// Function: as_arraylist_iterator_new
as_arraylist_iterator * as_arraylist_iterator_new(const as_arraylist * list)
{
	as_arraylist_iterator * iterator = (as_arraylist_iterator *) cf_malloc(sizeof(as_arraylist_iterator));
	if ( !iterator ) return iterator;

	as_iterator_init((as_iterator *) iterator, true, NULL, &as_arraylist_iterator_hooks);
	iterator->list = list;
	iterator->pos = 0;
	return iterator;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x28, %edi
callq 0x8080
movq %rax, %r14
testq %rax, %rax
je 0x9513
movq 0x16ad0(%rip), %rcx     # 0x1ffc8
movq %r14, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x8950
movq %rbx, 0x18(%r14)
movl $0x0, 0x20(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_boolean.c
// Function: as_boolean_val_tostring
char * as_boolean_val_tostring(const as_val * v)
{
	if ( as_val_type(v) != AS_BOOLEAN ) return NULL;

	as_boolean * b = (as_boolean *) v;
	char * str = (char *) cf_malloc(sizeof(char) * 6);
    if (!str) return str;
	memset(str, 0, 6);
	if ( b->value ) {
		strcpy(str,"true");
	}
	else {
		strcpy(str,"false");
	}
	return str;

}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x9612
cmpb $0x2, 0x4(%rdi)
movq %rdi, %rbx
jne 0x9612
movl $0x6, %edi
callq 0x8080
testq %rax, %rax
je 0x9612
movw $0x0, 0x4(%rax)
movl $0x0, (%rax)
cmpb $0x1, 0x8(%rbx)
jne 0x9616
movb $0x0, 0x4(%rax)
movl $0x65757274, (%rax)     # imm = 0x65757274
jmp 0x9614
xorl %eax, %eax
popq %rbx
retq
movw $0x65, 0x4(%rax)
movl $0x736c6166, (%rax)     # imm = 0x736C6166
jmp 0x9614
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_buffer.c
// Function: as_buffer_destroy
void as_buffer_destroy(as_buffer * b) {
	if ( b->data ) { 
		cf_free(b->data);
		b->data = 0; 
	}
    return;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x964a
callq 0x8940
movq $0x0, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_buffer_pool.c
// Function: as_buffer_pool_init
int
as_buffer_pool_init(as_buffer_pool* pool, uint32_t header_size, uint32_t buffer_size)
{
	// Initialize empty queue.
	pool->queue = cf_queue_create(sizeof(void*), true);
	pool->header_size = header_size;
	pool->buffer_size = buffer_size;
	return (pool->queue)? 0 : -1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x8, %edi
movl $0x1, %esi
movl %edx, %ebx
callq 0x8780
xorl %ecx, %ecx
cmpq $0x1, %rax
movq %rax, (%r14)
movl %ebp, 0x8(%r14)
movl %ebx, 0xc(%r14)
sbbl %ecx, %ecx
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_buffer_pool.c
// Function: as_buffer_pool_pop
int
as_buffer_pool_pop(as_buffer_pool* pool, uint32_t size, as_buffer_result* buffer)
{
	size += pool->header_size;
	
	if (size > pool->buffer_size) {
		// Requested size is greater than fixed buffer size.
		// Allocate new buffer, but don't put back into pool.
		buffer->data = cf_malloc(size);
		
		if (! buffer->data) {
			return -1;
		}
		
		buffer->capacity = size - pool->header_size;
		return 2;
	}
	
	// Pop existing buffer from queue.
	int rc = cf_queue_pop(pool->queue, &buffer->data, CF_QUEUE_NOWAIT);
	
	if (rc == CF_QUEUE_OK) {
		buffer->capacity = pool->buffer_size - pool->header_size;
		return 0;
	}
	
	if (rc == CF_QUEUE_EMPTY) {
		// Queue is empty.  Create new buffer.  Queue can grow indefinitely.
		buffer->data = cf_malloc(pool->buffer_size);
		
		if (! buffer->data) {
			return -1;
		}
		
		buffer->capacity = pool->buffer_size - pool->header_size;
		return 1;
	}
	// Queue failure.
	return -2;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdx, %rbx
movq %rdi, %r14
addl 0x8(%rdi), %ebp
cmpl 0xc(%rdi), %ebp
jbe 0x96ad
movl %ebp, %edi
callq 0x8080
movq %rax, %rcx
movq %rax, (%rbx)
movl $0x2, %eax
testq %rcx, %rcx
jne 0x96f0
jmp 0x96e3
movq (%r14), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x87c0
movl %eax, %ecx
testl %eax, %eax
je 0x96ea
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpl $-0x2, %ecx
jne 0x96f7
movl 0xc(%r14), %edi
callq 0x8080
movq %rax, %rcx
movq %rax, (%rbx)
movl $0x1, %eax
testq %rcx, %rcx
jne 0x96ec
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x96f7
movl %ecx, %eax
movl 0xc(%r14), %ebp
subl 0x8(%r14), %ebp
movl %ebp, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_buffer_pool.c
// Function: as_buffer_pool_push
int
as_buffer_pool_push(as_buffer_pool* pool, void* buffer, uint32_t capacity)
{
	if (capacity + pool->header_size <= pool->buffer_size) {
		// Put buffer back into pool.
		if (cf_queue_push(pool->queue, &buffer) == CF_QUEUE_OK) {
			return 0;
		}
		else {
			cf_free(buffer);
			return -1;
		}
	}
	else {
		// Do not put large buffers back into pool.
		cf_free(buffer);
		return -2;
	}
}

// Assembly:
pushq %rax
movq %rsi, (%rsp)
addl 0x8(%rdi), %edx
cmpl 0xc(%rdi), %edx
jbe 0x9718
movq %rsi, %rdi
callq 0x8940
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x9739
movq (%rdi), %rdi
movq %rsp, %rsi
callq 0x8270
testl %eax, %eax
je 0x9737
movq (%rsp), %rdi
callq 0x8940
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x9739
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_buffer_pool.c
// Function: as_buffer_pool_push_limit
int
as_buffer_pool_push_limit(as_buffer_pool* pool, void* buffer, uint32_t capacity, uint32_t max_buffers)
{
	if (capacity + pool->header_size <= pool->buffer_size) {
		// Put buffer back into pool up to a limit.
		if (cf_queue_push_limit(pool->queue, &buffer, max_buffers)) {
			// Success.
			return 0;
		}
		else {
			cf_free(buffer);
			return -1;
		}
	}
	else {
		// Do not put large buffers back into pool.
		cf_free(buffer);
		return -2;
	}
}

// Assembly:
pushq %rax
movq %rsi, (%rsp)
addl 0x8(%rdi), %edx
cmpl 0xc(%rdi), %edx
jbe 0x9757
movq %rsi, %rdi
callq 0x8940
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x977a
movq (%rdi), %rdi
movq %rsp, %rsi
movl %ecx, %edx
callq 0x8980
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
jne 0x977a
movq (%rsp), %rdi
callq 0x8940
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_buffer_pool.c
// Function: as_buffer_pool_drop_buffers
int
as_buffer_pool_drop_buffers(as_buffer_pool* pool, int buffer_count)
{
	// Number of buffers in pool may grow too large if burst of concurrent buffer usage happens.
	// Delete buffer_count buffers from pool.
	void* buffer;
	int count = 0;
	
	while (count < buffer_count) {
		if (cf_queue_pop(pool->queue, &buffer, CF_QUEUE_NOWAIT) == CF_QUEUE_OK) {
			cf_free(buffer);
			count++;
		}
		else {
			break;
		}
	}
	return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testl %esi, %esi
jle 0x97b5
movl %esi, %ebp
movq %rdi, %r14
xorl %ebx, %ebx
movq %rsp, %r15
movq (%r14), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x87c0
testl %eax, %eax
jne 0x97b7
movq (%rsp), %rdi
callq 0x8940
incl %ebx
cmpl %ebx, %ebp
jne 0x9791
movl %ebp, %ebx
jmp 0x97b7
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_buffer_pool.c
// Function: as_buffer_pool_destroy
void
as_buffer_pool_destroy(as_buffer_pool* pool)
{
	// Empty and destroy queue.
	void* buffer;
	while (cf_queue_pop(pool->queue, &buffer, CF_QUEUE_NOWAIT) == CF_QUEUE_OK) {
		cf_free(buffer);
	}
	cf_queue_destroy(pool->queue);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
movq %rsp, %rsi
xorl %edx, %edx
callq 0x87c0
testl %eax, %eax
jne 0x97f9
movq %rsp, %r14
movq (%rsp), %rdi
callq 0x8940
movq (%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x87c0
testl %eax, %eax
je 0x97df
movq (%rbx), %rdi
callq 0x8370
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_bytes.c
// Function: as_bytes_set
bool as_bytes_set(as_bytes * bytes, uint32_t index, const uint8_t * value, uint32_t size)
{
    if ( index + size > bytes->capacity ) return false;
    memcpy(&bytes->value[index], value, size);
    if ( index + size > bytes->size ) {
    	bytes->size = index + size;
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl 0x8(%rdi), %r14d
leal (%rcx,%rsi), %ebp
cmpl %r14d, %ebp
ja 0x999e
movq %rdi, %rbx
movl %esi, %edi
movl %ecx, %eax
movq %rdx, %rsi
addq 0x10(%rbx), %rdi
movq %rax, %rdx
callq 0x85c0
cmpl 0xc(%rbx), %ebp
jbe 0x999e
movl %ebp, 0xc(%rbx)
cmpl %r14d, %ebp
setbe %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_bytes.c
// Function: as_bytes_set_var_int
uint32_t as_bytes_set_var_int(const as_bytes * bytes, uint32_t index, uint32_t value)
{
	uint8_t* begin = bytes->value + index;
	uint8_t* end = bytes->value + bytes->capacity;
	uint8_t* p = begin;
	
	while (p < end && value >= 0x80) {
		*p++ = (uint8_t)(value | 0x80);
		value >>= 7;
	}
	
	if (p < end) {
		*p++ = (uint8_t)value;
		return (uint32_t)(p - begin);
	}
	return 0;
}

// Assembly:
movq 0x10(%rdi), %rax
movl 0x8(%rdi), %edi
movl %esi, %ecx
addq %rax, %rcx
cmpl %esi, %edi
seta %r8b
setbe %sil
cmpl $0x80, %edx
setb %r9b
orb %sil, %r9b
jne 0x99fb
addq %rdi, %rax
movq %rcx, %rsi
movl %edx, %edi
movl %edx, %r8d
shrl $0x7, %edi
orb $-0x80, %r8b
movb %r8b, (%rsi)
incq %rsi
cmpq %rax, %rsi
setb %r8b
jae 0x9a00
cmpl $0x3fff, %edx           # imm = 0x3FFF
movl %edi, %edx
ja 0x99d6
jmp 0x9a00
movl %edx, %edi
movq %rcx, %rsi
xorl %eax, %eax
testb %r8b, %r8b
je 0x9a10
movb %dil, (%rsi)
subl %ecx, %esi
incl %esi
movl %esi, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_bytes.c
// Function: as_bytes_ensure
bool as_bytes_ensure(as_bytes * bytes, uint32_t capacity, bool resize)
{
	if ( capacity <= bytes->capacity ) return true;
	if ( !resize ) return false;

	uint8_t * buffer = NULL;

	if ( bytes->free ) {
		// this is a previously cf_malloc'd value
		buffer = cf_realloc(bytes->value, capacity);
		if ( !buffer ) {
			// allocation failed, so return false.
			return false;
		}
	}
	else {
		// this is a previously stack alloc'd value
		buffer = cf_malloc(capacity);
		if ( !buffer ) {
			// allocation failed, so return false.
			return false;
		}
		// copy the bytes
		memcpy(buffer, bytes->value, bytes->size);
	}

	bytes->free = true;
	bytes->value = buffer;
	bytes->capacity = capacity;

	return true;
}

// Assembly:
cmpl %esi, 0x8(%rdi)
setae %al
xorb $0x1, %dl
orb %al, %dl
jne 0x9ac2
pushq %r15
pushq %r14
pushq %rbx
cmpb $0x1, 0x18(%rdi)
movl %esi, %ebx
movq %rdi, %r14
jne 0x9a8b
movq 0x10(%r14), %rdi
movl %ebx, %esi
callq 0x8510
movq %rax, %r15
testq %rax, %rax
jne 0x9aaa
jmp 0x9abb
movl %ebx, %edi
callq 0x8080
testq %rax, %rax
je 0x9abb
movq 0x10(%r14), %rsi
movl 0xc(%r14), %edx
movq %rax, %rdi
movq %rax, %r15
callq 0x85c0
movb $0x1, %al
movb $0x1, 0x18(%r14)
movq %r15, 0x10(%r14)
movl %ebx, 0x8(%r14)
jmp 0x9abd
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_bytes.c
// Function: as_bytes_val_hashcode
uint32_t as_bytes_val_hashcode(const as_val * v)
{
    as_bytes * bytes = as_bytes_fromval(v);
    if ( bytes == NULL || bytes->value == NULL ) return 0;
    uint32_t hash = 0;
    uint8_t * buf = bytes->value;
    int len = bytes->size;
    while ( len-- ) {
        int b = *buf++;
        hash = b + (hash << 6) + (hash << 16) - hash;
    }
    return hash;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x9b13
cmpb $0x9, 0x4(%rdi)
jne 0x9b13
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x9b13
movl 0xc(%rdi), %edx
testl %edx, %edx
je 0x9b13
xorl %eax, %eax
movzbl (%rcx), %esi
imull $0x1003f, %eax, %eax    # imm = 0x1003F
incq %rcx
addl %esi, %eax
decl %edx
jne 0x9b01
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_bytes.c
// Function: as_bytes_to_string
bool
as_bytes_to_string(const uint8_t* bytes, uint32_t bytes_size, char* str, uint32_t str_size)
{
	// Ensure hex string has enough space including null terminator.
	if ((bytes_size * 2 + 1) > str_size) {
		if (str_size > 0) {
			*str = 0;
		}
		return false;
	}

	while (bytes_size > 0) {
		uint8_t b = *bytes++;
		*str++ = as_hex_chars[(b >> 4) & 0xf];
		*str++ = as_hex_chars[b & 0xf];
		bytes_size--;
	}
	*str = 0;
	return true;
}

// Assembly:
leal (%rsi,%rsi), %eax
cmpl %ecx, %eax
jae 0x9bd5
testl %esi, %esi
je 0x9bd9
movq 0x16426(%rip), %r8      # 0x1ffd0
movzbl (%rdi), %r9d
incq %rdi
movl %r9d, %r10d
andl $0xf, %r9d
shrl $0x4, %r10d
movb (%r8,%r10), %r10b
movb %r10b, (%rdx)
movb (%r8,%r9), %r9b
movb %r9b, 0x1(%rdx)
addq $0x2, %rdx
decl %esi
jne 0x9baa
jmp 0x9bd9
testl %ecx, %ecx
je 0x9bdc
movb $0x0, (%rdx)
cmpl %ecx, %eax
setb %al
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_bytes.c
// Function: as_bytes_to_string_with_prefix
bool
as_bytes_to_string_with_prefix(
	const uint8_t* bytes, uint32_t bytes_size, char* str, uint32_t str_size
	)
{
	if (as_bytes_to_string(bytes, bytes_size, str + 2, str_size - 2)) {
		*str++ = '0';
		*str = 'x';
		return true;
	}

	if (str_size > 0) {
		*str = 0;
	}
	return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r14d
movq %rdx, %rbx
addq $0x2, %rdx
leal -0x2(%r14), %ecx
callq 0x80d0
testb %al, %al
je 0x9c04
movw $0x7830, (%rbx)         # imm = 0x7830
jmp 0x9c0c
testl %r14d, %r14d
je 0x9c0c
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_bytes.c
// Function: as_bytes_from_string
int
as_bytes_from_string(uint8_t* bytes, uint32_t bytes_size, const char* str)
{
	// Skip prefix if it exists.
	if (*str == '0' && *(str+1) == 'x') {
		str += 2;
	}

	int len = (int)strlen(str);
	int count = len / 2;
	int rem = len - (count * 2);

	// Hex string length must be even (2 chars per byte).
	if (rem != 0) {
		return -1;
	}

	// Byte array must have enough space.
	if ((uint32_t)count > bytes_size) {
		return -1;
	}

	uint8_t hb; // high byte
	uint8_t lb; // low byte

	while (*str) {
		hb = hex_char_to_byte(*str++);

		if (hb == 0xff) {
			return -1;
		}

		lb = hex_char_to_byte(*str++);

		if (lb == 0xff) {
			return -1;
		}
		*bytes++ = (hb << 4) + lb;
	}
	return count;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpb $0x30, (%rdx)
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
jne 0x9c32
xorl %eax, %eax
cmpb $0x78, 0x1(%rbx)
sete %al
leaq (%rbx,%rax,2), %rbx
movq %rbx, %rdi
callq 0x8260
movl %eax, %edx
shrl $0x1f, %edx
addl %eax, %edx
movl %edx, %ecx
andl $-0x2, %edx
sarl %ecx
cmpl %eax, %edx
setne %al
cmpl %ebp, %ecx
seta %dl
orb %al, %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x9cd6
movb (%rbx), %dil
testb %dil, %dil
je 0x9cd4
xorl %edx, %edx
leal -0x30(%rdi), %esi
cmpb $0xa, %sil
jb 0x9c8c
leal -0x41(%rdi), %esi
cmpb $0x5, %sil
ja 0x9c7d
addb $-0x37, %dil
jmp 0x9c8a
leal -0x67(%rdi), %esi
cmpb $-0x6, %sil
jb 0x9cd6
addb $-0x57, %dil
movl %edi, %esi
movb 0x1(%rbx,%rdx,2), %dil
leal -0x30(%rdi), %r8d
cmpb $0xa, %r8b
jb 0x9cbc
leal -0x41(%rdi), %r8d
cmpb $0x5, %r8b
ja 0x9cab
addb $-0x37, %dil
jmp 0x9cb9
leal -0x67(%rdi), %r8d
cmpb $-0x6, %r8b
jb 0x9cd6
addb $-0x57, %dil
movl %edi, %r8d
shlb $0x4, %sil
addb %r8b, %sil
movb %sil, (%r14,%rdx)
movb 0x2(%rbx,%rdx,2), %dil
incq %rdx
testb %dil, %dil
jne 0x9c65
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/aerospike/as_double.c
// Function: as_double_val_tostring
char*
as_double_val_tostring(const as_val * val)
{
	as_double* value_ptr = (as_double*)val;
	char* str = (char*)cf_malloc(sizeof(char) * 64);
	sprintf(str, "%.16g", value_ptr->value);
	return str;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x40, %edi
callq 0x8080
movsd 0x8(%rbx), %xmm0
movq %rax, %r14
movq %rax, %rdi
leaq 0xe2cc(%rip), %rsi      # 0x18041
movb $0x1, %al
callq 0x89f0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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
testq %rdi, %rdi
je 0x9f00
cmpb $0xb, 0x4(%rdi)
jne 0x9f00
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x9f00
movb (%rcx), %dl
testb %dl, %dl
je 0x9f00
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 0x9eec
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x9f55
movq 0x18(%rbx), %r14
cmpq $-0x1, %r14
jne 0x9f28
callq 0x8260
movq %rax, %r14
movq %rax, 0x18(%rbx)
leaq 0x3(%r14), %rdi
callq 0x8080
testq %rax, %rax
je 0x9f55
movb $0x22, (%rax)
movq %rax, %rdi
movq %rax, %r15
movq 0x10(%rbx), %rsi
incq %rdi
callq 0x8180
movw $0x22, 0x1(%r15,%r14)
jmp 0x9f58
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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
leaq 0xe05d(%rip), %rsi      # 0x18047
movq %rax, (%r14)
movq %rax, 0x8(%r14)
movq %rax, 0x10(%r14)
movq %rax, 0x18(%r14)
movq %r14, %rdi
xorl %eax, %eax
movq 0x8(%rbx), %rdx
callq 0x89f0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0xa047
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xa047
movq (%rax), %rax
testq %rax, %rax
je 0xa047
movq %rbx, %rdi
callq *%rax
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movq %rax, 0x8(%rbx)
cmpb $0x1, (%rbx)
jne 0xa05f
movq %rbx, %rdi
popq %rbx
jmp 0x8940
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0xa085
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_O3/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 %r14
pushq %rbx
subq $0x18, %rsp
movq 0xdf47(%rip), %rax      # 0x18068
movq 0xdf38(%rip), %rdx      # 0x18060
movq 0xdf29(%rip), %rcx      # 0x18058
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 $0x5b, (%rax)
movl $0x1, 0x10(%rsp)
je 0xa1a2
movq 0x10(%rbx), %rdx
testq %rdx, %rdx
je 0xa1a2
movq 0xf0(%rdx), %r8
testq %r8, %r8
je 0xa1a2
movq %rsp, %r14
leaq 0x4e(%rip), %rsi        # 0xa1dc
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 0xa1bc
addl $0x2, %esi
movq %rax, %rdi
callq 0x8510
movq %rax, (%rsp)
movl 0x10(%rsp), %ecx
movl %ecx, %ecx
movb $0x5d, (%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_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 0xa1fa
movq 0x15d9e(%rip), %r14     # 0x1ff98
movq %r14, %rdi
callq 0x8260
movl 0x10(%rbx), %ecx
movl 0xc(%rbx), %esi
movq %rax, %r15
leal 0x2(%rax,%rcx), %eax
cmpl %esi, %eax
movq (%rbx), %rax
jb 0xa235
movl 0x8(%rbx), %ebp
leal 0x2(%r15), %ecx
movq %rax, %rdi
cmpl %ebp, %ecx
cmoval %ecx, %ebp
addl %ebp, %esi
callq 0x8510
movq %rax, (%rbx)
addl %ebp, 0xc(%rbx)
movl 0x10(%rbx), %ecx
cmpb $0x1, 0x14(%rbx)
jne 0xa259
movl %ecx, %ecx
movb $0x2c, (%rax,%rcx)
movl 0x10(%rbx), %ecx
movq (%rbx), %rax
incl %ecx
movb $0x20, (%rax,%rcx)
movl 0x10(%rbx), %ecx
addl $0x2, %ecx
movl %ecx, 0x10(%rbx)
movq (%rbx), %rax
movl %ecx, %edi
movl %r15d, %edx
movq %r14, %rsi
addq %rax, %rdi
callq 0x85c0
addl %r15d, 0x10(%rbx)
cmpq 0x15d24(%rip), %r14     # 0x1ff98
movb $0x1, 0x14(%rbx)
je 0xa282
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_O3/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 0xa2ad
movb $0x6, 0x4(%rax)
movb %sil, 0x5(%rax)
movl $0x1, (%rax)
movl %edx, 0x8(%rax)
movq %rcx, 0x10(%rax)
retq