// File: /workspace/github_cpp_makefile_star2_O1/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 0x21f4c
leaq 0x1d8e0(%rip), %rax     # 0x3fa70
movq %rax, (%rbx)
movq %r14, 0x10(%rbx)
leaq -0x2c(%rbp), %rdi
callq 0x2bbf6
leaq 0x1dae1(%rip), %rax     # 0x3fc88
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 0x2bbe8
leaq -0x2c(%rbp), %rsi
movq %r15, %rdi
callq 0x2bc42
movl %eax, %r12d
movzwl %ax, %r14d
leaq -0x2c(%rbp), %rdi
callq 0x2bbf6
movl %r14d, %eax
shll $0x18, %eax
cmpl $0x1000000, %eax        # imm = 0x1000000
jne 0x22249
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 0x2bbe8
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 0x2bbf6
jmp 0x2232b
movl %eax, %edi
movsbl %r14b, %eax
movswl 0x2(%r15), %edx
movl %edx, %esi
movswl (%r15), %ecx
addl %eax, %esi
jne 0x22263
addl %r12d, %ecx
jmp 0x2228a
cmpl %ecx, %eax
jne 0x2226f
leal (%r12,%r12,2), %ecx
addl %ecx, %edx
jmp 0x22279
cmpl %edx, %eax
jne 0x2227d
leal (%r12,%r12,4), %edx
subl %ecx, %edx
movl %edx, %ecx
jmp 0x2228a
leal (,%r12,8), %ecx
subl %r12d, %ecx
subl %edx, %ecx
sarl $0x17, %edi
movl %edi, -0x3c(%rbp)
testl %edi, %edi
jle 0x2232b
movslq %eax, %rdx
leaq 0x10e8e(%rip), %rsi     # 0x33130
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 0x10e5e(%rip), %rdx     # 0x33130
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 0x2bbe8
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 0x2bbf6
addb $0x2, %r12b
movsbl %r12b, %r12d
cmpl -0x3c(%rbp), %r12d
jl 0x222c1
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2bbe8
leaq -0x2c(%rbp), %rdi
movl (%rdi), %eax
movl %eax, 0x8(%rbx)
callq 0x2bbf6
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 0x22378
jmp 0x22373
jmp 0x22373
jmp 0x22378
jmp 0x22373
movq %rax, %r15
leaq -0x2c(%rbp), %rdi
callq 0x2bbf6
jmp 0x22395
movq %rax, %r15
jmp 0x22384
movq %rax, %r15
leaq -0x2c(%rbp), %rdi
callq 0x2bbf6
movq -0x38(%rbp), %rdi
callq 0x1dbd2
movq %rbx, %rdi
callq 0x21f6c
movq %r15, %rdi
callq 0x4750
nop