// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/fight.c
// Function: killed
void killed(struct linked_list *item,bool pr)
{
	struct thing *tp;
	struct object *obj;
	struct linked_list *pitem, *nexti, *itspack;
	struct coord here;
	
	nochange = FALSE;
	tp = THINGPTR(item);
	here = tp->t_pos;
	if (pr) {
		addmsg("Defeated ");
		if (pl_on(ISBLIND))
			msg("it.");
		else
			msg("%s.", monsters[tp->t_indx].m_name);
	}
	him->s_exp += tp->t_stats.s_exp;
	isfight = FALSE;
	check_level();
	unhold(tp->t_type);					/* free player if held */
	if (tp->t_type == 'L') {
		struct room *rp;

		rp = roomin(&here);
		if (rp != NULL) {
			if (rp->r_goldval!=0 || fallpos(&here, &rp->r_gold, FALSE)) {
				rp->r_goldval += GOLDCALC;
				if (!save_throw(VS_MAGIC,tp))
					rp->r_goldval += GOLDCALC + GOLDCALC + GOLDCALC
								   + GOLDCALC + GOLDCALC;
				mvaddch(rp->r_gold.y, rp->r_gold.x, GOLD);
				if (!rf_on(rp,ISDARK)) {
					light(&hero);
					mvwaddch(cw, hero.y, hero.x, PLAYER);
				}
			}
		}
	}
	pitem = tp->t_pack;
	itspack = tp->t_pack;
	remove_monster(&here, item);
	while (pitem != NULL) {
		nexti = next(pitem);
		obj = OBJPTR(pitem);
		obj->o_pos = here;
		detach(itspack, pitem);
		fall(pitem, FALSE);
		pitem = nexti;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
leaq 0x2b208(%rip), %rax     # 0x36d13
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x40(%rbp)
testb $0x1, -0x9(%rbp)
je 0xbb86
leaq 0x1e3b4(%rip), %rdi     # 0x29ee7
movb $0x0, %al
callq 0xda30
movl $0x1, %edi
callq 0xaa60
testb $0x1, %al
jne 0xbb4a
jmp 0xbb5a
leaq 0x21eaf(%rip), %rdi     # 0x2da00
movb $0x0, %al
callq 0xd8f0
jmp 0xbb84
movq -0x18(%rbp), %rax
movslq 0x80(%rax), %rcx
leaq 0x27854(%rip), %rax     # 0x333c0
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rsi
leaq 0x1e163(%rip), %rdi     # 0x29ce0
movb $0x0, %al
callq 0xd8f0
jmp 0xbb86
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
leaq 0x2b63b(%rip), %rax     # 0x371d0
movq (%rax), %rax
addq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
leaq 0x2b161(%rip), %rax     # 0x36d08
movb $0x0, (%rax)
callq 0xcbe0
movq -0x18(%rbp), %rax
movsbl 0x8d(%rax), %edi
callq 0x10f00
movq -0x18(%rbp), %rax
movsbl 0x8d(%rax), %eax
cmpl $0x4c, %eax
jne 0xbd8d
leaq -0x40(%rbp), %rdi
callq 0x7560
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0xbd8b
movq -0x48(%rbp), %rax
cmpl $0x0, 0x58(%rax)
jne 0xbc11
movq -0x48(%rbp), %rsi
addq $0x10, %rsi
leaq -0x40(%rbp), %rdi
xorl %edx, %edx
callq 0x25dc0
testb $0x1, %al
jne 0xbc11
jmp 0xbd89
leaq 0x276d8(%rip), %rax     # 0x332f0
imull $0xa, (%rax), %edi
addl $0x32, %edi
movb $0x0, %al
callq 0xef20
movl %eax, %ecx
addl $0x2, %ecx
movq -0x48(%rbp), %rax
addl 0x58(%rax), %ecx
movl %ecx, 0x58(%rax)
movq -0x18(%rbp), %rsi
movl $0x3, %edi
callq 0xcd80
cmpl $0x0, %eax
jne 0xbcee
leaq 0x2769e(%rip), %rax     # 0x332f0
imull $0xa, (%rax), %edi
addl $0x32, %edi
movb $0x0, %al
callq 0xef20
addl $0x2, %eax
movl %eax, -0x58(%rbp)
leaq 0x27684(%rip), %rax     # 0x332f0
imull $0xa, (%rax), %edi
addl $0x32, %edi
movb $0x0, %al
callq 0xef20
movl %eax, %ecx
movl -0x58(%rbp), %eax
addl $0x2, %ecx
addl %ecx, %eax
movl %eax, -0x54(%rbp)
leaq 0x27663(%rip), %rax     # 0x332f0
imull $0xa, (%rax), %edi
addl $0x32, %edi
movb $0x0, %al
callq 0xef20
movl %eax, %ecx
movl -0x54(%rbp), %eax
addl $0x2, %ecx
addl %ecx, %eax
movl %eax, -0x50(%rbp)
leaq 0x27642(%rip), %rax     # 0x332f0
imull $0xa, (%rax), %edi
addl $0x32, %edi
movb $0x0, %al
callq 0xef20
movl %eax, %ecx
movl -0x50(%rbp), %eax
addl $0x2, %ecx
addl %ecx, %eax
movl %eax, -0x4c(%rbp)
leaq 0x27621(%rip), %rax     # 0x332f0
imull $0xa, (%rax), %edi
addl $0x32, %edi
movb $0x0, %al
callq 0xef20
movl -0x4c(%rbp), %ecx
addl $0x2, %eax
addl %eax, %ecx
movq -0x48(%rbp), %rax
addl 0x58(%rax), %ecx
movl %ecx, 0x58(%rax)
movq 0x272cb(%rip), %rax     # 0x32fc0
movq (%rax), %rdi
movq -0x48(%rbp), %rax
movl 0x14(%rax), %esi
movq -0x48(%rbp), %rax
movl 0x10(%rax), %edx
callq 0x6490
cmpl $-0x1, %eax
jne 0xbd12
jmp 0xbd26
movq 0x272a7(%rip), %rax     # 0x32fc0
movq (%rax), %rdi
movl $0x2a, %esi
callq 0x64c0
movq -0x48(%rbp), %rdi
movl $0x1, %esi
callq 0x19950
cmpl $0x0, %eax
jne 0xbd87
leaq 0x2b390(%rip), %rdi     # 0x370d0
addq $0x50, %rdi
callq 0x123b0
leaq 0x2e100(%rip), %rax     # 0x39e50
movq (%rax), %rdi
leaq 0x2b376(%rip), %rax     # 0x370d0
movl 0x54(%rax), %esi
leaq 0x2b36c(%rip), %rax     # 0x370d0
movl 0x50(%rax), %edx
callq 0x6490
cmpl $-0x1, %eax
jne 0xbd73
jmp 0xbd87
leaq 0x2e0d6(%rip), %rax     # 0x39e50
movq (%rax), %rdi
movl $0x40, %esi
callq 0x64c0
jmp 0xbd89
jmp 0xbd8b
jmp 0xbd8d
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0xcac0
cmpq $0x0, -0x28(%rbp)
je 0xbdfd
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0xe360
movq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x25c30
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0xbdb2
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)