LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %edi
callq 0x6350
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xe561
leaq 0x28db9(%rip), %rdi     # 0x37300
leaq 0x1c9fb(%rip), %rsi     # 0x2af49
movb $0x0, %al
callq 0x64f0
leaq 0x28da4(%rip), %rdi     # 0x37300
callq 0xee80
leaq 0x28780(%rip), %rax     # 0x36ce8
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x28774(%rip), %rax     # 0x36ce8
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0x2412d(%rip), %rax     # 0x32fc0
movq (%rax), %rdi
callq 0x6110
movq 0x2411e(%rip), %rax     # 0x32fc0
movq (%rax), %rdi
callq 0x61f0
callq 0x6530
movq 0x24142(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x1d540(%rip), %rsi     # 0x2c404
movb $0x0, %al
callq 0x6290
movq 0x24126(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
callq 0x6360
movl $0x2, %edi
callq 0xeef0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0xef3a
movl $0x0, -0x8(%rbp)
jmp 0xef58
callq 0x6390
movslq -0x4(%rbp), %rcx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x4(%rbp)
cmpl $0x0, %eax
jle 0xefa8
movl -0x8(%rbp), %edi
callq 0xef20
addl $0x1, %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0xef85
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
movl $0x1, %edi
leaq 0xaf80(%rip), %rsi      # 0x19f50
callq 0x6280
movl $0x2, %edi
leaq 0xaf6f(%rip), %rsi      # 0x19f50
callq 0x6280
movl $0x3, %edi
leaq -0x102(%rip), %rsi      # 0xeef0
callq 0x6280
movl $0x4, %edi
leaq 0xaf7d(%rip), %rsi      # 0x19f80
callq 0x6280
movl $0x5, %edi
leaq 0xaf6c(%rip), %rsi      # 0x19f80
callq 0x6280
movl $0x6, %edi
leaq 0xaf5b(%rip), %rsi      # 0x19f80
callq 0x6280
movl $0x8, %edi
leaq 0xaf4a(%rip), %rsi      # 0x19f80
callq 0x6280
movl $0x7, %edi
leaq 0xaf39(%rip), %rsi      # 0x19f80
callq 0x6280
movl $0xb, %edi
leaq 0xaf28(%rip), %rsi      # 0x19f80
callq 0x6280
movl $0x1f, %edi
leaq 0xaf17(%rip), %rsi      # 0x19f80
callq 0x6280
movl $0xd, %edi
leaq 0xaf06(%rip), %rsi      # 0x19f80
callq 0x6280
movl $0xf, %edi
leaq 0xaef5(%rip), %rsi      # 0x19f80
callq 0x6280
callq 0x6330
callq 0x6170
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %edi, %edi
leaq 0x2ce1f(%rip), %rsi     # 0x3bed0
callq 0x6430
leaq 0x1befb(%rip), %rdi     # 0x2afb8
callq 0x6030
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0xf0d5
movq -0x8(%rbp), %rdi
callq 0x14070
leaq 0x27ff4(%rip), %rax     # 0x370d0
movq 0x50(%rax), %rcx
movq %rcx, 0x58(%rax)
leaq 0x27fe5(%rip), %rdi     # 0x370d0
addq $0x50, %rdi
callq 0x7560
movq %rax, %rcx
leaq 0x27fca(%rip), %rax     # 0x370c8
movq %rcx, (%rax)
leaq 0x27c0b(%rip), %rax     # 0x36d13
movb $0x0, (%rax)
leaq 0x241fa(%rip), %rax     # 0x3330c
testb $0x1, (%rax)
je 0xf120
movb $0x0, %al
callq 0x7d00
jmp 0xf10b
xorl %edi, %edi
callq 0xee60
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/main.c
// Function: author
bool author()
{
	switch (playuid) {
		case 100:
		case 0:
			return TRUE;
		default:
			return FALSE;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x28195(%rip), %rax     # 0x372d0
movl (%rax), %eax
movl %eax, -0x8(%rbp)
testl %eax, %eax
je 0xf150
jmp 0xf146
movl -0x8(%rbp), %eax
subl $0x64, %eax
jne 0xf156
jmp 0xf150
movb $0x1, -0x1(%rbp)
jmp 0xf15a
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x1bf1d(%rip), %rdi     # 0x2b0fc
callq 0x6030
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xf2b0
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0xf2ae
movq -0x18(%rbp), %rsi
leaq 0x2cd06(%rip), %rdi     # 0x3bf10
movl $0xfec, %edx            # imm = 0xFEC
callq 0x60a0
leaq 0x2ccf5(%rip), %rdi     # 0x3bf10
callq 0x6160
movq %rax, %rcx
subq $0x1, %rcx
leaq 0x2cce2(%rip), %rax     # 0x3bf10
addq %rcx, %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
leaq 0x2ccd2(%rip), %rcx     # 0x3bf10
cmpq %rcx, -0x10(%rbp)
movb %al, -0x19(%rbp)
jb 0xf26e
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x2f, %ecx
movb %al, -0x1a(%rbp)
je 0xf268
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
sete %al
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0xf277
jmp 0xf28b
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x0, (%rax)
jmp 0xf235
leaq 0x2cc7e(%rip), %rdi     # 0x3bf10
callq 0xf170
cmpl $0x0, %eax
je 0xf2ac
leaq 0x2cc6d(%rip), %rax     # 0x3bf10
movq %rax, -0x8(%rbp)
jmp 0xf351
jmp 0xf2ae
jmp 0xf2b0
leaq 0x1be4f(%rip), %rdi     # 0x2b106
callq 0xf170
cmpl $0x0, %eax
je 0xf2d1
leaq 0x1be3e(%rip), %rax     # 0x2b106
movq %rax, -0x8(%rbp)
jmp 0xf351
leaq 0x1be43(%rip), %rdi     # 0x2b11b
callq 0xf170
cmpl $0x0, %eax
je 0xf2ef
leaq 0x1be32(%rip), %rax     # 0x2b11b
movq %rax, -0x8(%rbp)
jmp 0xf351
leaq 0x1be38(%rip), %rdi     # 0x2b12e
callq 0xf170
cmpl $0x0, %eax
je 0xf30d
leaq 0x1be27(%rip), %rax     # 0x2b12e
movq %rax, -0x8(%rbp)
jmp 0xf351
leaq 0x1be29(%rip), %rdi     # 0x2b13d
callq 0xf170
cmpl $0x0, %eax
je 0xf32b
leaq 0x1be18(%rip), %rax     # 0x2b13d
movq %rax, -0x8(%rbp)
jmp 0xf351
leaq 0x1be1a(%rip), %rdi     # 0x2b14c
callq 0xf170
cmpl $0x0, %eax
je 0xf349
leaq 0x1be09(%rip), %rax     # 0x2b14c
movq %rax, -0x8(%rbp)
jmp 0xf351
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2799c(%rip), %rax     # 0x36d0b
testb $0x1, (%rax)
je 0xf37d
movl $0x0, -0x4(%rbp)
jmp 0xf39f
movl $0x1, %edi
callq 0x9bb0
movl $0x2, %edi
callq 0x9bb0
movb $0x0, %al
callq 0x9d40
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/misc.c
// Function: getindex
int getindex(char what)
{
	int index = -1;

	switch (what) {
		case POTION:	index = TYP_POTION;
		when SCROLL:	index = TYP_SCROLL;
		when FOOD:		index = TYP_FOOD;
		when RING:		index = TYP_RING;
		when AMULET:	index = TYP_AMULET;
		when ARMOR:		index = TYP_ARMOR;
		when WEAPON:	index = TYP_WEAPON;
		when STICK:		index = TYP_STICK;
	}
	return index;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
movl $0xffffffff, -0x8(%rbp) # imm = 0xFFFFFFFF
movsbl -0x1(%rbp), %eax
addl $-0x21, %eax
movl %eax, %ecx
movq %rcx, -0x10(%rbp)
subl $0x3c, %eax
ja 0xf42d
movq -0x10(%rbp), %rax
leaq 0x1bd7e(%rip), %rcx     # 0x2b15c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x8(%rbp)
jmp 0xf42d
movl $0x1, -0x8(%rbp)
jmp 0xf42d
movl $0x2, -0x8(%rbp)
jmp 0xf42d
movl $0x5, -0x8(%rbp)
jmp 0xf42d
movl $0x7, -0x8(%rbp)
jmp 0xf42d
movl $0x4, -0x8(%rbp)
jmp 0xf42d
movl $0x3, -0x8(%rbp)
jmp 0xf42d
movl $0x6, -0x8(%rbp)
movl -0x8(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
movsbl -0x1(%rbp), %eax
movl %eax, -0x14(%rbp)
subl $0x22, %eax
je 0xf502
jmp 0xf45c
movl -0x14(%rbp), %eax
subl $0x24, %eax
je 0xf4ce
jmp 0xf466
movl -0x14(%rbp), %eax
subl $0x3e, %eax
je 0xf4b4
jmp 0xf470
movl -0x14(%rbp), %eax
subl $0x5c, %eax
je 0xf51c
jmp 0xf47e
movl -0x14(%rbp), %eax
subl $0x5e, %eax
je 0xf50f
jmp 0xf48c
movl -0x14(%rbp), %eax
subl $0x60, %eax
je 0xf4f5
jmp 0xf496
movl -0x14(%rbp), %eax
subl $0x7b, %eax
je 0xf4db
jmp 0xf4a0
movl -0x14(%rbp), %eax
subl $0x7d, %eax
je 0xf4c1
jmp 0xf4aa
movl -0x14(%rbp), %eax
subl $0x7e, %eax
je 0xf4e8
jmp 0xf529
leaq 0x1bf71(%rip), %rax     # 0x2b42c
movq %rax, -0x10(%rbp)
jmp 0xf534
leaq 0x1bf70(%rip), %rax     # 0x2b438
movq %rax, -0x10(%rbp)
jmp 0xf534
leaq 0x1bf6f(%rip), %rax     # 0x2b444
movq %rax, -0x10(%rbp)
jmp 0xf534
leaq 0x1bf77(%rip), %rax     # 0x2b459
movq %rax, -0x10(%rbp)
jmp 0xf534
leaq 0x1bf79(%rip), %rax     # 0x2b468
movq %rax, -0x10(%rbp)
jmp 0xf534
leaq 0x1bf7d(%rip), %rax     # 0x2b479
movq %rax, -0x10(%rbp)
jmp 0xf534
leaq 0x1bf7d(%rip), %rax     # 0x2b486
movq %rax, -0x10(%rbp)
jmp 0xf534
leaq 0x1bf7e(%rip), %rax     # 0x2b494
movq %rax, -0x10(%rbp)
jmp 0xf534
leaq 0x1bf81(%rip), %rax     # 0x2b4a4
movq %rax, -0x10(%rbp)
jmp 0xf534
leaq 0x1bf81(%rip), %rax     # 0x2b4b1
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/misc.c
// Function: find_obj
struct linked_list *find_obj(int y,int x)
{
	struct linked_list *obj;
	struct object *op;

	for (obj = lvl_obj; obj != NULL; obj = next(obj)) {
		op = OBJPTR(obj);
		if (op->o_pos.y == y && op->o_pos.x == x)
			return obj;
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
leaq 0x26ff7(%rip), %rax     # 0x36cb8
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xfd0b
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0xfcfc
movq -0x20(%rbp), %rax
movl (%rax), %eax
cmpl -0x10(%rbp), %eax
jne 0xfcfc
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xfd13
jmp 0xfcfe
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xfcc8
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/misc.c
// Function: vowelstr
char *vowelstr(char *str)
{
	switch (tolower(*str)) {
		case 'a':
		case 'e':
		case 'i':
		case 'o':
		case 'u':
			return "n";
		default:
			return "";
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x6320
movl %eax, %ecx
movl %ecx, -0x14(%rbp)
subl $0x61, %eax
je 0xff9c
jmp 0xff74
movl -0x14(%rbp), %eax
subl $0x65, %eax
je 0xff9c
jmp 0xff7e
movl -0x14(%rbp), %eax
subl $0x69, %eax
je 0xff9c
jmp 0xff88
movl -0x14(%rbp), %eax
subl $0x6f, %eax
je 0xff9c
jmp 0xff92
movl -0x14(%rbp), %eax
subl $0x75, %eax
jne 0xffa9
jmp 0xff9c
leaq 0x1aa17(%rip), %rax     # 0x2a9ba
movq %rax, -0x8(%rbp)
jmp 0xffb4
leaq 0x1e2ff(%rip), %rax     # 0x2e2af
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xffd9
movb $0x0, -0x1(%rbp)
jmp 0x10032
movq -0x10(%rbp), %rax
leaq 0x26ce4(%rip), %rcx     # 0x36cc8
cmpq (%rcx), %rax
je 0x1001a
movq -0x10(%rbp), %rax
leaq 0x26ccc(%rip), %rcx     # 0x36cc0
cmpq (%rcx), %rax
je 0x1001a
movq -0x10(%rbp), %rax
leaq 0x271bc(%rip), %rcx     # 0x371c0
cmpq (%rcx), %rax
je 0x1001a
movq -0x10(%rbp), %rax
leaq 0x271ac(%rip), %rcx     # 0x371c0
cmpq 0x8(%rcx), %rax
jne 0x1002e
leaq 0x1b507(%rip), %rdi     # 0x2b528
movb $0x0, %al
callq 0xd8f0
movb $0x1, -0x1(%rbp)
jmp 0x10032
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x3a, 0x20(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x3c(%rax)
movl $0x64, %edi
movb $0x0, %al
callq 0xef20
cmpl $0xf, %eax
jge 0x1028e
movq -0x8(%rbp), %rax
movl $0x1, 0x3c(%rax)
movq -0x8(%rbp), %rax
movl 0x3c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x28(%rax)
movb $0x0, %al
callq 0x24520
movl %eax, %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x8(%rbp), %rax
movl $0x2, 0x38(%rax)
leaq 0x24b0f(%rip), %rax     # 0x34dd0
movl 0x2c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x40(%rax)
leaq 0x24afe(%rip), %rax     # 0x34dd0
movq 0x20(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x8(%rbp), %rdi
callq 0xae90
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x44(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movb %dil, %cl
andb $0x1, %cl
movb %cl, -0x5(%rbp)
andb $0x1, %al
movb %al, -0x6(%rbp)
movl $0x0, -0x14(%rbp)
leaq 0x26999(%rip), %rax     # 0x36cd0
cmpl $0x0, (%rax)
jne 0x10348
movl $0x34, -0x4(%rbp)
jmp 0x103f7
testb $0x1, -0x6(%rbp)
je 0x10381
jmp 0x10350
movl $0x34, %edi
movb $0x0, %al
callq 0xef20
movl %eax, -0xc(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x23056(%rip), %rax     # 0x333c0
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0xc(%rax)
jge 0x10379
jmp 0x10350
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x103f7
movl $0x0, -0x10(%rbp)
leaq 0x26941(%rip), %rax     # 0x36cd0
movl (%rax), %edi
movb $0x0, %al
callq 0xef20
movl %eax, -0xc(%rbp)
testb $0x1, -0x5(%rbp)
je 0x103c6
movslq -0xc(%rbp), %rcx
leaq 0x29544(%rip), %rax     # 0x398f0
movq (%rax,%rcx,8), %rax
testb $0x1, 0x14(%rax)
jne 0x103c6
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x1f4, %eax            # imm = 0x1F4
jle 0x103cd
movl $0x1, -0x10(%rbp)
jmp 0x103cf
cmpl $0x0, -0x10(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x10388
movslq -0xc(%rbp), %rcx
leaq 0x29509(%rip), %rax     # 0x398f0
movq (%rax,%rcx,8), %rax
movsbl 0x8(%rax), %edi
callq 0x10400
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/monsters.c
// Function: midx
int midx(char whichmon)
{
	if (isupper(whichmon))
		return(whichmon - 'A');			/* 0 to 25 for uppercase */
	else if (islower(whichmon))
		return(whichmon - 'a' + 26);	/* 26 to 51 for lowercase */
	else
		return(MAXMONS);				/* 52 for Asmodeus */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x5(%rbp)
callq 0x65b0
movq (%rax), %rax
movsbl -0x5(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x10437
movsbl -0x5(%rbp), %eax
subl $0x41, %eax
movl %eax, -0x4(%rbp)
jmp 0x1046a
callq 0x65b0
movq (%rax), %rax
movsbl -0x5(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x10463
movsbl -0x5(%rbp), %eax
subl $0x61, %eax
addl $0x1a, %eax
movl %eax, -0x4(%rbp)
jmp 0x1046a
movl $0x34, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
leaq 0x26845(%rip), %rax     # 0x36cd0
movl $0x0, (%rax)
movl $0x0, -0x4(%rbp)
cmpl $0x34, -0x4(%rbp)
jge 0x10523
movslq -0x4(%rbp), %rcx
leaq 0x22f13(%rip), %rax     # 0x333c0
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
leaq 0x22e2a(%rip), %rcx     # 0x332f0
cmpl (%rcx), %eax
jl 0x10513
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
leaq 0x22e18(%rip), %rcx     # 0x332f0
cmpl (%rcx), %eax
jg 0x10513
movq -0x10(%rbp), %rdx
leaq 0x267e9(%rip), %rax     # 0x36cd0
movslq (%rax), %rcx
leaq 0x293ff(%rip), %rax     # 0x398f0
movq %rdx, (%rax,%rcx,8)
leaq 0x267d4(%rip), %rax     # 0x36cd0
movl (%rax), %eax
addl $0x1, %eax
leaq 0x267c8(%rip), %rcx     # 0x36cd0
movl %eax, (%rcx)
cmpl $0x14, %eax
jl 0x10511
jmp 0x10523
jmp 0x10513
jmp 0x10515
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x10498
leaq 0x267a6(%rip), %rax     # 0x36cd0
cmpl $0x0, (%rax)
jne 0x10547
leaq 0x293ba(%rip), %rax     # 0x398f0
leaq 0x22e83(%rip), %rcx     # 0x333c0
addq $0x16c0, %rcx           # imm = 0x16C0
movq %rcx, (%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x267c1(%rip), %rax     # 0x370d0
movq 0x70(%rax), %rax
movq %rax, -0x18(%rbp)
movb $0x0, %al
callq 0x135d0
movslq %eax, %rcx
leaq 0x263f8(%rip), %rax     # 0x36d20
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x10949
leaq 0x26390(%rip), %rax     # 0x36cd4
cmpl $0x2, (%rax)
jne 0x10995
movq -0x10(%rbp), %rdi
callq 0x19c00
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq 0x22660(%rip), %rax     # 0x32fc0
movq (%rax), %rdi
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %edx
callq 0x6490
cmpl $-0x1, %eax
jne 0x1097d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x34(%rbp)
jmp 0x1098f
movq 0x2263c(%rip), %rax     # 0x32fc0
movq (%rax), %rdi
callq 0x6340
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x10997
movslq -0x4(%rbp), %rdi
callq 0xdc30
xorb $-0x1, %al
testb $0x1, %al
jne 0x10917
movl $0x1, %edi
xorl %esi, %esi
callq 0x10310
leaq -0x30(%rbp), %rsi
xorl %edx, %edx
movsbl %al, %edi
callq 0x10550
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rcx
orq $0x4, %rcx
movq %rcx, 0x78(%rax)
movq -0x28(%rbp), %rax
leaq 0x266e1(%rip), %rcx     # 0x370d0
addq $0x50, %rcx
movq %rcx, 0x60(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movsbl -0x1(%rbp), %eax
movl %eax, -0x8(%rbp)
subl $0x46, %eax
je 0x10f26
jmp 0x10f1c
movl -0x8(%rbp), %eax
subl $0x64, %eax
je 0x10f61
jmp 0x10f7e
leaq 0x25dcb(%rip), %rax     # 0x36cf8
movl $0x0, (%rax)
movl $0x46, %edi
callq 0x10400
cltq
leaq 0x2247a(%rip), %rdi     # 0x333c0
imulq $0x70, %rax, %rax
addq %rax, %rdi
addq $0x20, %rdi
addq $0x40, %rdi
leaq 0x1a6fc(%rip), %rsi     # 0x2b658
callq 0x60d0
leaq 0x26168(%rip), %rax     # 0x370d0
movq 0x78(%rax), %rcx
andq $-0x101, %rcx           # imm = 0xFEFF
leaq 0x26156(%rip), %rax     # 0x370d0
movq %rcx, 0x78(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $0xa, -0x14(%rbp)
jg 0x10fb6
movb $0x0, -0x1(%rbp)
jmp 0x1102d
movq -0x28(%rbp), %rax
movl 0x34(%rax), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, -0x1c(%rbp)
movl -0x14(%rbp), %eax
subl $0xa, %eax
imull $0x5, %eax, %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
andq $0x80, %rax
cmpq $0x0, %rax
je 0x10ff8
movl -0x1c(%rbp), %eax
shll %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x34(%rcx), %eax
jle 0x11017
movq -0x28(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movl 0x30(%rax), %eax
cmpl -0x18(%rbp), %eax
jge 0x11029
movb $0x1, -0x1(%rbp)
jmp 0x1102d
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/move.c
// Function: isatrap
bool isatrap(char ch)
{
	switch(ch) {
		case POST:
		case DARTTRAP:
		case POOL:
		case TELTRAP:
		case TRAPDOOR:
		case ARROWTRAP:
		case SLEEPTRAP:
		case BEARTRAP:
		case MAZETRAP:
			return TRUE;
		default:
			return FALSE;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x2(%rbp)
movsbl -0x2(%rbp), %eax
movl %eax, -0x8(%rbp)
subl $0x22, %eax
je 0x11ae1
jmp 0x11a98
movl -0x8(%rbp), %eax
subl $0x24, %eax
je 0x11ae1
jmp 0x11aa2
movl -0x8(%rbp), %eax
subl $0x3e, %eax
je 0x11ae1
jmp 0x11aac
movl -0x8(%rbp), %eax
subl $0x5c, %eax
je 0x11ae1
jmp 0x11ab6
movl -0x8(%rbp), %eax
subl $0x5e, %eax
je 0x11ae1
jmp 0x11ac0
movl -0x8(%rbp), %eax
subl $0x60, %eax
je 0x11ae1
jmp 0x11aca
movl -0x8(%rbp), %eax
subl $0x7b, %eax
je 0x11ae1
jmp 0x11ad4
movl -0x8(%rbp), %eax
addl $-0x7d, %eax
subl $0x1, %eax
ja 0x11ae7
jmp 0x11ae1
movb $0x1, -0x1(%rbp)
jmp 0x11aeb
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x236f5(%rip), %rax     # 0x36cd4
cmpl $0x0, (%rax)
je 0x135ed
movl $0x0, -0x4(%rbp)
jmp 0x13621
jmp 0x135ef
movl $0x9, %edi
movb $0x0, %al
callq 0xef20
movl %eax, -0x4(%rbp)
movslq -0x4(%rbp), %rax
leaq 0x23717(%rip), %rdi     # 0x36d20
imulq $0x68, %rax, %rax
addq %rax, %rdi
movl $0x2, %esi
callq 0x19950
cmpl $0x0, %eax
jne 0x135ef
jmp 0x13621
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x14(%rbp)
cmpl $0x0, %eax
jle 0x14056
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x6420
movq -0x28(%rbp), %rdi
movq %rax, %rsi
movq %rsi, -0x20(%rbp)
callq 0x60d0
movq -0x20(%rbp), %rdi
callq 0x6160
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x14003
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movb $0x61, -0x19(%rbp)
leaq 0x22929(%rip), %rax     # 0x370d0
movq 0x68(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x147e7
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x147cc
movb -0x19(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x147eb
movsbl -0x19(%rbp), %edi
callq 0xe330
movb %al, -0x19(%rbp)
jmp 0x147da
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x147af
movb $0x25, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/pack.c
// Function: inventory
bool inventory(struct linked_list *list,int type)
{
	struct linked_list *pc;
	struct object *obj;
	char ch;
	int cnt;

	if (list == NULL) {			/* empty list */
		msg(type == 0 ? "Empty handed." : "Nothing appropriate.");
		return FALSE;
	}
	else if (next(list) == NULL) {	/* only 1 item in list */
		obj = OBJPTR(list);
		msg("a) %s", inv_name(obj, FALSE));
		return TRUE;
	}
	cnt = 0;
	wclear(hw);
	for (ch = 'a', pc = list; pc != NULL; pc = next(pc), ch = npch(ch)) {
		obj = OBJPTR(pc);
		wprintw(hw,"%c) %s\n\r",ch,inv_name(obj, FALSE));
		if (++cnt > LINES - 2 && next(pc) != NULL) {
			dbotline(hw, morestr);
			cnt = 0;
			wclear(hw);
		} 
	}
	dbotline(hw,spacemsg);
	restscr(cw);
	return TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1483e
movl -0x14(%rbp), %ecx
leaq 0x172b7(%rip), %rdi     # 0x2bad7
leaq 0x172a2(%rip), %rax     # 0x2bac9
cmpl $0x0, %ecx
cmoveq %rax, %rdi
movb $0x0, %al
callq 0xd8f0
movb $0x0, -0x1(%rbp)
jmp 0x14982
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x14879
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x23060
movq %rax, %rsi
leaq 0x17283(%rip), %rdi     # 0x2baec
movb $0x0, %al
callq 0xd8f0
movb $0x1, -0x1(%rbp)
jmp 0x14982
jmp 0x1487b
movl $0x0, -0x30(%rbp)
leaq 0x255cf(%rip), %rax     # 0x39e58
movq (%rax), %rdi
callq 0x6110
movb $0x61, -0x29(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x14959
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
leaq 0x2559d(%rip), %rax     # 0x39e58
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movsbl -0x29(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x23060
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %edx
movq %rax, %rcx
leaq 0x1720d(%rip), %rsi     # 0x2baf2
movb $0x0, %al
callq 0x6510
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movq 0x1e6e4(%rip), %rcx     # 0x32fe0
movl (%rcx), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jle 0x1493b
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1493b
leaq 0x25542(%rip), %rax     # 0x39e58
movq (%rax), %rdi
leaq 0x1ea0e(%rip), %rsi     # 0x3332e
callq 0xe270
movl $0x0, -0x30(%rbp)
leaq 0x25525(%rip), %rax     # 0x39e58
movq (%rax), %rdi
callq 0x6110
jmp 0x1493d
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movsbl -0x29(%rbp), %edi
callq 0xe330
movb %al, -0x29(%rbp)
jmp 0x1489d
leaq 0x254f8(%rip), %rax     # 0x39e58
movq (%rax), %rdi
leaq 0x1e9a6(%rip), %rsi     # 0x33310
callq 0xe270
leaq 0x254da(%rip), %rax     # 0x39e50
movq (%rax), %rdi
callq 0xe2d0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/pack.c
// Function: pick_up
void pick_up(char ch)
{
	nochange = FALSE;
	switch(ch) {
		case GOLD:
			money();
		when ARMOR:
		case POTION:
		case FOOD:
		case WEAPON:
		case SCROLL:	
		case AMULET:
		case RING:
		case STICK:
			add_pack(NULL, FALSE);
		otherwise:
			msg("That item is ethereal !!!");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
leaq 0x2236e(%rip), %rax     # 0x36d13
movb $0x0, (%rax)
movsbl -0x1(%rbp), %eax
movl %eax, -0x8(%rbp)
subl $0x21, %eax
je 0x14a0f
jmp 0x149b6
movl -0x8(%rbp), %eax
subl $0x29, %eax
je 0x14a0f
jmp 0x149c0
movl -0x8(%rbp), %eax
subl $0x2a, %eax
je 0x14a06
jmp 0x149ca
movl -0x8(%rbp), %eax
subl $0x2c, %eax
je 0x14a0f
jmp 0x149d4
movl -0x8(%rbp), %eax
subl $0x2f, %eax
je 0x14a0f
jmp 0x149de
movl -0x8(%rbp), %eax
subl $0x3a, %eax
je 0x14a0f
jmp 0x149e8
movl -0x8(%rbp), %eax
subl $0x3d, %eax
je 0x14a0f
jmp 0x149f2
movl -0x8(%rbp), %eax
subl $0x3f, %eax
je 0x14a0f
jmp 0x149fc
movl -0x8(%rbp), %eax
subl $0x5d, %eax
je 0x14a0f
jmp 0x14a1c
movb $0x0, %al
callq 0x23aa0
jmp 0x14a2a
xorl %eax, %eax
movl %eax, %edi
xorl %esi, %esi
callq 0x14280
jmp 0x14a2a
leaq 0x170d8(%rip), %rdi     # 0x2bafb
movb $0x0, %al
callq 0xd8f0
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/pack.c
// Function: picky_inven
int picky_inven()
{
	struct linked_list *item;
	char ch, mch;

	if (pack == NULL)
		msg("You aren't carrying anything.");
	else if (next(pack) == NULL)
		msg("a) %s", inv_name(OBJPTR(pack), FALSE));
	else {
		msg("Item: ");
		mpos = 0;
		if ((mch = readchar()) == ESCAPE) {
			msg("");
			return 0;
		}
		for (ch='a',item=pack; item != NULL; item=next(item),ch=npch(ch))
			if (ch == mch) {
				msg("%c) %s",ch,inv_name(OBJPTR(item), FALSE));
				return 0;
			}
		if (ch == 'A')
			ch = 'z';
		else
			ch -= 1;
		msg("Range is 'a' to '%c'", ch);
	}
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x22691(%rip), %rax     # 0x370d0
cmpq $0x0, 0x68(%rax)
jne 0x14a59
leaq 0x170c8(%rip), %rdi     # 0x2bb15
movb $0x0, %al
callq 0xd8f0
jmp 0x14b7e
leaq 0x22670(%rip), %rax     # 0x370d0
movq 0x68(%rax), %rax
cmpq $0x0, (%rax)
jne 0x14a96
leaq 0x2265f(%rip), %rax     # 0x370d0
movq 0x68(%rax), %rax
movq 0x10(%rax), %rdi
xorl %esi, %esi
callq 0x23060
movq %rax, %rsi
leaq 0x17062(%rip), %rdi     # 0x2baec
movb $0x0, %al
callq 0xd8f0
jmp 0x14b7c
leaq 0x17096(%rip), %rdi     # 0x2bb33
movb $0x0, %al
callq 0xd8f0
leaq 0x22235(%rip), %rax     # 0x36ce0
movl $0x0, (%rax)
movb $0x0, %al
callq 0xdce0
movb %al, -0x12(%rbp)
movsbl %al, %eax
cmpl $0x1b, %eax
jne 0x14add
leaq 0x197e5(%rip), %rdi     # 0x2e2af
movb $0x0, %al
callq 0xd8f0
movl $0x0, -0x4(%rbp)
jmp 0x14b85
movb $0x61, -0x11(%rbp)
leaq 0x225e8(%rip), %rax     # 0x370d0
movq 0x68(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x14b51
movsbl -0x11(%rbp), %eax
movsbl -0x12(%rbp), %ecx
cmpl %ecx, %eax
jne 0x14b36
movsbl -0x11(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
xorl %esi, %esi
callq 0x23060
movl -0x18(%rbp), %esi
movq %rax, %rdx
leaq 0x14545(%rip), %rdi     # 0x2906b
movb $0x0, %al
callq 0xd8f0
movl $0x0, -0x4(%rbp)
jmp 0x14b85
jmp 0x14b38
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movsbl -0x11(%rbp), %edi
callq 0xe330
movb %al, -0x11(%rbp)
jmp 0x14af0
movsbl -0x11(%rbp), %eax
cmpl $0x41, %eax
jne 0x14b60
movb $0x7a, -0x11(%rbp)
jmp 0x14b6a
movsbl -0x11(%rbp), %eax
subl $0x1, %eax
movb %al, -0x11(%rbp)
movsbl -0x11(%rbp), %esi
leaq 0x16fc5(%rip), %rdi     # 0x2bb3a
movb $0x0, %al
callq 0xd8f0
jmp 0x14b7e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/pack.c
// Function: del_pack
void del_pack(struct linked_list *what)
{
	struct object *op;

	op = OBJPTR(what);
	cur_null(op);		/* check for current stuff */
	if (op->o_count > 1) {
		op->o_count--;
	}
	else {
		detach(pack,what);
		discard(what);
	}
	updpack();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x15160
movq -0x10(%rbp), %rax
cmpl $0x1, 0x24(%rax)
jle 0x1512a
movq -0x10(%rbp), %rax
movl 0x24(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x24(%rax)
jmp 0x15147
movq -0x8(%rbp), %rsi
leaq 0x21f9b(%rip), %rdi     # 0x370d0
addq $0x68, %rdi
callq 0xe360
movq -0x8(%rbp), %rdi
callq 0xe490
movb $0x0, %al
callq 0xaba0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/pack.c
// Function: cur_null
void cur_null(struct object *op)
{
	if (op == cur_weapon)
		cur_weapon = NULL;
	else if (op == cur_armor)
		cur_armor = NULL;
	else if (op == cur_ring[LEFT])
		cur_ring[LEFT] = NULL;
	else if (op == cur_ring[RIGHT])
		cur_ring[RIGHT] = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
leaq 0x21b4d(%rip), %rcx     # 0x36cc0
cmpq (%rcx), %rax
jne 0x15188
leaq 0x21b41(%rip), %rax     # 0x36cc0
movq $0x0, (%rax)
jmp 0x151ee
movq -0x8(%rbp), %rax
leaq 0x21b35(%rip), %rcx     # 0x36cc8
cmpq (%rcx), %rax
jne 0x151a8
leaq 0x21b29(%rip), %rax     # 0x36cc8
movq $0x0, (%rax)
jmp 0x151ec
movq -0x8(%rbp), %rax
leaq 0x2200d(%rip), %rcx     # 0x371c0
cmpq (%rcx), %rax
jne 0x151c8
leaq 0x22001(%rip), %rax     # 0x371c0
movq $0x0, (%rax)
jmp 0x151ea
movq -0x8(%rbp), %rax
leaq 0x21fed(%rip), %rcx     # 0x371c0
cmpq 0x8(%rcx), %rax
jne 0x151e8
leaq 0x21fe0(%rip), %rax     # 0x371c0
movq $0x0, 0x8(%rax)
jmp 0x151ea
jmp 0x151ec
jmp 0x151ee
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/passages.c
// Function: add_pass
void add_pass()
{
	int y, x, ch;

	for (y = 1; y < LINES - 3; y++)
		for (x = 0; x < COLS; x++)
			if ((ch = mvinch(y, x)) == PASSAGE || ch == DOOR ||
			  ch == SECRETDOOR)
				mvwaddch(cw, y, x, ch);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
movq 0x1d597(%rip), %rcx     # 0x32fe0
movl (%rcx), %ecx
subl $0x3, %ecx
cmpl %ecx, %eax
jge 0x15b0a
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
movq 0x1d571(%rip), %rcx     # 0x32fd8
cmpl (%rcx), %eax
jge 0x15afa
movq 0x1d54a(%rip), %rax     # 0x32fc0
movq (%rax), %rdi
movl -0x4(%rbp), %esi
movl -0x8(%rbp), %edx
callq 0x6490
cmpl $-0x1, %eax
jne 0x15a93
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x10(%rbp)
jmp 0x15aa5
movq 0x1d526(%rip), %rax     # 0x32fc0
movq (%rax), %rdi
callq 0x6340
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
cmpl $0x23, %eax
je 0x15abc
cmpl $0x2b, -0xc(%rbp)
je 0x15abc
cmpl $0x26, -0xc(%rbp)
jne 0x15aea
leaq 0x2438d(%rip), %rax     # 0x39e50
movq (%rax), %rdi
movl -0x4(%rbp), %esi
movl -0x8(%rbp), %edx
callq 0x6490
cmpl $-0x1, %eax
jne 0x15ad8
jmp 0x15aea
leaq 0x24371(%rip), %rax     # 0x39e50
movq (%rax), %rdi
movl -0xc(%rbp), %esi
callq 0x64c0
jmp 0x15aec
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x15a5d
jmp 0x15afc
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x15a3f
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/pstats.c
// Function: chg_hpt
void chg_hpt(int howmany,bool alsomax,char what)
{
	nochange = FALSE;
	if(alsomax)
		him->s_maxhp += howmany;
	him->s_hpt += howmany;
	if (him->s_hpt < 1) {
		msg(" ");
		death(what);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dl, %al
movb %sil, %cl
movl %edi, -0x4(%rbp)
andb $0x1, %cl
movb %cl, -0x5(%rbp)
movb %al, -0x6(%rbp)
leaq 0x20493(%rip), %rax     # 0x36d13
movb $0x0, (%rax)
testb $0x1, -0x5(%rbp)
je 0x1689c
movl -0x4(%rbp), %ecx
leaq 0x2093d(%rip), %rax     # 0x371d0
movq (%rax), %rax
addl 0x34(%rax), %ecx
movl %ecx, 0x34(%rax)
movl -0x4(%rbp), %ecx
leaq 0x2092a(%rip), %rax     # 0x371d0
movq (%rax), %rax
addl 0x30(%rax), %ecx
movl %ecx, 0x30(%rax)
leaq 0x2091a(%rip), %rax     # 0x371d0
movq (%rax), %rax
cmpl $0x1, 0x30(%rax)
jge 0x168d6
leaq 0x14ecc(%rip), %rdi     # 0x2b792
movb $0x0, %al
callq 0xd8f0
movsbl -0x6(%rbp), %edi
callq 0x18260
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/pstats.c
// Function: chg_abil
int chg_abil(int what,int amt,int how)
{
	if (amt == 0)
		return 0;
	if (how == TRUE) {			/* real (must be 1st) */
		updabil(what,amt,&pstats.s_re,TRUE);
		how = FALSE;
	}
	updabil(what,amt,&pstats.s_ef,how);	/* effective */
	updpack();
	wghtchk(FALSE);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x16930
movl $0x0, -0x4(%rbp)
jmp 0x16982
cmpl $0x1, -0x10(%rbp)
jne 0x16954
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
leaq 0x2078d(%rip), %rdx     # 0x370d0
movl $0x1, %ecx
callq 0x16990
movl $0x0, -0x10(%rbp)
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %ecx
leaq 0x2076c(%rip), %rdx     # 0x370d0
addq $0x10, %rdx
callq 0x16990
movb $0x0, %al
callq 0xaba0
xorl %edi, %edi
callq 0xb0e0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/pstats.c
// Function: add_haste
void add_haste(bool potion)
{
	if (pl_on(ISHASTE)) {
		msg("You faint from exhaustion.");
		player.t_nocmd += rnd(8);
		player.t_flags &= ~ISHASTE;
		extinguish(nohaste);
	}
	else {
		player.t_flags |= ISHASTE;
		if (potion)
			fuse(nohaste, TRUE, roll(10,10));
		else
			fuse(nohaste, TRUE, roll(40,20));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movl $0x8000, %edi           # imm = 0x8000
callq 0xaa60
testb $0x1, %al
jne 0x16b90
jmp 0x16bf1
leaq 0x15581(%rip), %rdi     # 0x2c118
movb $0x0, %al
callq 0xd8f0
movl $0x8, %edi
movb $0x0, %al
callq 0xef20
movl %eax, %ecx
leaq 0x2051d(%rip), %rax     # 0x370d0
addl 0x88(%rax), %ecx
leaq 0x20510(%rip), %rax     # 0x370d0
movl %ecx, 0x88(%rax)
leaq 0x20503(%rip), %rax     # 0x370d0
movq 0x78(%rax), %rcx
andq $-0x8001, %rcx          # imm = 0xFFFF7FFF
leaq 0x204f1(%rip), %rax     # 0x370d0
movq %rcx, 0x78(%rax)
leaq -0xcaca(%rip), %rdi     # 0xa120
callq 0x9cd0
jmp 0x16c59
leaq 0x204d8(%rip), %rax     # 0x370d0
movq 0x78(%rax), %rcx
orq $0x8000, %rcx           # imm = 0x8000
leaq 0x204c6(%rip), %rax     # 0x370d0
movq %rcx, 0x78(%rax)
testb $0x1, -0x1(%rbp)
je 0x16c35
movl $0xa, %esi
movl %esi, %edi
callq 0xef70
movl %eax, %edx
leaq -0xcb09(%rip), %rdi     # 0xa120
movl $0x1, %esi
callq 0x9c30
jmp 0x16c57
movl $0x28, %edi
movl $0x14, %esi
callq 0xef70
movl %eax, %edx
leaq -0xcb2d(%rip), %rdi     # 0xa120
movl $0x1, %esi
callq 0x9c30
jmp 0x16c59
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/pstats.c
// Function: getpdex
int getpdex(struct stats *who,bool heave)
{
	int edex;

	edex = who->s_ef.a_dex;
	if (heave) {				/* an object was thrown here */
		if (edex > 18)
			return (edex - 15);
		switch(edex) {
			case 18: return 3;
			case 17: return 2;
			case 16: return 1;
			case 15:
			case 14:
			case 13:
			case 12:
			case 11:
			case 10:
			case 9:
			case 8:
			case 7:
			case 6: return 0;
			case 5: return -1;
			case 4: return -2;
			default: return -3;
		}
	}
	else {		/* object NOT thrown here (affects armor class) */
		if (edex > 18)
			return (14 - edex);
		switch(edex) {
			case 18: return -4;
			case 17: return -3;
			case 16: return -2;
			case 15: return -1;
			case 14:
			case 13:
			case 12:
			case 11:
			case 10:
			case 9:
			case 8: 
			case 7: return 0;
			case 6: return 1;
			case 5: return 2;
			case 4: return 3;
			default: return 4;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x18(%rbp)
testb $0x1, -0x11(%rbp)
je 0x16d11
cmpl $0x12, -0x18(%rbp)
jle 0x16c98
movl -0x18(%rbp), %eax
subl $0xf, %eax
movl %eax, -0x4(%rbp)
jmp 0x16d98
movl -0x18(%rbp), %eax
addl $-0x4, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0xe, %eax
ja 0x16d05
movq -0x20(%rbp), %rax
leaq 0x153b0(%rip), %rcx     # 0x2c064
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x3, -0x4(%rbp)
jmp 0x16d98
movl $0x2, -0x4(%rbp)
jmp 0x16d98
movl $0x1, -0x4(%rbp)
jmp 0x16d98
movl $0x0, -0x4(%rbp)
jmp 0x16d98
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x16d98
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x16d98
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
jmp 0x16d98
cmpl $0x12, -0x18(%rbp)
jle 0x16d24
movl $0xe, %eax
subl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x16d98
movl -0x18(%rbp), %eax
addl $-0x4, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0xe, %eax
ja 0x16d91
movq -0x28(%rbp), %rax
leaq 0x152e8(%rip), %rcx     # 0x2c028
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC
jmp 0x16d98
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
jmp 0x16d98
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x16d98
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x16d98
movl $0x0, -0x4(%rbp)
jmp 0x16d98
movl $0x1, -0x4(%rbp)
jmp 0x16d98
movl $0x2, -0x4(%rbp)
jmp 0x16d98
movl $0x3, -0x4(%rbp)
jmp 0x16d98
movl $0x4, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/pstats.c
// Function: getpwis
int getpwis(struct stats *who)
{
	int ewis;

	ewis = who->s_ef.a_wis;
	if (ewis > 18)
		return (ewis - 14);
	switch(ewis) {
		case 18: return 4;
		case 17: return 3;
		case 16: return 2;
		case 15: return 1;
		case 14:
		case 13:
		case 12:
		case 11:
		case 10:
		case 9:
		case 8: return 0;
		case 7:
		case 6: return -1;
		case 5:
		case 4: return -2;
		default: return -3;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $0x12, -0x14(%rbp)
jle 0x16dc3
movl -0x14(%rbp), %eax
subl $0xe, %eax
movl %eax, -0x4(%rbp)
jmp 0x16e2e
movl -0x14(%rbp), %eax
addl $-0x4, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0xe, %eax
ja 0x16e27
movq -0x20(%rbp), %rax
leaq 0x152c1(%rip), %rcx     # 0x2c0a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x4, -0x4(%rbp)
jmp 0x16e2e
movl $0x3, -0x4(%rbp)
jmp 0x16e2e
movl $0x2, -0x4(%rbp)
jmp 0x16e2e
movl $0x1, -0x4(%rbp)
jmp 0x16e2e
movl $0x0, -0x4(%rbp)
jmp 0x16e2e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x16e2e
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x16e2e
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)