LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_b64.c
// Function: cf_b64_decode_in_place
void
cf_b64_decode_in_place(uint8_t* in_out, uint32_t in_len, uint32_t* out_size)
{
	uint32_t i = 0;
	uint32_t j = 0;

	uint32_t d = 0;

	if (out_size && in_len != 0) {
		if (in_out[in_len - 1] == '=') {
			d++;
		}

		if (in_out[in_len - 2] == '=') {
			d++;
		}
	}

	while (i < in_len) {
		uint8_t i0 = in_out[i];
		uint8_t i1 = in_out[i + 1];
		uint8_t i2 = in_out[i + 2];
		uint8_t i3 = in_out[i + 3];

		uint8_t b0 = (DA[i0] << 2) | (DA[i1] >> 4);
		uint8_t b1 = (DA[i1] << 4) | (DA[i2] >> 2);
		uint8_t b2 = (DA[i2] << 6) |  DA[i3];

		in_out[j]     = b0;
		in_out[j + 1] = b1;
		in_out[j + 2] = b2;

		i += 4;
		j += 3;
	}

	if (out_size) {
		*out_size = j - d;
	}
}

// Assembly:
testq %rdx, %rdx
sete %cl
testl %esi, %esi
sete %r8b
xorl %eax, %eax
orb %cl, %r8b
movl $0x0, %ecx
jne 0x1201d
leal -0x1(%rsi), %r8d
xorl %ecx, %ecx
leal -0x2(%rsi), %r9d
cmpb $0x3d, (%rdi,%r8)
sete %cl
movl %ecx, %r8d
notl %ecx
negl %r8d
cmpb $0x3d, (%rdi,%r9)
cmovnel %r8d, %ecx
pushq %rbp
pushq %r14
pushq %rbx
movl $0x3, %r8d
leaq 0x4672(%rip), %r9       # 0x166a0
leal -0x3(%r8), %r10d
cmpl %esi, %r10d
jae 0x120a7
leal -0x2(%r8), %r11d
movl %r10d, %r10d
leal -0x1(%r8), %ebx
movl %r8d, %r14d
addl $0x4, %r8d
movzbl (%rdi,%r11), %r11d
movzbl (%rdi,%r10), %r10d
movzbl (%rdi,%rbx), %ebx
movzbl (%rdi,%r14), %r14d
movb (%r11,%r9), %r11b
movb (%r10,%r9), %r10b
movl %r11d, %ebp
shlb $0x2, %r10b
shlb $0x4, %r11b
shrb $0x4, %bpl
orb %r10b, %bpl
movb (%rbx,%r9), %r10b
movl %r10d, %ebx
shlb $0x6, %r10b
shrb $0x2, %bl
orb (%r14,%r9), %r10b
orb %r11b, %bl
movl %eax, %r11d
movb %bpl, (%rdi,%r11)
leal 0x1(%rax), %r11d
movb %bl, (%rdi,%r11)
leal 0x2(%rax), %r11d
addl $0x3, %eax
movb %r10b, (%rdi,%r11)
jmp 0x1202e
testq %rdx, %rdx
popq %rbx
popq %r14
popq %rbp
je 0x120b4
addl %eax, %ecx
movl %ecx, (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_b64.c
// Function: is_valid_encoded
static bool
is_valid_encoded(const char* in, uint32_t in_len)
{
	if (! in || in_len == 0 || (in_len & 3) != 0) {
		return false;
	}

	const uint8_t* end = (const uint8_t*)in + in_len - 2;
	const uint8_t* read = (const uint8_t*)in;

	while (read < end) {
		if (! VA[*read++]) {
			return false;
		}
	}

	if (*read == '=') {
		return *(read + 1) == '=';
	}

	if (! VA[*read++]) {
		return false;
	}

	return *read == '=' || VA[*read];
}

// Assembly:
testq %rdi, %rdi
sete %al
testl %esi, %esi
sete %cl
orb %al, %cl
testb $0x3, %sil
setne %al
orb %cl, %al
jne 0x12150
movl %esi, %eax
leaq 0x468f(%rip), %rcx      # 0x167a0
leaq -0x2(%rdi,%rax), %rax
cmpq %rax, %rdi
jae 0x12129
movzbl (%rdi), %edx
incq %rdi
cmpb $0x0, (%rdx,%rcx)
jne 0x12116
jmp 0x12150
movzbl (%rdi), %eax
cmpq $0x3d, %rax
jne 0x1213a
cmpb $0x3d, 0x1(%rdi)
sete %al
retq
cmpb $0x1, (%rax,%rcx)
jne 0x12150
movzbl 0x1(%rdi), %edx
movb $0x1, %al
cmpq $0x3d, %rdx
je 0x12139
movb (%rdx,%rcx), %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_crypto.c
// Function: cf_SHA1
void
cf_SHA1(const uint8_t* d, size_t n, uint8_t* md)
{
	cf_SHA1Context sha;

	cf_SHA1Reset(&sha);
	cf_SHA1Input(&sha, d, (unsigned)n);
	cf_SHA1Result(&sha, md);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movaps 0x46fe(%rip), %xmm0     # 0x168a0
movq %rsi, %r14
movl $0xc3d2e1f0, %eax       # imm = 0xC3D2E1F0
andl $0x0, 0x18(%rsp)
andw $0x0, 0x1c(%rsp)
movq %rdx, %rbx
movaps %xmm0, (%rsp)
movq %rax, 0x10(%rsp)
andq $0x0, 0x60(%rsp)
testl %r14d, %r14d
movb $0x1, %al
sete %cl
testq %rdi, %rdi
sete %dl
orb %cl, %dl
jne 0x12233
movq %rdi, %r15
xorl %eax, %eax
movq %rsp, %r12
addl $-0x1, %r14d
jae 0x1222e
testl %eax, %eax
jne 0x1222e
movswq 0x1c(%rsp), %rcx
movb (%r15), %al
leal 0x1(%rcx), %edx
movw %dx, 0x1c(%rsp)
movb %al, 0x1e(%rsp,%rcx)
addl $0x8, 0x14(%rsp)
jne 0x12215
incl 0x18(%rsp)
jne 0x12215
movl $0x1, 0x64(%rsp)
cmpw $0x40, 0x1c(%rsp)
jne 0x12225
movq %r12, %rdi
callq 0x13b02
movl 0x64(%rsp), %eax
incq %r15
jmp 0x121e1
testl %eax, %eax
sete %al
testq %rbx, %rbx
je 0x12329
testb %al, %al
je 0x12329
cmpl $0x0, 0x60(%rsp)
jne 0x12302
movswq 0x1c(%rsp), %rax
leal 0x1(%rax), %ecx
cmpq $0x37, %rax
movw %cx, 0x1c(%rsp)
jle 0x12286
movb $-0x80, 0x1e(%rsp,%rax)
cmpw $0x3f, %cx
jg 0x122a7
leal 0x1(%rcx), %eax
movw %ax, 0x1c(%rsp)
movswq %cx, %rax
movb $0x0, 0x1e(%rsp,%rax)
movzwl 0x1c(%rsp), %ecx
jmp 0x12268
movb $-0x80, %cl
movswq %ax, %rax
movb %cl, 0x1e(%rsp,%rax)
movzwl 0x1c(%rsp), %eax
cmpw $0x37, %ax
jg 0x122ca
leal 0x1(%rax), %ecx
movw %cx, 0x1c(%rsp)
xorl %ecx, %ecx
jmp 0x12288
movq %rsp, %rdi
callq 0x13b02
movswq 0x1c(%rsp), %rax
cmpq $0x37, %rax
jg 0x122ca
leal 0x1(%rax), %ecx
movw %cx, 0x1c(%rsp)
movb $0x0, 0x1e(%rsp,%rax)
jmp 0x122af
movq %rsp, %rdi
movl 0x14(%rdi), %eax
movl 0x18(%rdi), %ecx
bswapl %ecx
bswapl %eax
movl %ecx, 0x56(%rdi)
movl %eax, 0x5a(%rdi)
callq 0x13b02
pushq $-0x40
popq %rax
testq %rax, %rax
je 0x122f4
movb $0x0, 0x5e(%rsp,%rax)
incq %rax
jmp 0x122e5
andq $0x0, 0x14(%rsp)
movl $0x1, 0x60(%rsp)
xorl %eax, %eax
xorl %edx, %edx
cmpq $0x14, %rdx
je 0x12329
movl %edx, %ecx
andl $-0x4, %ecx
movl (%rsp,%rcx), %esi
movl %eax, %ecx
addl $0x8, %eax
notb %cl
andb $0x18, %cl
shrl %cl, %esi
movb %sil, (%rbx,%rdx)
incq %rdx
jmp 0x12306
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_crypto.c
// Function: cf_RIPEMD160
int
cf_RIPEMD160(const unsigned char* input, size_t ilen, unsigned char* output)
{
	int ret;
	cf_RIPEMD160_CTX ctx;

	if ((ret = cf_RIPEMD160_Init(&ctx)) != 0) {
		return ret;
	}

	if ((ret = cf_RIPEMD160_Update(&ctx, input, ilen)) != 0) {
		return ret;
	}

	if ((ret = cf_RIPEMD160_Final(output, &ctx)) != 0) {
		return ret;
	}

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsp, %r14
movaps 0x455a(%rip), %xmm1     # 0x168a0
xorps %xmm0, %xmm0
movq %rdx, %rbx
movq %rsi, %rdx
movq %rdi, %rsi
andl $0x0, 0x58(%r14)
andq $0x0, 0x50(%r14)
movq %r14, %rdi
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movaps %xmm0, 0x40(%r14)
movaps %xmm0, 0x30(%r14)
movaps %xmm0, 0x20(%r14)
movups %xmm1, 0x8(%r14)
movl $0xc3d2e1f0, 0x18(%r14) # imm = 0xC3D2E1F0
callq 0x8470
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8600
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_crypto.c
// Function: cf_RIPEMD160_Update
int
cf_RIPEMD160_Update(cf_RIPEMD160_CTX* ctx, const void* v_input, size_t ilen)
{
	const unsigned char* input = (const unsigned char*)v_input;

	int ret;

	if (ilen == 0) {
		return 0;
	}

	size_t left = ctx->total[0] & 0x3F;
	uint32_t fill = (uint32_t)(64 - left);

	ctx->total[0] += (uint32_t) ilen;
	ctx->total[0] &= 0xFFFFFFFF;

	if (ctx->total[0] < (uint32_t) ilen) {
		ctx->total[1]++;
	}

	if (left && ilen >= fill) {
		memcpy((void*)(ctx->buffer + left), input, fill);

		if ((ret = cf_ripemd160_process(ctx, ctx->buffer)) != 0) {
			return ret;
		}

		input += fill;
		ilen  -= fill;
		left = 0;
	}

	while (ilen >= 64) {
		if ((ret = cf_ripemd160_process(ctx, input)) != 0) {
			return ret;
		}

		input += 64;
		ilen  -= 64;
	}

	if (ilen > 0) {
		memcpy((void*)(ctx->buffer + left), input, ilen);
	}

	return 0;
}

// Assembly:
testq %rdx, %rdx
je 0x12471
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rdi), %eax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movl %r15d, %ecx
movl %eax, %r13d
andl $0x3f, %r13d
addl %eax, %ecx
movl %ecx, (%rdi)
jae 0x123f0
incl 0x4(%r14)
testl %r13d, %r13d
je 0x12430
pushq $0x40
popq %rax
subl %r13d, %eax
movq %r15, %rbp
movl %eax, %r12d
subq %r12, %rbp
jb 0x12448
leaq 0x1c(%r14,%r13), %rdi
movq %rbx, %rsi
movq %r12, %rdx
leaq 0x1c(%r14), %r15
callq 0x8630
movq %r14, %rdi
movq %r15, %rsi
callq 0x12595
addq %r12, %rbx
xorl %r13d, %r13d
movq %rbp, %r15
jmp 0x12448
xorl %r13d, %r13d
jmp 0x12448
movq %r14, %rdi
movq %rbx, %rsi
callq 0x12595
addq $0x40, %rbx
addq $-0x40, %r15
cmpq $0x40, %r15
jae 0x12435
testq %r15, %r15
je 0x12463
leaq 0x1c(%r14,%r13), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x8630
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_crypto.c
// Function: cf_RIPEMD160_Final
int
cf_RIPEMD160_Final(unsigned char* output, cf_RIPEMD160_CTX* ctx)
{
	uint32_t high = (ctx->total[0] >> 29) | (ctx->total[1] <<  3);
	uint32_t low  = (ctx->total[0] <<  3);

	unsigned char msglen[8];

	PUT_UINT32_LE(low,  msglen, 0);
	PUT_UINT32_LE(high, msglen, 4);

	uint32_t last = ctx->total[0] & 0x3F;
	uint32_t padn = (last < 56) ? (56 - last) : (120 - last);

	int ret = cf_RIPEMD160_Update(ctx, cf_ripemd160_padding, padn);

	if (ret != 0) {
		return ret;
	}

	ret = cf_RIPEMD160_Update(ctx, msglen, 8);

	if (ret != 0) {
		return ret;
	}

	PUT_UINT32_LE(ctx->state[0], output,  0);
	PUT_UINT32_LE(ctx->state[1], output,  4);
	PUT_UINT32_LE(ctx->state[2], output,  8);
	PUT_UINT32_LE(ctx->state[3], output, 12);
	PUT_UINT32_LE(ctx->state[4], output, 16);

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl (%rsi), %eax
leaq 0x8(%rsp), %r15
movl 0x4(%rsi), %ecx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x441c(%rip), %rsi      # 0x168b0
movq %r14, %rdi
leal (,%rax,8), %edx
shldl $0x3, %eax, %ecx
movb %dl, (%r15)
movl %eax, %edx
shrl $0x5, %edx
movb %dl, 0x1(%r15)
movl %eax, %edx
shrl $0xd, %edx
movb %dl, 0x2(%r15)
movl %eax, %edx
andl $0x3f, %eax
shrl $0x15, %edx
movb %dl, 0x3(%r15)
movl %ecx, %edx
movb %cl, 0x4(%r15)
movb %ch, 0xd(%rsp)
shrl $0x18, %ecx
shrl $0x10, %edx
movb %dl, 0x6(%r15)
xorl %edx, %edx
cmpl $0x38, %eax
movb %cl, 0x7(%r15)
setae %dl
shll $0x6, %edx
orl $0x38, %edx
subl %eax, %edx
callq 0x8470
pushq $0x8
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x8470
movb 0x8(%r14), %al
movb %al, (%rbx)
movb 0x9(%r14), %al
movb %al, 0x1(%rbx)
movb 0xa(%r14), %al
movb %al, 0x2(%rbx)
movb 0xb(%r14), %al
movb %al, 0x3(%rbx)
movb 0xc(%r14), %al
movb %al, 0x4(%rbx)
movb 0xd(%r14), %al
movb %al, 0x5(%rbx)
movb 0xe(%r14), %al
movb %al, 0x6(%rbx)
movb 0xf(%r14), %al
movb %al, 0x7(%rbx)
movb 0x10(%r14), %al
movb %al, 0x8(%rbx)
movb 0x11(%r14), %al
movb %al, 0x9(%rbx)
movb 0x12(%r14), %al
movb %al, 0xa(%rbx)
movb 0x13(%r14), %al
movb %al, 0xb(%rbx)
movb 0x14(%r14), %al
movb %al, 0xc(%rbx)
movb 0x15(%r14), %al
movb %al, 0xd(%rbx)
movb 0x16(%r14), %al
movb %al, 0xe(%rbx)
movb 0x17(%r14), %al
movb %al, 0xf(%rbx)
movb 0x18(%r14), %al
movb %al, 0x10(%rbx)
movb 0x19(%r14), %al
movb %al, 0x11(%rbx)
movb 0x1a(%r14), %al
movb %al, 0x12(%rbx)
movb 0x1b(%r14), %al
movb %al, 0x13(%rbx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_ll.c
// Function: cf_ll_size
uint32_t cf_ll_size(cf_ll *ll) {
	LL_LOCK(ll);
	uint32_t sz = ll->sz;
	LL_UNLOCK(ll);
	return(sz);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movb 0x1c(%rdi), %al
movq %rdi, %rbx
cmpb $0x1, %al
jne 0x140e5
leaq 0x20(%rbx), %rdi
callq 0x8ba0
movb 0x1c(%rbx), %al
movl 0x18(%rbx), %ebp
testb $0x1, %al
je 0x140f8
addq $0x20, %rbx
movq %rbx, %rdi
callq 0x86b0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_ll.c
// Function: cf_ll_search_lockfree
cf_ll_element * cf_ll_search_lockfree(cf_ll *ll, cf_ll_element *e, bool forward, cf_ll_reduce_fn fn) {
	if (ll->head == NULL) {
		return NULL;
	}
	int rv = 0;
	cf_ll_element *cur = forward ? ll->head : ll->tail;
	
	while (cur) {
		rv = (*fn) (cur, (void*)e);

		if (rv == CF_LL_REDUCE_MATCHED) {
			return cur;
		}
		else if (rv == CF_LL_REDUCE_NOT_MATCHED) {
			cur = forward ? cur->next : cur->prev;
			rv = 0;
		}
		else {
			return NULL;
		}
	}
	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x14146
movq %rcx, %r14
movq %rsi, %r15
testb %dl, %dl
je 0x14120
xorl %r12d, %r12d
jmp 0x1412e
movq 0x8(%rdi), %rbx
pushq $0x8
popq %r12
jmp 0x1412e
movq (%rbx,%r12), %rbx
testq %rbx, %rbx
je 0x14146
movq %rbx, %rdi
movq %r15, %rsi
callq *%r14
cmpl $0x4, %eax
je 0x1412a
cmpl $0x3, %eax
je 0x14148
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_ll.c
// Function: cf_ll_search
cf_ll_element * cf_ll_search(cf_ll *ll, cf_ll_element *e, bool forward, cf_ll_reduce_fn fn) 
{
	LL_LOCK(ll);
	
	cf_ll_element * ele = NULL;
	ele = cf_ll_search_lockfree(ll, e, forward, fn);

	LL_UNLOCK(ll);

	return ele;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x1, 0x1c(%rdi)
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
jne 0x14178
leaq 0x20(%rbx), %rdi
callq 0x8ba0
movzbl %bpl, %edx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x85f0
cmpb $0x1, 0x1c(%rbx)
movq %rax, %r14
jne 0x1419f
addq $0x20, %rbx
movq %rbx, %rdi
callq 0x86b0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_ll.c
// Function: cf_ll_getIterator
cf_ll_iterator * cf_ll_getIterator(cf_ll * ll, bool forward)
{
	cf_ll_iterator *iter = NULL;
	iter = (cf_ll_iterator *)cf_malloc(sizeof(cf_ll_iterator));
	if (iter == NULL) {
		return NULL;
	}
	iter->forward = forward;
	iter->next = iter->forward ? ll->head : ll->tail;
	return iter;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
pushq $0x10
popq %rdi
callq 0x8080
testq %rax, %rax
je 0x141d5
movb %bpl, 0x8(%rax)
xorb $0x1, %bpl
movzbl %bpl, %ecx
movq (%rbx,%rcx,8), %rcx
movq %rcx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_ll.c
// Function: cf_ll_getNext
cf_ll_element * cf_ll_getNext(cf_ll_iterator *iter)
{
	if (!iter) return NULL;
	cf_ll_element * ele = iter->next;
	if (ele != NULL) {
		iter->next = iter->forward ? ele->next : ele->prev;
	}
	return ele;
}

// Assembly:
testq %rdi, %rdi
je 0x14202
movq (%rdi), %rax
testq %rax, %rax
je 0x14202
movzbl 0x8(%rdi), %ecx
xorl $0x1, %ecx
movq (%rax,%rcx,8), %rcx
movq %rcx, (%rdi)
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_ll.c
// Function: cf_ll_index
cf_ll_element *cf_ll_index(cf_ll *ll, int index)
{
	cf_ll_element *ele = NULL;
	if (index < 0) {
		index = (-index) - 1;
		ele = ll->tail;
		while (index-- && ele) {
			ele = ele->prev;
		}
	}
	else {
		ele = ll->head;
		while (index-- && ele) {
			ele = ele->next;
		}
	}
	return ele;
}

// Assembly:
movq %rdi, %rax
testl %esi, %esi
js 0x1421b
movq (%rax), %rax
addl $-0x1, %esi
jae 0x1422c
testq %rax, %rax
jne 0x1420c
jmp 0x1422c
incl %esi
movq 0x8(%rax), %rax
testl %esi, %esi
je 0x1422c
incl %esi
testq %rax, %rax
jne 0x1421d
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_ll.c
// Function: cf_ll_init
int  cf_ll_init(cf_ll *ll, cf_ll_destructor destroy_fn, bool uselock) {
	ll->head = 0;
	ll->tail = 0;
	ll->destroy_fn = destroy_fn;
	ll->sz = 0;
	ll->uselock = uselock;
	if (uselock) {
		pthread_mutex_init(&ll->LOCK, 0);
	}
	return(0);	
}

// Assembly:
andq $0x0, 0x8(%rdi)
andq $0x0, (%rdi)
movq %rsi, 0x10(%rdi)
andl $0x0, 0x18(%rdi)
testl %edx, %edx
movb %dl, 0x1c(%rdi)
je 0x14255
pushq %rax
addq $0x20, %rdi
xorl %esi, %esi
callq 0x8b60
addq $0x8, %rsp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_queue.c
// Function: cf_queue_init
bool
cf_queue_init(cf_queue *q, size_t element_sz, uint32_t capacity,
		bool threadsafe)
{
	q->alloc_sz = capacity;
	q->write_offset = q->read_offset = 0;
	q->n_eles = 0;
	q->element_sz = element_sz;
	q->threadsafe = threadsafe;
	q->free_struct = false;

	q->elements = (uint8_t*)cf_malloc(capacity * element_sz);

	if (! q->elements) {
		return false;
	}

	if (! q->threadsafe) {
		return true;
	}

	if (0 != pthread_mutex_init(&q->LOCK, NULL)) {
		cf_free(q->elements);
		return false;
	}

	if (0 != pthread_cond_init(&q->CV, NULL)) {
		pthread_mutex_destroy(&q->LOCK);
		cf_free(q->elements);
		return false;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, 0x4(%rdi)
andq $0x0, 0x8(%rdi)
andl $0x0, 0x10(%rdi)
movq %rsi, 0x18(%rdi)
movb %cl, (%rdi)
movq %rdi, %rbx
movb $0x0, 0x1(%rdi)
movl %edx, %edi
imulq %rsi, %rdi
callq 0x8080
testq %rax, %rax
movq %rax, 0x78(%rbx)
je 0x142c3
cmpb $0x1, (%rbx)
movb $0x1, %bpl
jne 0x142c5
leaq 0x20(%rbx), %r14
xorl %esi, %esi
movq %r14, %rdi
callq 0x8b60
testl %eax, %eax
jne 0x142ba
leaq 0x48(%rbx), %rdi
xorl %esi, %esi
callq 0x8660
testl %eax, %eax
je 0x142c5
movq %r14, %rdi
callq 0x8300
movq 0x78(%rbx), %rdi
callq 0x8a00
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_queue.c
// Function: cf_queue_create
cf_queue *
cf_queue_create(size_t element_sz, bool threadsafe)
{
	cf_queue *q = (cf_queue*)cf_malloc(sizeof(cf_queue));

	if (! q) {
		return NULL;
	}

	if (! cf_queue_init(q, element_sz, CF_QUEUE_ALLOCSZ, threadsafe)) {
		cf_free(q);
		return NULL;
	}

	q->free_struct = true;

	return q;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x80, %edi
movl %esi, %ebp
callq 0x8080
testq %rax, %rax
je 0x1430b
movq %rax, %rbx
movzbl %bpl, %ecx
pushq $0x40
popq %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x8bb0
testb %al, %al
je 0x14303
movb $0x1, 0x1(%rbx)
jmp 0x1430d
movq %rbx, %rdi
callq 0x8a00
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_queue.c
// Function: cf_queue_destroy
void
cf_queue_destroy(cf_queue *q)
{
	if (q->threadsafe) {
		pthread_cond_destroy(&q->CV);
		pthread_mutex_destroy(&q->LOCK);
	}

	cf_free(q->elements);

	if (q->free_struct) {
		memset(q, 0, sizeof(cf_queue));
		cf_free(q);
	}
}

// Assembly:
pushq %rbx
cmpb $0x1, (%rdi)
movq %rdi, %rbx
jne 0x14330
leaq 0x48(%rbx), %rdi
callq 0x89c0
leaq 0x20(%rbx), %rdi
callq 0x8300
movq 0x78(%rbx), %rdi
callq 0x8a00
cmpb $0x1, 0x1(%rbx)
jne 0x14353
pushq $0x10
popq %rcx
xorl %eax, %eax
movq %rbx, %rdi
rep  stosq %rax, %es:(%rdi)
movq %rbx, %rdi
popq %rbx
jmp 0x8a00
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_queue.c
// Function: cf_queue_push
int
cf_queue_push(cf_queue *q, const void *ptr)
{
	cf_queue_lock(q);

	// Check queue length.
	if (CF_Q_SZ(q) == q->alloc_sz) {
		if (0 != cf_queue_resize(q, q->alloc_sz * 2)) {
			cf_queue_unlock(q);
			return CF_QUEUE_ERR;
		}
	}

	// TODO - if queues are power of 2, this can be a shift.
	memcpy(CF_Q_ELEM_PTR(q, q->write_offset), ptr, q->element_sz);
	q->write_offset++;
	q->n_eles++;
	cf_queue_unwrap(q);

	if (q->threadsafe) {
		pthread_cond_signal(&q->CV);
	}

	cf_queue_unlock(q);
	return CF_QUEUE_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x143df
movl 0xc(%rbx), %eax
movl 0x4(%rbx), %ecx
movl %eax, %esi
subl 0x8(%rbx), %esi
cmpl %ecx, %esi
jne 0x1438c
addl %esi, %esi
movq %rbx, %rdi
callq 0x143ee
testl %eax, %eax
je 0x14386
pushq $-0x1
popq %rbp
jmp 0x143d0
movl 0x4(%rbx), %ecx
movl 0xc(%rbx), %eax
xorl %edx, %edx
movq %r14, %rsi
xorl %ebp, %ebp
divl %ecx
movl %edx, %edi
movq 0x18(%rbx), %rdx
imulq %rdx, %rdi
addq 0x78(%rbx), %rdi
callq 0x8630
movq 0xc(%rbx), %xmm0
pcmpeqd %xmm1, %xmm1
movq %rbx, %rdi
psubd %xmm1, %xmm0
movq %xmm0, 0xc(%rbx)
callq 0x144cd
cmpb $0x1, (%rbx)
jne 0x143d0
leaq 0x48(%rbx), %rdi
callq 0x8510
movq %rbx, %rdi
callq 0x144be
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_queue.c
// Function: cf_queue_resize
static int
cf_queue_resize(cf_queue *q, uint32_t new_sz)
{
	// The rare case where the queue is not fragmented, and realloc makes sense
	// and none of the offsets need to move.
	if (0 == q->read_offset % q->alloc_sz) {
		q->elements = (uint8_t*)cf_realloc(q->elements, new_sz * q->element_sz);

		if (! q->elements) {
			return CF_QUEUE_ERR;
		}

		q->read_offset = 0;
		q->write_offset = q->alloc_sz;
	}
	else {
		uint8_t *newq = (uint8_t*)cf_malloc(new_sz * q->element_sz);

		if (! newq) {
			return CF_QUEUE_ERR;
		}

		// end_sz is used bytes in old queue from insert point to end.
		size_t end_sz =
				(q->alloc_sz - (q->read_offset % q->alloc_sz)) * q->element_sz;

		memcpy(&newq[0], CF_Q_ELEM_PTR(q, q->read_offset), end_sz);
		memcpy(&newq[end_sz], &q->elements[0],
				(q->alloc_sz * q->element_sz) - end_sz);

		cf_free(q->elements);
		q->elements = newq;

		q->write_offset = q->alloc_sz;
		q->read_offset = 0;
	}

	q->alloc_sz = new_sz;

	return CF_QUEUE_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl 0x8(%rdi), %eax
xorl %edx, %edx
movl %esi, %ebx
movq %rdi, %r14
divl 0x4(%rdi)
testl %edx, %edx
je 0x14481
movl %ebx, %edi
imulq 0x18(%r14), %rdi
callq 0x8080
testq %rax, %rax
je 0x144af
movq %rax, %r15
movl 0x4(%r14), %r12d
movl 0x8(%r14), %eax
xorl %edx, %edx
movq %r15, %rdi
divl %r12d
movq 0x18(%r14), %rsi
subl %edx, %r12d
imulq %rsi, %r12
imulq %rdx, %rsi
addq 0x78(%r14), %rsi
movq %r12, %rdx
callq 0x8630
movl 0x4(%r14), %edx
movq 0x78(%r14), %rsi
movq %r15, %rdi
addq %r12, %rdi
imulq 0x18(%r14), %rdx
subq %r12, %rdx
callq 0x8630
movq 0x78(%r14), %rdi
callq 0x8a00
movq %r15, 0x78(%r14)
movl 0x4(%r14), %eax
movl %eax, 0xc(%r14)
andl $0x0, 0x8(%r14)
jmp 0x144a7
movl %ebx, %esi
movq 0x78(%r14), %rdi
imulq 0x18(%r14), %rsi
callq 0x8540
testq %rax, %rax
movq %rax, 0x78(%r14)
je 0x144af
andl $0x0, 0x8(%r14)
movl 0x4(%r14), %eax
movl %eax, 0xc(%r14)
xorl %eax, %eax
movl %ebx, 0x4(%r14)
jmp 0x144b2
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_queue.c
// Function: cf_queue_unwrap
static inline void
cf_queue_unwrap(cf_queue *q)
{
	if ((q->write_offset & 0xC0000000) != 0) {
		int sz = CF_Q_SZ(q);

		q->read_offset %= q->alloc_sz;
		q->write_offset = q->read_offset + sz;
	}
}

// Assembly:
movl 0xc(%rdi), %ecx
cmpl $0x40000000, %ecx       # imm = 0x40000000
jb 0x144ea
movl 0x8(%rdi), %eax
xorl %edx, %edx
subl %eax, %ecx
divl 0x4(%rdi)
addl %edx, %ecx
movl %edx, 0x8(%rdi)
movl %ecx, 0xc(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_queue.c
// Function: cf_queue_push_limit
bool
cf_queue_push_limit(cf_queue *q, const void *ptr, uint32_t limit)
{
	cf_queue_lock(q);

	uint32_t size = CF_Q_SZ(q);

	if (size >= limit) {
		cf_queue_unlock(q);
		return false;
	}

	if (size == q->alloc_sz) {
		if (0 != cf_queue_resize(q, q->alloc_sz * 2)) {
			cf_queue_unlock(q);
			return false;
		}
	}

	// TODO - if queues are power of 2, this can be a shift.
	memcpy(CF_Q_ELEM_PTR(q, q->write_offset), ptr, q->element_sz);
	q->write_offset++;
	q->n_eles++;
	cf_queue_unwrap(q);

	if (q->threadsafe) {
		pthread_cond_signal(&q->CV);
	}

	cf_queue_unlock(q);
	return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x143df
movl 0xc(%rbx), %eax
movl %eax, %esi
subl 0x8(%rbx), %esi
cmpl %ebp, %esi
jae 0x1451d
movl 0x4(%rbx), %ecx
cmpl %ecx, %esi
jne 0x14527
addl %esi, %esi
movq %rbx, %rdi
callq 0x143ee
testl %eax, %eax
je 0x14521
xorl %ebp, %ebp
jmp 0x1456c
movl 0x4(%rbx), %ecx
movl 0xc(%rbx), %eax
xorl %edx, %edx
movq %r14, %rsi
divl %ecx
movl %edx, %edi
movq 0x18(%rbx), %rdx
imulq %rdx, %rdi
addq 0x78(%rbx), %rdi
callq 0x8630
movq 0xc(%rbx), %xmm0
pcmpeqd %xmm1, %xmm1
movq %rbx, %rdi
psubd %xmm1, %xmm0
movq %xmm0, 0xc(%rbx)
callq 0x144cd
cmpb $0x1, (%rbx)
movb $0x1, %bpl
jne 0x1456c
leaq 0x48(%rbx), %rdi
callq 0x8510
movq %rbx, %rdi
callq 0x144be
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_queue.c
// Function: cf_queue_push_unique
int
cf_queue_push_unique(cf_queue *q, const void *ptr)
{
	cf_queue_lock(q);

	// Check if element is already queued.
	if (CF_Q_SZ(q) != 0) {
		for (uint32_t i = q->read_offset; i < q->write_offset; i++) {
			if (0 == memcmp(CF_Q_ELEM_PTR(q, i), ptr, q->element_sz)) {
				// Element is already queued.
				// TODO - return 0 if all callers regard this as normal?
				cf_queue_unlock(q);
				return -2;
			}
		}
	}

	if (CF_Q_SZ(q) == q->alloc_sz) {
		if (0 != cf_queue_resize(q, q->alloc_sz * 2)) {
			cf_queue_unlock(q);
			return CF_QUEUE_ERR;
		}
	}

	// TODO - if queues are power of 2, this can be a shift.
	memcpy(CF_Q_ELEM_PTR(q, q->write_offset), ptr, q->element_sz);
	q->write_offset++;
	q->n_eles++;
	cf_queue_unwrap(q);

	if (q->threadsafe) {
		pthread_cond_signal(&q->CV);
	}

	cf_queue_unlock(q);
	return CF_QUEUE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x143df
movl 0xc(%rbx), %r15d
movl 0x8(%rbx), %r13d
movl %r15d, %r12d
subl %r13d, %r12d
jne 0x14788
movl 0x4(%rbx), %ecx
cmpl %ecx, %r12d
jne 0x147be
addl %r12d, %r12d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x143ee
testl %eax, %eax
je 0x147b7
pushq $-0x1
popq %rbp
jmp 0x14805
pushq $-0x2
popq %rbp
cmpl %r15d, %r13d
jae 0x14769
movl %r13d, %eax
xorl %edx, %edx
movq %r14, %rsi
divl 0x4(%rbx)
movl %edx, %edi
movq 0x18(%rbx), %rdx
imulq %rdx, %rdi
addq 0x78(%rbx), %rdi
callq 0x8800
incl %r13d
testl %eax, %eax
jne 0x1478b
jmp 0x14805
movl 0x4(%rbx), %ecx
movl 0xc(%rbx), %r15d
movl %r15d, %eax
xorl %edx, %edx
movq %r14, %rsi
xorl %ebp, %ebp
divl %ecx
movl %edx, %edi
movq 0x18(%rbx), %rdx
imulq %rdx, %rdi
addq 0x78(%rbx), %rdi
callq 0x8630
movq 0xc(%rbx), %xmm0
pcmpeqd %xmm1, %xmm1
movq %rbx, %rdi
psubd %xmm1, %xmm0
movq %xmm0, 0xc(%rbx)
callq 0x144cd
cmpb $0x1, (%rbx)
jne 0x14805
leaq 0x48(%rbx), %rdi
callq 0x8510
movq %rbx, %rdi
callq 0x144be
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_queue.c
// Function: cf_queue_push_head
int
cf_queue_push_head(cf_queue *q, const void *ptr)
{
	cf_queue_lock(q);

	if (CF_Q_SZ(q) == q->alloc_sz) {
		if (0 != cf_queue_resize(q, q->alloc_sz * 2)) {
			cf_queue_unlock(q);
			return CF_QUEUE_ERR;
		}
	}

	if (q->read_offset == 0) {
		q->read_offset += q->alloc_sz;
		q->write_offset += q->alloc_sz;
	}

	q->read_offset--;
	memcpy(CF_Q_ELEM_PTR(q, q->read_offset), ptr, q->element_sz);
	q->n_eles++;
	cf_queue_unwrap(q);

	if (q->threadsafe) {
		pthread_cond_signal(&q->CV);
	}

	cf_queue_unlock(q);
	return CF_QUEUE_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x143df
movl 0xc(%rbx), %esi
movl 0x8(%rbx), %eax
movl 0x4(%rbx), %ecx
subl %eax, %esi
cmpl %ecx, %esi
jne 0x14855
addl %esi, %esi
movq %rbx, %rdi
callq 0x143ee
testl %eax, %eax
je 0x1484f
pushq $-0x1
popq %rbp
jmp 0x14898
movl 0x4(%rbx), %ecx
movl 0x8(%rbx), %eax
testl %eax, %eax
jne 0x1485e
addl %ecx, 0xc(%rbx)
movl %ecx, %eax
decl %eax
xorl %edx, %edx
movq %r14, %rsi
xorl %ebp, %ebp
movl %eax, 0x8(%rbx)
divl %ecx
movl %edx, %edi
movq 0x18(%rbx), %rdx
imulq %rdx, %rdi
addq 0x78(%rbx), %rdi
callq 0x8630
incl 0x10(%rbx)
movq %rbx, %rdi
callq 0x144cd
cmpb $0x1, (%rbx)
jne 0x14898
leaq 0x48(%rbx), %rdi
callq 0x8510
movq %rbx, %rdi
callq 0x144be
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_queue.c
// Function: cf_queue_peek
int
cf_queue_peek(cf_queue *q, void *buf)
{
	cf_queue_lock(q);

	if (CF_Q_EMPTY(q)) {
		cf_queue_unlock(q);
		return CF_QUEUE_EMPTY;
	}

	memcpy(buf, CF_Q_ELEM_PTR(q, q->read_offset), q->element_sz);

	cf_queue_unlock(q);
	return CF_QUEUE_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x143df
movl 0x8(%rbx), %eax
cmpl %eax, 0xc(%rbx)
jne 0x148c3
pushq $-0x2
popq %rbp
jmp 0x148e4
xorl %edx, %edx
movq %r14, %rdi
xorl %ebp, %ebp
divl 0x4(%rbx)
movq 0x18(%rbx), %rax
imulq %rax, %rdx
addq 0x78(%rbx), %rdx
movq %rdx, %rsi
movq %rax, %rdx
callq 0x8630
movq %rbx, %rdi
callq 0x144be
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_queue.c
// Function: cf_queue_pop
int
cf_queue_pop(cf_queue *q, void *buf, int ms_wait)
{
	struct timespec tp;

	if (ms_wait > 0) {
		cf_set_wait_timespec(ms_wait, &tp);
	}

	cf_queue_lock(q);

	if (q->threadsafe) {

		// Note that we have to use a while() loop. The pthread_cond_signal()
		// documentation says that AT LEAST ONE waiting thread will be awakened.
		// If more than one are awakened, the first will get the popped element,
		// others will find the queue empty and go back to waiting.

		while (CF_Q_EMPTY(q)) {
			if (CF_QUEUE_FOREVER == ms_wait) {
				pthread_cond_wait(&q->CV, &q->LOCK);
			}
			else if (CF_QUEUE_NOWAIT == ms_wait) {
				pthread_mutex_unlock(&q->LOCK);
				return CF_QUEUE_EMPTY;
			}
			else {
				pthread_cond_timedwait(&q->CV, &q->LOCK, &tp);

				if (CF_Q_EMPTY(q)) {
					pthread_mutex_unlock(&q->LOCK);
					return CF_QUEUE_EMPTY;
				}
			}
		}
	}
	else if (CF_Q_EMPTY(q)) {
		return CF_QUEUE_EMPTY;
	}

	memcpy(buf, CF_Q_ELEM_PTR(q, q->read_offset), q->element_sz);
	q->read_offset++;
	q->n_eles--;

	// This probably keeps the cache fresher because the queue is fully empty.
	if (q->read_offset == q->write_offset) {
		q->read_offset = q->write_offset = 0;
	}

	cf_queue_unlock(q);
	return CF_QUEUE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
jle 0x14919
leaq 0x8(%rsp), %rsi
movl %ebp, %edi
callq 0x149cd
movq %rbx, %rdi
callq 0x143df
cmpb $0x1, (%rbx)
jne 0x14969
leaq 0x48(%rbx), %r12
leaq 0x20(%rbx), %r15
leaq 0x8(%rsp), %r13
movl 0x8(%rbx), %eax
cmpl %eax, 0xc(%rbx)
jne 0x14971
cmpl $-0x1, %ebp
je 0x1495c
testl %ebp, %ebp
je 0x149b1
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x8970
movl 0xc(%rbx), %eax
cmpl 0x8(%rbx), %eax
jne 0x14933
jmp 0x149b1
movq %r12, %rdi
movq %r15, %rsi
callq 0x8210
jmp 0x14933
movl 0x8(%rbx), %eax
cmpl %eax, 0xc(%rbx)
je 0x149b9
xorl %edx, %edx
movq %r14, %rdi
xorl %ebp, %ebp
divl 0x4(%rbx)
movq 0x18(%rbx), %rax
imulq %rax, %rdx
addq 0x78(%rbx), %rdx
movq %rdx, %rsi
movq %rax, %rdx
callq 0x8630
movl 0x8(%rbx), %eax
incl %eax
movl %eax, 0x8(%rbx)
decl 0x10(%rbx)
cmpl 0xc(%rbx), %eax
jne 0x149a7
andq $0x0, 0x8(%rbx)
movq %rbx, %rdi
callq 0x144be
jmp 0x149bc
movq %r15, %rdi
callq 0x86b0
pushq $-0x2
popq %rbp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/include/citrusleaf/cf_clock.h
// Function: cf_set_wait_timespec
static inline void
cf_set_wait_timespec(int ms_wait, struct timespec* out)
{
	clock_gettime(CLOCK_REALTIME, out);
	out->tv_sec += ms_wait / 1000;
	out->tv_nsec += (ms_wait % 1000) * 1000 * 1000;

	if (out->tv_nsec > (1000 * 1000 * 1000)) {
		out->tv_nsec -= 1000 * 1000 * 1000;
		out->tv_sec++;
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
xorl %edi, %edi
movq %rsi, %rbx
callq 0x81e0
movl $0x3e8, %ecx            # imm = 0x3E8
movl %ebp, %eax
xorl %edx, %edx
divl %ecx
addq (%rbx), %rax
imull $0xf4240, %edx, %ecx    # imm = 0xF4240
movq %rax, (%rbx)
addq 0x8(%rbx), %rcx
cmpq $0x3b9aca01, %rcx       # imm = 0x3B9ACA01
movq %rcx, 0x8(%rbx)
jl 0x14a15
addq $-0x3b9aca00, %rcx      # imm = 0xC4653600
incq %rax
movq %rcx, 0x8(%rbx)
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_queue.c
// Function: cf_queue_delete_offset
void
cf_queue_delete_offset(cf_queue *q, uint32_t index)
{
	q->n_eles--;

	index %= q->alloc_sz;

	uint32_t r_index = q->read_offset % q->alloc_sz;
	uint32_t w_index = q->write_offset % q->alloc_sz;

	// Assumes index is validated!

	// If we're deleting the one at the head, just increase the read offset.
	if (index == r_index) {
		q->read_offset++;
		return;
	}

	// If we're deleting the tail just decrease the write offset.
	if (w_index && (index == w_index - 1)) {
		q->write_offset--;
		return;
	}

	if (index > r_index) {
		// The memory copy is overlapping, so must use memmove().
		memmove(&q->elements[(r_index + 1) * q->element_sz],
				&q->elements[r_index * q->element_sz],
				(index - r_index) * q->element_sz);
		q->read_offset++;
		return;
	}

	if (index < w_index) {
		// The memory copy is overlapping, so must use memmove().
		memmove(&q->elements[index * q->element_sz],
				&q->elements[(index + 1) * q->element_sz],
				(w_index - index - 1) * q->element_sz);
		q->write_offset--;
	}
}

// Assembly:
pushq %rbx
decl 0x10(%rdi)
movq %rdi, %rbx
movl %esi, %eax
xorl %edx, %edx
movl 0x4(%rdi), %r9d
movl 0x8(%rdi), %edi
divl %r9d
movl %edi, %eax
movl %edx, %ecx
xorl %edx, %edx
divl %r9d
movl 0xc(%rbx), %r8d
movl %edx, %esi
xorl %edx, %edx
movl %r8d, %eax
divl %r9d
cmpl %esi, %ecx
jne 0x14a53
incl %edi
movl %edi, 0x8(%rbx)
jmp 0x14ad0
movl %edx, %eax
addl $-0x1, %eax
setae %dil
cmpl %eax, %ecx
setne %al
orb %dil, %al
jne 0x14a6f
decl %r8d
movl %r8d, 0xc(%rbx)
jmp 0x14ad0
movl %ecx, %eax
subl %esi, %eax
jbe 0x14aa1
movq 0x18(%rbx), %rcx
movq 0x78(%rbx), %rdx
leal 0x1(%rsi), %edi
movl %esi, %esi
imulq %rcx, %rdi
imulq %rcx, %rsi
imulq %rcx, %rax
addq %rdx, %rdi
addq %rdx, %rsi
movq %rax, %rdx
callq 0x88f0
incl 0x8(%rbx)
jmp 0x14ad0
cmpl %edx, %ecx
jae 0x14ad0
movq 0x18(%rbx), %rax
movq 0x78(%rbx), %r8
movl %ecx, %edi
leal 0x1(%rcx), %esi
notl %ecx
addl %ecx, %edx
imulq %rax, %rdi
imulq %rax, %rsi
imulq %rax, %rdx
addq %r8, %rdi
addq %r8, %rsi
callq 0x88f0
decl 0xc(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_queue.c
// Function: cf_queue_reduce
int
cf_queue_reduce(cf_queue *q, cf_queue_reduce_fn cb, void *udata)
{
	cf_queue_lock(q);

	if (CF_Q_SZ(q) != 0) {
		for (uint32_t i = q->read_offset; i < q->write_offset; i++) {
			int rv = cb(CF_Q_ELEM_PTR(q, i), udata);

			if (rv == 0) {
				continue;
			}

			if (rv == -1) {
				// Found what it was looking for, stop reducing.
				break;
			}

			if (rv == -2) {
				// Delete, and stop reducing.
				cf_queue_delete_offset(q, i);
				break;
			}
		}
	}

	cf_queue_unlock(q);
	return CF_QUEUE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x143df
movl 0x8(%rbx), %ebp
movl 0xc(%rbx), %eax
cmpl %ebp, %eax
je 0x14b28
cmpl %eax, %ebp
jae 0x14b28
movl %ebp, %eax
xorl %edx, %edx
movq %r14, %rsi
divl 0x4(%rbx)
movl %edx, %edi
imulq 0x18(%rbx), %rdi
addq 0x78(%rbx), %rdi
callq *%r15
cmpl $-0x1, %eax
je 0x14b28
cmpl $-0x2, %eax
je 0x14b1e
movl 0xc(%rbx), %eax
incl %ebp
jmp 0x14af1
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8330
movq %rbx, %rdi
callq 0x144be
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_queue.c
// Function: cf_queue_reduce_pop
int
cf_queue_reduce_pop(cf_queue *q, void *buf, int ms_wait, cf_queue_reduce_fn cb,
		void *udata)
{
	struct timespec tp;

	if (ms_wait > 0) {
		cf_set_wait_timespec(ms_wait, &tp);
	}

	cf_queue_lock(q);

	if (q->threadsafe) {

		// Note that we have to use a while() loop. The pthread_cond_signal()
		// documentation says that AT LEAST ONE waiting thread will be awakened.
		// If more than one are awakened, the first will get the popped element,
		// others will find the queue empty and go back to waiting.

		while (CF_Q_EMPTY(q)) {
			if (CF_QUEUE_FOREVER == ms_wait) {
				pthread_cond_wait(&q->CV, &q->LOCK);
			}
			else if (CF_QUEUE_NOWAIT == ms_wait) {
				pthread_mutex_unlock(&q->LOCK);
				return CF_QUEUE_EMPTY;
			}
			else {
				pthread_cond_timedwait(&q->CV, &q->LOCK, &tp);

				if (CF_Q_EMPTY(q)) {
					pthread_mutex_unlock(&q->LOCK);
					return CF_QUEUE_EMPTY;
				}
			}
		}
	}
	else if (CF_Q_EMPTY(q)) {
		return CF_QUEUE_EMPTY;
	}

	uint32_t best_index = q->read_offset;

	for (uint32_t i = q->read_offset; i < q->write_offset; i++) {
		int rv = cb(CF_Q_ELEM_PTR(q, i), udata);

		if (rv == 0) {
			continue;
		}

		if (rv == -1) {
			// Found what it was looking for, so break.
			best_index = i;
			break;
		}

		if (rv == -2) {
			// Found new candidate, but keep looking for a better one.
			best_index = i;
		}
	}

	memcpy(buf, CF_Q_ELEM_PTR(q, best_index), q->element_sz);
	cf_queue_delete_offset(q, best_index);

	cf_queue_unlock(q);

	return CF_QUEUE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r14
movq %rcx, %r12
movl %edx, %ebp
movq %rdi, %rbx
testl %edx, %edx
movq %rsi, 0x10(%rsp)
jle 0x14b6b
leaq 0x18(%rsp), %rsi
movl %ebp, %edi
callq 0x149cd
movq %rbx, %rdi
movq %r14, 0x8(%rsp)
callq 0x143df
cmpb $0x1, (%rbx)
jne 0x14bc8
leaq 0x48(%rbx), %r14
leaq 0x20(%rbx), %r13
movl 0x8(%rbx), %r15d
movl 0xc(%rbx), %eax
cmpl %r15d, %eax
jne 0x14bd4
cmpl $-0x1, %ebp
je 0x14bbb
testl %ebp, %ebp
je 0x14c4b
movq %r14, %rdi
movq %r13, %rsi
leaq 0x18(%rsp), %rdx
callq 0x8970
movl 0xc(%rbx), %eax
cmpl 0x8(%rbx), %eax
jne 0x14b85
jmp 0x14c4b
movq %r14, %rdi
movq %r13, %rsi
callq 0x8210
jmp 0x14b85
movl 0x8(%rbx), %r15d
movl 0xc(%rbx), %eax
cmpl %r15d, %eax
je 0x14c53
movq 0x8(%rsp), %r14
movl %r15d, %ebp
cmpl %eax, %ebp
jae 0x14c0e
movl %ebp, %eax
xorl %edx, %edx
movq %r14, %rsi
divl 0x4(%rbx)
movl %edx, %edi
imulq 0x18(%rbx), %rdi
addq 0x78(%rbx), %rdi
callq *%r12
cmpl $-0x2, %eax
je 0x14c04
cmpl $-0x1, %eax
jne 0x14c07
jmp 0x14c11
movl %ebp, %r15d
movl 0xc(%rbx), %eax
incl %ebp
jmp 0x14bdc
movl %r15d, %ebp
movl %ebp, %eax
xorl %edx, %edx
xorl %r15d, %r15d
divl 0x4(%rbx)
movq 0x18(%rbx), %rax
movq 0x10(%rsp), %rdi
imulq %rax, %rdx
addq 0x78(%rbx), %rdx
movq %rdx, %rsi
movq %rax, %rdx
callq 0x8630
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8330
movq %rbx, %rdi
callq 0x144be
jmp 0x14c57
movq %r13, %rdi
callq 0x86b0
pushq $-0x2
popq %r15
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_queue.c
// Function: cf_queue_reduce_reverse
int
cf_queue_reduce_reverse(cf_queue *q, cf_queue_reduce_fn cb, void *udata)
{
	cf_queue_lock(q);

	if (CF_Q_SZ(q) != 0) {
		for (int i = (int)q->write_offset - 1; i >= (int)q->read_offset; i--) {
			int rv = cb(CF_Q_ELEM_PTR(q, i), udata);

			if (rv == 0) {
				continue;
			}

			if (rv == -1) {
				// Found what it was looking for, stop reducing.
				break;
			}

			if (rv == -2) {
				// Delete, and stop reducing.
				cf_queue_delete_offset(q, i);
				break;
			}
		}
	}

	cf_queue_unlock(q);
	return CF_QUEUE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x143df
movl 0xc(%rbx), %ebp
cmpl 0x8(%rbx), %ebp
je 0x14cb9
cmpl 0x8(%rbx), %ebp
jle 0x14cb9
decl %ebp
xorl %edx, %edx
movq %r14, %rsi
movl %ebp, %eax
divl 0x4(%rbx)
movl %edx, %edi
imulq 0x18(%rbx), %rdi
addq 0x78(%rbx), %rdi
callq *%r15
cmpl $-0x1, %eax
je 0x14cb9
cmpl $-0x2, %eax
jne 0x14c86
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8330
movq %rbx, %rdi
callq 0x144be
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_queue.c
// Function: cf_queue_delete
int
cf_queue_delete(cf_queue *q, const void *ptr, bool only_one)
{
	cf_queue_lock(q);

	bool found = false;

	if (CF_Q_SZ(q) != 0) {
		for (uint32_t i = q->read_offset; i < q->write_offset; i++) {
			int rv = 0;

			// If buf is null, rv is always 0 and we delete all elements.
			if (ptr) {
				rv = memcmp(CF_Q_ELEM_PTR(q, i), ptr, q->element_sz);
			}

			if (rv == 0) {
				cf_queue_delete_offset(q, i);
				found = true;

				if (only_one) {
					break;
				}
			}
		}
	}

	cf_queue_unlock(q);
	return found ? CF_QUEUE_OK : CF_QUEUE_EMPTY;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
callq 0x143df
movl 0x8(%rbx), %r12d
movl 0xc(%rbx), %r13d
pushq $-0x2
popq %rax
cmpl %r12d, %r13d
movl %eax, 0x4(%rsp)
je 0x14d53
xorl %ebp, %ebp
cmpl %r13d, %r12d
jae 0x14d45
testq %r15, %r15
je 0x14d29
movl %r12d, %eax
xorl %edx, %edx
movq %r15, %rsi
divl 0x4(%rbx)
movl %edx, %edi
movq 0x18(%rbx), %rdx
imulq %rdx, %rdi
addq 0x78(%rbx), %rdi
callq 0x8800
testl %eax, %eax
jne 0x14d40
movq %rbx, %rdi
movl %r12d, %esi
callq 0x8330
testb %r14b, %r14b
jne 0x14d4b
movl 0xc(%rbx), %r13d
movb $0x1, %bpl
incl %r12d
jmp 0x14cfd
testb $0x1, %bpl
je 0x14d53
movl $0x0, 0x4(%rsp)
movq %rbx, %rdi
callq 0x144be
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_random.c
// Function: cf_get_rand_buf
int
cf_get_rand_buf(uint8_t *buf, int len)
{
	if ((uint32_t)len >= sizeof(rand_buf))  return(-1);

	pthread_mutex_lock(&rand_buf_lock);

	if (rand_buf_off < (uint32_t)len ) {
		if (-1 == cf_rand_reload()) {
			pthread_mutex_unlock(&rand_buf_lock);
			return(-1);
		}
	}

	rand_buf_off -= len;
	memcpy(buf, &rand_buf[rand_buf_off] ,len);

	pthread_mutex_unlock(&rand_buf_lock);

	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
cmpl $0x1fff, %esi           # imm = 0x1FFF
jbe 0x14d88
pushq $-0x1
popq %rbx
jmp 0x14ddd
movq %rdi, %rbx
leaq 0x98de(%rip), %rdi      # 0x1e670
movl %esi, %ebp
callq 0x8ba0
movl 0x98f9(%rip), %eax      # 0x1e698
cmpl %ebp, %eax
jae 0x14db3
callq 0x14deb
cmpl $-0x1, %eax
je 0x14de6
movl 0x98e5(%rip), %eax      # 0x1e698
subl %ebp, %eax
leaq 0x98e4(%rip), %rsi      # 0x1e6a0
movl %ebp, %edx
movq %rbx, %rdi
addq %rax, %rsi
movl %eax, 0x98ce(%rip)      # 0x1e698
callq 0x8630
xorl %ebx, %ebx
leaq 0x9898(%rip), %rdi      # 0x1e670
callq 0x86b0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
pushq $-0x1
popq %rbx
jmp 0x14dd1
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_random.c
// Function: cf_rand_reload
static int
cf_rand_reload(void)
{
	if (seeded == 0) {
		int rfd = open("/dev/urandom", O_RDONLY);

		if (rfd < 0) {
#if ! defined ENHANCED_ALLOC
			as_log_error("Failed to open '/dev/urandom'");
#endif

			return -1;
		}

		int rsz = (int)read(rfd, rand_buf, SEED_SZ);

		if (rsz < SEED_SZ) {
#if ! defined ENHANCED_ALLOC
			as_log_error("Failed to seed random number generator");
#endif
			close(rfd);

			return -1;
		}

		close(rfd);
		RAND_seed(rand_buf, rsz);
		seeded = 1;
	}

	if (RAND_bytes(rand_buf, sizeof(rand_buf)) != 1) {
#if ! defined ENHANCED_ALLOC
		as_log_error("Failed to reload random buffer");
#endif
		return -1;
	}

	rand_buf_off = sizeof(rand_buf);

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, 0xb8aa(%rip)      # 0x206a0
jne 0x14eb7
leaq 0x1b01(%rip), %rdi      # 0x16904
xorl %esi, %esi
xorl %eax, %eax
callq 0x88e0
testl %eax, %eax
js 0x14e6a
movl %eax, %ebx
leaq 0x9887(%rip), %rsi      # 0x1e6a0
pushq $0x40
popq %rdx
movl %eax, %edi
callq 0x8490
movq %rax, %r14
cmpl $0x3f, %r14d
jg 0x14e9a
movq 0x918d(%rip), %rax      # 0x1dfc0
movq 0x8(%rax), %r9
testq %r9, %r9
je 0x14e5b
leaq 0x1ace(%rip), %rsi      # 0x16911
leaq 0x1ad6(%rip), %rdx      # 0x16920
leaq 0x1b0d(%rip), %r8       # 0x1695e
pushq $0x37
popq %rcx
xorl %edi, %edi
xorl %eax, %eax
callq *%r9
movl %ebx, %edi
callq 0x8460
pushq $-0x1
popq %rbx
jmp 0x14f0d
movq 0x914f(%rip), %rax      # 0x1dfc0
movq 0x8(%rax), %r9
pushq $-0x1
popq %rbx
testq %r9, %r9
je 0x14f0d
leaq 0x1a89(%rip), %rsi      # 0x16911
leaq 0x1a91(%rip), %rdx      # 0x16920
leaq 0x1aaa(%rip), %r8       # 0x16940
pushq $0x2d
jmp 0x14f05
movl %ebx, %edi
callq 0x8460
leaq 0x97f8(%rip), %rdi      # 0x1e6a0
movl %r14d, %esi
callq 0x8150
movb $0x1, 0xb7e9(%rip)      # 0x206a0
leaq 0x97e2(%rip), %rdi      # 0x1e6a0
movl $0x2000, %esi           # imm = 0x2000
callq 0x8290
cmpl $0x1, %eax
jne 0x14edb
xorl %ebx, %ebx
movl $0x2000, 0x97bf(%rip)   # imm = 0x2000
jmp 0x14f0d
movq 0x90de(%rip), %rax      # 0x1dfc0
movq 0x8(%rax), %r9
pushq $-0x1
popq %rbx
testq %r9, %r9
je 0x14f0d
leaq 0x1a1c(%rip), %rsi      # 0x16911
leaq 0x1a24(%rip), %rdx      # 0x16920
leaq 0x1a82(%rip), %r8       # 0x16985
pushq $0x45
popq %rcx
xorl %edi, %edi
xorl %eax, %eax
callq *%r9
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_random.c
// Function: cf_get_rand64
uint64_t
cf_get_rand64(void)
{
	pthread_mutex_lock(&rand_buf_lock);

	if (rand_buf_off < sizeof(uint64_t) ) {
		if (cf_rand_reload() == -1) {
			pthread_mutex_unlock(&rand_buf_lock);
			return 0;
		}
	}

	rand_buf_off -= sizeof(uint64_t);

	uint64_t r = *(uint64_t *) (&rand_buf[rand_buf_off]);

	pthread_mutex_unlock(&rand_buf_lock);

	return r;
}

// Assembly:
pushq %rbx
leaq 0x9751(%rip), %rdi      # 0x1e670
callq 0x8ba0
movl 0x976e(%rip), %eax      # 0x1e698
cmpl $0x7, %eax
ja 0x14f3f
callq 0x14deb
cmpl $-0x1, %eax
je 0x14f64
movl 0x9759(%rip), %eax      # 0x1e698
addl $-0x8, %eax
leaq 0x9757(%rip), %rcx      # 0x1e6a0
movq (%rax,%rcx), %rbx
movl %eax, 0x9745(%rip)      # 0x1e698
leaq 0x9716(%rip), %rdi      # 0x1e670
callq 0x86b0
movq %rbx, %rax
popq %rbx
retq
xorl %ebx, %ebx
jmp 0x14f53
// File: /workspace/github_c_makefile_star2_O2/aerospike[P]aerospike-common/src/main/citrusleaf/cf_random.c
// Function: cf_get_rand32
uint32_t
cf_get_rand32(void)
{
	pthread_mutex_lock(&rand_buf_lock);

	if (rand_buf_off < sizeof(uint64_t) ) {
		if (cf_rand_reload() == -1) {
			pthread_mutex_unlock(&rand_buf_lock);
			return 0;
		}
	}

	rand_buf_off -= sizeof(uint64_t);

	uint64_t r = *(uint64_t *) (&rand_buf[rand_buf_off]);

	pthread_mutex_unlock(&rand_buf_lock);

	return (uint32_t)r;
}

// Assembly:
pushq %rbx
leaq 0x9700(%rip), %rdi      # 0x1e670
callq 0x8ba0
movl 0x971d(%rip), %eax      # 0x1e698
cmpl $0x7, %eax
ja 0x14f90
callq 0x14deb
cmpl $-0x1, %eax
je 0x14fb3
movl 0x9708(%rip), %eax      # 0x1e698
addl $-0x8, %eax
leaq 0x9706(%rip), %rcx      # 0x1e6a0
leaq 0x96cf(%rip), %rdi      # 0x1e670
movl (%rax,%rcx), %ebx
movl %eax, 0x96ee(%rip)      # 0x1e698
callq 0x86b0
movl %ebx, %eax
popq %rbx
retq
leaq 0x96b6(%rip), %rdi      # 0x1e670
callq 0x86b0
xorl %ebx, %ebx
jmp 0x14faf
// File: /workspace/github_c_makefile_star2_O2/jiqingxiaoxi[P]RPA/single.c
// Function: str2int
char str2int(char c)
{
        switch (c)
        {
                case 'A':
                        return 0;
                case 'C':
                        return 1;
                case 'G':
                        return 2;
                case 'T':
                        return 3;
        }
        return 4;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x41, %edi
je 0x1300
cmpl $0x54, %edi
je 0x12f8
cmpl $0x47, %edi
je 0x12fc
cmpl $0x43, %edi
jne 0x1304
movb $0x1, %al
jmp 0x1306
movb $0x3, %al
jmp 0x1306
movb $0x2, %al
jmp 0x1306
xorl %eax, %eax
jmp 0x1306
movb $0x4, %al
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jiqingxiaoxi[P]RPA/single.c
// Function: generate
void generate(char *seq,char out[],int pos,int length)
{
	int i;
	for(i=0;i<length;i++)
	{
		out[i]=seq[pos+i];
	}
	out[i]='\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq %edx, %rax
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
addq %rdi, %rax
cmpq %rdx, %rcx
je 0x898f
movb (%rax,%rdx), %dil
movb %dil, (%rsi,%rdx)
incq %rdx
jmp 0x897d
movb $0x0, (%rsi,%rcx)
popq %rbp
retq