LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/init.c
// Function: badcheck
int badcheck(char *name,struct magic_item *magic)
{
	struct magic_item *mg;

	for (mg = magic; mg->mi_name != NULL; mg++)
		;
	if ((mg - 1)->mi_prob == 1000)
		return 0;
	printf("\nBad percentages for %s:\n", name);
	for (mg = magic; mg->mi_name != NULL; mg++)
		printf("%4d%% %s\n", mg->mi_prob, mg->mi_name);
	printf("%s", retstr);
	fflush(stdout);
	while (getchar() != '\n')
		continue;
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %rsi
movq %rbx, %rax
cmpq $0x0, (%rax)
leaq 0x10(%rax), %rax
jne 0xac14
cmpl $0x3e8, -0x18(%rax)     # imm = 0x3E8
je 0xac85
leaq 0x13e42(%rip), %rdi     # 0x1ea70
xorl %eax, %eax
callq 0x61c0
leaq 0x13e4e(%rip), %r14     # 0x1ea8a
movq (%rbx), %rdx
testq %rdx, %rdx
je 0xac57
movl 0x8(%rbx), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x61c0
addq $0x10, %rbx
jmp 0xac3c
leaq 0x1298a(%rip), %rdi     # 0x1d5e8
leaq 0x1f6cb(%rip), %rsi     # 0x2a330
xorl %eax, %eax
callq 0x61c0
movq 0x1f28d(%rip), %rax     # 0x29f00
movq (%rax), %rdi
callq 0x6340
callq 0x6260
cmpl $0xa, %eax
jne 0xac7b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/init.c
// Function: init_colors
void init_colors()
{
	int i, j;
	char *str;
	bool used[NCOLORS];

	for (i = 0; i < NCOLORS; i++)
		used[i] = FALSE;
	for (i = 0; i < MAXPOTIONS; i++) {
		do {
			j = rnd(NCOLORS);
		} until (!used[j]);
		used[j] = TRUE;
		p_colors[i] = rainbow[j];
		p_know[i] = FALSE;
		p_guess[i] = NULL;
		if (i > 0)
			p_magic[i].mi_prob += p_magic[i-1].mi_prob;
	}
	badcheck("potions", p_magic);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorl %eax, %eax
cmpq $0x20, %rax
je 0xacae
movb $0x0, (%rsp,%rax)
incq %rax
jmp 0xac9f
pushq $0x20
popq %rbx
leaq 0x25928(%rip), %r15     # 0x305e0
leaq 0x25731(%rip), %r12     # 0x303f0
leaq 0x254ba(%rip), %r13     # 0x30180
leaq 0x217d3(%rip), %rbp     # 0x2c4a0
xorl %r14d, %r14d
cmpq $0x15, %r14
je 0xad1e
movl %ebx, %edi
xorl %eax, %eax
callq 0xc004
cltq
cmpb $0x0, (%rsp,%rax)
jne 0xacd6
movb $0x1, (%rsp,%rax)
leaq 0x21e1e(%rip), %rcx     # 0x2cb10
movq (%rcx,%rax,8), %rax
movq %rax, (%r15,%r14,8)
movb $0x0, (%r12,%r14)
andq $0x0, (%r13,%r14,8)
testq %r14, %r14
je 0xad19
movq %r14, %rax
shlq $0x4, %rax
movl -0x8(%rbp,%rax), %ecx
addl %ecx, 0x8(%rbp,%rax)
incq %r14
jmp 0xacd0
leaq 0x13d2e(%rip), %rdi     # 0x1ea53
leaq 0x21774(%rip), %rsi     # 0x2c4a0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xac07
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/init.c
// Function: init_names
void init_names()
{
	int nsyl;
	char *cp, *sp;
	int i, nwords;

	for (i = 0; i < MAXSCROLLS; i++) {
		cp = prbuf;
		nwords = rnd(3)+1;
		while(nwords--)	{
			nsyl = rnd(3)+2;
			while(nsyl--) {
				sp = sylls[rnd(NSYLS)];
				while(*sp)
					*cp++ = *sp++;
			}
			*cp++ = ' ';
		}
		*--cp = '\0';
		s_names[i] = new(strlen(prbuf)+1);
		s_know[i] = FALSE;
		s_guess[i] = NULL;
		strcpy(s_names[i], prbuf);
		if (i > 0)
			s_magic[i].mi_prob += s_magic[i-1].mi_prob;
	}
	badcheck("scrolls", s_magic);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
pushq $0x3
popq %rbx
leaq 0x2312c(%rip), %r14     # 0x2de80
leaq 0x21eb5(%rip), %r13     # 0x2cc10
xorl %r12d, %r12d
cmpq $0x1a, %r12
je 0xae2b
movl %ebx, %edi
xorl %eax, %eax
callq 0xc004
movl %eax, %ebp
incl %ebp
subl $0x1, %ebp
jb 0xadbd
movl %ebx, %edi
xorl %eax, %eax
callq 0xc004
movl %eax, %r15d
addl $0x2, %r15d
subl $0x1, %r15d
jb 0xadb4
movl $0x9f, %edi
xorl %eax, %eax
callq 0xc004
cltq
movq (%r13,%rax,8), %rax
movb (%rax), %cl
testb %cl, %cl
je 0xad8a
incq %rax
movb %cl, (%r14)
incq %r14
jmp 0xada3
movb $0x20, (%r14)
incq %r14
jmp 0xad75
xorl %r15d, %r15d
movb %r15b, -0x1(%r14)
leaq 0x230b5(%rip), %r14     # 0x2de80
movq %r14, %rdi
callq 0x6170
leal 0x1(%rax), %edi
callq 0xb8a5
leaq 0x2572e(%rip), %rcx     # 0x30510
movq %rax, (%rcx,%r12,8)
leaq 0x255e3(%rip), %rcx     # 0x303d0
movb %r15b, (%rcx,%r12)
leaq 0x252b8(%rip), %rcx     # 0x300b0
andq $0x0, (%rcx,%r12,8)
movq %rax, %rdi
movq %r14, %rsi
callq 0x60e0
testq %r12, %r12
je 0xae23
movq %r12, %rax
shlq $0x4, %rax
leaq 0x214d5(%rip), %rdx     # 0x2c2f0
movl -0x8(%rdx,%rax), %ecx
addl %ecx, 0x8(%rdx,%rax)
incq %r12
jmp 0xad5e
leaq 0x13c29(%rip), %rdi     # 0x1ea5b
leaq 0x214b7(%rip), %rsi     # 0x2c2f0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xac07
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/init.c
// Function: init_stones
void init_stones()
{
	int i, j;
	char *str;
	bool used[NSTONES];

	for (i = 0; i < NSTONES; i++)
		used[i] = FALSE;

	for (i = 0; i < MAXRINGS; i++) {
		do {
			j = rnd(NSTONES);
		} until (!used[j]);
		used[j] = TRUE;
		r_stones[i] = stones[j];
		r_know[i] = FALSE;
		r_guess[i] = NULL;
		if (i > 0)
			r_magic[i].mi_prob += r_magic[i-1].mi_prob;
	}
	badcheck("rings", r_magic);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorl %eax, %eax
cmpq $0x23, %rax
je 0xae6b
movb $0x0, (%rsp,%rax)
incq %rax
jmp 0xae5c
pushq $0x23
popq %rbx
leaq 0x2581b(%rip), %r15     # 0x30690
leaq 0x25594(%rip), %r12     # 0x30410
leaq 0x253ad(%rip), %r13     # 0x30230
leaq 0x21776(%rip), %rbp     # 0x2c600
xorl %r14d, %r14d
cmpq $0x1a, %r14
je 0xaedb
movl %ebx, %edi
xorl %eax, %eax
callq 0xc004
cltq
cmpb $0x0, (%rsp,%rax)
jne 0xae93
movb $0x1, (%rsp,%rax)
leaq 0x22261(%rip), %rcx     # 0x2d110
movq (%rcx,%rax,8), %rax
movq %rax, (%r15,%r14,8)
movb $0x0, (%r12,%r14)
andq $0x0, (%r13,%r14,8)
testq %r14, %r14
je 0xaed6
movq %r14, %rax
shlq $0x4, %rax
movl -0x8(%rbp,%rax), %ecx
addl %ecx, 0x8(%rbp,%rax)
incq %r14
jmp 0xae8d
leaq 0x13b81(%rip), %rdi     # 0x1ea63
leaq 0x21717(%rip), %rsi     # 0x2c600
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xac07
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/init.c
// Function: init_materials
void init_materials()
{
	int i, j;
	char *str;
	struct rod *rd;
	bool metused[NMETAL], woodused[NWOOD];

	for (i = 0; i < NWOOD; i++)
		woodused[i] = FALSE;
	for (i = 0; i < NMETAL; i++)
		metused[i] = FALSE;

	for (i = 0; i < MAXSTICKS; i++) {
		rd = &ws_stuff[i];
		for (;;)  {
			if (rnd(100) > 50) {
				j = rnd(NMETAL);
				if (!metused[j]) {
					str = metal[j];
					rd->ws_type = "wand";
					rd->ws_vol = V_WS_WAND;
					rd->ws_wght = W_WS_WAND;
					metused[j] = TRUE;
					break;
				}
			}
			else {
				j = rnd(NWOOD);
				if (!woodused[j]) {
					str = wood[j];
					rd->ws_type = "staff";
					rd->ws_vol = V_WS_STAFF;
					rd->ws_wght = W_WS_WAND;
					woodused[j] = TRUE;
					break;
				}
			}
		} 
		ws_stuff[i].ws_made = str;
		ws_know[i] = FALSE;
		ws_guess[i] = NULL;
		if (i > 0)
			ws_magic[i].mi_prob += ws_magic[i-1].mi_prob;
	}
	badcheck("sticks", ws_magic);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorl %eax, %eax
cmpq $0x18, %rax
je 0xaf1c
movb $0x0, 0x10(%rsp,%rax)
incq %rax
jmp 0xaf0c
xorl %eax, %eax
cmpq $0xf, %rax
je 0xaf2e
movb $0x0, 0x1(%rsp,%rax)
incq %rax
jmp 0xaf1e
pushq $0x64
popq %rbx
pushq $0xf
popq %rbp
leaq 0x21875(%rip), %r15     # 0x2c7b0
pushq $0x18
popq %r14
xorl %r13d, %r13d
cmpq $0x1a, %r13
je 0xb01e
imulq $0x18, %r13, %r12
addq 0x1efc1(%rip), %r12     # 0x29f18
movl %ebx, %edi
xorl %eax, %eax
callq 0xc004
cmpl $0x33, %eax
jl 0xaf7a
movl %ebp, %edi
xorl %eax, %eax
callq 0xc004
movslq %eax, %rcx
cmpb $0x0, 0x1(%rsp,%rcx)
jne 0xaf57
jmp 0xafaf
movl %r14d, %edi
xorl %eax, %eax
callq 0xc004
movslq %eax, %rcx
cmpb $0x0, 0x10(%rsp,%rcx)
jne 0xaf57
leaq (%rsp,%rcx), %rax
addq $0x10, %rax
leaq 0x22293(%rip), %rdx     # 0x2d230
leaq (%rdx,%rcx,8), %rcx
movl $0xc8, %edx
leaq 0x12e92(%rip), %rsi     # 0x1de3f
jmp 0xafcb
leaq (%rsp,%rcx), %rax
incq %rax
leaq 0x22333(%rip), %rdx     # 0x2d2f0
leaq (%rdx,%rcx,8), %rcx
leaq 0x13275(%rip), %rsi     # 0x1e23d
pushq $0x6e
popq %rdx
movq (%rcx), %rcx
movq %rsi, (%r12)
movl %edx, 0x10(%r12)
movl $0x3c, 0x14(%r12)
movb $0x1, (%rax)
movq %rcx, 0x8(%r12)
leaq 0x25441(%rip), %rax     # 0x30430
movb $0x0, (%rax,%r13)
leaq 0x25305(%rip), %rax     # 0x30300
andq $0x0, (%rax,%r13,8)
testq %r13, %r13
je 0xb016
movq %r13, %rax
shlq $0x4, %rax
movl -0x8(%r15,%rax), %ecx
addl %ecx, 0x8(%r15,%rax)
incq %r13
jmp 0xaf42
leaq 0x13a44(%rip), %rdi     # 0x1ea69
leaq 0x21784(%rip), %rsi     # 0x2c7b0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xac07
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/init.c
// Function: init_player
void init_player()
{
	player.t_nomove = 0;
	player.t_nocmd = 0;
	him = &player.t_stats;
	him->s_lvl = 1;
	him->s_exp = 0L;
	him->s_maxhp = him->s_hpt = pinit();		/* hit points */
	him->s_re.a_str = pinit();		/* strength */
	him->s_re.a_dex = pinit();		/* dexterity */
	him->s_re.a_wis = pinit();		/* wisdom */
	him->s_re.a_con = pinit();		/* constitution */
	him->s_ef = him->s_re;			/* effective = real */
	strcpy(him->s_dmg, "1d4");
	him->s_arm = NORMAC;
	him->s_carry = totalenc();
	him->s_pack = 0;
	pack = NULL;				/* empty pack so far */
	max_stats = *him;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x22c06(%rip), %rbx     # 0x2dc50
andq $0x0, 0x84(%rbx)
leaq 0x22cf7(%rip), %r14     # 0x2dd50
movq %rbx, (%r14)
movl $0x1, 0x28(%rbx)
andq $0x0, 0x20(%rbx)
callq 0xb0ed
movq (%r14), %rcx
movl %eax, 0x30(%rcx)
movl %eax, 0x34(%rcx)
callq 0xb0ed
movq (%r14), %rcx
movl %eax, (%rcx)
callq 0xb0ed
movq (%r14), %rcx
movl %eax, 0x4(%rcx)
callq 0xb0ed
movq (%r14), %rcx
movl %eax, 0x8(%rcx)
callq 0xb0ed
movq (%r14), %rcx
movl %eax, 0xc(%rcx)
movq (%rcx), %rax
movq %rax, 0x10(%rcx)
movl 0x8(%rcx), %eax
movl %eax, 0x18(%rcx)
movl 0xc(%rcx), %eax
movl %eax, 0x1c(%rcx)
movl $0x346431, 0x40(%rcx)   # imm = 0x346431
movl $0xa, 0x2c(%rcx)
xorl %eax, %eax
callq 0x9606
movq (%r14), %rsi
movl %eax, 0x3c(%rsi)
andl $0x0, 0x38(%rsi)
andq $0x0, 0x68(%rbx)
leaq 0x22c09(%rip), %rdi     # 0x2dce8
pushq $0xa
popq %rcx
rep  movsq (%rsi), %es:(%rdi)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/init.c
// Function: pinit
int pinit()
{
	int best[4];
	int i, min, minind, dicetot;

	for (i = 0 ; i < 4 ; i++)
		best[i] = roll(1,6);	/* populate array */
	min = best[0];				/* assume that 1st entry */
	minind = 0;					/* is the lowest */
	for (i = 1 ; i < 4 ; i++) {	/* find the lowest */
		if (best[i] < min) {	/* if < minimum then update */
			min = best[i];
			minind = i;			/* point to lowest value */
		}
	}
	dicetot = 0;				/* start with nothing */
	for (i = 0 ; i < 4 ; i++) {
		if (i != minind)		/* if not minimum, then add it */
			dicetot += best[i];
	}
	return(dicetot);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
xorl %r14d, %r14d
pushq $0x1
popq %rbx
pushq $0x6
popq %rbp
cmpq $0x4, %r14
je 0xb116
movl %ebx, %edi
movl %ebp, %esi
callq 0xc025
movl %eax, (%rsp,%r14,4)
incq %r14
jmp 0xb0fe
xorl %eax, %eax
pushq $0x1
popq %rcx
movl (%rsp), %edx
cmpq $0x4, %rcx
je 0xb134
movl (%rsp,%rcx,4), %esi
cmpl %edx, %esi
cmovll %esi, %edx
cmovll %ecx, %eax
incq %rcx
jmp 0xb11e
movl %eax, %ecx
xorl %edx, %edx
xorl %eax, %eax
cmpq $0x4, %rdx
je 0xb14d
cmpq %rdx, %rcx
je 0xb148
addl (%rsp,%rdx,4), %eax
incq %rdx
jmp 0xb13a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/init.c
// Function: init_everything
void init_everything()
{
	init_player();			/* Roll up the rogue */
	init_things();			/* Set up probabilities */
	init_names();			/* Set up names of scrolls */
	init_colors();			/* Set up colors of potions */
	init_stones();			/* Set up stones in rings */
	init_materials();		/* Set up materials of wands */
}

// Assembly:
pushq %rax
callq 0xb03f
callq 0xab5c
callq 0xad3f
callq 0xac8f
callq 0xae4c
popq %rax
jmp 0xaefc
nop
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/io.c
// Function: msg
int msg(char *fmt, ...)
{
	va_list ap;
	/*
	 * if the string is "", just clear the line
	 */
	if (*fmt == '\0') {
		wmove(cw, 0, 0);
		wclrtoeol(cw);
		mpos = 0;
		return 0;
	}
	/*
	 * otherwise add to the message and flush it out
	 */
	va_start(ap, fmt);
	doadd(fmt, ap);
	va_end(ap);
	endmsg();
  return 0;
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0xb1d4
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
cmpb $0x0, (%rdi)
je 0xb20a
leaq 0x20(%rsp), %rax
movq %rsp, %rsi
movq %rax, 0x10(%rsi)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsi)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsi)
callq 0xb23a
callq 0xb2ef
jmp 0xb22f
leaq 0x257bf(%rip), %rbx     # 0x309d0
movq (%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6470
movq (%rbx), %rdi
callq 0x6480
leaq 0x22634(%rip), %rax     # 0x2d860
andl $0x0, (%rax)
xorl %eax, %eax
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/io.c
// Function: endmsg
void endmsg()
{
	strcpy(huh, msgbuf);
	if (mpos > 0) {
		wmove(cw, 0, mpos);
		waddstr(cw, morestr);
		draw(cw);
		wait_for(cw, ' ');
	}
	mvwaddstr(cw, 0, 0, msgbuf);
	wclrtoeol(cw);
	mpos = newpos;
	newpos = 0;
	draw(cw);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x22c76(%rip), %rdi     # 0x2df70
leaq 0x256ef(%rip), %rsi     # 0x309f0
callq 0x60e0
leaq 0x22553(%rip), %rbx     # 0x2d860
movl (%rbx), %edx
testl %edx, %edx
jle 0xb349
leaq 0x256b6(%rip), %r14     # 0x309d0
movq (%r14), %rdi
xorl %esi, %esi
callq 0x6470
movq (%r14), %rdi
leaq 0x1eff0(%rip), %rsi     # 0x2a31e
pushq $-0x1
popq %rdx
callq 0x6530
movq (%r14), %rdi
callq 0x6200
movq (%r14), %rdi
pushq $0x20
popq %rsi
callq 0xb399
leaq 0x25680(%rip), %r14     # 0x309d0
movq (%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6470
cmpl $-0x1, %eax
je 0xb373
movq (%r14), %rdi
leaq 0x25685(%rip), %rsi     # 0x309f0
pushq $-0x1
popq %rdx
callq 0x6530
movq (%r14), %rdi
callq 0x6480
movl 0x2766f(%rip), %eax     # 0x329f0
andl $0x0, 0x27668(%rip)     # 0x329f0
movl %eax, (%rbx)
movq (%r14), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6200
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/list.c
// Function: detach
void _detach(struct linked_list **list,struct linked_list *item)
{
	if (*list == item)
		*list = next(item);
	if (prev(item) != NULL)
		item->l_prev->l_next = next(item);
	if (next(item) != NULL)
		item->l_next->l_prev = prev(item);
	item->l_next = NULL;
	item->l_prev = NULL;
}

// Assembly:
movq (%rsi), %rax
cmpq %rsi, (%rdi)
jne 0xb7ff
movq %rax, (%rdi)
movq 0x8(%rsi), %rcx
testq %rcx, %rcx
je 0xb80b
movq %rax, (%rcx)
testq %rax, %rax
je 0xb814
movq %rcx, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/list.c
// Function: free_list
void _free_list(struct linked_list **ptr)
{
	struct linked_list *item;

	while (*ptr != NULL) {
		item = *ptr;
		*ptr = next(item);
		discard(item);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xb855
movq (%rdi), %rax
movq %rax, (%rbx)
callq 0xb857
jmp 0xb840
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/list.c
// Function: new_item
struct linked_list *new_item(int size)
{
	struct linked_list *item;

	item = (struct linked_list *) new(sizeof *item);
	item->l_data = new(size);
	item->l_next = item->l_prev = NULL;
	return item;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x18
popq %rdi
callq 0xb8a5
movq %rax, %r14
movl %ebx, %edi
callq 0xb8a5
movq %rax, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/list.c
// Function: new
char *new(int size)
{
	char *space = ALLOC(size);

	if (space == NULL) {
		sprintf(prbuf,"Rogue ran out of memory.");
		fatal(prbuf);
	}
	total++;
	return space;
}

// Assembly:
pushq %rbx
movl %edi, %edi
callq 0x6330
movq %rax, %rbx
testq %rax, %rax
jne 0xb8d6
movups 0x132e6(%rip), %xmm0    # 0x1eba2
leaq 0x225bd(%rip), %rdi     # 0x2de80
movups %xmm0, 0x9(%rdi)
movups 0x132cb(%rip), %xmm0    # 0x1eb99
movups %xmm0, (%rdi)
callq 0xbf9e
leaq 0x21f8b(%rip), %rax     # 0x2d868
incl (%rax)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/main.c
// Function: fatal
void fatal(char *s)
{
	clear();
	refresh();
	endwin();
	fprintf(stderr,"%s\n\r",s);
	fflush(stderr);
	byebye(2);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x1df8c(%rip), %r14     # 0x29f38
movq (%r14), %rdi
callq 0x6120
movq (%r14), %rdi
callq 0x6200
callq 0x6510
movq 0x1e030(%rip), %r14     # 0x29ff8
movq (%r14), %rdi
leaq 0x13e32(%rip), %rsi     # 0x1fe04
movq %rbx, %rdx
xorl %eax, %eax
callq 0x6280
movq (%r14), %rdi
callq 0x6340
pushq $0x2
popq %rdi
callq 0xbfec
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/main.c
// Function: rnd
int rnd(int range)
{
	int wh;

	if (range == 0)
		wh = 0;
	else {
		wh = lrand48() % range;
		wh &= 0x7FFFFFFF;
	}
	return wh;
}

// Assembly:
testl %edi, %edi
je 0xc022
pushq %rbx
movl %edi, %ebx
callq 0x6370
movslq %ebx, %rcx
cqto
idivq %rcx
movq %rdx, %rax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
popq %rbx
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/main.c
// Function: roll
int roll(int number,int sides)
{
	int dtotal = 0;

	while(number-- > 0)
		dtotal += rnd(sides)+1;
	return dtotal;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %ebp
xorl %r14d, %r14d
testl %ebp, %ebp
jle 0xc045
decl %ebp
movl %ebx, %edi
callq 0xc004
addl %eax, %r14d
incl %r14d
jmp 0xc030
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/main.c
// Function: setup
void setup()
{
	signal(SIGHUP, auto_save);
	signal(SIGINT, auto_save);
	signal(SIGQUIT,  byebye);
	signal(SIGILL, game_err);
	signal(SIGTRAP, game_err);
#ifdef SIGIOT
	signal(SIGIOT, game_err);
#endif
#ifdef SIGEMT
	signal(SIGEMT, game_err);
#endif
	signal(SIGFPE, game_err);
#ifdef SIGBUS
	signal(SIGBUS, game_err);
#endif
	signal(SIGSEGV, game_err);
#ifdef SIGSYS
	signal(SIGSYS, game_err);
#endif
	signal(SIGPIPE, game_err);
	signal(SIGTERM, game_err);

	cbreak();
	noecho();
}

// Assembly:
pushq %rbx
leaq 0x72ca(%rip), %rbx      # 0x1331f
pushq $0x1
popq %rdi
movq %rbx, %rsi
callq 0x6270
pushq $0x2
popq %rdi
movq %rbx, %rsi
callq 0x6270
leaq -0x86(%rip), %rsi       # 0xbfec
pushq $0x3
popq %rdi
callq 0x6270
leaq 0x72af(%rip), %rbx      # 0x13330
pushq $0x4
popq %rdi
movq %rbx, %rsi
callq 0x6270
pushq $0x5
popq %rdi
movq %rbx, %rsi
callq 0x6270
pushq $0x6
popq %rdi
movq %rbx, %rsi
callq 0x6270
pushq $0x8
popq %rdi
movq %rbx, %rsi
callq 0x6270
pushq $0x7
popq %rdi
movq %rbx, %rsi
callq 0x6270
pushq $0xb
popq %rdi
movq %rbx, %rsi
callq 0x6270
pushq $0x1f
popq %rdi
movq %rbx, %rsi
callq 0x6270
pushq $0xd
popq %rdi
movq %rbx, %rsi
callq 0x6270
pushq $0xf
popq %rdi
movq %rbx, %rsi
callq 0x6270
callq 0x6310
popq %rbx
jmp 0x6180
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/main.c
// Function: playit
void playit()
{
	char *opts;

	tcgetattr(0,&terminal);


	/* parse environment declaration of options */

	if ((opts = getenv("ROGUEOPTS")) != NULL)
		parse_opts(opts);

	player.t_oldpos = hero;
	oldrp = roomin(&hero);
	nochange = FALSE;
	while (playing)
		command();		/* Command execution */
	endit(0);
}

// Assembly:
pushq %rbx
leaq 0x26959(%rip), %rsi     # 0x32a50
xorl %edi, %edi
callq 0x6410
leaq 0x12af8(%rip), %rdi     # 0x1ebfd
callq 0x6040
testq %rax, %rax
je 0xc117
movq %rax, %rdi
callq 0xf66c
leaq 0x21b32(%rip), %rax     # 0x2dc50
leaq 0x50(%rax), %rdi
movq 0x50(%rax), %rcx
movq %rcx, 0x58(%rax)
callq 0x6f44
leaq 0x21b12(%rip), %rcx     # 0x2dc48
movq %rax, (%rcx)
leaq 0x21753(%rip), %rax     # 0x2d893
movb $0x0, (%rax)
leaq 0x1e1b2(%rip), %rbx     # 0x2a2fc
cmpb $0x1, (%rbx)
jne 0xc158
xorl %eax, %eax
callq 0x747c
jmp 0xc14a
leaq 0x12b3c(%rip), %rdi     # 0x1ec9b
callq 0xbf9e
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/main.c
// Function: roguehome
char *roguehome()
{
    static char path[1024];
    char *end,*home;

    if ( (home = getenv("ROGUEHOME")) != NULL)
    {
        if (*home)
        {
            strncpy(path, home, PATH_MAX - 20);

            end = &path[strlen(path)-1];


            while( (end >= path) && ((*end == '/') || (*end == '\\')))
                *end-- = '\0';

            if (directory_exists(path))
                return(path);
        }
    }

    if (directory_exists("/var/games/roguelike"))
        return("/var/games/roguelike");
    if (directory_exists("/var/lib/roguelike"))
        return("/var/lib/roguelike");
    if (directory_exists("/var/roguelike"))
        return("/var/roguelike");
    if (directory_exists("/usr/games/lib"))
        return("/usr/games/lib");
    if (directory_exists("/games/roguelik"))
        return("/games/roguelik");

    return(NULL);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x12b1b(%rip), %rdi     # 0x1ecd5
callq 0x6040
testq %rax, %rax
je 0xc214
cmpb $0x0, (%rax)
je 0xc214
leaq 0x268c0(%rip), %rbx     # 0x32a90
movl $0xfec, %edx            # imm = 0xFEC
movq %rbx, %rdi
movq %rax, %rsi
callq 0x60b0
movq %rbx, %rdi
callq 0x6170
addq %rbx, %rax
decq %rax
cmpq %rbx, %rax
jb 0xc208
movzbl (%rax), %ecx
cmpl $0x5c, %ecx
je 0xc200
cmpl $0x2f, %ecx
jne 0xc208
movb $0x0, (%rax)
decq %rax
jmp 0xc1ee
movq %rbx, %rdi
callq 0xc17b
testl %eax, %eax
jne 0xc277
leaq 0x12ac4(%rip), %rbx     # 0x1ecdf
movq %rbx, %rdi
callq 0xc17b
testl %eax, %eax
jne 0xc277
leaq 0x12ac6(%rip), %rbx     # 0x1ecf4
movq %rbx, %rdi
callq 0xc17b
testl %eax, %eax
jne 0xc277
leaq 0x12ac6(%rip), %rbx     # 0x1ed07
movq %rbx, %rdi
callq 0xc17b
testl %eax, %eax
jne 0xc277
leaq 0x12ac2(%rip), %rbx     # 0x1ed16
movq %rbx, %rdi
callq 0xc17b
testl %eax, %eax
jne 0xc277
leaq 0x12abe(%rip), %r14     # 0x1ed25
movq %r14, %rdi
callq 0xc17b
xorl %ebx, %ebx
testl %eax, %eax
cmovneq %r14, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/misc.c
// Function: waste_time
int waste_time()
{
	if (inwhgt)		/* if from wghtchk, then done */
	     return 0;
	do_daemons(BEFORE);
	do_daemons(AFTER);
	do_fuses();
  return 0;
}

// Assembly:
leaq 0x21600(%rip), %rax     # 0x2d88b
cmpb $0x0, (%rax)
jne 0xc2ac
pushq %rax
pushq $0x1
popq %rdi
callq 0x89ea
pushq $0x2
popq %rdi
callq 0x89ea
xorl %eax, %eax
callq 0x8b06
addq $0x8, %rsp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/misc.c
// Function: tr_name
char *tr_name(char ch)
{
	char *s;

	switch (ch) {
		case TRAPDOOR:
			s = "A trapdoor.";
		when BEARTRAP:
			s = "A beartrap.";
		when SLEEPTRAP:
			s = "A sleeping gas trap.";
		when ARROWTRAP:
			s = "An arrow trap.";
		when TELTRAP:
			s = "A teleport trap.";
		when DARTTRAP:
			s = "A dart trap.";
		when POOL:
			s = "A magic pool.";
		when POST:
			s = "A trading post.";
		when MAZETRAP:
			s = "A maze trap.";
	otherwise:
		s = "A bottomless pit.";		/* shouldn't get here */
	}
	return s;
}

// Assembly:
cmpl $0x22, %edi
je 0xc347
cmpl $0x24, %edi
je 0xc367
cmpl $0x3e, %edi
je 0xc35f
cmpl $0x5c, %edi
je 0xc32f
cmpl $0x5e, %edi
je 0xc33f
cmpl $0x60, %edi
je 0xc357
cmpl $0x7b, %edi
je 0xc34f
cmpl $0x7e, %edi
je 0xc337
cmpl $0x7d, %edi
jne 0xc36f
leaq 0x12bc6(%rip), %rax     # 0x1eef4
retq
leaq 0x12c2a(%rip), %rax     # 0x1ef60
retq
leaq 0x12be6(%rip), %rax     # 0x1ef24
retq
leaq 0x12c0a(%rip), %rax     # 0x1ef50
retq
leaq 0x12bf4(%rip), %rax     # 0x1ef42
retq
leaq 0x12bbf(%rip), %rax     # 0x1ef15
retq
leaq 0x12bd7(%rip), %rax     # 0x1ef35
retq
leaq 0x12b82(%rip), %rax     # 0x1eee8
retq
leaq 0x12b92(%rip), %rax     # 0x1ef00
retq
leaq 0x12bf7(%rip), %rax     # 0x1ef6d
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/misc.c
// Function: eat
int eat()
{
	struct linked_list *item;
	struct object *obj;
	int goodfood, cursed;

	if ((item = get_item("eat", FOOD)) == NULL)
		return 0;
	obj = OBJPTR(item);
	if (obj->o_type != FOOD) {
		msg("That's Inedible!");
		after = FALSE;
		return 0;
	}
	cursed = 1;
	if (o_on(obj, ISCURSED))
		cursed += 1;
	else if (o_on(obj, ISBLESS))
		cursed -= 1;
	if (obj->o_which == FRUITFOOD) {
		msg("My, that was a yummy %s.", fruit);
		goodfood = 100;
	}
	else {
		if (rnd(100) > 80 || o_on(obj, ISCURSED)) {
			msg("Yuk, this food tastes like ARA.");
			goodfood = 300;
			him->s_exp += 1;
			check_level();
		}
		else {
			msg("Yum, that tasted good.");
			goodfood = 200;
		}
	}
	goodfood *= cursed;
	if ((food_left += HUNGERTIME + rnd(400) - goodfood) > STOMACHSIZE)
		food_left = STOMACHSIZE;
	hungry_state = F_OKAY;
	updpack();					/* update pack */
	if (obj == cur_weapon)
		cur_weapon = NULL;
	del_pack(item);		/* get rid of the food */
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x125be(%rip), %rdi     # 0x1ef7f
pushq $0x3a
popq %rsi
callq 0xfd08
testq %rax, %rax
je 0xcaf8
movq %rax, %rbx
movq 0x10(%rax), %r14
cmpl $0x3a, 0x20(%r14)
jne 0xc9f4
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x934a
testb %al, %al
je 0xca11
pushq $-0x2
popq %rbp
jmp 0xca21
leaq 0x12588(%rip), %rdi     # 0x1ef83
xorl %eax, %eax
callq 0xb178
leaq 0x1d8f4(%rip), %rax     # 0x2a2fd
movb $0x0, (%rax)
jmp 0xcaf8
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x934a
movzbl %al, %ebp
decl %ebp
cmpl $0x1, 0x28(%r14)
jne 0xca43
leaq 0x12565(%rip), %rdi     # 0x1ef94
leaq 0x214ea(%rip), %rsi     # 0x2df20
xorl %eax, %eax
callq 0xb178
pushq $0x64
popq %r15
jmp 0xcaa0
pushq $0x64
popq %rdi
xorl %eax, %eax
callq 0xc004
cmpl $0x50, %eax
jg 0xca61
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x934a
testb %al, %al
je 0xca8c
leaq 0x12545(%rip), %rdi     # 0x1efad
xorl %eax, %eax
callq 0xb178
leaq 0x212da(%rip), %rax     # 0x2dd50
movq (%rax), %rax
incq 0x20(%rax)
xorl %eax, %eax
callq 0xaa03
movl $0x12c, %r15d           # imm = 0x12C
jmp 0xcaa0
leaq 0x1253a(%rip), %rdi     # 0x1efcd
xorl %eax, %eax
callq 0xb178
movl $0xc8, %r15d
imull %ebp, %r15d
movl $0x190, %edi            # imm = 0x190
xorl %eax, %eax
callq 0xc004
addl %r15d, %eax
leaq 0x1d836(%rip), %rcx     # 0x2a2f0
movl (%rcx), %edx
addl %edx, %eax
addl $0x514, %eax            # imm = 0x514
movl $0x7d0, %edx            # imm = 0x7D0
cmpl %edx, %eax
cmovll %eax, %edx
movl %edx, (%rcx)
leaq 0x20daa(%rip), %rax     # 0x2d880
andl $0x0, (%rax)
xorl %eax, %eax
callq 0x9378
leaq 0x20d59(%rip), %rax     # 0x2d840
cmpq (%rax), %r14
jne 0xcaf0
andq $0x0, (%rax)
movq %rbx, %rdi
callq 0x1008d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/misc.c
// Function: is_current
bool is_current(struct object *obj)
{
	if (obj == NULL)
		return FALSE;
	if (obj == cur_armor || obj == cur_weapon || obj == cur_ring[LEFT]
	  || obj == cur_ring[RIGHT]) {
		msg("Already in use.");
		return TRUE;
	}
	return FALSE;
}

// Assembly:
testq %rdi, %rdi
je 0xcba4
leaq 0x20cc7(%rip), %rax     # 0x2d848
cmpq %rdi, (%rax)
je 0xcba7
leaq 0x20cb3(%rip), %rax     # 0x2d840
cmpq %rdi, (%rax)
je 0xcba7
leaq 0x211a7(%rip), %rax     # 0x2dd40
cmpq %rdi, (%rax)
je 0xcba7
cmpq %rdi, 0x8(%rax)
je 0xcba7
xorl %eax, %eax
retq
pushq %rax
leaq 0x12435(%rip), %rdi     # 0x1efe4
xorl %eax, %eax
callq 0xb178
movb $0x1, %al
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/misc.c
// Function: initfood
void initfood(struct object *what)
{
	what->o_type = FOOD;
	what->o_group = NORMFOOD;
	if (rnd(100) < 15)
		what->o_group = FRUITFOOD;
	what->o_which = what->o_group;
	what->o_count = 1 + extras();
	what->o_flags = ISKNOW;
	what->o_weight = things[TYP_FOOD].mi_wght;
	what->o_typname = things[TYP_FOOD].mi_name;
	what->o_hplus = what->o_dplus = 0;
	what->o_vol = itemvol(what);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x3a, 0x20(%rdi)
andl $0x0, 0x3c(%rdi)
pushq $0x64
popq %rdi
xorl %eax, %eax
callq 0xc004
cmpl $0xf, %eax
jge 0xcd12
movl $0x1, 0x3c(%rbx)
pushq $0x1
popq %rax
jmp 0xcd15
movl 0x3c(%rbx), %eax
movl %eax, 0x28(%rbx)
xorl %eax, %eax
callq 0x19f5a
incl %eax
movl %eax, 0x24(%rbx)
movl $0x2, 0x38(%rbx)
leaq 0x1f08e(%rip), %rax     # 0x2bdc0
movl 0x2c(%rax), %ecx
movl %ecx, 0x40(%rbx)
movq 0x20(%rax), %rax
movq %rax, 0x18(%rbx)
andq $0x0, 0x2c(%rbx)
movq %rbx, %rdi
callq 0x953d
movl %eax, 0x44(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/monsters.c
// Function: rnd_mon
int rnd_mon(bool wander,bool baddie)
/* baddie == TRUE when from a polymorph stick */
{
	int i, ok, cnt;

	cnt = 0;
	if (levcount == 0)			/* if only asmodeus possible */
		return(MAXMONS);
	if (baddie) {
		while (1) {
			i = rnd(MAXMONS);					/* pick ANY monster */
			if (monsters[i].m_lev.l_lev < 0)	/* skip genocided ones */
				continue;
			return i;
		}
	}
	ok = FALSE;
	do {
		/*
		 * get a random monster from this range
		 */
		i = rnd(levcount);
		/*
		 * Only create a wandering monster if we want one
		 * (or the count is exceeded)
		 */
		if (!wander || mtlev[i]->m_lev.d_wand || ++cnt > 500)
			ok = TRUE;
	} while(!ok);
	return (midx(mtlev[i]->m_show));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x20aed(%rip), %r14     # 0x2d850
cmpl $0x0, (%r14)
je 0xcd92
testb %sil, %sil
je 0xcda1
pushq $0x34
popq %rbx
leaq 0x1d638(%rip), %r14     # 0x2a3b0
movl %ebx, %edi
xorl %eax, %eax
callq 0xc004
movslq %eax, %rcx
imulq $0x70, %rcx, %rcx
cmpl $0x0, 0xc(%r14,%rcx)
js 0xcd78
jmp 0xcd95
pushq $0x34
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl %edi, %ebx
leaq 0x236c6(%rip), %r15     # 0x30470
xorl %r12d, %r12d
movl (%r14), %edi
xorl %eax, %eax
callq 0xc004
cltq
movq (%r15,%rax,8), %rax
testb %bl, %bl
je 0xcdd8
cmpb $0x0, 0x14(%rax)
jne 0xcdd8
leal 0x1(%r12), %ecx
cmpl $0x1f4, %r12d           # imm = 0x1F4
movl %ecx, %r12d
jb 0xcdad
movsbl 0x8(%rax), %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xcdec
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/monsters.c
// Function: lev_mon
void lev_mon()
{
	int i;
	struct monster *mm;

	levcount = 0;
	for (i = 0; i < MAXMONS; i++) {
		mm = &monsters[i];
		if (mm->m_lev.h_lev >= level && mm->m_lev.l_lev <= level) {
			mtlev[levcount] = mm;
			if (++levcount >= MONRANGE)
				break;
		}
	}
	if (levcount == 0)					/* if no monsters are possible */
		mtlev[0] = &monsters[MAXMONS];	/* then asmodeus 'A' */
}

// Assembly:
leaq 0x20a2f(%rip), %rcx     # 0x2d850
andl $0x0, (%rcx)
leaq 0x1d4b5(%rip), %rax     # 0x2a2e0
movl (%rax), %edx
xorl %esi, %esi
leaq 0x1d57a(%rip), %rdi     # 0x2a3b0
leaq 0x23633(%rip), %rax     # 0x30470
xorl %r8d, %r8d
cmpq $0x16c0, %rsi           # imm = 0x16C0
je 0xce73
cmpl %edx, 0x10(%rdi,%rsi)
jl 0xce6d
cmpl %edx, 0xc(%rdi,%rsi)
jg 0xce6d
leaq (%rdi,%rsi), %r9
movslq %r8d, %r10
movq %r9, (%rax,%r10,8)
leal 0x1(%r10), %r8d
movl %r8d, (%rcx)
cmpl $0x12, %r10d
jg 0xce78
addq $0x70, %rsi
jmp 0xce40
testl %r8d, %r8d
je 0xce79
retq
movl $0x16c0, %ecx           # imm = 0x16C0
addq 0x1d163(%rip), %rcx     # 0x29fe8
movq %rcx, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/monsters.c
// Function: wanderer
void wanderer()
{
	int ch;
	struct room *rp, *hr = player.t_room;
	struct linked_list *item;
	struct thing *tp;
	struct coord mp;

	do {
		rp = &rooms[rnd_room()];
		if (rp != hr || levtype == MAZELEV) {
			mp = *rnd_pos(rp);
			ch = mvinch(mp.y, mp.x);
		}
	} while (!step_ok(ch));
	item = new_monster(rnd_mon(TRUE,FALSE), &mp, FALSE);
	tp = THINGPTR(item);
	tp->t_flags |= ISRUN;
	tp->t_dest = &hero;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x20b7d(%rip), %rax     # 0x2dc50
movq 0x70(%rax), %r15
leaq 0x207c2(%rip), %r12     # 0x2d8a0
leaq 0x2076f(%rip), %r13     # 0x2d854
movq 0x1ce4c(%rip), %rbp     # 0x29f38
pushq $-0x1
popq %r14
xorl %eax, %eax
callq 0xef36
cltq
imulq $0x68, %rax, %rdi
addq %r12, %rdi
cmpq %r15, %rdi
jne 0xd10c
cmpl $0x2, (%r13)
jne 0xd13b
callq 0x1310e
movq (%rax), %rdx
movq %rdx, (%rsp)
movq (%rbp), %rdi
movq %rdx, %rsi
shrq $0x20, %rsi
callq 0x6470
movl %r14d, %ebx
cmpl $-0x1, %eax
je 0xd13b
movq (%rbp), %rdi
callq 0x6320
movl %eax, %ebx
movslq %ebx, %rdi
callq 0xb3d0
testb %al, %al
je 0xd0f0
pushq $0x1
popq %rdi
xorl %esi, %esi
callq 0xcd54
movsbl %al, %edi
movq %rsp, %rsi
xorl %edx, %edx
callq 0xce89
movq 0x10(%rax), %rax
orq $0x4, 0x78(%rax)
leaq 0x20ae2(%rip), %rcx     # 0x2dc50
addq $0x50, %rcx
movq %rcx, 0x60(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/monsters.c
// Function: genocide
int genocide()
{
	struct linked_list *ip, *nip;
	struct thing *mp;
	struct monster *mm;
	int i, ii, c;

	if (levcount == 0) {
		mpos = 0;
		msg("You cannot genocide Asmodeus !!");
		return 0;
	}
tryagain:
	i = TRUE;		/* assume an error now */
	while (i) {
		msg("Which monster (remember UPPER & lower case)?");
		c = readchar();		/* get a char */
		if (c == ESCAPE) {	/* he can abort (the fool) */
			msg("");
			return 0;
		}
		if (isalpha(c))		/* valid char here */
			i = FALSE;		/* exit the loop */
		else {				/* he didn't type a letter */
			mpos = 0;
			msg("Please specify a letter between 'A' and 'z'");
		}
	}
	i = midx(c);						/* get index to monster */
	mm = &monsters[i];
	if (mm->m_lev.l_lev < 0) {
		mpos = 0;
		msg("You have already eliminated the %s.",mm->m_name);
		goto tryagain;
	}
	for (ip = mlist; ip != NULL; ip = nip) {
		mp = THINGPTR(ip);
		nip = next(ip);
		if (mp->t_type == c)
			remove_monster(&mp->t_pos, ip);
	}
	mm->m_lev.l_lev = -1;				/* get rid of it */
	mm->m_lev.h_lev = -1;
	lev_mon();							/* redo monster list */
	mpos = 0;
	msg("You have wiped out the %s.",mm->m_name);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x204c0(%rip), %rax     # 0x2d850
cmpl $0x0, (%rax)
je 0xd436
xorl %ebx, %ebx
leaq 0x1d00e(%rip), %r13     # 0x2a3b0
leaq 0x204b7(%rip), %r12     # 0x2d860
leaq 0x11ca8(%rip), %r14     # 0x1f058
leaq 0x11cce(%rip), %r15     # 0x1f085
testb $0x1, %bl
je 0xd3ed
movsbl %bpl, %edi
callq 0xcdec
cltq
imulq $0x70, %rax, %rax
leaq (%rax,%r13), %rbx
cmpl $0x0, 0xc(%r13,%rax)
jns 0xd450
andl $0x0, (%r12)
movq (%rbx), %rsi
leaq 0x11ccb(%rip), %rdi     # 0x1f0b1
xorl %eax, %eax
callq 0xb178
movq %r14, %rdi
xorl %eax, %eax
callq 0xb178
xorl %eax, %eax
callq 0xb447
cmpb $0x1b, %al
je 0xd42d
movsbl %al, %ebp
callq 0x6590
movq (%rax), %rax
movslq %ebp, %rcx
movb 0x1(%rax,%rcx,2), %bl
andb $0x4, %bl
shrb $0x2, %bl
jne 0xd3b7
andl $0x0, (%r12)
movq %r15, %rdi
xorl %eax, %eax
callq 0xb178
jmp 0xd3b7
leaq 0x14555(%rip), %rdi     # 0x21989
jmp 0xd447
leaq 0x20423(%rip), %rax     # 0x2d860
andl $0x0, (%rax)
leaq 0x11bf1(%rip), %rdi     # 0x1f038
xorl %eax, %eax
callq 0xb178
jmp 0xd49f
leaq 0x203d9(%rip), %rax     # 0x2d830
movq (%rax), %r14
testq %r14, %r14
je 0xd47f
movq %r14, %rsi
movq (%r14), %r14
movq 0x10(%rsi), %rdi
movsbl 0x8d(%rdi), %eax
cmpl %eax, %ebp
jne 0xd45a
addq $0x50, %rdi
callq 0xa93f
jmp 0xd45a
orq $-0x1, 0xc(%rbx)
callq 0xce1a
andl $0x0, (%r12)
movq (%rbx), %rsi
leaq 0x11c3d(%rip), %rdi     # 0x1f0d5
xorl %eax, %eax
callq 0xb178
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/ajpaulson[P]srogue11/monsters.c
// Function: unhold
void unhold(char whichmon)
{
	switch (whichmon) {
		case 'F':
			fung_hit = 0;
			strcpy(monsters[midx('F')].m_stats.s_dmg, "000d0");
		case 'd':
			player.t_flags &= ~ISHELD;
	}
}

// Assembly:
pushq %rax
cmpl $0x64, %edi
je 0xd4e9
cmpl $0x46, %edi
jne 0xd4f4
leaq 0x203b6(%rip), %rax     # 0x2d878
andl $0x0, (%rax)
pushq $0x46
popq %rdi
callq 0xcdec
cltq
imulq $0x70, %rax, %rax
leaq 0x1ced6(%rip), %rcx     # 0x2a3b0
movl $0x64303030, 0x60(%rcx,%rax) # imm = 0x64303030
movw $0x30, 0x64(%rcx,%rax)
leaq 0x20760(%rip), %rax     # 0x2dc50
andb $-0x2, 0x79(%rax)
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/monsters.c
// Function: monhurt
bool monhurt(struct thing *th)
{
	int ewis, crithp, f1, f2;
	struct stats *st;

	st = &th->t_stats;
	ewis = st->s_ef.a_wis;
	if (ewis <= MONWIS)				/* stupid monsters dont know */
		return FALSE;
	f1 = st->s_maxhp / 4;			/* base hpt for being hurt */
	f2 = (ewis - MONWIS) * 5 / 3;	/* bonus for smart monsters */
	if (th->t_flags & ISWOUND)		/* if recovering from being */
		f1 *= 2;					/* wounded, then double the base */
	crithp = f1 + f2;				/* get critical hpt for hurt */
	if (crithp > st->s_maxhp)		/* only up to max hpt */
		crithp = st->s_maxhp;
	if (st->s_hpt < crithp)			/* if < critical, then still hurt */
		return TRUE;
	return FALSE;
}

// Assembly:
movl 0x18(%rdi), %ecx
cmpl $0xb, %ecx
jge 0xd501
xorl %eax, %eax
retq
movl 0x30(%rdi), %r9d
movl 0x34(%rdi), %esi
pushq $0x4
popq %r8
movl %esi, %eax
cltd
idivl %r8d
movl %eax, %r8d
leal (%rcx,%rcx,4), %eax
addl $-0x32, %eax
pushq $0x3
popq %rcx
xorl %edx, %edx
divl %ecx
movb 0x78(%rdi), %cl
shrb $0x7, %cl
shll %cl, %r8d
addl %eax, %r8d
cmpl %esi, %r8d
cmovgel %esi, %r8d
cmpl %r8d, %r9d
setl %al
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/move.c
// Function: show
char show(int y,int x)
{
	unsigned long ch = winat(y, x);
	struct linked_list *it;
	struct thing *tp;
	struct trap *ta;

	if (isatrap(ch)) {
		if ((ta = trap_at(y, x)) == NULL)
			return FLOOR;
		if (iswearing(R_FTRAPS))
			ta->tr_flags |= ISFOUND;
		return ((ta->tr_flags & ISFOUND) ? ta->tr_type : FLOOR);
	}
	if (ch == SECRETDOOR && iswearing(R_FTRAPS)) {
		mvaddch(y,x,DOOR);
		return DOOR;
	}
	if ((it = find_mons(y, x)) != NULL) {	/* maybe a monster */
		tp = THINGPTR(it);
		if (ch == 'M' || (tp->t_flags & ISINVIS)) {
			if (ch == 'M')
				ch = tp->t_disguise;
			else if (pl_off(CANSEE)) {
				if (ch == 's')
					ch = ' ';		/* shadows show as a blank */
				else
					ch = mvinch(y, x);	/* hide invisibles */
			}
		}
	}
	return ch;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movl %edi, %r14d
callq 0x92ab
movl %eax, %ebx
movsbl %al, %edi
callq 0xdbbb
testb %al, %al
je 0xdb08
movl %r14d, %edi
movl %ebp, %esi
callq 0xea05
movb $0x2e, %bl
testq %rax, %rax
je 0xdb6a
movq %rax, %r14
pushq $0xe
popq %rdi
callq 0x11fa5
movl 0x10(%r14), %ecx
testb %al, %al
je 0xdb61
orl $0x8, %ecx
movl %ecx, 0x10(%r14)
jmp 0xdb66
cmpb $0x26, %bl
jne 0xdb41
pushq $0xe
popq %rdi
callq 0x11fa5
testb %al, %al
je 0xdb41
movq 0x1c418(%rip), %r15     # 0x29f38
movq (%r15), %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x6470
movb $0x2b, %bl
cmpl $-0x1, %eax
je 0xdb6a
movq (%r15), %rdi
pushq $0x2b
popq %rsi
callq 0x64a0
jmp 0xdb6a
movl %r14d, %edi
movl %ebp, %esi
callq 0x745e
testq %rax, %rax
je 0xdb6a
movq 0x10(%rax), %rax
cmpb $0x4d, %bl
jne 0xdb77
movb 0x8e(%rax), %bl
jmp 0xdb6a
testb $0x8, %cl
je 0xdb6a
movb 0x14(%r14), %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testb $0x10, 0x78(%rax)
je 0xdb6a
movl $0x1000, %edi           # imm = 0x1000
callq 0x933b
testb %al, %al
je 0xdb6a
cmpb $0x73, %bl
movb $0x20, %bl
je 0xdb6a
movq 0x1c39f(%rip), %rbx     # 0x29f38
movq (%rbx), %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x6470
cmpl $-0x1, %eax
je 0xdbb7
movq (%rbx), %rdi
callq 0x6320
movl %eax, %ebx
jmp 0xdb6a
movb $-0x1, %bl
jmp 0xdb6a
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/new_leve.c
// Function: rnd_room
int rnd_room()
{
	int rm;

	if (levtype != NORMLEV)
		rm = 0;
	else
	{
		do {
			rm = rnd(MAXROOMS);
		} while (rf_on(&rooms[rm],ISGONE));
	}
	return rm;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x1e910(%rip), %rax     # 0x2d854
xorl %ebx, %ebx
cmpl $0x0, (%rax)
jne 0xef79
pushq $0x9
popq %rbp
leaq 0x1e94b(%rip), %r15     # 0x2d8a0
pushq $0x2
popq %r14
movl %ebp, %edi
xorl %eax, %eax
callq 0xc004
movl %eax, %ebx
cltq
imulq $0x68, %rax, %rdi
addq %r15, %rdi
movq %r14, %rsi
callq 0x12f50
testl %eax, %eax
jne 0xef59
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/options.c
// Function: option
void option()
{
	OPTION	*op;
	int	wh;

	wclear(hw);
	touchwin(hw);
	/*
	 * Display current values of options
	 */
	for (op = optlist; op < &optlist[NUM_OPTS]; op++) {
		wh = op - optlist;
		mvwaddstr(hw, wh, 0, op->o_prompt);
		mvwaddstr(hw, wh, 16, op->o_opt);
	}
	/*
	 * Set values
	 */
	wmove(hw, 0, 0);
	for (op = optlist; op < &optlist[NUM_OPTS]; op++) {
		wmove(hw, op - optlist, 16);
		if ((wh = get_str(op->o_opt, hw))) {
			if (wh == QUIT)
				break;
			else if (op > optlist) {
				wmove(hw, op - optlist, 0);
				op -= 2;
			}
			else {
				putchar(7);
				wmove(hw, 0, 0);
				op -= 1;
			}
		}
	}
	/*
	 * Switch back to original screen
	 */
	dbotline(hw,spacemsg);
	restscr(cw);
	after = FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x217ae(%rip), %r12     # 0x309d8
movq (%r12), %rdi
callq 0x6120
movq (%r12), %rdi
testq %rdi, %rdi
je 0xf244
movswl 0x4(%rdi), %edx
incl %edx
jmp 0xf247
pushq $-0x1
popq %rdx
xorl %ebx, %ebx
pushq $0x1
popq %rcx
xorl %esi, %esi
callq 0x61b0
pushq $0x10
popq %rbp
leaq 0x1e143(%rip), %r13     # 0x2d3a0
pushq $-0x1
popq %r14
xorl %r15d, %r15d
cmpq $0x47, %r15
ja 0xf2b8
movq (%r12), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x6470
cmpl $-0x1, %eax
je 0xf28d
movq (%r12), %rdi
movq 0x8(%r15,%r13), %rsi
movl %r14d, %edx
callq 0x6530
movq (%r12), %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x6470
cmpl $-0x1, %eax
je 0xf2b0
movq (%r12), %rdi
movq 0x10(%r15,%r13), %rsi
movl %r14d, %edx
callq 0x6530
addq $0x18, %r15
incl %ebx
jmp 0xf264
movq (%r12), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
xorl %edx, %edx
callq 0x6470
pushq $0x18
popq %r14
pushq $0x10
popq %rbp
cmpq $0x47, %rbx
jg 0xf346
movq (%r12), %rdi
movq %rbx, %rax
cqto
idivq %r14
movq %rax, %r15
movl %r15d, %esi
movl %ebp, %edx
callq 0x6470
movq 0x10(%rbx,%r13), %rdi
movq (%r12), %rsi
callq 0xf37e
testl %eax, %eax
je 0xf340
cmpl $0x1, %eax
je 0xf346
movl %ebp, %r13d
movq %r14, %rbp
pushq $-0x30
popq %r14
testq %rbx, %rbx
jg 0xf322
pushq $0x7
popq %rdi
callq 0x6060
xorl %r15d, %r15d
pushq $-0x18
popq %r14
movq (%r12), %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x6470
addq %r14, %rbx
movq %rbp, %r14
movl %r13d, %ebp
leaq 0x1e060(%rip), %r13     # 0x2d3a0
addq $0x18, %rbx
jmp 0xf2ce
movq (%r12), %rdi
leaq 0x1afaf(%rip), %rsi     # 0x2a300
callq 0xb76d
leaq 0x21673(%rip), %rax     # 0x309d0
movq (%rax), %rdi
callq 0xb7b6
leaq 0x1af91(%rip), %rax     # 0x2a2fd
movb $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/options.c
// Function: strucpy
void strucpy(char *s1,char *s2,int len)
{
	char *sp;

	while (len-- > 0) {
		strcpy(s1, (sp = unctrl(*s2)));
		s1 += strlen(sp);
		s2++;
	}
	*s1 = '\0';
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
testl %ebx, %ebx
jle 0xf65c
decl %ebx
movsbl (%r15), %edi
callq 0x6400
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
callq 0x60e0
movq %r12, %rdi
callq 0x6170
addq %rax, %r14
incq %r15
jmp 0xf62f
movb $0x0, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/options.c
// Function: parse_opts
void parse_opts(char *str)
{
	char *sp;
	OPTION *op;
	int len;

	while (*str) {
		for (sp = str; isalpha(*sp); sp++)	/* get option name */
			continue;
		len = sp - str;
		for (op = optlist; op < &optlist[NUM_OPTS]; op++) {
			if (EQSTR(str, op->o_name, len)) {
				char *start;
	
				for (str = sp + 1; *str == '='; str++)
					continue;
				if (*str == '~') {
					strcpy(op->o_opt, home);
					start = op->o_opt + strlen(home);
					while (*++str == '/')
						continue;
				}
				else
					start = (char *) op->o_opt;
				for (sp = str + 1; *sp && *sp != ','; sp++)
					continue;
				strucpy(start, str, sp - str);
			}
		}
		/*
		 * skip to start of next option name
		 */
		while (*sp && !isalpha(*sp))
			sp++;
		str = sp;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r13
cmpb $0x0, (%rdi)
sete %al
movabsq $0x100000000, %r14      # imm = 0x100000000
leaq 0x1dd0f(%rip), %rbx     # 0x2d3a0
testb $0x1, %al
jne 0xf79d
callq 0x6590
movq %rax, (%rsp)
movq (%rax), %rax
leaq -0x1(%r13), %r12
movabsq $-0x100000000, %r15     # imm = 0xFFFFFFFF00000000
addq %r14, %r15
movsbq 0x1(%r12), %rcx
incq %r12
testb $0x4, 0x1(%rax,%rcx,2)
jne 0xf6b3
sarq $0x20, %r15
xorl %r14d, %r14d
cmpq $0x48, %r14
jae 0xf768
movq (%r14,%rbx), %rsi
movq %r13, %rdi
movq %r15, %rdx
callq 0x60c0
testl %eax, %eax
jne 0xf75f
movzbl 0x1(%r12), %eax
incq %r12
cmpl $0x3d, %eax
je 0xf6ea
cmpl $0x7e, %eax
jne 0xf730
movq 0x10(%r14,%rbx), %rdi
leaq 0x1e957(%rip), %rbp     # 0x2e060
movq %rbp, %rsi
callq 0x60e0
movq 0x10(%r14,%rbx), %r13
movq %rbp, %rdi
callq 0x6170
cmpb $0x2f, 0x1(%r12)
leaq 0x1(%r12), %r12
je 0xf71e
addq %rax, %r13
jmp 0xf735
movq 0x10(%r14,%rbx), %r13
xorl %ebp, %ebp
movzbl 0x1(%r12,%rbp), %eax
incq %rbp
cmpl $0x2c, %eax
je 0xf749
testl %eax, %eax
jne 0xf737
movq %r13, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0xf61f
addq %r12, %rbp
movq %r12, %r13
movq %rbp, %r12
addq $0x18, %r14
jmp 0xf6cd
movq %r12, %r13
movabsq $0x100000000, %r14      # imm = 0x100000000
movq (%rsp), %rsi
movsbq (%r13), %rcx
testq %rcx, %rcx
sete %al
je 0xf691
movq (%rsi), %rdx
testb $0x4, 0x1(%rdx,%rcx,2)
jne 0xf691
incq %r13
jmp 0xf779
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ajpaulson[P]srogue11/pack.c
// Function: pack_char
char pack_char(struct object *obj)
{
	struct linked_list *item;
	char c;

	c = 'a';
	for (item = pack; item != NULL; item = next(item))
		if (OBJPTR(item) == obj)
			return c;
		else
			c = npch(c);
	return '%';
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1e1d6(%rip), %r14     # 0x2dc50
addq $0x68, %r14
movb $0x61, %al
movq (%r14), %r14
testq %r14, %r14
je 0xfa98
cmpq %rbx, 0x10(%r14)
je 0xfa9a
movsbl %al, %edi
callq 0xb7e0
jmp 0xfa80
movb $0x25, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq