// File: /workspace/github_c_makefile_star2_O1/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
movl %r9d, %r13d
movl %r8d, %ebp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
leaq 0x10(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0xc(%rsp), %rbx
movl $0x0, (%rbx)
movq %rbx, %rsi
callq 0x63d0
movl (%rbx), %esi
testl %esi, %esi
je 0xd7f2
movl $0x18, %edi
xorl %edx, %edx
callq 0x6780
testq %rax, %rax
je 0xd8e8
movq %rax, %rcx
movq 0x98(%rsp), %rax
testq %rax, %rax
movq %rcx, 0x18(%rsp)
je 0xd820
cmpb $0x1, 0x8(%rax)
jne 0xd820
movq 0xd7fb(%rip), %rax      # 0x1afc8
cmpl $0x0, (%rax)
js 0xd8d7
movq 0xd7c3(%rip), %rax      # 0x1afa0
movq (%rax), %rcx
leaq 0x7331(%rip), %rsi      # 0x14b18
xorl %edi, %edi
xorl %eax, %eax
callq *%rcx
jmp 0xd8d7
movq 0xd7cf(%rip), %rax      # 0x1afc8
cmpl $0x0, (%rax)
js 0xd919
movq 0xd797(%rip), %rax      # 0x1afa0
movq (%rax), %rcx
leaq 0x7289(%rip), %rsi      # 0x14a9c
xorl %ebx, %ebx
xorl %edi, %edi
xorl %eax, %eax
callq *%rcx
jmp 0xd91b
cmpl $0x0, 0xc(%rsp)
jle 0xd8d7
movl %ebp, %r8d
movq %r12, %rcx
movq %r14, %rdx
movq %r15, %rbx
xorl %ebp, %ebp
movl %r13d, %esi
movq 0x10(%rsp), %r13
movzbl 0x80(%rsp), %edi
movq %rdi, 0x28(%rsp)
movzbl %sil, %esi
movq %rsi, 0x20(%rsp)
subq $0x8, %rsp
movq %rbx, %rdi
movq %r13, %rsi
movq %rdx, %r15
movq %rcx, %r14
movl %r8d, %r12d
movl %r8d, %r9d
pushq %rax
pushq 0xa0(%rsp)
pushq 0xa0(%rsp)
pushq 0x48(%rsp)
pushq 0x48(%rsp)
callq 0x63e0
addq $0x30, %rsp
movl %eax, 0x44(%rsp)
movq (%r13), %rax
movq 0x8(%r13), %rcx
movq %rax, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movl 0x10(%r13), %eax
movl %eax, 0x40(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x6a90
movq %r15, %rdx
movq %r14, %rcx
movl %r12d, %r8d
movq 0x98(%rsp), %rax
addq $0x14, %r13
incl %ebp
cmpl 0xc(%rsp), %ebp
jl 0xd857
movq 0x10(%rsp), %rdi
callq 0x6070
movq 0x18(%rsp), %rbx
jmp 0xd91b
movq 0xd6d9(%rip), %rax      # 0x1afc8
cmpl $0x0, (%rax)
js 0xd90f
movq 0xd6a5(%rip), %rax      # 0x1afa0
movq (%rax), %rcx
movl 0xc(%rsp), %edx
leaq 0x71c4(%rip), %rsi      # 0x14acd
xorl %edi, %edi
xorl %eax, %eax
callq *%rcx
movq 0x10(%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
nopl (%rax)