// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x88, %rsp
callq 0xbbf0
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdi
xorl %esi, %esi
callq 0xcff0
movq 0x78(%rsp), %rdi
movq 0x22857(%rip), %rsi     # 0x25330
movl 0x22859(%rip), %eax     # 0x25338
xorl %ecx, %ecx
movswl %ax, %edx
callq 0xc070
leaq 0x58(%rsp), %rdi
leaq 0x196b8(%rip), %rsi     # 0x1c1ad
callq 0x72b0
leaq 0x10(%rsp), %rdi
movq 0x2284a(%rip), %rsi     # 0x25350
callq 0x2240
leaq 0x10(%rsp), %rdi
addq $0x20, %rdi
leaq 0x19696(%rip), %rsi     # 0x1c1b1
callq 0x72b0
movq 0x78(%rsp), %rdi
movq 0x22814(%rip), %rsi     # 0x25340
movq 0x22815(%rip), %rdx     # 0x25348
leaq 0x10(%rsp), %r8
leaq 0x58(%rsp), %rcx
movl $0x1, %r9d
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0x9f00
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x2150
leaq 0x10(%rsp), %rdi
movq 0x227e1(%rip), %rsi     # 0x25350
callq 0x2240
movq 0x78(%rsp), %rdi
movq 0x227c0(%rip), %rsi     # 0x25340
movq 0x227c1(%rip), %rdx     # 0x25348
leaq 0x10(%rsp), %r8
leaq 0x58(%rsp), %rcx
movl $0x1, %r9d
xorl %eax, %eax
xorl %eax, %eax
movl $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x9130
cmpl $0x3, 0x30(%rsp)
je 0x2be8
movq 0x20422(%rip), %rax     # 0x22fe0
movq (%rax), %rdi
movl 0x30(%rsp), %ecx
leaq 0x195eb(%rip), %rsi     # 0x1c1b7
movl $0x3, %edx
movb $0x0, %al
callq 0x23b0
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
jmp 0x2ca6
cmpq $0x5, 0x38(%rsp)
je 0x2c24
movq 0x203e9(%rip), %rax     # 0x22fe0
movq (%rax), %rdi
movq 0x38(%rsp), %rax
movl %eax, %edx
leaq 0x195e6(%rip), %rsi     # 0x1c1ee
movl $0x5, %ecx
movb $0x0, %al
callq 0x23b0
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
jmp 0x2ca6
movq 0x40(%rsp), %rdi
leaq 0x19581(%rip), %rsi     # 0x1c1b1
callq 0x2380
cmpl $0x0, %eax
je 0x2c6b
movq 0x2039f(%rip), %rax     # 0x22fe0
movq (%rax), %rdi
movq 0x40(%rsp), %rdx
leaq 0x195d1(%rip), %rsi     # 0x1c221
leaq 0x1955a(%rip), %rcx     # 0x1c1b1
movb $0x0, %al
callq 0x23b0
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
jmp 0x2ca6
leaq 0x10(%rsp), %rdi
addq $0x20, %rdi
callq 0x74b0
movq 0x78(%rsp), %rdi
callq 0xc4e0
movq 0x20356(%rip), %rax     # 0x22fe0
movq (%rax), %rdi
leaq 0x195c0(%rip), %rsi     # 0x1c254
movb $0x0, %al
callq 0x23b0
movl $0x0, 0x84(%rsp)
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
nop