// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/dynamodb/dynamodb_kv.c
// Function: dynamodb_kv_get
char *
dynamodb_kv_get(const char * table, const char * key)
{
	/**
	 * The body of a GetItem request (with spaces added) is:
	 * { "TableName": "TABLE",
	 *   "Key": {
	 *     "K": { "S": "KEY" }
	 *   },
	 *   "ReturnConsumedCapacity": "TOTAL"
	 * }
	 */
	const char * s1 = "{\"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 0x16c4b(%rip), %rax     # 0x1e575
movq %rax, -0x18(%rbp)
leaq 0x16e99(%rip), %rax     # 0x1e7ce
movq %rax, -0x20(%rbp)
leaq 0x16c67(%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 0x79d1
jmp 0x7b6e
jmp 0x79d3
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 0x7a13
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 0x7a53
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 0x7a9f
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 0x7aeb
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 0x7b4d
jmp 0x7b6c
leaq 0x16a79(%rip), %rdi     # 0x1e5cd
leaq 0x16a7f(%rip), %rsi     # 0x1e5da
movl $0xed, %edx
leaq 0x16c7b(%rip), %rcx     # 0x1e7e2
callq 0x3240
jmp 0x7b6e
movq -0x40(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax,%rax)