// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/weapons.c
// Function: do_motion
void do_motion(struct object *obj,int ydelta,int xdelta)
{
	int ch, y, x;

	obj->o_pos = hero;
	while (1) {
		y = obj->o_pos.y;
		x = obj->o_pos.x;
		if (!ce(obj->o_pos, hero) && cansee(unc(obj->o_pos)) &&
		  mvwinch(cw, y, x) != ' ')
			mvwaddch(cw, y, x, show(y, x));
		/*
		 * Get the new position
		 */
		obj->o_pos.y += ydelta;
		obj->o_pos.x += xdelta;
		y = obj->o_pos.y;
		x = obj->o_pos.x;
		ch = winat(y, x);
		if (step_ok(ch) && ch != DOOR) {
			if (cansee(unc(obj->o_pos)) && mvwinch(cw, y, x) != ' ') {
				mvwaddch(cw, y, x, obj->o_type);
				draw(cw);
			}
			continue;
		}
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
leaq 0x116b3(%rip), %rcx     # 0x370d0
movq 0x50(%rcx), %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
leaq 0x1168c(%rip), %rcx     # 0x370d0
cmpl 0x50(%rcx), %eax
jne 0x25a60
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
leaq 0x11679(%rip), %rcx     # 0x370d0
cmpl 0x54(%rcx), %eax
je 0x25af7
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edi
movq -0x8(%rbp), %rax
movl (%rax), %esi
callq 0x7480
testb $0x1, %al
jne 0x25a78
jmp 0x25af7
leaq 0x143d1(%rip), %rax     # 0x39e50
movq (%rax), %rdi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x6490
cmpl $-0x1, %eax
jne 0x25a9c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x20(%rbp)
jmp 0x25aae
leaq 0x143ad(%rip), %rax     # 0x39e50
movq (%rax), %rdi
callq 0x6340
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl $0x20, %eax
je 0x25af7
leaq 0x14393(%rip), %rax     # 0x39e50
movq (%rax), %rdi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x6490
cmpl $-0x1, %eax
jne 0x25ad2
jmp 0x25af7
leaq 0x14377(%rip), %rax     # 0x39e50
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movl -0x18(%rbp), %edi
movl -0x1c(%rbp), %esi
callq 0x118c0
movq -0x28(%rbp), %rdi
movsbl %al, %esi
callq 0x64c0
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %edi
movl -0x1c(%rbp), %esi
callq 0xa960
movsbl %al, %eax
movl %eax, -0x14(%rbp)
movslq -0x14(%rbp), %rdi
callq 0xdc30
testb $0x1, %al
jne 0x25b45
jmp 0x25beb
cmpl $0x2b, -0x14(%rbp)
je 0x25beb
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edi
movq -0x8(%rbp), %rax
movl (%rax), %esi
callq 0x7480
testb $0x1, %al
jne 0x25b67
jmp 0x25be6
leaq 0x142e2(%rip), %rax     # 0x39e50
movq (%rax), %rdi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x6490
cmpl $-0x1, %eax
jne 0x25b8b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x2c(%rbp)
jmp 0x25b9d
leaq 0x142be(%rip), %rax     # 0x39e50
movq (%rax), %rdi
callq 0x6340
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl $0x20, %eax
je 0x25be6
leaq 0x142a4(%rip), %rax     # 0x39e50
movq (%rax), %rdi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x6490
cmpl $-0x1, %eax
jne 0x25bc1
jmp 0x25bd7
leaq 0x14288(%rip), %rax     # 0x39e50
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x20(%rax), %esi
callq 0x64c0
leaq 0x14272(%rip), %rax     # 0x39e50
movq (%rax), %rdi
callq 0x61f0
jmp 0x25a24
jmp 0x25bed
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)