// File: /workspace/github_c_makefile_star2_O2/sharpyfox[P]citrusleaf-client/src/cl_scan.c
// Function: citrusleaf_scan_all_nodes
cf_vector *
citrusleaf_scan_all_nodes (cl_cluster *asc, char *ns, char *set, cl_bin *bins, int n_bins, bool nobindata, uint8_t scan_pct,
		citrusleaf_get_many_cb cb, void *udata, cl_scan_parameters *scan_param)
{
	char *node_names = NULL;	
	int	n_nodes = 0;
	cl_cluster_get_node_names(asc, &n_nodes, &node_names);

	if (n_nodes == 0) {
		cf_error("citrusleaf scan all nodes: don't have any nodes?");
		return NULL;
	}

	cf_vector *rsp_v = cf_vector_create(sizeof(cl_node_response), n_nodes, 0);
	if (rsp_v == NULL) {
		cf_error("citrusleaf scan all nodes: cannot allocate for response array for %d nodes", n_nodes);
		free(node_names);
		return NULL;
	}
	 
	if (scan_param && scan_param->concurrent_nodes) {
		cf_error("citrusleaf scan all nodes: concurrent node scanning not yet supported");
	} else {
		char *nptr = node_names;
		for (int i=0;i< n_nodes; i++) {
			cl_rv r = citrusleaf_scan_node (asc, nptr, ns, set, bins, n_bins, nobindata, scan_pct,
				cb, udata, scan_param);
			cl_node_response resp_s;
			resp_s.node_response = r;
			memcpy(resp_s.node_name,nptr,NODE_NAME_SIZE);			
			cf_vector_append(rsp_v, (void *)&resp_s);
			nptr+=NODE_NAME_SIZE;					
		}
	}
	free(node_names);
	return rsp_v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, 0x28(%rsp)
leaq 0x8(%rsp), %rdx
leaq 0x4(%rsp), %rbx
movq %rsi, 0x20(%rsp)
movl %r9d, %r15d
movl %r8d, 0x14(%rsp)
movq %rdi, %r12
andq $0x0, (%rdx)
andl $0x0, (%rbx)
movq %rbx, %rsi
callq 0x6400
movl (%rbx), %esi
testl %esi, %esi
je 0xcfaf
pushq $0x18
popq %rdi
xorl %edx, %edx
callq 0x67d0
testq %rax, %rax
je 0xd061
movq 0x98(%rsp), %rbx
movq %rax, 0x18(%rsp)
testq %rbx, %rbx
je 0xcfdd
cmpb $0x1, 0x8(%rbx)
jne 0xcfdd
movq 0xd049(%rip), %rax      # 0x19fc8
cmpl $0x0, (%rax)
js 0xcf9b
movq 0xd015(%rip), %rax      # 0x19fa0
leaq 0x6bb6(%rip), %rsi      # 0x13b48
xorl %edi, %edi
movq (%rax), %rcx
xorl %eax, %eax
callq *%rcx
movq 0x8(%rsp), %rdi
callq 0x6070
movq 0x18(%rsp), %rbx
jmp 0xd094
movq 0xd012(%rip), %rax      # 0x19fc8
cmpl $0x0, (%rax)
js 0xd092
movq 0xcfda(%rip), %rax      # 0x19fa0
leaq 0x6aff(%rip), %rsi      # 0x13acc
xorl %edi, %edi
xorl %ebx, %ebx
movq (%rax), %rcx
xorl %eax, %eax
callq *%rcx
jmp 0xd094
movq 0x8(%rsp), %r13
movzbl 0x80(%rsp), %r14d
xorl %ebp, %ebp
movzbl %r15b, %r15d
cmpl 0x4(%rsp), %ebp
jge 0xcf9b
subq $0x8, %rsp
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rcx
movl 0x1c(%rsp), %r9d
movq %r12, %rdi
movq %r13, %rsi
pushq %rbx
pushq 0xa0(%rsp)
pushq 0xa0(%rsp)
pushq %r14
pushq %r15
callq 0x6410
addq $0x30, %rsp
movl %eax, 0x44(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movq (%r13), %rax
movq 0x8(%r13), %rcx
movq %rax, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movl 0x10(%r13), %eax
movl %eax, 0x40(%rsp)
callq 0x6b20
addq $0x14, %r13
incl %ebp
jmp 0xcff1
movq 0xcf60(%rip), %rax      # 0x19fc8
cmpl $0x0, (%rax)
js 0xd088
movq 0xcf2c(%rip), %rax      # 0x19fa0
leaq 0x6a82(%rip), %rsi      # 0x13afd
xorl %edi, %edi
movq (%rax), %rcx
movl 0x4(%rsp), %edx
xorl %eax, %eax
callq *%rcx
movq 0x8(%rsp), %rdi
callq 0x6070
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop