LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/proto_kvlds/proto_kvlds_client.c
// Function: callback_params
static int
callback_params(void * cookie, uint8_t * buf, size_t buflen)
{
	struct params_cookie * C = cookie;
	int failed = 1;
	size_t kmax = 0;
	size_t vmax = 0;
	int rc;

	/* If we have a packet, parse it. */
	if (buf != NULL) {
		/* Is the packet length sane? */
		if (buflen != 8)
			BAD("params", "bogus length");

		/* Parse values. */
		kmax = be32dec(&buf[0]);
		vmax = be32dec(&buf[4]);

		/* We successfully parsed this response. */
		failed = 0;
	}

failed:
	/* Invoke the upstream callback. */
	rc = (C->callback)(C->cookie, failed, kmax, vmax);

	/* Free the cookie. */
	free(C);

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

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %ebp
testq %rsi, %rsi
je 0x57cc
cmpq $0x8, %rdx
jne 0x57d1
movl (%rsi), %r14d
movl 0x4(%rsi), %ecx
bswapl %r14d
bswapl %ecx
xorl %ebp, %ebp
jmp 0x57fd
xorl %r14d, %r14d
jmp 0x57fb
leaq 0x6476(%rip), %rdi      # 0xbc4e
leaq 0x648c(%rip), %rsi      # 0xbc6b
leaq 0x648c(%rip), %rdx      # 0xbc72
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x516f
callq 0x2090
movl $0x0, (%rax)
xorl %ecx, %ecx
movq 0x8(%rbx), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq *(%rbx)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x2040
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/proto_kvlds/proto_kvlds_client.c
// Function: proto_kvlds_request_set
int
proto_kvlds_request_set(struct wire_requestqueue * Q,
    const struct kvldskey * key, const struct kvldskey * value,
    int (* callback)(void *, int), void * cookie)
{
	struct done_cookie * C;
	uint8_t * buf;
	size_t buflen;
	size_t bufpos;

	/* Bake a cookie. */
	if ((C = mpool_done_malloc()) == NULL)
		goto err0;
	C->callback = callback;
	C->cookie = cookie;
	C->type = "SET";

	/* Compute request size. */
	buflen = 4;
	buflen += kvldskey_serial_size(key);
	buflen += kvldskey_serial_size(value);

	/* Start writing a request. */
	if ((buf = wire_requestqueue_add_getbuf(Q, buflen,
	    callback_done, C)) == NULL)
		goto err1;

	/* Construct request. */
	be32enc(&buf[0], PROTO_KVLDS_SET);
	bufpos = 4;
	kvldskey_serialize(key, &buf[bufpos]);
	bufpos += kvldskey_serial_size(key);
	kvldskey_serialize(value, &buf[bufpos]);
	bufpos += kvldskey_serial_size(value);

	/* Sanity-check. */
	assert(bufpos == buflen);

	/* Finish writing request. */
	if (wire_requestqueue_add_done(Q, buf, buflen))
		goto err1;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r13
movq %rcx, %rbx
movq %rdx, %r14
incq 0xbc34(%rip)            # 0x11468
movq %rsi, %r12
movq 0xbc12(%rip), %rax      # 0x11450
testq %rax, %rax
je 0x585c
movq 0xbc16(%rip), %rcx      # 0x11460
leaq -0x1(%rax), %rdx
movq %rdx, 0xbbfb(%rip)      # 0x11450
movq -0x8(%rcx,%rax,8), %r15
jmp 0x5895
movq %rdi, %rbp
incq 0xbc0a(%rip)            # 0x11470
cmpl $0x0, 0xbc0b(%rip)      # 0x11478
jne 0x5885
movq 0xbc12(%rip), %rdi      # 0x11488
callq 0xa0d0
movl $0x1, 0xbbf3(%rip)      # 0x11478
movl $0x18, %edi
callq 0x2220
movq %rax, %r15
movq %rbp, %rdi
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %r15, %r15
je 0x594c
movq %rbx, (%r15)
movq %r13, 0x8(%r15)
leaq 0x5f99(%rip), %rax      # 0xb84a
movq %rax, 0x10(%r15)
movzbl (%r12), %eax
movzbl (%r14), %ecx
leaq 0x6(%rax,%rcx), %r13
leaq 0xb2(%rip), %rdx        # 0x597c
movq %rdi, (%rsp)
movq %r13, %rsi
movq %r15, %rcx
callq 0x6f66
testq %rax, %rax
je 0x5939
movq %rax, %rbx
movl $0x10010000, (%rax)     # imm = 0x10010000
leaq 0x4(%rax), %rdi
movzbl (%r12), %edx
incq %rdx
movq %r12, %rsi
callq 0x2200
movzbl (%r12), %r12d
leaq (%rbx,%r12), %rdi
addq $0x5, %rdi
movzbl (%r14), %edx
incq %rdx
movq %r14, %rsi
callq 0x2200
movzbl (%r14), %eax
addl %r12d, %eax
addl $0x6, %eax
cmpl %r13d, %eax
jne 0x595d
movq (%rsp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x7261
testl %eax, %eax
je 0x594a
leaq 0xbb10(%rip), %rdi      # 0x11450
movq %r15, %rsi
callq 0x69a9
jmp 0x594c
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5eea(%rip), %rdi      # 0xb84e
leaq 0x5ef4(%rip), %rsi      # 0xb85f
leaq 0x5f15(%rip), %rcx      # 0xb887
movl $0x1d4, %edx            # imm = 0x1D4
callq 0x2180
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/proto_kvlds/proto_kvlds_client.c
// Function: callback_done
static int
callback_done(void * cookie, uint8_t * buf, size_t buflen)
{
	struct done_cookie * C = cookie;
	int failed = 1;
	int rc;

	/* If we have a packet, parse it. */
	if (buf != NULL) {
		/* Is the status code sane? */
		if (buflen < 4)
			BAD(C->type, "bogus length");
		if (be32dec(&buf[0]) > 0)
			BAD(C->type, "bogus status code");

		/* We successfully parsed this response. */
		failed = 0;
	}

failed:
	/* Invoke the upstream callback. */
	rc = (C->callback)(C->cookie, failed);

	/* Free the cookie. */
	mpool_done_free(C);

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

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %ebp
testq %rsi, %rsi
je 0x59c7
cmpq $0x4, %rdx
jae 0x599b
leaq 0x62d9(%rip), %rdx      # 0xbc72
jmp 0x59aa
movl (%rsi), %eax
bswapl %eax
testl %eax, %eax
je 0x59e9
leaq 0x62d5(%rip), %rdx      # 0xbc7f
movq 0x10(%rbx), %rsi
leaq 0x6299(%rip), %rdi      # 0xbc4e
xorl %eax, %eax
callq 0x516f
callq 0x2090
movl $0x0, (%rax)
movq 0x8(%rbx), %rdi
movl %ebp, %esi
callq *(%rbx)
movl %eax, %ebp
leaq 0xba78(%rip), %rdi      # 0x11450
movq %rbx, %rsi
callq 0x69a9
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x59c7
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/proto_kvlds/proto_kvlds_client.c
// Function: callback_donep
static int
callback_donep(void * cookie, uint8_t * buf, size_t buflen)
{
	struct donep_cookie * C = cookie;
	int failed = 1;
	int status = 0;
	int rc;

	/* If we have a packet, parse it. */
	if (buf != NULL) {
		/* Is the status code sane? */
		if (buflen < 4)
			BAD(C->type, "bogus length");
		if (be32dec(&buf[0]) > 1)
			BAD(C->type, "bogus status code");
		status = (int)be32dec(&buf[0]);

		/* We successfully parsed this response. */
		failed = 0;
	}

failed:
	/* Invoke the upstream callback. */
	rc = (C->callback)(C->cookie, failed, status);

	/* Free the cookie. */
	mpool_donep_free(C);

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

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %ebp
testq %rsi, %rsi
je 0x5bad
cmpq $0x4, %rdx
jae 0x5bb2
leaq 0x60c7(%rip), %rdx      # 0xbc72
jmp 0x5bc5
xorl %r14d, %r14d
jmp 0x5be9
movl (%rsi), %r14d
bswapl %r14d
cmpl $0x2, %r14d
jb 0x5be7
leaq 0x60ba(%rip), %rdx      # 0xbc7f
movq 0x10(%rbx), %rsi
leaq 0x607e(%rip), %rdi      # 0xbc4e
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x516f
callq 0x2090
movl $0x0, (%rax)
jmp 0x5be9
xorl %ebp, %ebp
movq 0x8(%rbx), %rdi
movl %ebp, %esi
movl %r14d, %edx
callq *(%rbx)
movl %eax, %ebp
leaq 0xb893(%rip), %rdi      # 0x11490
movq %rbx, %rsi
callq 0x69a9
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/proto_kvlds/proto_kvlds_client.c
// Function: proto_kvlds_request_modify
int
proto_kvlds_request_modify(struct wire_requestqueue * Q,
    const struct kvldskey * key, const struct kvldskey * value,
    int (* callback)(void *, int, int), void * cookie)
{
	struct donep_cookie * C;
	uint8_t * buf;
	size_t buflen;
	size_t bufpos;

	/* Bake a cookie. */
	if ((C = mpool_donep_malloc()) == NULL)
		goto err0;
	C->callback = callback;
	C->cookie = cookie;
	C->type = "MODIFY";

	/* Compute request size. */
	buflen = 4;
	buflen += kvldskey_serial_size(key);
	buflen += kvldskey_serial_size(value);

	/* Start writing a request. */
	if ((buf = wire_requestqueue_add_getbuf(Q, buflen,
	    callback_donep, C)) == NULL)
		goto err1;

	/* Construct request. */
	be32enc(&buf[0], PROTO_KVLDS_MODIFY);
	bufpos = 4;
	kvldskey_serialize(key, &buf[bufpos]);
	bufpos += kvldskey_serial_size(key);
	kvldskey_serialize(value, &buf[bufpos]);
	bufpos += kvldskey_serial_size(value);

	/* Sanity-check. */
	assert(bufpos == buflen);

	/* Finish writing request. */
	if (wire_requestqueue_add_done(Q, buf, buflen))
		goto err1;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r13
movq %rcx, %rbx
movq %rdx, %r14
incq 0xb71e(%rip)            # 0x114a8
movq %rsi, %r12
movq 0xb6fc(%rip), %rax      # 0x11490
testq %rax, %rax
je 0x5db2
movq 0xb700(%rip), %rcx      # 0x114a0
leaq -0x1(%rax), %rdx
movq %rdx, 0xb6e5(%rip)      # 0x11490
movq -0x8(%rcx,%rax,8), %r15
jmp 0x5deb
movq %rdi, %rbp
incq 0xb6f4(%rip)            # 0x114b0
cmpl $0x0, 0xb6f5(%rip)      # 0x114b8
jne 0x5ddb
movq 0xb6fc(%rip), %rdi      # 0x114c8
callq 0xa0d0
movl $0x1, 0xb6dd(%rip)      # 0x114b8
movl $0x18, %edi
callq 0x2220
movq %rax, %r15
movq %rbp, %rdi
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %r15, %r15
je 0x5ea2
movq %rbx, (%r15)
movq %r13, 0x8(%r15)
leaq 0x5c43(%rip), %rax      # 0xba4a
movq %rax, 0x10(%r15)
movzbl (%r12), %eax
movzbl (%r14), %ecx
leaq 0x6(%rax,%rcx), %r13
leaq -0x293(%rip), %rdx      # 0x5b8d
movq %rdi, (%rsp)
movq %r13, %rsi
movq %r15, %rcx
callq 0x6f66
testq %rax, %rax
je 0x5e8f
movq %rax, %rbx
movl $0x13010000, (%rax)     # imm = 0x13010000
leaq 0x4(%rax), %rdi
movzbl (%r12), %edx
incq %rdx
movq %r12, %rsi
callq 0x2200
movzbl (%r12), %r12d
leaq (%rbx,%r12), %rdi
addq $0x5, %rdi
movzbl (%r14), %edx
incq %rdx
movq %r14, %rsi
callq 0x2200
movzbl (%r14), %eax
addl %r12d, %eax
addl $0x6, %eax
cmpl %r13d, %eax
jne 0x5eb3
movq (%rsp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x7261
testl %eax, %eax
je 0x5ea0
leaq 0xb5fa(%rip), %rdi      # 0x11490
movq %r15, %rsi
callq 0x69a9
jmp 0x5ea2
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5994(%rip), %rdi      # 0xb84e
leaq 0x599e(%rip), %rsi      # 0xb85f
leaq 0x5b89(%rip), %rcx      # 0xba51
movl $0x28c, %edx            # imm = 0x28C
callq 0x2180
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/proto_kvlds/proto_kvlds_client.c
// Function: proto_kvlds_request_delete
int
proto_kvlds_request_delete(struct wire_requestqueue * Q,
    const struct kvldskey * key,
    int (* callback)(void *, int), void * cookie)
{
	struct done_cookie * C;
	uint8_t * buf;
	size_t buflen;

	/* Bake a cookie. */
	if ((C = mpool_done_malloc()) == NULL)
		goto err0;
	C->callback = callback;
	C->cookie = cookie;
	C->type = "DELETE";

	/* Compute request size. */
	buflen = 4;
	buflen += kvldskey_serial_size(key);

	/* Start writing a request. */
	if ((buf = wire_requestqueue_add_getbuf(Q, buflen,
	    callback_done, C)) == NULL)
		goto err1;

	/* Construct request. */
	be32enc(&buf[0], PROTO_KVLDS_DELETE);
	kvldskey_serialize(key, &buf[4]);

	/* Finish writing request. */
	if (wire_requestqueue_add_done(Q, buf, buflen))
		goto err1;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdx, %r13
incq 0xb57e(%rip)            # 0x11468
movq %rsi, %r14
movq %rdi, %rbx
movq 0xb559(%rip), %rax      # 0x11450
testq %rax, %rax
je 0x5f15
movq 0xb55d(%rip), %rcx      # 0x11460
leaq -0x1(%rax), %rdx
movq %rdx, 0xb542(%rip)      # 0x11450
movq -0x8(%rcx,%rax,8), %r15
jmp 0x5f48
incq 0xb554(%rip)            # 0x11470
cmpl $0x0, 0xb555(%rip)      # 0x11478
jne 0x5f3b
movq 0xb55c(%rip), %rdi      # 0x11488
callq 0xa0d0
movl $0x1, 0xb53d(%rip)      # 0x11478
movl $0x18, %edi
callq 0x2220
movq %rax, %r15
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %r15, %r15
je 0x5fca
movq %r13, (%r15)
movq %r12, 0x8(%r15)
leaq 0x5b81(%rip), %rax      # 0xbae1
movq %rax, 0x10(%r15)
movzbl (%r14), %r12d
addq $0x5, %r12
leaq -0x5f7(%rip), %rdx      # 0x597c
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x6f66
testq %rax, %rax
je 0x5fb7
movq %rax, %r13
movl $0x20010000, (%rax)     # imm = 0x20010000
movq %rax, %rdi
addq $0x4, %rdi
movzbl (%r14), %edx
incq %rdx
movq %r14, %rsi
callq 0x2200
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x7261
testl %eax, %eax
je 0x5fc8
leaq 0xb492(%rip), %rdi      # 0x11450
movq %r15, %rsi
callq 0x69a9
jmp 0x5fca
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/proto_kvlds/proto_kvlds_client.c
// Function: proto_kvlds_request_cad
int
proto_kvlds_request_cad(struct wire_requestqueue * Q,
    const struct kvldskey * key, const struct kvldskey * oval,
    int (* callback)(void *, int, int), void * cookie)
{
	struct donep_cookie * C;
	uint8_t * buf;
	size_t buflen;
	size_t bufpos;

	/* Bake a cookie. */
	if ((C = mpool_donep_malloc()) == NULL)
		goto err0;
	C->callback = callback;
	C->cookie = cookie;
	C->type = "CAD";

	/* Compute request size. */
	buflen = 4;
	buflen += kvldskey_serial_size(key);
	buflen += kvldskey_serial_size(oval);

	/* Start writing a request. */
	if ((buf = wire_requestqueue_add_getbuf(Q, buflen,
	    callback_donep, C)) == NULL)
		goto err1;

	/* Construct request. */
	be32enc(&buf[0], PROTO_KVLDS_CAD);
	bufpos = 4;
	kvldskey_serialize(key, &buf[bufpos]);
	bufpos += kvldskey_serial_size(key);
	kvldskey_serialize(oval, &buf[bufpos]);
	bufpos += kvldskey_serial_size(oval);

	/* Sanity-check. */
	assert(bufpos == buflen);

	/* Finish writing request. */
	if (wire_requestqueue_add_done(Q, buf, buflen))
		goto err1;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r13
movq %rcx, %rbx
movq %rdx, %r14
incq 0xb4b2(%rip)            # 0x114a8
movq %rsi, %r12
movq 0xb490(%rip), %rax      # 0x11490
testq %rax, %rax
je 0x601e
movq 0xb494(%rip), %rcx      # 0x114a0
leaq -0x1(%rax), %rdx
movq %rdx, 0xb479(%rip)      # 0x11490
movq -0x8(%rcx,%rax,8), %r15
jmp 0x6057
movq %rdi, %rbp
incq 0xb488(%rip)            # 0x114b0
cmpl $0x0, 0xb489(%rip)      # 0x114b8
jne 0x6047
movq 0xb490(%rip), %rdi      # 0x114c8
callq 0xa0d0
movl $0x1, 0xb471(%rip)      # 0x114b8
movl $0x18, %edi
callq 0x2220
movq %rax, %r15
movq %rbp, %rdi
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %r15, %r15
je 0x610e
movq %rbx, (%r15)
movq %r13, 0x8(%r15)
leaq 0x5a75(%rip), %rax      # 0xbae8
movq %rax, 0x10(%r15)
movzbl (%r12), %eax
movzbl (%r14), %ecx
leaq 0x6(%rax,%rcx), %r13
leaq -0x4ff(%rip), %rdx      # 0x5b8d
movq %rdi, (%rsp)
movq %r13, %rsi
movq %r15, %rcx
callq 0x6f66
testq %rax, %rax
je 0x60fb
movq %rax, %rbx
movl $0x21010000, (%rax)     # imm = 0x21010000
leaq 0x4(%rax), %rdi
movzbl (%r12), %edx
incq %rdx
movq %r12, %rsi
callq 0x2200
movzbl (%r12), %r12d
leaq (%rbx,%r12), %rdi
addq $0x5, %rdi
movzbl (%r14), %edx
incq %rdx
movq %r14, %rsi
callq 0x2200
movzbl (%r14), %eax
addl %r12d, %eax
addl $0x6, %eax
cmpl %r13d, %eax
jne 0x611f
movq (%rsp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x7261
testl %eax, %eax
je 0x610c
leaq 0xb38e(%rip), %rdi      # 0x11490
movq %r15, %rsi
callq 0x69a9
jmp 0x610e
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5728(%rip), %rdi      # 0xb84e
leaq 0x5732(%rip), %rsi      # 0xb85f
leaq 0x59b8(%rip), %rcx      # 0xbaec
movl $0x2fa, %edx            # imm = 0x2FA
callq 0x2180
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/proto_kvlds/proto_kvlds_client.c
// Function: proto_kvlds_request_get
int
proto_kvlds_request_get(struct wire_requestqueue * Q,
    const struct kvldskey * key,
    int (* callback)(void *, int, struct kvldskey *), void * cookie)
{
	struct get_cookie * C;
	uint8_t * buf;
	size_t buflen;

	/* Bake a cookie. */
	if ((C = mpool_get_malloc()) == NULL)
		goto err0;
	C->callback = callback;
	C->cookie = cookie;

	/* Compute request size. */
	buflen = 4;
	buflen += kvldskey_serial_size(key);

	/* Start writing a request. */
	if ((buf = wire_requestqueue_add_getbuf(Q, buflen,
	    callback_get, C)) == NULL)
		goto err1;

	/* Construct request. */
	be32enc(&buf[0], PROTO_KVLDS_GET);
	kvldskey_serialize(key, &buf[4]);

	/* Finish writing request. */
	if (wire_requestqueue_add_done(Q, buf, buflen))
		goto err1;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdx, %r13
incq 0xb392(%rip)            # 0x114e8
movq %rsi, %r14
movq %rdi, %rbx
movq 0xb36d(%rip), %rax      # 0x114d0
testq %rax, %rax
je 0x6181
movq 0xb371(%rip), %rcx      # 0x114e0
leaq -0x1(%rax), %rdx
movq %rdx, 0xb356(%rip)      # 0x114d0
movq -0x8(%rcx,%rax,8), %r15
jmp 0x61b4
incq 0xb368(%rip)            # 0x114f0
cmpl $0x0, 0xb369(%rip)      # 0x114f8
jne 0x61a7
movq 0xb370(%rip), %rdi      # 0x11508
callq 0xa0d0
movl $0x1, 0xb351(%rip)      # 0x114f8
movl $0x10, %edi
callq 0x2220
movq %rax, %r15
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %r15, %r15
je 0x622b
movq %r13, (%r15)
movq %r12, 0x8(%r15)
movzbl (%r14), %r12d
addq $0x5, %r12
leaq 0x68(%rip), %rdx        # 0x623c
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x6f66
testq %rax, %rax
je 0x6218
movq %rax, %r13
movl $0x30010000, (%rax)     # imm = 0x30010000
movq %rax, %rdi
addq $0x4, %rdi
movzbl (%r14), %edx
incq %rdx
movq %r14, %rsi
callq 0x2200
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x7261
testl %eax, %eax
je 0x6229
leaq 0xb2b1(%rip), %rdi      # 0x114d0
movq %r15, %rsi
callq 0x69a9
jmp 0x622b
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/proto_kvlds/proto_kvlds_client.c
// Function: callback_get
static int
callback_get(void * cookie, uint8_t * buf, size_t buflen)
{
	struct get_cookie * C = cookie;
	int failed = 1;
	int status = 0;
	struct kvldskey * value = NULL;
	size_t valuelen = 0;
	int rc;

	/* If we have a packet, parse it. */
	if (buf != NULL) {
		/* Is the status code sane? */
		if (buflen < 4)
			BAD("GET", "bogus length");
		if (be32dec(&buf[0]) > 1)
			BAD("GET", "bogus status code");
		status = (int)be32dec(&buf[0]);

		/* Parse a value if one exists. */
		if (status == 0) {
			if ((valuelen = kvldskey_unserialize(&value, &buf[4],
			    buflen - 4)) == 0) {
				warnp("Error parsing GET response value");
				goto failed;
			}
		} else {
			value = NULL;
			valuelen = 0;
		}

		/* Verify packet length. */
		if (buflen != 4 + valuelen)
			BAD("GET", "wrong length");

		/* We successfully parsed this response. */
		failed = 0;
	}

failed:
	/* Invoke the upstream callback. */
	rc = (C->callback)(C->cookie, failed, value);

	/* Free the cookie. */
	mpool_get_free(C);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq $0x0, (%rsp)
movl $0x1, %r14d
testq %rsi, %rsi
je 0x62f3
movq %rdx, %r15
cmpq $0x3, %rdx
ja 0x627d
leaq 0x59e1(%rip), %rdi      # 0xbc4e
leaq 0x5a1d(%rip), %rsi      # 0xbc91
leaq 0x59f7(%rip), %rdx      # 0xbc72
jmp 0x62db
movl (%rsi), %eax
bswapl %eax
cmpl $0x2, %eax
jb 0x629d
leaq 0x59c1(%rip), %rdi      # 0xbc4e
leaq 0x59fd(%rip), %rsi      # 0xbc91
leaq 0x59e4(%rip), %rdx      # 0xbc7f
jmp 0x62db
xorl %r14d, %r14d
testl %eax, %eax
je 0x62a8
xorl %eax, %eax
jmp 0x62bd
addq $0x4, %rsi
leaq -0x4(%r15), %rdx
movq %rsp, %rdi
callq 0x564d
testq %rax, %rax
je 0x631e
addq $0x4, %rax
cmpq %r15, %rax
je 0x62f3
leaq 0x5981(%rip), %rdi      # 0xbc4e
leaq 0x59bd(%rip), %rsi      # 0xbc91
leaq 0x59db(%rip), %rdx      # 0xbcb6
xorl %eax, %eax
callq 0x516f
callq 0x2090
movl $0x0, (%rax)
movl $0x1, %r14d
movq 0x8(%rbx), %rdi
movq (%rsp), %rdx
movl %r14d, %esi
callq *(%rbx)
movl %eax, %ebp
leaq 0xb1c7(%rip), %rdi      # 0x114d0
movq %rbx, %rsi
callq 0x69a9
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2090
cmpl $0x0, (%rax)
je 0x6342
movq %rax, %r14
leaq 0x5963(%rip), %rdi      # 0xbc95
xorl %eax, %eax
callq 0x5050
movl $0x0, (%r14)
jmp 0x62ed
leaq 0x594c(%rip), %rdi      # 0xbc95
xorl %eax, %eax
callq 0x516f
jmp 0x62ed
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/proto_kvlds/proto_kvlds_client.c
// Function: proto_kvlds_request_range
int
proto_kvlds_request_range(struct wire_requestqueue * Q,
    const struct kvldskey * start, const struct kvldskey * end, size_t max,
    int (* callback)(void *, int, size_t, struct kvldskey *,
	struct kvldskey **, struct kvldskey **),
    void * cookie)
{
	struct range_cookie * C;
	uint8_t * buf;
	size_t buflen;
	size_t bufpos;

	/* The request size must fit into a uint32_t. */
	if (max >= UINT32_MAX)
		max = UINT32_MAX;

	/* Bake a cookie. */
	if ((C = malloc(sizeof(struct range_cookie))) == NULL)
		goto err0;
	C->callback = callback;
	C->cookie = cookie;
	C->max = max;

	/* Compute request size. */
	buflen = 8;
	buflen += kvldskey_serial_size(start);
	buflen += kvldskey_serial_size(end);

	/* Start writing a request. */
	if ((buf = wire_requestqueue_add_getbuf(Q, buflen,
	    callback_range, C)) == NULL)
		goto err1;

	/* Construct request. */
	be32enc(&buf[0], PROTO_KVLDS_RANGE);
	be32enc(&buf[4], (uint32_t)max);
	bufpos = 8;
	kvldskey_serialize(start, &buf[bufpos]);
	bufpos += kvldskey_serial_size(start);
	kvldskey_serialize(end, &buf[bufpos]);
	bufpos += kvldskey_serial_size(end);

	/* Sanity-check. */
	assert(bufpos == buflen);

	/* Finish writing request. */
	if (wire_requestqueue_add_done(Q, buf, buflen))
		goto err1;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbp
movq %r8, %r13
movq %rdx, 0x8(%rsp)
movq %rsi, %r15
movq %rdi, %r12
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpq %rbx, %rcx
cmovbq %rcx, %rbx
movl $0x18, %edi
callq 0x2220
movq %rax, %r14
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %r14, %r14
je 0x6456
movq %r13, (%r14)
movq %rbp, 0x8(%r14)
movq %rbx, 0x10(%r14)
movzbl (%r15), %eax
movq 0x8(%rsp), %rcx
movzbl (%rcx), %ecx
leaq 0xa(%rax,%rcx), %r13
leaq 0xc9(%rip), %rdx        # 0x6484
movq %r12, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rcx
callq 0x6f66
testq %rax, %rax
je 0x6445
movq %rax, %rbp
movl $0x31010000, (%rax)     # imm = 0x31010000
movb %bl, 0x7(%rax)
movb %bh, 0x6(%rax)
movl %ebx, %eax
shrl $0x10, %eax
movb %al, 0x5(%rbp)
shrl $0x18, %ebx
movb %bl, 0x4(%rbp)
leaq 0x8(%rbp), %rdi
movzbl (%r15), %edx
incq %rdx
movq %r15, %rsi
callq 0x2200
movzbl (%r15), %ebx
leaq (%rbx,%rbp), %rdi
addq $0x9, %rdi
movq 0x8(%rsp), %r15
movzbl (%r15), %edx
incq %rdx
movq %r15, %rsi
callq 0x2200
movzbl (%r15), %eax
addl %ebx, %eax
addl $0xa, %eax
cmpl %r13d, %eax
jne 0x6465
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x7261
testl %eax, %eax
je 0x6454
movq %r14, %rdi
callq 0x2040
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x6456
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x53e2(%rip), %rdi      # 0xb84e
leaq 0x53ec(%rip), %rsi      # 0xb85f
leaq 0x56ff(%rip), %rcx      # 0xbb79
movl $0x375, %edx            # imm = 0x375
callq 0x2180
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/proto_kvlds/proto_kvlds_client.c
// Function: proto_kvlds_request_range2
int
proto_kvlds_request_range2(struct wire_requestqueue * Q,
    const struct kvldskey * start, const struct kvldskey * end,
    int (* callback_item)(void *,
	const struct kvldskey *, const struct kvldskey *),
    int (* callback)(void *, int), void * cookie)
{
	struct range2_cookie * C;

	/* Bake a cookie. */
	if ((C = malloc(sizeof(struct range2_cookie))) == NULL)
		goto err0;
	C->Q = Q;
	C->callback_item = callback_item;
	C->callback = callback;
	C->cookie = cookie;
	C->failed = 0;
	C->reqdone = 0;

	/* Duplicate start and end keys. */
	if ((C->start = kvldskey_create(start->buf, start->len)) == NULL)
		goto err1;
	if ((C->end = kvldskey_create(end->buf, end->len)) == NULL)
		goto err2;

	/* Start issuing RANGE requests. */
	if (!events_immediate_register(poke_range2, C, 0))
		goto err3;

	/* Success! */
	return (0);

err3:
	kvldskey_free(C->end);
err2:
	kvldskey_free(C->start);
err1:
	free(C);
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, 0x8(%rsp)
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movl $0x38, %edi
callq 0x2220
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x68c3
movq %rax, %rbx
movq %r13, (%rax)
movq %r12, 0x8(%rax)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rbx)
movq $0x0, 0x20(%rbx)
movzbl (%r15), %esi
incq %r15
movq %r15, %rdi
callq 0x55ec
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0x68b6
movq %rax, %r15
movzbl (%r14), %esi
incq %r14
movq %r14, %rdi
callq 0x55ec
movq %rax, 0x30(%rbx)
testq %rax, %rax
je 0x68ae
leaq 0x44(%rip), %rdi        # 0x68d4
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2d94
testq %rax, %rax
jne 0x68c3
movq 0x30(%rbx), %rdi
callq 0x2040
movq 0x28(%rbx), %r15
movq %r15, %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x2040
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/mpool.h
// Function: mpool_free
static inline void
mpool_free(struct mpool * M, void * p)
{
	void ** allocs_new;

	/* Behave consistently with free(NULL). */
	if (p == NULL)
		return;

	/* If we have space in the stack, cache the object. */
	if (M->stacklen < M->allocsize) {
		M->allocs[M->stacklen++] = p;
		return;
	}

	/*
	 * Autotuning: If more than 1/256 of mpool_malloc() calls resulted in
	 * a malloc(), double the stack.
	 */
	if (M->nempties > (M->nallocs >> 8)) {
		/* Sanity check. */
		assert(M->allocsize > 0);

		/* Allocate new stack and copy pointers into it. */
		allocs_new = (void **)malloc(M->allocsize * 2 * sizeof(void *));
		if (allocs_new) {
			memcpy(allocs_new, M->allocs,
			    M->allocsize * sizeof(void *));
			if (M->allocs != M->allocs_static)
				free(M->allocs);
			M->allocs = allocs_new;
			M->allocsize = M->allocsize * 2;
			M->allocs[M->stacklen++] = p;
		} else
			free(p);
	} else
		free(p);

	/* Reset statistics. */
	M->nempties = 0;
	M->nallocs = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x6a5d
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %r13
movq 0x8(%rdi), %rbp
cmpq %rbp, %r13
jae 0x69e0
movq 0x10(%rbx), %rax
leaq 0x1(%r13), %rcx
movq %rcx, (%rbx)
movq %r14, (%rax,%r13,8)
jmp 0x6a5d
movq 0x18(%rbx), %rax
shrq $0x8, %rax
cmpq %rax, 0x20(%rbx)
jbe 0x6a4b
testq %rbp, %rbp
je 0x6a6c
movq %rbp, %rdi
shlq $0x4, %rdi
callq 0x2220
testq %rax, %rax
je 0x6a4b
movq %rax, %r15
movq 0x10(%rbx), %r12
leaq (,%rbp,8), %rdx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2200
cmpq 0x30(%rbx), %r12
je 0x6a33
movq %r12, %rdi
callq 0x2040
movq (%rbx), %r13
movq 0x8(%rbx), %rbp
movq %r15, 0x10(%rbx)
addq %rbp, %rbp
movq %rbp, 0x8(%rbx)
leaq 0x1(%r13), %rax
movq %rax, (%rbx)
movq %r14, (%r15,%r13,8)
jmp 0x6a53
movq %r14, %rdi
callq 0x2040
addq $0x18, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x465d(%rip), %rdi      # 0xb0d0
leaq 0x4667(%rip), %rsi      # 0xb0e1
leaq 0x4682(%rip), %rcx      # 0xb103
movl $0x5a, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/proto_kvlds/proto_kvlds_client.c
// Function: callback_range2
static int
callback_range2(void * cookie, int failed, size_t nkeys,
    struct kvldskey * next,
    struct kvldskey ** keys, struct kvldskey ** values)
{
	struct range2_cookie * C = cookie;
	size_t i;
	int rc = 0;

	/* We've done a request. */
	C->reqdone = 1;

	/* If we failed, record it and skip to poking. */
	if (failed) {
		C->failed = 1;
		goto poke;
	}

	/* Record our new starting position. */
	kvldskey_free(C->start);
	C->start = next;

	/* Invoke callbacks. */
	for (i = 0; i < nkeys; i++) {
		if ((C->callback_item)(C->cookie, keys[i], values[i]))
			rc = -1;
	}

	/* Free keys. */
	for (i = 0; i < nkeys; i++)
		kvldskey_free(keys[i]);
	free(keys);

	/* Free values. */
	for (i = 0; i < nkeys; i++)
		kvldskey_free(values[i]);
	free(values);

poke:
	/* Do another RANGE request or perform the final callback. */
	if (poke_range2(cookie))
		rc = -1;

	/* Return success or failure if anything failed. */
	return (rc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, 0x24(%rdi)
testl %esi, %esi
je 0x6b39
movl $0x1, 0x20(%rbx)
xorl %r13d, %r13d
jmp 0x6bc3
movq %r9, %r14
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %r15
movq 0x28(%rbx), %rdi
callq 0x2040
movq %r13, 0x28(%rbx)
testq %r15, %r15
je 0x6bb0
xorl %r13d, %r13d
xorl %ebp, %ebp
movq 0x18(%rbx), %rdi
movq (%r12,%rbp,8), %rsi
movq (%r14,%rbp,8), %rdx
callq *0x8(%rbx)
negl %eax
movl $0x0, %eax
sbbl %eax, %eax
orl %eax, %r13d
incq %rbp
cmpq %rbp, %r15
jne 0x6b5c
xorl %ebp, %ebp
movq (%r12,%rbp,8), %rdi
callq 0x2040
incq %rbp
cmpq %rbp, %r15
jne 0x6b81
movq %r12, %rdi
callq 0x2040
xorl %r12d, %r12d
movq (%r14,%r12,8), %rdi
callq 0x2040
incq %r12
cmpq %r12, %r15
jne 0x6b9d
jmp 0x6bbb
movq %r12, %rdi
callq 0x2040
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x68d4
xorl %ecx, %ecx
negl %eax
sbbl %ecx, %ecx
orl %r13d, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/wire/wire_requestqueue.c
// Function: wire_requestqueue_init
struct wire_requestqueue *
wire_requestqueue_init(int s)
{
	struct wire_requestqueue * Q;

	/* Allocate structure. */
	if ((Q = malloc(sizeof(struct wire_requestqueue))) == NULL)
		goto err0;

	/* We have not failed, nor have we been destroyed. */
	Q->failed = 0;
	Q->destroyed = 0;

	/* Create a buffered writer. */
	if ((Q->WQ = netbuf_write_init(s, failqueue, Q)) == NULL)
		goto err1;

	/* Create a buffered reader. */
	if ((Q->R = netbuf_read_init(s)) == NULL)
		goto err2;

	/* Create a request ID -> request mapping table. */
	if ((Q->reqs = seqptrmap_init()) == NULL)
		goto err3;

	/* Wait for a packet to arrive. */
	if ((Q->read_cookie =
	    wire_readpacket_wait(Q->R, readpackets, Q)) == NULL)
		goto err4;

	/* Success! */
	return (Q);

err4:
	seqptrmap_free(Q->reqs);
err3:
	netbuf_read_free(Q->R);
err2:
	netbuf_write_free(Q->WQ);
err1:
	free(Q);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
movl $0x28, %edi
callq 0x2220
testq %rax, %rax
je 0x6c7b
movq %rax, %rbx
movq $0x0, 0x20(%rax)
leaq 0x79(%rip), %rsi        # 0x6c87
movl %ebp, %edi
movq %rax, %rdx
callq 0x8404
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x6c73
movl %ebp, %edi
callq 0x806c
movq %rax, (%rbx)
testq %rax, %rax
je 0x6c6a
callq 0x7d5c
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x6c62
movq (%rbx), %rdi
leaq 0x12c(%rip), %rsi       # 0x6d74
movq %rbx, %rdx
callq 0x9596
movq %rax, 0x10(%rbx)
testq %rax, %rax
jne 0x6c7d
movq 0x18(%rbx), %rdi
callq 0x7ec6
movq (%rbx), %rdi
callq 0x839a
movq 0x8(%rbx), %rdi
callq 0x8763
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/wire/wire_requestqueue.c
// Function: failqueue
static int
failqueue(void * cookie)
{
	struct wire_requestqueue * Q = cookie;
	struct request * R;
	int64_t ID;
	int rc = 0;	/* Success unless we fail to schedule a callback. */

	/* This queue is dying. */
	assert(Q->failed == 0);
	Q->failed = 1;

	/* Cancel any pending packet-reading wait. */
	if (Q->read_cookie != NULL) {
		wire_readpacket_wait_cancel(Q->read_cookie);
		Q->read_cookie = NULL;
	}

	/* Free the buffered writer. */
	netbuf_write_free(Q->WQ);

	/* Schedule callbacks for pending requests. */
	while ((ID = seqptrmap_getmin(Q->reqs)) != -1) {
		/* Get the first pending request. */
		R = seqptrmap_get(Q->reqs, ID);

		/* Said request can't be NULL unless seqptrmap is broken. */
		assert(R != NULL);

		/* Schedule a failure callback to occur later. */
		if (events_immediate_register(failreq, R, 0) == NULL)
			rc = -1;

		/* Delete the request from the map. */
		seqptrmap_delete(Q->reqs, ID);
	}

	/* Success unless we failed to schedule a callback. */
	return (rc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x20(%rdi)
jne 0x6d55
movq %rdi, %rbx
movl $0x1, 0x20(%rdi)
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x6cb8
callq 0x970e
movq $0x0, 0x10(%rbx)
movq 0x8(%rbx), %rdi
callq 0x8763
movq 0x18(%rbx), %rdi
callq 0x7e4c
cmpq $-0x1, %rax
je 0x6d27
movq %rax, %r15
xorl %ebp, %ebp
leaq 0x46e(%rip), %r14       # 0x714a
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0x7e2c
testq %rax, %rax
je 0x6d36
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x2d94
cmpq $0x1, %rax
movl $0x0, %eax
sbbl %eax, %eax
orl %eax, %ebp
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0x7e6c
movq 0x18(%rbx), %rdi
callq 0x7e4c
movq %rax, %r15
cmpq $-0x1, %rax
jne 0x6cdc
jmp 0x6d29
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x50b9(%rip), %rdi      # 0xbdf6
leaq 0x5015(%rip), %rsi      # 0xbd59
leaq 0x5095(%rip), %rcx      # 0xbde0
movl $0x8f, %edx
callq 0x2180
leaq 0x5075(%rip), %rdi      # 0xbdd1
leaq 0x4ff6(%rip), %rsi      # 0xbd59
leaq 0x5076(%rip), %rcx      # 0xbde0
movl $0x7d, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/wire/wire_requestqueue.c
// Function: failreq
static int
failreq(void * cookie)
{
	struct request * R = cookie;
	int rc;

	/* Perform a no-response callback. */
	rc = (R->callback)(R->cookie, NULL, 0);

	/* Free the request structure. */
	mpool_request_free(R);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x8(%rdi), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq *(%r14)
movl %eax, %ebx
movq 0xa3a4(%rip), %r13      # 0x11510
movq 0xa3a5(%rip), %rbp      # 0x11518
cmpq %rbp, %r13
jae 0x7193
movq 0xa3a1(%rip), %rax      # 0x11520
leaq 0x1(%r13), %rcx
movq %rcx, 0xa386(%rip)      # 0x11510
movq %r14, (%rax,%r13,8)
jmp 0x7231
movq 0xa38e(%rip), %rax      # 0x11528
shrq $0x8, %rax
cmpq %rax, 0xa38b(%rip)      # 0x11530
jbe 0x721f
testq %rbp, %rbp
je 0x7242
movq %rbp, %rdi
shlq $0x4, %rdi
callq 0x2220
testq %rax, %rax
je 0x721f
movq %rax, %r15
movq 0xa355(%rip), %r12      # 0x11520
leaq (,%rbp,8), %rdx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2200
cmpq 0xa35b(%rip), %r12      # 0x11540
je 0x71fd
movq %r12, %rdi
callq 0x2040
movq 0xa322(%rip), %rbp      # 0x11518
movq 0xa313(%rip), %r13      # 0x11510
movq %r15, 0xa31c(%rip)      # 0x11520
addq %rbp, %rbp
movq %rbp, 0xa30a(%rip)      # 0x11518
leaq 0x1(%r13), %rax
movq %rax, 0xa2f7(%rip)      # 0x11510
movq %r14, (%r15,%r13,8)
jmp 0x7227
movq %r14, %rdi
callq 0x2040
xorps %xmm0, %xmm0
movups %xmm0, 0xa2f7(%rip)     # 0x11528
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3e87(%rip), %rdi      # 0xb0d0
leaq 0x3e91(%rip), %rsi      # 0xb0e1
leaq 0x3eac(%rip), %rcx      # 0xb103
movl $0x5a, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/wire/wire_requestqueue.c
// Function: wire_requestqueue_add
int
wire_requestqueue_add(struct wire_requestqueue * Q,
    uint8_t * buf, size_t buflen,
    int (* callback)(void *, uint8_t *, size_t), void * cookie)
{
	uint8_t * wbuf;

	/* Start writing the request. */
	if ((wbuf = wire_requestqueue_add_getbuf(Q, buflen,
	    callback, cookie)) == NULL)
		goto err0;

	/* Copy the request data into the provided buffer. */
	memcpy(wbuf, buf, buflen);

	/* Finish writing the request. */
	if (wire_requestqueue_add_done(Q, wbuf, buflen))
		goto err0;

	/* Success! */
	return (0);

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x6f66
testq %rax, %rax
je 0x72c4
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2200
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x7261
testl %eax, %eax
je 0x72cb
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x72cd
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/wire/wire_requestqueue.c
// Function: wire_requestqueue_free
void
wire_requestqueue_free(struct wire_requestqueue * Q)
{

	/* Sanity check: The queue must have been destroyed. */
	assert(Q->destroyed);

	/* Sanity check: There must be no pending requests. */
	assert(seqptrmap_getmin(Q->reqs) == -1);

	/* Free the pending request map. */
	seqptrmap_free(Q->reqs);

	/* Free the buffered reader. */
	netbuf_read_free(Q->R);

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

// Assembly:
pushq %rbx
cmpl $0x0, 0x24(%rdi)
je 0x7320
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x7e4c
cmpq $-0x1, %rax
jne 0x733f
movq 0x18(%rbx), %rdi
callq 0x7ec6
movq (%rbx), %rdi
callq 0x839a
movq %rbx, %rdi
popq %rbx
jmp 0x2040
leaq 0x4a25(%rip), %rdi      # 0xbd4c
leaq 0x4a2b(%rip), %rsi      # 0xbd59
leaq 0x4a44(%rip), %rcx      # 0xbd79
movl $0x161, %edx            # imm = 0x161
callq 0x2180
leaq 0x4a6b(%rip), %rdi      # 0xbdb1
leaq 0x4a0c(%rip), %rsi      # 0xbd59
leaq 0x4a25(%rip), %rcx      # 0xbd79
movl $0x164, %edx            # imm = 0x164
callq 0x2180
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/wire/wire_writepacket.c
// Function: wire_writepacket_getbuf
uint8_t *
wire_writepacket_getbuf(struct netbuf_write * W, uint64_t ID, size_t len)
{
	CRC32C_CTX ctx;
	uint8_t * wbuf;

	/* Sanity-check packet length. */
	assert(len <= UINT32_MAX);
	assert(len <= SIZE_MAX - 20);

	/* Reserve space to write the serialized packet into. */
	if ((wbuf = netbuf_write_reserve(W, len + 20)) == NULL)
		goto err0;

	/* Construct the header in-place. */
	be64enc(&wbuf[0], ID);
	be32enc(&wbuf[8], (uint32_t)len);
	CRC32C_Init(&ctx);
	CRC32C_Update(&ctx, wbuf, 12);
	CRC32C_Final(&wbuf[12], &ctx);

	/* Return a pointer to where the data should be written. */
	return (&wbuf[16]);

err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rax
shrq $0x20, %rax
jne 0x7463
movq %rsi, %r14
movq %rdx, %r15
leaq 0x14(%rdx), %rsi
callq 0x84cf
testq %rax, %rax
je 0x7454
movq %rax, %rbx
movl %r14d, %eax
bswapl %eax
movl %eax, 0x4(%rbx)
movq %r14, %rax
shrq $0x20, %rax
movb %al, 0x3(%rbx)
movq %r14, %rax
shrq $0x28, %rax
movb %al, 0x2(%rbx)
movq %r14, %rax
shrq $0x30, %rax
movb %al, 0x1(%rbx)
shrq $0x38, %r14
movb %r14b, (%rbx)
movq %r15, %rcx
movb %cl, 0xb(%rbx)
movb %ch, 0xa(%rbx)
movl %ecx, %eax
shrl $0x10, %eax
movb %al, 0x9(%rbx)
shrl $0x18, %ecx
movb %cl, 0x8(%rbx)
leaq 0xc(%rsp), %r14
movq %r14, %rdi
callq 0x7548
movl $0xc, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x77f8
leaq 0xc(%rbx), %rdi
movq %r14, %rsi
callq 0x78e0
addq $0x10, %rbx
jmp 0x7456
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x49b9(%rip), %rdi      # 0xbe23
leaq 0x49c4(%rip), %rsi      # 0xbe35
leaq 0x49dc(%rip), %rcx      # 0xbe54
movl $0x18, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/wire/wire_writepacket.c
// Function: wire_writepacket_done
int
wire_writepacket_done(struct netbuf_write * W, uint8_t * wbuf, size_t len)
{
	CRC32C_CTX ctx;
	uint8_t cbuf[4];
	size_t i;
	uint8_t * header_crc;

	/*
	 * This is safe due to the requirement that ${wbuf} be the pointer
	 * returned by wire_writepacket_getbuf -- that function returns
	 * &wbuf[16], so position [-4] in the new buffer is still within
	 * the allocated memory.
	 */
	header_crc = &wbuf[-4];

	/* Compute the CRC32C of the packet data. */
	CRC32C_Init(&ctx);
	CRC32C_Update(&ctx, wbuf, len);
	CRC32C_Final(cbuf, &ctx);

	/* Write the trailer. */
	for (i = 0; i < 4; i++)
		wbuf[len + i] = cbuf[i] ^ header_crc[i];

	/* We've finished constructing the packet. */
	if (netbuf_write_consume(W, len + 20))
		goto err0;

	/* Success! */
	return (0);

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x4(%rsp), %r12
movq %r12, %rdi
callq 0x7548
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x77f8
movq %rsp, %rdi
movq %r12, %rsi
callq 0x78e0
leaq (%r15,%rbx), %rax
xorl %ecx, %ecx
movb -0x4(%r15,%rcx), %dl
xorb (%rsp,%rcx), %dl
movb %dl, (%rax,%rcx)
incq %rcx
cmpq $0x4, %rcx
jne 0x74bf
addq $0x14, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x858a
xorl %ecx, %ecx
negl %eax
sbbl %ecx, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/wire/wire_writepacket.c
// Function: wire_writepacket
int
wire_writepacket(struct netbuf_write * W, const struct wire_packet * packet)
{
	uint8_t * wbuf;

	/* Write the packet header. */
	if ((wbuf =
	    wire_writepacket_getbuf(W, packet->ID, packet->len)) == NULL)
		goto err0;

	/* Copy the packet data into place. */
	memcpy(wbuf, packet->buf, packet->len);

	/* Write the packet trailer. */
	if (wire_writepacket_done(W, wbuf, packet->len))
		goto err0;

	/* Success! */
	return (0);

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
callq 0x73b4
testq %rax, %rax
je 0x7538
movq %rax, %r15
movq 0x8(%r14), %rdx
movq 0x10(%r14), %rsi
movq %rax, %rdi
callq 0x2200
movq 0x8(%r14), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7482
testl %eax, %eax
je 0x753f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x7541
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/alg/crc32c.c
// Function: CRC32C_Update
void
CRC32C_Update(CRC32C_CTX * ctx, const uint8_t * buf, size_t len)
{

#if defined(CPUSUPPORT_X86_SSE42)
	if ((len >= 8) && (hwaccel == HW_X86_CRC32)) {
		ctx->state = CRC32C_Update_SSE42(ctx->state, buf, len);
		return;
	}
#endif
#if defined(CPUSUPPORT_ARM_CRC32_64)
	if ((len >= 8) && (hwaccel == HW_ARM_CRC32_64)) {
		ctx->state = CRC32C_Update_ARM(ctx->state, buf, len);
		return;
	}
#endif

	/* Handle blocks of 4 bytes. */
	for (; len >= 4; len -= 4, buf += 4) {
		ctx->state =
		    T0[((ctx->state >> 24) & 0xff) ^ buf[3]] ^
		    T1[((ctx->state >> 16) & 0xff) ^ buf[2]] ^
		    T2[((ctx->state >> 8)  & 0xff) ^ buf[1]] ^
		    T3[((ctx->state)       & 0xff) ^ buf[0]];
	}

	/* Handle individual bytes. */
	for (; len > 0; len--, buf++) {
		ctx->state = (ctx->state >> 8) ^
		    T0[((ctx->state) & 0xff) ^ buf[0]];
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x8, %rdx
jb 0x781f
cmpl $0x1, 0x9d41(%rip)      # 0x11550
jne 0x781f
movl (%rbx), %edi
callq 0x78f8
movl %eax, (%rbx)
jmp 0x78d5
leaq 0x39eaa(%rip), %rax     # 0x416d0
cmpq $0x4, %rdx
jb 0x78a8
movl (%rbx), %r10d
movl $0xff, %ecx
leaq 0x3a295(%rip), %rdi     # 0x41ad0
leaq 0x3a68e(%rip), %r8      # 0x41ed0
leaq 0x3aa87(%rip), %r9      # 0x422d0
movl %r10d, %r11d
shrl $0x18, %r11d
movzbl 0x3(%rsi), %r14d
xorl %r11d, %r14d
movl %r10d, %r11d
shrl $0x10, %r11d
andl %ecx, %r11d
movzbl 0x2(%rsi), %r15d
xorl %r11d, %r15d
movl (%rdi,%r15,4), %r11d
xorl (%rax,%r14,4), %r11d
movl %r10d, %ebp
shrl $0x8, %ebp
andl %ecx, %ebp
movzbl 0x1(%rsi), %r14d
xorl %ebp, %r14d
xorl (%r8,%r14,4), %r11d
andl %ecx, %r10d
movzbl (%rsi), %r14d
xorl %r10d, %r14d
xorl (%r9,%r14,4), %r11d
movl %r11d, (%rbx)
addq $-0x4, %rdx
addq $0x4, %rsi
movl %r11d, %r10d
cmpq $0x3, %rdx
ja 0x7849
testq %rdx, %rdx
je 0x78d5
movl (%rbx), %r8d
xorl %ecx, %ecx
movl %r8d, %edi
shrl $0x8, %edi
movzbl %r8b, %r8d
movzbl (%rsi,%rcx), %r9d
xorl %r8d, %r9d
xorl (%rax,%r9,4), %edi
movl %edi, (%rbx)
incq %rcx
movl %edi, %r8d
cmpq %rcx, %rdx
jne 0x78b5
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/alg/crc32c_sse42.c
// Function: CRC32C_Update_SSE42
uint32_t
CRC32C_Update_SSE42(uint32_t state, const uint8_t * buf, size_t len)
{
	size_t pre_block;
	size_t remaining_bytes;
	size_t in_block;
	size_t i = 0;

	/* Sanity test. */
	assert(len >= 8);

	/*
	 * Calculate how many bytes are before an aligned block.  Assume that
	 * the (uintptr_t) value indicates the memory layout.
	 */
	pre_block = (8 - (uintptr_t)buf) & 7;

	/* Calculate how many bytes are in aligned blocks. */
	remaining_bytes = len - pre_block;
	in_block = remaining_bytes - (remaining_bytes % 8);

	/* Process bytes before the alignment. */
	for (; i < pre_block; i++)
		state = _mm_crc32_u8(state, buf[i]);

	/* If we would process a block, ensure that it's aligned. */
	assert(!((i < in_block) && !((((uintptr_t)&buf[i]) & 7) == 0)));

	/*
	 * Process blocks of 8.  It's ok if (i % 8 != 0), because we're
	 * checking that (i < in_block), not (i != in_block).  For example,
	 * if we start with i = 4 and want 1 block, we'll end up at i == 12.
	 */
	for (; i < in_block; i += 8) {
#ifdef CPUSUPPORT_X86_SSE42_64
		state = (uint32_t)_mm_crc32_u64(state,
		    *(const uint64_t *)&buf[i]);
#else
		/* Only process 32 bits at once. */
		state = (uint32_t)_mm_crc32_u32(state,
		    *(const uint32_t *)&buf[i]);
		state = (uint32_t)_mm_crc32_u32(state,
		    *(const uint32_t *)&buf[i + 4]);
#endif
	}

	/* Ensure that we don't have too many bytes remaining. */
	assert((len - i) < 8);

	/* Process any remaining bytes. */
	for (; i < len; i++)
		state = _mm_crc32_u8(state, buf[i]);

	return (state);
}

// Assembly:
pushq %rax
cmpq $0x7, %rdx
jbe 0x7979
movl %esi, %eax
negl %eax
andl $0x7, %eax
movq %rdx, %rcx
subq %rax, %rcx
andq $-0x8, %rcx
testl %eax, %eax
je 0x7926
xorl %r8d, %r8d
crc32b (%rsi,%r8), %edi
incq %r8
cmpq %r8, %rax
jne 0x7917
cmpq %rcx, %rax
setae %r8b
leal (%rax,%rsi), %r9d
testb $0x7, %r9b
sete %r9b
orb %r8b, %r9b
cmpb $0x1, %r9b
jne 0x7998
cmpq %rcx, %rax
jae 0x7956
movl %edi, %edi
crc32q (%rsi,%rax), %rdi
addq $0x8, %rax
jmp 0x7942
movq %rdx, %rcx
subq %rax, %rcx
cmpq $0x7, %rcx
ja 0x79b7
cmpq %rax, %rdx
jbe 0x7975
crc32b (%rsi,%rax), %edi
incq %rax
cmpq %rax, %rdx
jne 0x7967
movl %edi, %eax
popq %rcx
retq
leaq 0x459a(%rip), %rdi      # 0xbf1a
leaq 0x459c(%rip), %rsi      # 0xbf23
leaq 0x45b7(%rip), %rcx      # 0xbf45
movl $0x22, %edx
callq 0x2180
leaq 0x45e6(%rip), %rdi      # 0xbf85
leaq 0x457d(%rip), %rsi      # 0xbf23
leaq 0x4598(%rip), %rcx      # 0xbf45
movl $0x33, %edx
callq 0x2180
leaq 0x45ff(%rip), %rdi      # 0xbfbd
leaq 0x455e(%rip), %rsi      # 0xbf23
leaq 0x4579(%rip), %rcx      # 0xbf45
movl $0x48, %edx
callq 0x2180
nop