LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
leaq 0x1de1a(%rip), %rax     # 0x2d864
xorl %ebx, %ebx
cmpl $0x0, (%rax)
jne 0xfa7d
leaq 0x1de58(%rip), %r14     # 0x2d8b0
movl $0x9, %edi
xorl %eax, %eax
callq 0xc72d
movl %eax, %ebx
cltq
imulq $0x68, %rax, %rdi
addq %r14, %rdi
movl $0x2, %esi
callq 0x13e74
testl %eax, %eax
jne 0xfa58
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x20cc8(%rip), %r14     # 0x309e8
movq (%r14), %rdi
callq 0x6120
movq (%r14), %rdi
testq %rdi, %rdi
je 0xfd38
movswl 0x4(%rdi), %edx
incl %edx
jmp 0xfd3d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ebx, %ebx
xorl %esi, %esi
movl $0x1, %ecx
callq 0x61b0
movq $-0x18, %r12
leaq 0x1d657(%rip), %r15     # 0x2d3b0
movq (%r14), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x6490
cmpl $-0x1, %eax
je 0xfd7c
movq (%r14), %rdi
movq 0x20(%r12,%r15), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6550
movq (%r14), %rdi
movl %ebx, %esi
movl $0x10, %edx
callq 0x6490
cmpl $-0x1, %eax
je 0xfda2
movq (%r14), %rdi
movq 0x28(%r12,%r15), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6550
addq $0x18, %r12
incl %ebx
cmpq $0x30, %r12
jb 0xfd59
movq (%r14), %rdi
xorl %r12d, %r12d
xorl %esi, %esi
xorl %edx, %edx
callq 0x6490
movq (%r14), %rdi
movq %r12, %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %ebx # imm = 0xAAAAAAAB
movl %ebx, %esi
movl $0x10, %edx
callq 0x6490
movq 0x10(%r12,%r15), %rdi
movq (%r14), %rsi
callq 0xfe5d
testl %eax, %eax
je 0xfe1d
cmpl $0x1, %eax
je 0xfe2b
movq $-0x30, %r13
testq %r12, %r12
jg 0xfe0e
movl $0x7, %edi
callq 0x6060
movq $-0x18, %r13
xorl %ebx, %ebx
movq (%r14), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x6490
addq %r13, %r12
leaq 0x18(%r12), %rax
cmpq $0x30, %r12
movq %rax, %r12
jl 0xfdbd
movq (%r14), %rdi
leaq 0x1a4db(%rip), %rsi     # 0x2a310
callq 0xbd6d
leaq 0x20b9f(%rip), %rax     # 0x309e0
movq (%rax), %rdi
callq 0xbdbb
leaq 0x1a4bd(%rip), %rax     # 0x2a30d
movb $0x0, (%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %edx, %edx
jle 0x10131
movl %edx, %ebp
movq %rsi, %r14
incl %ebp
movsbl (%r14), %edi
callq 0x6420
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x60e0
movq %r15, %rdi
callq 0x6170
addq %rax, %rbx
incq %r14
decl %ebp
cmpl $0x1, %ebp
jg 0x10105
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
cmpb $0x0, (%rdi)
je 0x10287
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r13
callq 0x65b0
movq %rax, (%rsp)
movabsq $0x100000000, %rdx      # imm = 0x100000000
leaq 0x1d240(%rip), %r14     # 0x2d3b0
movq (%rsp), %rax
movq (%rax), %rax
leaq -0x1(%r13), %r15
movabsq $-0x100000000, %r12     # imm = 0xFFFFFFFF00000000
addq %rdx, %r12
movsbq 0x1(%r15), %rcx
incq %r15
testb $0x4, 0x1(%rax,%rcx,2)
jne 0x10185
sarq $0x20, %r12
xorl %ebx, %ebx
movq (%rbx,%r14), %rsi
movq %r13, %rdi
movq %r12, %rdx
callq 0x60c0
testl %eax, %eax
jne 0x10221
movzbl 0x1(%r15), %eax
incq %r15
cmpl $0x3d, %eax
je 0x101b0
cmpl $0x7e, %eax
jne 0x101f3
movq 0x10(%rbx,%r14), %rdi
leaq 0x1dea2(%rip), %r13     # 0x2e070
movq %r13, %rsi
callq 0x60e0
movq 0x10(%rbx,%r14), %rbp
movq %r13, %rdi
callq 0x6170
cmpb $0x2f, 0x1(%r15)
leaq 0x1(%r15), %r15
je 0x101e3
addq %rax, %rbp
jmp 0x101f8
movq 0x10(%rbx,%r14), %rbp
movq %r15, %r13
xorl %r15d, %r15d
movzbl 0x1(%r13,%r15), %eax
incq %r15
cmpl $0x2c, %eax
je 0x10210
testl %eax, %eax
jne 0x101fe
movq %rbp, %rdi
movq %r13, %rsi
movl %r15d, %edx
callq 0x100f0
addq %r13, %r15
leaq 0x18(%rbx), %rax
cmpq $0x30, %rbx
movq %rax, %rbx
jb 0x1019d
movb (%r15), %cl
testb %cl, %cl
je 0x10262
movq (%rsp), %rax
movq (%rax), %rax
movabsq $0x100000000, %rdx      # imm = 0x100000000
movsbq %cl, %rcx
testb $0x4, 0x1(%rax,%rcx,2)
jne 0x1026c
movb 0x1(%r15), %cl
incq %r15
testb %cl, %cl
jne 0x1024a
jmp 0x1026c
movabsq $0x100000000, %rdx      # imm = 0x100000000
cmpb $0x0, (%r15)
movq %r15, %r13
jne 0x10170
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/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 %r15
pushq %r14
pushq %rbx
leaq 0x1d67c(%rip), %rax     # 0x2dc60
movq 0x68(%rax), %r15
movb $0x25, %bl
testq %r15, %r15
je 0x1060e
movq %rdi, %r14
movb $0x61, %al
cmpq %r14, 0x10(%r15)
je 0x1060c
movsbl %al, %edi
callq 0xbdeb
movq (%r15), %r15
testq %r15, %r15
jne 0x105f4
jmp 0x1060e
movl %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x106e7
cmpq $0x0, (%rbx)
je 0x10704
leaq 0x203aa(%rip), %r13     # 0x309e8
movq (%r13), %rdi
callq 0x6120
movb $0x61, %al
movq 0x19960(%rip), %r15     # 0x29fb0
xorl %r12d, %r12d
movq %rbx, (%rsp)
movl %r12d, %r14d
movq 0x10(%rbx), %rdi
movq (%r13), %r12
movsbl %al, %ebp
xorl %esi, %esi
callq 0x1aaa4
movq %r12, %rdi
leaq 0x10e90(%rip), %rsi     # 0x21506
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x6510
leal 0x1(%r14), %r12d
movl (%r15), %eax
addl $-0x2, %eax
cmpl %eax, %r14d
jl 0x106b3
cmpq $0x0, (%rbx)
je 0x106b3
movq (%r13), %rdi
leaq 0x19c8c(%rip), %rsi     # 0x2a32e
callq 0xbd6d
movq (%r13), %rdi
callq 0x6120
xorl %r12d, %r12d
movq (%rbx), %rbx
movl %ebp, %edi
callq 0xbdeb
testq %rbx, %rbx
jne 0x10657
movq (%r13), %rdi
leaq 0x19c43(%rip), %rsi     # 0x2a310
callq 0xbd6d
leaq 0x20307(%rip), %rax     # 0x309e0
movq (%rax), %rdi
callq 0xbdbb
movq (%rsp), %rbx
jmp 0x10720
testl %esi, %esi
leaq 0x10ded(%rip), %rax     # 0x214dd
leaq 0x10df4(%rip), %rdi     # 0x214eb
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0xb6e0
jmp 0x10720
movq 0x10(%rbx), %rdi
xorl %esi, %esi
callq 0x1aaa4
leaq 0x10dea(%rip), %rdi     # 0x21500
movq %rax, %rsi
xorl %eax, %eax
callq 0xb6e0
testq %rbx, %rbx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/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:
leaq 0x1d167(%rip), %rax     # 0x2d8a3
movb $0x0, (%rax)
leal -0x29(%rdi), %eax
cmpl $0x6, %eax
jbe 0x10766
leal -0x3a(%rdi), %eax
cmpl $0x23, %eax
ja 0x1075f
movabsq $0x800000029, %rcx      # imm = 0x800000029
btq %rax, %rcx
jb 0x10776
cmpl $0x21, %edi
je 0x10776
jmp 0x1077f
leaq 0x10cbf(%rip), %rcx     # 0x2142c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %edi, %edi
xorl %esi, %esi
jmp 0x10288
leaq 0x10d89(%rip), %rdi     # 0x2150f
xorl %eax, %eax
jmp 0xb6e0
xorl %eax, %eax
jmp 0x1b2ff
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
leaq 0x1d4c1(%rip), %r14     # 0x2dc60
movq 0x68(%r14), %rax
testq %rax, %rax
je 0x107dd
cmpq $0x0, (%rax)
je 0x107f0
leaq 0x10d92(%rip), %rdi     # 0x21547
xorl %eax, %eax
callq 0xb6e0
leaq 0x1d0ad(%rip), %rax     # 0x2d870
movl $0x0, (%rax)
xorl %eax, %eax
callq 0xb9fd
cmpb $0x1b, %al
jne 0x1080e
leaq 0x13136(%rip), %rdi     # 0x23911
jmp 0x107e4
leaq 0x10d45(%rip), %rdi     # 0x21529
xorl %eax, %eax
callq 0xb6e0
jmp 0x10877
movq 0x10(%rax), %rdi
xorl %esi, %esi
callq 0x1aaa4
leaq 0x10cfe(%rip), %rdi     # 0x21500
movq %rax, %rsi
xorl %eax, %eax
callq 0xb6e0
jmp 0x10877
movq 0x68(%r14), %r14
testq %r14, %r14
je 0x10831
movl %eax, %ebx
movb $0x61, %al
cmpb %bl, %al
je 0x10856
movq (%r14), %r14
movsbl %al, %edi
callq 0xbdeb
testq %r14, %r14
jne 0x1081b
jmp 0x10833
movb $0x61, %al
leal -0x1(%rax), %ecx
cmpb $0x41, %al
movzbl %cl, %eax
movl $0x7a, %ecx
cmovnel %eax, %ecx
movsbl %cl, %esi
leaq 0x10d01(%rip), %rdi     # 0x2154e
xorl %eax, %eax
callq 0xb6e0
jmp 0x10877
movsbl %al, %ebx
movq 0x10(%r14), %rdi
xorl %esi, %esi
callq 0x1aaa4
leaq 0xe800(%rip), %rdi      # 0x1f06b
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0xb6e0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rax
leaq 0x1cb62(%rip), %rcx     # 0x2d850
cmpq %rax, (%rcx)
je 0x10d1c
leaq 0x1cb5e(%rip), %rcx     # 0x2d858
cmpq %rax, (%rcx)
je 0x10d1c
leaq 0x1d04a(%rip), %rcx     # 0x2dd50
cmpq %rax, (%rcx)
je 0x10d1c
leaq 0x1d03e(%rip), %rcx     # 0x2dd50
cmpq %rax, 0x8(%rcx)
jne 0x10d23
addq $0x8, %rcx
movq $0x0, (%rcx)
movl 0x24(%rax), %ecx
cmpl $0x2, %ecx
jl 0x10d32
decl %ecx
movl %ecx, 0x24(%rax)
jmp 0x10d4d
leaq 0x1cf27(%rip), %rdi     # 0x2dc60
addq $0x68, %rdi
movq %rbx, %rsi
callq 0xbe00
movq %rbx, %rdi
callq 0xbe93
xorl %eax, %eax
popq %rbx
jmp 0x95e0
// File: /workspace/github_c_makefile_star2_O1/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:
leaq 0x1caf4(%rip), %rax     # 0x2d850
cmpq %rdi, (%rax)
je 0x10d8b
leaq 0x1caf0(%rip), %rax     # 0x2d858
cmpq %rdi, (%rax)
je 0x10d8b
leaq 0x1cfdc(%rip), %rax     # 0x2dd50
cmpq %rdi, (%rax)
je 0x10d8b
leaq 0x1cfd0(%rip), %rax     # 0x2dd50
cmpq %rdi, 0x8(%rax)
je 0x10d87
retq
addq $0x8, %rax
movq $0x0, (%rax)
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x18c3b(%rip), %rax     # 0x29fb0
cmpl $0x5, (%rax)
jl 0x11416
movl $0x1, %ebx
movq 0x18c0e(%rip), %r12     # 0x29f98
movq 0x18b9f(%rip), %r13     # 0x29f30
leaq 0x1f648(%rip), %r15     # 0x309e0
cmpl $0x0, (%r12)
jle 0x11404
xorl %ebp, %ebp
movq (%r13), %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x6490
cmpl $-0x1, %eax
je 0x113c1
movq (%r13), %rdi
callq 0x6330
movl %eax, %r14d
jmp 0x113c7
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpl $0x2b, %r14d
ja 0x113fc
movl %r14d, %eax
movabsq $0x84800000000, %rcx    # imm = 0x84800000000
btq %rax, %rcx
jae 0x113fc
movq (%r15), %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x6490
cmpl $-0x1, %eax
je 0x113fc
movq (%r15), %rdi
movl %r14d, %esi
callq 0x64c0
incl %ebp
cmpl (%r12), %ebp
jl 0x113a1
incl %ebx
movq 0x18ba3(%rip), %rax     # 0x29fb0
movl (%rax), %eax
addl $-0x3, %eax
cmpl %eax, %ebx
jl 0x11398
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movl %edx, %ebx
leaq 0x1b9d1(%rip), %rax     # 0x2d8a3
movb $0x0, (%rax)
testl %esi, %esi
je 0x11ee6
leaq 0x1be80(%rip), %rax     # 0x2dd60
movq (%rax), %rax
addl %edi, 0x34(%rax)
leaq 0x1be73(%rip), %rax     # 0x2dd60
movq (%rax), %rax
addl %edi, 0x30(%rax)
jle 0x11ef7
popq %rbx
retq
leaq 0xf290(%rip), %rdi      # 0x2118e
xorl %eax, %eax
callq 0xb6e0
movsbl %bl, %edi
popq %rbx
jmp 0x12dc8
// File: /workspace/github_c_makefile_star2_O1/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:
testl %esi, %esi
je 0x11f75
pushq %rbp
pushq %rbx
pushq %rax
movl %edx, %ecx
movl %esi, %ebx
movl %edi, %ebp
cmpl $0x1, %edx
jne 0x11f4d
leaq 0x1bd23(%rip), %rdx     # 0x2dc60
movl %ebp, %edi
movl %ebx, %esi
movl $0x1, %ecx
callq 0x11f78
xorl %ecx, %ecx
leaq 0x1bd0c(%rip), %rdx     # 0x2dc60
addq $0x10, %rdx
movl %ebp, %edi
movl %ebx, %esi
callq 0x11f78
xorl %eax, %eax
callq 0x95e0
xorl %edi, %edi
callq 0x9904
addq $0x8, %rsp
popq %rbx
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/pstats.c
// Function: updabil
int updabil(int what,int amt,struct real *pst,int how)
{
	int *wh, *mx, *mr;
	struct real *mst, *msr;
	bool is_str = FALSE;
	int rtype;

	msr = &him->s_re;
	if (how == TRUE)				/* max real abilities */
		mst = &max_stats.s_re;
	else							/* max effective abil */
		mst = &max_stats.s_ef;
	switch (what) {
		case STR:
			is_str = TRUE;
			wh = &pst->a_str;
			mx = &mst->a_str;
			mr = &msr->a_str;
			rtype = R_ADDSTR;
		when DEX:
			wh = &pst->a_dex;
			mx = &mst->a_dex;
			mr = &msr->a_dex;
			rtype = R_DEX;
		when CON:
			wh = &pst->a_con;
			mx = &mst->a_con;
			mr = &msr->a_con;
			rtype = R_CONST;
		when WIS:
			wh = &pst->a_wis;
			mx = &mst->a_wis;
			mr = &msr->a_wis;
			rtype = R_KNOW;
		otherwise:
			return 0;
	}
	*wh += amt;						/* update by amt */
	if (amt < 0) {					/* if decrement */
		if (*wh < MINABIL)			/* minimum = 3 */
			*wh = MINABIL;
		if (how == FALSE) {
			if (*wh < *mr)			/* if less than real abil */
				*wh = *mr;			/* make equal to real */
		}
	}
	else {							/* increment */
		int themax;

		themax = MAXOTHER;				/* default maximum */
		if (is_str)
			themax = MAXSTR;			/* strength maximum */
		if (how != TRUE)
			themax += ringex(rtype);	/* get ring extra */
		if (*wh > themax) {				/* see if > max (if real) */
			*wh = themax;				/* max = 18  (24 if str) */
		}
		/*
		 * Check for updating the max player stats.
		 */
		if (*wh > *mx)
			*mx = *wh;
	}
  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
leaq 0x1bd72(%rip), %rdx     # 0x2dcf8
leaq 0x10(%rdx), %r14
cmpl $0x1, %ecx
cmoveq %rdx, %r14
leal -0x1(%rdi), %r8d
cmpl $0x3, %r8d
ja 0x1206c
leaq 0x1bdba(%rip), %rax     # 0x2dd60
movq (%rax), %rax
leaq 0xfa60(%rip), %r9       # 0x21a10
movslq (%r9,%r8,4), %r8
addq %r9, %r8
jmpq *%r8
movl $0x18, %ebp
jmp 0x1202d
xorl %edi, %edi
cmpl $0x1, %ecx
setne %dil
addq $0xc, %rbx
shll $0x4, %edi
leaq (%rdx,%rdi), %r14
addq $0xc, %r14
addq $0xc, %rax
movl $0x5, %edi
jmp 0x12028
xorl %edi, %edi
cmpl $0x1, %ecx
setne %dil
addq $0x8, %rbx
shll $0x4, %edi
leaq (%rdx,%rdi), %r14
addq $0x8, %r14
addq $0x8, %rax
movl $0x18, %edi
jmp 0x12028
xorl %edi, %edi
cmpl $0x1, %ecx
setne %dil
addq $0x4, %rbx
shll $0x4, %edi
leaq (%rdx,%rdi), %r14
addq $0x4, %r14
addq $0x4, %rax
movl $0x19, %edi
movl $0x12, %ebp
movl (%rbx), %edx
addl %esi, %edx
movl %edx, (%rbx)
testl %esi, %esi
js 0x12055
cmpl $0x1, %ecx
je 0x12043
callq 0x12d54
addl %eax, %ebp
cmpl %ebp, (%rbx)
jle 0x12049
movl %ebp, (%rbx)
movl (%rbx), %eax
cmpl (%r14), %eax
jle 0x1206c
movl %eax, (%r14)
jmp 0x1206c
cmpl $0x2, %edx
jg 0x12060
movl $0x3, (%rbx)
testl %ecx, %ecx
jne 0x1206c
movl (%rax), %eax
cmpl %eax, (%rbx)
jge 0x1206c
movl %eax, (%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movl %edi, %ebx
movl $0x8000, %edi           # imm = 0x8000
callq 0x9595
testb %al, %al
je 0x120bc
leaq 0xfa85(%rip), %rdi      # 0x21b10
xorl %eax, %eax
callq 0xb6e0
movl $0x8, %edi
xorl %eax, %eax
callq 0xc72d
leaq 0x1bbbb(%rip), %rcx     # 0x2dc60
addl %eax, 0x88(%rcx)
andb $0x7f, 0x79(%rcx)
leaq -0x911f(%rip), %rdi     # 0x8f97
popq %rbx
jmp 0x8cdc
leaq 0x1bb9d(%rip), %rax     # 0x2dc60
orb $-0x80, 0x79(%rax)
testb %bl, %bl
je 0x120d7
movl $0xa, %edi
movl $0xa, %esi
jmp 0x120e1
movl $0x28, %edi
movl $0x14, %esi
callq 0xc74e
leaq -0x9156(%rip), %rdi     # 0x8f97
movl $0x1, %esi
movl %eax, %edx
popq %rbx
jmp 0x8c6f
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/pstats.c
// Function: str_plus
int str_plus(struct stats *who)
{
	int hitplus, str;

	hitplus = 0;
	str = who->s_ef.a_str;
	if (str > 24)			/* > 24 */
		hitplus = str - 21;
	else if (str == 24)		/* 24 */
		hitplus = 3;
	else if (str > 20)		/* 21 to 23 */
		hitplus = 2;
	else if(str >= 17)		/* 17 to 20 */
		hitplus = 1;
	else if(str > 7)		/* 8 to 16 */
		hitplus = 0;
	else if(str > 5)		/* 6 to 7 */
		hitplus = -1;
	else if(str > 3)		/* 4 to 5 */
		hitplus = -2;
	else
		hitplus = -3;		/* < 4 */
	if (who == him)			/* add pack weight if hero */
		hitplus += hitweight();
	return hitplus;
}

// Assembly:
pushq %rbx
movl 0x10(%rdi), %eax
cmpl $0x19, %eax
jl 0x121ab
addl $-0x15, %eax
movl %eax, %ebx
jmp 0x121e5
movl $0x3, %ebx
cmpl $0x18, %eax
je 0x121e5
movl $0x2, %ebx
cmpl $0x14, %eax
jg 0x121e5
movl $0x1, %ebx
cmpl $0x10, %eax
jg 0x121e5
xorl %ebx, %ebx
cmpl $0x7, %eax
jg 0x121e5
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x5, %eax
jg 0x121e5
xorl %ebx, %ebx
cmpl $0x4, %eax
setge %bl
addl $-0x3, %ebx
leaq 0x1bb74(%rip), %rax     # 0x2dd60
cmpq %rdi, (%rax)
jne 0x121fa
xorl %eax, %eax
callq 0x99bd
addl %eax, %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/pstats.c
// Function: add_dam
int add_dam(struct stats *who)
{
	int exdam, str;

	exdam = 0;
	str = who->s_ef.a_str;
	if (str > 24)			/* > 24 */
		exdam = str - 18;
	else if (str == 24)		/* 24 */
		exdam = 6;
	else if (str == 23)		/* 23 */
		exdam = 5;
	else if (str > 20)		/* 21 to 22 */
		exdam = 4;
	else if (str > 18)		/* 19 to 20 */
		exdam = 3;
	else if (str == 18)		/* 18 */
		exdam = 2;
	else if (str > 15)		/* 16 to 17 */
		exdam = 1;
	else if (str > 6)		/* 7 to 14 */
		exdam = 0;
	else
		exdam = -1;			/* 3 to 6 */
	if (who == him)
		exdam += hungdam();		/* add hungry state if hero */
	return exdam;
}

// Assembly:
movl 0x10(%rdi), %ecx
cmpl $0x19, %ecx
jl 0x1220d
addl $-0x12, %ecx
movl %ecx, %eax
jmp 0x12254
cmpl $0x18, %ecx
je 0x1221e
cmpl $0x17, %ecx
jne 0x12225
movl $0x5, %eax
jmp 0x12254
movl $0x6, %eax
jmp 0x12254
movl $0x4, %eax
cmpl $0x14, %ecx
jg 0x12254
movl $0x3, %eax
cmpl $0x12, %ecx
jg 0x12254
movl $0x2, %eax
je 0x12254
movl $0x1, %eax
cmpl $0xf, %ecx
jg 0x12254
xorl %eax, %eax
cmpl $0x7, %ecx
setl %al
negl %eax
leaq 0x1bb05(%rip), %rcx     # 0x2dd60
cmpq %rdi, (%rcx)
je 0x12261
retq
leaq 0x1b628(%rip), %rcx     # 0x2d890
movl (%rcx), %ecx
xorl %edx, %edx
cmpl $0x2, %ecx
sete %dl
negl %edx
cmpl $0x3, %ecx
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmovnel %edx, %ecx
addl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/pstats.c
// Function: heal_self
void heal_self(int factor,bool updmaxhp)
{
	him->s_hpt += roll(him->s_lvl + getpcon(him), factor);
	if (updmaxhp)
		him->s_maxhp += 1;
	if (him->s_hpt > him->s_maxhp)
		him->s_hpt = him->s_maxhp;
	nochange = FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
leaq 0x1baad(%rip), %r15     # 0x2dd60
movq (%r15), %rdi
movl 0x28(%rdi), %r14d
callq 0x12173
addl %eax, %r14d
movl %r14d, %edi
movl %ebp, %esi
callq 0xc74e
movq (%r15), %rcx
addl 0x30(%rcx), %eax
movl %eax, 0x30(%rcx)
testl %ebx, %ebx
je 0x122dc
incl 0x34(%rcx)
movl 0x34(%rcx), %edx
cmpl %edx, %eax
jle 0x122e6
movl %edx, 0x30(%rcx)
leaq 0x1b5b6(%rip), %rax     # 0x2d8a3
movb $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/rings.c
// Function: gethand
bool gethand(bool isrmv)
{
	int c;
	char *ptr;
	struct object *obj;

	while(1) {
		addmsg("Left or Right ring");
		if (isrmv)
			addmsg(starlist);
		addmsg("? ");
		endmsg();
		c = readchar();
		if (isupper(c))
			c = tolower(c);
		if (c == '*' && isrmv) {
			wclear(hw);
			obj = cur_ring[LEFT];
			if (obj != NULL)
				ptr = inv_name(obj, TRUE);
			else
				ptr = "none";
			wprintw(hw, "L)  %s\n\r",ptr);
			obj = cur_ring[RIGHT];
			if (obj != NULL)
				ptr = inv_name(obj, TRUE);
			else
				ptr = "none";
			wprintw(hw, "R)  %s\n\r", ptr);
			wprintw(hw, "\n\r\nWhich hand? ");
			draw(hw);
			c = readchar();
			if (isupper(c))
				c = tolower(c);
			restscr(cw);
		}
		if (c == 'l')
			return LEFT;
		else if (c == 'r')
			return RIGHT;
		else if (c == ESCAPE)
			return -1;
		mpos = 0;
		msg("L or R");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
movl %ebx, %r13d
xorb $0x1, %r13b
leaq 0x1e35a(%rip), %r14     # 0x309e8
leaq 0xf6ee(%rip), %r12      # 0x21d83
leaq 0xf6d4(%rip), %rdi      # 0x21d70
xorl %eax, %eax
callq 0xb7f7
testb %bl, %bl
je 0x126b5
leaq 0x17cf2(%rip), %rdi     # 0x2a3a0
xorl %eax, %eax
callq 0xb7f7
leaq 0xfe96(%rip), %rdi      # 0x22552
xorl %eax, %eax
callq 0xb7f7
xorl %eax, %eax
callq 0xb8a6
xorl %eax, %eax
callq 0xb9fd
movsbl %al, %r15d
callq 0x65b0
movq %rax, %rbp
movq (%rax), %rax
movsbq %r15b, %rcx
testb $0x1, 0x1(%rax,%rcx,2)
je 0x126f6
movl %r15d, %edi
callq 0x6310
movl %eax, %r15d
cmpl $0x2a, %r15d
setne %al
orb %r13b, %al
jne 0x127bc
movq (%r14), %rdi
callq 0x6120
leaq 0x1b63b(%rip), %rax     # 0x2dd50
movq (%rax), %rdi
movq %r12, %rdx
testq %rdi, %rdi
je 0x1272d
movl $0x1, %esi
callq 0x1aaa4
movq %rax, %rdx
movq (%r14), %rdi
leaq 0xf651(%rip), %rsi      # 0x21d88
xorl %eax, %eax
callq 0x6510
leaq 0x1b60b(%rip), %rax     # 0x2dd50
movq 0x8(%rax), %rdi
movq %r12, %rdx
testq %rdi, %rdi
je 0x1275e
movl $0x1, %esi
callq 0x1aaa4
movq %rax, %rdx
movq (%r14), %rdi
leaq 0xf629(%rip), %rsi      # 0x21d91
xorl %eax, %eax
callq 0x6510
movq (%r14), %rdi
leaq 0xf621(%rip), %rsi      # 0x21d9a
xorl %eax, %eax
callq 0x6510
movq (%r14), %rdi
callq 0x6200
xorl %eax, %eax
callq 0xb9fd
movsbl %al, %r15d
movq (%rbp), %rax
movsbq %r15b, %rcx
testb $0x1, 0x1(%rax,%rcx,2)
je 0x127ad
movl %r15d, %edi
callq 0x6310
movl %eax, %r15d
leaq 0x1e22c(%rip), %rax     # 0x309e0
movq (%rax), %rdi
callq 0xbdbb
cmpl $0x6c, %r15d
je 0x127ee
cmpl $0x1b, %r15d
je 0x127ee
cmpl $0x72, %r15d
je 0x127ee
leaq 0x1b09b(%rip), %rax     # 0x2d870
movl $0x0, (%rax)
leaq 0xf5c8(%rip), %rdi      # 0x21daa
xorl %eax, %eax
callq 0xb6e0
jmp 0x12695
cmpl $0x6c, %r15d
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/rings.c
// Function: ring_off
int ring_off()
{
	int ring;
	struct object *obj;
	
	if (cur_ring[LEFT] == NULL && cur_ring[RIGHT] == NULL) {
		msg("You're not wearing any rings.");
		return 0;
	}
	else if (cur_ring[LEFT] == NULL)
		ring = RIGHT;
	else if (cur_ring[RIGHT] == NULL)
		ring = LEFT;
	else
		if ((ring = gethand(TRUE)))
			return 0;
	mpos = 0;
	obj = cur_ring[ring];
	if (obj == NULL) {
		msg("Not wearing such a ring.");
		return 0;
	}
	if (dropcheck(obj)) {
		msg("Was wearing %s", inv_name(obj, TRUE));
		nochange = FALSE;
		ringfood = ring_eat();
	}
  return 0;
}

// Assembly:
pushq %rbx
leaq 0x1b544(%rip), %rbx     # 0x2dd50
movq (%rbx), %rax
testq %rax, %rax
je 0x12832
cmpq $0x0, 0x8(%rbx)
je 0x12845
movl $0x1, %edi
callq 0x12673
testb %al, %al
jne 0x128b8
movzbl %al, %eax
jmp 0x12847
cmpq $0x0, 0x8(%rbx)
je 0x128aa
testq %rax, %rax
jne 0x12814
movl $0x1, %eax
jmp 0x12847
xorl %eax, %eax
leaq 0x1b022(%rip), %rcx     # 0x2d870
movl $0x0, (%rcx)
movq (%rbx,%rax,8), %rbx
testq %rbx, %rbx
je 0x128a1
movq %rbx, %rdi
callq 0x1b623
testb %al, %al
je 0x128b8
movq %rbx, %rdi
movl $0x1, %esi
callq 0x1aaa4
leaq 0xf4e4(%rip), %rdi      # 0x21d61
movq %rax, %rsi
xorl %eax, %eax
callq 0xb6e0
leaq 0x1b015(%rip), %rax     # 0x2d8a3
movb $0x0, (%rax)
callq 0x12a63
leaq 0x1aff7(%rip), %rcx     # 0x2d894
movl %eax, (%rcx)
jmp 0x128b8
leaq 0xf4a0(%rip), %rdi      # 0x21d48
jmp 0x128b1
leaq 0xf479(%rip), %rdi      # 0x21d2a
xorl %eax, %eax
callq 0xb6e0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/rings.c
// Function: toss_ring
void toss_ring(struct object *what)
{
	bool okring;

	/*
	 * okring = FALSE when:
	 * 1) ring is cursed and benefit = plus
	 * 2) ring is blessed and benefit = minus
	 */
	okring = !((what->o_ac > 0 && o_on(what, ISCURSED)) ||
	          (what->o_ac < 0 && o_on(what, ISBLESS)));

	cur_ring[what == cur_ring[LEFT] ? LEFT : RIGHT] = NULL;
	if (okring) {
		switch (what->o_which) {
			case R_SPEED:
				extinguish(nohaste);
				nohaste(FALSE);
			when R_BLIND:
				sight(FALSE);
			when R_SLOW:
				player.t_flags &= ~ISSLOW;
			when R_SAPEM:
				extinguish(sapem);
			when R_GIANT:
				him->s_ef = him->s_re;
				ringabil();
			when R_ADDSTR:
				chg_abil(STR,-what->o_ac,FALSE);
			when R_KNOW:
				chg_abil(WIS,-what->o_ac,FALSE);
			when R_DEX:
				chg_abil(DEX,-what->o_ac,FALSE);
			when R_CONST:
				chg_abil(CON,-what->o_ac,FALSE);
			when R_SEEINVIS:
				player.t_flags &= ~CANSEE;
				extinguish(unsee);
				light(&hero);
				mvwaddch(cw, hero.y, hero.x, PLAYER);
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x34(%rdi)
jle 0x128f6
movl $0x1, %esi
movq %rbx, %rdi
callq 0x95b3
testb %al, %al
je 0x128f6
leaq 0x1b46f(%rip), %rax     # 0x2dd50
xorl %ecx, %ecx
cmpq %rbx, (%rax)
setne %cl
movq $0x0, (%rax,%rcx,8)
jmp 0x129db
cmpl $0x0, 0x34(%rbx)
js 0x12915
leaq 0x1b44d(%rip), %rax     # 0x2dd50
xorl %ecx, %ecx
cmpq %rbx, (%rax)
setne %cl
movq $0x0, (%rax,%rcx,8)
jmp 0x12941
movl $0x20, %esi
movq %rbx, %rdi
callq 0x95b3
leaq 0x1b427(%rip), %rcx     # 0x2dd50
xorl %edx, %edx
cmpq %rbx, (%rcx)
setne %dl
movq $0x0, (%rcx,%rdx,8)
testb %al, %al
jne 0x129db
movl 0x28(%rbx), %eax
decl %eax
cmpl $0x18, %eax
ja 0x129db
leaq 0xf23a(%rip), %rcx      # 0x21b90
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %esi, %esi
subl 0x34(%rbx), %esi
movl $0x1, %edi
jmp 0x12a55
xorl %esi, %esi
subl 0x34(%rbx), %esi
movl $0x3, %edi
jmp 0x12a55
leaq 0x1b2dc(%rip), %rax     # 0x2dc60
andb $-0x41, 0x79(%rax)
jmp 0x129db
leaq 0x1b2cf(%rip), %r14     # 0x2dc60
andb $-0x11, 0x79(%r14)
leaq -0x9a49(%rip), %rdi     # 0x8f54
callq 0x8cdc
leaq 0x50(%r14), %rdi
callq 0xecbc
leaq 0x1e02e(%rip), %rbx     # 0x309e0
movq (%rbx), %rdi
movl 0x50(%r14), %edx
movl 0x54(%r14), %esi
callq 0x6490
cmpl $-0x1, %eax
je 0x129db
movq (%rbx), %rdi
movl $0x40, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x64c0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1b376(%rip), %rax     # 0x2dd60
movq (%rax), %rax
movups (%rax), %xmm0
movups %xmm0, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x12c2b
leaq -0x985f(%rip), %rdi     # 0x91a8
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8cdc
leaq -0x9a83(%rip), %rdi     # 0x8f97
callq 0x8cdc
xorl %edi, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8f97
xorl %edi, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8f62
xorl %esi, %esi
subl 0x34(%rbx), %esi
movl $0x2, %edi
jmp 0x12a55
xorl %esi, %esi
subl 0x34(%rbx), %esi
movl $0x4, %edi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x11f24
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/rings.c
// Function: ring_eat
int ring_eat()
{
	struct object *lb;
	int hand, i, howmuch;
	bool addit;

	howmuch = 0;
	addit = TRUE;
	for (i = LEFT; i <= RIGHT ; i += 1) {
		lb = cur_ring[i];
		if (lb != NULL) {
			switch (lb->o_which) {
				case R_REGEN:
				case R_GIANT:
					howmuch += 2;
				when R_SPEED:
				case R_SUSTSTR:
				case R_SUSAB:
					howmuch += 1;
				when R_SEARCH:
					howmuch += (rnd(100) < 33);
				when R_DIGEST:
					switch(lb->o_ac) {
						case -3: if (rnd(100) < 25)
									howmuch += 3;
						when -2: if (rnd(100) < 50)
									howmuch += 2;
						when -1: howmuch += 1;
						when  0: howmuch -= (rnd(100) < 50);
						when  3: if (rnd(100) < 25)
									howmuch -= 3;
						when  2: if (rnd(100) < 50)
									howmuch -= 2;
						default: howmuch -= 1;
					}
				otherwise:
					addit = FALSE;
			}
			if (addit) {
				if (o_on(lb, ISBLESS))
					howmuch -= 1;
				else if (o_on(lb, ISCURSED))
					howmuch += 1;
			}
		}
	}
	return howmuch;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movb $0x1, %bpl
leaq 0x1b2d8(%rip), %r15     # 0x2dd50
leaq 0xf175(%rip), %r12      # 0x21bf4
xorl %r13d, %r13d
xorl %ebx, %ebx
movq (%r15,%r13,8), %r14
testq %r14, %r14
je 0x12b95
movl 0x28(%r14), %eax
leal -0x2(%rax), %ecx
cmpl $0xe, %ecx
ja 0x12aad
movslq (%r12,%rcx,4), %rax
addq %r12, %rax
jmpq *%rax
incl %ebx
jmp 0x12b68
cmpl $0x13, %eax
jne 0x12aba
addl $0x2, %ebx
jmp 0x12b68
xorl %ebp, %ebp
jmp 0x12b68
movl 0x34(%r14), %eax
addl $0x3, %eax
cmpl $0x6, %eax
ja 0x12b66
leaq 0xf158(%rip), %rcx      # 0x21c30
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x64, %edi
xorl %eax, %eax
callq 0xc72d
leal 0x3(%rbx), %ecx
jmp 0x12b2d
movl $0x64, %edi
xorl %eax, %eax
callq 0xc72d
xorl %ecx, %ecx
cmpl $0x21, %eax
setl %cl
addl %ecx, %ebx
jmp 0x12b68
movl $0x64, %edi
xorl %eax, %eax
callq 0xc72d
leal 0x2(%rbx), %ecx
cmpl $0x32, %eax
jmp 0x12b30
movl $0x64, %edi
xorl %eax, %eax
callq 0xc72d
leal -0x3(%rbx), %ecx
cmpl $0x19, %eax
cmovgel %ebx, %ecx
movl %ecx, %ebx
jmp 0x12b68
movl $0x64, %edi
xorl %eax, %eax
callq 0xc72d
xorl %ecx, %ecx
cmpl $0x32, %eax
setl %cl
subl %ecx, %ebx
jmp 0x12b68
movl $0x64, %edi
xorl %eax, %eax
callq 0xc72d
leal -0x2(%rbx), %ecx
cmpl $0x32, %eax
cmovgel %ebx, %ecx
movl %ecx, %ebx
decl %ebx
testb $0x1, %bpl
je 0x12b95
movl $0x20, %esi
movq %r14, %rdi
callq 0x95b3
testb %al, %al
je 0x12b83
decl %ebx
jmp 0x12b95
movl $0x1, %esi
movq %r14, %rdi
callq 0x95b3
movzbl %al, %eax
addl %eax, %ebx
incq %r13
cmpq $0x1, %r13
je 0x12a84
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/rings.c
// Function: ring_num
char * ring_num(struct object *what)
{
	static char number[5];

	number[0] = '\0';
	if (o_on(what,ISKNOW) || o_on(what,ISPOST)) {
		if (magring(what)) {	/* only rings with numbers */
			number[0] = ' ';
			strcpy(&number[1], num(what->o_ac, 0));
		}
	}
	return number;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movb $0x0, 0x202fa(%rip)     # 0x32eb8
movl $0x2, %esi
callq 0x95b3
testb %al, %al
jne 0x12bdd
movl $0x4, %esi
movq %rbx, %rdi
callq 0x95b3
testb %al, %al
je 0x12c0f
movl 0x28(%rbx), %eax
cmpl $0x19, %eax
ja 0x12c0f
movl $0x30025a3, %ecx        # imm = 0x30025A3
btl %eax, %ecx
jae 0x12c0f
movb $0x20, 0x202c2(%rip)    # 0x32eb8
movl 0x34(%rbx), %edi
xorl %esi, %esi
callq 0x1cd29
leaq 0x202b2(%rip), %rdi     # 0x32eb9
movq %rax, %rsi
callq 0x60e0
leaq 0x202a2(%rip), %rax     # 0x32eb8
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/rings.c
// Function: ringabil
void ringabil()
{
	struct object *rptr;
	int i;

	for(i = LEFT; i <= RIGHT; i++) {
		rptr = cur_ring[i];
		if (rptr != NULL) {
			switch(rptr->o_which) {
				case R_ADDSTR:
					chg_abil(STR,rptr->o_ac,FROMRING);
				when R_DEX: 
					chg_abil(DEX,rptr->o_ac,FROMRING);
				when R_KNOW:
					chg_abil(WIS,rptr->o_ac,FROMRING);
				when R_CONST:
					chg_abil(CON,rptr->o_ac,FROMRING);
			}
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
leaq 0x1b118(%rip), %r14     # 0x2dd50
movq (%r14,%rbx,8), %rax
testq %rax, %rax
je 0x12c7d
movl 0x28(%rax), %edi
cmpl $0x17, %edi
jg 0x12c5a
cmpl $0x1, %edi
je 0x12c70
cmpl $0x5, %edi
jne 0x12c7d
movl $0x3, %edi
jmp 0x12c70
cmpl $0x18, %edi
je 0x12c6b
cmpl $0x19, %edi
jne 0x12c7d
movl $0x2, %edi
jmp 0x12c70
movl $0x4, %edi
movl 0x34(%rax), %esi
movl $0x2, %edx
callq 0x11f24
incq %rbx
cmpq $0x1, %rbx
je 0x12c38
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/rings.c
// Function: init_ring
void init_ring(struct object *what,bool fromwiz) // fromwiz == TRUE when wizard
{
	int much;

	switch (what->o_which) {
		case R_DIGEST:		/* -3 to +3 rings */
		case R_ADDSTR:
		case R_PROTECT:
		case R_ADDHIT:
		case R_ADDDAM:
		case R_DEX:
		case R_KNOW:
		case R_CONST:
			if (fromwiz) {
				much = getbless();		/* get wizards response */
			}
			else {						/* normal users */
				if (rnd(100) < 25)
					much = -rnd(3) - 1;
				else
					much = rnd(3) + 1;
			}
			what->o_ac = much;
			if (much < 0)
				setoflg(what,ISCURSED);
		when R_SPEED:
			what->o_ac = rnd(4) + 1;
		when R_AGGR:
		case R_DELUS:
		case R_HEAVY:
		case R_BLIND:
		case R_SLOW:
		case R_SAPEM:
		case R_TELEPORT:
			what->o_ac = 0;
			setoflg(what,ISCURSED);	
		when R_GIANT:
			what->o_ac = 25;		/* lots !! of STR */
		otherwise:
			what->o_ac = 1;
	}
	what->o_type = RING;
	what->o_weight = things[TYP_RING].mi_wght;
	what->o_typname = things[TYP_RING].mi_name;
	what->o_vol = itemvol(what);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x28(%rdi), %eax
cmpq $0x19, %rax
ja 0x12d42
leaq 0xefa4(%rip), %rcx      # 0x21c4c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testb %sil, %sil
je 0x12cc8
xorl %eax, %eax
callq 0x1d5bd
jmp 0x12ced
movl $0x0, 0x34(%rbx)
jmp 0x12cf4
movl $0x64, %edi
xorl %eax, %eax
callq 0xc72d
movl %eax, %ebp
movl $0x3, %edi
xorl %eax, %eax
callq 0xc72d
cmpl $0x18, %ebp
jg 0x12ceb
notl %eax
jmp 0x12ced
incl %eax
movl %eax, 0x34(%rbx)
testl %eax, %eax
jns 0x12d01
movl $0x1, %esi
movq %rbx, %rdi
callq 0x95d5
movl $0x3d, 0x20(%rbx)
leaq 0x190c1(%rip), %rax     # 0x2bdd0
movl 0x5c(%rax), %ecx
movl %ecx, 0x40(%rbx)
movq 0x50(%rax), %rax
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
callq 0x9804
movl %eax, 0x44(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0x4, %edi
xorl %eax, %eax
callq 0xc72d
incl %eax
movl %eax, 0x34(%rbx)
jmp 0x12d01
movl $0x1, 0x34(%rbx)
jmp 0x12d01
movl $0x19, 0x34(%rbx)
jmp 0x12d01
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/rings.c
// Function: ringex
int ringex(int rtype)
{
	int howmuch = 0;

	if (isring(LEFT, rtype))
		howmuch += cur_ring[LEFT]->o_ac;
	if (isring(RIGHT, rtype))
		howmuch += cur_ring[RIGHT]->o_ac;
	return howmuch;
}

// Assembly:
leaq 0x1aff5(%rip), %rcx     # 0x2dd50
movq (%rcx), %rdx
xorl %eax, %eax
testq %rdx, %rdx
je 0x12d6d
cmpl %edi, 0x28(%rdx)
jne 0x12d6d
movl 0x34(%rdx), %eax
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
je 0x12d7e
cmpl %edi, 0x28(%rcx)
jne 0x12d7e
addl 0x34(%rcx), %eax
retq
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/rooms.c
// Function: rnd_pos
struct coord *rnd_pos(struct room *rp)
{
	int y, x, i;
	static struct coord spot;

	i = 0;
	do {
		x = rp->r_pos.x + rnd(rp->r_max.x - 2) + 1;
		y = rp->r_pos.y + rnd(rp->r_max.y - 2) + 1;
		i += 1;
	} while(winat(y, x) != FLOOR && i < 1000);
	spot.x = x;
	spot.y = y;
	return &spot;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
movl (%rbx), %r14d
movl 0x8(%rbx), %edi
addl $-0x2, %edi
xorl %eax, %eax
callq 0xc72d
leal (%r14,%rax), %ebp
incl %ebp
movl 0x4(%rbx), %r14d
movl 0xc(%rbx), %edi
addl $-0x2, %edi
xorl %eax, %eax
callq 0xc72d
addl %eax, %r14d
incl %r14d
movl %r14d, %edi
movl %ebp, %esi
callq 0x9514
cmpb $0x2e, %al
je 0x140bb
leal 0x1(%r15), %eax
cmpl $0x3e7, %r15d           # imm = 0x3E7
movl %eax, %r15d
jb 0x14070
movl %ebp, 0x1f327(%rip)     # 0x333e8
leaq 0x1f320(%rip), %rax     # 0x333e8
movl %r14d, 0x1f31d(%rip)    # 0x333ec
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/save.c
// Function: save_game
int save_game()
{
	FILE *savef;
	int c;
	char buf[LINLEN];

	mpos = 0;
	if (file_name[0] != '\0') {
		msg("Save file (%s)? ", file_name);
		do {
			c = wgetch(cw);
			if(c == ESCAPE) {
				msg("");
				return FALSE;
			}
		} while (c != 'n' && c != 'y');
		mpos = 0;
		if (c == 'y')
			goto gotfile;
	}
	msg("File name: ");
	mpos = 0;
	buf[0] = '\0';
	if (get_str(buf, cw) == QUIT) {
		msg("");
		return FALSE;
	}
	msg("");
	strcpy(file_name, buf);
gotfile:
	c = dosave();		/* try to save this game */
	if (c == FALSE)
		msg("Could not save game to file %s", file_name);
	return c;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
leaq 0x196d1(%rip), %r14     # 0x2d870
movl $0x0, (%r14)
leaq 0x19e23(%rip), %rax     # 0x2dfd0
cmpb $0x0, (%rax)
je 0x14203
leaq 0xe38b(%rip), %rdi      # 0x22544
leaq 0x19e10(%rip), %rsi     # 0x2dfd0
xorl %eax, %eax
callq 0xb6e0
leaq 0x1c812(%rip), %rbx     # 0x309e0
movq (%rbx), %rdi
callq 0x6110
cmpl $0x79, %eax
je 0x141f7
cmpl $0x6e, %eax
je 0x141f7
cmpl $0x1b, %eax
jne 0x141ce
leaq 0xf725(%rip), %rdi      # 0x23911
xorl %ebx, %ebx
xorl %eax, %eax
callq 0xb6e0
jmp 0x14273
movl $0x0, (%r14)
cmpl $0x79, %eax
je 0x14253
leaq 0xe34b(%rip), %rdi      # 0x22555
xorl %ebx, %ebx
xorl %eax, %eax
callq 0xb6e0
movl $0x0, (%r14)
movq %rsp, %rdi
movb $0x0, (%rdi)
leaq 0x1c7b9(%rip), %rax     # 0x309e0
movq (%rax), %rsi
callq 0xfe5d
movl %eax, %ebp
leaq 0xf6d9(%rip), %rdi      # 0x23911
xorl %eax, %eax
callq 0xb6e0
cmpl $0x1, %ebp
je 0x14273
leaq 0x19d85(%rip), %rdi     # 0x2dfd0
movq %rsp, %rsi
callq 0x60e0
callq 0x14302
movl %eax, %ebx
testb %al, %al
jne 0x14273
leaq 0xe2fc(%rip), %rdi      # 0x22561
leaq 0x19d64(%rip), %rsi     # 0x2dfd0
xorl %eax, %eax
callq 0xb6e0
movzbl %bl, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/save.c
// Function: game_err
void game_err(int a)
{
	int ok;

	ok = dosave();			/* try to save this game */
	clear();
	refresh();
	endwin();

	printf("\nInternal error !!!\n\nYour game was ");
	if (ok)
		printf("saved.");
	else
		printf("NOT saveable.");

	fflush(stdout);

#ifdef SIGIOT
	signal(SIGIOT, SIG_DFL);	/* allow core dump signal */
#endif

	abort();			/* cause core dump */
	byebye(3);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x14302
movl %eax, %ebx
movq 0x15c8c(%rip), %r14     # 0x29f30
movq (%r14), %rdi
callq 0x6120
movq (%r14), %rdi
callq 0x6200
callq 0x6530
leaq 0xe2c0(%rip), %rdi      # 0x22580
xorl %eax, %eax
callq 0x61c0
leaq 0xe2d6(%rip), %rax      # 0x225a4
leaq 0xe2d6(%rip), %rdi      # 0x225ab
testb %bl, %bl
cmovneq %rax, %rdi
xorl %eax, %eax
callq 0x61c0
movq 0x15c17(%rip), %rax     # 0x29f00
movq (%rax), %rdi
callq 0x6350
movl $0x6, %edi
xorl %esi, %esi
callq 0x6280
callq 0x6090
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/save.c
// Function: dosave
bool dosave()
{
	FILE *savef;

	ignore();
	setuid(playuid);
	setgid(playgid);
	umask(022);

	if (file_name[0] != '\0') {
		if ((savef = fopen(file_name,"w")) != NULL)
		{
			save_file(savef);
			return TRUE;
		}
	}
	return FALSE;
}

// Assembly:
pushq %rbx
xorl %ebx, %ebx
movl $0x1, %esi
movl %ebx, %edi
callq 0x6280
incl %ebx
cmpl $0x41, %ebx
jne 0x14305
leaq 0x19b41(%rip), %rax     # 0x2de60
movl (%rax), %edi
callq 0x6520
leaq 0x19b37(%rip), %rax     # 0x2de64
movl (%rax), %edi
callq 0x6410
movl $0x12, %edi
callq 0x62a0
leaq 0x19c8b(%rip), %rax     # 0x2dfd0
cmpb $0x0, (%rax)
je 0x1436e
leaq 0x19c7f(%rip), %rdi     # 0x2dfd0
leaq 0xc876(%rip), %rsi      # 0x20bce
callq 0x6460
testq %rax, %rax
je 0x1436e
movq %rax, %rdi
callq 0x14372
movb $0x1, %al
jmp 0x14370
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/save.c
// Function: save_file
void save_file(FILE *savef)
{
	int fnum;
	int slines = LINES;
	int scols = COLS;

#ifdef __DJGPP__                      /* st_ino w/ DJGPP under WinXP broken */
        _djstat_flags |= _STAT_INODE; /* so turn off computing it for now   */
#endif

	/*
	 * force allocation of the buffer now so that inodes, etc
	 * can be checked when restoring saved games.
	 */
	fnum = fileno(savef);
	fstat(fnum, &sbuf);
	write(fnum, "RDK", 4);
	lseek(fnum, 0L, 0);
	encwrite(version,strlen(version)+1,savef);
	encwrite(&sbuf.st_ino,sizeof(sbuf.st_ino),savef);
	encwrite(&sbuf.st_dev,sizeof(sbuf.st_dev),savef);
	encwrite(&sbuf.st_ctime,sizeof(sbuf.st_ctime),savef);
	encwrite(&sbuf.st_mtime,sizeof(sbuf.st_mtime),savef);
	encwrite(&slines,sizeof(slines),savef);
	encwrite(&scols,sizeof(scols),savef);
	msg("");
	rs_save_file(savef);
	close(fnum);
	signal(SIGINT, byebye);
	signal(SIGQUIT, byebye);
	wclear(cw);
	draw(cw);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x15c29(%rip), %rax     # 0x29fb0
movl (%rax), %eax
leaq 0x4(%rsp), %r15
movl %eax, (%r15)
movq 0x15c00(%rip), %rax     # 0x29f98
movl (%rax), %eax
movq %rsp, %r14
movl %eax, (%r14)
callq 0x62f0
movl %eax, %ebp
leaq 0x1f042(%rip), %r12     # 0x333f0
movl %eax, %edi
movq %r12, %rsi
callq 0x6570
leaq 0xe1fa(%rip), %rsi      # 0x225b9
movl $0x4, %edx
movl %ebp, %edi
callq 0x6100
movl %ebp, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x61d0
leaq 0x191d3(%rip), %r13     # 0x2d5b0
movq %r13, %rdi
callq 0x6170
leal 0x1(%rax), %esi
movq %r13, %rdi
movq %rbx, %rdx
callq 0x156a0
leaq 0x1effe(%rip), %rdi     # 0x333f8
movl $0x8, %esi
movq %rbx, %rdx
callq 0x156a0
movq %r12, %rdi
movl $0x8, %esi
movq %rbx, %rdx
callq 0x156a0
leaq 0x1f03a(%rip), %rdi     # 0x33458
movl $0x8, %esi
movq %rbx, %rdx
callq 0x156a0
leaq 0x1f016(%rip), %rdi     # 0x33448
movl $0x8, %esi
movq %rbx, %rdx
callq 0x156a0
movq %r15, %rdi
movl $0x4, %esi
movq %rbx, %rdx
callq 0x156a0
movq %r14, %rdi
movl $0x4, %esi
movq %rbx, %rdx
callq 0x156a0
leaq 0xf4ab(%rip), %rdi      # 0x23911
xorl %eax, %eax
callq 0xb6e0
movq %rbx, %rdi
callq 0x189b3
movl %ebp, %edi
callq 0x6230
leaq -0x7d6e(%rip), %rbx     # 0xc715
movl $0x2, %edi
movq %rbx, %rsi
callq 0x6280
movl $0x3, %edi
movq %rbx, %rsi
callq 0x6280
leaq 0x1c53c(%rip), %rbx     # 0x309e0
movq (%rbx), %rdi
callq 0x6120
movq (%rbx), %rdi
callq 0x6200
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/state.c
// Function: encwrite
void encwrite(void *starta,unsigned int size,FILE *outf)
{
    char *ep;
    char *start = starta;

    ep = encstr;

    while (size--)
    {
        putc(*start++ ^ *ep++, outf);
        if (*ep == '\0')
            ep = encstr;
    }
}

// Assembly:
testl %esi, %esi
je 0x156ff
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movl %esi, %r15d
leaq 0x17e21(%rip), %r12     # 0x2d4e0
xorl %r13d, %r13d
movq %r12, %rbp
movb (%rbp), %al
xorb (%r14,%r13), %al
movsbl %al, %edi
movq %rbx, %rsi
callq 0x6260
cmpb $0x0, 0x1(%rbp)
movq %r12, %rax
je 0x156e6
incq %rbp
movq %rbp, %rax
incq %r13
movq %rax, %rbp
cmpl %r13d, %r15d
jne 0x156c5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/state.c
// Function: encread
int encread(void *starta,unsigned int size,int inf)
{
    char *ep;
    int read_size;
    char *start = starta;

    if ((read_size = read(inf, start, size)) == -1 || read_size == 0)
        return read_size;

    ep = encstr;

    while (size--)
    {
        *start++ ^= *ep++;
        if (*ep == '\0')
            ep = encstr;
    }
    return read_size;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, %r14d
movl %edx, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6240
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
setb %cl
testl %ebp, %ebp
sete %dl
orb %cl, %dl
jne 0x15758
leaq 0x17dae(%rip), %rcx     # 0x2d4e0
xorl %edx, %edx
movq %rcx, %rsi
movb (%rsi), %dil
xorb %dil, (%rbx,%rdx)
cmpb $0x0, 0x1(%rsi)
movq %rcx, %rdi
je 0x1574d
incq %rsi
movq %rsi, %rdi
incq %rdx
movq %rdi, %rsi
cmpl %edx, %r14d
jne 0x15737
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/state.c
// Function: rs_write
int rs_write(FILE *savef, void *ptr, int size)
{
    if (!write_error)
        encwrite(ptr,size,savef);

    if (0)
        write_error = TRUE;
        
    assert(write_error == 0);

    return(WRITESTAT);
}

// Assembly:
pushq %rax
cmpl $0x0, 0x1dccb(%rip)     # 0x33484
jne 0x157cb
movq %rdi, %rax
movq %rsi, %rdi
movl %edx, %esi
movq %rax, %rdx
callq 0x156a0
cmpl $0x0, 0x1dcb2(%rip)     # 0x33484
jne 0x157db
movl $0x1, %eax
popq %rcx
retq
leaq 0xd496(%rip), %rdi      # 0x22c78
leaq 0xd4a0(%rip), %rsi      # 0x22c89
leaq 0xd4a1(%rip), %rcx      # 0x22c91
movl $0xb7, %edx
callq 0x61e0