// File: /workspace/github_c_makefile_star2_O3/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
leaq 0xc(%rsp), %rbx
movq %rdx, %r12
movq %rsi, %r14
leaq 0x10(%rsp), %rdx
movl %r9d, %r13d
movl %r8d, %ebp
movq %rdi, %r15
movq %rbx, %rsi
movq $0x0, (%rdx)
movl $0x0, (%rbx)
callq 0x63d0
movl (%rbx), %esi
testl %esi, %esi
je 0xd4f8
movl $0x18, %edi
xorl %edx, %edx
callq 0x6780
testq %rax, %rax
je 0xd5ee
movq %rax, %rcx
movq 0x98(%rsp), %rax
movq %rcx, 0x18(%rsp)
testq %rax, %rax
je 0xd526
cmpb $0x1, 0x8(%rax)
jne 0xd526
movq 0xdaf5(%rip), %rax      # 0x1afc8
cmpl $0x0, (%rax)
js 0xd5dd
movq 0xdabd(%rip), %rax      # 0x1afa0
leaq 0x764e(%rip), %rsi      # 0x14b38
xorl %edi, %edi
movq (%rax), %rcx
xorl %eax, %eax
callq *%rcx
jmp 0xd5dd
movq 0xdac9(%rip), %rax      # 0x1afc8
cmpl $0x0, (%rax)
js 0xd61f
movq 0xda91(%rip), %rax      # 0x1afa0
leaq 0x75a6(%rip), %rsi      # 0x14abc
xorl %edi, %edi
xorl %ebx, %ebx
movq (%rax), %rcx
xorl %eax, %eax
callq *%rcx
jmp 0xd621
cmpl $0x0, 0xc(%rsp)
jle 0xd5dd
movl %r13d, %esi
movzbl 0x80(%rsp), %edi
movq 0x10(%rsp), %r13
movl %ebp, %r8d
movq %r12, %rcx
movq %r14, %rdx
movq %r15, %rbx
xorl %ebp, %ebp
movzbl %sil, %esi
movq %rsi, 0x20(%rsp)
movq %rdi, 0x28(%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 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 0x6a90
incl %ebp
addq $0x14, %r13
movq 0x98(%rsp), %rax
movq %r15, %rdx
movq %r14, %rcx
movl %r12d, %r8d
cmpl 0xc(%rsp), %ebp
jl 0xd55d
movq 0x10(%rsp), %rdi
callq 0x6070
movq 0x18(%rsp), %rbx
jmp 0xd621
movq 0xd9d3(%rip), %rax      # 0x1afc8
cmpl $0x0, (%rax)
js 0xd615
movq 0xd99f(%rip), %rax      # 0x1afa0
leaq 0x74e5(%rip), %rsi      # 0x14aed
xorl %edi, %edi
movq (%rax), %rcx
movl 0xc(%rsp), %edx
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
nop