LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0xbc4c(%rip)            # 0x11468
movq %rsi, %r12
movq 0xbc2a(%rip), %rax      # 0x11450
testq %rax, %rax
je 0x5844
movq 0xbc2e(%rip), %rcx      # 0x11460
leaq -0x1(%rax), %rdx
movq %rdx, 0xbc13(%rip)      # 0x11450
movq -0x8(%rcx,%rax,8), %r15
jmp 0x587d
movq %rdi, %rbp
incq 0xbc22(%rip)            # 0x11470
cmpl $0x0, 0xbc23(%rip)      # 0x11478
jne 0x586d
movq 0xbc2a(%rip), %rdi      # 0x11488
callq 0xa050
movl $0x1, 0xbc0b(%rip)      # 0x11478
movl $0x18, %edi
callq 0x2220
movq %rax, %r15
movq %rbp, %rdi
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %r15, %r15
je 0x5934
movq %rbx, (%r15)
movq %r13, 0x8(%r15)
leaq 0x5fa1(%rip), %rax      # 0xb83a
movq %rax, 0x10(%r15)
movzbl (%r12), %eax
movzbl (%r14), %ecx
leaq 0x6(%rax,%rcx), %r13
leaq 0xb2(%rip), %rdx        # 0x5964
movq %rdi, (%rsp)
movq %r13, %rsi
movq %r15, %rcx
callq 0x6f4d
testq %rax, %rax
je 0x5921
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 0x5945
movq (%rsp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x7229
testl %eax, %eax
je 0x5932
leaq 0xbb28(%rip), %rdi      # 0x11450
movq %r15, %rsi
callq 0x69b1
jmp 0x5934
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5ef2(%rip), %rdi      # 0xb83e
leaq 0x5efc(%rip), %rsi      # 0xb84f
leaq 0x5f1d(%rip), %rcx      # 0xb877
movl $0x1d4, %edx            # imm = 0x1D4
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/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 0x59af
cmpq $0x4, %rdx
jae 0x5983
leaq 0x62e1(%rip), %rdx      # 0xbc62
jmp 0x5992
movl (%rsi), %eax
bswapl %eax
testl %eax, %eax
je 0x59d1
leaq 0x62dd(%rip), %rdx      # 0xbc6f
movq 0x10(%rbx), %rsi
leaq 0x62a1(%rip), %rdi      # 0xbc3e
xorl %eax, %eax
callq 0x514b
callq 0x2090
movl $0x0, (%rax)
movq 0x8(%rbx), %rdi
movl %ebp, %esi
callq *(%rbx)
movl %eax, %ebp
leaq 0xba90(%rip), %rdi      # 0x11450
movq %rbx, %rsi
callq 0x69b1
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x59af
// File: /workspace/github_c_makefile_star2_O1/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 0x5b95
cmpq $0x4, %rdx
jae 0x5b9a
leaq 0x60cf(%rip), %rdx      # 0xbc62
jmp 0x5bad
xorl %r14d, %r14d
jmp 0x5bd1
movl (%rsi), %r14d
bswapl %r14d
cmpl $0x2, %r14d
jb 0x5bcf
leaq 0x60c2(%rip), %rdx      # 0xbc6f
movq 0x10(%rbx), %rsi
leaq 0x6086(%rip), %rdi      # 0xbc3e
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x514b
callq 0x2090
movl $0x0, (%rax)
jmp 0x5bd1
xorl %ebp, %ebp
movq 0x8(%rbx), %rdi
movl %ebp, %esi
movl %r14d, %edx
callq *(%rbx)
movl %eax, %ebp
leaq 0xb8ab(%rip), %rdi      # 0x11490
movq %rbx, %rsi
callq 0x69b1
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xb736(%rip)            # 0x114a8
movq %rsi, %r12
movq 0xb714(%rip), %rax      # 0x11490
testq %rax, %rax
je 0x5d9a
movq 0xb718(%rip), %rcx      # 0x114a0
leaq -0x1(%rax), %rdx
movq %rdx, 0xb6fd(%rip)      # 0x11490
movq -0x8(%rcx,%rax,8), %r15
jmp 0x5dd3
movq %rdi, %rbp
incq 0xb70c(%rip)            # 0x114b0
cmpl $0x0, 0xb70d(%rip)      # 0x114b8
jne 0x5dc3
movq 0xb714(%rip), %rdi      # 0x114c8
callq 0xa050
movl $0x1, 0xb6f5(%rip)      # 0x114b8
movl $0x18, %edi
callq 0x2220
movq %rax, %r15
movq %rbp, %rdi
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %r15, %r15
je 0x5e8a
movq %rbx, (%r15)
movq %r13, 0x8(%r15)
leaq 0x5c4b(%rip), %rax      # 0xba3a
movq %rax, 0x10(%r15)
movzbl (%r12), %eax
movzbl (%r14), %ecx
leaq 0x6(%rax,%rcx), %r13
leaq -0x293(%rip), %rdx      # 0x5b75
movq %rdi, (%rsp)
movq %r13, %rsi
movq %r15, %rcx
callq 0x6f4d
testq %rax, %rax
je 0x5e77
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 0x5e9b
movq (%rsp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x7229
testl %eax, %eax
je 0x5e88
leaq 0xb612(%rip), %rdi      # 0x11490
movq %r15, %rsi
callq 0x69b1
jmp 0x5e8a
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x599c(%rip), %rdi      # 0xb83e
leaq 0x59a6(%rip), %rsi      # 0xb84f
leaq 0x5b91(%rip), %rcx      # 0xba41
movl $0x28c, %edx            # imm = 0x28C
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/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 0xb596(%rip)            # 0x11468
movq %rsi, %r14
movq %rdi, %rbx
movq 0xb571(%rip), %rax      # 0x11450
testq %rax, %rax
je 0x5efd
movq 0xb575(%rip), %rcx      # 0x11460
leaq -0x1(%rax), %rdx
movq %rdx, 0xb55a(%rip)      # 0x11450
movq -0x8(%rcx,%rax,8), %r15
jmp 0x5f30
incq 0xb56c(%rip)            # 0x11470
cmpl $0x0, 0xb56d(%rip)      # 0x11478
jne 0x5f23
movq 0xb574(%rip), %rdi      # 0x11488
callq 0xa050
movl $0x1, 0xb555(%rip)      # 0x11478
movl $0x18, %edi
callq 0x2220
movq %rax, %r15
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %r15, %r15
je 0x5fb2
movq %r13, (%r15)
movq %r12, 0x8(%r15)
leaq 0x5b89(%rip), %rax      # 0xbad1
movq %rax, 0x10(%r15)
movzbl (%r14), %r12d
addq $0x5, %r12
leaq -0x5f7(%rip), %rdx      # 0x5964
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x6f4d
testq %rax, %rax
je 0x5f9f
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 0x7229
testl %eax, %eax
je 0x5fb0
leaq 0xb4aa(%rip), %rdi      # 0x11450
movq %r15, %rsi
callq 0x69b1
jmp 0x5fb2
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_O1/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 0xb4ca(%rip)            # 0x114a8
movq %rsi, %r12
movq 0xb4a8(%rip), %rax      # 0x11490
testq %rax, %rax
je 0x6006
movq 0xb4ac(%rip), %rcx      # 0x114a0
leaq -0x1(%rax), %rdx
movq %rdx, 0xb491(%rip)      # 0x11490
movq -0x8(%rcx,%rax,8), %r15
jmp 0x603f
movq %rdi, %rbp
incq 0xb4a0(%rip)            # 0x114b0
cmpl $0x0, 0xb4a1(%rip)      # 0x114b8
jne 0x602f
movq 0xb4a8(%rip), %rdi      # 0x114c8
callq 0xa050
movl $0x1, 0xb489(%rip)      # 0x114b8
movl $0x18, %edi
callq 0x2220
movq %rax, %r15
movq %rbp, %rdi
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %r15, %r15
je 0x60f6
movq %rbx, (%r15)
movq %r13, 0x8(%r15)
leaq 0x5a7d(%rip), %rax      # 0xbad8
movq %rax, 0x10(%r15)
movzbl (%r12), %eax
movzbl (%r14), %ecx
leaq 0x6(%rax,%rcx), %r13
leaq -0x4ff(%rip), %rdx      # 0x5b75
movq %rdi, (%rsp)
movq %r13, %rsi
movq %r15, %rcx
callq 0x6f4d
testq %rax, %rax
je 0x60e3
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 0x6107
movq (%rsp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x7229
testl %eax, %eax
je 0x60f4
leaq 0xb3a6(%rip), %rdi      # 0x11490
movq %r15, %rsi
callq 0x69b1
jmp 0x60f6
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5730(%rip), %rdi      # 0xb83e
leaq 0x573a(%rip), %rsi      # 0xb84f
leaq 0x59c0(%rip), %rcx      # 0xbadc
movl $0x2fa, %edx            # imm = 0x2FA
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/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 0xb3aa(%rip)            # 0x114e8
movq %rsi, %r14
movq %rdi, %rbx
movq 0xb385(%rip), %rax      # 0x114d0
testq %rax, %rax
je 0x6169
movq 0xb389(%rip), %rcx      # 0x114e0
leaq -0x1(%rax), %rdx
movq %rdx, 0xb36e(%rip)      # 0x114d0
movq -0x8(%rcx,%rax,8), %r15
jmp 0x619c
incq 0xb380(%rip)            # 0x114f0
cmpl $0x0, 0xb381(%rip)      # 0x114f8
jne 0x618f
movq 0xb388(%rip), %rdi      # 0x11508
callq 0xa050
movl $0x1, 0xb369(%rip)      # 0x114f8
movl $0x10, %edi
callq 0x2220
movq %rax, %r15
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %r15, %r15
je 0x6213
movq %r13, (%r15)
movq %r12, 0x8(%r15)
movzbl (%r14), %r12d
addq $0x5, %r12
leaq 0x68(%rip), %rdx        # 0x6224
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x6f4d
testq %rax, %rax
je 0x6200
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 0x7229
testl %eax, %eax
je 0x6211
leaq 0xb2c9(%rip), %rdi      # 0x114d0
movq %r15, %rsi
callq 0x69b1
jmp 0x6213
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_O1/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 %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq $0x0, 0x8(%rsp)
movl $0x1, %ecx
testq %rsi, %rsi
je 0x62e5
movq %rdx, %r14
cmpq $0x3, %rdx
ja 0x6266
leaq 0x59e8(%rip), %rdi      # 0xbc3e
leaq 0x5a24(%rip), %rsi      # 0xbc81
leaq 0x59fe(%rip), %rdx      # 0xbc62
jmp 0x62ce
movl (%rsi), %eax
bswapl %eax
cmpl $0x2, %eax
jb 0x6286
leaq 0x59c8(%rip), %rdi      # 0xbc3e
leaq 0x5a04(%rip), %rsi      # 0xbc81
leaq 0x59eb(%rip), %rdx      # 0xbc6f
jmp 0x62ce
testl %eax, %eax
je 0x6297
movq $0x0, 0x8(%rsp)
xorl %eax, %eax
jmp 0x62ae
addq $0x4, %rsi
leaq -0x4(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x5635
testq %rax, %rax
je 0x630e
addq $0x4, %rax
xorl %ecx, %ecx
cmpq %r14, %rax
je 0x62e5
leaq 0x597e(%rip), %rdi      # 0xbc3e
leaq 0x59ba(%rip), %rsi      # 0xbc81
leaq 0x59d8(%rip), %rdx      # 0xbca6
xorl %eax, %eax
callq 0x514b
callq 0x2090
movl $0x0, (%rax)
movl $0x1, %ecx
movq 0x8(%rbx), %rdi
movq 0x8(%rsp), %rdx
movl %ecx, %esi
callq *(%rbx)
movl %eax, %ebp
leaq 0xb1d5(%rip), %rdi      # 0x114d0
movq %rbx, %rsi
callq 0x69b1
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x2090
cmpl $0x0, (%rax)
je 0x6332
movq %rax, %r14
leaq 0x5963(%rip), %rdi      # 0xbc85
xorl %eax, %eax
callq 0x502c
movl $0x0, (%r14)
jmp 0x62e0
leaq 0x594c(%rip), %rdi      # 0xbc85
xorl %eax, %eax
callq 0x514b
jmp 0x62e0
// File: /workspace/github_c_makefile_star2_O1/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 0x6446
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        # 0x6474
movq %r12, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rcx
callq 0x6f4d
testq %rax, %rax
je 0x6435
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 0x6455
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x7229
testl %eax, %eax
je 0x6444
movq %r14, %rdi
callq 0x2040
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x6446
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x53e2(%rip), %rdi      # 0xb83e
leaq 0x53ec(%rip), %rsi      # 0xb84f
leaq 0x56ff(%rip), %rcx      # 0xbb69
movl $0x375, %edx            # imm = 0x375
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/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 0x68c8
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 0x55d0
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0x68bb
movzbl (%r14), %esi
incq %r14
movq %r14, %rdi
callq 0x55d0
movq %rax, 0x30(%rbx)
testq %rax, %rax
je 0x68b2
leaq 0x41(%rip), %rdi        # 0x68d9
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2d70
testq %rax, %rax
jne 0x68c8
movq 0x30(%rbx), %rdi
callq 0x2040
movq 0x28(%rbx), %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_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x6a5b
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %r15
cmpq %r15, %rax
jae 0x69e6
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movq %r14, (%rcx,%rax,8)
jmp 0x6a5b
movq 0x18(%rbx), %rax
shrq $0x8, %rax
cmpq %rax, 0x20(%rbx)
jbe 0x6a49
testq %r15, %r15
je 0x6a65
movq %r15, %rdi
shlq $0x4, %rdi
callq 0x2220
testq %rax, %rax
je 0x6a49
movq %rax, %r12
movq 0x10(%rbx), %r13
shlq $0x3, %r15
movq %rax, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x2200
cmpq 0x30(%rbx), %r13
je 0x6a31
movq %r13, %rdi
callq 0x2040
movq %r12, 0x10(%rbx)
shlq 0x8(%rbx)
movq (%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%rbx)
movq %r14, (%r12,%rax,8)
jmp 0x6a51
movq %r14, %rdi
callq 0x2040
addq $0x18, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x4664(%rip), %rdi      # 0xb0d0
leaq 0x466e(%rip), %rsi      # 0xb0e1
leaq 0x4689(%rip), %rcx      # 0xb103
movl $0x5a, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/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 0x6b32
movl $0x1, 0x20(%rbx)
xorl %r13d, %r13d
jmp 0x6bb9
movq %r9, %r14
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %r15
movq 0x28(%rbx), %rdi
callq 0x2040
movq %r13, 0x28(%rbx)
xorl %r13d, %r13d
testq %r15, %r15
je 0x6b78
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 0x6b55
testq %r15, %r15
je 0x6b90
xorl %ebp, %ebp
movq (%r12,%rbp,8), %rdi
callq 0x2040
incq %rbp
cmpq %rbp, %r15
jne 0x6b7f
movq %r12, %rdi
callq 0x2040
testq %r15, %r15
je 0x6bb1
xorl %r12d, %r12d
movq (%r14,%r12,8), %rdi
callq 0x2040
incq %r12
cmpq %r12, %r15
jne 0x6ba0
movq %r14, %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x68d9
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
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x6c6f
movq %rax, %rbx
movq $0x0, 0x20(%rax)
leaq 0x79(%rip), %rsi        # 0x6c7b
movl %ebp, %edi
movq %rax, %rdx
callq 0x83cc
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x6c67
movl %ebp, %edi
callq 0x8038
movq %rax, (%rbx)
testq %rax, %rax
je 0x6c5e
callq 0x7d34
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x6c56
movq (%rbx), %rdi
leaq 0x12c(%rip), %rsi       # 0x6d68
movq %rbx, %rdx
callq 0x953d
movq %rax, 0x10(%rbx)
testq %rax, %rax
jne 0x6c71
movq 0x18(%rbx), %rdi
callq 0x7e94
movq (%rbx), %rdi
callq 0x8360
movq 0x8(%rbx), %rdi
callq 0x874b
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_O1/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 0x6d49
movq %rdi, %rbx
movl $0x1, 0x20(%rdi)
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x6cac
callq 0x96b5
movq $0x0, 0x10(%rbx)
movq 0x8(%rbx), %rdi
callq 0x874b
movq 0x18(%rbx), %rdi
callq 0x7e24
cmpq $-0x1, %rax
je 0x6d1b
movq %rax, %r15
xorl %ebp, %ebp
leaq 0x454(%rip), %r14       # 0x7124
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0x7e04
testq %rax, %rax
je 0x6d2a
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x2d70
cmpq $0x1, %rax
movl $0x0, %eax
sbbl %eax, %eax
orl %eax, %ebp
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0x7e44
movq 0x18(%rbx), %rdi
callq 0x7e24
movq %rax, %r15
cmpq $-0x1, %rax
jne 0x6cd0
jmp 0x6d1d
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x50b5(%rip), %rdi      # 0xbde6
leaq 0x5011(%rip), %rsi      # 0xbd49
leaq 0x5091(%rip), %rcx      # 0xbdd0
movl $0x8f, %edx
callq 0x2180
leaq 0x5071(%rip), %rdi      # 0xbdc1
leaq 0x4ff2(%rip), %rsi      # 0xbd49
leaq 0x5072(%rip), %rcx      # 0xbdd0
movl $0x7d, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq *(%r14)
movl %eax, %ebx
movq 0xa3cc(%rip), %rax      # 0x11510
movq 0xa3cd(%rip), %r15      # 0x11518
cmpq %r15, %rax
jae 0x716b
movq 0xa3c9(%rip), %rcx      # 0x11520
leaq 0x1(%rax), %rdx
movq %rdx, 0xa3ae(%rip)      # 0x11510
movq %r14, (%rcx,%rax,8)
jmp 0x71fe
movq 0xa3b6(%rip), %rax      # 0x11528
shrq $0x8, %rax
cmpq %rax, 0xa3b3(%rip)      # 0x11530
jbe 0x71ec
testq %r15, %r15
je 0x720a
movq %r15, %rdi
shlq $0x4, %rdi
callq 0x2220
testq %rax, %rax
je 0x71ec
movq %rax, %r12
movq 0xa37d(%rip), %r13      # 0x11520
shlq $0x3, %r15
movq %rax, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x2200
cmpq 0xa384(%rip), %r13      # 0x11540
je 0x71c6
movq %r13, %rdi
callq 0x2040
movq %r12, 0xa353(%rip)      # 0x11520
shlq 0xa344(%rip)            # 0x11518
movq 0xa335(%rip), %rax      # 0x11510
leaq 0x1(%rax), %rcx
movq %rcx, 0xa32a(%rip)      # 0x11510
movq %r14, (%r12,%rax,8)
jmp 0x71f4
movq %r14, %rdi
callq 0x2040
xorps %xmm0, %xmm0
movups %xmm0, 0xa32a(%rip)     # 0x11528
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x3ebf(%rip), %rdi      # 0xb0d0
leaq 0x3ec9(%rip), %rsi      # 0xb0e1
leaq 0x3ee4(%rip), %rcx      # 0xb103
movl $0x5a, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/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 0x6f4d
testq %rax, %rax
je 0x728c
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2200
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x7229
testl %eax, %eax
je 0x7293
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x7295
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x72e8
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x7e24
cmpq $-0x1, %rax
jne 0x7307
movq 0x18(%rbx), %rdi
callq 0x7e94
movq (%rbx), %rdi
callq 0x8360
movq %rbx, %rdi
popq %rbx
jmp 0x2040
leaq 0x4a4d(%rip), %rdi      # 0xbd3c
leaq 0x4a53(%rip), %rsi      # 0xbd49
leaq 0x4a6c(%rip), %rcx      # 0xbd69
movl $0x161, %edx            # imm = 0x161
callq 0x2180
leaq 0x4a93(%rip), %rdi      # 0xbda1
leaq 0x4a34(%rip), %rsi      # 0xbd49
leaq 0x4a4d(%rip), %rcx      # 0xbd69
movl $0x164, %edx            # imm = 0x164
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/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 0x742b
movq %rsi, %r14
movq %rdx, %r15
leaq 0x14(%rdx), %rsi
callq 0x849b
testq %rax, %rax
je 0x741c
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 0x7510
movl $0xc, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x77c0
leaq 0xc(%rbx), %rdi
movq %r14, %rsi
callq 0x78a8
addq $0x10, %rbx
jmp 0x741e
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x49e1(%rip), %rdi      # 0xbe13
leaq 0x49ec(%rip), %rsi      # 0xbe25
leaq 0x4a04(%rip), %rcx      # 0xbe44
movl $0x18, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/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 0x7510
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x77c0
movq %rsp, %rdi
movq %r12, %rsi
callq 0x78a8
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 0x7487
addq $0x14, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8565
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_O1/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 0x737c
testq %rax, %rax
je 0x7500
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 0x744a
testl %eax, %eax
je 0x7507
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x7509
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x77e7
cmpl $0x1, 0x9d79(%rip)      # 0x11550
jne 0x77e7
movl (%rbx), %edi
callq 0x78c0
movl %eax, (%rbx)
jmp 0x789d
leaq 0x39ee2(%rip), %rax     # 0x416d0
cmpq $0x4, %rdx
jb 0x7870
movl (%rbx), %r10d
movl $0xff, %ecx
leaq 0x3a2cd(%rip), %rdi     # 0x41ad0
leaq 0x3a6c6(%rip), %r8      # 0x41ed0
leaq 0x3aabf(%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 0x7811
testq %rdx, %rdx
je 0x789d
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 0x787d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../libcperciva/alg/crc32c.c
// Function: CRC32C_Final
void
CRC32C_Final(uint8_t cbuf[4], const CRC32C_CTX * ctx)
{

	/* Copy state out. */
	cbuf[0] = ctx->state & 0xff;
	cbuf[1] = (ctx->state >> 8) & 0xff;
	cbuf[2] = (ctx->state >> 16) & 0xff;
	cbuf[3] = (ctx->state >> 24) & 0xff;
}

// Assembly:
movb (%rsi), %al
movb %al, (%rdi)
movb 0x1(%rsi), %al
movb %al, 0x1(%rdi)
movb 0x2(%rsi), %al
movb %al, 0x2(%rdi)
movb 0x3(%rsi), %al
movb %al, 0x3(%rdi)
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x7945
movl %esi, %eax
negl %eax
andl $0x7, %eax
movq %rdx, %rcx
subq %rax, %rcx
andq $-0x8, %rcx
testl %eax, %eax
je 0x78f0
xorl %r8d, %r8d
crc32b (%rsi,%r8), %edi
incq %r8
cmpq %r8, %rax
jne 0x78df
jmp 0x78f2
xorl %eax, %eax
cmpq %rcx, %rax
setae %r8b
leal (%rax,%rsi), %r9d
testb $0x7, %r9b
sete %r9b
orb %r8b, %r9b
cmpb $0x1, %r9b
jne 0x7964
cmpq %rcx, %rax
jae 0x7922
movl %edi, %edi
crc32q (%rsi,%rax), %rdi
addq $0x8, %rax
jmp 0x790e
movq %rdx, %rcx
subq %rax, %rcx
cmpq $0x7, %rcx
ja 0x7983
cmpq %rax, %rdx
jbe 0x7941
crc32b (%rsi,%rax), %edi
incq %rax
cmpq %rax, %rdx
jne 0x7933
movl %edi, %eax
popq %rcx
retq
leaq 0x45be(%rip), %rdi      # 0xbf0a
leaq 0x45c0(%rip), %rsi      # 0xbf13
leaq 0x45db(%rip), %rcx      # 0xbf35
movl $0x22, %edx
callq 0x2180
leaq 0x460a(%rip), %rdi      # 0xbf75
leaq 0x45a1(%rip), %rsi      # 0xbf13
leaq 0x45bc(%rip), %rcx      # 0xbf35
movl $0x33, %edx
callq 0x2180
leaq 0x4623(%rip), %rdi      # 0xbfad
leaq 0x4582(%rip), %rsi      # 0xbf13
leaq 0x459d(%rip), %rcx      # 0xbf35
movl $0x48, %edx
callq 0x2180
nop
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/seqptrmap.c
// Function: seqptrmap_add
int64_t
seqptrmap_add(struct seqptrmap * M, void * ptr)
{

	/* Add the pointer to the end of the queue. */
	if (elasticqueue_add(M->ptrs, &ptr))
		goto err0;
	M->len += 1;

	/* Check for overflow. */
#if SIZE_MAX > INT64_MAX
	assert(M->len <= (uint64_t)INT64_MAX);
#endif
	assert(INT64_MAX - (int64_t)M->len >= M->offset);

	/* Return associated integer. */
	return (M->offset + (int64_t)M->len - 1);

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

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movq (%rdi), %rdi
movq %rax, %rsi
callq 0x99b5
movl %eax, %ecx
movq $-0x1, %rax
testl %ecx, %ecx
jne 0x7dc0
movq 0x10(%rbx), %rcx
movq %rcx, %rax
incq %rax
movq %rax, 0x10(%rbx)
js 0x7dc6
movabsq $0x7ffffffffffffffe, %rdx # imm = 0x7FFFFFFFFFFFFFFE
subq %rcx, %rdx
movq 0x8(%rbx), %rax
cmpq %rax, %rdx
jl 0x7de5
addq %rcx, %rax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x42e5(%rip), %rdi      # 0xc0b2
leaq 0x42fc(%rip), %rsi      # 0xc0d0
leaq 0x431b(%rip), %rcx      # 0xc0f6
movl $0x3e, %edx
callq 0x2180
leaq 0x433c(%rip), %rdi      # 0xc128
leaq 0x42dd(%rip), %rsi      # 0xc0d0
leaq 0x42fc(%rip), %rcx      # 0xc0f6
movl $0x40, %edx
callq 0x2180