// File: /workspace/github_cpp_makefile_star2_O2/lotuskip[P]yuxtapa/server/occent.cpp
// Function: Arrow::Arrow(Coords, std::_List_iterator<Player>)
Arrow::Arrow(Coords t, const list<Player>::iterator o)
	: OwnedEnt(o->own_pc->getpos(), '|', C_ARROW, o)
{
	char r = t.dist_walk(Coords(0,0));
	if(r == 1)
		path.push_back(Coords(t.x+pos.x, t.y+pos.y)); // and done
	else
	{
		char line, ind;
		// see common/los_lookup.h
		if(t.y == -r) line = t.x + r;
		else if(t.x == r) line = 3*r + t.y;
		else if(t.y == r) line = 5*r - t.x;
		else /* t.x == -r */ line = 7*r - t.y;
		for(ind = 0; ind < 2*r; ind += 2)
			path.push_back(Coords(loslookup[r-2][line*2*r+ind] + pos.x,
				loslookup[r-2][line*2*r+ind+1] + pos.y));
	}
	pos = Coords(0,0); // indicates the arrow isn't anywhere yet
	init_path_len = path.size();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r8
movq %rsi, %r15
movq %rdi, %r12
movq 0x148(%rdx), %rax
movl 0x8(%rax), %eax
leaq -0x2c(%rbp), %rsi
movl %eax, (%rsi)
pushq $0x7c
popq %rdx
pushq $0x2a
popq %rcx
callq 0x1cb14
leaq -0x2c(%rbp), %rdi
callq 0x24d9e
leaq 0x20091(%rip), %rax     # 0x3cc78
movq %rax, (%r12)
leaq 0x18(%r12), %rax
movq %rax, 0x20(%r12)
movq %rax, -0x38(%rbp)
movq %rax, 0x18(%r12)
andq $0x0, 0x28(%r12)
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x24d90
leaq -0x2c(%rbp), %rsi
movq %r15, %rdi
callq 0x24dd8
movl %eax, %r14d
movzwl %ax, %ebx
leaq -0x2c(%rbp), %rdi
callq 0x24d9e
movl %ebx, %eax
shll $0x18, %eax
movl %eax, -0x30(%rbp)
cmpl $0x1000000, %eax        # imm = 0x1000000
jne 0x1ccab
movzwl 0x8(%r12), %eax
movzwl 0xa(%r12), %ecx
addw (%r15), %ax
addw 0x2(%r15), %cx
movswl %ax, %esi
movswl %cx, %edx
leaq -0x2c(%rbp), %rdi
callq 0x24d90
leaq -0x2c(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x19662
leaq -0x2c(%rbp), %rdi
callq 0x24d9e
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x24d90
leaq -0x2c(%rbp), %rdi
movl (%rdi), %eax
movl %eax, 0x8(%r12)
callq 0x24d9e
movb 0x28(%r12), %al
movb %al, 0x30(%r12)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsbl %bl, %eax
movswl 0x2(%r15), %edx
movl %edx, %esi
movswl (%r15), %ecx
addl %eax, %esi
jne 0x1ccc2
addl %r14d, %ecx
jmp 0x1cce2
cmpl %ecx, %eax
jne 0x1ccce
leal (%r14,%r14,2), %ecx
addl %ecx, %edx
jmp 0x1ccd8
cmpl %edx, %eax
jne 0x1ccdc
leal (%r14,%r14,4), %edx
subl %ecx, %edx
movl %edx, %ecx
jmp 0x1cce2
imull $0x7, %r14d, %ecx
subl %edx, %ecx
sarl $0x17, -0x30(%rbp)
movslq %eax, %rdx
leaq -0x8(,%rdx,4), %rdx
movq %rdx, -0x40(%rbp)
movsbl %cl, %r14d
imull %eax, %r14d
addl %r14d, %r14d
xorl %ebx, %ebx
leaq 0x10467(%rip), %r13     # 0x2d170
leaq -0x2c(%rbp), %r15
movsbl %bl, %ebx
cmpl -0x30(%rbp), %ebx
jge 0x1cc75
movq -0x40(%rbp), %rax
movslq (%rax,%r13), %rax
addq %r13, %rax
leal (%rbx,%r14), %ecx
movslq %ecx, %rcx
movsbl (%rcx,%rax), %edx
addw 0x8(%r12), %dx
movsbl 0x1(%rcx,%rax), %eax
addw 0xa(%r12), %ax
movswl %dx, %esi
movswl %ax, %edx
movq %r15, %rdi
callq 0x24d90
movq -0x38(%rbp), %rdi
movq %r15, %rsi
callq 0x19662
movq %r15, %rdi
callq 0x24d9e
addl $0x2, %ebx
jmp 0x1cd0d
jmp 0x1cd84
jmp 0x1cd7f
jmp 0x1cd7f
jmp 0x1cd84
jmp 0x1cd7f
movq %rax, %r15
leaq -0x2c(%rbp), %rdi
callq 0x24d9e
jmp 0x1cda1
movq %rax, %r15
jmp 0x1cd90
movq %rax, %r15
leaq -0x2c(%rbp), %rdi
callq 0x24d9e
movq -0x38(%rbp), %rdi
callq 0x183c2
movq %r12, %rdi
callq 0x1c9c8
movq %r15, %rdi
callq 0x4710
nop