// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/dynamodb/dynamodb_kv.c
// Function: dynamodb_kv_getc
char *
dynamodb_kv_getc(const char * table, const char * key)
{
	/**
	 * The body of a strongly consistent GetItem request (with spaces
	 * added) is:
	 * { "ConsistentRead": true,
	 *   "TableName": "TABLE",
	 *   "Key": {
	 *     "K": { "S": "KEY" }
	 *   },
	 *   "ReturnConsumedCapacity": "TOTAL"
	 * }
	 */
	const char * s1 = "{\"ConsistentRead\":true,\"TableName\":\"";
	const char * s2 = "\",\"Key\":{\"K\":{\"S\":\"";
	const char * s3 = "\"}},\"ReturnConsumedCapacity\":\"TOTAL\"}";
	size_t slen = strlen(s1) + strlen(table) + strlen(s2) + strlen(key) +
	    strlen(s3);
	size_t spos = 0;
	char * s;

	/* Allocate request string. */
	if ((s = malloc(slen + 1)) == NULL)
		goto done;

	/* Construct the request, piece by piece. */
	COPYANDINCR(s, spos, s1);
	COPYANDINCR(s, spos, table);
	COPYANDINCR(s, spos, s2);
	COPYANDINCR(s, spos, key);
	COPYANDINCR(s, spos, s3);
	s[spos] = '\0';

	/* Check that we got the buffer size right. */
	assert(slen == spos);

done:
	/* Return string (or NULL if allocation failed). */
	return (s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x16c7a(%rip), %rax     # 0x1e814
movq %rax, -0x18(%rbp)
leaq 0x16c29(%rip), %rax     # 0x1e7ce
movq %rax, -0x20(%rbp)
leaq 0x169f7(%rip), %rax     # 0x1e5a7
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x31a0
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
callq 0x31a0
movq %rax, %rcx
movq -0x60(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rdi
callq 0x31a0
movq %rax, %rcx
movq -0x58(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x31a0
movq %rax, %rcx
movq -0x50(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rdi
callq 0x31a0
movq %rax, %rcx
movq -0x48(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x30(%rbp), %rdi
addq $0x1, %rdi
callq 0x34c0
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x7c41
jmp 0x7dde
jmp 0x7c43
movq -0x40(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rdi
callq 0x31a0
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq %rax, %rdx
callq 0x32c0
movq -0x18(%rbp), %rdi
callq 0x31a0
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x7c83
movq -0x40(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rdi
callq 0x31a0
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq %rax, %rdx
callq 0x32c0
movq -0x8(%rbp), %rdi
callq 0x31a0
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x7cc3
movq -0x40(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x20(%rbp), %rdi
callq 0x31a0
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq %rax, %rdx
callq 0x32c0
movq -0x20(%rbp), %rdi
callq 0x31a0
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x7d0f
movq -0x40(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rdi
callq 0x31a0
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq %rax, %rdx
callq 0x32c0
movq -0x10(%rbp), %rdi
callq 0x31a0
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x7d5b
movq -0x40(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x28(%rbp), %rdi
callq 0x31a0
movq -0xb0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
movq %rax, %rdx
callq 0x32c0
movq -0x28(%rbp), %rdi
callq 0x31a0
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x7dbd
jmp 0x7ddc
leaq 0x16809(%rip), %rdi     # 0x1e5cd
leaq 0x1680f(%rip), %rsi     # 0x1e5da
movl $0x11c, %edx            # imm = 0x11C
leaq 0x16a62(%rip), %rcx     # 0x1e839
callq 0x3240
jmp 0x7dde
movq -0x40(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax,%rax)