// File: lotuskip[P]yuxtapa/server/map.cpp
// Function: Map::fix_boundary()
void Map::fix_boundary()
{
	rowit rit = data.begin();
	vector<Tile>::iterator it;
	for(it = rit->begin(); it != rit->end(); ++it)
	{
		*it = T_WALL;
		it->flags |= TF_NODIG;
	}
	rit = data.begin()+mapsize-1;
	for(it = rit->begin(); it != rit->end(); ++it)
	{
		*it = T_WALL;
		it->flags |= TF_NODIG;
	}
	for(rit = data.begin(); rit != data.end(); ++rit)
	{
		(*rit)[0] = (*rit)[mapsize-1] = T_WALL;
		(*rit)[0].flags |= TF_NODIG;
		(*rit)[mapsize-1].flags |= TF_NODIG;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x68(%rbp)
addq $0x8, %rdi
callq 0x2ebb0
movq %rax, -0x10(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x2ebe0
leaq -0x10(%rbp), %rdi
callq 0x2ec00
movq %rax, %rdi
callq 0x2ec20
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x2ec00
movq %rax, %rdi
callq 0x2ec90
movq %rax, -0x28(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x2ec50
testb $0x1, %al
jne 0x2b6bf
jmp 0x2b6f0
leaq -0x18(%rbp), %rdi
callq 0x2ecc0
movl 0x36706(%rip), %ecx     # 0x61dd4
movl %ecx, (%rax)
leaq -0x18(%rbp), %rdi
callq 0x2ece0
movzwl (%rax), %ecx
orl $0x1000, %ecx           # imm = 0x1000
movw %cx, (%rax)
leaq -0x18(%rbp), %rdi
callq 0x2ed00
jmp 0x2b697
movq -0x68(%rbp), %rdi
addq $0x8, %rdi
callq 0x2ebb0
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x40(%rbp)
movswq (%rax), %rsi
leaq -0x40(%rbp), %rdi
callq 0x2ed20
movq %rax, -0x38(%rbp)
leaq -0x38(%rbp), %rdi
movl $0x1, %esi
callq 0x2ed60
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x2ec00
movq %rax, %rdi
callq 0x2ec20
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x2ec00
movq %rax, %rdi
callq 0x2ec90
movq %rax, -0x50(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x2ec50
testb $0x1, %al
jne 0x2b778
jmp 0x2b7a9
leaq -0x18(%rbp), %rdi
callq 0x2ecc0
movl 0x3664d(%rip), %ecx     # 0x61dd4
movl %ecx, (%rax)
leaq -0x18(%rbp), %rdi
callq 0x2ece0
movzwl (%rax), %ecx
orl $0x1000, %ecx           # imm = 0x1000
movw %cx, (%rax)
leaq -0x18(%rbp), %rdi
callq 0x2ed00
jmp 0x2b750
movq -0x68(%rbp), %rdi
addq $0x8, %rdi
callq 0x2ebb0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x68(%rbp), %rdi
addq $0x8, %rdi
callq 0x2ede0
movq %rax, -0x60(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x2eda0
testb $0x1, %al
jne 0x2b7e9
jmp 0x2b889
leaq -0x10(%rbp), %rdi
callq 0x2ee10
movq %rax, %rdi
movq -0x68(%rbp), %rax
movswl (%rax), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x2e6c0
movq %rax, -0x70(%rbp)
movl 0x365c3(%rip), %ecx     # 0x61dd4
movl %ecx, (%rax)
leaq -0x10(%rbp), %rdi
callq 0x2ee10
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2e6c0
movq -0x70(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, (%rax)
leaq -0x10(%rbp), %rdi
callq 0x2ee10
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2e6c0
movzwl (%rax), %ecx
orl $0x1000, %ecx           # imm = 0x1000
movw %cx, (%rax)
leaq -0x10(%rbp), %rdi
callq 0x2ee10
movq %rax, %rdi
movq -0x68(%rbp), %rax
movswl (%rax), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x2e6c0
movzwl (%rax), %ecx
orl $0x1000, %ecx           # imm = 0x1000
movw %cx, (%rax)
leaq -0x10(%rbp), %rdi
callq 0x2ee30
jmp 0x2b7c2
addq $0x70, %rsp
popq %rbp
retq
nop