LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cl_request.c
// Function: get_name_value
static char*
get_name_value(char* p, char** name, char** value)
{
	if (*p == 0) {
		return 0;
	}

	*name = p;
	*value = 0;

	while ((*p) && (*p != '\n')) {
		if (*p == '\t') {
			*p = 0;
			*value = p + 1;
		}
		p++;
	}

	if (*value == 0) {
		*value = p;
	}

	if (*p == '\n') {
		*p = 0;
		p++;
	}
	return p;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq %rdx, -0x20(%rsp)
movq -0x10(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x1269a
movq $0x0, -0x8(%rsp)
jmp 0x1275d
movq -0x10(%rsp), %rcx
movq -0x18(%rsp), %rax
movq %rcx, (%rax)
movq -0x20(%rsp), %rax
movq $0x0, (%rax)
movq -0x10(%rsp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x21(%rsp)
je 0x126d8
movq -0x10(%rsp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
setne %al
movb %al, -0x21(%rsp)
movb -0x21(%rsp), %al
testb $0x1, %al
jne 0x126e2
jmp 0x12718
movq -0x10(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
jne 0x12708
movq -0x10(%rsp), %rax
movb $0x0, (%rax)
movq -0x10(%rsp), %rcx
addq $0x1, %rcx
movq -0x20(%rsp), %rax
movq %rcx, (%rax)
movq -0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rsp)
jmp 0x126b3
movq -0x20(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x12730
movq -0x10(%rsp), %rcx
movq -0x20(%rsp), %rax
movq %rcx, (%rax)
movq -0x10(%rsp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x12753
movq -0x10(%rsp), %rax
movb $0x0, (%rax)
movq -0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cl_request.c
// Function: cl_get_replicas
int
cl_get_replicas(const char* node_name, struct sockaddr_in* sa_in, cl_replicas* replicas)
{
	if (g_shared_memory) {
		shm_ninfo* shared = cl_shm_find_node_from_name(node_name);

		if (shared) {
			// cf_debug("Use shared memory for replicas.");
			cl_shm_node_lock(shared);

			int wr_len = strlen(shared->write_replicas);
			int rr_len = strlen(shared->read_replicas);
			replicas->values = (char*)malloc(wr_len + rr_len + 2);

			replicas->write_replicas = replicas->values;
			memcpy(replicas->write_replicas, shared->write_replicas, wr_len);
			replicas->write_replicas[wr_len] = 0;

			replicas->read_replicas = replicas->values + wr_len + 1;
			memcpy(replicas->read_replicas, shared->read_replicas, rr_len);
			replicas->read_replicas[rr_len] = 0;

			cl_shm_node_unlock(shared);
			return 0;
		}
	}
	// cf_debug("Request replicas from server.");
	return cl_request_replicas(sa_in, replicas);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
leaq 0xde3e(%rip), %rax      # 0x205e8
testb $0x1, (%rax)
je 0x128c6
movq 0x28(%rsp), %rdi
callq 0x118e0
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x128c4
movq 0x10(%rsp), %rdi
callq 0x11820
movq 0x10(%rsp), %rdi
addq $0x1065, %rdi           # imm = 0x1065
callq 0x2100
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rdi
addq $0x17d066, %rdi         # imm = 0x17D066
callq 0x2100
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %eax
addl 0x8(%rsp), %eax
addl $0x2, %eax
movslq %eax, %rdi
callq 0x2310
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rsp), %rsi
addq $0x1065, %rsi           # imm = 0x1065
movslq 0xc(%rsp), %rdx
callq 0x21e0
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0xc(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movslq 0xc(%rsp), %rax
addq %rax, %rcx
addq $0x1, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x10(%rsp), %rsi
addq $0x17d066, %rsi         # imm = 0x17D066
movslq 0x8(%rsp), %rdx
callq 0x21e0
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x8(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x10(%rsp), %rdi
callq 0x118b0
movl $0x0, 0x34(%rsp)
jmp 0x128d9
jmp 0x128c6
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x128f0
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cl_request.c
// Function: cl_request_replicas
int
cl_request_replicas(struct sockaddr_in* sa_in, cl_replicas* replicas)
{
	replicas->write_replicas = 0;
	replicas->read_replicas = 0;

	if (citrusleaf_info_host_limit(sa_in, "replicas-read\nreplicas-write", &replicas->values, INFO_TIMEOUT_MS, false, 2000000) != 0) {
		return -1;
	}

	char* p = replicas->values;
	char* name;
	char* value;

	while ((p = get_name_value(p, &name, &value)) != 0) {
		if (strcmp(name, "replicas-write") == 0) {
			replicas->write_replicas = value;
		}
		else if (strcmp(name, "replicas-read") == 0) {
			replicas->read_replicas = value;
		}
		else {
			cf_warn("Invalid replicas name %s", name);
		}
	}
	return 0;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x20(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0x6e48(%rip), %rsi      # 0x19771
movl $0x12c, %ecx            # imm = 0x12C
xorl %r8d, %r8d
movl $0x1e8480, %r9d         # imm = 0x1E8480
callq 0x17880
cmpl $0x0, %eax
je 0x1294e
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x12a0c
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x12670
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x12a04
movq 0x10(%rsp), %rdi
leaq 0x6df5(%rip), %rsi      # 0x1977f
callq 0x2380
cmpl $0x0, %eax
jne 0x129a4
movq 0x8(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x129ff
movq 0x10(%rsp), %rdi
leaq 0x6dde(%rip), %rsi      # 0x1978e
callq 0x2380
cmpl $0x0, %eax
jne 0x129ca
movq 0x8(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x129fd
leaq 0xb907(%rip), %rax      # 0x1e2d8
movl (%rax), %ecx
movl $0x1, %eax
cmpl %ecx, %eax
jg 0x129fb
leaq 0xb8fd(%rip), %rax      # 0x1e2e0
movq (%rax), %rcx
movq 0x10(%rsp), %rdx
movl $0x1, %edi
leaq 0x6da5(%rip), %rsi      # 0x1979c
movb $0x0, %al
callq *%rcx
jmp 0x129fd
jmp 0x129ff
jmp 0x1295b
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cl_request.c
// Function: cl_get_node_name
int
cl_get_node_name(struct sockaddr_in* sa_in, char* node_name)
{
	if (g_shared_memory) {
		shm_ninfo* shared = cl_shm_find_node_from_address(sa_in);

		if (shared) {
			// cf_debug("Use shared memory for node name.");
			cl_shm_node_lock(shared);
			cl_strncpy(node_name, shared->node_name, NODE_NAME_SIZE);
			cl_shm_node_unlock(shared);
			return 0;
		}
	}
	return cl_request_node_name(sa_in, node_name);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
leaq 0xdb93(%rip), %rax      # 0x205e8
testb $0x1, (%rax)
je 0x12aa9
movq 0x18(%rsp), %rdi
callq 0x11970
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x12aa7
movq 0x8(%rsp), %rdi
callq 0x11820
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
addq $0x70, %rsi
movl $0x14, %edx
callq 0x12370
movq 0x8(%rsp), %rdi
callq 0x118b0
movl $0x0, 0x24(%rsp)
jmp 0x12abc
jmp 0x12aa9
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x12ad0
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cl_request.c
// Function: cl_request_node_name
int
cl_request_node_name(struct sockaddr_in* sa_in, char* node_name)
{
	*node_name = 0;
	char* values;

	if (citrusleaf_info_host(sa_in, "node", &values, INFO_TIMEOUT_MS, false) != 0){
		return -1;
	}

	char* p = values;
	char* name;
	char* value;

	while ((p = get_name_value(p, &name, &value)) != 0) {
		if (strcmp(name, "node") == 0) {
			cl_strncpy(node_name, value, NODE_NAME_SIZE);
		}
		else {
			cf_warn("Invalid node name %s", name);
		}
	}
	free(values);
	return 0;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movb $0x0, (%rax)
movq 0x28(%rsp), %rdi
leaq 0x640e(%rip), %rsi      # 0x18f00
leaq 0x18(%rsp), %rdx
movl $0x12c, %ecx            # imm = 0x12C
xorl %r8d, %r8d
callq 0x17830
cmpl $0x0, %eax
je 0x12b16
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x12baf
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %rsp, %rdx
callq 0x12670
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x12b9d
movq 0x8(%rsp), %rdi
leaq 0x63b7(%rip), %rsi      # 0x18f00
callq 0x2380
cmpl $0x0, %eax
jne 0x12b68
movq 0x20(%rsp), %rdi
movq (%rsp), %rsi
movl $0x14, %edx
callq 0x12370
jmp 0x12b9b
leaq 0xb769(%rip), %rax      # 0x1e2d8
movl (%rax), %ecx
movl $0x1, %eax
cmpl %ecx, %eax
jg 0x12b99
leaq 0xb75f(%rip), %rax      # 0x1e2e0
movq (%rax), %rcx
movq 0x8(%rsp), %rdx
movl $0x1, %edi
leaq 0x6c20(%rip), %rsi      # 0x197b5
movb $0x0, %al
callq *%rcx
jmp 0x12b9b
jmp 0x12b20
movq 0x18(%rsp), %rdi
callq 0x22e0
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cl_request.c
// Function: cl_get_n_partitions
int
cl_get_n_partitions(struct sockaddr_in* sa_in, int* n_partitions)
{
	if (g_shared_memory) {
		int count = cl_shm_get_partition_count();

		if (count > 0) {
			*n_partitions = count;
			return 0;
		}
	}
	return cl_request_n_partitions(sa_in, n_partitions);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
leaq 0xda13(%rip), %rax      # 0x205e8
testb $0x1, (%rax)
je 0x12c03
movb $0x0, %al
callq 0x118d0
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jle 0x12c01
movl 0xc(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, (%rax)
movl $0x0, 0x24(%rsp)
jmp 0x12c16
jmp 0x12c03
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x12c20
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cl_request.c
// Function: cl_request_n_partitions
int
cl_request_n_partitions(struct sockaddr_in* sa_in, int* n_partitions)
{
	*n_partitions = 0;
	char* values;

	if (citrusleaf_info_host(sa_in, "partitions", &values, INFO_TIMEOUT_MS, false) != 0) {
		return -1;
	}

	char* p = values;
	char* name;
	char* value;

	while ((p = get_name_value(p, &name, &value)) != 0) {
		if (strcmp(name, "partitions") == 0) {
			*n_partitions = atoi(value);
		}
		else {
			cf_warn("Invalid partitions %s", name);
		}
	}
	free(values);
	return 0;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movl $0x0, (%rax)
movq 0x28(%rsp), %rdi
leaq 0x6b85(%rip), %rsi      # 0x197ca
leaq 0x18(%rsp), %rdx
movl $0x12c, %ecx            # imm = 0x12C
xorl %r8d, %r8d
callq 0x17830
cmpl $0x0, %eax
je 0x12c69
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x12d01
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %rsp, %rdx
callq 0x12670
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x12cef
movq 0x8(%rsp), %rdi
leaq 0x6b2e(%rip), %rsi      # 0x197ca
callq 0x2380
cmpl $0x0, %eax
jne 0x12cba
movq (%rsp), %rdi
callq 0x2460
movl %eax, %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
jmp 0x12ced
leaq 0xb617(%rip), %rax      # 0x1e2d8
movl (%rax), %ecx
movl $0x1, %eax
cmpl %ecx, %eax
jg 0x12ceb
leaq 0xb60d(%rip), %rax      # 0x1e2e0
movq (%rax), %rcx
movq 0x8(%rsp), %rdx
movl $0x1, %edi
leaq 0x6aee(%rip), %rsi      # 0x197d5
movb $0x0, %al
callq *%rcx
jmp 0x12ced
jmp 0x12c73
movq 0x18(%rsp), %rdi
callq 0x22e0
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_alloc.c
// Function: cf_client_rc_reserve
int
cf_client_rc_reserve(void *addr)
{
	cf_client_rc_counter *rc;

	/* Extract the address of the reference counter, then increment it */
	rc = (cf_client_rc_counter *) (((uint8_t *)addr) - sizeof(cf_client_rc_counter));

	int i = (int) cf_atomic32_add(rc, 1);
	smb_mb();
	return(i);

}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $-0x4, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x12d70
movl %eax, 0x4(%rsp)
mfence
movl 0x4(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_alloc.c
// Function: cf_client_rc_release_x
cf_atomic_int_t
cf_client_rc_release_x(void *addr, bool autofree)
{
	cf_client_rc_counter *rc;
	uint64_t c;
	
	/* Release the reservation; if this reduced the reference count to zero,
	 * then free the block if autofree is set, and return 1.  Otherwise,
	 * return 0 */
	rc = (cf_client_rc_counter *) (((uint8_t *)addr) - sizeof(cf_client_rc_counter));
	smb_mb();
	if (0 == (c = cf_atomic32_decr(rc)))
		if (autofree)
			free((void *)rc);

	return (cf_atomic_int_t)c;
}

// Assembly:
subq $0x28, %rsp
movb %sil, %al
movq %rdi, 0x20(%rsp)
andb $0x1, %al
movb %al, 0x1f(%rsp)
movq 0x20(%rsp), %rax
addq $-0x4, %rax
movq %rax, 0x10(%rsp)
mfence
movq 0x10(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x12d70
movq %rax, %rcx
movq %rcx, 0x8(%rsp)
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x12df4
testb $0x1, 0x1f(%rsp)
je 0x12df2
movq 0x10(%rsp), %rdi
callq 0x22e0
jmp 0x12df4
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_alloc.c
// Function: cf_client_rc_alloc
void *
cf_client_rc_alloc(size_t sz)
{
	uint8_t *addr;
	size_t asz = sizeof(cf_client_rc_counter) + sz;

	addr = (uint8_t*)malloc(asz);
	if (NULL == addr)
		return(NULL);

	cf_atomic_int_set((cf_client_rc_counter *)addr, 1);
	uint8_t *base = addr + sizeof(cf_client_rc_counter);

	return(base);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x2310
movq %rax, 0x10(%rsp)
xorl %eax, %eax
cmpq 0x10(%rsp), %rax
jne 0x12e3a
movq $0x0, 0x20(%rsp)
jmp 0x12e5b
movq 0x10(%rsp), %rax
movl $0x1, (%rax)
movq 0x10(%rsp), %rax
addq $0x4, %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_digest.c
// Function: cf_digest_string
void
cf_digest_string(cf_digest *digest, char* output)
{
	uint8_t *d = (uint8_t *) digest;
	char* p = output;

	*p++ = '0';
	*p++ = 'x';

	for (int i = 0; i < CF_DIGEST_KEY_SZ; i++) {
		sprintf(p, "%02x", d[i]);
		p += 2;
	}
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rsp)
movb $0x30, (%rax)
movq 0x8(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rsp)
movb $0x78, (%rax)
movl $0x0, 0x4(%rsp)
cmpl $0x14, 0x4(%rsp)
jge 0x12f35
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
movslq 0x4(%rsp), %rcx
movzbl (%rax,%rcx), %edx
leaq 0x6909(%rip), %rsi      # 0x1981c
movb $0x0, %al
callq 0x2090
movq 0x8(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x8(%rsp)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x12ef2
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_ll.c
// Function: cf_ll_prepend_lockfree
void
cf_ll_prepend_lockfree(cf_ll *ll, cf_ll_element *e  )
{
	// empty list
	if (ll->head == 0) { 
		ll->head = e;
		ll->tail = e;
		e->next = 0;
		e->prev = 0;
	}

	// at least one element - add to head
	else {
		e->next = ll->head;
		e->prev = 0;
		
		ll->head->prev = e;
		ll->head = e;
	}
	
	ll->sz++;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x1310b
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rax
movq %rcx, (%rax)
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rsp), %rax
movq $0x0, (%rax)
movq -0x10(%rsp), %rax
movq $0x0, 0x8(%rax)
jmp 0x13146
movq -0x8(%rsp), %rax
movq (%rax), %rcx
movq -0x10(%rsp), %rax
movq %rcx, (%rax)
movq -0x10(%rsp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rax
movq %rcx, (%rax)
movq -0x8(%rsp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_ll.c
// Function: cf_ll_append_lockfree
void
cf_ll_append_lockfree(cf_ll *ll, cf_ll_element *e  )
{
	if (ll->head == 0) { 
		ll->head = e;
		ll->tail = e;
		e->next = 0;
		e->prev = 0;
	}
	// at least one element - add to tail
	else {
		e->next = 0;
		e->prev = ll->tail;
		
		ll->tail->next = e;
		ll->tail = e;
	}
	
	ll->sz++;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x1320b
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rax
movq %rcx, (%rax)
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rsp), %rax
movq $0x0, (%rax)
movq -0x10(%rsp), %rax
movq $0x0, 0x8(%rax)
jmp 0x13248
movq -0x10(%rsp), %rax
movq $0x0, (%rax)
movq -0x8(%rsp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rsp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_ll.c
// Function: cf_ll_insert_after_lockfree
void
cf_ll_insert_after_lockfree(cf_ll *ll, cf_ll_element *cur, cf_ll_element *ins)
{
	ins->next = cur->next;
	ins->prev = cur;
	
	if (cur->next == 0)
		ll->tail = ins;
	else
		cur->next->prev = ins;

	cur->next = ins;
	
	ll->sz++;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq -0x10(%rsp), %rax
movq (%rax), %rcx
movq -0x18(%rsp), %rax
movq %rcx, (%rax)
movq -0x10(%rsp), %rcx
movq -0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x13308
movq -0x18(%rsp), %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x13319
movq -0x18(%rsp), %rcx
movq -0x10(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rsp), %rcx
movq -0x10(%rsp), %rax
movq %rcx, (%rax)
movq -0x8(%rsp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_ll.c
// Function: cf_ll_insert_before_lockfree
void
cf_ll_insert_before_lockfree(cf_ll *ll, cf_ll_element *cur, cf_ll_element *ins)
{

	ins->next = cur;
	ins->prev = cur->prev;

	if (cur->prev == 0)
		ll->head = ins;
	else
		cur->prev->next = ins;
	cur->prev = ins;
	
	ll->sz++;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq -0x10(%rsp), %rcx
movq -0x18(%rsp), %rax
movq %rcx, (%rax)
movq -0x10(%rsp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x133e9
movq -0x18(%rsp), %rcx
movq -0x8(%rsp), %rax
movq %rcx, (%rax)
jmp 0x133fa
movq -0x18(%rsp), %rcx
movq -0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x18(%rsp), %rcx
movq -0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rsp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_ll.c
// Function: cf_ll_delete_lockfree
void
cf_ll_delete_lockfree(cf_ll *ll, cf_ll_element *e )
{
	// make empty
	if (ll->sz == 1) {
		ll->head = 0;
		ll->tail = 0;
	}
	
	// head delete
	else if (e == ll->head) {
		ll->head = e->next;
		e->next->prev = 0;
	}
	// tail delete
	else if (e == ll->tail) {
		ll->tail = e->prev;
		e->prev->next = 0;
	}
	// we're in the middle somewhere
	else {
		e->prev->next = e->next;
		e->next->prev = e->prev;
	}
	
	ll->sz --;
	
	if (ll->destroy_fn)
		(ll->destroy_fn) (e);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x1, 0x18(%rax)
jne 0x134b7
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x8(%rax)
jmp 0x13549
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
cmpq (%rcx), %rax
jne 0x134e8
movq 0x8(%rsp), %rax
movq (%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq $0x0, 0x8(%rax)
jmp 0x13547
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1351c
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq $0x0, (%rax)
jmp 0x13545
movq 0x8(%rsp), %rax
movq (%rax), %rcx
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0x13547
jmp 0x13549
movq 0x10(%rsp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
movq 0x10(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x13573
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rsp), %rdi
callq *%rax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_ll.c
// Function: cf_ll_delete
void
cf_ll_delete(cf_ll *ll, cf_ll_element *e )
{
	// extra check for fun
	if (ll->sz == 0)	return;

	LL_LOCK(ll);

	cf_ll_delete_lockfree(ll, e);
	
	LL_UNLOCK(ll);
	
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x1359b
jmp 0x135dc
movq 0x10(%rsp), %rax
testb $0x1, 0x1c(%rax)
je 0x135b4
movq 0x10(%rsp), %rdi
addq $0x20, %rdi
callq 0x23e0
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x13480
movq 0x10(%rsp), %rax
testb $0x1, 0x1c(%rax)
je 0x135dc
movq 0x10(%rsp), %rdi
addq $0x20, %rdi
callq 0x21c0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_ll.c
// Function: cf_ll_reduce
int
cf_ll_reduce( cf_ll *ll, bool forward, cf_ll_reduce_fn fn, void *udata)
{
	int rv = 0;
	
	LL_LOCK(ll);
	
	cf_ll_element *cur = forward ? ll->head : ll->tail;
	
	while (cur) {
		
		if ( (rv = (*fn) (cur, udata) ) ) {
			
			if (rv == CF_LL_REDUCE_DELETE) {

				cf_ll_element *next = forward ? cur->next : cur->prev;
				// Calls the destructor on cur, can't touch it after that
				cf_ll_delete_lockfree(ll, cur);
				cur = next;
				
			}
			else
				goto Exit;
		}
		else {
			cur = forward ? cur->next : cur->prev;
		}
	}

Exit:		
	LL_UNLOCK(ll);
	return(rv);
}

// Assembly:
subq $0x58, %rsp
movb %sil, %al
movq %rdi, 0x50(%rsp)
andb $0x1, %al
movb %al, 0x4f(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
movq 0x50(%rsp), %rax
testb $0x1, 0x1c(%rax)
je 0x1362d
movq 0x50(%rsp), %rdi
addq $0x20, %rdi
callq 0x23e0
testb $0x1, 0x4f(%rsp)
je 0x13643
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
jmp 0x13651
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0x13708
movq 0x40(%rsp), %rax
movq 0x28(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq *%rax
movl %eax, 0x34(%rsp)
cmpl $0x0, %eax
je 0x136d5
cmpl $0x1, 0x34(%rsp)
jne 0x136d1
testb $0x1, 0x4f(%rsp)
je 0x1369e
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x136ac
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x13480
movq 0x20(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0x136d3
jmp 0x1370a
jmp 0x13703
testb $0x1, 0x4f(%rsp)
je 0x136eb
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x136f9
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0x1365b
jmp 0x1370a
movq 0x50(%rsp), %rax
testb $0x1, 0x1c(%rax)
je 0x13723
movq 0x50(%rsp), %rdi
addq $0x20, %rdi
callq 0x21c0
movl 0x34(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_ll.c
// Function: cf_ll_insert_reduce
int
cf_ll_insert_reduce(cf_ll *ll, cf_ll_element *e, bool forward, cf_ll_reduce_fn fn, void *udata)
{
	int rv = 0;
	LL_LOCK(ll);

	cf_ll_element *cur = forward ? ll->head : ll->tail;
	
	while (cur) {
		
		if ( (rv = (*fn) (cur, udata) ) ) {
			
			if (rv == CF_LL_REDUCE_INSERT) {

				if (forward)
					cf_ll_insert_before_lockfree(ll, cur, e);
				else
					cf_ll_insert_after_lockfree(ll, cur, e);
				rv = 0;
				
			}
			
			goto Exit;
			
		}
		else {
			cur = forward ? cur->next : cur->prev;
		}
	}
	
	// give chance to insert at "end"
	if ( (rv = (*fn) (cur, udata) ) ) {
		if (rv == CF_LL_REDUCE_INSERT) {
			if (forward)
				cf_ll_append_lockfree(ll, e);
			else
				cf_ll_prepend_lockfree(ll, e);
			rv = 0;
		}
	}

Exit:
	LL_UNLOCK(ll);
	return(rv);
}

// Assembly:
subq $0x48, %rsp
movb %dl, %al
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
andb $0x1, %al
movb %al, 0x37(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x40(%rsp), %rax
testb $0x1, 0x1c(%rax)
je 0x13771
movq 0x40(%rsp), %rdi
addq $0x20, %rdi
callq 0x23e0
testb $0x1, 0x37(%rsp)
je 0x13787
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x13795
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x1383a
movq 0x28(%rsp), %rax
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq *%rax
movl %eax, 0x1c(%rsp)
cmpl $0x0, %eax
je 0x1380a
cmpl $0x2, 0x1c(%rsp)
jne 0x13805
testb $0x1, 0x37(%rsp)
je 0x137e9
movq 0x40(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x133a0
jmp 0x137fd
movq 0x40(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x132c0
movl $0x0, 0x1c(%rsp)
jmp 0x1388e
testb $0x1, 0x37(%rsp)
je 0x1381f
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
jmp 0x1382c
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x1379f
movq 0x28(%rsp), %rax
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq *%rax
movl %eax, 0x1c(%rsp)
cmpl $0x0, %eax
je 0x1388c
cmpl $0x2, 0x1c(%rsp)
jne 0x1388a
testb $0x1, 0x37(%rsp)
je 0x13873
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x131c0
jmp 0x13882
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x130c0
movl $0x0, 0x1c(%rsp)
jmp 0x1388c
jmp 0x1388e
movq 0x40(%rsp), %rax
testb $0x1, 0x1c(%rax)
je 0x138a7
movq 0x40(%rsp), %rdi
addq $0x20, %rdi
callq 0x21c0
movl 0x1c(%rsp), %eax
addq $0x48, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
testb $0x1, 0x1c(%rax)
je 0x138d2
movq 0x10(%rsp), %rdi
addq $0x20, %rdi
callq 0x23e0
movq 0x10(%rsp), %rax
movl 0x18(%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
testb $0x1, 0x1c(%rax)
je 0x138f7
movq 0x10(%rsp), %rdi
addq $0x20, %rdi
callq 0x21c0
movl 0xc(%rsp), %eax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/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) {
#ifdef EXTERNAL_LOCKS
		ll->LOCK = cf_hooked_mutex_alloc();
#else
		pthread_mutex_init(&ll->LOCK, 0);
#endif 
	}
	return(0);	
}

// Assembly:
subq $0x18, %rsp
movb %dl, %al
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
andb $0x1, %al
movb %al, 0x7(%rsp)
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x10(%rsp), %rax
movl $0x0, 0x18(%rax)
movb 0x7(%rsp), %cl
movq 0x10(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x1c(%rax)
testb $0x1, 0x7(%rsp)
je 0x13971
movq 0x10(%rsp), %rdi
addq $0x20, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2430
xorl %eax, %eax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_log.c
// Function: cf_default_log
static void
cf_default_log(cf_log_level level, const char* fmt_no_newline, ...)
{
	size_t fmt_size = strlen(fmt_no_newline) + 2;
	char* fmt = (char*)alloca(fmt_size);

	strncpy(fmt, fmt_no_newline, fmt_size);
	fmt[fmt_size - 2] = '\n';

	va_list ap;

	va_start(ap, fmt_no_newline);
	vfprintf(stderr, fmt, ap);
	va_end(ap);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
testb %al, %al
je 0x139bb
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2100
addq $0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x2160
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movb $0xa, -0x2(%rax,%rcx)
leaq -0xf0(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x30, -0x3c(%rbp)
movl $0x10, -0x40(%rbp)
movq 0xa592(%rip), %rax      # 0x1dfe0
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x2320
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_proto.c
// Function: cl_proto_swap
void
cl_proto_swap(cl_proto *p)
{
	uint8_t	 version = p->version;
	uint8_t  type = p->type;
	p->version = p->type = 0;
	p->sz = cf_byteswap64p(p);
	p->version = version;
	p->type = type;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movb (%rax), %al
movb %al, 0x17(%rsp)
movq 0x18(%rsp), %rax
movb 0x1(%rax), %al
movb %al, 0x16(%rsp)
movq 0x18(%rsp), %rax
movb $0x0, 0x1(%rax)
movq 0x18(%rsp), %rax
movb $0x0, (%rax)
movq 0x18(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rdi
callq 0x13e40
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rcx
movq 0x18(%rsp), %rax
movl %ecx, %edx
movl %edx, 0x2(%rax)
shrq $0x20, %rcx
movw %cx, 0x6(%rax)
movb 0x17(%rsp), %cl
movq 0x18(%rsp), %rax
movb %cl, (%rax)
movb 0x16(%rsp), %cl
movq 0x18(%rsp), %rax
movb %cl, 0x1(%rax)
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_proto.c
// Function: cl_msg_swap_header
void
cl_msg_swap_header(cl_msg *m)
{
	m->generation = ntohl(m->generation);
	m->record_ttl =  ntohl(m->record_ttl);
	m->transaction_ttl = ntohl(m->transaction_ttl);
	m->n_fields = ntohs(m->n_fields);
	m->n_ops= ntohs(m->n_ops);
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rax
movl 0x6(%rax), %edi
callq 0x2300
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, 0x6(%rax)
movq (%rsp), %rax
movl 0xa(%rax), %edi
callq 0x2300
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, 0xa(%rax)
movq (%rsp), %rax
movl 0xe(%rax), %edi
callq 0x2300
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, 0xe(%rax)
movq (%rsp), %rax
movzwl 0x12(%rax), %edi
callq 0x2510
movw %ax, %cx
movq (%rsp), %rax
movw %cx, 0x12(%rax)
movq (%rsp), %rax
movzwl 0x14(%rax), %edi
callq 0x2510
movw %ax, %cx
movq (%rsp), %rax
movw %cx, 0x14(%rax)
popq %rax
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_proto.c
// Function: cl_msg_swap_ops
void
cl_msg_swap_ops(cl_msg *m)
{
	cl_msg_op *op = 0;
	int *n = 0; // actually not necessary

	while ((op = cl_msg_op_iterate(m,op,n))) {
		cl_msg_swap_op(op);
	}
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq (%rsp), %rdx
callq 0x13be0
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x13bd4
movq 0x8(%rsp), %rdi
callq 0x13b70
jmp 0x13baa
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/../include/citrusleaf/proto.h
// Function: cl_msg_op_iterate
static inline cl_msg_op *
cl_msg_op_iterate(cl_msg *msg, cl_msg_op *current, int *n)
{
	// skip over the fields the first time
	if (!current) {
		if (msg->n_ops == 0) return(0); // short cut
		cl_msg_field *mf = (cl_msg_field *) msg->data;
		for (uint32_t i = 0; i < msg->n_fields; i++)
			mf = cl_msg_field_get_next(mf);
		current = (cl_msg_op *) mf;
		*n = 0;
		return(current);
	}
	(*n)++;
	if (*n >= msg->n_ops)	return(0);
	return ( cl_msg_op_get_next( current ) );
	
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x13c7f
movq 0x28(%rsp), %rax
movzwl 0x14(%rax), %eax
cmpl $0x0, %eax
jne 0x13c1b
movq $0x0, 0x30(%rsp)
jmp 0x13cb9
movq 0x28(%rsp), %rax
addq $0x16, %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movq 0x28(%rsp), %rcx
movzwl 0x12(%rcx), %ecx
cmpl %ecx, %eax
jae 0x13c5e
movq 0x10(%rsp), %rdi
callq 0x13d50
movq %rax, 0x10(%rsp)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x13c31
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rax
movl $0x0, (%rax)
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x13cb9
movq 0x18(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq 0x18(%rsp), %rax
movl (%rax), %eax
movq 0x28(%rsp), %rcx
movzwl 0x14(%rcx), %ecx
cmpl %ecx, %eax
jl 0x13caa
movq $0x0, 0x30(%rsp)
jmp 0x13cb9
movq 0x20(%rsp), %rdi
callq 0x13e20
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_proto.c
// Function: cl_msg_swap_fields
void
cl_msg_swap_fields(cl_msg *m)
{
	cl_msg_field *mf = (cl_msg_field *) m->data;

	for (int i=0;i<m->n_fields;i++) {
		cl_msg_swap_field(mf);
		mf = cl_msg_field_get_next(mf);
	}
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x16, %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
movq 0x10(%rsp), %rcx
movzwl 0x12(%rcx), %ecx
cmpl %ecx, %eax
jge 0x13d46
movq 0x8(%rsp), %rdi
callq 0x13cd0
movq 0x8(%rsp), %rdi
callq 0x13d50
movq %rax, 0x8(%rsp)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x13d0f
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_proto.c
// Function: cl_msg_swap_fields_and_ops
void
cl_msg_swap_fields_and_ops(cl_msg *m)
{
	cl_msg_field *mf = (cl_msg_field *) m->data;

	for (int i=0;i<m->n_fields;i++) {
		cl_msg_swap_field(mf);
		mf = cl_msg_field_get_next(mf);
	}

	cl_msg_op *op = (cl_msg_op *)mf;
	for (int i=0;i<m->n_ops;i++) {
		cl_msg_swap_op(op);
		op = cl_msg_op_get_next(op);
	}
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x16, %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
movq 0x20(%rsp), %rcx
movzwl 0x12(%rcx), %ecx
cmpl %ecx, %eax
jge 0x13dc6
movq 0x18(%rsp), %rdi
callq 0x13cd0
movq 0x18(%rsp), %rdi
callq 0x13d50
movq %rax, 0x18(%rsp)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x13d8f
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
movq 0x20(%rsp), %rcx
movzwl 0x14(%rcx), %ecx
cmpl %ecx, %eax
jge 0x13e0f
movq 0x8(%rsp), %rdi
callq 0x13b70
movq 0x8(%rsp), %rdi
callq 0x13e20
movq %rax, 0x8(%rsp)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x13dd8
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_queue.c
// Function: cf_queue_create
cf_queue *
cf_queue_create(size_t elementsz, bool threadsafe)
{
	cf_queue *q = NULL;

	q = (cf_queue*)malloc( sizeof(cf_queue));
	/* FIXME error msg */
	if (!q)
		return(NULL);
	q->allocsz = CF_QUEUE_ALLOCSZ;
	q->write_offset = q->read_offset = 0;
	q->elementsz = elementsz;
	q->threadsafe = threadsafe;

	q->queue = (uint8_t*)malloc(CF_QUEUE_ALLOCSZ * elementsz);
	if (! q->queue) {
		free(q);
		return(NULL);
	}

	if (!q->threadsafe)
		return(q);

#ifdef EXTERNAL_LOCKS
	if (!g_mutex_hooks)
		return(q);

	if ((q->LOCK = cf_hooked_mutex_alloc()) == NULL) {
		/* FIXME error msg */
		free(q->queue);
		free(q);
		return(NULL);
	}

#else
	if (0 != pthread_mutex_init(&q->LOCK, NULL)) {
		/* FIXME error msg */
		free(q->queue);
		free(q);
		return(NULL);
	}

	if (0 != pthread_cond_init(&q->CV, NULL)) {
		pthread_mutex_destroy(&q->LOCK);
		free(q->queue);
		free(q);
		return(NULL);
	}
#endif // EXTERNAL_LOCKS
	return(q);
}

// Assembly:
subq $0x28, %rsp
movb %sil, %al
movq %rdi, 0x18(%rsp)
andb $0x1, %al
movb %al, 0x17(%rsp)
movq $0x0, 0x8(%rsp)
movl $0x78, %edi
callq 0x2310
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x13eb0
movq $0x0, 0x20(%rsp)
jmp 0x13fd9
movq 0x8(%rsp), %rax
movl $0x40, 0x4(%rax)
movq 0x8(%rsp), %rax
movl $0x0, 0xc(%rax)
movq 0x8(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movb 0x17(%rsp), %cl
movq 0x8(%rsp), %rax
andb $0x1, %cl
movb %cl, (%rax)
movq 0x18(%rsp), %rdi
shlq $0x6, %rdi
callq 0x2310
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x70(%rax)
movq 0x8(%rsp), %rax
cmpq $0x0, 0x70(%rax)
jne 0x13f2e
movq 0x8(%rsp), %rdi
callq 0x22e0
movq $0x0, 0x20(%rsp)
jmp 0x13fd9
movq 0x8(%rsp), %rax
testb $0x1, (%rax)
jne 0x13f47
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x13fd9
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2430
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x13f84
movq 0x8(%rsp), %rax
movq 0x70(%rax), %rdi
callq 0x22e0
movq 0x8(%rsp), %rdi
callq 0x22e0
movq $0x0, 0x20(%rsp)
jmp 0x13fd9
movq 0x8(%rsp), %rdi
addq $0x40, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x22f0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x13fcf
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
callq 0x22d0
movq 0x8(%rsp), %rax
movq 0x70(%rax), %rdi
callq 0x22e0
movq 0x8(%rsp), %rdi
callq 0x22e0
movq $0x0, 0x20(%rsp)
jmp 0x13fd9
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_queue.c
// Function: cf_queue_destroy
void
cf_queue_destroy(cf_queue *q)
{
	if (q->threadsafe) {
#ifdef EXTERNAL_LOCKS
		cf_hooked_mutex_free(q->LOCK);
#else
		pthread_cond_destroy(&q->CV);
		pthread_mutex_destroy(&q->LOCK);
#endif // EXTERNAL_LOCKS
	}
	memset((void*)q->queue, 0, q->allocsz * q->elementsz);
	free(q->queue);
	memset((void*)q, 0, sizeof(cf_queue) );
	free(q);
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rax
testb $0x1, (%rax)
je 0x14018
movq (%rsp), %rdi
addq $0x40, %rdi
callq 0x2560
movq (%rsp), %rdi
addq $0x18, %rdi
callq 0x22d0
movq (%rsp), %rax
movq 0x70(%rax), %rdi
movq (%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, %edx
movq (%rsp), %rax
imulq 0x10(%rax), %rdx
xorl %esi, %esi
callq 0x2170
movq (%rsp), %rax
movq 0x70(%rax), %rdi
callq 0x22e0
movq (%rsp), %rdi
xorl %esi, %esi
movl $0x78, %edx
callq 0x2170
movq (%rsp), %rdi
callq 0x22e0
popq %rax
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_queue.c
// Function: cf_queue_sz
int
cf_queue_sz(cf_queue *q)
{
	int rv;

	QUEUE_LOCK(q);
	rv = CF_Q_SZ(q);
	QUEUE_UNLOCK(q);

	return(rv);
	
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
testb $0x1, (%rax)
je 0x14091
movq 0x10(%rsp), %rdi
addq $0x18, %rdi
callq 0x23e0
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
movq 0x10(%rsp), %rcx
subl 0xc(%rcx), %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
testb $0x1, (%rax)
je 0x140bd
movq 0x10(%rsp), %rdi
addq $0x18, %rdi
callq 0x21c0
movl 0xc(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_queue.c
// Function: cf_queue_push
int
cf_queue_push(cf_queue *q, void *ptr)
{
	/* FIXME arg check - and how do you do that, boyo? Magic numbers? */

	/* FIXME error */

	QUEUE_LOCK(q);

	/* Check queue length */
	if (CF_Q_SZ(q) == q->allocsz) {
		/* resize is a pain for circular buffers */
		if (0 != cf_queue_resize(q, q->allocsz + CF_QUEUE_ALLOCSZ)) {
			QUEUE_UNLOCK(q);
			return(-1);
		}
	}

	// todo: if queues are power of 2, this can be a shift
	memcpy(CF_Q_ELEM_PTR(q,q->write_offset), ptr, q->elementsz);
	q->write_offset++;
	// we're at risk of overflow if the write offset is that high
	if (q->write_offset & 0xC0000000) cf_queue_unwrap(q);

#ifndef EXTERNAL_LOCKS	
	if (q->threadsafe)
		pthread_cond_signal(&q->CV);
#endif 

	QUEUE_UNLOCK(q);

	return(0);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq %rsi, (%rsp)
movq 0x8(%rsp), %rax
testb $0x1, (%rax)
je 0x14325
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
callq 0x23e0
movq 0x8(%rsp), %rax
movl 0x8(%rax), %eax
movq 0x8(%rsp), %rcx
subl 0xc(%rcx), %eax
movq 0x8(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x14383
movq 0x8(%rsp), %rdi
movq 0x8(%rsp), %rax
movl 0x4(%rax), %esi
addl $0x40, %esi
callq 0x140d0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x14381
movq 0x8(%rsp), %rax
testb $0x1, (%rax)
je 0x14374
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
callq 0x21c0
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x14421
jmp 0x14383
movq 0x8(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x8(%rsp), %rax
movl 0x8(%rax), %eax
movq 0x8(%rsp), %rcx
xorl %edx, %edx
divl 0x4(%rcx)
movl %edx, %eax
movq 0x8(%rsp), %rcx
imulq 0x10(%rcx), %rax
addq %rax, %rdi
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdx
callq 0x21e0
movq 0x8(%rsp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq 0x8(%rsp), %rax
movl 0x8(%rax), %eax
andl $0xc0000000, %eax       # imm = 0xC0000000
cmpl $0x0, %eax
je 0x143e9
movq 0x8(%rsp), %rdi
callq 0x142b0
movq 0x8(%rsp), %rax
testb $0x1, (%rax)
je 0x14401
movq 0x8(%rsp), %rdi
addq $0x40, %rdi
callq 0x2030
movq 0x8(%rsp), %rax
testb $0x1, (%rax)
je 0x14419
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
callq 0x21c0
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_queue.c
// Function: cf_queue_push_limit
bool
cf_queue_push_limit(cf_queue *q, void *ptr, uint32_t limit)
{
	QUEUE_LOCK(q);
	uint32_t size = CF_Q_SZ(q);

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

	/* Check queue length */
	if (size == q->allocsz) {
		/* resize is a pain for circular buffers */
		if (0 != cf_queue_resize(q, q->allocsz + CF_QUEUE_ALLOCSZ)) {
			QUEUE_UNLOCK(q);
			return false;
		}
	}

	memcpy(CF_Q_ELEM_PTR(q,q->write_offset), ptr, q->elementsz);
	q->write_offset++;
	// we're at risk of overflow if the write offset is that high
	if (q->write_offset & 0xC0000000) cf_queue_unwrap(q);

#ifndef EXTERNAL_LOCKS
	if (q->threadsafe)
		pthread_cond_signal(&q->CV);
#endif

	QUEUE_UNLOCK(q);
	return true;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movq 0x18(%rsp), %rax
testb $0x1, (%rax)
je 0x1445a
movq 0x18(%rsp), %rdi
addq $0x18, %rdi
callq 0x23e0
movq 0x18(%rsp), %rax
movl 0x8(%rax), %eax
movq 0x18(%rsp), %rcx
subl 0xc(%rcx), %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0xc(%rsp), %eax
jb 0x1449a
movq 0x18(%rsp), %rax
testb $0x1, (%rax)
je 0x14490
movq 0x18(%rsp), %rdi
addq $0x18, %rdi
callq 0x21c0
movb $0x0, 0x27(%rsp)
jmp 0x14585
movl 0x8(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x144e9
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movl 0x4(%rax), %esi
addl $0x40, %esi
callq 0x140d0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x144e7
movq 0x18(%rsp), %rax
testb $0x1, (%rax)
je 0x144dd
movq 0x18(%rsp), %rdi
addq $0x18, %rdi
callq 0x21c0
movb $0x0, 0x27(%rsp)
jmp 0x14585
jmp 0x144e9
movq 0x18(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x18(%rsp), %rax
movl 0x8(%rax), %eax
movq 0x18(%rsp), %rcx
xorl %edx, %edx
divl 0x4(%rcx)
movl %edx, %eax
movq 0x18(%rsp), %rcx
imulq 0x10(%rcx), %rax
addq %rax, %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdx
callq 0x21e0
movq 0x18(%rsp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq 0x18(%rsp), %rax
movl 0x8(%rax), %eax
andl $0xc0000000, %eax       # imm = 0xC0000000
cmpl $0x0, %eax
je 0x14550
movq 0x18(%rsp), %rdi
callq 0x142b0
movq 0x18(%rsp), %rax
testb $0x1, (%rax)
je 0x14568
movq 0x18(%rsp), %rdi
addq $0x40, %rdi
callq 0x2030
movq 0x18(%rsp), %rax
testb $0x1, (%rax)
je 0x14580
movq 0x18(%rsp), %rdi
addq $0x18, %rdi
callq 0x21c0
movb $0x1, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_queue.c
// Function: cf_queue_delete_offset
void
cf_queue_delete_offset(cf_queue *q, uint32_t index)
{
	index %= q->allocsz;
	uint32_t r_index = q->read_offset % q->allocsz;
	uint32_t w_index = q->write_offset % q->allocsz;
	
	// assumes index is validated!
	
	// if we're deleting the one at the head, just increase the readoffset
	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;
	}
	// and the memory copy is overlapping, so must use memmove
	if (index > r_index) {
		memmove( &q->queue[ (r_index + 1) * q->elementsz ],
			     &q->queue[ r_index * q->elementsz ],
				 (index - r_index) * q->elementsz );
		q->read_offset++;
		return;
	}
	
	if (index < w_index) {
		memmove( &q->queue[ index * q->elementsz ],
			     &q->queue[ (index + 1) * q->elementsz ],
			     (w_index - index - 1) * q->elementsz);
		q->write_offset--;
		return;
	}
	
//	cf_debug(CF_QUEUE,"QUEUE_DELETE_OFFSET: FAIL FAIL FAIL FAIL");

}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movl 0x4(%rax), %ecx
movl 0xc(%rsp), %eax
xorl %edx, %edx
divl %ecx
movl %edx, 0xc(%rsp)
movq 0x10(%rsp), %rax
movl 0xc(%rax), %eax
movq 0x10(%rsp), %rcx
xorl %edx, %edx
divl 0x4(%rcx)
movl %edx, 0x8(%rsp)
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
movq 0x10(%rsp), %rcx
xorl %edx, %edx
divl 0x4(%rcx)
movl %edx, 0x4(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x8(%rsp), %eax
jne 0x1485a
movq 0x10(%rsp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x14960
cmpl $0x0, 0x4(%rsp)
je 0x14883
movl 0xc(%rsp), %eax
movl 0x4(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x14883
movq 0x10(%rsp), %rax
movl 0x8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rax)
jmp 0x14960
movl 0xc(%rsp), %eax
cmpl 0x8(%rsp), %eax
jbe 0x148f1
movq 0x10(%rsp), %rax
movq 0x70(%rax), %rdi
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movq 0x10(%rsp), %rcx
imulq 0x10(%rcx), %rax
addq %rax, %rdi
movq 0x10(%rsp), %rax
movq 0x70(%rax), %rsi
movl 0x8(%rsp), %eax
movq 0x10(%rsp), %rcx
imulq 0x10(%rcx), %rax
addq %rax, %rsi
movl 0xc(%rsp), %eax
subl 0x8(%rsp), %eax
movl %eax, %eax
movl %eax, %edx
movq 0x10(%rsp), %rax
imulq 0x10(%rax), %rdx
callq 0x2480
movq 0x10(%rsp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x14960
movl 0xc(%rsp), %eax
cmpl 0x4(%rsp), %eax
jae 0x14960
movq 0x10(%rsp), %rax
movq 0x70(%rax), %rdi
movl 0xc(%rsp), %eax
movq 0x10(%rsp), %rcx
imulq 0x10(%rcx), %rax
addq %rax, %rdi
movq 0x10(%rsp), %rax
movq 0x70(%rax), %rsi
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movq 0x10(%rsp), %rcx
imulq 0x10(%rcx), %rax
addq %rax, %rsi
movl 0x4(%rsp), %eax
subl 0xc(%rsp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
movq 0x10(%rsp), %rax
imulq 0x10(%rax), %rdx
callq 0x2480
movq 0x10(%rsp), %rax
movl 0x8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nop