LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/wizard.c
// Function: makemons
int makemons(int what)
{
	int x, y, oktomake = FALSE, appear = 1;
	struct coord mp;

	oktomake = FALSE;
	for (x = hero.x - 1 ; x <= hero.x + 1 ; x++) {
		for (y = hero.y - 1 ; y <= hero.y + 1 ; y++) {
			if (x != hero.x || y != hero.y) {
				if (step_ok(winat(y, x)) && rnd(++appear) == 0) {
					mp.x = x;
					mp.y = y;
					oktomake = TRUE;
					break;
				}
			}
		}
	}
	if (oktomake) {
		new_monster(midx(what), &mp, FALSE);
		look(FALSE);
	}
	return oktomake;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, 0x8(%rsp)
leaq 0x1242b(%rip), %r13     # 0x2dc50
movl 0x50(%r13), %ecx
leal -0x1(%rcx), %r14d
pushq $0x1
popq %r15
xorl %ebx, %ebx
leal 0x1(%rcx), %eax
cmpl %eax, %r14d
jg 0x1b8a1
movl 0x54(%r13), %eax
leal -0x1(%rax), %r12d
leal 0x1(%rax), %edx
cmpl %edx, %r12d
jg 0x1b89c
cmpl %eax, %r12d
jne 0x1b855
cmpl %ecx, %r14d
je 0x1b888
movl %r12d, %edi
movl %r14d, %esi
callq 0x92ab
movsbq %al, %rdi
callq 0xb3d0
testb %al, %al
je 0x1b884
incl %r15d
movl %r15d, %edi
xorl %eax, %eax
callq 0xc004
movl 0x50(%r13), %ecx
testl %eax, %eax
jne 0x1b888
jmp 0x1b891
movl 0x50(%r13), %ecx
incl %r12d
movl 0x54(%r13), %eax
jmp 0x1b843
movl %r12d, 0xc(%rsp)
movl %r14d, %ebp
pushq $0x1
popq %rbx
incl %r14d
jmp 0x1b833
movl 0xc(%rsp), %eax
movl %eax, 0x14(%rsp)
movl %ebp, 0x10(%rsp)
testl %ebx, %ebx
je 0x1b8d1
movsbl 0x8(%rsp), %edi
callq 0xcdec
movsbl %al, %edi
leaq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0xce89
xorl %edi, %edi
callq 0xc377
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/wizard.c
// Function: getbless
int getbless()
{
	int bless;

	msg("Blessing: ");
	prbuf[0] = '\0';
	bless = get_str(prbuf, cw);
	if (bless == NORM)
		bless = atoi(prbuf);
	else
		bless = 0;
	return bless;
}

// Assembly:
pushq %rax
leaq 0x611f(%rip), %rdi      # 0x21a09
xorl %eax, %eax
callq 0xb178
leaq 0x12588(%rip), %rdi     # 0x2de80
movb $0x0, (%rdi)
leaq 0x150ce(%rip), %rax     # 0x309d0
movq (%rax), %rsi
callq 0xf37e
testl %eax, %eax
je 0x1b912
xorl %eax, %eax
popq %rcx
retq
leaq 0x12567(%rip), %rdi     # 0x2de80
popq %rax
jmp 0x6490
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/wizard.c
// Function: passwd
bool passwd()
{
	char *sp, c;
	bool passok;
	char buf[LINLEN], *xcrypt();

	msg(wizstr);
	mpos = 0;
	sp = buf;
	while ((c = getchar()) != '\n' && c != '\r' && c != ESCAPE)
	if (c == terminal.c_cc[VKILL])
		sp = buf;
	else if (c == terminal.c_cc[VERASE] && sp > buf)
		sp--;
	else
		*sp++ = c;
	if (sp == buf)
		passok = FALSE;
	else {
		*sp = '\0';
		passok = (strcmp(PASSWD, xcrypt(buf, "mT")) == 0);
	}
	return passok;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
leaq 0xe857(%rip), %rdi      # 0x2a350
xorl %eax, %eax
callq 0xb178
leaq 0x11d59(%rip), %rax     # 0x2d860
andl $0x0, (%rax)
movq %rsp, %rbx
leaq 0x16f3c(%rip), %r14     # 0x32a50
movq %rbx, %rcx
movq %rcx, %r15
callq 0x6260
movl %eax, %ecx
shll $0x18, %ecx
cmpl $0xa000000, %ecx        # imm = 0xA000000
je 0x1bb75
cmpl $0xd000000, %ecx        # imm = 0xD000000
je 0x1bb75
cmpl $0x1b000000, %ecx       # imm = 0x1B000000
je 0x1bb75
movsbl %al, %edx
movzbl 0x14(%r14), %esi
movq %rbx, %rcx
cmpl %esi, %edx
je 0x1bb17
movzbl 0x13(%r14), %ecx
cmpl %ecx, %edx
sete %cl
cmpq %rbx, %r15
seta %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1bb6a
decq %r15
movq %r15, %rcx
jmp 0x1bb17
movb %al, (%r15)
incq %r15
movq %r15, %rcx
jmp 0x1bb17
movq %rsp, %rax
cmpq %rax, %r15
je 0x1bba8
movb $0x0, (%r15)
leaq 0x3067(%rip), %rsi      # 0x1ebef
movq %rsp, %rdi
xorl %eax, %eax
callq 0x1bbb4
leaq 0x3048(%rip), %rdi      # 0x1ebe1
movq %rax, %rsi
callq 0x6240
testl %eax, %eax
sete %al
jmp 0x1bbaa
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/xcrypt.c
// Function: ascii_to_bin
static __inline int ascii_to_bin(char ch)
{
	if (ch > 'z')
		return(0);
	if (ch >= 'a')
		return(ch - 'a' + 38);
	if (ch > 'Z')
		return(0);
	if (ch >= 'A')
		return(ch - 'A' + 12);
	if (ch > '9')
		return(0);
	if (ch >= '.')
		return(ch - '.');
	return(0);
}

// Assembly:
xorl %eax, %eax
cmpb $0x7a, %dil
jle 0x1c0c9
retq
cmpb $0x61, %dil
jl 0x1c0d5
addl $-0x3b, %edi
movl %edi, %eax
retq
cmpb $0x5a, %dil
jg 0x1c0c8
cmpb $0x41, %dil
jl 0x1c0e6
addl $-0x35, %edi
jmp 0x1c0d2
leal -0x2e(%rdi), %ecx
addl $-0x2e, %edi
xorl %eax, %eax
cmpb $0xc, %cl
cmovbl %edi, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/xcrypt.c
// Function: setup_salt
static void setup_salt(int salt)
{
	unsigned int	obit, saltbit;
	int	i;

	if (salt == old_salt)
		return;
	old_salt = salt;

	saltbits = 0;
	saltbit = 1;
	obit = 0x800000;
	for (i = 0; i < 24; i++) {
		if (salt & saltbit)
			saltbits |= obit;
		saltbit <<= 1;
		obit >>= 1;
	}
}

// Assembly:
cmpl %edi, 0x1745d(%rip)     # 0x33558
jne 0x1c0fe
retq
movl %edi, 0x17454(%rip)     # 0x33558
andl $0x0, 0x17449(%rip)     # 0x33554
pushq $0x1
popq %rax
movl $0x800000, %ecx         # imm = 0x800000
xorl %edx, %edx
pushq $0x18
popq %rsi
subl $0x1, %esi
jb 0x1c0fd
testl %edi, %eax
je 0x1c129
orl %ecx, %edx
movl %edx, 0x1742b(%rip)     # 0x33554
addl %eax, %eax
shrl %ecx
jmp 0x1c118
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]spiped/tests/dnsthread-resolve/main.c
// Function: main
int
main(int argc, char ** argv)
{

	WARNP_INIT;

	/* Usage. */
	if (argc < 2) {
		fprintf(stderr, "usage: dnsthread-resolve ADDRESS\n");
		goto err0;
	}

	/* Look for address given. */
	if (dnsthread_resolve(argv[1], found, NULL)) {
		warn0("fail dns");
		goto err0;
	}

	/* Loop until we're done. */
	if (events_spin(&doneloop)) {
		warn0("Error running event loop");
		goto err0;
	}

	/* Success! */
	exit(0);

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

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x24c1
callq 0x47b8
cmpl $0x1, %ebp
jg 0x24ea
movq 0x7b2b(%rip), %rax      # 0x9ff8
movq (%rax), %rcx
leaq 0x3b2d(%rip), %rdi      # 0x6004
pushq $0x21
popq %rsi
pushq $0x1
popq %rdx
callq 0x2320
pushq $0x1
popq %rdi
callq 0x2300
movq 0x8(%rbx), %rdi
leaq 0x43(%rip), %rsi        # 0x2538
xorl %edx, %edx
callq 0x5290
testl %eax, %eax
jne 0x2517
leaq 0x7f7d(%rip), %rdi      # 0xa484
callq 0x2867
testl %eax, %eax
jne 0x2520
xorl %edi, %edi
callq 0x2300
leaq 0x3b08(%rip), %rdi      # 0x6026
jmp 0x2527
leaq 0x3b08(%rip), %rdi      # 0x602f
xorl %eax, %eax
callq 0x49c4
callq 0x2080
andl $0x0, (%rax)
jmp 0x24e2
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]spiped/tests/dnsthread-resolve/main.c
// Function: found
static int
found(void * cookie, struct sock_addr ** sas)
{
	char * addr;
	int i;

	(void)cookie; /* UNUSED */

	/* Sanity check. */
	if (sas == NULL)
		goto err0;

	/* Print each address. */
	for (i = 0; i < MAX_ADDRS; i++) {
		if (sas[i] == NULL)
			break;

		/* Extract address and print it. */
		if ((addr = sock_addr_prettyprint(sas[i])) == NULL) {
			warn0("sock_addr_prettyprint()");
			goto err1;
		}
		printf("%s\n", addr);

		/* Clean up. */
		free(addr);
	}

	/* Clean up. */
	sock_addr_freelist(sas);

	/* Quit event loop. */
	doneloop = 1;

	/* Success! */
	return (0);

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
pushq $-0x1
popq %rbx
testq %rsi, %rsi
je 0x25b3
movq %rsi, %r14
xorl %r12d, %r12d
cmpq $0x8, %r12
je 0x257f
movq (%r14,%r12,8), %rdi
testq %rdi, %rdi
je 0x257f
callq 0x45ca
testq %rax, %rax
je 0x2595
movq %rax, %r15
movq %rax, %rdi
callq 0x20a0
movq %r15, %rdi
callq 0x2040
incq %r12
jmp 0x254e
movq %r14, %rdi
callq 0x3f3f
movl $0x1, 0x7ef3(%rip)      # 0xa484
xorl %ebx, %ebx
jmp 0x25b3
leaq 0x3aac(%rip), %rdi      # 0x6048
xorl %eax, %eax
callq 0x49c4
callq 0x2080
andl $0x0, (%rax)
movq %r14, %rdi
callq 0x3f3f
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]spiped/liball/../lib/dnsthread/dnsthread.c
// Function: dnsthread_resolveone
int
dnsthread_resolveone(DNSTHREAD T, const char * addr,
    int (* callback)(void *, struct sock_addr **), void * cookie)
{
	int err = 0;
	int rc;

	/* Grab the mutex. */
	if ((rc = pthread_mutex_lock(&T->mtx)) != 0) {
		warn0("pthread_mutex_lock: %s", strerror(rc));
		goto err0;
	}

	/* If the resolver is already busy, fail. */
	if (T->state == THREAD_HASWORK) {
		err = EALREADY;
		goto ealready;
	}

	/* Duplicate the address to be resolved. */
	if ((T->addr = strdup(addr)) == NULL)
		goto err1;

	/* Remember what callback we'll need to do eventually. */
	T->callback = callback;
	T->cookie = cookie;

	/* There is now work for the thread to do. */
	T->state = THREAD_HASWORK;

	/* Wake up the worker thread. */
	if ((rc = pthread_cond_signal(&T->cv)) != 0) {
		warn0("pthread_cond_signal: %s", strerror(rc));
		goto err1;
	}

	/* We want a callback when the worker thread pokes us. */
	if (events_network_register(callback_resolveone, T, T->wakeupsock[1],
	    EVENTS_NETWORK_OP_READ)) {
		warnp("Error registering wakeup listener");
		goto err1;
	}

ealready:
	/* Release the mutex. */
	if ((rc = pthread_mutex_unlock(&T->mtx)) != 0) {
		warn0("pthread_mutex_unlock: %s", strerror(rc));
		goto err0;
	}

	/* If err was set earlier, store the value in errno. */
	if (err)
		errno = err;

	/* Success! */
	return (0);

err1:
	pthread_mutex_unlock(&T->mtx);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0x2380
testl %eax, %eax
je 0x4fea
movl %eax, %edi
callq 0x2360
leaq 0x16fa(%rip), %rdi      # 0x66be
movq %rax, %rsi
xorl %eax, %eax
callq 0x49c4
callq 0x2080
andl $0x0, (%rax)
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x60(%r14), %ebp
cmpl $0x1, %ebp
jne 0x5013
pushq $0x72
popq %r15
movq %rbx, %rdi
callq 0x2230
testl %eax, %eax
je 0x5074
movl %eax, %edi
callq 0x2360
leaq 0x16f8(%rip), %rdi      # 0x6709
jmp 0x4fc4
movq %r13, %rdi
callq 0x2350
movq %rax, 0x70(%r14)
testq %rax, %rax
je 0x5067
movq %r12, 0x88(%r14)
movq %r15, 0x90(%r14)
movl $0x1, 0x60(%r14)
leaq 0x30(%r14), %rdi
callq 0x21c0
testl %eax, %eax
je 0x508c
movl %eax, %edi
callq 0x2360
leaq 0x16cd(%rip), %rdi      # 0x6722
movq %rax, %rsi
xorl %eax, %eax
callq 0x49c4
callq 0x2080
andl $0x0, (%rax)
movq %rbx, %rdi
callq 0x2230
jmp 0x4fd6
xorl %ebx, %ebx
cmpl $0x1, %ebp
jne 0x4fd9
callq 0x2080
movl %r15d, (%rax)
jmp 0x4fd9
movl 0x68(%r14), %edx
leaq 0x46(%rip), %rdi        # 0x50dd
xorl %r15d, %r15d
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x2c04
testl %eax, %eax
je 0x4ff7
callq 0x2080
cmpl $0x0, (%rax)
je 0x50cd
movq %rax, %r14
leaq 0x167a(%rip), %rdi      # 0x673a
xorl %eax, %eax
callq 0x4835
andl $0x0, (%r14)
jmp 0x5067
leaq 0x1666(%rip), %rdi      # 0x673a
xorl %eax, %eax
callq 0x49c4
jmp 0x5067
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]spiped/liball/../lib/dnsthread/dnsthread.c
// Function: callback_resolveone
static int
callback_resolveone(void * cookie)
{
	struct dnsthread_internal * T = cookie;
	struct sock_addr ** sas;
	uint8_t zero;
	int res_errno = 0;
	int (* callback)(void *, struct sock_addr **);
	void * cb_cookie;
	int rc;

	/* Drain the byte from the socketpair. */
	if (read(T->wakeupsock[1], &zero, 1) != 1) {
		warn0("Error reading from wakeup socket");
		goto err0;
	}

	/* Grab the mutex. */
	if ((rc = pthread_mutex_lock(&T->mtx)) != 0) {
		warn0("pthread_mutex_lock: %s", strerror(rc));
		goto err0;
	}

	/* Free the (strduped) address which was to be resolved. */
	free(T->addr);

	/* Grab the result. */
	sas = T->sas;
	res_errno = T->res_errno;

	/* Grab the callback. */
	callback = T->callback;
	cb_cookie = T->cookie;

	/* Release the mutex. */
	if ((rc = pthread_mutex_unlock(&T->mtx)) != 0) {
		warn0("pthread_mutex_unlock: %s", strerror(rc));
		goto err0;
	}

	/* Perform the callback. */
	if (sas == NULL)
		errno = res_errno;
	return ((callback)(cb_cookie, sas));

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl 0x68(%rdi), %edi
leaq 0xf(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x21b0
cmpq $0x1, %rax
jne 0x5122
leaq 0x8(%rbx), %r15
movq %r15, %rdi
callq 0x2380
testl %eax, %eax
je 0x5132
movl %eax, %edi
callq 0x2360
leaq 0x159e(%rip), %rdi      # 0x66be
jmp 0x516d
leaq 0x16ac(%rip), %rdi      # 0x67d5
xorl %eax, %eax
callq 0x49c4
jmp 0x5177
movq 0x70(%rbx), %rdi
callq 0x2040
movq 0x78(%rbx), %r14
movl 0x80(%rbx), %ebp
movq 0x88(%rbx), %r12
movq 0x90(%rbx), %rbx
movq %r15, %rdi
callq 0x2230
testl %eax, %eax
je 0x518f
movl %eax, %edi
callq 0x2360
leaq 0x159c(%rip), %rdi      # 0x6709
movq %rax, %rsi
xorl %eax, %eax
callq 0x49c4
callq 0x2080
andl $0x0, (%rax)
pushq $-0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %r15
testq %r14, %r14
jne 0x519e
callq 0x2080
movl %ebp, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]spiped/liball/../lib/dnsthread/dnsthread.c
// Function: dnsthread_kill
int
dnsthread_kill(DNSTHREAD T)
{
	int rc;
	int ostate;
	pthread_t thr;

	/* Lock the control structure. */
	if ((rc = pthread_mutex_lock(&T->mtx)) != 0) {
		warn0("pthread_mutex_lock: %s", strerror(rc));
		goto err0;
	}

	/* Remember what state the thread is currently in. */
	ostate = T->state;

	/* Grab the thread ID. */
	thr = T->thr;

	/* Tell the thread to die, and wake it up. */
	T->state = THREAD_SUICIDE;
	if ((rc = pthread_cond_signal(&T->cv)) != 0) {
		warn0("pthread_cond_signal: %s", strerror(rc));
		goto err1;
	}

	/* Unlock the control structure. */
	if ((rc = pthread_mutex_unlock(&T->mtx)) != 0) {
		warn0("pthread_mutex_unlock: %s", strerror(rc));
		goto err0;
	}

	/* If the thread was sleeping, wait for it to wake up and die. */
	if (ostate == THREAD_SLEEPING) {
		if ((rc = pthread_join(thr, NULL)) != 0) {
			warn0("pthread_join: %s", strerror(rc));
			goto err0;
		}
	}

	/* Success! */
	return (0);

err1:
	pthread_mutex_unlock(&T->mtx);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r15
leaq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0x2380
testl %eax, %eax
je 0x51f1
movl %eax, %edi
callq 0x2360
leaq 0x14e1(%rip), %rdi      # 0x66be
movq %rax, %rsi
xorl %eax, %eax
callq 0x49c4
callq 0x2080
andl $0x0, (%rax)
jmp 0x5238
movl 0x60(%r15), %ebp
movq (%r15), %r14
movl $0x2, 0x60(%r15)
addq $0x30, %r15
movq %r15, %rdi
callq 0x21c0
testl %eax, %eax
je 0x5248
movl %eax, %edi
callq 0x2360
leaq 0x1504(%rip), %rdi      # 0x6722
movq %rax, %rsi
xorl %eax, %eax
callq 0x49c4
callq 0x2080
andl $0x0, (%rax)
movq %rbx, %rdi
callq 0x2230
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x2230
testl %eax, %eax
je 0x5267
movl %eax, %edi
callq 0x2360
leaq 0x14a7(%rip), %rdi      # 0x6709
jmp 0x51dd
xorl %ebx, %ebx
testl %ebp, %ebp
jne 0x523b
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2340
testl %eax, %eax
je 0x523b
movl %eax, %edi
callq 0x2360
leaq 0x14d1(%rip), %rdi      # 0x675c
jmp 0x51dd
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]spiped/liball/../lib/dnsthread/dnsthread.c
// Function: dnsthread_resolve
int
dnsthread_resolve(const char * addr,
    int (* callback)(void *, struct sock_addr **), void * cookie)
{
	struct resolve_cookie * R;

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

	/* Spawn a thread. */
	if ((R->T = dnsthread_spawn()) == NULL)
		goto err1;

	/* Launch the request. */
	if (dnsthread_resolveone(R->T, addr, callback_resolve, R))
		goto err2;

	/* Success! */
	return (0);

err2:
	dnsthread_kill(R->T);
err1:
	free(R);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
pushq $0x18
popq %rdi
callq 0x2240
pushq $-0x1
popq %rbx
testq %rax, %rax
je 0x52f8
movq %rax, %r14
movq %r13, (%rax)
movq %r12, 0x8(%rax)
callq 0x4b48
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x52ec
leaq 0x33(%rip), %rdx        # 0x5304
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x4f8f
testl %eax, %eax
je 0x52f6
movq 0x10(%r14), %rdi
callq 0x51b5
movq %r14, %rdi
callq 0x2040
jmp 0x52f8
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]spiped/liball/../lib/dnsthread/dnsthread.c
// Function: callback_resolve
static int
callback_resolve(void * cookie, struct sock_addr ** sas)
{
	struct resolve_cookie * R = cookie;
	int rc;

	/* Invoke the upstream callback. */
	rc = (R->callback)(R->cookie, sas);

	/* Kill the resolver thread. */
	if (dnsthread_kill(R->T))
		rc = -1;

	/* Free our cookie. */
	free(R);

	/* Return upstream return code or failure. */
	return (rc);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq *(%rbx)
movl %eax, %ebp
movq 0x10(%rbx), %rdi
callq 0x51b5
xorl %r14d, %r14d
negl %eax
sbbl %r14d, %r14d
orl %ebp, %r14d
movq %rbx, %rdi
callq 0x2040
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/KhuramAli[P]JAM-Benchmark/Multi-producer_Multi-consumer_Lock-Synchronized_boost/code07.cpp
// Function: producer()
void producer(void)
{
	for (int i = 0; i != iterations; ++i) {
		// the addition is mutually exclusive
		myMutex1.lock();
		queue.push_front(++producer_count);
		myMutex1.unlock();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0x989680, %ebp         # imm = 0x989680
leaq 0x2df9(%rip), %rbx      # 0x40f8
leaq 0x2de6(%rip), %r14      # 0x40ec
leaq 0x2e13(%rip), %r15      # 0x4120
subl $0x1, %ebp
jb 0x1335
movq %rbx, %rdi
callq 0x15a2
incl 0x2dcc(%rip)            # 0x40ec
movq %r15, %rdi
movq %r14, %rsi
callq 0x15b6
movq %rbx, %rdi
callq 0x10a0
jmp 0x130d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/KhuramAli[P]JAM-Benchmark/Multi-producer_Multi-consumer_Lock-Synchronized_boost/code07.cpp
// Function: consumer()
void consumer(void)
{
	int value =0;
	while (!done) {
		myMutex1.lock();
		if (!queue.empty()) {
			value += queue.front();
			++consumer_count;
			queue.pop_front();
		}
		else if(producer_count >= iterations) {
			myMutex1.unlock();
			return;
		}
		myMutex1.unlock();
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x2dad(%rip), %rbx      # 0x40f8
leaq 0x2dce(%rip), %r14      # 0x4120
cmpb $0x0, 0x2e17(%rip)      # 0x4170
jne 0x1399
movq %rbx, %rdi
callq 0x15a2
movq 0x2de6(%rip), %rax      # 0x4150
cmpq 0x2dbf(%rip), %rax      # 0x4130
je 0x1383
incl 0x2d77(%rip)            # 0x40f0
movq %r14, %rdi
callq 0x15d2
jmp 0x138f
cmpl $0x989680, 0x2d5f(%rip) # imm = 0x989680
jge 0x13a1
movq %rbx, %rdi
callq 0x10a0
jmp 0x1352
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2d50(%rip), %rdi      # 0x40f8
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10a0
// File: /workspace/github_c_makefile_star2_O2/KhuramAli[P]JAM-Benchmark/Multi-producer_Multi-consumer_Lock-Synchronized_boost/code07.cpp
// Function: main
int main(int argc, char* argv[])
{
	std::vector<std::thread> producer_threads;
	std::vector<std::thread> consumer_threads;

	for (int i = 0; i != producer_thread_count; ++i)
		producer_threads.push_back(std::thread(producer));

	for (int i = 0; i != consumer_thread_count; ++i)
		consumer_threads.push_back(std::thread(consumer));

	std::cout << "All threads created.\n";
	for (auto& i : producer_threads) {
		i.join();
	}
	std::cout << "All producers joined.\n";
	done = true;
	std::cout << "joining consumers.\n";
	for (auto& i : consumer_threads) {
		i.join();
	}
	std::cout << "all consumer threads joined\n";

	std::cout << "produced " << producer_count << " objects." << std::endl;
	std::cout << "consumed " << consumer_count << " objects." << std::endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rbx
andq $0x0, 0x10(%rbx)
movaps %xmm0, (%rbx)
andq $0x0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
pushq $0x4
popq %rbp
leaq -0xf7(%rip), %r14       # 0x12ec
leaq 0x8(%rsp), %r15
subl $0x1, %ebp
jb 0x140d
movq %r15, %rdi
movq %r14, %rsi
callq 0x15f0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b32
movq %r15, %rdi
callq 0x1656
jmp 0x13e8
pushq $0x4
popq %rbp
leaq -0xd7(%rip), %rbx       # 0x1340
leaq 0x8(%rsp), %r14
leaq 0x10(%rsp), %r15
subl $0x1, %ebp
jb 0x1446
movq %r14, %rdi
movq %rbx, %rsi
callq 0x15f0
movq %r15, %rdi
movq %r14, %rsi
callq 0x1b32
movq %r14, %rdi
callq 0x1656
jmp 0x1421
movq 0x2b8b(%rip), %rdi      # 0x3fd8
leaq 0xbb0(%rip), %rsi       # 0x2004
callq 0x10f0
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %r14
cmpq %r14, %rbx
je 0x1476
movq %rbx, %rdi
callq 0x1160
addq $0x8, %rbx
jmp 0x1463
movq 0x2b5b(%rip), %rdi      # 0x3fd8
leaq 0xb96(%rip), %rsi       # 0x201a
callq 0x10f0
movb $0x1, 0x2ce0(%rip)      # 0x4170
movq 0x2b41(%rip), %rdi      # 0x3fd8
leaq 0xb93(%rip), %rsi       # 0x2031
callq 0x10f0
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r14
cmpq %r14, %rbx
je 0x14c0
movq %rbx, %rdi
callq 0x1160
addq $0x8, %rbx
jmp 0x14ad
movq 0x2b11(%rip), %rdi      # 0x3fd8
leaq 0xb77(%rip), %rsi       # 0x2045
callq 0x10f0
movq 0x2afe(%rip), %rdi      # 0x3fd8
leaq 0xb81(%rip), %rsi       # 0x2062
callq 0x10f0
movl 0x2c00(%rip), %esi      # 0x40ec
movq %rax, %rdi
callq 0x1170
leaq 0xb71(%rip), %rsi       # 0x206c
movq %rax, %rdi
callq 0x10f0
movq %rax, %rdi
callq 0x1070
movq 0x2ac6(%rip), %rdi      # 0x3fd8
leaq 0xb5d(%rip), %rsi       # 0x2076
callq 0x10f0
movl 0x2bcc(%rip), %esi      # 0x40f0
movq %rax, %rdi
callq 0x1170
leaq 0xb39(%rip), %rsi       # 0x206c
movq %rax, %rdi
callq 0x10f0
movq %rax, %rdi
callq 0x1070
leaq 0x10(%rsp), %rdi
callq 0x1664
leaq 0x30(%rsp), %rdi
callq 0x1664
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x156e
jmp 0x156e
jmp 0x156e
jmp 0x156e
jmp 0x1573
movq %rax, %rbx
jmp 0x1580
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1656
leaq 0x10(%rsp), %rdi
callq 0x1664
leaq 0x30(%rsp), %rdi
callq 0x1664
movq %rbx, %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/dolphinking[P]slimox/src/slimox-buf.h
// Function: buf_append
static inline void buf_append(buf_t* buf, uint8_t byte) {
    if(buf->m_size == buf->m_capacity) {
        buf->m_capacity = buf->m_size * 1.2 + 1;
        buf->m_data = realloc(buf->m_data, buf->m_capacity);
    }
    buf->m_data[buf->m_size++] = byte;
    return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl 0x8(%rdi), %ecx
movq (%rdi), %rax
cmpl 0xc(%rdi), %ecx
jne 0x4b1d
movl %ecx, %ecx
cvtsi2sd %rcx, %xmm0
mulsd 0x350d(%rip), %xmm0     # 0x8008
addsd 0x350d(%rip), %xmm0     # 0x8010
cvttsd2si %xmm0, %rcx
movl %ecx, 0xc(%r14)
movl %ecx, %esi
movq %rax, %rdi
callq 0x11b0
movq %rax, (%r14)
movl 0x8(%r14), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x8(%r14)
movl %ecx, %ecx
movb %bl, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/dolphinking[P]slimox/src/slimox-match.h
// Function: matcher_init
static inline void matcher_init(matcher_t* matcher) {
    matcher->m_lzp8 = calloc((1 << 20), sizeof(uint64_t));
    matcher->m_lzp4 = calloc((1 << 20), sizeof(uint64_t));
    matcher->m_lzp2 = calloc((1 << 16), sizeof(uint32_t));
    return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x8
popq %r14
movl $0x100000, %edi         # imm = 0x100000
movq %r14, %rsi
callq 0x1120
movq %rax, (%rbx)
movl $0x100000, %edi         # imm = 0x100000
movq %r14, %rsi
callq 0x1120
movq %rax, 0x8(%rbx)
pushq $0x4
popq %rsi
movl $0x10000, %edi          # imm = 0x10000
callq 0x1120
movq %rax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/dolphinking[P]slimox/src/slimox-codec.c
// Function: lzmatch_thread
static inline void* lzmatch_thread(lzmatch_thread_param_pack_t* args) { /* thread for finding matches */
    uint32_t match_len;
    uint32_t mpos = args->m_mpos[0];
    uint32_t midx = 0;
    uint32_t i;

    while(mpos < args->m_ib->m_size && midx < MLEN_SIZE) {
        match_len = 1;
        if(mpos > 16 && mpos + 512 < args->m_ib->m_size) { /* find a match -- avoid overflow */
            match_len = matcher_lookup(args->m_matcher, args->m_ib->m_data, mpos);
            if(match_len < match_min) {
                match_len = 1;
            }
            for(i = 0; i < match_len; i++) {
                matcher_update(args->m_matcher, args->m_ib->m_data, mpos + i, 1);
            }
        }
        mpos += match_len;
        args->m_mlen[midx++] = match_len;
    }

    if(midx < MLEN_SIZE) { /* put an END flag */
        args->m_mlen[midx++] = 0;
    }
    args->m_mpos[0] = mpos;
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movl (%rax), %r14d
xorl %r12d, %r12d
pushq $0x1
popq %rbp
movq 0x8(%rbx), %rax
movl 0x8(%rax), %ecx
cmpl %ecx, %r14d
jae 0x4c4b
cmpq $0xf9ff, %r12           # imm = 0xF9FF
ja 0x4c4b
cmpl $0x11, %r14d
setb %dl
leal 0x200(%r14), %esi
cmpl %ecx, %esi
setae %cl
orb %dl, %cl
movl %ebp, %r13d
jne 0x4c38
movq (%rbx), %rdi
movq (%rax), %r15
movq %r15, %rsi
movl %r14d, %edx
callq 0x6ad0
movl %r14d, %ecx
movl %eax, %eax
xorl %r13d, %r13d
testq %rax, %rax
je 0x4c06
cmpq $0xfe, %r13
ja 0x4c06
leal (%rax,%r13), %edx
movb (%r15,%rdx), %dl
leal (%rcx,%r13), %esi
cmpb (%r15,%rsi), %dl
jne 0x4c06
incq %r13
jmp 0x4be1
cmpq $0x8, %r13
cmovbl %ebp, %r13d
cmpl $0x8, %r13d
cmovbl %ebp, %r13d
xorl %r15d, %r15d
cmpl %r15d, %r13d
je 0x4c38
movq (%rbx), %rdi
movq 0x8(%rbx), %rax
movq (%rax), %rsi
leal (%r14,%r15), %edx
movl %ebp, %ecx
callq 0x6b4e
incl %r15d
jmp 0x4c19
addl %r13d, %r14d
movq 0x10(%rbx), %rax
movl %r13d, (%rax,%r12,4)
incq %r12
jmp 0x4b91
cmpq $0xf9ff, %r12           # imm = 0xF9FF
ja 0x4c5d
movq 0x10(%rbx), %rax
andl $0x0, (%rax,%r12,4)
movq 0x18(%rbx), %rax
movl %r14d, (%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dolphinking[P]slimox/src/slimox-alloc.h
// Function: allocator_alloc
static inline void* allocator_alloc(allocator_t* allocator, int nsize, int npoolsize) {
    allocator_block_t*   block;
    allocator_element_t* node;
    int i;

    if(!allocator->m_freelist) { /* freelist is empty, allocate more nodes */
        block = (allocator_block_t*)malloc(sizeof(allocator_block_t) + (nsize * npoolsize));
        block->m_next = allocator->m_blocklist;
        __allocator_data(block, nsize, 0)->m_next = NULL;
        for(i = 1; i < npoolsize; i++) {
            __allocator_data(block, nsize, i)->m_next = __allocator_data(block, nsize, i - 1);
        }
        allocator->m_blocklist = block;
        allocator->m_freelist = __allocator_data(block, nsize, npoolsize - 1);
    }
    node = allocator->m_freelist;
    allocator->m_freelist = allocator->m_freelist->m_next;
    return (void*)node;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
testq %rax, %rax
jne 0x4e1d
movl %edx, %r14d
movl %esi, %ebp
movl %edx, %edi
imull %esi, %edi
addq $0x8, %rdi
callq 0x1180
movq %rax, %rcx
movq (%rbx), %rax
movq %rax, (%rcx)
andq $0x0, 0x8(%rcx)
movq %rcx, %rax
addq $0x8, %rax
movslq %r14d, %rdx
movslq %ebp, %rsi
pushq $0x1
popq %rdi
movq %rax, %r8
cmpq %rdx, %rdi
jge 0x4e10
movq %r8, (%r8,%rsi)
addq %rsi, %r8
incq %rdi
jmp 0x4dff
movq %rcx, (%rbx)
decl %r14d
imull %ebp, %r14d
addq %r14, %rax
movq (%rax), %rcx
movq %rcx, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dolphinking[P]slimox/src/slimox-match.h
// Function: matcher_free
static inline void matcher_free(matcher_t* matcher) {
    free(matcher->m_lzp8);
    free(matcher->m_lzp4);
    free(matcher->m_lzp2);
    return;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x1030
movq 0x8(%rbx), %rdi
callq 0x1030
movq 0x10(%rbx), %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/dolphinking[P]slimox/src/slimox-match.h
// Function: matcher_getpos
static inline uint32_t matcher_getpos(matcher_t* matcher, unsigned char* data, uint32_t pos) {
    uint32_t context4 = *(uint32_t*)(data + pos - 4);
    uint32_t lzpos[3] = {
        matcher->m_lzp8[M_hash8_(data + pos - 8)] & 0xffffffff,
        matcher->m_lzp4[M_hash4_(data + pos - 4)] & 0xffffffff,
        matcher->m_lzp2[M_hash2_(data + pos - 2)],
    };
    if(matcher->m_lzp8[M_hash8_(data + pos - 8)] >> 32 == context4 && lzpos[0] != 0) return lzpos[0];
    if(matcher->m_lzp4[M_hash4_(data + pos - 4)] >> 32 == context4 && lzpos[1] != 0) return lzpos[1];
    return lzpos[2];
}

// Assembly:
movl %edx, %eax
movl -0x4(%rsi,%rax), %ecx
movq (%rdi), %r8
movq -0x8(%rsi,%rax), %rdx
movq %rdx, %rax
shrq $0x16, %rax
movq %rdx, %rsi
shrq $0x2c, %rsi
xorl %eax, %esi
movl %edx, %eax
xorl %esi, %eax
andl $0xfffff, %eax          # imm = 0xFFFFF
movq (%r8,%rax,8), %rax
movq %rax, %rsi
shrq $0x20, %rsi
cmpl %ecx, %esi
sete %sil
testl %eax, %eax
setne %r8b
testb %r8b, %sil
jne 0x6b4d
shrq $0x30, %rdx
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rsi
movl (%rsi,%rdx,4), %edx
movl %ecx, %esi
shrl $0x6, %esi
movl %ecx, %edi
shrl $0xc, %edi
xorl %esi, %edi
xorl %ecx, %edi
andl $0xfffff, %edi          # imm = 0xFFFFF
movq (%rax,%rdi,8), %rsi
movq %rsi, %rdi
shrq $0x20, %rdi
testl %esi, %esi
movl %edx, %eax
cmovnel %esi, %eax
cmpl %ecx, %edi
cmovnel %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/dolphinking[P]slimox/src/slimox-match.h
// Function: matcher_update
static inline void matcher_update(matcher_t* matcher, unsigned char* data, uint32_t pos, int encode) {
    uint32_t context4;

    if(pos >= 12) { /* avoid overflow */
        context4 = *(uint32_t*)(data + pos - 4);

        matcher->m_lzp8[M_hash8_(data + pos - 8)] = pos | (uint64_t)context4 << 32;
        matcher->m_lzp4[M_hash4_(data + pos - 4)] = pos | (uint64_t)context4 << 32;
        matcher->m_lzp2[M_hash2_(data + pos - 2)] = pos;

        /* prefetch for next round */
        if(encode) {
            __builtin_prefetch(matcher->m_lzp8 + M_hash8_(data + pos - 6), 1, 3);
            __builtin_prefetch(matcher->m_lzp4 + M_hash4_(data + pos - 2), 1, 3);
            __builtin_prefetch(matcher->m_lzp2 + M_hash2_(data + pos + 0), 1, 3);
        } else {
            __builtin_prefetch(matcher->m_lzp8 + M_hash8_(data + pos - 7), 1, 3);
            __builtin_prefetch(matcher->m_lzp4 + M_hash4_(data + pos - 3), 1, 3);
            __builtin_prefetch(matcher->m_lzp2 + M_hash2_(data + pos - 1), 1, 3);
        }
    }
    return;
}

// Assembly:
cmpl $0xc, %edx
jb 0x6c15
pushq %r14
pushq %rbx
movl %edx, %r8d
leaq (%rsi,%r8), %rax
movl -0x4(%rsi,%r8), %r9d
movl %r9d, %r10d
shrl $0x6, %r10d
movl %r9d, %r11d
shrl $0xc, %r11d
xorl %r10d, %r11d
xorl %r9d, %r11d
movq %r9, %r10
shlq $0x20, %r10
orq %r8, %r10
movq (%rdi), %r9
movq -0x8(%rsi,%r8), %rbx
movq %rbx, %rsi
shrq $0x16, %rsi
movq %rbx, %r8
shrq $0x2c, %r8
xorl %esi, %r8d
movl %ebx, %r14d
xorl %r8d, %r14d
movl $0xfffff, %esi          # imm = 0xFFFFF
andl %esi, %r14d
movq %r10, (%r9,%r14,8)
movq 0x8(%rdi), %r8
andl %esi, %r11d
movq %r10, (%r8,%r11,8)
movq 0x10(%rdi), %rdi
shrq $0x30, %rbx
movl %edx, (%rdi,%rbx,4)
cmpl $0x1, %ecx
sbbq $0x0, %rax
movq -0x6(%rax), %rax
movq %rax, %rcx
shrq $0x16, %rcx
movq %rax, %rdx
shrq $0x2c, %rdx
xorl %edx, %ecx
movl %eax, %r10d
xorl %ecx, %r10d
andl %esi, %r10d
prefetcht0 (%r9,%r10,8)
movq %rax, %rcx
shrq $0x20, %rcx
movq %rax, %r9
shrq $0x26, %r9
xorl %edx, %r9d
xorl %ecx, %r9d
andl %esi, %r9d
prefetcht0 (%r8,%r9,8)
shrq $0x30, %rax
prefetcht0 (%rdi,%rax,4)
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/dolphinking[P]slimox/src/slimox-alloc.h
// Function: allocator_del
static inline void allocator_del(allocator_t* allocator) {
    allocator_block_t* block;
    while(allocator->m_blocklist) {
        block = allocator->m_blocklist;
        allocator->m_blocklist = allocator->m_blocklist->m_next;
        free(block);
    }
    free(allocator);
    return;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x7014
movq (%rdi), %rax
movq %rax, (%rbx)
callq 0x1030
jmp 0x6fff
movq %rbx, %rdi
popq %rbx
jmp 0x1030
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/dolphinking[P]slimox/src/slimox-pack.c
// Function: file_item_put
static inline void file_item_put(struct file_item* item, FILE* fp) {
    size_t i;

    fwrite(&item->m_mode, sizeof(item->m_mode), 1, fp);
    fwrite(&item->m_size, sizeof(item->m_size), 1, fp);
    fwrite(&item->m_path_to_root->len, sizeof(item->m_path_to_root->len), 1, fp);

    for(i = 0; i < item->m_path_to_root->len; i++) {
        if(item->m_path_to_root->str[i] == PATH_SEP[0]) { /* replace path seperator with 0 */
            fputc(0, fp);
        } else {
            fputc(item->m_path_to_root->str[i], fp);
        }
    }
    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x4
popq %r15
pushq $0x1
popq %r12
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x1210
leaq 0x4(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x1210
movq 0x8(%r14), %rdi
pushq $0x8
popq %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x1210
xorl %r15d, %r15d
movq 0x8(%r14), %rax
cmpq (%rax), %r15
jae 0x75ef
movq 0x10(%rax), %rax
movzbl (%rax,%r15), %ecx
xorl %eax, %eax
cmpb $0x2f, %cl
je 0x75df
movl %ecx, %eax
movsbl %al, %edi
movq %rbx, %rsi
callq 0x1110
incq %r15
jmp 0x75c4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/dolphinking[P]slimox/src/utils/string-utils.h
// Function: str_new_with
static inline string_t* str_new_with(const char* s) {
    string_t* str;
    size_t slen = strlen(s);

    if((str = malloc(sizeof(string_t))) != NULL) {
        if((str->str = malloc(slen + 4)) != NULL) {
            strcpy(str->str, s);
            str->len = slen;
            str->capacity = slen + 4;
            return str;
        }
        free(str);
    }
    STRING_UTILS_ON_ALLOC_FAIL();
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x10b0
movq %rax, %r14
pushq $0x18
popq %rdi
callq 0x1180
testq %rax, %rax
je 0x7672
movq %rax, %r15
leaq 0x4(%r14), %r12
movq %r12, %rdi
callq 0x1180
movq %rax, 0x10(%r15)
testq %rax, %rax
je 0x766a
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1050
movq %r14, (%r15)
movq %r12, 0x8(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, %rdi
callq 0x1030
movq 0x397f(%rip), %rax      # 0xaff8
movq (%rax), %rcx
leaq 0x10ee(%rip), %rdi      # 0x8771
pushq $0x1a
popq %rsi
pushq $0x1
popq %rdx
callq 0x1210
callq 0x1040
// File: /workspace/github_c_makefile_star2_O2/dolphinking[P]slimox/src/slimox-buf.h
// Function: buf_resize
static inline void buf_resize(buf_t* buf, uint32_t size) {
    if(size > buf->m_capacity || size < buf->m_capacity / 2) {
        buf->m_capacity = size * 1.2;
        buf->m_data = realloc(buf->m_data, buf->m_capacity);
    }
    buf->m_size = size;
    return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl 0xc(%rdi), %eax
cmpl %esi, %eax
setae %cl
shrl %eax
cmpl %esi, %eax
setbe %al
testb %al, %cl
jne 0x76f6
movl %ebx, %eax
cvtsi2sd %rax, %xmm0
mulsd 0x928(%rip), %xmm0      # 0x8008
cvttsd2si %xmm0, %rax
movl %eax, 0xc(%r14)
movq (%r14), %rdi
movl %eax, %esi
callq 0x11b0
movq %rax, (%r14)
movl %ebx, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/dolphinking[P]slimox/src/slimox-pack.c
// Function: file_item_get
static inline void file_item_get(struct file_item* item, FILE* fp) {
    size_t len;
    size_t i;
    int c;

    fread(&item->m_mode, sizeof(item->m_mode), 1, fp);
    fread(&item->m_size, sizeof(item->m_size), 1, fp);
    fread(&len, sizeof(item->m_path_to_root->len), 1, fp);

    str_assign(item->m_path_to_root, "");
    for(i = 0; i < len; i++) {
        if((c = getc(fp)) == 0) { /* replace 0 with path seperator */
            str_concat_chr(item->m_path_to_root, PATH_SEP[0]);
        } else {
            str_concat_chr(item->m_path_to_root, c);
        }
    }
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x4
popq %r15
pushq $0x1
popq %r12
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x1070
leaq 0x4(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x1070
leaq 0x8(%rsp), %r15
pushq $0x8
popq %rsi
movq %r15, %rdi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x1070
movq 0x8(%r14), %rdi
leaq 0xfba(%rip), %rsi       # 0x8717
callq 0x7d22
xorl %r12d, %r12d
movq (%r15), %r15
pushq $0x2f
popq %rbp
cmpq %r15, %r12
jae 0x778d
movq %rbx, %rdi
callq 0x1230
testl %eax, %eax
movq 0x8(%r14), %rdi
cmovel %ebp, %eax
movl %eax, %esi
callq 0x7e1b
incq %r12
jmp 0x776b
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dolphinking[P]slimox/src/utils/string-utils.h
// Function: str_sprintf
static inline int str_sprintf(string_t* str, const char* format, ...) {
    va_list args[2];
    size_t newcapacity;
    void*  newp;
    int    ret;

    va_start(args[0], format);
    ret = vsnprintf(str->str, str->capacity, format, args[0]);
    va_end(args[0]);

    if((newcapacity = ret + 4) > str->capacity) {
        if((newp = realloc(str->str, newcapacity)) != NULL) {
            str->capacity = newcapacity;
            str->str = newp;

            va_start(args[1], format);
            ret = vsnprintf(str->str, str->capacity, format, args[0]);
            va_end(args[1]);
        } else {
            STRING_UTILS_ON_ALLOC_FAIL();
            return -1;
        }
    }
    str->len = strlen(str->str);

    va_end(args[0]);
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe0, %rsp
movq %rdi, %rbx
leaq 0x30(%rsp), %r15
movq %rdx, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
testb %al, %al
je 0x7800
movaps %xmm0, 0x60(%rsp)
movaps %xmm1, 0x70(%rsp)
movaps %xmm2, 0x80(%rsp)
movaps %xmm3, 0x90(%rsp)
movaps %xmm4, 0xa0(%rsp)
movaps %xmm5, 0xb0(%rsp)
movaps %xmm6, 0xc0(%rsp)
movaps %xmm7, 0xd0(%rsp)
movq %rsp, %rcx
movq %r15, 0x10(%rcx)
leaq 0x110(%rsp), %r12
movq %r12, 0x8(%rcx)
movabsq $0x3000000010, %r13     # imm = 0x3000000010
movq %r13, (%rcx)
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdi
leaq 0xe43(%rip), %rdx       # 0x8672
callq 0x1080
addl $0x4, %eax
movslq %eax, %r14
cmpq %r14, 0x8(%rbx)
jae 0x787c
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x11b0
testq %rax, %rax
je 0x7899
movq %r14, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq %rsp, %rcx
movq %r15, 0x28(%rcx)
movq %r12, 0x20(%rcx)
movq %r13, 0x18(%rcx)
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdi
leaq 0xdfb(%rip), %rdx       # 0x8672
callq 0x1080
movq 0x10(%rbx), %rdi
callq 0x10b0
movq %rax, (%rbx)
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x3758(%rip), %rax      # 0xaff8
movq (%rax), %rcx
leaq 0xec7(%rip), %rdi       # 0x8771
pushq $0x1a
popq %rsi
pushq $0x1
popq %rdx
callq 0x1210
callq 0x1040
// File: /workspace/github_c_makefile_star2_O2/dolphinking[P]slimox/src/slimox-pack.c
// Function: encode_block
static inline int encode_block(buf_t* ib, ppm_model_t* ppm, FILE* fout) {
    buf_t* ob = buf_new();
    size_t pos_sync;
    size_t out_size;

    /* put block header */
    pos_sync = ftell(fout);
    if(fwrite(&ob->m_size, sizeof(ob->m_size), 1, fout) != 1) {
        buf_del(ob);
        return -1;
    }

    /* encode */
    out_size = slimox_encode(ib, ob, ppm, fout);

    /* rewrite block header */
    fseek(fout, pos_sync, SEEK_SET);
    if(fwrite(&out_size, sizeof(ob->m_size), 1, fout) != 1) {
        buf_del(ob);
        return -1;
    }
    fseek(fout, 0, SEEK_END);

    buf_del(ob);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
callq 0x7e10
movq %rax, %rbx
movq %r14, %rdi
callq 0x1150
movq %rax, %r12
movq %rbx, %rdi
addq $0x8, %rdi
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rcx
callq 0x1210
pushq $-0x1
popq %rbp
cmpq $0x1, %rax
jne 0x794b
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x133c
cltq
movq %rsp, %r15
movq %rax, (%r15)
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x11a0
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %r14, %rcx
callq 0x1210
cmpq $0x1, %rax
jne 0x794b
pushq $0x2
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x11a0
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x7964
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_O2/dolphinking[P]slimox/src/slimox-pack.c
// Function: file_item_from_path
static inline int file_item_from_path(struct file_item* item, const string_t* full_path, const string_t* root_path) {
    struct stat statbuf;

    if(stat(full_path->str, &statbuf) != -1 && (S_ISREG(statbuf.st_mode) || S_ISDIR(statbuf.st_mode))) {
        if(S_ISDIR(statbuf.st_mode)) {
            statbuf.st_size = 0;
        }
        item->m_mode = statbuf.st_mode;
        item->m_size = statbuf.st_size;
        str_assign(item->m_path_to_root, root_path->str);
        return 1;
    }
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq 0x10(%rsi), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1160
cmpl $-0x1, %eax
je 0x7d15
movl 0x20(%rsp), %ecx
movl %ecx, %edx
andl $0xf000, %edx           # imm = 0xF000
xorl %eax, %eax
cmpw $0x4000, %dx            # imm = 0x4000
je 0x7cfc
cmpl $0x8000, %edx           # imm = 0x8000
jne 0x7d17
movl 0x38(%rsp), %eax
movl %ecx, (%r14)
movl %eax, 0x4(%r14)
movq 0x8(%r14), %rdi
movq 0x10(%rbx), %rsi
callq 0x7d22
pushq $0x1
popq %rax
jmp 0x7d17
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/dolphinking[P]slimox/src/utils/string-utils.h
// Function: str_assign
static inline void str_assign(string_t* str, const char* s) {
    char* newp;
    size_t slen = strlen(s);

    if((newp = realloc(str->str, slen + 4)) != NULL) {
        str->str = newp;
        strcpy(str->str, s);
        str->len = slen;
        str->capacity = slen + 4;
        return;
    }
    STRING_UTILS_ON_ALLOC_FAIL();
    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x10b0
movq %rax, %r15
movq 0x10(%rbx), %rdi
leaq 0x4(%rax), %r12
movq %r12, %rsi
callq 0x11b0
testq %rax, %rax
je 0x7d72
movq %rax, 0x10(%rbx)
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
movq %r15, (%rbx)
movq %r12, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x327f(%rip), %rax      # 0xaff8
movq (%rax), %rcx
leaq 0x9ee(%rip), %rdi       # 0x8771
pushq $0x1a
popq %rsi
pushq $0x1
popq %rdx
callq 0x1210
callq 0x1040
// File: /workspace/github_c_makefile_star2_O2/dolphinking[P]slimox/src/slimox-pack.c
// Function: file_item_new
static inline struct file_item* file_item_new() {
    struct file_item* item = malloc(sizeof(struct file_item));
    item->m_mode = 0;
    item->m_size = 0;
    item->m_path_to_root = str_new();
    return item;
}

// Assembly:
pushq %rbx
pushq $0x10
popq %rdi
callq 0x1180
movq %rax, %rbx
andq $0x0, (%rax)
callq 0x7db1
movq %rax, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/dolphinking[P]slimox/src/utils/string-utils.h
// Function: str_new
static inline string_t* str_new() {
    string_t* str;

    if((str = malloc(sizeof(string_t))) != NULL) {
        if((str->str = malloc(4)) != NULL) {
            str->str[0] = 0;
            str->len = 0;
            str->capacity = 1;
            return str;
        }
        free(str);
    }
    STRING_UTILS_ON_ALLOC_FAIL();
    return NULL;
}

// Assembly:
pushq %rbx
pushq $0x18
popq %rdi
callq 0x1180
testq %rax, %rax
je 0x7def
movq %rax, %rbx
pushq $0x4
popq %rdi
callq 0x1180
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x7de7
andq $0x0, (%rbx)
movb $0x0, (%rax)
movq $0x1, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
retq
movq %rbx, %rdi
callq 0x1030
movq 0x3202(%rip), %rax      # 0xaff8
movq (%rax), %rcx
leaq 0x971(%rip), %rdi       # 0x8771
pushq $0x1a
popq %rsi
pushq $0x1
popq %rdx
callq 0x1210
callq 0x1040
// File: /workspace/github_c_makefile_star2_O2/dolphinking[P]slimox/src/utils/string-utils.h
// Function: str_concat_chr
static inline void str_concat_chr(string_t* str, int c) {
    size_t newcapacity;
    void*  newp;

    if(str->len + 2 > str->capacity) {
        newcapacity = str->len * 2 + 4;
        if((newp = realloc(str->str, newcapacity)) != NULL) {
            str->capacity = newcapacity;
            str->str = newp;
        } else {
            STRING_UTILS_ON_ALLOC_FAIL();
            return;
        }
    }
    str->str[str->len] = c, str->len++;
    str->str[str->len] = 0;
    return;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rcx
leaq 0x2(%rcx), %rax
cmpq 0x8(%rdi), %rax
jbe 0x7e57
leaq 0x4(,%rcx,2), %r14
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x11b0
testq %rax, %rax
je 0x7e77
movq %r14, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq (%rbx), %rcx
jmp 0x7e5b
movq 0x10(%rbx), %rax
movb %bpl, (%rax,%rcx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0x0, 0x1(%rcx,%rax)
popq %rbx
popq %r14
popq %rbp
retq
movq 0x317a(%rip), %rax      # 0xaff8
movq (%rax), %rcx
leaq 0x8e9(%rip), %rdi       # 0x8771
pushq $0x1a
popq %rsi
pushq $0x1
popq %rdx
callq 0x1210
callq 0x1040
// File: /workspace/github_c_makefile_star2_O2/anachronic[P]st/st.c
// Function: tlinehistlen
int
tlinehistlen(int y)
{
	int i = term.col;

	if (TLINE_HIST(y)[i - 1].mode & ATTR_WRAP)
		return i;

	while (i > 0 && TLINE_HIST(y)[i - 1].u == ' ')
		--i;

	return i;
}

// Assembly:
movl 0x12ce8(%rip), %eax     # 0x188f4
movslq %eax, %rsi
movl 0x12cdb(%rip), %ecx     # 0x188f0
movl $0x7d2, %edx            # imm = 0x7D2
subl %ecx, %edx
movslq %edi, %r8
cmpl %edi, %edx
jge 0x5c42
movq 0x12cce(%rip), %r9      # 0x188f8
leal (%rdi,%rcx), %r10d
addl $0xfffff830, %r10d      # imm = 0xFFFFF830
movslq %r10d, %r10
leaq (%r9,%r10,8), %r9
addq $-0x18, %r9
jmp 0x5c51
leaq 0x12ca7(%rip), %r9      # 0x188f0
leaq (%r9,%r8,8), %r9
addq $0x10, %r9
movq (%r9), %r9
shlq $0x4, %rsi
testb $0x2, -0xb(%r9,%rsi)
jne 0x5ca9
cmpl %edi, %edx
leaq 0x12c87(%rip), %rdx     # 0x188f0
leaq 0x10(%rdx,%r8,8), %rdx
movq 0x12c83(%rip), %rsi     # 0x188f8
leal -0x7d0(%rdi,%rcx), %ecx
movslq %ecx, %rcx
leaq -0x18(%rsi,%rcx,8), %rcx
cmovgeq %rdx, %rcx
movl %eax, %edx
sarl $0x1f, %edx
andl %eax, %edx
testl %eax, %eax
jle 0x5ca7
movq (%rcx), %rsi
movl %eax, %edi
shlq $0x4, %rdi
cmpl $0x20, -0x10(%rsi,%rdi)
jne 0x5ca9
decl %eax
jmp 0x5c8f
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/anachronic[P]st/st.c
// Function: selclear
void
selclear(void)
{
	if (sel.ob.x == -1)
		return;
	selremove();
	tsetdirt(sel.nb.y, sel.ne.y);
}

// Assembly:
cmpl $-0x1, 0x12bab(%rip)    # 0x188dc
je 0x5d52
andl $0x0, 0x12b86(%rip)     # 0x188c0
orl $-0x1, 0x12b9b(%rip)    # 0x188dc
movl 0x12b89(%rip), %edi     # 0x188d0
movl 0x12b8b(%rip), %esi     # 0x188d8
jmp 0x5ec9
retq