// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/tests/key_c/src/main.c
// Function: test_one_key
int 
test_one_key(void)
{
	cl_cluster *asc;
	asc = citrusleaf_cluster_create();
	citrusleaf_cluster_follow(asc, false); // just this host!
	citrusleaf_cluster_add_host(asc, g_config.host, g_config.port,0);

	// Create a key for accessing
	cl_object o_key;
	citrusleaf_object_init_str(&o_key,"key");
	
	// set a value
	cl_bin values[1];
	strcpy(values[0].bin_name, g_config.bin);
	citrusleaf_object_init_str(&values[0].object, TEST_STRING);
	
	citrusleaf_put(asc, g_config.ns, g_config.table, &o_key, values, 1, 0);

	// now let's pull it out again
	memset(values, 0, sizeof(values));
	strcpy(values[0].bin_name, g_config.bin);

	citrusleaf_get(asc, g_config.ns, g_config.table, &o_key, values, 1, 0, NULL);
	
	if (values[0].object.type != CL_STR) {
		fprintf(stderr, "Test failed, type in correct, expected %d received %d\n",
			(int)CL_STR, (int)values[0].object.type);
		return(-1);
	}
	
	if (values[0].object.sz != strlen(TEST_STRING)) {
		fprintf(stderr, "Test failed, length incorrect, got %d expected %d\n",
			(int) values[0].object.sz, (int) strlen(TEST_STRING));
		return(-1);
	}
		
	if (strcmp(values[0].object.u.str, TEST_STRING) != 0) {
		fprintf(stderr, "Test failed, string incorrect, got %s expected %s\n",
			values[0].object.u.str, TEST_STRING);
		return(-1);
	}
		
	// have to hand back any possible malloced memory
	citrusleaf_object_free(&values[0].object);

	citrusleaf_cluster_destroy(asc);
	
	fprintf(stderr, "TEST SUCCESS\n");
	return(0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
callq 0x8252
movq %rax, %rdi
xorl %esi, %esi
movq %rax, %rbx
xorl %r13d, %r13d
callq 0x91f2
movq 0x19064(%rip), %rsi     # 0x1c330
movswl 0x19065(%rip), %edx     # 0x1c338
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x8510
leaq 0x40(%rsp), %r15
leaq 0xeee0(%rip), %rsi      # 0x121c9
movq %r15, %rdi
callq 0x5dcd
movq 0x19058(%rip), %rsi     # 0x1c350
movq %rsp, %r12
movq %r12, %rdi
callq 0x2210
leaq 0x20(%rsp), %r14
leaq 0xeebe(%rip), %rsi      # 0x121cd
movq %r14, %rdi
callq 0x5dcd
movq 0x19022(%rip), %rsi     # 0x1c340
movq 0x19023(%rip), %rdx     # 0x1c348
subq $0x8, %rsp
movq %r15, %rcx
movq %rbx, %rdi
movq %r12, %r8
movl $0x1, %r9d
pushq %r13
callq 0x7520
addq $0x10, %rsp
movq 0x19006(%rip), %rsi     # 0x1c350
xorps %xmm0, %xmm0
movq %r12, %rdi
movaps %xmm0, -0x20(%r14)
movaps %xmm0, -0x10(%r14)
movaps %xmm0, (%r14)
movaps %xmm0, 0x10(%r14)
callq 0x2210
movq 0x18fd1(%rip), %rsi     # 0x1c340
movq 0x18fd2(%rip), %rdx     # 0x1c348
movq %r15, %rcx
movq %rbx, %rdi
movq %r12, %r8
movl $0x1, %r9d
pushq %r13
pushq $0x0
callq 0x6df7
addq $0x10, %rsp
movl (%r14), %ecx
cmpl $0x3, %ecx
jne 0x33cc
movq 0x28(%rsp), %rdx
cmpq $0x5, %rdx
jne 0x33e1
movq 0x30(%rsp), %r15
leaq 0xee1c(%rip), %rsi      # 0x121cd
movq %r15, %rdi
callq 0x2360
testl %eax, %eax
jne 0x3411
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2924
xorl %eax, %eax
jmp 0x3403
movq 0x16c0d(%rip), %rax     # 0x19fe0
leaq 0xedf9(%rip), %rsi      # 0x121d3
movl $0x3, %edx
jmp 0x33f4
movq 0x16bf8(%rip), %rax     # 0x19fe0
leaq 0xee1b(%rip), %rsi      # 0x1220a
movl $0x5, %ecx
movq (%rax), %rdi
xorl %eax, %eax
callq 0x2390
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x16bc8(%rip), %rax     # 0x19fe0
leaq 0xee1e(%rip), %rsi      # 0x1223d
leaq 0xeda7(%rip), %rcx      # 0x121cd
movq %r15, %rdx
movq (%rax), %rdi
xorl %eax, %eax
callq 0x2390
jmp 0x33fe