LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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
pushq %rax
movl %edi, %ebp
leaq 0x1074e(%rip), %r13     # 0x2dc60
movl 0x50(%r13), %r14d
decl %r14d
movl $0x1, %r15d
xorl %ebx, %ebx
movl 0x54(%r13), %eax
leal -0x1(%rax), %r12d
cmpl %eax, %r12d
jne 0x1d534
cmpl 0x50(%r13), %r14d
je 0x1d55d
movl %r12d, %edi
movl %r14d, %esi
callq 0x9514
movsbq %al, %rdi
callq 0xb995
testb %al, %al
je 0x1d55d
incl %r15d
movl %r15d, %edi
xorl %eax, %eax
callq 0xc72d
testl %eax, %eax
je 0x1d570
leal 0x1(%r12), %ecx
movl 0x54(%r13), %eax
cmpl %eax, %r12d
movl %ecx, %r12d
jle 0x1d529
jmp 0x1d57e
movl %r14d, (%rsp)
movl %r12d, 0x4(%rsp)
movl $0x1, %ebx
leal 0x1(%r14), %eax
cmpl 0x50(%r13), %r14d
movl %eax, %r14d
jle 0x1d521
testl %ebx, %ebx
je 0x1d5ac
movsbl %bpl, %edi
callq 0xd60b
movsbl %al, %edi
movq %rsp, %rsi
xorl %edx, %edx
callq 0xd6ab
xorl %edi, %edi
callq 0xcb98
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x63cc(%rip), %rdi      # 0x23991
xorl %eax, %eax
callq 0xb6e0
leaq 0x108bd(%rip), %rdi     # 0x2de90
movb $0x0, (%rdi)
leaq 0x13403(%rip), %rax     # 0x309e0
movq (%rax), %rsi
callq 0xfe5d
testl %eax, %eax
je 0x1d5ed
xorl %eax, %eax
popq %rcx
retq
leaq 0x1089c(%rip), %rdi     # 0x2de90
popq %rax
jmp 0x64b0
// File: /workspace/github_c_makefile_star2_O1/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 0xcb86(%rip), %rdi      # 0x2a360
xorl %eax, %eax
callq 0xb6e0
leaq 0x10088(%rip), %rax     # 0x2d870
movl $0x0, (%rax)
movq %rsp, %rbx
leaq 0x15268(%rip), %r14     # 0x32a60
movq %rbx, %rcx
movq %rcx, %r15
callq 0x6270
movl %eax, %ecx
shll $0x18, %ecx
cmpl $0xa000000, %ecx        # imm = 0xA000000
je 0x1d859
cmpl $0xd000000, %ecx        # imm = 0xD000000
je 0x1d859
cmpl $0x1b000000, %ecx       # imm = 0x1B000000
je 0x1d859
movsbl %al, %edx
movzbl 0x14(%r14), %esi
movq %rbx, %rcx
cmpl %esi, %edx
je 0x1d7fb
movzbl 0x13(%r14), %ecx
cmpl %ecx, %edx
sete %cl
cmpq %rbx, %r15
seta %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1d84e
decq %r15
movq %r15, %rcx
jmp 0x1d7fb
movb %al, (%r15)
incq %r15
movq %r15, %rcx
jmp 0x1d7fb
movq %rsp, %rax
cmpq %rax, %r15
je 0x1d88c
movb $0x0, (%r15)
leaq 0x3372(%rip), %rsi      # 0x20bde
movq %rsp, %rdi
xorl %eax, %eax
callq 0x1d898
leaq 0x3353(%rip), %rdi      # 0x20bd0
movq %rax, %rsi
callq 0x6250
testl %eax, %eax
sete %al
jmp 0x1d88e
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x25e1
callq 0x4d84
cmpl $0x1, %ebp
jg 0x2610
movq 0x8a0b(%rip), %rax      # 0xaff8
movq (%rax), %rcx
leaq 0x4a0d(%rip), %rdi      # 0x7004
movl $0x21, %esi
movl $0x1, %edx
callq 0x2320
movl $0x1, %edi
callq 0x2300
movq 0x8(%rbx), %rdi
leaq 0x46(%rip), %rsi        # 0x2661
xorl %edx, %edx
callq 0x57cf
testl %eax, %eax
jne 0x263d
leaq 0x8e57(%rip), %rdi      # 0xb484
callq 0x29b1
testl %eax, %eax
jne 0x2646
xorl %edi, %edi
callq 0x2300
leaq 0x49e2(%rip), %rdi      # 0x7026
jmp 0x264d
leaq 0x49e2(%rip), %rdi      # 0x702f
xorl %eax, %eax
callq 0x4f23
callq 0x2080
movl $0x0, (%rax)
jmp 0x2606
// File: /workspace/github_c_makefile_star2_O1/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
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rsi, %rsi
je 0x26df
movq %rsi, %r14
xorl %r12d, %r12d
movq (%r14,%r12,8), %rdi
testq %rdi, %rdi
je 0x26a8
callq 0x4b87
testq %rax, %rax
je 0x26be
movq %rax, %r15
movq %rax, %rdi
callq 0x20a0
movq %r15, %rdi
callq 0x2040
incq %r12
cmpq $0x8, %r12
jne 0x2679
movq %r14, %rdi
callq 0x4473
movl $0x1, 0x8dca(%rip)      # 0xb484
xorl %ebx, %ebx
jmp 0x26df
leaq 0x4983(%rip), %rdi      # 0x7048
xorl %eax, %eax
callq 0x4f23
callq 0x2080
movl $0x0, (%rax)
movq %r14, %rdi
callq 0x4473
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0x550e
movl %eax, %edi
callq 0x2360
leaq 0x2239(%rip), %rdi      # 0x771c
movq %rax, %rsi
xorl %eax, %eax
callq 0x4f23
callq 0x2080
movl $0x0, (%rax)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x60(%r14), %ebp
movl $0x72, %eax
cmpl $0x1, %ebp
jne 0x553b
movl %eax, %r14d
movq %rbx, %rdi
callq 0x2230
testl %eax, %eax
je 0x559f
movl %eax, %edi
callq 0x2360
leaq 0x222e(%rip), %rdi      # 0x7767
jmp 0x54e3
movq %r13, %rdi
callq 0x2350
movq %rax, 0x70(%r14)
testq %rax, %rax
je 0x5592
movq %r12, 0x88(%r14)
movq %r15, 0x90(%r14)
movl $0x1, 0x60(%r14)
leaq 0x30(%r14), %rdi
callq 0x21c0
testl %eax, %eax
je 0x55b7
movl %eax, %edi
callq 0x2360
leaq 0x2203(%rip), %rdi      # 0x7780
movq %rax, %rsi
xorl %eax, %eax
callq 0x4f23
callq 0x2080
movl $0x0, (%rax)
movq %rbx, %rdi
callq 0x2230
jmp 0x54f8
xorl %ebx, %ebx
cmpl $0x1, %ebp
jne 0x54fd
callq 0x2080
movl %r14d, (%rax)
jmp 0x54fd
movl 0x68(%r14), %edx
leaq 0x4b(%rip), %rdi        # 0x560d
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x2f30
testl %eax, %eax
movl $0x0, %eax
je 0x551c
callq 0x2080
cmpl $0x0, (%rax)
je 0x55fd
movq %rax, %r14
leaq 0x21ab(%rip), %rdi      # 0x7798
xorl %eax, %eax
callq 0x4e04
movl $0x0, (%r14)
jmp 0x5592
leaq 0x2194(%rip), %rdi      # 0x7798
xorl %eax, %eax
callq 0x4f23
jmp 0x5592
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %edx
callq 0x21b0
cmpq $0x1, %rax
jne 0x5654
leaq 0x8(%rbx), %r15
movq %r15, %rdi
callq 0x2380
testl %eax, %eax
je 0x5664
movl %eax, %edi
callq 0x2360
leaq 0x20ca(%rip), %rdi      # 0x771c
jmp 0x569f
leaq 0x21d8(%rip), %rdi      # 0x7833
xorl %eax, %eax
callq 0x4f23
jmp 0x56a9
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 0x56c6
movl %eax, %edi
callq 0x2360
leaq 0x20c8(%rip), %rdi      # 0x7767
movq %rax, %rsi
xorl %eax, %eax
callq 0x4f23
callq 0x2080
movl $0x0, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %r15
testq %r14, %r14
jne 0x56d5
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_O1/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 0x572b
movl %eax, %edi
callq 0x2360
leaq 0x2008(%rip), %rdi      # 0x771c
movq %rax, %rsi
xorl %eax, %eax
callq 0x4f23
callq 0x2080
movl $0x0, (%rax)
jmp 0x5775
movl 0x60(%r15), %ebp
movq (%r15), %r14
movl $0x2, 0x60(%r15)
addq $0x30, %r15
movq %r15, %rdi
callq 0x21c0
testl %eax, %eax
je 0x5787
movl %eax, %edi
callq 0x2360
leaq 0x2028(%rip), %rdi      # 0x7780
movq %rax, %rsi
xorl %eax, %eax
callq 0x4f23
callq 0x2080
movl $0x0, (%rax)
movq %rbx, %rdi
callq 0x2230
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x2230
testl %eax, %eax
je 0x57a6
movl %eax, %edi
callq 0x2360
leaq 0x1fc6(%rip), %rdi      # 0x7767
jmp 0x5714
xorl %ebx, %ebx
testl %ebp, %ebp
jne 0x577a
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2340
testl %eax, %eax
je 0x577a
movl %eax, %edi
callq 0x2360
leaq 0x1ff0(%rip), %rdi      # 0x77ba
jmp 0x5714
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x18, %edi
callq 0x2240
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x583b
movq %rax, %r14
movq %r13, (%rax)
movq %r12, 0x8(%rax)
callq 0x5048
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x582f
leaq 0x33(%rip), %rdx        # 0x5847
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x54ae
testl %eax, %eax
je 0x5839
movq 0x10(%r14), %rdi
callq 0x56ec
movq %r14, %rdi
callq 0x2040
jmp 0x583b
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x56ec
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_O1/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 0x2da9(%rip), %rbx      # 0x4108
leaq 0x2dca(%rip), %r14      # 0x4130
leaq 0x2d8f(%rip), %r15      # 0x40fc
movq %rbx, %rdi
callq 0x1140
testl %eax, %eax
jne 0x13c9
movl 0x2d7d(%rip), %eax      # 0x40fc
incl %eax
movl %eax, 0x2d75(%rip)      # 0x40fc
movq 0x2db2(%rip), %rcx      # 0x4140
cmpq 0x2db3(%rip), %rcx      # 0x4148
je 0x13a7
movl %eax, -0x4(%rcx)
addq $-0x4, %rcx
movq %rcx, 0x2d9b(%rip)      # 0x4140
jmp 0x13b2
movq %r14, %rdi
movq %r15, %rsi
callq 0x196e
movq %rbx, %rdi
callq 0x10b0
decl %ebp
jne 0x136d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x1090
// File: /workspace/github_c_makefile_star2_O1/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
cmpb $0x0, 0x2da5(%rip)      # 0x4180
jne 0x1434
leaq 0x2d24(%rip), %rbx      # 0x4108
leaq 0x2d45(%rip), %r14      # 0x4130
movq %rbx, %rdi
callq 0x1140
testl %eax, %eax
jne 0x144f
movq 0x2d62(%rip), %rax      # 0x4160
cmpq 0x2d3b(%rip), %rax      # 0x4140
je 0x1417
incl 0x2cf3(%rip)            # 0x4100
movq %r14, %rdi
callq 0x16be
jmp 0x1423
cmpl $0x989680, 0x2cdb(%rip) # imm = 0x989680
jge 0x143c
movq %rbx, %rdi
callq 0x10b0
cmpb $0x1, 0x2d4e(%rip)      # 0x4180
jne 0x13eb
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2cc5(%rip), %rdi      # 0x4108
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10b0
movl %eax, %edi
callq 0x1090
// File: /workspace/github_c_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1070
leaq 0x4(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1070
movq %rsp, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1070
movq 0x8(%r14), %r15
movq 0x10(%r15), %rdi
movl $0x4, %esi
callq 0x11c0
testq %rax, %rax
je 0x9f95
movq %rax, 0x10(%r15)
movb $0x0, (%rax)
movq $0x0, (%r15)
movq $0x4, 0x8(%r15)
movq (%rsp), %r12
testq %r12, %r12
je 0x9f7c
movq %rbx, %rdi
callq 0x1240
movl %eax, %ebp
movq 0x8(%r14), %r13
movq (%r13), %rax
movq 0x8(%r13), %rcx
leaq 0x2(%rax), %rdx
testl %ebp, %ebp
je 0x9f29
cmpq %rcx, %rdx
jbe 0x9f52
leaq 0x4(,%rax,2), %r15
movq 0x10(%r13), %rdi
movq %r15, %rsi
callq 0x11c0
testq %rax, %rax
jne 0x9f4a
jmp 0x9f8b
movb $0x2f, %bpl
cmpq %rcx, %rdx
jbe 0x9f52
leaq 0x4(,%rax,2), %r15
movq 0x10(%r13), %rdi
movq %r15, %rsi
callq 0x11c0
testq %rax, %rax
je 0x9f90
movq %r15, 0x8(%r13)
movq %rax, 0x10(%r13)
movq (%r13), %rax
movq 0x10(%r13), %rcx
movb %bpl, (%rcx,%rax)
movq (%r13), %rax
movq 0x10(%r13), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r13)
movb $0x0, 0x1(%rcx,%rax)
decq %r12
jne 0x9eeb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1583
callq 0x15a5
callq 0x15c7
// File: /workspace/github_c_makefile_star2_O1/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 0xa000
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 0x16d3(%rip), %rdx      # 0xb702
callq 0x1080
addl $0x4, %eax
movslq %eax, %r14
cmpq %r14, 0x8(%rbx)
jae 0xa07c
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x11c0
testq %rax, %rax
je 0xa099
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 0x168b(%rip), %rdx      # 0xb702
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
callq 0x15e9
// File: /workspace/github_c_makefile_star2_O1/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, %r12
movl $0x10, %edi
callq 0x1190
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %r14, %rdi
callq 0x1160
movq %rax, %r13
movq %rbx, %rdi
addq $0x8, %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x1220
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq $0x1, %rax
jne 0xa146
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x17cc
cltq
movq %rsp, %r15
movq %rax, (%r15)
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x11b0
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rcx
callq 0x1220
cmpq $0x1, %rax
jne 0xa146
movq %r14, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x11b0
xorl %ebp, %ebp
movq (%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x12856(%rip), %eax     # 0x188f4
movslq %eax, %r8
movl 0x12849(%rip), %ecx     # 0x188f0
movl $0x7d2, %edx            # imm = 0x7D2
subl %ecx, %edx
movslq %edi, %rsi
cmpl %edi, %edx
jge 0x60d4
movq 0x1283c(%rip), %r9      # 0x188f8
leal (%rdi,%rcx), %r10d
addl $0xfffff830, %r10d      # imm = 0xFFFFF830
movslq %r10d, %r10
leaq (%r9,%r10,8), %r9
addq $-0x18, %r9
jmp 0x60e3
leaq 0x12815(%rip), %r9      # 0x188f0
leaq (%r9,%rsi,8), %r9
addq $0x10, %r9
movq (%r9), %r9
movq %r8, %r10
shlq $0x4, %r10
testb $0x2, -0xb(%r9,%r10)
sete %r9b
testl %r8d, %r8d
setg %r8b
andb %r9b, %r8b
cmpb $0x1, %r8b
jne 0x614e
cmpl %edi, %edx
leaq 0x127e0(%rip), %rdx     # 0x188f0
leaq 0x10(%rdx,%rsi,8), %rdx
movq 0x127dc(%rip), %rsi     # 0x188f8
leal -0x7d0(%rdi,%rcx), %ecx
movslq %ecx, %rcx
leaq -0x18(%rsi,%rcx,8), %rcx
cmovgeq %rdx, %rcx
movq (%rcx), %rcx
addq $-0x10, %rcx
movl %eax, %edx
shlq $0x4, %rdx
cmpl $0x20, (%rcx,%rdx)
jne 0x614e
leal -0x1(%rax), %edx
cmpl $0x1, %eax
movl %edx, %eax
jg 0x6136
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x126de(%rip)    # 0x188dc
je 0x6225
movl $0x0, 0x126b6(%rip)     # 0x188c0
movl $0xffffffff, 0x126c8(%rip) # imm = 0xFFFFFFFF
movl 0x126b6(%rip), %edi     # 0x188d0
movl 0x126b8(%rip), %esi     # 0x188d8
jmp 0x642b
retq
// File: /workspace/github_c_makefile_star2_O1/anachronic[P]st/st.c
// Function: regionselected
int
regionselected(int x1, int y1, int x2, int y2)
{
	if (sel.ob.x == -1 || sel.mode == SEL_EMPTY ||
	    sel.alt != IS_SET(MODE_ALTSCREEN) || sel.nb.y > y2 || sel.ne.y < y1)
		return 0;

	return (sel.type == SEL_RECTANGULAR) ? sel.nb.x <= x2 && sel.ne.x >= x1
		: (sel.nb.y != y2 || sel.nb.x <= x2) &&
		  (sel.ne.y != y1 || sel.ne.x >= x1);
}

// Assembly:
xorl %eax, %eax
cmpl $-0x1, 0x1234b(%rip)    # 0x188dc
je 0x65d0
cmpl $0x1, 0x12326(%rip)     # 0x188c0
je 0x65d0
movl 0x1234a(%rip), %eax     # 0x188ec
btl $0x2, 0x16222(%rip)     # 0x1c7cc
sbbl $0x0, %eax
jne 0x65ce
movl 0x1231a(%rip), %r8d     # 0x188d0
cmpl %ecx, %r8d
setg %r9b
movl 0x12315(%rip), %eax     # 0x188d8
cmpl %esi, %eax
setl %r10b
orb %r9b, %r10b
je 0x65d4
xorl %eax, %eax
movzbl %al, %eax
retq
cmpl $0x2, 0x122e9(%rip)     # 0x188c4
jne 0x65f3
cmpl %edx, 0x122e9(%rip)     # 0x188cc
setle %cl
cmpl %edi, 0x122e8(%rip)     # 0x188d4
setge %al
andb %cl, %al
jmp 0x65d0
cmpl %ecx, %r8d
jne 0x6600
cmpl %edx, 0x122ce(%rip)     # 0x188cc
jg 0x65ce
cmpl %esi, %eax
setne %cl
cmpl %edi, 0x122c9(%rip)     # 0x188d4
setge %al
orb %cl, %al
jmp 0x65d0
// File: /workspace/github_c_makefile_star2_O1/anachronic[P]st/st.c
// Function: sigchld
void
sigchld(int a)
{
	int stat;
	pid_t p;

	if ((p = waitpid(pid, &stat, WNOHANG)) < 0)
		die("waiting for pid %hd failed: %s\n", pid, strerror(errno));

	if (pid != p) {
		if (p == 0 && wait(&stat) < 0)
			die("wait: %s\n", strerror(errno));

		/* reinstall sigchld handler */
		signal(SIGCHLD, sigchld);
		return;
	}

	if (WIFEXITED(stat) && WEXITSTATUS(stat))
		die("child exited with status %d\n", WEXITSTATUS(stat));
	else if (WIFSIGNALED(stat))
		die("child terminated due to signal %d\n", WTERMSIG(stat));
	_exit(0);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl 0x15ba2(%rip), %edi     # 0x1c7f4
leaq 0xc(%rsp), %rsi
movl $0x1, %edx
callq 0x5530
movl 0x15b8d(%rip), %ebx     # 0x1c7f4
testl %eax, %eax
js 0x6c98
cmpl %eax, %ebx
je 0x6cb7
testl %eax, %eax
jne 0x6c81
leaq 0xc(%rsp), %rdi
callq 0x5100
testl %eax, %eax
js 0x6ced
leaq -0x41(%rip), %rsi       # 0x6c47
movl $0x11, %edi
callq 0x5060
addq $0x10, %rsp
popq %rbx
retq
callq 0x55a0
movl (%rax), %edi
callq 0x5460
leaq 0xaa8c(%rip), %rdi      # 0x11737
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5f16
movl 0xc(%rsp), %eax
movl %eax, %esi
andl $0x7f, %esi
jne 0x6ccc
shrl $0x8, %eax
andl $0xff, %eax
jne 0x6d0a
movl %esi, %eax
shll $0x18, %eax
addl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x2000000, %eax        # imm = 0x2000000
jl 0x6ce6
leaq 0xaa9a(%rip), %rdi      # 0x1177e
jmp 0x6d13
xorl %edi, %edi
callq 0x5230
callq 0x55a0
movl (%rax), %edi
callq 0x5460
leaq 0xaa57(%rip), %rdi      # 0x11757
movq %rax, %rsi
xorl %eax, %eax
callq 0x5f16
leaq 0xaa50(%rip), %rdi      # 0x11761
movl %eax, %esi
xorl %eax, %eax
callq 0x5f16
// File: /workspace/github_c_makefile_star2_O1/anachronic[P]st/st.c
// Function: kscrolldown
void
kscrolldown(const Arg* a)
{
	int n = a->i;

	if (!term.scr || IS_SET(MODE_ALTSCREEN))
		return;

	if (n < 0)
		n = MAX(term.row / -n, 1);

	if (n <= term.scr) {
		term.scr -= n;
	} else {
		n = term.scr;
		term.scr = 0;
	}

	if (sel.ob.x != -1 && !sel.alt)
		selmove(-n); /* negate change in term.scr */
	tfulldirt();
}

// Assembly:
movl 0x15813(%rip), %ecx     # 0x1c788
testl %ecx, %ecx
je 0x700c
testb $0x4, 0x15848(%rip)     # 0x1c7cc
jne 0x700c
movl (%rdi), %esi
testl %esi, %esi
jns 0x6fa6
movl 0x1195a(%rip), %eax     # 0x188f0
negl %esi
cltd
idivl %esi
cmpl $0x2, %eax
movl $0x1, %esi
cmovgel %eax, %esi
xorl %eax, %eax
movl %ecx, %edx
subl %esi, %edx
cmovll %eax, %edx
movl %edx, 0x157d3(%rip)     # 0x1c788
cmpl $-0x1, 0x11920(%rip)    # 0x188dc
je 0x6fe4
cmpl $0x0, 0x11927(%rip)     # 0x188ec
jne 0x6fe4
cmpl %ecx, %esi
cmovll %esi, %ecx
subl %ecx, 0x1190e(%rip)     # 0x188e0
subl %ecx, 0x118f8(%rip)     # 0x188d0
subl %ecx, 0x1190a(%rip)     # 0x188e8
subl %ecx, 0x118f4(%rip)     # 0x188d8
cmpl $0x0, 0x11905(%rip)     # 0x188f0
jle 0x700c
movq 0x157a4(%rip), %rax     # 0x1c798
xorl %ecx, %ecx
movl $0x1, (%rax,%rcx,4)
incq %rcx
movslq 0x118e9(%rip), %rdx     # 0x188f0
cmpq %rdx, %rcx
jl 0x6ff6
retq
// File: /workspace/github_c_makefile_star2_O1/anachronic[P]st/st.c
// Function: tsetdirtattr
void
tsetdirtattr(int attr)
{
	int i, j;

	for (i = 0; i < term.row-1; i++) {
		for (j = 0; j < term.col-1; j++) {
			if (term.line[i][j].mode & attr) {
				term.dirty[i] = 1;
				break;
			}
		}
	}
}

// Assembly:
cmpl $0x2, 0x1166e(%rip)     # 0x188f0
jl 0x72db
movq 0x1166d(%rip), %rax     # 0x188f8
movq 0x15506(%rip), %rcx     # 0x1c798
xorl %edx, %edx
movl 0x1165a(%rip), %esi     # 0x188f4
cmpl $0x2, %esi
jl 0x72c9
decl %esi
movq (%rax,%rdx,8), %r8
shlq $0x4, %rsi
xorl %r9d, %r9d
movzwl 0x4(%r8,%r9), %r10d
testl %edi, %r10d
jne 0x72c2
addq $0x10, %r9
cmpq %r9, %rsi
jne 0x72ac
jmp 0x72c9
movl $0x1, (%rcx,%rdx,4)
incq %rdx
movslq 0x1161d(%rip), %rsi     # 0x188f0
decq %rsi
cmpq %rsi, %rdx
jl 0x7294
retq
// File: /workspace/github_c_makefile_star2_O1/anachronic[P]st/st.c
// Function: tnew
void
tnew(int col, int row)
{
	int i, j;

	for (i = 0; i < 2; i++) {
		term.line = xmalloc(row * sizeof(Line));
		for (j = 0; j < row; j++)
			term.line[j] = xmalloc(col * sizeof(Glyph));
		term.col = col, term.row = row;
		tswapscreen();
	}
	term.dirty = xmalloc(row * sizeof(*term.dirty));
	term.tabs = xmalloc(col * sizeof(*term.tabs));
	for (i = 0; i < HISTSIZE; i++)
		term.hist[i] = xmalloc(col * sizeof(Glyph));
  treset();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movl %edi, %r12d
movslq %esi, %rax
leaq (,%rax,8), %rcx
movq %rcx, 0x10(%rsp)
movslq %edi, %rbx
movq %rbx, 0x8(%rsp)
shlq $0x4, %rbx
movq %rax, (%rsp)
movl %eax, %r14d
xorl %r15d, %r15d
movq 0x10(%rsp), %rdi
callq 0x5eec
movq %rax, 0x115d2(%rip)     # 0x188f8
testl %ebp, %ebp
jle 0x7348
xorl %r13d, %r13d
movq %rbx, %rdi
callq 0x5eec
movq 0x115bc(%rip), %rcx     # 0x188f8
movq %rax, (%rcx,%r13,8)
incq %r13
cmpq %r13, %r14
jne 0x732d
movq 0x115a9(%rip), %rax     # 0x188f8
movq 0x174f2(%rip), %rcx     # 0x1e848
movq %rcx, 0x1159b(%rip)     # 0x188f8
movl 0x174ed(%rip), %ecx     # 0x1e850
movl %ecx, 0x1158b(%rip)     # 0x188f4
movl 0x174e5(%rip), %ecx     # 0x1e854
movl %ecx, 0x1157b(%rip)     # 0x188f0
movq %rax, 0x174cc(%rip)     # 0x1e848
movl %r12d, 0x174cd(%rip)    # 0x1e850
xorb $0x4, 0x15442(%rip)     # 0x1c7cc
movl %ebp, 0x174c4(%rip)     # 0x1e854
leal 0x1(%r15), %eax
testl %r15d, %r15d
movl %eax, %r15d
je 0x7315
movq (%rsp), %rdi
shlq $0x2, %rdi
callq 0x5eec
movq %rax, 0x153e4(%rip)     # 0x1c798
movq 0x8(%rsp), %rdi
shlq $0x2, %rdi
callq 0x5eec
movq %rax, 0x15417(%rip)     # 0x1c7e0
movl $0x2, %r14d
leaq 0x1151a(%rip), %r15     # 0x188f0
movq %rbx, %rdi
callq 0x5eec
movq %rax, (%r15,%r14,8)
incq %r14
cmpq $0x7d2, %r14            # imm = 0x7D2
jne 0x73d6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x73fe
// File: /workspace/github_c_makefile_star2_O1/anachronic[P]st/st.c
// Function: kscrollup
void
kscrollup(const Arg* a)
{
	int n = a->i;

	if (!term.histf || IS_SET(MODE_ALTSCREEN))
		return;

	if (n < 0)
		n = MAX(term.row / -n, 1);

	if (term.scr + n <= term.histf) {
		term.scr += n;
	} else {
		n = term.histf - term.scr;
		term.scr = term.histf;
	}

	if (sel.ob.x != -1 && !sel.alt)
		selmove(n); /* negate change in term.scr */
	tfulldirt();
}

// Assembly:
movl 0x1515b(%rip), %ecx     # 0x1c784
testl %ecx, %ecx
je 0x76cb
testb $0x4, 0x15194(%rip)     # 0x1c7cc
jne 0x76cb
movl (%rdi), %esi
testl %esi, %esi
jns 0x765a
movl 0x112a6(%rip), %eax     # 0x188f0
negl %esi
cltd
idivl %esi
cmpl $0x2, %eax
movl $0x1, %esi
cmovgel %eax, %esi
movl 0x15128(%rip), %eax     # 0x1c788
leal (%rax,%rsi), %edx
cmpl %ecx, %edx
movl %ecx, %edi
cmovll %edx, %edi
movl %edi, 0x15118(%rip)     # 0x1c788
cmpl $-0x1, 0x11265(%rip)    # 0x188dc
je 0x76a3
cmpl $0x0, 0x1126c(%rip)     # 0x188ec
jne 0x76a3
movl %ecx, %edi
subl %eax, %edi
cmpl %ecx, %edx
cmovgl %edi, %esi
addl %esi, 0x1124f(%rip)     # 0x188e0
addl %esi, 0x11239(%rip)     # 0x188d0
addl %esi, 0x1124b(%rip)     # 0x188e8
addl %esi, 0x11235(%rip)     # 0x188d8
cmpl $0x0, 0x11246(%rip)     # 0x188f0
jle 0x76cb
movq 0x150e5(%rip), %rax     # 0x1c798
xorl %ecx, %ecx
movl $0x1, (%rax,%rcx,4)
incq %rcx
movslq 0x1122a(%rip), %rdx     # 0x188f0
cmpq %rdx, %rcx
jl 0x76b5
retq
// File: /workspace/github_c_makefile_star2_O1/anachronic[P]st/st.c
// Function: tresize
void
tresize(int col, int row)
{
	int *bp;

	/* col and row are always MAX(_, 1)
	if (col < 1 || row < 1) {
		fprintf(stderr, "tresize: error resizing to %dx%d\n", col, row);
		return;
	} */

	term.dirty = xrealloc(term.dirty, row * sizeof(*term.dirty));
	term.tabs = xrealloc(term.tabs, col * sizeof(*term.tabs));
	if (col > term.col) {
		bp = term.tabs + term.col;
		memset(bp, 0, sizeof(*term.tabs) * (col - term.col));
		while (--bp > term.tabs && !*bp)
			/* nothing */ ;
		for (bp += tabspaces; bp < term.tabs + col; bp += tabspaces)
			*bp = 1;
	}

	if (IS_SET(MODE_ALTSCREEN))
		tresizealt(col, row);
	else
		tresizedef(col, row);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movl %edi, %ebp
movq 0x14df8(%rip), %rdi     # 0x1c798
movslq %esi, %rsi
shlq $0x2, %rsi
callq 0x5fb0
movq %rax, 0x14de5(%rip)     # 0x1c798
movq 0x14e26(%rip), %rdi     # 0x1c7e0
movslq %ebp, %r15
leaq (,%r15,4), %rsi
callq 0x5fb0
movq %rax, 0x14e0f(%rip)     # 0x1c7e0
movslq 0x10f1c(%rip), %r12     # 0x188f4
cmpl %r12d, %r15d
jle 0x7a34
movq %rax, %r14
movl %ebp, %eax
subl %r12d, %eax
movslq %eax, %rdx
shlq $0x2, %rdx
leaq (%r14,%r12,4), %rdi
xorl %esi, %esi
callq 0x50a0
leaq (%r14,%r12,4), %rax
addq $-0x4, %rax
movq %rax, %rcx
cmpq %r14, %rax
jbe 0x7a10
leaq -0x4(%rcx), %rax
cmpl $0x0, (%rcx)
je 0x79ff
leaq 0x10ad1(%rip), %rax     # 0x184e8
movl (%rax), %edx
leaq (%rcx,%rdx,4), %rcx
leaq (%r14,%r15,4), %rdx
cmpq %rdx, %rcx
jae 0x7a34
movl $0x1, (%rcx)
movl (%rax), %esi
leaq (%rcx,%rsi,4), %rcx
jmp 0x7a21
testb $0x4, 0x14d91(%rip)     # 0x1c7cc
jne 0x7a4e
movl %ebp, %edi
movl %ebx, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x7d63
movl %ebp, %edi
movl %ebx, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x7a5c
// File: /workspace/github_c_makefile_star2_O1/anachronic[P]st/st.c
// Function: tnewline
void
tnewline(int first_col)
{
	int y = term.c.y;

	if (y == term.bot) {
		tscrollup(term.top, term.bot, 1, SCROLL_SAVEHIST);
	} else {
		y++;
	}
	tmoveto(first_col ? 0 : term.c.x, y);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
movl 0x124fa(%rip), %ebx     # 0x1c7b4
movl 0x12508(%rip), %esi     # 0x1c7c8
cmpl %esi, %ebx
jne 0xa2db
movl 0x124fa(%rip), %edi     # 0x1c7c4
movl $0x1, %edx
movl $0x1, %ecx
callq 0xac36
jmp 0xa2dd
incl %ebx
xorl %edi, %edi
testl %ebp, %ebp
jne 0xa2e9
movl 0x124c7(%rip), %edi     # 0x1c7b0
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x8efa
// File: /workspace/github_c_makefile_star2_O1/anachronic[P]st/st.c
// Function: tinsertblank
void
tinsertblank(int n)
{
	int src, dst, size;
	Line line;

	if (n <= 0)
		return;
	dst = MIN(term.c.x + n, term.col);
	src = term.c.x;
	size = term.col - dst;
	if (size > 0) { /* otherwise dst would point beyond the array */
		line = term.line[term.c.y];
		memmove(&line[dst], &line[src], size * sizeof(Glyph));
	}
	tclearregion(src, term.c.y, dst - 1, term.c.y, 1);
}

// Assembly:
testl %edi, %edi
jle 0xab71
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movslq 0x11c9a(%rip), %r14     # 0x1c7b0
addl %r14d, %ebx
movl 0xddd5(%rip), %eax      # 0x188f4
cmpl %eax, %ebx
cmovgel %eax, %ebx
subl %ebx, %eax
jle 0xab59
movq 0xddc9(%rip), %rcx      # 0x188f8
movslq 0x11c7e(%rip), %rdx     # 0x1c7b4
movq (%rcx,%rdx,8), %rcx
movslq %ebx, %rdi
shlq $0x4, %rdi
addq %rcx, %rdi
movq %r14, %rsi
shlq $0x4, %rsi
addq %rcx, %rsi
movl %eax, %edx
shlq $0x4, %rdx
callq 0x5510
movl 0x11c55(%rip), %ecx     # 0x1c7b4
decl %ebx
movl %r14d, %edi
movl %ecx, %esi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xab72
retq
// File: /workspace/github_c_makefile_star2_O1/anachronic[P]st/st.c
// Function: tclearregion
void
tclearregion(int x1, int y1, int x2, int y2, int usecurattr)
{
	int x, y;

	/* regionselected() takes relative coordinates */
	if (regionselected(x1+term.scr, y1+term.scr, x2+term.scr, y2+term.scr))
		selremove();

	for (y = y1; y <= y2; y++) {
		term.dirty[y] = 1;
		for (x = x1; x <= x2; x++)
			tclearglyph(&term.line[y][x], usecurattr);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %r14d
movl %esi, %r12d
movl %edi, %r15d
movl 0x11bfd(%rip), %ecx     # 0x1c788
leal (%rcx,%r15), %edi
leal (%rcx,%r12), %esi
leal (%rcx,%r14), %edx
addl %ebx, %ecx
callq 0x6588
testl %eax, %eax
je 0xabb6
movl $0x0, 0xdd14(%rip)      # 0x188c0
movl $0xffffffff, 0xdd26(%rip) # imm = 0xFFFFFFFF
cmpl %ebx, %r12d
jg 0xac2a
movq 0x11bd6(%rip), %rax     # 0x1c798
movq 0xdd2f(%rip), %rcx      # 0x188f8
movslq %r15d, %rdi
movslq %r12d, %rdx
incl %ebx
movl %r14d, %esi
subl %edi, %esi
shlq $0x4, %rdi
orq $0xc, %rdi
incl %esi
movl $0x1, (%rax,%rdx,4)
cmpl %r14d, %r15d
jg 0xac23
movq (%rcx,%rdx,8), %r8
addq %rdi, %r8
movl %esi, %r9d
movl 0x11bab(%rip), %r10d    # 0x1c7a8
movl %r10d, -0x4(%r8)
movl 0x11ba4(%rip), %r10d    # 0x1c7ac
movl %r10d, (%r8)
movw $0x0, -0x8(%r8)
movl $0x20, -0xc(%r8)
addq $0x10, %r8
decl %r9d
jne 0xabf6
incq %rdx
cmpl %edx, %ebx
jne 0xabe0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/anachronic[P]st/st.c
// Function: tscrolldown
void
tscrolldown(int top, int n)
{
	int i, bot = term.bot;
	Line temp;

	if (n <= 0)
		return;
	n = MIN(n, bot-top+1);

	tsetdirt(top, bot-n);
	tclearregion(0, bot-n+1, term.col-1, bot, 1);

	for (i = bot; i >= top+n; i--) {
		temp = term.line[i];
		term.line[i] = term.line[i-n];
		term.line[i-n] = temp;
	}

	if (sel.ob.x != -1 && sel.alt == IS_SET(MODE_ALTSCREEN))
		selscroll(top, bot, n);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testl %esi, %esi
jle 0xaf6a
movl %edi, %ebx
movslq 0x1190e(%rip), %r14     # 0x1c7c8
movl %r14d, %eax
subl %edi, %eax
leal 0x1(%rax), %r15d
cmpl %esi, %eax
cmovgel %esi, %r15d
movl %r14d, %ebp
subl %r15d, %ebp
movl %ebp, %esi
callq 0x642b
incl %ebp
movl 0xda16(%rip), %edx      # 0x188f4
decl %edx
xorl %edi, %edi
movl %ebp, %esi
movl %r14d, %ecx
callq 0xab72
leal (%r15,%rbx), %ecx
cmpl %ecx, %r14d
jl 0xaf37
movslq %r15d, %rax
movslq %ecx, %rcx
leaq 0x1(%r14), %rdx
shlq $0x3, %rax
negq %rax
movq 0xd9eb(%rip), %rsi      # 0x188f8
leaq (%rsi,%rdx,8), %rdi
movq -0x8(%rsi,%rdx,8), %r8
movq -0x8(%rax,%rdi), %rdi
movq %rdi, -0x8(%rsi,%rdx,8)
movq 0xd9d1(%rip), %rsi      # 0x188f8
addq %rax, %rsi
movq %r8, -0x8(%rsi,%rdx,8)
decq %rdx
cmpq %rcx, %rdx
jg 0xaf06
cmpl $-0x1, 0xd99e(%rip)     # 0x188dc
je 0xaf6a
movl 0xd9a6(%rip), %eax      # 0x188ec
btl $0x2, 0x1187e(%rip)     # 0x1c7cc
sbbl $0x0, %eax
jne 0xaf6a
movl %ebx, %edi
movl %r14d, %esi
movl %r15d, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xb6c9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/anachronic[P]st/st.c
// Function: tdeletechar
void
tdeletechar(int n)
{
	int src, dst, size;
	Line line;

	if (n <= 0)
		return;
	dst = term.c.x;
	src = MIN(term.c.x + n, term.col);
	size = term.col - src;
	if (size > 0) { /* otherwise src would point beyond the array
	                   https://stackoverflow.com/questions/29844298 */
		line = term.line[term.c.y];
		memmove(&line[dst], &line[src], size * sizeof(Glyph));
	}
	tclearregion(dst + size, term.c.y, term.col - 1, term.c.y, 1);
}

// Assembly:
testl %edi, %edi
jle 0xb51d
pushq %r14
pushq %rbx
pushq %rax
movslq 0x112fa(%rip), %r14     # 0x1c7b0
addl %r14d, %edi
movl 0xd435(%rip), %ebx      # 0x188f4
cmpl %ebx, %edi
cmovgel %ebx, %edi
subl %edi, %ebx
jle 0xb4fc
movq 0xd429(%rip), %rax      # 0x188f8
movslq 0x112de(%rip), %rcx     # 0x1c7b4
movq (%rax,%rcx,8), %rcx
movq %r14, %rax
shlq $0x4, %rax
addq %rcx, %rax
movslq %edi, %rsi
shlq $0x4, %rsi
addq %rcx, %rsi
movl %ebx, %edx
shlq $0x4, %rdx
movq %rax, %rdi
callq 0x5510
addl %r14d, %ebx
movl 0x112af(%rip), %ecx     # 0x1c7b4
movl 0xd3e9(%rip), %edx      # 0x188f4
decl %edx
movl %ebx, %edi
movl %ecx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xab72
retq
// File: /workspace/github_c_makefile_star2_O1/anachronic[P]st/st.c
// Function: selscroll
void
selscroll(int top, int bot, int n)
{
	/* turn absolute coordinates into relative */
	top += term.scr, bot += term.scr;

	if (BETWEEN(sel.nb.y, top, bot) != BETWEEN(sel.ne.y, top, bot)) {
		selclear();
	} else if (BETWEEN(sel.nb.y, top, bot)) {
		selmove(n);
		if (sel.nb.y < top || sel.ne.y > bot)
			selclear();
	}
}

// Assembly:
movl %esi, %eax
movl %edi, %ecx
movl 0x110b5(%rip), %esi     # 0x1c788
addl %esi, %ecx
addl %esi, %eax
movl 0xd1f3(%rip), %edi      # 0x188d0
cmpl %edi, %ecx
setle %sil
cmpl %eax, %edi
setle %r8b
andb %sil, %r8b
movl 0xd1e6(%rip), %esi      # 0x188d8
cmpl %esi, %ecx
setg %r9b
cmpl %eax, %esi
setg %r10b
orb %r9b, %r10b
cmpb %r10b, %r8b
je 0xb745
cmpl %eax, %edi
setle %r8b
cmpl %edi, %ecx
setle %r9b
andb %r8b, %r9b
cmpb $0x1, %r9b
jne 0xb767
addl %edx, 0xd1bf(%rip)      # 0x188e0
addl %edx, %edi
movl %edi, 0xd1a7(%rip)      # 0x188d0
addl %edx, 0xd1b9(%rip)      # 0x188e8
addl %edx, %esi
movl %esi, 0xd1a1(%rip)      # 0x188d8
cmpl %ecx, %edi
setge %cl
cmpl %eax, %esi
setle %al
testb %al, %cl
jne 0xb767
cmpl $-0x1, 0xd190(%rip)     # 0x188dc
je 0xb767
movl $0x0, 0xd168(%rip)      # 0x188c0
movl $0xffffffff, 0xd17a(%rip) # imm = 0xFFFFFFFF
jmp 0x642b
retq
// File: /workspace/github_c_makefile_star2_O1/anachronic[P]st/x.c
// Function: xsettitle
void
xsettitle(char *p, int pop)
{
 	XTextProperty prop;
 
	free(titlestack[tstki]);
	if (pop) {
		titlestack[tstki] = NULL;
		tstki = (tstki - 1 + TITLESTACKSIZE) % TITLESTACKSIZE;
		p = titlestack[tstki] ? titlestack[tstki] : opt_title;
	} else if (p) {
		titlestack[tstki] = xstrdup(p);
	} else {
		titlestack[tstki] = NULL;
		p = opt_title;
	}

	if (Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle,
	                                &prop) != Success)
		return;
	XSetWMName(xw.dpy, xw.win, &prop);
	XSetTextProperty(xw.dpy, xw.win, &prop, xw.netwmname);
	XFree(prop.value);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, %ebx
movq %rdi, 0x8(%rsp)
movl 0x12ddc(%rip), %r15d    # 0x1edf0
leaq 0x12d95(%rip), %r14     # 0x1edb0
movq (%r14,%r15,8), %rdi
callq 0x5340
testl %ebx, %ebx
je 0xc048
movq $0x0, (%r14,%r15,8)
leal -0x1(%r15), %eax
andl $0x7, %eax
movl %eax, 0x12db3(%rip)     # 0x1edf0
movq (%r14,%rax,8), %rax
testq %rax, %rax
je 0xc06b
jmp 0xc072
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xc063
callq 0x5fda
movl 0x12d93(%rip), %ecx     # 0x1edf0
movq %rax, (%r14,%rcx,8)
jmp 0xc077
movq $0x0, (%r14,%r15,8)
movq 0x12d2e(%rip), %rax     # 0x1eda0
movq %rax, 0x8(%rsp)
movq 0x12bf2(%rip), %rdi     # 0x1ec70
leaq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %r8
movl $0x1, %edx
movl $0x4, %ecx
callq 0x5430
testl %eax, %eax
jne 0xc0db
movq 0x12bce(%rip), %rdi     # 0x1ec70
movq 0x12bd7(%rip), %rsi     # 0x1ec80
leaq 0x10(%rsp), %rbx
movq %rbx, %rdx
callq 0x53e0
movq 0x12bb3(%rip), %rdi     # 0x1ec70
movq 0x12bbc(%rip), %rsi     # 0x1ec80
movq 0x12bdd(%rip), %rcx     # 0x1eca8
movq %rbx, %rdx
callq 0x5450
movq (%rbx), %rdi
callq 0x5090
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/anachronic[P]st/x.c
// Function: xpushtitle
void
xpushtitle(void)
{
	int tstkin = (tstki + 1) % TITLESTACKSIZE;

	free(titlestack[tstkin]);
	titlestack[tstkin] = titlestack[tstki] ? xstrdup(titlestack[tstki]) : NULL;
	tstki = tstkin;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl 0x12cff(%rip), %r15d    # 0x1edf0
leal 0x1(%r15), %ebx
andl $0x7, %ebx
leaq 0x12cb1(%rip), %r14     # 0x1edb0
movq (%r14,%rbx,8), %rdi
callq 0x5340
movq (%r14,%r15,8), %rdi
testq %rdi, %rdi
je 0xc118
callq 0x5fda
jmp 0xc11a
xorl %eax, %eax
movq %rax, (%r14,%rbx,8)
movl %ebx, 0x12ccc(%rip)     # 0x1edf0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/anachronic[P]st/x.c
// Function: mouseaction
int
mouseaction(XEvent *e, uint release)
{
	MouseShortcut *ms;

	/* ignore Button<N>mask for Button<N> - it's set on release */
	uint state = e->xbutton.state & ~buttonmask(e->xbutton.button);

	for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) {
		if (ms->release == release &&
		    ms->button == e->xbutton.button &&
		    (!ms->altscrn || (ms->altscrn == (tisaltscreen() ? 1 : -1))) &&
		    (match(ms->mod, state) ||  /* exact or forced */
		     match(ms->mod, state & ~forcemousemod))) {
			ms->func(&(ms->arg));
			return 1;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl 0x50(%rdi), %eax
movl 0x54(%rdi), %ecx
leal -0x1(%rcx), %edx
cmpl $0x4, %edx
jae 0xf4ea
movl %edx, %ecx
leaq 0x30cf(%rip), %rdx      # 0x125b4
movl (%rdx,%rcx,4), %ebp
jmp 0xf4fb
xorl %ebp, %ebp
cmpl $0x5, %ecx
setne %bpl
negl %ebp
orl $0xffffefff, %ebp       # imm = 0xFFFFEFFF
andl %eax, %ebp
movl %ebp, %eax
andl $0xffff9fef, %eax       # imm = 0xFFFF9FEF
movl %eax, 0x4(%rsp)
andl $0xffff9fee, %ebp       # imm = 0xFFFF9FEE
movq $-0x20, %r12
leaq 0x92b4(%rip), %r13      # 0x187d0
cmpl %ebx, 0x38(%r12,%r13)
jne 0xf568
movl 0x24(%r12,%r13), %eax
cmpl 0x54(%r14), %eax
jne 0xf568
movl 0x3c(%r12,%r13), %r15d
testl %r15d, %r15d
je 0xf54f
callq 0x7616
cmpl $0x1, %eax
movl $0x0, %eax
sbbl %eax, %eax
orl $0x1, %eax
cmpl %eax, %r15d
jne 0xf568
movl 0x20(%r12,%r13), %eax
cmpl $-0x1, %eax
je 0xf586
cmpl %eax, 0x4(%rsp)
je 0xf586
cmpl $-0x1, %eax
je 0xf586
cmpl %eax, %ebp
je 0xf586
addq $0x20, %r12
cmpq $0xc0, %r12
jb 0xf51c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq (%r12,%r13), %rdi
addq $0x30, %rdi
callq *-0x8(%rdi)
movl $0x1, %eax
jmp 0xf577