LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/perftests/standalone-enc/standalone_hmac.c
// Function: hmac_func
static int
hmac_func(void * cookie, uint8_t * buf, size_t buflen, size_t nreps)
{
	HMAC_SHA256_CTX * ctx = cookie;
	uint8_t hbuf[32];
	uint8_t pnum_exp[8];
	size_t i;

	/* Do the hashing. */
	for (i = 0; i < nreps; i++) {
		HMAC_SHA256_Update(ctx, buf, buflen);

		/* Hash the iteration number as well. */
		be64enc(pnum_exp, i);
		HMAC_SHA256_Update(ctx, pnum_exp, 8);
	}
	HMAC_SHA256_Final(hbuf, ctx);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
testq %rcx, %rcx
je 0x3f25
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
xorl %ebp, %ebp
leaq 0x8(%rsp), %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x67bc
movq %rbp, %rax
bswapq %rax
movq %rax, 0x8(%rsp)
movl $0x8, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x67bc
incq %rbp
cmpq %rbp, %r14
jne 0x3ef4
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x67ec
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/perftests/standalone-enc/standalone_pce.c
// Function: standalone_pce
int
standalone_pce(const size_t * perfsizes, size_t num_perf,
    size_t nbytes_perftest, size_t nbytes_warmup)
{
	struct pce pce_actual;
	struct pce * pce = &pce_actual;

	/* Report what we're doing. */
	printf("Testing proto_crypt_enc()\n");

	/* Time the function. */
	if (perftest_buffers(nbytes_perftest, perfsizes, num_perf,
	    nbytes_warmup, 0, pce_init, pce_func, pce_cleanup, pce)) {
		warn0("perftest_buffers");
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq 0xb379(%rip), %rdi      # 0xf2dd
callq 0x20f0
subq $0x8, %rsp
leaq 0x10(%rsp), %rax
leaq 0x667(%rip), %r10       # 0x45e0
leaq 0x612(%rip), %r11       # 0x4592
leaq 0x51(%rip), %r9         # 0x3fd8
xorl %ebx, %ebx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
pushq %rax
pushq %r10
pushq %r11
callq 0xbc40
addq $0x20, %rsp
testl %eax, %eax
je 0x3fc8
leaq 0xb2bf(%rip), %rdi      # 0xf270
xorl %eax, %eax
callq 0xc1db
callq 0x2370
movl $0x0, (%rax)
movl $0x1, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/perftests/standalone-enc/standalone_pce.c
// Function: pce_func
static int
pce_func(void * cookie, uint8_t * buf, size_t buflen, size_t nreps)
{
	struct pce * pce = cookie;
	uint8_t encbuf[PCRYPT_ESZ];
	size_t i;

	/* Encrypt a bunch of times. */
	for (i = 0; i < nreps; i++)
		proto_crypt_enc(buf, buflen, encbuf, pce->k);

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

// Assembly:
testq %rcx, %rcx
je 0x45dd
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x430, %rsp            # imm = 0x430
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rsp, %r13
movq (%r12), %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x5f43
decq %rbx
jne 0x45b6
addq $0x430, %rsp            # imm = 0x430
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/perftests/standalone-enc/standalone_transfer_noencrypt.c
// Function: standalone_transfer_noencrypt
int
standalone_transfer_noencrypt(const size_t * perfsizes, size_t num_perf,
    size_t nbytes_perftest, size_t nbytes_warmup, int method)
{
	struct shared shared_actual;
	const char * method_str;

	/* Report what we're doing. */
	if (method == 0)
		method_str = "two pipes";
	else if (method == 1)
		method_str = "two socketpairs";
	else {
		warn0("method not recognized");
		goto err0;
	}
	printf("Testing sending data over %s, no encryption\n", method_str);

	/* Record the communication method. */
	shared_actual.method = method;

	/* Time the function. */
	if (perftest_buffers(nbytes_perftest, perfsizes, num_perf,
	    nbytes_warmup, 0, perftest_init, perftest_func, perftest_cleanup,
	    &shared_actual)) {
		warn0("perftest_buffers");
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %r13d
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
testl %r8d, %r8d
je 0x4621
cmpl $0x1, %r13d
jne 0x4684
leaq 0xace2(%rip), %rsi      # 0xf301
jmp 0x4628
leaq 0xaccf(%rip), %rsi      # 0xf2f7
leaq 0xacf8(%rip), %rdi      # 0xf327
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x2060
leaq 0x8(%rsp), %rax
movl %r13d, 0x28(%rax)
subq $0x8, %rsp
leaq 0x886(%rip), %r10       # 0x4ed2
leaq 0x76a(%rip), %r11       # 0x4dbd
leaq 0x59(%rip), %r9         # 0x46b3
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
pushq %rax
pushq %r10
pushq %r11
callq 0xbc40
addq $0x20, %rsp
testl %eax, %eax
je 0x46a2
leaq 0xabee(%rip), %rdi      # 0xf270
jmp 0x468b
leaq 0xac86(%rip), %rdi      # 0xf311
xorl %eax, %eax
callq 0xc1db
callq 0x2370
movl $0x0, (%rax)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/perftests/standalone-enc/standalone_transfer_noencrypt.c
// Function: perftest_func
static int
perftest_func(void * cookie, uint8_t * buf, size_t buflen, size_t nreps)
{
	struct shared * shared = cookie;
	size_t i;

	/* Send bytes. */
	for (i = 0; i < nreps; i++) {
		if (noeintr_write(shared->in[W], buf, buflen)
		    != (ssize_t)buflen) {
			warnp("network_write");
			goto err0;
		}
	}

	/* We've finished sending data. */
	if (close(shared->in[W])) {
		warnp("close");
		goto err0;
	}

	/* Wait until transfer_data has finished. */
	if (readbyte(shared->finished[R]))
		goto err0;

	/* Success! */
	return (0);

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rcx, %rcx
je 0x4dee
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movl 0x14(%rbx), %edi
movq %r12, %rsi
movq %r15, %rdx
callq 0xbb80
cmpq %r15, %rax
jne 0x4e14
decq %r14
jne 0x4dd6
movl 0x14(%rbx), %edi
callq 0x20a0
testl %eax, %eax
je 0x4e37
callq 0x2370
cmpl $0x0, (%rax)
je 0x4e8b
movq %rax, %rbx
leaq 0xa69d(%rip), %rdi      # 0xf4af
jmp 0x4e28
callq 0x2370
cmpl $0x0, (%rax)
je 0x4e94
movq %rax, %rbx
leaq 0xa5a1(%rip), %rdi      # 0xf3c9
xorl %eax, %eax
callq 0xc0bc
movl $0x0, (%rbx)
jmp 0x4ea2
movl 0x20(%rbx), %ebx
leaq 0x7(%rsp), %r14
movl $0x1, %edx
movl %ebx, %edi
movq %r14, %rsi
callq 0x2150
cmpq $-0x1, %rax
je 0x4e61
testq %rax, %rax
je 0x4eb7
cmpq $0x1, %rax
jne 0x4e3f
jmp 0x4eb3
callq 0x2370
movq %rax, %r15
movl (%rax), %eax
cmpl $0x4, %eax
je 0x4e3f
leaq 0xa346(%rip), %rdi      # 0xf1bd
testl %eax, %eax
je 0x4e9b
xorl %eax, %eax
callq 0xc0bc
movl $0x0, (%r15)
jmp 0x4ea2
leaq 0xa61d(%rip), %rdi      # 0xf4af
jmp 0x4e9b
leaq 0xa52e(%rip), %rdi      # 0xf3c9
xorl %eax, %eax
callq 0xc1db
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %eax, %eax
jmp 0x4ea7
leaq 0xa519(%rip), %rdi      # 0xf3d7
xorl %eax, %eax
callq 0xc1db
callq 0x2370
movl $0x0, (%rax)
jmp 0x4ea2
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/perftests/standalone-enc/standalone_transfer_noencrypt.c
// Function: perftest_cleanup
static int
perftest_cleanup(void * cookie)
{
	struct shared * shared = cookie;
	int rc;

	/* Wait for threads to finish. */
	if ((rc = pthread_join(shared->data_thr, NULL))) {
		warn0("pthread_join: %s", strerror(rc));
		goto err0;
	}
	if ((rc = pthread_join(shared->output_thr, NULL))) {
		warn0("pthread_join: %s", strerror(rc));
		goto err0;
	}

	/* Clean up communication. */
	if (close(shared->out[R])) {
		warnp("close");
		goto err0;
	}
	if (close(shared->in[R])) {
		warnp("close");
		goto err0;
	}
	if (close(shared->finished[W])) {
		warnp("close");
		goto err0;
	}
	if (close(shared->finished[R])) {
		warnp("close");
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
xorl %esi, %esi
callq 0x2030
testl %eax, %eax
jne 0x4ef3
movq 0x8(%rbx), %rdi
xorl %esi, %esi
callq 0x2030
testl %eax, %eax
je 0x4f1d
movl %eax, %edi
callq 0x22a0
leaq 0xa4ed(%rip), %rdi      # 0xf3ee
movq %rax, %rsi
xorl %eax, %eax
callq 0xc1db
callq 0x2370
movl $0x0, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
movl 0x18(%rbx), %edi
callq 0x20a0
testl %eax, %eax
jne 0x4f4d
movl 0x10(%rbx), %edi
callq 0x20a0
testl %eax, %eax
jne 0x4f4d
movl 0x24(%rbx), %edi
callq 0x20a0
testl %eax, %eax
jne 0x4f4d
movl 0x20(%rbx), %edi
callq 0x20a0
testl %eax, %eax
je 0x4f80
callq 0x2370
cmpl $0x0, (%rax)
je 0x4f70
movq %rax, %rbx
leaq 0xa54e(%rip), %rdi      # 0xf4af
xorl %eax, %eax
callq 0xc0bc
movl $0x0, (%rbx)
jmp 0x4f16
leaq 0xa538(%rip), %rdi      # 0xf4af
xorl %eax, %eax
callq 0xc1db
jmp 0x4f16
xorl %eax, %eax
jmp 0x4f1b
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/perftests/standalone-enc/standalone_transfer_noencrypt.c
// Function: drain_output
static void *
drain_output(void * cookie)
{
	struct shared * shared = cookie;
	char dummy = 0;

	/* Read until we get an EOF. */
	if (fd_drain(shared->out[R]))
		goto err0;

	/* Notify that we've finished. */
	if (noeintr_write(shared->finished[W], &dummy, 1) != 1) {
		warnp("network_write");
		goto err0;
	}

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

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movb $0x0, 0xf(%rsp)
movl 0x18(%rdi), %edi
callq 0x2aac
testl %eax, %eax
jne 0x4fe6
movl 0x24(%rbx), %edi
leaq 0xf(%rsp), %rsi
movl $0x1, %edx
callq 0xbb80
cmpq $0x1, %rax
je 0x4fe6
callq 0x2370
cmpl $0x0, (%rax)
je 0x4fd8
movq %rax, %rbx
leaq 0xa400(%rip), %rdi      # 0xf3c9
xorl %eax, %eax
callq 0xc0bc
movl $0x0, (%rbx)
jmp 0x4fe6
leaq 0xa3ea(%rip), %rdi      # 0xf3c9
xorl %eax, %eax
callq 0xc1db
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/perftests/standalone-enc/standalone_transfer_noencrypt.c
// Function: transfer_data
static void *
transfer_data(void * cookie)
{
	struct shared * shared = cookie;
	uint8_t mybuf[MAXOUTSIZE];
	ssize_t readlen;

	/* Loop until we hit EOF. */
	do {
		/* Get data from ->in, and break on EOF. */
		if ((readlen = read(shared->in[R], mybuf, MAXOUTSIZE)) == -1) {
			warnp("read");
			goto err0;
		}
		if (readlen == 0)
			break;

		/* Send data to ->out. */
		if (noeintr_write(shared->out[W], mybuf, (size_t)readlen)
		    != readlen) {
			warnp("network_write");
			goto err0;
		}
	} while (1);

	/* When ->in received an EOF, close ->out. */
	if (close(shared->out[W])) {
		warnp("close");
		goto err0;
	}

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x4000, %rsp           # imm = 0x4000
movq %rdi, %rbx
movq %rsp, %r14
movl 0x10(%rbx), %edi
movl $0x4000, %edx           # imm = 0x4000
movq %r14, %rsi
callq 0x2150
testq %rax, %rax
je 0x505d
movq %rax, %r15
cmpq $-0x1, %rax
je 0x5047
movl 0x1c(%rbx), %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0xbb80
cmpq %r15, %rax
je 0x5000
callq 0x2370
cmpl $0x0, (%rax)
je 0x5095
movq %rax, %rbx
leaq 0xa384(%rip), %rdi      # 0xf3c9
jmp 0x507d
callq 0x2370
cmpl $0x0, (%rax)
je 0x508c
movq %rax, %rbx
leaq 0xa162(%rip), %rdi      # 0xf1bd
jmp 0x507d
movl 0x1c(%rbx), %edi
callq 0x20a0
testl %eax, %eax
je 0x50ac
callq 0x2370
cmpl $0x0, (%rax)
je 0x509e
movq %rax, %rbx
leaq 0xa432(%rip), %rdi      # 0xf4af
xorl %eax, %eax
callq 0xc0bc
movl $0x0, (%rbx)
jmp 0x50ac
leaq 0xa12a(%rip), %rdi      # 0xf1bd
jmp 0x50a5
leaq 0xa32d(%rip), %rdi      # 0xf3c9
jmp 0x50a5
leaq 0xa40a(%rip), %rdi      # 0xf4af
xorl %eax, %eax
callq 0xc1db
xorl %eax, %eax
addq $0x4000, %rsp           # imm = 0x4000
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/perftests/standalone-enc/standalone_pipe_socketpair_one.c
// Function: pipe_func
static int
pipe_func(void * cookie, uint8_t * buf, size_t buflen, size_t nreps)
{
	struct pipeinfo * pipeinfo = cookie;
	size_t i;

	/* Send bytes. */
	for (i = 0; i < nreps; i++) {
		if (noeintr_write(pipeinfo->in[W], buf, buflen)
		    != (ssize_t)buflen) {
			warnp("network_write");
			goto err0;
		}
	}

	/* We've finished writing stuff. */
	if (shutdown(pipeinfo->in[W], SHUT_WR)) {
		warnp("shutdown");
		goto err0;
	}

	/* Wait for the processes to finish. */
	if (fork_func_wait(pipeinfo->enc_pid))
		goto err0;
	if (fork_func_wait(pipeinfo->out_pid))
		goto err0;

	/* Success! */
	return (0);

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rcx, %rcx
je 0x57e5
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movl 0x14(%rbx), %edi
movq %r12, %rsi
movq %r15, %rdx
callq 0xbb80
cmpq %r15, %rax
jne 0x580c
decq %r14
jne 0x57cd
movl 0x14(%rbx), %edi
movl $0x1, %esi
callq 0x2090
testl %eax, %eax
je 0x582f
callq 0x2370
cmpl $0x0, (%rax)
je 0x584b
movq %rax, %rbx
leaq 0x9c2b(%rip), %rdi      # 0xf435
jmp 0x5820
callq 0x2370
cmpl $0x0, (%rax)
je 0x5854
movq %rax, %rbx
leaq 0x9ba9(%rip), %rdi      # 0xf3c9
xorl %eax, %eax
callq 0xc0bc
movl $0x0, (%rbx)
jmp 0x5862
movl 0xc(%rbx), %edi
callq 0xb88a
testl %eax, %eax
jne 0x5862
movl 0x8(%rbx), %edi
callq 0xb88a
testl %eax, %eax
jne 0x5862
xorl %eax, %eax
jmp 0x5867
leaq 0x9be3(%rip), %rdi      # 0xf435
jmp 0x585b
leaq 0x9b6e(%rip), %rdi      # 0xf3c9
xorl %eax, %eax
callq 0xc1db
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/perftests/standalone-enc/standalone_pipe_socketpair_one.c
// Function: pipe_cleanup
static int
pipe_cleanup(void * cookie)
{
	struct pipeinfo * pipeinfo = cookie;

	/* Clean up encryption key. */
	proto_crypt_free(pipeinfo->k);

	/* Clean up sockets. */
	if (close(pipeinfo->in[W])) {
		warnp("close");
		goto err0;
	}
	if (close(pipeinfo->in[R])) {
		warnp("close");
		goto err0;
	}
	if (close(pipeinfo->out[W])) {
		warnp("close");
		goto err0;
	}
	if (close(pipeinfo->out[R])) {
		warnp("close");
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x5f28
movl 0x14(%rbx), %edi
callq 0x20a0
testl %eax, %eax
jne 0x58af
movl 0x10(%rbx), %edi
callq 0x20a0
testl %eax, %eax
jne 0x58af
movl 0x1c(%rbx), %edi
callq 0x20a0
testl %eax, %eax
jne 0x58af
movl 0x18(%rbx), %edi
callq 0x20a0
testl %eax, %eax
je 0x58e7
callq 0x2370
cmpl $0x0, (%rax)
je 0x58d2
movq %rax, %rbx
leaq 0x9bec(%rip), %rdi      # 0xf4af
xorl %eax, %eax
callq 0xc0bc
movl $0x0, (%rbx)
jmp 0x58e0
leaq 0x9bd6(%rip), %rdi      # 0xf4af
xorl %eax, %eax
callq 0xc1db
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
xorl %eax, %eax
jmp 0x58e5
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/perftests/standalone-enc/standalone_pipe_socketpair_one.c
// Function: pipe_enc
static int
pipe_enc(void * cookie)
{
	struct pipeinfo * pipeinfo = cookie;
	void * cancel_cookie;

	/* Create the pipe. */
	if ((cancel_cookie = proto_pipe(pipeinfo->in[R], pipeinfo->out[W], 0,
	    pipeinfo->k, &pipeinfo->status, pipe_callback_status, pipeinfo))
	    == NULL) {
		warn0("proto_pipe");
		goto err0;
	}

	/* Let events happen. */
	if (events_spin(&pipeinfo->done))
		warnp("events_spin");

	/* Clean up the pipe. */
	proto_pipe_cancel(cancel_cookie);

	/* Success! */
	return (0);

err0:
	/* Failure!  This value will be the pid's exit code. */
	return (1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x10(%rdi), %edi
movl 0x1c(%r14), %esi
movq (%r14), %rcx
leaq 0x20(%r14), %r8
movq %r14, (%rsp)
leaq 0x83(%rip), %r9         # 0x598e
xorl %edx, %edx
callq 0xc300
testq %rax, %rax
je 0x594e
movq %rax, %rbx
addq $0x24, %r14
movq %r14, %rdi
callq 0xa3b1
testl %eax, %eax
je 0x597c
callq 0x2370
cmpl $0x0, (%rax)
je 0x596e
movq %rax, %r14
leaq 0x9acc(%rip), %rdi      # 0xf40a
xorl %eax, %eax
callq 0xc0bc
movl $0x0, (%r14)
jmp 0x597c
leaq 0x9aaa(%rip), %rdi      # 0xf3ff
xorl %eax, %eax
callq 0xc1db
callq 0x2370
movl $0x0, (%rax)
movl $0x1, %eax
jmp 0x5986
leaq 0x9a95(%rip), %rdi      # 0xf40a
xorl %eax, %eax
callq 0xc1db
movq %rbx, %rdi
callq 0xc5aa
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/perftests/standalone-enc/standalone_pipe_socketpair_one.c
// Function: pipe_callback_status
static int
pipe_callback_status(void * cookie)
{
	struct pipeinfo * pipeinfo = cookie;

	/* Was there an error? */
	if (pipeinfo->status) {
		warn0("proto_pipe callback status: %d", pipeinfo->status);
		return (-1);
	}

	/* We've finished. */
	pipeinfo->done = 1;

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

// Assembly:
movl 0x20(%rdi), %esi
testl %esi, %esi
je 0x59b9
pushq %rax
leaq 0x9a79(%rip), %rdi      # 0xf416
xorl %eax, %eax
callq 0xc1db
callq 0x2370
movl $0x0, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
retq
movl $0x1, 0x24(%rdi)
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/perftests/standalone-enc/../../lib/proto/proto_crypt.c
// Function: mkkeypair
static struct proto_keys *
mkkeypair(uint8_t kbuf[64])
#endif
{
	struct proto_keys * k;

	/* Allocate a structure. */
	if ((k = malloc(sizeof(struct proto_keys))) == NULL)
		goto err0;

	/* Expand the AES key. */
	if ((k->k_aes = crypto_aes_key_expand(&kbuf[0], 32)) == NULL)
		goto err1;

	/* Initialize the HMAC_SHA256 context. */
	HMAC_SHA256_Init(&k->ctx_init, &kbuf[32], 32);

	/* The first packet will be packet number zero. */
	k->pnum = 0;

	/* Success! */
	return (k);

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0xe0, %edi
callq 0x2160
testq %rax, %rax
je 0x5a1f
movq %rax, %rbx
movl $0x20, %esi
movq %r14, %rdi
callq 0x886f
movq %rax, (%rbx)
testq %rax, %rax
je 0x5a17
movq %rbx, %rdi
addq $0x8, %rdi
addq $0x20, %r14
movl $0x20, %edx
movq %r14, %rsi
callq 0x6654
movq $0x0, 0xd8(%rbx)
jmp 0x5a21
movq %rbx, %rdi
callq 0x2220
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/perftests/standalone-enc/../../lib/proto/proto_crypt.c
// Function: proto_crypt_dh_validate
int
proto_crypt_dh_validate(const uint8_t yh_r[PCRYPT_YH_LEN],
    const uint8_t dhmac_r[PCRYPT_DHMAC_LEN], int requirepfs)
{
	uint8_t hbuf[32];

	/* Compute HMAC. */
	HMAC_SHA256_Buf(dhmac_r, PCRYPT_DHMAC_LEN, yh_r, CRYPTO_DH_PUBLEN,
	    hbuf);

	/* Check that the MAC matches. */
	if (crypto_verify_bytes(&yh_r[CRYPTO_DH_PUBLEN], hbuf, 32))
		return (1);

	/* Sanity-check the diffie-hellman value. */
	if (crypto_dh_sanitycheck(&yh_r[0]))
		return (1);

	/* If necessary, enforce that the diffie-hellman value is != 1. */
	if (requirepfs) {
		if (! is_not_one(&yh_r[0], CRYPTO_DH_PUBLEN))
			return (1);
	}

	/* Everything is good. */
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edx, %r14d
movq %rsi, %rax
movq %rdi, %rbx
movq %rsp, %r15
movl $0x20, %esi
movl $0x100, %ecx            # imm = 0x100
movq %rax, %rdi
movq %rbx, %rdx
movq %r15, %r8
callq 0x689c
leaq 0x100(%rbx), %rdi
movl $0x20, %edx
movq %r15, %rsi
callq 0xa0e0
movl $0x1, %ebp
testb %al, %al
jne 0x5dab
movq %rbx, %rdi
callq 0x9c6f
testl %eax, %eax
jne 0x5dab
testl %r14d, %r14d
je 0x5da9
xorl %eax, %eax
xorl %ecx, %ecx
orb (%rbx,%rcx), %al
incq %rcx
cmpq $0xff, %rcx
jne 0x5d8a
movsbl %al, %eax
movzbl 0xff(%rbx), %ecx
decl %ecx
orl %eax, %ecx
je 0x5dab
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/perftests/standalone-enc/../../lib/proto/proto_crypt.c
// Function: proto_crypt_dh_generate
int
proto_crypt_dh_generate(uint8_t yh_l[PCRYPT_YH_LEN], uint8_t x[PCRYPT_X_LEN],
    const uint8_t dhmac_l[PCRYPT_DHMAC_LEN], int nopfs)
{

	/* Are we skipping the diffie-hellman generation? */
	if (nopfs) {
		/* Set y_l to a big-endian 1. */
		memset(yh_l, 0, CRYPTO_DH_PUBLEN - 1);
		yh_l[CRYPTO_DH_PUBLEN - 1] = 1;
	} else {
		/* Generate diffie-hellman parameters x and y. */
		if (crypto_dh_generate(yh_l, x))
			goto err0;
	}

	/* Append an HMAC. */
	HMAC_SHA256_Buf(dhmac_l, PCRYPT_DHMAC_LEN, yh_l, CRYPTO_DH_PUBLEN,
	    &yh_l[CRYPTO_DH_PUBLEN]);

	/* Success! */
	return (0);

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
testl %ecx, %ecx
je 0x5dfd
movl $0xff, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2080
movb $0x1, 0xff(%r14)
leaq 0x100(%r14), %r8
movl $0x20, %esi
movl $0x100, %ecx            # imm = 0x100
movq %rbx, %rdi
movq %r14, %rdx
callq 0x689c
xorl %eax, %eax
jmp 0x5e10
movq %r14, %rdi
callq 0x9bb7
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
je 0x5ddd
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/perftests/standalone-enc/../../lib/proto/proto_crypt.c
// Function: proto_crypt_mkkeys
int
proto_crypt_mkkeys(const struct proto_secret * K,
    const uint8_t nonce_l[PCRYPT_NONCE_LEN],
    const uint8_t nonce_r[PCRYPT_NONCE_LEN],
    const uint8_t yh_r[PCRYPT_YH_LEN], const uint8_t x[PCRYPT_X_LEN],
    int nopfs, int decr,
    struct proto_keys ** eh_c, struct proto_keys ** eh_s)
{
	uint8_t nonce_y[PCRYPT_NONCE_LEN * 2 + CRYPTO_DH_KEYLEN];
	uint8_t dk_2[128];
	const uint8_t * nonce_c, * nonce_s;

	/* Copy in nonces (in the right order). */
	nonce_c = decr ? nonce_r : nonce_l;
	nonce_s = decr ? nonce_l : nonce_r;
	memcpy(&nonce_y[0], nonce_c, PCRYPT_NONCE_LEN);
	memcpy(&nonce_y[PCRYPT_NONCE_LEN], nonce_s, PCRYPT_NONCE_LEN);

	/* Are we bypassing the diffie-hellman computation? */
	if (nopfs) {
		/* We sent y_l = 1, so y_SC is also 1. */
		memset(&nonce_y[PCRYPT_NONCE_LEN * 2], 0,
		    CRYPTO_DH_KEYLEN - 1);
		nonce_y[PCRYPT_NONCE_LEN * 2 + CRYPTO_DH_KEYLEN - 1] = 1;
	} else {
		/* Perform the diffie-hellman computation. */
		if (crypto_dh_compute(yh_r, x,
		    &nonce_y[PCRYPT_NONCE_LEN * 2]))
			goto err0;
	}

	/* Compute dk_2. */
	PBKDF2_SHA256(K->K, 32, nonce_y,
	    PCRYPT_NONCE_LEN * 2 + CRYPTO_DH_KEYLEN, 1, dk_2, 128);

	/* Create key structures. */
	if ((*eh_c = mkkeypair(&dk_2[0])) == NULL)
		goto err0;
	if ((*eh_s = mkkeypair(&dk_2[64])) == NULL)
		goto err1;

	/* Success! */
	return (0);

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
cmpl $0x0, 0x1f0(%rsp)
movq %rdi, %rbx
movq %rdx, %rax
cmoveq %rsi, %rax
cmoveq %rdx, %rsi
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
leaq 0xd0(%rsp), %rax
movaps %xmm0, -0x40(%rax)
movaps %xmm1, -0x30(%rax)
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movaps %xmm0, -0x20(%rax)
movaps %xmm1, -0x10(%rax)
testl %r9d, %r9d
je 0x5efe
movl $0xff, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0x2080
movb $0x1, 0x1cf(%rsp)
movq 0x1f8(%rsp), %r15
movq $0x80, (%rsp)
leaq 0x90(%rsp), %rdx
leaq 0x10(%rsp), %r14
movl $0x20, %esi
movl $0x140, %ecx            # imm = 0x140
movl $0x1, %r8d
movq %rbx, %rdi
movq %r14, %r9
callq 0x6941
movq %r14, %rdi
callq 0x59c4
movq %rax, %rcx
movq %rax, (%r15)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rcx, %rcx
je 0x5f1b
movq 0x200(%rsp), %rbx
leaq 0x50(%rsp), %rdi
callq 0x59c4
movq %rax, %rcx
movq %rax, (%rbx)
xorl %eax, %eax
testq %rcx, %rcx
jne 0x5f1b
movq (%r15), %rdi
callq 0x5f28
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x5f1b
movq %rcx, %rdi
movq %r8, %rsi
movq %rax, %rdx
callq 0x9bf2
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
je 0x5e80
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/perftests/standalone-enc/../../lib/proto/proto_crypt.c
// Function: proto_crypt_enc
void
proto_crypt_enc(uint8_t * ibuf, size_t len, uint8_t obuf[PCRYPT_ESZ],
    struct proto_keys * k)
{
	HMAC_SHA256_CTX ctx;
	uint8_t pnum_exp[8];

	/* Sanity-check the length. */
	assert(len <= PCRYPT_MAXDSZ);

	/* Copy the decrypted data into the encrypted buffer. */
	memcpy(obuf, ibuf, len);

	/* Pad up to PCRYPT_MAXDSZ with zeroes. */
	memset(&obuf[len], 0, PCRYPT_MAXDSZ - len);

	/* Add the length. */
	be32enc(&obuf[PCRYPT_MAXDSZ], (uint32_t)len);

	/* Encrypt the buffer in-place. */
	crypto_aesctr_buf(k->k_aes, k->pnum, obuf, obuf, PCRYPT_MAXDSZ + 4);

	/* Copy the original (initialized) context. */
	memcpy(&ctx, &k->ctx_init, sizeof(HMAC_SHA256_CTX));

	/* Append an HMAC. */
	be64enc(pnum_exp, k->pnum);
	HMAC_SHA256_Update(&ctx, obuf, PCRYPT_MAXDSZ + 4);
	HMAC_SHA256_Update(&ctx, pnum_exp, 8);
	HMAC_SHA256_Final(&obuf[PCRYPT_MAXDSZ + 4], &ctx);

	/* Increment packet number. */
	k->pnum += 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r15
cmpq $0x401, %rsi            # imm = 0x401
jae 0x6029
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %rsi
movq %rdx, %rdi
movq %r15, %rdx
callq 0x24b0
leaq (%r14,%r15), %rdi
movl $0x400, %edx            # imm = 0x400
subq %r15, %rdx
xorl %esi, %esi
callq 0x2080
rolw $0x8, %r15w
movw %r15w, 0x402(%r14)
movw $0x0, 0x400(%r14)
movq (%rbx), %rdi
movq 0xd8(%rbx), %rsi
movl $0x404, %r8d            # imm = 0x404
movq %r14, %rdx
movq %r14, %rcx
callq 0x93d4
leaq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %r15
movl $0xd0, %edx
movq %r15, %rdi
callq 0x24b0
movq 0xd8(%rbx), %rax
bswapq %rax
movq %rsp, %r12
movq %rax, (%r12)
movl $0x404, %edx            # imm = 0x404
movq %r15, %rdi
movq %r14, %rsi
callq 0x67bc
movl $0x8, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x67bc
addq $0x404, %r14            # imm = 0x404
movq %r14, %rdi
movq %r15, %rsi
callq 0x67ec
incq 0xd8(%rbx)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x9485(%rip), %rdi      # 0xf4b5
leaq 0x9493(%rip), %rsi      # 0xf4ca
leaq 0x94aa(%rip), %rcx      # 0xf4e8
movl $0x14b, %edx            # imm = 0x14B
callq 0x2130
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/perftests/standalone-enc/../../lib/proto/proto_crypt.c
// Function: proto_crypt_dec
ssize_t
proto_crypt_dec(uint8_t ibuf[PCRYPT_ESZ], uint8_t * obuf,
    struct proto_keys * k)
{
	HMAC_SHA256_CTX ctx;
	uint8_t hbuf[32];
	uint8_t pnum_exp[8];
	size_t len;

	/* Copy the original (initialized) context. */
	memcpy(&ctx, &k->ctx_init, sizeof(HMAC_SHA256_CTX));

	/* Verify HMAC. */
	be64enc(pnum_exp, k->pnum);
	HMAC_SHA256_Update(&ctx, ibuf, PCRYPT_MAXDSZ + 4);
	HMAC_SHA256_Update(&ctx, pnum_exp, 8);
	HMAC_SHA256_Final(hbuf, &ctx);
	if (crypto_verify_bytes(hbuf, &ibuf[PCRYPT_MAXDSZ + 4], 32))
		return (-1);

	/* Decrypt the buffer in-place. */
	crypto_aesctr_buf(k->k_aes, k->pnum, ibuf, ibuf, PCRYPT_MAXDSZ + 4);

	/* Increment packet number. */
	k->pnum += 1;

	/* Parse length. */
	len = be32dec(&ibuf[PCRYPT_MAXDSZ]);

	/* Make sure nobody is being evil here... */
	if ((len == 0) || (len > PCRYPT_MAXDSZ))
		return (-1);

	/* Copy the bytes into the output buffer. */
	memcpy(obuf, ibuf, len);

	/* Return the decrypted length. */
	return ((ssize_t)len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rdx), %rsi
leaq 0x30(%rsp), %r12
movl $0xd0, %edx
movq %r12, %rdi
callq 0x24b0
movq 0xd8(%r15), %rax
bswapq %rax
leaq 0x8(%rsp), %r13
movq %rax, (%r13)
movl $0x404, %edx            # imm = 0x404
movq %r12, %rdi
movq %rbx, %rsi
callq 0x67bc
movl $0x8, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x67bc
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x67ec
leaq 0x404(%rbx), %rsi
movl $0x20, %edx
movq %r13, %rdi
callq 0xa0e0
movq $-0x1, %r12
testb %al, %al
jne 0x6122
movq (%r15), %rdi
movq 0xd8(%r15), %rsi
movl $0x404, %r8d            # imm = 0x404
movq %rbx, %rdx
movq %rbx, %rcx
callq 0x93d4
incq 0xd8(%r15)
movl 0x400(%rbx), %eax
bswapl %eax
leal -0x401(%rax), %ecx
cmpl $0xfffffc00, %ecx       # imm = 0xFFFFFC00
jb 0x6122
movl %eax, %r12d
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x24b0
movq %r12, %rax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/liball/../libcperciva/crypto/crypto_dh.c
// Function: crypto_dh_generate_pub
int
crypto_dh_generate_pub(uint8_t pub[CRYPTO_DH_PUBLEN],
    const uint8_t priv[CRYPTO_DH_PRIVLEN])
{
	BIGNUM * two;

	/* Generate BN representation for 2. */
	if ((two = BN_new()) == NULL) {
		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
		goto err0;
	}
	if (!BN_set_word(two, 2)) {
		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
		goto err1;
	}

	/* Compute pub = two^(2^258 + priv). */
	if (blinded_modexp(pub, two, priv))
		goto err1;

	/* Free storage allocated by BN_new. */
	BN_free(two);

	/* Success! */
	return (0);

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x21b0
testq %rax, %rax
je 0x9677
movq %rax, %rbx
movl $0x2, %esi
movq %rax, %rdi
callq 0x2280
testl %eax, %eax
je 0x96a4
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x96e2
testl %eax, %eax
jne 0x96cf
movq %rbx, %rdi
callq 0x20b0
xorl %eax, %eax
jmp 0x96dc
callq 0x24d0
movq %rax, %rdi
xorl %esi, %esi
callq 0x22e0
leaq 0x5e1e(%rip), %rdi      # 0xf4ab
movq %rax, %rsi
xorl %eax, %eax
callq 0xc1db
callq 0x2370
movl $0x0, (%rax)
jmp 0x96d7
callq 0x24d0
movq %rax, %rdi
xorl %esi, %esi
callq 0x22e0
leaq 0x5df1(%rip), %rdi      # 0xf4ab
movq %rax, %rsi
xorl %eax, %eax
callq 0xc1db
callq 0x2370
movl $0x0, (%rax)
movq %rbx, %rdi
callq 0x20b0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/liball/../libcperciva/crypto/crypto_entropy.c
// Function: update
static void
update(const uint8_t * data, size_t datalen)
{
	HMAC_SHA256_CTX ctx;
	uint8_t K[32];
	uint8_t Vx[33];

	/* Load (Key, V) into (K, Vx). */
	memcpy(K, drbg.Key, 32);
	memcpy(Vx, drbg.V, 32);

	/* K <- HMAC(K, V || 0x00 || data). */
	Vx[32] = 0x00;
	HMAC_SHA256_Init(&ctx, K, 32);
	HMAC_SHA256_Update(&ctx, Vx, 33);
	HMAC_SHA256_Update(&ctx, data, datalen);
	HMAC_SHA256_Final(K, &ctx);

	/* V <- HMAC(K, V). */
	HMAC_SHA256_Buf(K, 32, Vx, 32, Vx);

	/* If the provided data is non-Null, perform another mixing stage. */
	if (datalen != 0) {
		/* K <- HMAC(K, V || 0x01 || data). */
		Vx[32] = 0x01;
		HMAC_SHA256_Init(&ctx, K, 32);
		HMAC_SHA256_Update(&ctx, Vx, 33);
		HMAC_SHA256_Update(&ctx, data, datalen);
		HMAC_SHA256_Final(K, &ctx);

		/* V <- HMAC(K, V). */
		HMAC_SHA256_Buf(K, 32, Vx, 32, Vx);
	}

	/* Copy (K, Vx) back to (Key, V). */
	memcpy(drbg.Key, K, 32);
	memcpy(drbg.V, Vx, 32);

	/* Clean the stack. */
	insecure_memzero(K, 32);
	insecure_memzero(Vx, 33);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movq %rsi, %rbx
movq %rdi, %r14
movups 0xb771(%rip), %xmm0     # 0x15698
movq %rsp, %r15
movaps %xmm0, (%r15)
movups 0xb773(%rip), %xmm0     # 0x156a8
movaps %xmm0, 0x10(%r15)
movups 0xb777(%rip), %xmm0     # 0x156b8
leaq 0x20(%rsp), %r12
movaps %xmm0, (%r12)
movups 0xb776(%rip), %xmm0     # 0x156c8
movaps %xmm0, 0x10(%r12)
movb $0x0, 0x20(%r12)
leaq 0x50(%rsp), %r13
movl $0x20, %edx
movq %r13, %rdi
movq %r15, %rsi
callq 0x6654
movl $0x21, %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x67bc
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x67bc
movq %r15, %rdi
movq %r13, %rsi
callq 0x67ec
movl $0x20, %esi
movl $0x20, %ecx
movq %r15, %rdi
movq %r12, %rdx
movq %r12, %r8
callq 0x689c
testq %rbx, %rbx
je 0xa01c
leaq 0x20(%rsp), %r15
movb $0x1, 0x20(%r15)
leaq 0x50(%rsp), %r13
movq %rsp, %r12
movl $0x20, %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x6654
movl $0x21, %edx
movq %r13, %rdi
movq %r15, %rsi
callq 0x67bc
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x67bc
movq %r12, %rdi
movq %r13, %rsi
callq 0x67ec
movl $0x20, %esi
movl $0x20, %ecx
movq %r12, %rdi
movq %r15, %rdx
movq %r15, %r8
callq 0x689c
movq %rsp, %rdi
movaps (%rdi), %xmm0
movaps 0x10(%rdi), %xmm1
movups %xmm1, 0xb67b(%rip)     # 0x156a8
movups %xmm0, 0xb664(%rip)     # 0x15698
leaq 0x20(%rsp), %rbx
movaps (%rbx), %xmm0
movaps 0x10(%rbx), %xmm1
movups %xmm0, 0xb671(%rip)     # 0x156b8
movups %xmm1, 0xb67a(%rip)     # 0x156c8
leaq 0xb583(%rip), %r14      # 0x155d8
movq (%r14), %rax
movl $0x20, %esi
callq *%rax
movq (%r14), %rax
movl $0x21, %esi
movq %rbx, %rdi
callq *%rax
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/liball/../libcperciva/crypto/crypto_verify_bytes.c
// Function: crypto_verify_bytes
uint8_t
crypto_verify_bytes(const uint8_t * buf0, const uint8_t * buf1, size_t len)
{
	uint8_t rc = 0;
	size_t i;

	for (i = 0; i < len; i++)
		rc = rc | (buf0[i] ^ buf1[i]);

	return (rc);
}

// Assembly:
testq %rdx, %rdx
je 0xa0fd
xorl %ecx, %ecx
xorl %eax, %eax
movb (%rsi,%rcx), %r8b
xorb (%rdi,%rcx), %r8b
orb %r8b, %al
incq %rcx
cmpq %rcx, %rdx
jne 0xa0e9
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/liball/../libcperciva/util/fork_func.c
// Function: fork_func_wait
int
fork_func_wait(pid_t pid)
{
	int status;
	int rc = -1;

	/* Wait for the process to finish. */
	if (waitpid(pid, &status, 0) == -1) {
		warnp("waitpid");
		goto err0;
	}

	/* Print the error status, if applicable. */
	if (WIFEXITED(status)) {
		/* Child ${pid} exited cleanly. */
		rc = WEXITSTATUS(status);
	} else {
		/*
		 * Child ${pid} did not exit cleanly; warn about the reason
		 * for the unclean exit.
		 */
		if (WIFSIGNALED(status))
			warn0("pid %jd: terminated with signal %d",
			    (intmax_t)pid, WTERMSIG(status));
		else
			warn0("pid %jd: exited for an unknown reason",
			    (intmax_t)pid);
	}

err0:
	/* Done! */
	return (rc);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0xc(%rsp), %rsi
xorl %edx, %edx
callq 0x2340
cmpl $-0x1, %eax
je 0xb8d1
movl 0xc(%rsp), %eax
movl %eax, %edx
andl $0x7f, %edx
je 0xb8f4
movl %edx, %eax
shll $0x18, %eax
addl $0x1000000, %eax        # imm = 0x1000000
movslq %ebx, %rsi
cmpl $0x2000000, %eax        # imm = 0x2000000
jl 0xb8f9
leaq 0x4a42(%rip), %rdi      # 0x1030a
xorl %eax, %eax
callq 0xc1db
jmp 0xb907
callq 0x2370
cmpl $0x0, (%rax)
je 0xb914
movq %rax, %rbx
leaq 0x4a1d(%rip), %rdi      # 0x10302
xorl %eax, %eax
callq 0xc0bc
movl $0x0, (%rbx)
jmp 0xb922
movzbl %ah, %eax
jmp 0xb927
leaq 0x4a2d(%rip), %rdi      # 0x1032d
xorl %eax, %eax
callq 0xc1db
callq 0x2370
movl $0x0, (%rax)
jmp 0xb922
leaq 0x49e7(%rip), %rdi      # 0x10302
xorl %eax, %eax
callq 0xc1db
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/liball/../lib/proto/proto_pipe.c
// Function: proto_pipe
void *
proto_pipe(int s_in, int s_out, int decr, struct proto_keys * k,
    int * status, int (* callback)(void *), void * cookie)
{
	struct pipe_cookie * P;

	/* Bake a cookie. */
	if ((P = malloc(sizeof(struct pipe_cookie))) == NULL)
		goto err0;
	P->callback = callback;
	P->cookie = cookie;
	P->status = status;
	P->s_in = s_in;
	P->s_out = s_out;
	P->decr = decr;
	P->k = k;
	P->write_cookie = NULL;

	/* Initialize reader. */
	if ((P->R = netbuf_read_init(P->s_in)) == NULL)
		goto err1;

	/* Set the minimum number of bytes to read. */
	P->minread = P->decr ? PCRYPT_ESZ : 1;

	/* Set the number of bytes in a full buffer. */
	P->full_buflen = P->decr ? PCRYPT_ESZ : PCRYPT_MAXDSZ;

	/* Start reading. */
	if (netbuf_read_wait(P->R, P->minread, callback_pipe_read, P))
		goto err2;

	/* Success! */
	return (P);

err2:
	netbuf_read_free(P->R);
err1:
	free(P);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbp
movq %r8, %r12
movq %rcx, (%rsp)
movl %edx, %r15d
movl %esi, %r13d
movl %edi, %r14d
movl $0x2178, %edi           # imm = 0x2178
callq 0x2160
testq %rax, %rax
je 0xc3c9
movq %rax, %rbx
movq 0x40(%rsp), %rax
movq %rbp, (%rbx)
movq %rax, 0x8(%rbx)
movq %r12, 0x10(%rbx)
movl %r14d, 0x18(%rbx)
movl %r13d, 0x1c(%rbx)
movl %r15d, 0x20(%rbx)
movq (%rsp), %rax
movq %rax, 0x28(%rbx)
movq $0x0, 0x2158(%rbx)
movl %r14d, %edi
callq 0xcce8
movq %rax, 0x2150(%rbx)
testq %rax, %rax
je 0xc3c1
testl %r15d, %r15d
movl $0x1, %esi
movl $0x424, %ecx            # imm = 0x424
cmovneq %rcx, %rsi
movq %rsi, 0x2168(%rbx)
movl $0x400, %edx            # imm = 0x400
cmovneq %rcx, %rdx
movq %rdx, 0x2170(%rbx)
leaq 0x37(%rip), %rdx        # 0xc3dd
movq %rax, %rdi
movq %rbx, %rcx
callq 0xcd66
testl %eax, %eax
je 0xc3cb
movq 0x2150(%rbx), %rdi
callq 0xd016
movq %rbx, %rdi
callq 0x2220
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_4/exercise_4_09/getch.c
// Function: main
int main(void)
{
  int c;

  c = getch();
  putchar(c);

  ungetch(EOF);

  c = getch();
  putchar(c);

  return 0;
}

// Assembly:
pushq %rbx
movl 0x2eed(%rip), %eax      # 0x4050
leaq 0x2ef6(%rip), %rbx      # 0x4060
testl %eax, %eax
jle 0x117b
decl %eax
movl %eax, 0x2eda(%rip)      # 0x4050
movl (%rbx,%rax,4), %edi
jmp 0x1182
callq 0x1050
movl %eax, %edi
callq 0x1030
movslq 0x2ec2(%rip), %rcx      # 0x4050
cmpq $0x64, %rcx
jl 0x11a8
leaq 0xe69(%rip), %rdi       # 0x2004
callq 0x1040
movl 0x2eaa(%rip), %eax      # 0x4050
jmp 0x11b8
leal 0x1(%rcx), %eax
movl %eax, 0x2e9f(%rip)      # 0x4050
movl $0xffffffff, (%rbx,%rcx,4) # imm = 0xFFFFFFFF
testl %eax, %eax
jle 0x11c9
decl %eax
movl %eax, 0x2e8c(%rip)      # 0x4050
movl (%rbx,%rax,4), %edi
jmp 0x11d0
callq 0x1050
movl %eax, %edi
callq 0x1030
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gitluin[P]sara/src/sara.c
// Function: ecalloc
void*
ecalloc(size_t nmemb, size_t size){
	void* p;

	if ( !(p = calloc(nmemb, size)) )
		die("ecalloc failed");

	return p;
}

// Assembly:
pushq %rbx
callq 0x23a0
movq %rax, %rbx
testq %rax, %rax
jne 0x2678
leaq 0x3a0f(%rip), %rdi      # 0x6080
xorl %eax, %eax
callq 0x5490
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gitluin[P]sara/src/sara.c
// Function: uitos
void
uitos(unsigned int ui, int len, char* dest){
	int i, j, res;
	int bytearray[len];
	char bytestr[len + 1];

	/* reverse the array, as tags are printed left to right, not right to left */
	for (i=0;i < len;i++)
		bytearray[i] = ui >> i & 1;

	for (i=0, j=0;
	(i < (len + 1)) && (res = snprintf(bytestr + j, (len + 1) - j, "%d", bytearray[i])) > 0;
	i++)
		j += res;

	snprintf(dest, len + 1, "%s", bytestr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, -0x30(%rbp)
movl %esi, %ecx
movq %rsp, %r12
leaq 0xf(,%rcx,4), %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
leal 0x1(%rsi), %r13d
movq %rsp, %r14
leaq 0xf(%r13), %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
testl %esi, %esi
jle 0x278a
leal 0x1(%rcx), %eax
andl $-0x2, %eax
decq %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x390d(%rip), %xmm1     # 0x6010
xorl %ecx, %ecx
movdqa 0x3913(%rip), %xmm2     # 0x6020
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x3913(%rip), %xmm4     # 0x6030
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %edx
notl %edx
testb $0x1, %dl
je 0x275a
xorl %edx, %edx
btl %ecx, %edi
setb %dl
movl %edx, (%r12,%rcx,4)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %edx
testb $0x1, %dl
je 0x277d
leal 0x1(%rcx), %edx
movzbl %dl, %edx
xorl %r8d, %r8d
btl %edx, %edi
setb %r8b
movl %r8d, 0x4(%r12,%rcx,4)
addq $0x2, %rcx
paddq %xmm4, %xmm1
cmpq %rcx, %rax
jne 0x271d
testl %esi, %esi
js 0x27c3
xorl %ebx, %ebx
xorl %r15d, %r15d
movl %r15d, %edi
addq %r14, %rdi
movl %r13d, %eax
subl %r15d, %eax
movslq %eax, %rsi
movl (%r12,%rbx,4), %ecx
leaq 0x38e2(%rip), %rdx      # 0x608f
xorl %eax, %eax
callq 0x2070
testl %eax, %eax
jle 0x27c3
addl %eax, %r15d
incq %rbx
cmpq %rbx, %r13
jne 0x2793
movslq %r13d, %rsi
leaq 0x38c5(%rip), %rdx      # 0x6092
movq -0x30(%rbp), %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2070
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gitluin[P]sara/src/sara.c
// Function: buttonpress
void
buttonpress(XEvent* e){
	int i;
	client* c;
	monitor* m;
	XButtonPressedEvent* ev = &e->xbutton;

	if ( (m = findmon(ev->window)) && m != curmon )
		changemon(m, NoFocus);

	if ( (c = findclient(ev->window)) ){
		if (c != c->mon->current)
			changecurrent(c, c->mon, c->mon->curdesk, 0);

		restack(c->mon);
		XAllowEvents(dis, ReplayPointer, CurrentTime);

		/* "all" our button functions are performed on a client */
		for (i=0;i < TABLENGTH(buttons);i++)
			if (buttons[i].func && buttons[i].btn == ev->button
			&& buttons[i].mask == ev->state)
				buttons[i].func(buttons[i].arg);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movq 0x6dc1(%rip), %r14      # 0x95c0
testq %r14, %r14
je 0x2869
movq 0x30(%r14), %rax
testq %rax, %rax
je 0x2819
cmpq %rdi, 0x38(%rax)
je 0x282a
movq 0x28(%rax), %rax
jmp 0x2808
movq $0x0, 0x6cac(%rip) # 0x94d0
movq 0x48(%r14), %r14
jmp 0x27ff
movq %r14, 0x6ca7(%rip)      # 0x94d8
movq %rax, 0x6c98(%rip)      # 0x94d0
movq 0x6ca9(%rip), %rax      # 0x94e8
cmpq %rax, %r14
je 0x2874
testq %rax, %rax
je 0x2860
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x2860
movq %rax, %rdi
xorl %esi, %esi
callq 0x428a
movq 0x20(%rbx), %rdi
movq %r14, 0x6c81(%rip)      # 0x94e8
jmp 0x2874
movq $0x0, 0x6c64(%rip) # 0x94d8
callq 0x4e87
testq %rax, %rax
je 0x28f6
movq %rax, %r14
movq 0x30(%rax), %rsi
cmpq 0x28(%rsi), %rax
je 0x289c
movl 0x4(%rsi), %edx
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x416d
movq 0x30(%r14), %rsi
movq %rsi, %rdi
callq 0x3dff
movq 0x6c15(%rip), %rdi      # 0x94c0
xorl %r15d, %r15d
movl $0x2, %esi
xorl %edx, %edx
callq 0x22b0
movb $0x1, %bpl
leaq 0x646c(%rip), %r14      # 0x8d30
leaq (%r15,%r15,2), %rax
movl 0x4(%r14,%rax,8), %ecx
cmpl 0x54(%rbx), %ecx
jne 0x28e5
cmpl $0x40, 0x50(%rbx)
jne 0x28e5
leaq (%r14,%rax,8), %rax
movq 0x10(%rax), %rdi
callq 0x440b
movl $0x1, %r15d
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x28c4
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gitluin[P]sara/src/sara.c
// Function: enternotify
void
enternotify(XEvent* e){
	client* c;
	monitor* m;
	XCrossingEvent* ev = &e->xcrossing;

	if ((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root)
		return;

	if ( !(c = findclient(ev->window)) || c == curmon->current )
		return;

	if ( (m = c->mon) && m != curmon )
		changemon(m, YesFocus);

	changecurrent(c, c->mon, c->mon->curdesk, 0);
}

// Assembly:
pushq %rbx
cmpl $0x0, 0x50(%rdi)
jne 0x294e
cmpl $0x2, 0x54(%rdi)
jne 0x295d
movq 0x20(%rdi), %rdi
cmpq 0x6c57(%rip), %rdi      # 0x95b0
je 0x2961
jmp 0x29ae
movq 0x20(%rdi), %rdi
callq 0x4e87
testq %rax, %rax
je 0x29ae
movq %rax, %rbx
movq 0x6b73(%rip), %rax      # 0x94e8
cmpq 0x28(%rax), %rbx
je 0x29ae
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
sete %cl
cmpq %rax, %rsi
sete %al
orb %cl, %al
jne 0x29a0
movq %rsi, %rdi
movl $0x1, %esi
callq 0x4953
movq 0x30(%rbx), %rsi
movl 0x4(%rsi), %edx
movq %rbx, %rdi
xorl %ecx, %ecx
popq %rbx
jmp 0x416d
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gitluin[P]sara/src/sara.c
// Function: maprequest
void
maprequest(XEvent* e){
	XWindowAttributes wa;
	XMapRequestEvent* ev = &e->xmaprequest;

	if (!XGetWindowAttributes(dis, ev->window, &wa) || wa.override_redirect)
		return;

	if (!findclient(ev->window))
		manage(ev->window, &wa);
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
movq 0x6aa1(%rip), %rdi      # 0x94c0
movq 0x28(%rbx), %rsi
leaq 0x8(%rsp), %rdx
callq 0x23f0
testl %eax, %eax
je 0x2a57
cmpl $0x0, 0x80(%rsp)
jne 0x2a57
movq 0x28(%rbx), %rdi
callq 0x4e87
testq %rax, %rax
jne 0x2a57
movq 0x28(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x51dd
addq $0x90, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gitluin[P]sara/src/sara.c
// Function: configurenotify
void
configurenotify(XEvent* e){
	XConfigureEvent* ev = &e->xconfigure;

	if (ev->window == root){
		sw = ev->width; sh = ev->height;
		updategeom();

		for EACHMON(mhead){
			for EACHCLIENT(im->head)
				if (ic->isfull)
					resizeclient(ic, im->mx, im->my, im->mw, im->mh);

			arrange(im);
		}
	}
}

// Assembly:
movq 0x28(%rdi), %rax
cmpq 0x6b45(%rip), %rax      # 0x95b0
jne 0x2b02
pushq %rax
movl 0x38(%rdi), %eax
movl %eax, 0x6b51(%rip)      # 0x95cc
movl 0x3c(%rdi), %eax
movl %eax, 0x6b4c(%rip)      # 0x95d0
callq 0x4ed6
movq 0x6b30(%rip), %rax      # 0x95c0
movq %rax, 0x6a41(%rip)      # 0x94d8
testq %rax, %rax
je 0x2afe
movq 0x30(%rax), %rdi
movq %rdi, 0x6a29(%rip)      # 0x94d0
testq %rdi, %rdi
je 0x2ae9
cmpl $0x0, 0x18(%rdi)
je 0x2ad2
movq 0x6a1f(%rip), %rax      # 0x94d8
movl 0x8(%rax), %esi
movl 0xc(%rax), %edx
movl 0x14(%rax), %ecx
movl 0x10(%rax), %r8d
callq 0x3ec4
movq 0x69fe(%rip), %rdi      # 0x94d0
movq 0x28(%rdi), %rdi
movq %rdi, 0x69f3(%rip)      # 0x94d0
testq %rdi, %rdi
jne 0x2aac
movq 0x69ef(%rip), %rax      # 0x94d8
movq %rax, %rdi
callq 0x3d5e
movq 0x69e0(%rip), %rax      # 0x94d8
movq 0x48(%rax), %rax
jmp 0x2a90
addq $0x8, %rsp
retq