LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_cluster.c
// Function: cl_cluster_get_node_names
void 
cl_cluster_get_node_names(cl_cluster *asc, int *n_nodes, char **node_names)
{
	pthread_mutex_lock(&asc->LOCK);
	uint size = cf_vector_size(&asc->node_v);
	*n_nodes = size;

	if (size == 0) {
		*node_names = 0;
		pthread_mutex_unlock(&asc->LOCK);
		return;
	}

	*node_names = malloc(NODE_NAME_SIZE * size);
	if (*node_names == 0) {
		pthread_mutex_unlock(&asc->LOCK);
		return;
	}

	char *nptr = *node_names;
	for (uint i = 0; i < size; i++) {
		cl_cluster_node *cn = cf_vector_pointer_get(&asc->node_v, i);
		memcpy(nptr, cn->name, NODE_NAME_SIZE);
		nptr += NODE_NAME_SIZE;
	}
	pthread_mutex_unlock(&asc->LOCK);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x158(%rdi), %rbx
movq %rdi, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rbx, %rdi
callq 0x23b0
movl 0x104(%r14), %r13d
testl %r13d, %r13d
movl %r13d, (%r15)
je 0x7ec7
leal (,%r13,4), %eax
leal (%rax,%rax,4), %edi
callq 0x22e0
testq %rax, %rax
movq %rax, (%r12)
je 0x7ecf
movq %rax, %r15
addq $0xf8, %r14
xorl %ebp, %ebp
movq %rsp, %r12
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0xe7d4
movq (%rsp), %rax
incl %ebp
movl 0x10(%rax), %ecx
movl %ecx, 0x10(%r15)
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq %rax, 0x8(%r15)
movq %rcx, (%r15)
addq $0x14, %r15
cmpl %ebp, %r13d
jne 0x7e7f
movq %rbx, %rdi
callq 0x2190
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $0x0, (%r12)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2190
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_cluster.c
// Function: cl_cluster_node_get_byname
cl_cluster_node *
cl_cluster_node_get_byname(cl_cluster *asc, char *name)
{
	pthread_mutex_lock(&asc->LOCK);

	for (uint i = 0; i < cf_vector_size(&asc->node_v); i++) {
		cl_cluster_node *cn = cf_vector_pointer_get(&asc->node_v, i);
		if (strcmp(name, cn->name) == 0) {
			pthread_mutex_unlock(&asc->LOCK);
			return(cn);
		}
	}
	pthread_mutex_unlock(&asc->LOCK);
	return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
addq $0x158, %rdi            # imm = 0x158
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
callq 0x23b0
cmpl $0x0, 0x104(%r15)
je 0x7f4e
leaq 0xf8(%r15), %r12
leaq 0x10(%rsp), %r13
xorl %ebp, %ebp
movq %r12, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0xe7d4
movq 0x10(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2350
testl %eax, %eax
je 0x7f50
incl %ebp
cmpl 0x104(%r15), %ebp
jb 0x7f22
xorl %ebx, %ebx
movq 0x8(%rsp), %rdi
callq 0x2190
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_cluster.c
// Function: str_split
static void
str_split(char split_c, char *str, cf_vector *v)
{
	char *prev = str;
	while (*str) {
		if (split_c == *str) {
			*str = 0;
			cf_vector_append(v, &prev);
			prev = str+1;
		}
		str++;
	}
	if (prev != str) {
		cf_vector_append(v, &prev);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
movb (%rsi), %al
testb %al, %al
je 0x821c
movq %rdx, %rbx
movl %edi, %ebp
leaq 0x1(%rsi), %r15
movq %rsp, %r14
cmpb %bpl, %al
jne 0x81ff
movq %rbx, %rdi
movq %r14, %rsi
movb $0x0, -0x1(%r15)
callq 0xe723
movq %r15, %rsi
movq %r15, (%rsp)
movb (%r15), %al
incq %r15
testb %al, %al
jne 0x81e3
decq %r15
cmpq %rsi, %r15
je 0x821c
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xe723
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_cluster.c
// Function: cl_cluster_node_fd_put
void
cl_cluster_node_fd_put(cl_cluster_node *cn, int fd, bool asyncfd)
{
#if ONEASYNCFD
	return;	//FD does not get closed. It just lies around.
#endif
	cf_queue *q;
	if (asyncfd == true) {
		q = cn->conn_q_asyncfd;
		// Async queue is used by XDS. It can open lot of connections 
		// depending on batch-size. Dont worry about limiting the pool.
		cf_queue_push(q, &fd);
	} else {
		q = cn->conn_q;
		if (! cf_queue_push_limit(q, &fd, 300)) {
			close(fd);
		}
	}
}

// Assembly:
pushq %rax
testl %edx, %edx
movl %esi, 0x4(%rsp)
je 0x8468
movq 0x78(%rdi), %rdi
leaq 0x4(%rsp), %rsi
callq 0xcb7c
jmp 0x8488
movq 0x70(%rdi), %rdi
leaq 0x4(%rsp), %rsi
movl $0x12c, %edx            # imm = 0x12C
callq 0xcc2a
testb %al, %al
jne 0x8488
movl 0x4(%rsp), %edi
callq 0x2550
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_cluster.c
// Function: cluster_get_n_partitions
void
cluster_get_n_partitions( cl_cluster *asc, cf_vector *sockaddr_in_v )
{
	// check if someone found the value
	if (asc->n_partitions != 0)
		return;

	for (uint i=0;i<cf_vector_size(sockaddr_in_v);i++) {
		struct sockaddr_in *sa_in = cf_vector_getp(sockaddr_in_v, i);
		int n_partitions = 0;

		if (cl_get_n_partitions(sa_in, &n_partitions) != 0) {
			continue;
		}
		asc->n_partitions = n_partitions;
		break;
	}
}

// Assembly:
cmpw $0x0, 0x140(%rdi)
je 0x8495
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0xc(%rsi)
movq %rsi, %r14
je 0x84e6
movq %rdi, %rbx
xorl %ebp, %ebp
leaq 0x4(%rsp), %r15
movq %r14, %rdi
movl %ebp, %esi
callq 0xe834
movq %rax, %rdi
movq %r15, %rsi
movl $0x0, 0x4(%rsp)
callq 0xc0ae
testl %eax, %eax
je 0x84da
incl %ebp
cmpl 0xc(%r14), %ebp
jb 0x84af
jmp 0x84e6
movzwl 0x4(%rsp), %eax
movw %ax, 0x140(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_cluster.c
// Function: citrusleaf_cluster_init
int citrusleaf_cluster_init()
{
    if (g_clust_initialized) {
    	return(0);
	}
    
    // No destruction function is used.
	// NOTE: A destruction function should not be used because elements
	// in this list are used even after they are removed from the list.
	// Refer to the function citrusleaf_cluster_destroy() for more info.
	cf_ll_init(&cluster_ll, 0, false);
	
    g_clust_initialized = 1;
   	g_clust_tend_speed = 1;
	pthread_create( &tender_thr, 0, cluster_tender_fn, 0);

	return(0);	
}

// Assembly:
pushq %rbx
leaq 0xfe83(%rip), %rbx      # 0x183a8
cmpl $0x0, (%rbx)
jne 0x855e
leaq 0xfea7(%rip), %rdi      # 0x183d8
xorl %esi, %esi
xorl %edx, %edx
callq 0xc879
movl $0x1, %eax
leaq 0xfeda(%rip), %rdi      # 0x18420
leaq 0x15(%rip), %rdx        # 0x8562
xorl %esi, %esi
xorl %ecx, %ecx
movl %eax, (%rbx)
movl %eax, 0xdd67(%rip)      # 0x162c0
callq 0x24e0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_cluster.c
// Function: cluster_ping_address
static void
cluster_ping_address(cl_cluster *asc, struct sockaddr_in *sa_in)
{
	char node_name[NODE_NAME_SIZE];

	if (cl_get_node_name(sa_in, node_name) != 0) {
		return;
	}
		
	// if new nodename, add to cluster
	cl_cluster_node *cn = cl_cluster_node_get_byname(asc, node_name);
	if (!cn) {
		/*
		if (cf_debug_enabled()) {
			cf_debug("%s node unknown, creating new", node_name);
			dump_sockaddr_in("New node is ",sa_in);
		}
		*/
		cl_cluster_node *node = cl_cluster_node_create(node_name, sa_in);

		// Appends must be locked regardless of only being called from tend thread, because
		// other threads reads need to wait on their locks for the append to complete.
		pthread_mutex_lock(&asc->LOCK);
		cf_vector_pointer_append(&asc->node_v, node);
		pthread_mutex_unlock(&asc->LOCK);
	}
	// if not new, add address to node
	else {
		cf_vector_append_unique(&cn->sockaddr_in_v, sa_in);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rsi
movq %r14, %rdi
callq 0xbf1e
testl %eax, %eax
jne 0x8632
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x7ee5
testq %rax, %rax
je 0x85f6
addq $0x20, %rax
movq %r14, %rsi
movq %rax, %rdi
callq 0xe762
jmp 0x8632
movq %rsp, %rdi
movq %r14, %rsi
callq 0x7c68
leaq 0x158(%rbx), %r15
movq %rax, %r14
movq %r15, %rdi
callq 0x23b0
addq $0xf8, %rbx
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
movq %r14, (%rsi)
callq 0xe723
movq %r15, %rdi
callq 0x2190
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_partition.c
// Function: cl_partition_table_remove_node
void
cl_partition_table_remove_node( cl_cluster *asc, cl_cluster_node *node )
{
#ifdef DEBUG
	cf_debug("remove node %s",node->name);
#endif	
	
	cl_partition_table *pt = asc->partition_table_head;
	while(pt) {
		
		for (int i=0;i<asc->n_partitions;i++) {
			cl_partition *p = &pt->partitions[i];
			if (p->write == node) p->write = 0;
			for (int j=0;j<p->n_read;j++) {
				if (p->read[j] == node) {
					if (j < MAX_REPLICA_COUNT-1)
						// overlapping copies must use memmove!
						memmove(&p->read[j], &p->read[j+1], 
							((MAX_REPLICA_COUNT - 1) - j) * sizeof(cl_cluster_node *) );
					p->n_read--;
					break;
				}
			}
		}
		
		pt = pt->next;
	}
	return;
}

// Assembly:
movq 0x148(%rdi), %rcx
testq %rcx, %rcx
je 0x896f
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movzwl 0x140(%rdi), %eax
movq %rsi, %rbx
movq %rdi, %r14
testw %ax, %ax
je 0x8953
leaq 0x30(%rcx), %r12
leaq 0x40(%rcx), %r13
xorl %ebp, %ebp
movq %rcx, (%rsp)
imulq $0x38, %rbp, %rax
cmpq %rbx, (%r12,%rax)
leaq (%r12,%rax), %r15
jne 0x88f0
movq $0x0, (%r15)
movslq 0x8(%r15), %rax
testq %rax, %rax
jle 0x8939
movq $-0x20, %rdx
xorl %ecx, %ecx
cmpq %rbx, (%r13,%rcx,8)
je 0x8917
incq %rcx
addq $0x8, %rdx
cmpq %rcx, %rax
jne 0x8902
jmp 0x8939
cmpq $0x3, %rcx
ja 0x8933
leaq (%r13,%rcx,8), %rdi
leaq 0x8(%r13,%rcx,8), %rsi
negq %rdx
callq 0x2460
movl 0x8(%r15), %eax
decl %eax
movl %eax, 0x8(%r15)
movzwl 0x140(%r14), %eax
incq %rbp
addq $0x38, %r13
cmpq %rax, %rbp
jb 0x88db
movq (%rsp), %rcx
jmp 0x8955
xorl %eax, %eax
movq (%rcx), %rcx
testq %rcx, %rcx
jne 0x88c4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_partition.c
// Function: cl_partition_table_create
cl_partition_table *
cl_partition_table_create(cl_cluster *asc, char *ns) 
{
#ifdef DEBUG
	cf_debug("partition table create: npartitions %d", asc->n_partitions);
#endif

	cl_partition_table *pt = malloc( sizeof(cl_partition_table) + (sizeof(cl_partition) * asc->n_partitions) );
	if (!pt)	return(0);
	memset(pt, 0, sizeof(cl_partition_table) + (sizeof(cl_partition) * asc->n_partitions) );
	strcpy( pt->ns, ns );
	
	pt->next = asc->partition_table_head;
	asc->partition_table_head = pt;

	return(pt);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movzwl 0x140(%rdi), %eax
movq %rsi, %r14
movq %rdi, %rbx
movl $0x1, %edi
imulq $0x38, %rax, %rsi
addq $0x30, %rsi
callq 0x2170
movq %rax, %r15
testq %rax, %rax
je 0x89bc
movq %r15, %rdi
movq %r14, %rsi
addq $0x8, %rdi
callq 0x2240
movq 0x148(%rbx), %rax
movq %rax, (%r15)
movq %r15, 0x148(%rbx)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_partition.c
// Function: cl_partition_table_destroy
void
cl_partition_table_destroy(cl_cluster *asc, cl_partition_table *pt)
{
	cl_partition_table **prev = &asc->partition_table_head;
	cl_partition_table *now = asc->partition_table_head;
	while ( now ) {
		if (now == pt) {
			*prev = pt->next;
			break;
		}
	}
#ifdef EXTRA_CHECKS	
	if (now == 0) {
		cf_warn("warning! passed in partition table %p not in list", pt);
		return;
	}
#endif

	free(pt);
}

// Assembly:
movq 0x148(%rdi), %rax
movq %rsi, %rdx
testq %rax, %rax
je 0x89db
cmpq %rdx, %rax
je 0x8a01
jmp 0x89d9
leaq 0xd8e6(%rip), %rax      # 0x162c8
cmpl $0x0, (%rax)
jle 0x8a13
leaq 0xd8e2(%rip), %rax      # 0x162d0
leaq 0x71ba(%rip), %rsi      # 0xfbaf
movl $0x1, %edi
movq (%rax), %rcx
xorl %eax, %eax
jmpq *%rcx
movq (%rdx), %rax
movq %rax, 0x148(%rdi)
movq %rdx, %rdi
jmp 0x22c0
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_partition.c
// Function: cl_partition_table_destroy_all
void
cl_partition_table_destroy_all(cl_cluster *asc)
{
	cl_partition_table *now = asc->partition_table_head;
	while (now ) {
		void *t = now->next;
		free( now );
		now = t;
	}
	asc->partition_table_head = 0;
	return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x148(%rdi), %rdi
testq %rdi, %rdi
je 0x8a37
movq (%rdi), %r14
callq 0x22c0
testq %r14, %r14
movq %r14, %rdi
jne 0x8a27
movq $0x0, 0x148(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_partition.c
// Function: cl_partition_table_set
void
cl_partition_table_set( cl_cluster *asc, cl_cluster_node *node, char *ns, cl_partition_id pid, bool write)
{
	//cf_debug("Set %s %d", ns, pid);
	cl_partition_table *pt = cl_partition_table_get_byns(asc, ns);

	if (!pt) {
		pt = cl_partition_table_create(asc, ns);
		if (!pt) {
			cf_warn("Failed to create partition table.");
			return;
		}
	}
	//cf_info("Set %s partition %s:%u", write? "write":"read", ns, pid);

	if (write) {
		pt->partitions[pid].write = node;
	}
	else {
		cl_partition *p = &pt->partitions[pid];

		for (int i = 0; i < p->n_read ; i++) {
			if (p->read[i] == node) {
				return; // already in!
			}
		}

		if (MAX_REPLICA_COUNT == p->n_read) {
			// full, replace 0
			cf_debug("read replica set full");
			p->read[0] = node;
		}
		else {
			p->read[p->n_read] = node;
			p->n_read++;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r13
leaq 0x148(%rdi), %r15
movq (%r15), %r15
testq %r15, %r15
je 0x8ab9
leaq 0x8(%r15), %rsi
movq %r12, %rdi
callq 0x2350
testl %eax, %eax
jne 0x8a9f
jmp 0x8acc
movq %r13, %rdi
movq %r12, %rsi
callq 0x8970
movq %rax, %r15
testq %rax, %rax
je 0x8b42
movzwl %r14w, %eax
imulq $0x38, %rax, %rax
testb %bpl, %bpl
leaq 0x30(%r15,%rax), %r14
je 0x8ae6
movq %rbx, (%r14)
jmp 0x8b76
movslq 0x8(%r14), %rax
testq %rax, %rax
jle 0x8b37
leaq 0x10(%r14), %rcx
movq %rax, %rdx
cmpq %rbx, (%rcx)
je 0x8b76
addq $0x8, %rcx
decq %rdx
jne 0x8af6
cmpl $0x5, %eax
jne 0x8b37
leaq 0xd7b8(%rip), %rax      # 0x162c8
movl (%rax), %eax
cmpl $0x3, %eax
jl 0x8b31
leaq 0xd7b2(%rip), %rax      # 0x162d0
leaq 0x70de(%rip), %rsi      # 0xfc03
movl $0x3, %edi
movq (%rax), %rcx
xorl %eax, %eax
callq *%rcx
movq %rbx, 0x10(%r14)
jmp 0x8b76
movq %rbx, 0x10(%r14,%rax,8)
incl 0x8(%r14)
jmp 0x8b76
leaq 0xd77f(%rip), %rax      # 0x162c8
cmpl $0x0, (%rax)
jle 0x8b76
leaq 0xd77b(%rip), %rax      # 0x162d0
leaq 0x7085(%rip), %rsi      # 0xfbe1
movl $0x1, %edi
movq (%rax), %rcx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_partition.c
// Function: cl_partition_table_get
cl_cluster_node *
cl_partition_table_get( cl_cluster *asc, char *ns, cl_partition_id pid, bool write)
{
	cl_partition_table *pt = cl_partition_table_get_byns(asc,ns);
	if (!pt)	{
#ifdef DEBUG        
        cf_debug("partition table: no partition table");
#endif        
        return(0);
    }
	
	cl_cluster_node *node;
	if (write) {

		node = pt->partitions[pid].write;

	}
	else {
		cl_partition *p = &pt->partitions[pid];
		if (p->n_read) {
			round_robin_counter++;
			uint32_t my_rr = round_robin_counter;
			node = p->read[ my_rr % p->n_read ];
		} else {
			node = 0;
		}
	}

#ifdef DEBUG_VERBOSE
		cf_debug("partition-table-get: ns %s pid %d write %d: node %s", ns, pid,write,
			node ? node->name : "nope");
#endif		
	
	return(node);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r15
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r12
xorl %r14d, %r14d
addq $0x148, %r15            # imm = 0x148
movq (%r15), %r15
testq %r15, %r15
je 0x8bea
leaq 0x8(%r15), %rsi
movq %r12, %rdi
callq 0x2350
testl %eax, %eax
jne 0x8ba1
movzwl %bp, %eax
imulq $0x38, %rax, %rax
testb %bl, %bl
leaq 0x30(%r15,%rax), %rcx
jne 0x8be7
movl 0x8(%rcx), %esi
testl %esi, %esi
je 0x8bf6
movl 0xf852(%rip), %eax      # 0x18428
xorl %edx, %edx
incl %eax
movl %eax, 0xf848(%rip)      # 0x18428
divl %esi
leaq 0x10(%rcx,%rdx,8), %rcx
movq (%rcx), %r14
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
jmp 0x8bea
nop
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_batch.c
// Function: direct_batchget_cb
int direct_batchget_cb(char *ns, cf_digest *keyd, char *set, uint32_t generation,
			uint32_t record_voidtime, cl_bin *bins, int n_bins, bool islast, void *udata)
{
	cl_bin* targetBins;

	if (citrusleaf_copy_bins(&targetBins, bins, n_bins) == 0) {
		cl_batchresult *br = (cl_batchresult *)udata;

		// Get record slot in a lock.
		pthread_mutex_lock(&br->lock);
		cl_rec *rec = &br->records[br->numrecs];
		br->numrecs++;
		pthread_mutex_unlock(&br->lock);

		// Copy data to record slot.
		memcpy(&rec->digest, keyd, sizeof(cf_digest));
		rec->generation = generation;
		rec->record_voidtime = record_voidtime;
		rec->bins = targetBins;
		rec->n_bins = n_bins;
	}
	else {
		// Do not include record in array.
		char digest[CF_DIGEST_KEY_SZ*2 + 3];
		cf_digest_string(keyd, digest);
		cf_warn("Failed to copy bin(s) for record digest %s", digest);
	}

	// We are supposed to free the bins in the callback.
	citrusleaf_bins_free(bins, n_bins);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl 0x80(%rsp), %ebp
movq %rsi, %r15
leaq 0x8(%rsp), %rdi
movq %r9, %rsi
movq %r9, %rbx
movl %r8d, %r14d
movl %ecx, %r12d
movl %ebp, %edx
callq 0x482c
testl %eax, %eax
je 0x945a
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0xc24c
leaq 0xce98(%rip), %rax      # 0x162c8
cmpl $0x0, (%rax)
jle 0x94d2
leaq 0xce90(%rip), %rax      # 0x162d0
leaq 0x69e5(%rip), %rsi      # 0xfe2c
leaq 0x10(%rsp), %rdx
movl $0x1, %edi
movq (%rax), %rcx
xorl %eax, %eax
callq *%rcx
jmp 0x94d2
movq 0x90(%rsp), %r13
movq %r13, %rdi
callq 0x23b0
movslq 0x28(%r13), %rax
movq 0x30(%r13), %rbp
movl %r14d, 0x4(%rsp)
movq %r13, %rdi
leaq (%rax,%rax,2), %r14
incl %eax
shlq $0x4, %r14
movl %eax, 0x28(%r13)
callq 0x2190
movq (%r15), %rax
movq 0x8(%r15), %rcx
movl 0x4(%rsp), %edx
movq %rcx, 0x8(%rbp,%r14)
movq %rax, (%rbp,%r14)
movl 0x80(%rsp), %ecx
movl 0x10(%r15), %eax
movl %eax, 0x10(%rbp,%r14)
movl %r12d, 0x14(%rbp,%r14)
movl %edx, 0x18(%rbp,%r14)
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rbp,%r14)
movl %ecx, 0x28(%rbp,%r14)
movl 0x80(%rsp), %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x46f5
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_batch.c
// Function: citrusleaf_free_batchresult
void
citrusleaf_free_batchresult(cl_batchresult *br)
{
	if (br && br->records) {
		//We should free the bins in each of the records
		for (int i=0; i<(br->numrecs); i++) {
			citrusleaf_bins_free(br->records[i].bins, br->records[i].n_bins);
			free(br->records[i].bins);
		}

		//Finally free the record array and the whole structure
		free(br->records);
		free(br);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x9556
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x9556
cmpl $0x0, 0x28(%rbx)
jle 0x9544
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x30(%rbx), %rax
movq 0x20(%rax,%r14), %rdi
movl 0x28(%rax,%r14), %esi
callq 0x46f5
movq 0x30(%rbx), %rax
movq 0x20(%rax,%r14), %rdi
callq 0x22c0
movslq 0x28(%rbx), %rax
incq %r15
addq $0x30, %r14
cmpq %rax, %r15
jl 0x950f
movq 0x30(%rbx), %rdi
callq 0x22c0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x22c0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_batch.c
// Function: citrusleaf_get_many_digest_direct
cl_rv
citrusleaf_get_many_digest_direct(cl_cluster *asc, char *ns, const cf_digest *digests, int n_digests, cl_batchresult **br)
{
	//Fist allocate the result structure
	cl_batchresult *localbr = (cl_batchresult *) malloc(sizeof(struct cl_batchresult));
	if (localbr == NULL) {
		return CITRUSLEAF_FAIL_CLIENT;
	} else {
		//Assume that we are going to get all the records and allocate memory for them
		localbr->records = malloc(sizeof(struct cl_rec) * n_digests);
		if (localbr->records == NULL) {
			free(localbr);
			return CITRUSLEAF_FAIL_CLIENT;
		}
	}

	pthread_mutex_init(&localbr->lock, 0);

	//Call the actual batch-get with our internal callback function which will store the results in an array
	localbr->numrecs = 0;
	cl_rv rv = citrusleaf_get_many_digest(asc, ns, digests, n_digests, 0, 0, true, &direct_batchget_cb, localbr);

	pthread_mutex_destroy(&localbr->lock);

	//If something goes wrong we are responsible for freeing up the allocated memory. The caller may not free it.
	if (rv == CITRUSLEAF_FAIL_CLIENT) {
		citrusleaf_free_batchresult(localbr);
		return CITRUSLEAF_FAIL_CLIENT;
	} else {
		*br = localbr;
	}

	return CITRUSLEAF_OK;
	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x38, %edi
movq %r8, (%rsp)
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %r13
callq 0x22e0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x9616
movq %rax, %r15
movslq %ebp, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdi
callq 0x22e0
testq %rax, %rax
movq %rax, 0x30(%r15)
je 0x9604
movq %r15, %rdi
xorl %esi, %esi
callq 0x2400
leaq -0x1d3(%rip), %rax      # 0x93e8
movl $0x0, 0x28(%r15)
movl $0x1, %r10d
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl %ebp, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r15
pushq %rax
pushq %r10
pushq %r10
callq 0x9046
addq $0x20, %rsp
movq %r15, %rdi
movl %eax, %ebp
callq 0x22b0
cmpl $-0x1, %ebp
je 0x960e
movq (%rsp), %rax
xorl %ebx, %ebx
movq %r15, (%rax)
jmp 0x9616
movq %r15, %rdi
callq 0x22c0
jmp 0x9616
movq %r15, %rdi
callq 0x94ed
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_batch.c
// Function: citrusleaf_batch_init
cl_rv
citrusleaf_batch_init(int n_threads)
{
	if (cf_atomic32_incr(&batch_initialized) != 1) {
		return CITRUSLEAF_OK;
	}

	// create dispatch queue
	g_batch_q = cf_queue_create(sizeof(digest_work), true);

	if (n_threads <= 0) {
		n_threads = 1;
	}
	else if (n_threads > MAX_BATCH_THREADS) {
		n_threads = MAX_BATCH_THREADS;
		cf_warn("Batch threads are limited to %d", MAX_BATCH_THREADS);
	}

	g_batch_thread_count = n_threads;

	// create thread pool
	for (int i = 0; i < n_threads; i++) {
		pthread_create(&g_batch_th[i], 0, batch_worker_fn, 0);
	}
	return CITRUSLEAF_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0xeddd(%rip), %rax      # 0x18430
movl $0x1, %ecx
lock
xaddl %ecx, (%rax)
movl $0x1, %ebp
testl %ecx, %ecx
jne 0x96f2
movl %edi, %ebx
movl $0x78, %edi
movl $0x1, %esi
callq 0xc964
testl %ebx, %ebx
movq %rax, 0xedb5(%rip)      # 0x18438
jle 0x96c3
cmpl $0x7, %ebx
movl %ebx, %ebp
jb 0x96c3
leaq 0xcc35(%rip), %rax      # 0x162c8
cmpl $0x0, (%rax)
jle 0x96be
leaq 0xcc31(%rip), %rax      # 0x162d0
leaq 0x67b1(%rip), %rsi      # 0xfe57
movl $0x1, %edi
movl $0x6, %edx
movl $0x6, %ebp
movq (%rax), %rcx
xorl %eax, %eax
callq *%rcx
jmp 0x96c3
movl $0x6, %ebp
movl %ebp, %r15d
leaq 0xed83(%rip), %rbx      # 0x18450
leaq 0x2b(%rip), %r14        # 0x96ff
movl %ebp, 0xed66(%rip)      # 0x18440
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x24e0
addq $0x8, %rbx
decq %r15
jne 0x96da
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_batch.c
// Function: citrusleaf_batch_shutdown
void citrusleaf_batch_shutdown()
{
	if (g_batch_thread_count <= 0)
		return;

	/* 
	 * If a process is forked, the threads in it do not get spawned in the child process.
	 * In citrusleaf_init(), we are remembering the processid(g_init_pid) of the process who spawned the 
	 * background threads. If the current process is not the process who spawned the background threads
	 * then it cannot call pthread_join() on the threads which does not exist in this process.
	 */
	if(g_init_pid == getpid()) {
		digest_work work;

		memset(&work, 0, sizeof(digest_work));

		int i;

		for (i = 0; i < g_batch_thread_count; i++) {
			cf_queue_push(g_batch_q, &work);
		}

		for (i = 0; i < g_batch_thread_count; i++) {
			pthread_join(g_batch_th[i], NULL);
		}

		cf_queue_destroy(g_batch_q);
		g_batch_q = 0;
	}
}

// Assembly:
cmpl $0x0, 0xe350(%rip)      # 0x18440
jle 0xa1bb
pushq %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
leaq 0xe29c(%rip), %rax      # 0x183a4
movl (%rax), %ebx
callq 0x23a0
cmpl %eax, %ebx
jne 0xa1b0
cmpl $0x0, 0xe322(%rip)      # 0x18440
xorps %xmm0, %xmm0
movq $0x0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
jle 0xa199
xorl %ebp, %ebp
movq %rsp, %rbx
movq 0xe2de(%rip), %rdi      # 0x18438
movq %rbx, %rsi
callq 0xcb7c
movl 0xe2d8(%rip), %eax      # 0x18440
incl %ebp
cmpl %eax, %ebp
jl 0xa153
testl %eax, %eax
jle 0xa199
leaq 0xe2d7(%rip), %rbx      # 0x18450
xorl %r14d, %r14d
movq (%rbx), %rdi
xorl %esi, %esi
callq 0x2220
movslq 0xe2b3(%rip), %rax      # 0x18440
incq %r14
addq $0x8, %rbx
cmpq %rax, %r14
jl 0xa17c
movq 0xe298(%rip), %rdi      # 0x18438
callq 0xc9f6
movq $0x0, 0xe288(%rip) # 0x18438
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_async.c
// Function: citrusleaf_async_reinit
int citrusleaf_async_reinit(int size_limit, unsigned int num_receiver_threads)
{
	int num_threads;

	if (0 == cf_atomic32_get(g_async_initialized)) {
		cf_error("Async client not initialized cannot reinit");
		return -1;
	}
	
	if (num_receiver_threads > MAX_ASYNC_RECEIVER_THREADS) {
			//Limit the threads to the max value even if caller asks for it
			num_receiver_threads = MAX_ASYNC_RECEIVER_THREADS;
	}

	// If number of thread is increased create more threads
	if (num_receiver_threads > g_async_num_threads) {
		unsigned int i;
		for (i = g_async_num_threads; i < num_receiver_threads; i++) {
			pthread_create(&g_async_reciever[i], 0, async_receiver_fn, NULL);
		}
	}
	else {
		// else just reset the number the async threads will kill themselves
		cf_atomic32_set(&g_async_num_threads, num_receiver_threads);
	}

	cf_atomic32_set(&g_async_q_szlimit , size_limit);
	return ( 0 );

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0xdcde(%rip)      # 0x184a8
je 0xa818
cmpl $0x20, %esi
movl $0x20, %ebp
movl %edi, %ebx
cmovbl %esi, %ebp
cmpl 0xdccd(%rip), %ebp      # 0x184ac
jbe 0xa842
movl 0xdcc5(%rip), %eax      # 0x184ac
cmpl %eax, %ebp
jbe 0xa848
leaq 0xdcbe(%rip), %rcx      # 0x184b0
subl %eax, %ebp
leaq 0x62(%rip), %r15        # 0xa85d
leaq (%rcx,%rax,8), %r14
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x24e0
addq $0x8, %r14
decl %ebp
jne 0xa7ff
jmp 0xa848
leaq 0xbaa9(%rip), %rax      # 0x162c8
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x0, (%rax)
js 0xa850
leaq 0xbaa0(%rip), %rax      # 0x162d0
leaq 0x59b7(%rip), %rsi      # 0x101ee
xorl %edi, %edi
movq (%rax), %rcx
xorl %eax, %eax
callq *%rcx
jmp 0xa850
movl %ebp, 0xdc64(%rip)      # 0x184ac
movl %ebx, 0xdc4a(%rip)      # 0x18498
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_async.c
// Function: citrusleaf_async_shutdown
void
citrusleaf_async_shutdown()
{
	if (g_cl_async_q == 0)
		return;

	/*
	 * If a process is forked, the threads in it do not get spawned in the child process.
	 * In citrusleaf_init(), we are remembering the process id(g_init_pid) of the process who spawned the
	 * background threads. If the current process is not the process who spawned the background threads
	 * then it cannot call pthread_join() on the threads which does not exist in this process.
	 */
	if(g_init_pid == getpid()) {
		// Send shutdown message to each worker thread.
		cl_async_work *workitem = malloc(sizeof(cl_async_work));
		memset(workitem, 0, sizeof(cl_async_work));
		workitem->fd = -1;

		uint i;

		for (i = 0; i < g_async_num_threads; i++) {
			cf_queue_push(g_cl_async_q, &workitem);
		}

		for (i = 0; i < g_async_num_threads; i++) {
			pthread_join(g_async_reciever[i], NULL);
		}

		free(workitem);
		cf_queue_destroy(g_cl_async_q);
		g_cl_async_q = 0;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0xd67d(%rip), %r14      # 0x18480
cmpq $0x0, (%r14)
je 0xaea7
leaq 0xd590(%rip), %rax      # 0x183a4
movl (%rax), %ebx
callq 0x23a0
cmpl %eax, %ebx
jne 0xaea7
movl $0x1, %edi
movl $0x30, %esi
callq 0x2170
movq %rax, (%rsp)
movl $0xffffffff, 0x20(%rax) # imm = 0xFFFFFFFF
cmpl $0x0, 0xd668(%rip)      # 0x184ac
je 0xae60
xorl %ebp, %ebp
movq %rsp, %rbx
movq (%r14), %rdi
movq %rbx, %rsi
callq 0xcb7c
incl %ebp
cmpl 0xd64e(%rip), %ebp      # 0x184ac
jb 0xae4b
cmpl $0x0, 0xd645(%rip)      # 0x184ac
je 0xae8f
leaq 0xd640(%rip), %rbx      # 0x184b0
xorl %r15d, %r15d
movq (%rbx), %rdi
xorl %esi, %esi
callq 0x2220
movl 0xd629(%rip), %eax      # 0x184ac
incq %r15
addq $0x8, %rbx
cmpq %rax, %r15
jb 0xae73
movq (%rsp), %rdi
callq 0x22c0
movq (%r14), %rdi
callq 0xc9f6
movq $0x0, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_shm.c
// Function: cl_shm_node_lock
int
cl_shm_node_lock(shm_ninfo* shared_node)
{
	int status = pthread_mutex_lock(&shared_node->ninfo_lock);

	if (status) {
		/* Check if the lock is in recoverable state */
		if (status == EOWNERDEAD){
			/* Make the lock consistent if the last owner of the lock died while holding the lock */
			/* We should ideally clean the memory here and then make the lock consistent */
			pthread_mutex_consistent_np(&shared_node->ninfo_lock);
		}
		else {
			 /* With Robust mutexes the lock gets in not recoverable state when the process holding the lock
			  * dies and the other process that gets the lock unlocks it without making it consistent
			  * (via pthread_mutex_consistent function) */
			cf_warn("Failed to lock shared memory node.");
			return SHM_ERROR;
		}
	}
	return SHM_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
addq $0x40, %r14
movq %r14, %rdi
callq 0x23b0
movl %eax, %ebx
testl %eax, %eax
je 0xb963
cmpl $0x82, %ebx
jne 0xb938
movq %r14, %rdi
callq 0x21f0
xorl %ebx, %ebx
jmp 0xb963
leaq 0xa989(%rip), %rax      # 0x162c8
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x0, (%rax)
jle 0xb963
leaq 0xa980(%rip), %rax      # 0x162d0
leaq 0x4bb5(%rip), %rsi      # 0x1050c
movl $0x1, %edi
movq (%rax), %rcx
xorl %eax, %eax
callq *%rcx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_shm.c
// Function: cl_shm_find_node_from_name
shm_ninfo*
cl_shm_find_node_from_name(const char* node_name)
{
    // Search nodes for node name
    for (int i = 0; i < g_shm_pt->node_count; i++) {
    	shm_ninfo* node_info = &g_shm_pt->node_info[i];

    	if (strcmp(node_info->node_name, node_name) == 0) {
			return node_info;
		}
    }
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0xcc70(%rip), %r14      # 0x18600
movslq 0x8(%r14), %r12
testq %r12, %r12
jle 0xb9c2
movq %rdi, %r15
addq $0xa8, %r14
xorl %ebx, %ebx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2350
testl %eax, %eax
je 0xb9c6
addq $0x2f9068, %r14         # imm = 0x2F9068
decq %r12
jne 0xb9a5
jmp 0xb9cd
xorl %ebx, %ebx
jmp 0xb9cd
addq $-0x70, %r14
movq %r14, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_shm.c
// Function: cl_shm_find_node_from_address
shm_ninfo*
cl_shm_find_node_from_address(struct sockaddr_in* sa_in)
{
    // Search nodes for sockaddr
    for (int i = 0; i < g_shm_pt->node_count; i++) {
    	shm_ninfo* node_info = &g_shm_pt->node_info[i];
    	int max = node_info->address_count;

        //Search address for the current sockaddr
    	for (int j = 0; j < max; j++) {
    		if (memcmp(&node_info->address_array[j], sa_in, sizeof(struct sockaddr_in)) == 0) {
    			return node_info;
    		}
		}
    }
    return 0;
}

// Assembly:
movq 0xcc1d(%rip), %rcx      # 0x18600
movslq 0x8(%rcx), %rdx
testq %rdx, %rdx
jle 0xba40
addq $0x38, %rcx
xorl %r8d, %r8d
movq %rcx, %rsi
imulq $0x2f9068, %r8, %rax    # imm = 0x2F9068
movslq 0x68(%rcx,%rax), %r9
testq %r9, %r9
jle 0xba31
addq %rcx, %rax
movq %rsi, %r10
movdqu (%r10), %xmm0
movdqu (%rdi), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %r11d
cmpl $0xffff, %r11d          # imm = 0xFFFF
je 0xba42
addq $0x10, %r10
decq %r9
jne 0xba0d
incq %r8
addq $0x2f9068, %rsi         # imm = 0x2F9068
cmpq %rdx, %r8
jne 0xb9f6
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_shm.c
// Function: cl_shm_free_seed_array
static void
cl_shm_free_seed_array()
{
	if (g_seed_array) {
		free(g_seed_array);
		g_seed_array = 0;
	}
	g_seed_count = 0;
}

// Assembly:
movq 0xcb79(%rip), %rdi      # 0x18618
testq %rdi, %rdi
je 0xbab9
pushq %rax
callq 0x22c0
movq $0x0, 0xcb63(%rip) # 0x18618
addq $0x8, %rsp
movl $0x0, 0xcb5d(%rip)      # 0x18620
retq
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_request.c
// Function: cl_get_node_info
int
cl_get_node_info(const char* node_name, struct sockaddr_in* sa_in, cl_node_info* node_info)
{
	if (g_shared_memory) {
		shm_ninfo* shared = cl_shm_find_node_from_name(node_name);

		if (shared) {
			// cf_debug("Use shared memory for node info.");
			cl_shm_node_lock(shared);
			cl_strncpy(node_info->node_name, shared->node_name, NODE_NAME_SIZE);
			node_info->partition_generation = shared->partition_generation;
			node_info->values = strdup(shared->services);
			node_info->services = node_info->values;
			node_info->dun = shared->dun;
			cl_shm_node_unlock(shared);
			return 0;
		}
	}
	// cf_debug("Issue request for node info.");
	return cl_request_node_info(sa_in, node_info);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0xcacd(%rip), %rax      # 0x185d8
movq %rdx, %rbx
movq %rsi, %r15
cmpb $0x1, (%rax)
jne 0xbb8e
callq 0xb981
testq %rax, %rax
je 0xbb8e
movq %rax, %rdi
movq %rax, %r14
callq 0xb90b
movb 0x70(%r14), %cl
leaq 0x8(%rbx), %rax
testb %cl, %cl
je 0xbb54
xorl %edx, %edx
movb %cl, (%rax,%rdx)
leaq 0x1(%rdx), %rsi
movb 0x71(%r14,%rdx), %cl
testb %cl, %cl
je 0xbb51
cmpl $0x12, %edx
movq %rsi, %rdx
jb 0xbb39
addq %rsi, %rax
movb $0x0, (%rax)
movq %r14, %rdi
movl 0x6c(%r14), %eax
addq $0x84, %rdi
movl %eax, 0x28(%rbx)
callq 0x24f0
movq %rax, (%rbx)
movq %rax, 0x20(%rbx)
movq %r14, %rdi
movb 0x2f9067(%r14), %al
movb %al, 0x2c(%rbx)
callq 0xb96d
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xbb9e
// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/src/cl_request.c
// Function: cl_request_node_info
int
cl_request_node_info(struct sockaddr_in* sa_in, cl_node_info* node_info)
{
	node_info->node_name[0] = 0;
	node_info->partition_generation = 0;
	node_info->services = 0;
	node_info->dun = false;

	if (citrusleaf_info_host_limit(sa_in, "node\npartition-generation\nservices", &node_info->values, INFO_TIMEOUT_MS, false, 10000) != 0) {
		node_info->dun = true;
		return -1;
	}

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

	while ((p = get_name_value(p, &name, &value)) != 0) {
		if (strcmp(name, "node") == 0) {
			cl_strncpy(node_info->node_name, value, NODE_NAME_SIZE);
		}
		else if (strcmp(name, "partition-generation") == 0) {
			node_info->partition_generation = atoi(value);
		}
		else if (strcmp(name, "services") == 0) {
			node_info->services = value;
		}
		else {
			cf_warn("Invalid info name %s", name);
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
xorl %ebp, %ebp
movl $0x2710, %r9d           # imm = 0x2710
movl $0x12c, %ecx            # imm = 0x12C
xorl %r8d, %r8d
movb %bpl, 0x8(%rsi)
movl $0x0, 0x28(%rsi)
movq $0x0, 0x20(%rsi)
movb %bpl, 0x2c(%rsi)
leaq 0x4ae3(%rip), %rsi      # 0x106bd
movq %rbx, %rdx
callq 0xea49
testl %eax, %eax
je 0xbbf4
movb $0x1, 0x2c(%rbx)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0xbcf5
movq (%rbx), %r13
movb (%r13), %al
testb %al, %al
je 0xbcf5
leaq 0x8(%rbx), %r15
leaq 0x42be(%rip), %r14      # 0xfecc
movq %r13, %r12
xorl %ebp, %ebp
cmpb $0x9, %al
je 0xbc25
movzbl %al, %ecx
testl %ecx, %ecx
je 0xbc37
cmpl $0xa, %ecx
jne 0xbc2e
jmp 0xbc37
leaq 0x1(%r13), %rbp
movb $0x0, (%r13)
movb 0x1(%r13), %al
incq %r13
jmp 0xbc13
testq %rbp, %rbp
cmoveq %r13, %rbp
cmpb $0xa, %al
jne 0xbc4a
movb $0x0, (%r13)
incq %r13
movq %r12, %rdi
movq %r14, %rsi
callq 0x2350
testl %eax, %eax
je 0xbcaa
movq %r12, %rdi
leaq 0x4a7d(%rip), %rsi      # 0x106e0
callq 0x2350
testl %eax, %eax
je 0xbcd6
movq %r12, %rdi
leaq 0x4a61(%rip), %rsi      # 0x106d7
callq 0x2350
testl %eax, %eax
je 0xbce3
leaq 0xa642(%rip), %rax      # 0x162c8
cmpl $0x0, (%rax)
jle 0xbce7
leaq 0xa63e(%rip), %rax      # 0x162d0
movl $0x1, %edi
leaq 0x4a57(%rip), %rsi      # 0x106f5
movq %r12, %rdx
movq (%rax), %rcx
xorl %eax, %eax
callq *%rcx
jmp 0xbce7
movb (%rbp), %al
movq %r15, %rcx
testb %al, %al
je 0xbcd1
xorl %edx, %edx
movb %al, (%r15,%rdx)
leaq 0x1(%rdx), %rcx
movb 0x1(%rbp,%rdx), %al
testb %al, %al
je 0xbcce
cmpl $0x12, %edx
movq %rcx, %rdx
jb 0xbcb6
addq %r15, %rcx
movb $0x0, (%rcx)
jmp 0xbce7
movq %rbp, %rdi
callq 0x2440
movl %eax, 0x28(%rbx)
jmp 0xbce7
movq %rbp, 0x20(%rbx)
movb (%r13), %al
testb %al, %al
jne 0xbc0e
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xc8b3(%rip), %rax      # 0x185d8
movq %rdx, %rbx
movq %rsi, %r15
cmpb $0x1, (%rax)
jne 0xbde7
callq 0xb981
testq %rax, %rax
je 0xbde7
movq %rax, %rdi
movq %rax, %r14
callq 0xb90b
leaq 0x1065(%r14), %rdi
movq %rdi, (%rsp)
callq 0x20e0
movq %r14, %r15
movq %rax, %r13
addq $0x17d066, %r15         # imm = 0x17D066
movq %r15, %rdi
callq 0x20e0
movq %rax, %rbp
leal 0x2(%rax,%r13), %eax
movslq %eax, %rdi
callq 0x22e0
movq (%rsp), %rsi
movslq %r13d, %r13
movq %rax, %rdi
movq %rax, (%rbx)
movq %rax, %r12
movq %rax, 0x8(%rbx)
movq %r13, %rdx
callq 0x21b0
leaq (%r12,%r13), %rax
leaq 0x1(%r12,%r13), %rdi
movq %r15, %rsi
xorl %r12d, %r12d
movq %rax, (%rsp)
xorl %eax, %eax
movb %al, -0x1(%rdi)
movq %rdi, 0x10(%rbx)
movslq %ebp, %rbx
movq %rbx, %rdx
callq 0x21b0
movq (%rsp), %rax
movq %r14, %rdi
movb %r12b, 0x1(%rbx,%rax)
callq 0xb96d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xbe00
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %eax, %eax
movq %rsi, %rbx
movl $0x1e8480, %r9d         # imm = 0x1E8480
movl $0x12c, %ecx            # imm = 0x12C
xorl %r8d, %r8d
movq %rax, 0x10(%rsi)
movq %rax, 0x8(%rsi)
leaq 0x48dd(%rip), %rsi      # 0x1070a
movq %rbx, %rdx
callq 0xea49
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0xbf02
movq (%rbx), %rbp
movl $0x0, %eax
movb (%rbp), %cl
testb %cl, %cl
je 0xbf02
leaq 0x8(%rbx), %r12
leaq 0x48b6(%rip), %r14      # 0x10718
movq %rbp, %r13
xorl %r15d, %r15d
cmpb $0x9, %cl
je 0xbe7b
movzbl %cl, %eax
testl %eax, %eax
je 0xbe8b
cmpl $0xa, %eax
jne 0xbe83
jmp 0xbe8b
leaq 0x1(%rbp), %r15
movb $0x0, (%rbp)
movb 0x1(%rbp), %cl
incq %rbp
jmp 0xbe68
testq %r15, %r15
cmoveq %rbp, %r15
cmpb $0xa, %cl
jne 0xbe9e
movb $0x0, (%rbp)
incq %rbp
movq %r13, %rdi
movq %r14, %rsi
callq 0x2350
testl %eax, %eax
je 0xbeeb
movq %r13, %rdi
leaq 0x4870(%rip), %rsi      # 0x10727
callq 0x2350
testl %eax, %eax
je 0xbef1
leaq 0xa401(%rip), %rax      # 0x162c8
cmpl $0x0, (%rax)
jle 0xbef5
leaq 0xa3fd(%rip), %rax      # 0x162d0
movl $0x1, %edi
leaq 0x4856(%rip), %rsi      # 0x10735
movq %r13, %rdx
movq (%rax), %rcx
xorl %eax, %eax
callq *%rcx
jmp 0xbef5
movq %r15, (%r12)
jmp 0xbef5
movq %r15, 0x10(%rbx)
movb (%rbp), %cl
testb %cl, %cl
jne 0xbe62
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
leaq 0xc6ae(%rip), %rax      # 0x185d8
movq %rsi, %rbx
movq %rdi, %r15
cmpb $0x1, (%rax)
jne 0xbf75
movq %r15, %rdi
callq 0xb9dc
testq %rax, %rax
je 0xbf75
movq %rax, %rdi
movq %rax, %r14
callq 0xb90b
movb 0x70(%r14), %al
testb %al, %al
je 0xbf85
xorl %ecx, %ecx
movb %al, (%rbx,%rcx)
leaq 0x1(%rcx), %rdx
movb 0x71(%r14,%rcx), %al
testb %al, %al
je 0xbf6f
cmpl $0x12, %ecx
movq %rdx, %rcx
jb 0xbf57
movb $0x0, (%rbx,%rdx)
jmp 0xbf88
movq %r15, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xbf98
movb $0x0, (%rbx)
movq %r14, %rdi
callq 0xb96d
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movb $0x0, (%rsi)
leaq 0x3f1c(%rip), %rsi      # 0xfecc
movq %rsp, %rdx
movl $0x12c, %ecx            # imm = 0x12C
xorl %r8d, %r8d
callq 0xea44
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0xc09f
movq (%rsp), %r14
movb (%r14), %al
testb %al, %al
je 0xc095
leaq 0xa2e3(%rip), %rbp      # 0x162c8
leaq 0x3ee0(%rip), %r15      # 0xfecc
movq %r14, %r13
xorl %r12d, %r12d
cmpb $0x9, %al
je 0xc004
movzbl %al, %ecx
testl %ecx, %ecx
je 0xc015
cmpl $0xa, %ecx
jne 0xc00c
jmp 0xc015
leaq 0x1(%r14), %r12
movb $0x0, (%r14)
movb 0x1(%r14), %al
incq %r14
jmp 0xbff2
testq %r12, %r12
cmoveq %r14, %r12
cmpb $0xa, %al
jne 0xc027
movb $0x0, (%r14)
incq %r14
movq %r13, %rdi
movq %r15, %rsi
callq 0x2350
testl %eax, %eax
je 0xc05b
cmpl $0x0, (%rbp)
jle 0xc086
leaq 0xa28d(%rip), %rax      # 0x162d0
movl $0x1, %edi
leaq 0x46ff(%rip), %rsi      # 0x1074e
movq %r13, %rdx
movq (%rax), %rcx
xorl %eax, %eax
callq *%rcx
jmp 0xc086
movb (%r12), %al
movq %rbx, %rcx
testb %al, %al
je 0xc083
xorl %edx, %edx
movb %al, (%rbx,%rdx)
leaq 0x1(%rdx), %rcx
movb 0x1(%r12,%rdx), %al
testb %al, %al
je 0xc080
cmpl $0x12, %edx
movq %rcx, %rdx
jb 0xc068
addq %rbx, %rcx
movb $0x0, (%rcx)
movb (%r14), %al
testb %al, %al
jne 0xbfec
movq (%rsp), %r14
movq %r14, %rdi
callq 0x22c0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xc51f(%rip), %rax      # 0x185d8
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x1, (%rax)
jne 0xc0db
xorl %eax, %eax
callq 0xb976
testl %eax, %eax
jle 0xc0db
movl %eax, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc0ed
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl $0x0, (%rsi)
leaq 0x465b(%rip), %rsi      # 0x10763
movq %rsp, %rdx
movl $0x12c, %ecx            # imm = 0x12C
xorl %r8d, %r8d
callq 0xea44
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0xc1d2
movq (%rsp), %r14
movb (%r14), %al
testb %al, %al
je 0xc1c8
leaq 0xa18b(%rip), %r12      # 0x162c8
leaq 0x461f(%rip), %r15      # 0x10763
movq %r14, %r13
xorl %ebp, %ebp
cmpb $0x9, %al
je 0xc15b
movzbl %al, %ecx
testl %ecx, %ecx
je 0xc16c
cmpl $0xa, %ecx
jne 0xc163
jmp 0xc16c
leaq 0x1(%r14), %rbp
movb $0x0, (%r14)
movb 0x1(%r14), %al
incq %r14
jmp 0xc149
testq %rbp, %rbp
cmoveq %r14, %rbp
cmpb $0xa, %al
jne 0xc17e
movb $0x0, (%r14)
incq %r14
movq %r13, %rdi
movq %r15, %rsi
callq 0x2350
testl %eax, %eax
je 0xc1b3
cmpl $0x0, (%r12)
jle 0xc1bd
leaq 0xa135(%rip), %rax      # 0x162d0
movl $0x1, %edi
leaq 0x45c7(%rip), %rsi      # 0x1076e
movq %r13, %rdx
movq (%rax), %rcx
xorl %eax, %eax
callq *%rcx
jmp 0xc1bd
movq %rbp, %rdi
callq 0x2440
movl %eax, (%rbx)
movb (%r14), %al
testb %al, %al
jne 0xc144
movq (%rsp), %r14
movq %r14, %rdi
callq 0x22c0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)