LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/utils.c
// Function: parse_querystring
int parse_querystring(const char *query,
	int (*callback)(char *name, char *value, void *state),
	void *state)
{
	char *cpy, *saveptr = NULL;
	char *p;
	char *v;
	int r;

	if (!query || !*query) return 0;

	cpy = strdup(query);

	for (p = strtok_r(cpy, "&", &saveptr);
		p && *p;
		p = strtok_r(NULL, "&", &saveptr)) {

		v = strchr(p, '=');
		if (!v) continue;

		*v = '\0';
		v++;

		urldecode(v);

		if ((r = callback(p, v, state)) != 0) {
			return r;
		}
	}

	free(cpy);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq $0x0, 0x8(%rsp)
xorl %eax, %eax
testq %rdi, %rdi
je 0x5e64
cmpb $0x0, (%rdi)
je 0x5e64
movq %rdx, %r14
movq %rsi, %r15
callq 0x2380
leaq 0x18d6(%rip), %rsi      # 0x76b9
leaq 0x8(%rsp), %rdx
movq %rax, 0x10(%rsp)
movq %rax, %rdi
callq 0x2370
testq %rax, %rax
je 0x5e58
movq %rax, %r12
leaq 0x18b5(%rip), %r13      # 0x76b9
leaq 0x8(%rsp), %rbp
cmpb $0x0, (%r12)
je 0x5e58
movq %r12, %rdi
movl $0x3d, %esi
callq 0x20d0
testq %rax, %rax
je 0x5e43
movq %rax, %rbx
movb $0x0, (%rax)
incq %rbx
movq %rbx, %rdi
callq 0x5bdf
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq *%r15
testl %eax, %eax
jne 0x5e64
xorl %edi, %edi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x2370
movq %rax, %r12
testq %rax, %rax
jne 0x5e09
movq 0x10(%rsp), %rdi
callq 0x2290
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/mleak.c
// Function: mleak_malloc
void *mleak_malloc(size_t size, const char *filename, int line)
{
	struct mleak_mem_t *ent;
	time_t now;
	ent = (struct mleak_mem_t *) malloc(sizeof(struct mleak_mem_t) + size);
	ent->ptr = (void *)(((char *)ent) + sizeof(struct mleak_mem_t));
	ent->size = size;
	ent->filename = filename;
	ent->line = line;
	now = time(NULL);
	strftime(ent->time, sizeof(ent->time), "%Y-%m-%d %H:%M:%S", localtime(&now));
	append_mem_ent(ent);
	return ent->ptr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
addq $0x50, %rdi
callq 0x22e0
movq %rax, %rbx
addq $0x50, %rax
movq %rax, 0x10(%rbx)
movq %r15, 0x18(%rbx)
movq %r14, 0x20(%rbx)
movl %ebp, 0x28(%rbx)
xorl %edi, %edi
callq 0x21e0
movq %rsp, %rdi
movq %rax, (%rdi)
movq %rbx, %r14
addq $0x2c, %r14
callq 0x2160
leaq 0x11b7(%rip), %rdx      # 0x7079
movl $0x20, %esi
movq %r14, %rdi
movq %rax, %rcx
callq 0x2190
movq 0x6417(%rip), %rax      # 0xc2f0
testq %rax, %rax
je 0x5eed
movq %rax, 0x8(%rbx)
movq (%rax), %rcx
movq %rcx, (%rbx)
movq (%rax), %rcx
jmp 0x5efa
movq %rbx, 0x63fc(%rip)      # 0xc2f0
movq %rbx, %rcx
movq %rbx, %rax
movq %rbx, 0x8(%rcx)
movq %rbx, (%rax)
movq 0x10(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/mleak.c
// Function: mleak_free
void mleak_free(void *ptr)
{
    if (!ptr) return;
	struct mleak_mem_t *ent;
	ent = (struct mleak_mem_t *)(((char *)ptr) - sizeof(struct mleak_mem_t));
	remove_mem_ent(ent);
	free(ent);
}

// Assembly:
testq %rdi, %rdi
je 0x5f5e
movq %rdi, %rax
addq $-0x50, %rdi
movq -0x48(%rax), %rcx
cmpq %rdi, %rcx
je 0x5f5f
movq 0x63b6(%rip), %rdx      # 0xc2f0
cmpq %rdi, %rdx
jne 0x5f4a
movq 0x8(%rdx), %rdx
movq %rdx, 0x63a6(%rip)      # 0xc2f0
movq -0x50(%rax), %rdx
movq %rcx, 0x8(%rdx)
movq -0x48(%rax), %rax
movq %rdx, (%rax)
jmp 0x2290
retq
movq $0x0, 0x6386(%rip) # 0xc2f0
jmp 0x2290
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/mleak.c
// Function: mleak_realloc
void* mleak_realloc(void* ptr, size_t size, const char* filename, int line)
{
	void* newptr = mleak_malloc(size, filename, line);
	if (!newptr) return NULL;
	if (ptr) {
		struct mleak_mem_t* ent;
		ent = (struct mleak_mem_t*)(((char*)ptr) - sizeof(struct mleak_mem_t));
		memcpy(newptr, ptr, MIN(size, ent->size));
		mleak_free(ptr);
	}
	return newptr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
movq %rdx, %rsi
movl %ecx, %edx
callq 0x5e74
testq %rax, %rax
je 0x5fb7
movq %rax, %rbx
testq %r14, %r14
je 0x5fb9
movq -0x38(%r14), %rax
cmpq %r15, %rax
cmovbq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21a0
movq %r14, %rdi
callq 0x5f1e
jmp 0x5fb9
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/mleak.c
// Function: mleak_strdup
void* mleak_strdup(const char *s, const char* filename, int line)
{
	int len = strlen(s);
	void* newptr = mleak_malloc(len + 1, filename, line);
	if (!newptr) return NULL;
	memcpy(newptr, s, len + 1);
	return newptr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x20e0
incl %eax
movslq %eax, %r14
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x5e74
testq %rax, %rax
je 0x6005
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x21a0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/mleak.c
// Function: mleak_print_leak
void mleak_print_leak()
{
	struct mleak_mem_t *ent, *p;
	if (!_mem) return;
	ent = _mem;
	do {
		_print(ent->ptr, ent->filename, ent->line, ent->time);
		ent = ent->next;
	} while(ent != _mem);
	ent = _mem;
	do {
		p = ent;
		ent = ent->next;
		free(p);
	} while(ent != _mem);
	_mem = 0;
}

// Assembly:
pushq %rbx
movq 0x62c8(%rip), %rbx      # 0xc2f0
testq %rbx, %rbx
je 0x6072
movq 0x10(%rbx), %rdi
movq 0x20(%rbx), %rsi
movl 0x28(%rbx), %edx
leaq 0x2c(%rbx), %rcx
callq *0x61c6(%rip)           # 0xc208
movq 0x8(%rbx), %rbx
movq 0x62a3(%rip), %rdi      # 0xc2f0
cmpq %rdi, %rbx
jne 0x602d
movq 0x8(%rdi), %rbx
callq 0x2290
movq %rbx, %rdi
cmpq 0x628b(%rip), %rbx      # 0xc2f0
jne 0x6052
movq $0x0, 0x627e(%rip) # 0xc2f0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/dohclient-cache.c
// Function: is_digitstr
static int is_digitstr(const char *s)
{
	const char *p = s;
	while (*p) {
		if (!isdigit(*p))
			return FALSE;
		p++;
	}
	return TRUE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movb (%rdi), %bpl
movl $0x1, %ebx
testb %bpl, %bpl
je 0x6e74
movq %rdi, %r14
callq 0x2230
movq (%rax), %rax
incq %r14
movsbq %bpl, %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x6e72
movb (%r14), %bpl
incq %r14
testb %bpl, %bpl
jne 0x6e5a
jmp 0x6e74
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chbarts[P]aa-tree/aa-test1.c
// Function: main
int main(int argc, char *argv[])
{
    aa *tree;
    FILE *fin;
    int i;

    if ((tree = aa_new(comparator)) == NULL) {
        fprintf(stderr, "aa_new error\n");
        exit(EXIT_FAILURE);
    }

    if (argc == 1) {
        dofile("stdin", stdin, tree);
    } else {
        for (i = 1; i < argc; i++) {
            if ((fin = fopen(argv[i], "rb")) == NULL) {
                handle_ferr(argv[i], "aa-test1");
                continue;
            }

            dofile(argv[i], fin, tree);

            if (fclose(fin) == EOF) {
                handle_ferr(argv[i], "aa-test1");
            }
        }
    }

    aa_print(tree, stdout, print);

    cleanup(tree);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebp
leaq 0xc9(%rip), %rdi        # 0x1d38
callq 0x13f8
testq %rax, %rax
je 0x1d33
movq %rax, %rbx
cmpl $0x1, %ebp
jne 0x1ca0
movq 0x234c(%rip), %rax      # 0x3fd8
movq (%rax), %rsi
leaq 0x427(%rip), %rdi       # 0x20bd
movq %rbx, %rdx
callq 0x1d4f
jmp 0x1cf9
jle 0x1cf9
movl %ebp, %ebp
movl $0x1, %r12d
leaq 0x412(%rip), %r15       # 0x20c3
movq (%r14,%r12,8), %rdi
movq %r15, %rsi
callq 0x10e0
movq (%r14,%r12,8), %rdi
testq %rax, %rax
je 0x1ce5
movq %rax, %r13
movq %rax, %rsi
movq %rbx, %rdx
callq 0x1d4f
movq %r13, %rdi
callq 0x1050
cmpl $-0x1, %eax
jne 0x1cf1
movq (%r14,%r12,8), %rdi
leaq 0x3da(%rip), %rsi       # 0x20c6
callq 0x1140
incq %r12
cmpq %r12, %rbp
jne 0x1cb1
movq 0x22d0(%rip), %rax      # 0x3fd0
movq (%rax), %rsi
leaq 0xca(%rip), %rdx        # 0x1dd4
movq %rbx, %rdi
callq 0x1ad3
movq %rbx, %rdi
callq 0x194e
movq %rbx, %rdi
callq 0x196a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1178
// File: /workspace/github_c_makefile_star2_O1/chbarts[P]aa-tree/aa-test1.c
// Function: dofile
static void dofile(char *fname, FILE * fin, aa * tree)
{
    char *ln;

    while (fggets(&ln, fin) == 0) {
        switch (aa_add(tree, ln, duplicate)) {
        case 0:                /* no error */
            break;
        case 2:                /* memory error */
            free(ln);
            error(tree);
            break;
        default:               /* can't happen */
            fprintf(stderr, "can't happen\n");
            free(ln);
            cleanup(tree);
            exit(EXIT_FAILURE);
            break;
        }
    }

    if (ferror(fin) != 0)
        handle_ferr(fname, "aa-test1");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x8(%rsp), %r12
leaq 0x83(%rip), %r13        # 0x1df4
movq %r12, %rdi
movq %r15, %rsi
callq 0x130c
testl %eax, %eax
jne 0x1da6
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r13, %rdx
callq 0x1420
testl %eax, %eax
je 0x1d71
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
cmpl $0x2, %eax
jne 0x1dcf
callq 0x119d
movq %r15, %rdi
callq 0x1040
testl %eax, %eax
je 0x1dc1
leaq 0x30d(%rip), %rsi       # 0x20c6
movq %r14, %rdi
callq 0x1140
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x11d5
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/perftests/dynamodb_queue/main.c
// Function: donereq
static int
donereq(void * cookie, struct http_response * R, const char * err)
{

	(void)cookie; /* UNUSED */
	(void)err; /* UNUSED */

	/* This request is over. */
	if (--inprogress == 0)
		done = 1;

	/* Print status. */
	printf("HTTP status = %d; ", R->status);

	/* Print the body received. */
	fwrite(R->body, 1, R->bodylen, stdout);
	fprintf(stdout, "\n");

	/* Free the body. */
	free(R->body);

	/* Success! */
	return (0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
decl 0x149b7(%rip)           # 0x18708
jne 0x3d5d
movl $0x1, 0x149a7(%rip)     # 0x18704
movl (%rbx), %esi
leaq 0xd41c(%rip), %rdi      # 0x11182
xorl %eax, %eax
callq 0x3050
movq 0x18(%rbx), %rdx
movq 0x20(%rbx), %rdi
movq 0x1424c(%rip), %r14     # 0x17fc8
movq (%r14), %rcx
movl $0x1, %esi
callq 0x3630
movq (%r14), %rsi
movl $0xa, %edi
callq 0x3480
movq 0x20(%rbx), %rdi
callq 0x3450
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
callq 0x3190
movq %rax, %r12
movq %rbx, %rdi
callq 0x3190
movq %rax, %r13
leaq (%r12,%rax), %rdi
addq $0x47, %rdi
callq 0x34c0
movq %rax, %r14
testq %rax, %rax
je 0x60a5
addq %r12, %r13
addq $0x21, %r13
movabsq $0x223a22656d614e65, %rax # imm = 0x223A22656D614E65
movq %rax, 0x6(%r14)
movabsq $0x4e656c626154227b, %rax # imm = 0x4E656C626154227B
movq %rax, (%r14)
leaq 0xe(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3280
movq %r15, %rdi
callq 0x3190
movq %rax, %r15
movups 0xb7c8(%rip), %xmm0     # 0x117fe
movups %xmm0, 0xe(%r14,%rax)
movl $0x223a2253, 0x1d(%r14,%rax) # imm = 0x223A2253
leaq (%r14,%rax), %r12
addq $0x21, %r12
movq %rbx, %rdi
callq 0x3190
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3280
movq %rbx, %rdi
callq 0x3190
addq %r15, %rax
addq $0x21, %rax
movups 0xb55e(%rip), %xmm0     # 0x115d7
movups %xmm0, (%r14,%rax)
movups 0xb562(%rip), %xmm0     # 0x115e7
movups %xmm0, 0x10(%r14,%rax)
movabsq $0x7d224c41544f5422, %rcx # imm = 0x7D224C41544F5422
movq %rcx, 0x1d(%r14,%rax)
movb $0x0, 0x25(%r14,%rax)
cmpq %rax, %r13
jne 0x60b2
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0xb544(%rip), %rdi      # 0x115fd
leaq 0xb54a(%rip), %rsi      # 0x1160a
leaq 0xb74b(%rip), %rcx      # 0x11812
movl $0xed, %edx
callq 0x3200
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
callq 0x3190
movq %rax, %r12
movq %rbx, %rdi
callq 0x3190
movq %rax, %r13
leaq (%r12,%rax), %rdi
addq $0x5d, %rdi
callq 0x34c0
movq %rax, %r14
testq %rax, %rax
je 0x61c2
addq %r12, %r13
addq $0x37, %r13
movups 0xb73a(%rip), %xmm0     # 0x11854
movups %xmm0, 0x10(%r14)
movups 0xb71e(%rip), %xmm0     # 0x11844
movups %xmm0, (%r14)
movl $0x223a2265, 0x20(%r14) # imm = 0x223A2265
leaq 0x24(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3280
movq %r15, %rdi
callq 0x3190
movq %rax, %r15
movups 0xb6ab(%rip), %xmm0     # 0x117fe
movups %xmm0, 0x24(%r14,%rax)
movl $0x223a2253, 0x33(%r14,%rax) # imm = 0x223A2253
leaq (%r14,%rax), %r12
addq $0x37, %r12
movq %rbx, %rdi
callq 0x3190
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3280
movq %rbx, %rdi
callq 0x3190
addq %r15, %rax
addq $0x37, %rax
movups 0xb441(%rip), %xmm0     # 0x115d7
movups %xmm0, (%r14,%rax)
movups 0xb445(%rip), %xmm0     # 0x115e7
movups %xmm0, 0x10(%r14,%rax)
movabsq $0x7d224c41544f5422, %rcx # imm = 0x7D224C41544F5422
movq %rcx, 0x1d(%r14,%rax)
movb $0x0, 0x25(%r14,%rax)
cmpq %rax, %r13
jne 0x61cf
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0xb427(%rip), %rdi      # 0x115fd
leaq 0xb42d(%rip), %rsi      # 0x1160a
leaq 0xb685(%rip), %rcx      # 0x11869
movl $0x11c, %edx            # imm = 0x11C
callq 0x3200
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/dynamodb/dynamodb_kv.c
// Function: dynamodb_kv_extractv
int
dynamodb_kv_extractv(const uint8_t * inbuf, size_t inlen,
    uint8_t ** outbuf, uint32_t * outlen)
{
	const uint8_t * p = inbuf;
	const uint8_t * end = &inbuf[inlen];
	size_t slen;
	size_t vlen;

	/* If we have no response body, there is no value. */
	if (inbuf == NULL)
		goto novalue;

	/**
	 * We need to locate B64VALUE in the string
	 * {"Item":{"V":{"B":"dmFsdWUK"},"K":{"S":"key"}}}
	 * so we look for the json object associated with "Item"; then look
	 * for the json object associated with "V" inside that; then look
	 * for the json object associated with "B" inside that.
	 */
	p = json_find(p, end, "Item");
	p = json_find(p, end, "V");
	p = json_find(p, end, "B");

	/* We should be pointing at the opening '"' of a string. */
	if (p == end)
		goto novalue;
	if (*p++ != '"')
		goto novalue;

	/* How long is it? */
	for (slen = 0; &p[slen] != end; slen++) {
		if (p[slen] == '"')
			break;
	}

	/* We should have found a terminating '"'. */
	if (&p[slen] == end)
		goto novalue;

	/* Bail if the value of "B" is less than 4 characters. */
	if (slen < 4)
		goto novalue;

	/* Allocate a buffer. */
	if ((*outbuf = malloc((slen / 4) * 3)) == NULL)
		goto err0;

	/* Attempt to parse the base64-encoded data. */
	if (b64decode((const char *)p, slen, *outbuf, &vlen))
		goto novalue1;

	/* Record the size of the returned value. */
	if (vlen >= (uint32_t)(-1))
		goto novalue1;
	*outlen = (uint32_t)vlen;

	/* Success! */
	return (0);

novalue1:
	free(*outbuf);
novalue:
	/* We have no value. */
	*outbuf = NULL;

	/* Success!  (Or at least, no internal error.) */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
testq %rdi, %rdi
je 0x6403
movq %rcx, %r14
movq %rsi, %r12
addq %rdi, %r12
leaq 0xae4d(%rip), %rdx      # 0x1117d
movq %r12, %rsi
callq 0xb438
leaq 0xb592(%rip), %rdx      # 0x118d1
movq %rax, %rdi
movq %r12, %rsi
callq 0xb438
leaq 0xb582(%rip), %rdx      # 0x118d3
movq %rax, %rdi
movq %r12, %rsi
callq 0xb438
cmpq %r12, %rax
je 0x6403
cmpb $0x22, (%rax)
jne 0x6403
leaq 0x1(%rax), %r15
cmpq %r12, %r15
sete %cl
je 0x6380
cmpb $0x22, (%r15)
jne 0x6385
xorl %r13d, %r13d
jmp 0x63ab
addq $0x2, %rax
movq $-0x1, %rdx
movq %rdx, %r13
cmpq %r12, %rax
sete %cl
je 0x63a8
leaq -0x1(%r13), %rdx
cmpb $0x22, (%rax)
leaq 0x1(%rax), %rax
jne 0x6390
negq %r13
cmpq $0x4, %r13
jb 0x6403
testb %cl, %cl
jne 0x6403
movq %r13, %rax
shrq $0x2, %rax
leaq (%rax,%rax,2), %rdi
callq 0x34c0
movq %rax, (%rbx)
testq %rax, %rax
je 0x641a
leaq 0x8(%rsp), %r12
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq %r12, %rcx
callq 0xb313
testl %eax, %eax
setne %cl
movq (%r12), %rax
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
cmpq %rdx, %rax
seta %dl
orb %cl, %dl
je 0x6421
movq (%rbx), %rdi
callq 0x3450
movq $0x0, (%rbx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x640c
movl %eax, (%r14)
jmp 0x640a
nop
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/dynamodb/dynamodb_request_queue.c
// Function: compar
static int
compar(void * cookie, const void * x, const void * y)
{
	const struct request * _x = x;
	const struct request * _y = y;

	(void)cookie; /* UNUSED */

	/* Is one of the requests in progress? */
	if ((_x->timeout_cookie != NULL) && (_y->timeout_cookie == NULL))
		return (1);
	if ((_x->timeout_cookie == NULL) && (_y->timeout_cookie != NULL))
		return (-1);

	/* Is one a higher priority? */
	if (_x->prio > _y->prio)
		return (1);
	if (_x->prio < _y->prio)
		return (-1);

	/* Sort in order of arrival. */
	if (_x->reqnum > _y->reqnum)
		return (1);
	else
		return (-1);
}

// Assembly:
movq 0x58(%rsi), %rax
testq %rax, %rax
je 0x65ed
cmpq $0x0, 0x58(%rdx)
je 0x6625
testq %rax, %rax
jne 0x65fa
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x0, 0x58(%rdx)
je 0x65fa
retq
movl 0x78(%rdx), %ecx
movl $0x1, %eax
cmpl %ecx, 0x78(%rsi)
jg 0x65f9
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jl 0x65f9
movq 0x80(%rdx), %rcx
xorl %eax, %eax
cmpq 0x80(%rsi), %rcx
adcl $-0x1, %eax
orl $0x1, %eax
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/dynamodb/dynamodb_request_queue.c
// Function: dynamodb_request_queue
int
dynamodb_request_queue(struct dynamodb_request_queue * Q, int prio,
    const char * op, const char * body, size_t maxrlen, const char * logstr,
    int (* callback)(void *, struct http_response *, const char *),
    void * cookie)
{
	struct request * R;

	/* Allocate and fill request structure. */
	if ((R = malloc(sizeof(struct request))) == NULL)
		goto err0;
	R->Q = Q;
	R->op = op;
	R->body = (const uint8_t *)body;
	R->bodylen = strlen(body);
	R->maxrlen = maxrlen;
	R->callback = callback;
	R->cookie = cookie;
	R->http_cookie = NULL;
	R->timeout_cookie = NULL;
	R->addrs[0] = NULL;
	R->addrs[1] = NULL;
	R->prio = prio;
	R->reqnum = Q->reqnum++;
	R->rc = 0;
	R->ntries = 0;

	/* Duplicate the additional logging data. */
	if (logstr != NULL) {
		if ((R->logstr = strdup(logstr)) == NULL)
			goto err1;
	} else {
		R->logstr = NULL;
	}

	/* Add the request to the queue. */
	if (ptrheap_add(Q->reqs, R))
		goto err2;

	/* Poke the request queue if necessary. */
	if (poke(Q))
		goto err3;

	/* Success! */
	return (0);

err3:
	ptrheap_delete(Q->reqs, R->rc);
err2:
	free(R->logstr);
err1:
	free(R);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %r8, %r12
movq %rcx, %r15
movq %rdx, %rbp
movl %esi, 0xc(%rsp)
movq %rdi, %r14
movl $0x90, %edi
callq 0x34c0
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x6722
movq %rax, %rbx
movq 0x50(%rsp), %r13
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x3190
movq %rax, 0x18(%rbx)
movq %r12, 0x20(%rbx)
movq %r13, 0x30(%rbx)
movq 0x58(%rsp), %rax
movq %rax, 0x38(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x50(%rbx)
movl 0xc(%rsp), %eax
movl %eax, 0x78(%rbx)
movq 0x78(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x78(%r14)
movq %rax, 0x80(%rbx)
xorl %eax, %eax
movq %rax, 0x88(%rbx)
movq %rax, 0x60(%rbx)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x66f3
callq 0x35e0
movq %rax, 0x28(%rbx)
testq %rax, %rax
jne 0x66fb
jmp 0x6714
movq $0x0, 0x28(%rbx)
movq 0x70(%r14), %rdi
movq %rbx, %rsi
callq 0x8719
testl %eax, %eax
je 0x6734
movq 0x28(%rbx), %rdi
callq 0x3450
movq %rbx, %rdi
callq 0x3450
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r13d, %r13d
cmpq $0x0, 0x60(%r14)
jne 0x6722
leaq 0x114(%rip), %rdi       # 0x6859
xorl %r13d, %r13d
movq %r14, %rsi
xorl %edx, %edx
callq 0x44e4
movq %rax, 0x60(%r14)
testq %rax, %rax
jne 0x6722
movq 0x70(%r14), %rdi
movq 0x88(%rbx), %rsi
callq 0x8842
jmp 0x670b
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/dynamodb/dynamodb_request_queue.c
// Function: dynamodb_request_queue_flush
void
dynamodb_request_queue_flush(struct dynamodb_request_queue * Q)
{
	struct request * R;

	/* Pull requests off the queue until there are none left. */
	while ((R = ptrheap_getmin(Q->reqs)) != NULL) {
		/* Delete it from the queue. */
		ptrheap_deletemin(Q->reqs);

		/* Cancel any in-progress operation. */
		if (R->timeout_cookie != NULL)
			events_timer_cancel(R->timeout_cookie);
		if (R->http_cookie != NULL) {
			http_request_cancel(R->http_cookie);
			sock_addr_free(R->addrs[0]);
			Q->inflight--;
		}

		/* Free the request. */
		free(R->logstr);
		free(R);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x70(%rdi), %rdi
callq 0x881f
testq %rax, %rax
je 0x67d9
movq %rax, %r14
movq 0x70(%rbx), %rdi
callq 0x8a2e
movq 0x58(%r14), %rdi
testq %rdi, %rdi
je 0x679c
callq 0x5349
movq 0x50(%r14), %rdi
testq %rdi, %rdi
je 0x67b7
callq 0x8f5d
movq 0x40(%r14), %rdi
callq 0xc0c7
decq 0x68(%rbx)
movq 0x28(%r14), %rdi
callq 0x3450
movq %r14, %rdi
callq 0x3450
movq 0x70(%rbx), %rdi
callq 0x881f
movq %rax, %r14
testq %rax, %rax
jne 0x6785
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/dynamodb/dynamodb_request_queue.c
// Function: dynamodb_request_queue_free
void
dynamodb_request_queue_free(struct dynamodb_request_queue * Q)
{

	/* Flush the queue. */
	dynamodb_request_queue_flush(Q);

	/* Stop the rate-limiting timer (if any). */
	if (Q->timer_cookie != NULL)
		events_timer_cancel(Q->timer_cookie);

	/* Cancel the immediate callback (if any). */
	if (Q->immediate_cookie != NULL)
		events_immediate_cancel(Q->immediate_cookie);

	/* Free the (now empty) request queue. */
	ptrheap_free(Q->reqs);

	/* Free string allocated by strdup. */
	free(Q->region);

	/* Free the AWS keys. */
	insecure_memzero(Q->key_secret, strlen(Q->key_secret));
	free(Q->key_secret);
	free(Q->key_id);

	/* Free the request queue structure. */
	free(Q);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x676d
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x67fb
callq 0x5349
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x6809
callq 0x45d6
movq 0x70(%rbx), %rdi
callq 0x8a84
movq 0x10(%rbx), %rdi
callq 0x3450
movq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x3190
leaq 0x11daa(%rip), %rcx     # 0x185d8
movq (%rcx), %rcx
movq %r14, %rdi
movq %rax, %rsi
callq *%rcx
movq 0x8(%rbx), %rdi
callq 0x3450
movq (%rbx), %rdi
callq 0x3450
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3450
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/dynamodb/dynamodb_request_queue.c
// Function: callback_timeout
static int
callback_timeout(void * cookie)
{
	struct request * R = cookie;
	struct dynamodb_request_queue * Q = R->Q;

	/* We are no longer waiting for a timer callback. */
	R->timeout_cookie = NULL;

	/* Clean up the HTTP request. */
	if ((R->http_cookie != NULL) && done_http(R, 1))
		goto err0;

	/* The priority of this request has changed. */
	ptrheap_decrease(Q->reqs, R->rc);

	/*
	 * Poke the queue -- this request has moved from "in progress" back
	 * to "waiting to be sent", so it might be possible to send it now.
	 */
	if (poke(Q))
		goto err0;

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movq (%rdi), %rbx
movq $0x0, 0x58(%rdi)
cmpq $0x0, 0x50(%rdi)
je 0x6b78
movq %r14, %rdi
movl $0x1, %esi
callq 0x6fc7
testl %eax, %eax
je 0x6b78
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x6bad
movq 0x70(%rbx), %rdi
movq 0x88(%r14), %rsi
callq 0x8a35
xorl %ebp, %ebp
cmpq $0x0, 0x60(%rbx)
jne 0x6bad
leaq -0x33f(%rip), %rdi      # 0x6859
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %edx, %edx
callq 0x44e4
movq %rax, 0x60(%rbx)
testq %rax, %rax
je 0x6b71
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/dynamodb/dynamodb_request_queue.c
// Function: done_http
static int
done_http(struct request * R, int timedout)
{
	struct dynamodb_request_queue * Q = R->Q;
	struct timeval t_end;
	int rc = 0;

	/* Cancel the request if we timed out. */
	if (timedout) {
		http_request_cancel(R->http_cookie);
		if (Q->logfile) {
			if (monoclock_get(&t_end)) {
				warnp("monoclock_get");
				t_end = R->t_start;
				rc = -1;
			}
			if (logreq(Q->logfile, R, NULL, 0.0, t_end, NULL))
				rc = -1;
		}
	}

	/* There is no longer a request in flight. */
	R->http_cookie = NULL;
	Q->inflight--;
	sock_addr_free(R->addrs[0]);
	R->addrs[0] = NULL;

	/* Return status. */
	return (rc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %r12
xorl %r14d, %r14d
testl %esi, %esi
je 0x7074
movq 0x50(%rbx), %rdi
callq 0x8f5d
cmpq $0x0, 0x80(%r12)
je 0x7074
movq %rsp, %rdi
callq 0x54d0
xorl %r14d, %r14d
movl $0x0, %ebp
testl %eax, %eax
je 0x704b
callq 0x3040
cmpl $0x0, (%rax)
je 0x7030
movq %rax, %r15
leaq 0xa928(%rip), %rdi      # 0x11948
xorl %eax, %eax
callq 0x578c
movl $0x0, (%r15)
jmp 0x703e
leaq 0xa911(%rip), %rdi      # 0x11948
xorl %eax, %eax
callq 0x58ab
movups 0x68(%rbx), %xmm0
movaps %xmm0, (%rsp)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq 0x80(%r12), %rdi
movq (%rsp), %rcx
movq 0x8(%rsp), %r8
xorps %xmm0, %xmm0
movq %rbx, %rsi
xorl %edx, %edx
xorl %r9d, %r9d
callq 0x709d
negl %eax
sbbl %r14d, %r14d
orl %ebp, %r14d
xorl %r15d, %r15d
movq %r15, 0x50(%rbx)
decq 0x68(%r12)
movq 0x40(%rbx), %rdi
callq 0xc0c7
movq %r15, 0x40(%rbx)
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/dynamodb/dynamodb_request_queue.c
// Function: logreq
static int
logreq(struct logging_file * F, struct request * R,
    struct http_response * res, double capacity,
    struct timeval t_end, char * ddberr)
{
	long t_micros;
	char * addr;
	int status;
	size_t bodylen;

	/* Compute how long the request took. */
	t_micros = (long)(t_end.tv_sec - R->t_start.tv_sec) * 1000000 +
	    t_end.tv_usec - R->t_start.tv_usec;

	/* Prettyprint the address we selected. */
	if ((addr = sock_addr_prettyprint(R->addrs[0])) == NULL)
		goto err0;

	/* Extract parameters from HTTP response. */
	if (res != NULL) {
		status = res->status;
		bodylen = res->bodylen;
	} else {
		status = 0;
		bodylen = 0;
	}

	/* Write to the log file. */
	if (logging_printf(F, "|%s|%s|%d|%s|%ld|%zu|%f|%s",
	    R->op, R->logstr ? R->logstr : "",
	    status, addr, t_micros, bodylen, capacity,
	    ddberr ? ddberr : ""))
		goto err1;

	/* Free string allocated by sock_addr_prettyprint. */
	free(addr);

	/* Success! */
	return (0);

err1:
	free(addr);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r14
movq %r8, %rbx
movq %rcx, %r15
movsd %xmm0, 0x10(%rsp)
movq %rdx, %r13
movq %rsi, %rbp
subq 0x68(%rsi), %r15
movq %rdi, 0x8(%rsp)
subq 0x70(%rsi), %rbx
movq 0x40(%rsi), %rdi
callq 0xc7f7
testq %rax, %rax
je 0x70fa
movq %rax, %r12
imulq $0xf4240, %r15, %rax    # imm = 0xF4240
addq %rax, %rbx
xorl %r15d, %r15d
testq %r13, %r13
je 0x7102
movl (%r13), %r8d
movq 0x18(%r13), %r10
jmp 0x7108
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x715f
xorl %r8d, %r8d
xorl %r10d, %r10d
movq 0x28(%rbp), %rcx
testq %rcx, %rcx
leaq 0xaf4c(%rip), %rax      # 0x12062
cmoveq %rax, %rcx
movq 0x8(%rbp), %rdx
testq %r14, %r14
cmoveq %rax, %r14
subq $0x8, %rsp
leaq 0xa826(%rip), %rsi      # 0x11956
movq 0x10(%rsp), %rdi
movq %r12, %r9
movsd 0x18(%rsp), %xmm0
movb $0x1, %al
pushq %r14
pushq %r10
pushq %rbx
callq 0x75af
addq $0x20, %rsp
movq %rax, %rbx
movq %r12, %rdi
callq 0x3450
negq %rbx
sbbl %r15d, %r15d
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/logging/logging.c
// Function: logging_open
struct logging_file *
logging_open(const char * path)
{
	struct logging_file * F;

	/* Allocate a log file structure. */
	if ((F = malloc(sizeof(struct logging_file))) == NULL)
		goto err0;

	/* Duplicate the provided path. */
	if ((F->path = strdup(path)) == NULL)
		goto err1;

	/* Open the file. */
	if ((F->fd = doopen(F->path)) == -1)
		goto err2;

	/* Start the has-file-moved timer. */
	if ((F->timer_cookie =
	    events_timer_register_double(callback_timer, F, 1.0)) == NULL)
		goto err3;

	/* Success! */
	return (F);

err3:
	if (close(F->fd))
		warnp("close");
err2:
	free(F->path);
err1:
	free(F);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x18, %edi
callq 0x34c0
testq %rax, %rax
je 0x721f
movq %rax, %rbx
movq %r14, %rdi
callq 0x35e0
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x7217
movq %rax, %rdi
callq 0x722c
movl %eax, (%rbx)
cmpl $-0x1, %eax
je 0x720e
leaq 0x290(%rip), %rdi       # 0x7448
movsd 0xa310(%rip), %xmm0     # 0x114d0
movq %rbx, %rsi
callq 0x5314
movq %rax, 0x10(%rbx)
testq %rax, %rax
jne 0x7221
movl (%rbx), %edi
callq 0x3640
testl %eax, %eax
je 0x720e
callq 0x3040
cmpl $0x0, (%rax)
je 0x7200
movq %rax, %r14
leaq 0xa04c(%rip), %rdi      # 0x1123c
xorl %eax, %eax
callq 0x578c
movl $0x0, (%r14)
jmp 0x720e
leaq 0xa035(%rip), %rdi      # 0x1123c
xorl %eax, %eax
callq 0x58ab
movq 0x8(%rbx), %rdi
callq 0x3450
movq %rbx, %rdi
callq 0x3450
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/logging/logging.c
// Function: callback_timer
static int
callback_timer(void * cookie)
{
	struct stat sb_fd;
	struct stat sb_path;
	struct logging_file * F = cookie;

	/* Timer callback is no longer pending. */
	F->timer_cookie = NULL;

	/* Stat the file and the path. */
	if (fstat(F->fd, &sb_fd)) {
		warnp("fstat(%s)", F->path);
		goto err0;
	}
	if (stat(F->path, &sb_path)) {
		/* If the path doesn't exist, we need to reopen the file. */
		if (errno == ENOENT)
			goto reopen;

		/* Any other error is bad. */
		warnp("stat(%s)", F->path);
		goto err0;
	}

	/* If the path still points at the same file, do nothing. */
	if (S_ISREG(sb_fd.st_mode) && S_ISREG(sb_path.st_mode) &&
	    (sb_fd.st_dev == sb_path.st_dev) &&
	    (sb_fd.st_ino == sb_path.st_ino))
		goto done;

reopen:
	/* We need to close and re-open the log file. */
	if (close(F->fd))
		warnp("close");
	if ((F->fd = doopen(F->path)) == -1)
		goto err0;

done:
	/* Reset the callback. */
	if ((F->timer_cookie =
	    events_timer_register_double(callback_timer, F, 1.0)) == NULL)
		goto err0;

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdi, %rbx
movq $0x0, 0x10(%rdi)
movl (%rdi), %edi
leaq 0x98(%rsp), %rsi
callq 0x35b0
testl %eax, %eax
je 0x749b
callq 0x3040
cmpl $0x0, (%rax)
movq 0x8(%rbx), %rsi
je 0x74d1
movq %rax, %r14
leaq 0xa633(%rip), %rdi      # 0x11abb
xorl %eax, %eax
callq 0x578c
movl $0x0, (%r14)
jmp 0x759f
movq 0x8(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x3300
testl %eax, %eax
je 0x74da
callq 0x3040
movq %rax, %r14
movl (%rax), %eax
testl %eax, %eax
je 0x7548
cmpl $0x2, %eax
je 0x7519
movq 0x8(%rbx), %rsi
leaq 0xa5ed(%rip), %rdi      # 0x11abc
jmp 0x7488
leaq 0xa5e3(%rip), %rdi      # 0x11abb
jmp 0x7553
movl $0xf000, %eax           # imm = 0xF000
movl 0xb0(%rsp), %ecx
andl %eax, %ecx
cmpl $0x8000, %ecx           # imm = 0x8000
jne 0x7519
andl 0x20(%rsp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x7519
movq 0x98(%rsp), %rax
cmpq 0x8(%rsp), %rax
jne 0x7519
movq 0xa0(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x757a
movl (%rbx), %edi
callq 0x3640
testl %eax, %eax
je 0x756a
callq 0x3040
cmpl $0x0, (%rax)
je 0x755c
movq %rax, %r14
leaq 0x9d04(%rip), %rdi      # 0x1123c
xorl %eax, %eax
callq 0x578c
movl $0x0, (%r14)
jmp 0x756a
movq 0x8(%rbx), %rsi
leaq 0xa569(%rip), %rdi      # 0x11abc
xorl %eax, %eax
callq 0x58ab
jmp 0x759f
leaq 0x9cd9(%rip), %rdi      # 0x1123c
xorl %eax, %eax
callq 0x58ab
movq 0x8(%rbx), %rdi
callq 0x722c
movl %eax, (%rbx)
cmpl $-0x1, %eax
je 0x759f
leaq -0x139(%rip), %rdi      # 0x7448
movsd 0x9f47(%rip), %xmm0     # 0x114d0
movq %rbx, %rsi
callq 0x5314
movq %rax, %rcx
movq %rax, 0x10(%rbx)
xorl %eax, %eax
testq %rcx, %rcx
jne 0x75a4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/logging/logging.c
// Function: logging_close
void
logging_close(struct logging_file * F)
{

	/* Stop the has-file-moved timer if it's running. */
	if (F->timer_cookie != NULL)
		events_timer_cancel(F->timer_cookie);

	/* Close the log file if we have it open. */
	if ((F->fd != -1) && close(F->fd))
		warnp("close");

	/* Free the duplicated path string. */
	free(F->path);

	/* Free the structure. */
	free(F);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x781a
callq 0x5349
movl (%rbx), %edi
cmpl $-0x1, %edi
je 0x785c
callq 0x3640
testl %eax, %eax
je 0x785c
callq 0x3040
cmpl $0x0, (%rax)
je 0x784e
movq %rax, %r14
leaq 0x99fe(%rip), %rdi      # 0x1123c
xorl %eax, %eax
callq 0x578c
movl $0x0, (%r14)
jmp 0x785c
leaq 0x99e7(%rip), %rdi      # 0x1123c
xorl %eax, %eax
callq 0x58ab
movq 0x8(%rbx), %rdi
callq 0x3450
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3450
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../libcperciva/http/http.c
// Function: callback_connected
static int
callback_connected(void * cookie, int s)
{
	struct http_cookie * H = cookie;

	/* We're not connecting any more. */
	H->connect_cookie = NULL;

	/* Did we fail? */
	if (s == -1)
		return (fail(H));

	/* We have a connected socket. */
	H->s = s;

	/* Create a reader and a writer. */
	if (H->sslhost != NULL) {
		if ((H->ssl =
		    (network_ssl_open_func)(H->s, H->sslhost)) == NULL)
			return (die(H));
		if ((H->R =
		    (netbuf_ssl_read_init_func)(H->ssl)) == NULL)
			return (die(H));
		if ((H->W =
		    (netbuf_ssl_write_init_func)(H->ssl, fail, H)) == NULL)
			return (die(H));
	} else {
		if ((H->R = netbuf_read_init(H->s)) == NULL)
			return (die(H));
		if ((H->W = netbuf_write_init(H->s, fail, H)) == NULL)
			return (die(H));
	}

	/* Send the request. */
	if (netbuf_write_write(H->W, H->req_head, H->req_headlen))
		return (die(H));
	if ((H->req_bodylen > 0) &&
	    netbuf_write_write(H->W, H->req_body, H->req_bodylen))
		return (die(H));

	/* Enter response-reading loop. */
	return (callback_read_header(H, 0));
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq $0x0, 0x18(%rdi)
cmpl $-0x1, %esi
je 0x8eca
movl %esi, 0x8(%rbx)
movq 0x58(%rbx), %rax
movl %esi, %edi
testq %rax, %rax
je 0x8ee1
movq %rax, %rsi
callq *0x1f8ff(%rip)          # 0x28798
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x8f1f
movq %rax, %rdi
callq *0x1f8fd(%rip)          # 0x287a8
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0x8f1f
movq 0x10(%rbx), %rdi
leaq 0x1f2(%rip), %rsi       # 0x90b1
movq %rbx, %rdx
callq *0x1f8e8(%rip)          # 0x287b0
jmp 0x8f01
movq 0x68(%rbx), %rdi
xorl %esi, %esi
callq *0x60(%rbx)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x8f5d
movl %ebp, %eax
jmp 0x8f2c
callq 0x9bc4
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0x8f1f
movl 0x8(%rbx), %edi
leaq 0x1b8(%rip), %rsi       # 0x90b1
movq %rbx, %rdx
callq 0x9f58
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x8f1f
movq 0x40(%rbx), %rsi
movq 0x20(%rbx), %rdi
movq 0x38(%rbx), %rdx
callq 0xa281
testl %eax, %eax
je 0x8f33
movq %rbx, %rdi
callq 0x8f5d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x48(%rbx), %rdx
testq %rdx, %rdx
je 0x8f4d
movq 0x20(%rbx), %rdi
movq 0x50(%rbx), %rsi
callq 0xa281
testl %eax, %eax
jne 0x8f1f
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x90d3
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../libcperciva/http/http.c
// Function: http_request_cancel
void
http_request_cancel(void * cookie)
{
	struct http_cookie * H = cookie;

	/* Stop connecting if we're in the process of doing so. */
	if (H->connect_cookie != NULL)
		network_connect_cancel(H->connect_cookie);

	/* If we have a network reader, cancel any in-progress read. */
	if (H->R != NULL)
		netbuf_read_wait_cancel(H->R);

	/* Free the network reader and writer if they exist. */
	if (H->W != NULL)
		netbuf_write_free(H->W);
	if (H->R != NULL)
		netbuf_read_free(H->R);

	/* Close SSL context if we have one. */
	if (H->ssl != NULL)
		(network_ssl_close_func)(H->ssl);

	/* Close the socket if we are connected. */
	if ((H->s != -1) && close(H->s))
		warnp("close");

	/* Free duplicated SSL target hostname if we have one. */
	free(H->sslhost);

	/*
	 * Free internal buffers.  (req_body does not need to be freed since
	 * it is owned by the caller; res_body does need to be freed, since
	 * it is set to NULL if/when it is passed off to the caller).
	 */
	free(H->req_head);
	free(H->res_head);
	free(H->res.headers);
	free(H->res.body);

	/* Free the cookie. */
	free(H);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x8f72
callq 0xa502
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x8f80
callq 0x9e73
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x8f8e
callq 0xa2d7
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x8f9c
callq 0x9eec
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x8fab
callq *0x1f7f5(%rip)          # 0x287a0
movl 0x8(%rbx), %edi
cmpl $-0x1, %edi
je 0x8fee
callq 0x3640
testl %eax, %eax
je 0x8fee
callq 0x3040
cmpl $0x0, (%rax)
je 0x8fe0
movq %rax, %r14
leaq 0x826c(%rip), %rdi      # 0x1123c
xorl %eax, %eax
callq 0x578c
movl $0x0, (%r14)
jmp 0x8fee
leaq 0x8255(%rip), %rdi      # 0x1123c
xorl %eax, %eax
callq 0x58ab
movq 0x58(%rbx), %rdi
callq 0x3450
movq 0x40(%rbx), %rdi
callq 0x3450
movq 0x80(%rbx), %rdi
callq 0x3450
movq 0xb8(%rbx), %rdi
callq 0x3450
movq 0xc8(%rbx), %rdi
callq 0x3450
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3450
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../libcperciva/http/http.c
// Function: http_findheader
const char *
http_findheader(struct http_header * headers, size_t nheaders,
    const char * header)
{
	size_t i;

	/* Sanity check. */
	assert((headers != NULL) || (nheaders == 0));

	/* Search for the header. */
	for (i = 0; i < nheaders; i++) {
		if (strcmp(headers[i].header, header) == 0)
			return (headers[i].value);
	}

	/* Didn't find it. */
	return (NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
setne %cl
testb %cl, %al
jne 0x9092
movq %rsi, %r15
testq %rsi, %rsi
je 0x907b
movq %rdx, %rbx
movq %rdi, %r14
addq $0x8, %r14
xorl %r12d, %r12d
movq -0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x3500
testl %eax, %eax
je 0x9080
addq $0x10, %r14
decq %r15
jne 0x9060
jmp 0x9083
xorl %r12d, %r12d
jmp 0x9083
movq (%r14), %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x8e32(%rip), %rdi      # 0x11ecb
leaq 0x8d89(%rip), %rsi      # 0x11e29
leaq 0x8e49(%rip), %rcx      # 0x11ef0
movl $0x355, %edx            # imm = 0x355
callq 0x3200
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../libcperciva/http/http.c
// Function: sgetline
static char *
sgetline(uint8_t * buf, size_t buflen, size_t * bufpos, size_t * linelen)
{
	uint8_t * s = &buf[*bufpos];

	/* Find the \r\n. */
	*linelen = findeol(s, buflen - *bufpos);

	/* It had better be there. */
	assert(*linelen < buflen - *bufpos);

	/* Add NUL-terminator. */
	s[*linelen] = '\0';

	/* Adjust buffer position. */
	*bufpos += *linelen + 2;

	/* Return string. */
	return (char *)(s);
}

// Assembly:
movq (%rdx), %r8
addq %r8, %rdi
movq %rsi, %rax
subq %r8, %rax
cmpq $0x2, %rax
jb 0x9641
xorl %r8d, %r8d
cmpw $0xa0d, (%rdi,%r8)      # imm = 0xA0D
je 0x963e
leaq 0x1(%r8), %r9
addq $0x3, %r8
cmpq %rax, %r8
movq %r9, %r8
jbe 0x9623
jmp 0x9641
movq %r8, %rax
movq %rax, (%rcx)
subq (%rdx), %rsi
cmpq %rsi, %rax
jae 0x9664
movb $0x0, (%rdi,%rax)
movq (%rcx), %rax
movq (%rdx), %rcx
addq %rcx, %rax
addq $0x2, %rax
movq %rax, (%rdx)
movq %rdi, %rax
retq
pushq %rax
leaq 0x8a58(%rip), %rdi      # 0x120c4
leaq 0x87b6(%rip), %rsi      # 0x11e29
leaq 0x8a66(%rip), %rcx      # 0x120e0
movl $0xa7, %edx
callq 0x3200
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../libcperciva/util/parsenum.h
// Function: parsenum_unsigned
static inline uintmax_t
parsenum_unsigned(const char * s, uintmax_t min, uintmax_t max,
    uintmax_t typemax, int base, int trailing)
{
	char * eptr;
	uintmax_t val;

	/* Sanity check. */
	assert(s != NULL);

	val = strtoumax(s, &eptr, base);
	if (eptr == s || (!trailing && (*eptr != '\0')))
		errno = EINVAL;
	else if ((val < min) || (val > max) || (val > typemax))
		errno = ERANGE;
	return (val);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x98a3
movl %edx, %ebp
movl %esi, %edx
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rsi
callq 0x3340
movq %rax, %rbx
movq (%r15), %rax
cmpq %r14, %rax
je 0x988a
testl %ebp, %ebp
jne 0x9895
cmpb $0x0, (%rax)
je 0x9895
callq 0x3040
movl $0x16, (%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8884(%rip), %rdi      # 0x1212e
leaq 0x8887(%rip), %rsi      # 0x12138
leaq 0x8902(%rip), %rcx      # 0x121ba
movl $0xbb, %edx
callq 0x3200
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../libcperciva/http/http.c
// Function: callback_read_toeof
static int
callback_read_toeof(void * cookie, int status)
{
	struct http_cookie * H = cookie;
	uint8_t * buf;
	size_t buflen;

	/* Did we fail? */
	if (status == -1)
		return (fail(H));

	/* Did we hit EOF? */
	if (status == 1)
		return (docallback(H));

	/* How much data is there? */
	netbuf_read_peek(H->R, &buf, &buflen);

	/* Is it too much? */
	if (buflen > H->res_bodylen_max - H->res.bodylen)
		return (toobig(H));

	/* Add this to our internal buffer. */
	if (addbody(H, buf, buflen))
		return (die(H));

	/* Consume the data. */
	netbuf_read_consume(H->R, buflen);

	/* Wait for at least one more byte to arrive. */
	if (netbuf_read_wait(H->R, 1, callback_read_toeof, H))
		return (die(H));

	/* Success! */
	return (0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpl $0x1, %esi
je 0x990a
cmpl $-0x1, %esi
jne 0x9938
movq 0x68(%rbx), %rdi
xorl %esi, %esi
callq *0x60(%rbx)
movl %eax, %ebp
jmp 0x9925
movq 0x68(%rbx), %rdi
leaq 0xa8(%rbx), %rsi
callq *0x60(%rbx)
movl %eax, %ebp
movq $0x0, 0xc8(%rbx)
movq %rbx, %rdi
callq 0x8f5d
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x28(%rbx), %rdi
leaq 0x8(%rsp), %rsi
movq %rsp, %r14
movq %r14, %rdx
callq 0x9c29
movq (%r14), %rdx
movq 0x98(%rbx), %rax
subq 0xc0(%rbx), %rax
cmpq %rax, %rdx
jbe 0x996c
movq %rbx, %rdi
callq 0x99bf
jmp 0x992f
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x9b09
testl %eax, %eax
jne 0x99a6
movq 0x28(%rbx), %rdi
movq (%rsp), %rsi
callq 0x9eb4
movq 0x28(%rbx), %rdi
leaq -0xad(%rip), %rdx       # 0x98e8
movl $0x1, %esi
movq %rbx, %rcx
callq 0x9c42
testl %eax, %eax
je 0x99b8
movq %rbx, %rdi
callq 0x8f5d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x992f
xorl %eax, %eax
jmp 0x992f
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../libcperciva/http/http.c
// Function: toobig
static int
toobig(struct http_cookie * H)
{

	/* No body any more. */
	free(H->res.body);
	H->res.body = NULL;

	/* The response is too big. */
	H->res.bodylen = (size_t)(-1);

	/* Perform the callback. */
	return (docallback(H));
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0xc8(%rdi), %rdi
callq 0x3450
xorl %r14d, %r14d
movq %r14, 0xc8(%rbx)
movq $-0x1, 0xc0(%rbx)
movq 0x68(%rbx), %rdi
leaq 0xa8(%rbx), %rsi
callq *0x60(%rbx)
movl %eax, %ebp
movq %r14, 0xc8(%rbx)
movq %rbx, %rdi
callq 0x8f5d
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq