// File: /workspace/github_cpp_makefile_star2_O3/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 $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x148(%rdx), %rax
movl 0x8(%rax), %eax
leaq -0x2c(%rbp), %rsi
movl %eax, (%rsi)
movl $0x7c, %edx
movl $0x2a, %ecx
callq 0x21cdc
leaq 0x1dce8(%rip), %rax     # 0x3fc08
movq %rax, (%rbx)
movq %r14, 0x10(%rbx)
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
leaq 0x1dd31(%rip), %rax     # 0x3fc68
movq %rax, (%rbx)
leaq 0x18(%rbx), %rax
movq %rax, 0x20(%rbx)
movq %rax, -0x38(%rbp)
movq %rax, 0x18(%rbx)
movq $0x0, 0x28(%rbx)
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2b798
leaq -0x2c(%rbp), %rsi
movq %r15, %rdi
callq 0x2b7e4
movl %eax, %r12d
movzwl %ax, %r14d
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
movl %r14d, %eax
shll $0x18, %eax
cmpl $0x1000000, %eax        # imm = 0x1000000
jne 0x21fd9
movzwl 0x8(%rbx), %eax
movzwl 0xa(%rbx), %ecx
addw (%r15), %ax
addw 0x2(%r15), %cx
movswl %ax, %esi
movswl %cx, %edx
leaq -0x2c(%rbp), %rdi
callq 0x2b798
movl $0x18, %edi
callq 0x43e0
leaq -0x2c(%rbp), %r15
movl (%r15), %ecx
movl %ecx, 0x10(%rax)
movq %rax, %rdi
movq -0x38(%rbp), %rsi
callq 0x4060
incq 0x28(%rbx)
movq %r15, %rdi
callq 0x2b7a6
jmp 0x220bb
movl %eax, %edi
movsbl %r14b, %eax
movswl 0x2(%r15), %edx
movl %edx, %esi
movswl (%r15), %ecx
addl %eax, %esi
jne 0x21ff3
addl %r12d, %ecx
jmp 0x2201a
cmpl %ecx, %eax
jne 0x21fff
leal (%r12,%r12,2), %ecx
addl %ecx, %edx
jmp 0x22009
cmpl %edx, %eax
jne 0x2200d
leal (%r12,%r12,4), %edx
subl %ecx, %edx
movl %edx, %ecx
jmp 0x2201a
leal (,%r12,8), %ecx
subl %r12d, %ecx
subl %edx, %ecx
sarl $0x17, %edi
movl %edi, -0x3c(%rbp)
testl %edi, %edi
jle 0x220bb
movslq %eax, %rdx
leaq 0x110ee(%rip), %rsi     # 0x33120
movslq -0x8(%rsi,%rdx,4), %r14
leaq (%rsi,%r14), %rdx
movq %rdx, -0x48(%rbp)
movsbl %cl, %r13d
imull %eax, %r13d
addl %r13d, %r13d
xorl %r12d, %r12d
leaq -0x2c(%rbp), %r15
leal (%r12,%r13), %eax
cltq
leaq (%r14,%rax), %rcx
leaq 0x110be(%rip), %rdx     # 0x33120
movsbl (%rdx,%rcx), %ecx
addw 0x8(%rbx), %cx
movq -0x48(%rbp), %rdx
movsbl 0x1(%rdx,%rax), %eax
addw 0xa(%rbx), %ax
movswl %ax, %edx
movswl %cx, %esi
movq %r15, %rdi
callq 0x2b798
movl $0x18, %edi
callq 0x43e0
movl -0x2c(%rbp), %ecx
movl %ecx, 0x10(%rax)
movq %rax, %rdi
movq -0x38(%rbp), %rsi
callq 0x4060
incq 0x28(%rbx)
movq %r15, %rdi
callq 0x2b7a6
addb $0x2, %r12b
movsbl %r12b, %r12d
cmpl -0x3c(%rbp), %r12d
jl 0x22051
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2b798
leaq -0x2c(%rbp), %rdi
movl (%rdi), %eax
movl %eax, 0x8(%rbx)
callq 0x2b7a6
movb 0x28(%rbx), %al
movb %al, 0x30(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x22108
jmp 0x22103
jmp 0x22103
jmp 0x22108
jmp 0x22103
movq %rax, %r15
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
jmp 0x22125
movq %rax, %r15
jmp 0x22114
movq %rax, %r15
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
movq -0x38(%rbp), %rdi
callq 0x1da22
movq %rbx, %rdi
callq 0x21cfc
movq %r15, %rdi
callq 0x4740
nop