// File: lotuskip[P]yuxtapa/server/map.cpp
// Function: (anonymous namespace)::fill_hc_mainst(std::vector<Coords, std::allocator<Coords>>&, char, short)
void fill_hc_mainst(vector<Coords> &hc, const char num, const short size)
{
	Coords c1, c2;
	// random edge points, not too close to corners
	if(random()%2)
	{
		c1.x = (random()%2)*(size-1);
		c1.y = random()%(size/3)+size/3;
	}
	else
	{
		c1.y = (random()%2)*(size-1);
		c1.x = random()%(size/3)+size/3;
	}
	// Place c2 on another edge:
	if(!(c1.x % (size-1))) // opposite x-wise
	{
		c2.x = (c1.x + size-1)%(2*(size-1));
		c2.y = random()%(size/3)+size/3;
	}
	else // opposite y-wise
	{
		c2.y = (c1.y + size-1)%(2*(size-1));
		c2.x = random()%(size/3)+size/3;
	}
	// If necessary, switch so that c1 is closer to (0,0):
	if(c1.dist_walk(Coords(0,0)) > c2.dist_walk(Coords(0,0)))
	{
		Coords tmp = c1;
		c1 = c2;
		c2 = tmp;
	}
	// The directional vector of the "street":
	Coords v(c2.x - c1.x, c2.y - c1.y);
	// The normal of the directional vector, shrunk:
	Coords p(-v.y, v.x);
	float len = p.dist_eucl(Coords(0,0));
	p.x = p.x*2*MAX_HS/(3*len);
	p.y = p.y*2*MAX_HS/(3*len);
	// Determine step (how far "down the street" the next houses are):
	v.x /= num+1;
	if(v.x > 3*MAX_HS/2)
		v.x = 3*MAX_HS/2;
	v.y /= num+1;
	if(v.y > 3*MAX_HS/2)
		v.y = 3*MAX_HS/2;
	// Place the coords:
	for(char i = 0; i < num; i += 2)
	{
		hc[i].x = c1.x + (i+1)*v.x + p.x;
		hc[i].y = c1.y + (i+1)*v.y + p.y;
		if(i+1 < num)
		{
			hc[i+1].x = c1.x + (i+1)*v.x - p.x;
			hc[i+1].y = c1.y + (i+1)*v.y - p.y;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movw %dx, %ax
movb %sil, %cl
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
movw %ax, -0xc(%rbp)
leaq -0x10(%rbp), %rdi
xorl %edx, %edx
movl %edx, -0x48(%rbp)
movl %edx, %esi
callq 0x60430
movl -0x48(%rbp), %edx
leaq -0x14(%rbp), %rdi
movl %edx, %esi
callq 0x60430
jmp 0x2d96c
callq 0x5270
movl $0x2, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
je 0x2d9fa
callq 0x5270
movl $0x2, %ecx
cqto
idivq %rcx
movswl -0xc(%rbp), %eax
subl $0x1, %eax
cltq
imulq %rax, %rdx
movw %dx, %ax
movw %ax, -0x10(%rbp)
callq 0x5270
movq %rax, -0x58(%rbp)
movswl -0xc(%rbp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x58(%rbp), %rax
movslq %ecx, %rcx
cqto
idivq %rcx
movq %rdx, -0x50(%rbp)
movswl -0xc(%rbp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movq -0x50(%rbp), %rdx
cltq
addq %rax, %rdx
movw %dx, %ax
movw %ax, -0xe(%rbp)
jmp 0x2da60
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x2dee7
callq 0x5270
movl $0x2, %ecx
cqto
idivq %rcx
movswl -0xc(%rbp), %eax
subl $0x1, %eax
cltq
imulq %rax, %rdx
movw %dx, %ax
movw %ax, -0xe(%rbp)
callq 0x5270
movq %rax, -0x68(%rbp)
movswl -0xc(%rbp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x68(%rbp), %rax
movslq %ecx, %rcx
cqto
idivq %rcx
movq %rdx, -0x60(%rbp)
movswl -0xc(%rbp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movq -0x60(%rbp), %rdx
cltq
addq %rax, %rdx
movw %dx, %ax
movw %ax, -0x10(%rbp)
movswl -0x10(%rbp), %eax
movswl -0xc(%rbp), %ecx
subl $0x1, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x2dad8
movswl -0x10(%rbp), %eax
movswl -0xc(%rbp), %ecx
addl %ecx, %eax
subl $0x1, %eax
movswl -0xc(%rbp), %ecx
subl $0x1, %ecx
shll %ecx
cltd
idivl %ecx
movw %dx, %ax
movw %ax, -0x14(%rbp)
callq 0x5270
movq %rax, -0x78(%rbp)
movswl -0xc(%rbp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x78(%rbp), %rax
movslq %ecx, %rcx
cqto
idivq %rcx
movq %rdx, -0x70(%rbp)
movswl -0xc(%rbp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movq -0x70(%rbp), %rdx
cltq
addq %rax, %rdx
movw %dx, %ax
movw %ax, -0x12(%rbp)
jmp 0x2db41
movswl -0xe(%rbp), %eax
movswl -0xc(%rbp), %ecx
addl %ecx, %eax
subl $0x1, %eax
movswl -0xc(%rbp), %ecx
subl $0x1, %ecx
shll %ecx
cltd
idivl %ecx
movw %dx, %ax
movw %ax, -0x12(%rbp)
callq 0x5270
movq %rax, -0x88(%rbp)
movswl -0xc(%rbp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x88(%rbp), %rax
movslq %ecx, %rcx
cqto
idivq %rcx
movq %rdx, -0x80(%rbp)
movswl -0xc(%rbp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movq -0x80(%rbp), %rdx
cltq
addq %rax, %rdx
movw %dx, %ax
movw %ax, -0x14(%rbp)
leaq -0x28(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x60430
jmp 0x2db50
leaq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x604f0
movw %ax, -0x8a(%rbp)
jmp 0x2db66
movw -0x8a(%rbp), %ax
cwtl
movl %eax, -0x90(%rbp)
leaq -0x2c(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x60430
jmp 0x2db83
leaq -0x14(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x604f0
movw %ax, -0x92(%rbp)
jmp 0x2db99
movw -0x92(%rbp), %ax
cwtl
movl %eax, -0x98(%rbp)
leaq -0x2c(%rbp), %rdi
callq 0x60460
leaq -0x28(%rbp), %rdi
callq 0x60460
movl -0x98(%rbp), %ecx
movl -0x90(%rbp), %eax
cmpl %ecx, %eax
jle 0x2dc28
movl -0x10(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x14(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x60460
jmp 0x2dc28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x2dede
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x2dc1a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x2c(%rbp), %rdi
callq 0x60460
leaq -0x28(%rbp), %rdi
callq 0x60460
jmp 0x2dede
movzwl -0x14(%rbp), %ecx
movzwl -0x10(%rbp), %eax
subl %eax, %ecx
movzwl -0x12(%rbp), %eax
movzwl -0xe(%rbp), %edx
subl %edx, %eax
movswl %cx, %esi
movswl %ax, %edx
leaq -0x34(%rbp), %rdi
callq 0x60430
jmp 0x2dc4d
movzwl -0x32(%rbp), %eax
negl %eax
movswl -0x34(%rbp), %edx
movswl %ax, %esi
leaq -0x38(%rbp), %rdi
callq 0x60430
jmp 0x2dc65
leaq -0x40(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x60430
jmp 0x2dc74
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x60470
movss %xmm0, -0x9c(%rbp)
jmp 0x2dc8b
leaq -0x40(%rbp), %rdi
callq 0x60460
movss -0x9c(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movswl -0x38(%rbp), %ecx
movl %ecx, %eax
leal (%rax,%rax,8), %edx
movl %edx, %eax
leal (%rax,%rax,2), %eax
addl %ecx, %eax
cvtsi2ss %eax, %xmm0
movss -0x3c(%rbp), %xmm1
movss 0x33e36(%rip), %xmm2    # 0x61af8
mulss %xmm2, %xmm1
divss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, -0x38(%rbp)
movswl -0x36(%rbp), %ecx
movl %ecx, %eax
leal (%rax,%rax,8), %edx
movl %edx, %eax
leal (%rax,%rax,2), %eax
addl %ecx, %eax
cvtsi2ss %eax, %xmm0
movss -0x3c(%rbp), %xmm1
mulss %xmm2, %xmm1
divss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, -0x36(%rbp)
movsbl -0x9(%rbp), %ecx
addl $0x1, %ecx
movswl -0x34(%rbp), %eax
cltd
idivl %ecx
movw %ax, -0x34(%rbp)
movswl -0x34(%rbp), %eax
cmpl $0x15, %eax
jle 0x2dd5a
movw $0x15, -0x34(%rbp)
jmp 0x2dd5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x2ded5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x2decc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x60460
jmp 0x2decc
movsbl -0x9(%rbp), %ecx
addl $0x1, %ecx
movswl -0x32(%rbp), %eax
cltd
idivl %ecx
movw %ax, -0x32(%rbp)
movswl -0x32(%rbp), %eax
cmpl $0x15, %eax
jle 0x2dd7b
movw $0x15, -0x32(%rbp)
movb $0x0, -0x41(%rbp)
movsbl -0x41(%rbp), %eax
movsbl -0x9(%rbp), %ecx
cmpl %ecx, %eax
jge 0x2de9f
movswl -0x10(%rbp), %eax
movsbl -0x41(%rbp), %ecx
addl $0x1, %ecx
movswl -0x34(%rbp), %edx
imull %edx, %ecx
addl %ecx, %eax
movswl -0x38(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0xa0(%rbp)
movq -0x8(%rbp), %rdi
movsbq -0x41(%rbp), %rsi
callq 0x2e610
movw -0xa0(%rbp), %cx
movw %cx, (%rax)
movswl -0xe(%rbp), %eax
movsbl -0x41(%rbp), %ecx
addl $0x1, %ecx
movswl -0x32(%rbp), %edx
imull %edx, %ecx
addl %ecx, %eax
movswl -0x36(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x9e(%rbp)
movq -0x8(%rbp), %rdi
movsbq -0x41(%rbp), %rsi
callq 0x2e610
movw -0x9e(%rbp), %cx
movw %cx, 0x2(%rax)
movsbl -0x41(%rbp), %eax
addl $0x1, %eax
movsbl -0x9(%rbp), %ecx
cmpl %ecx, %eax
jge 0x2de8e
movswl -0x10(%rbp), %eax
movsbl -0x41(%rbp), %ecx
addl $0x1, %ecx
movswl -0x34(%rbp), %edx
imull %edx, %ecx
addl %ecx, %eax
movswl -0x38(%rbp), %ecx
subl %ecx, %eax
movw %ax, -0xa4(%rbp)
movq -0x8(%rbp), %rdi
movsbl -0x41(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x2e610
movw -0xa4(%rbp), %cx
movw %cx, (%rax)
movswl -0xe(%rbp), %eax
movsbl -0x41(%rbp), %ecx
addl $0x1, %ecx
movswl -0x32(%rbp), %edx
imull %edx, %ecx
addl %ecx, %eax
movswl -0x36(%rbp), %ecx
subl %ecx, %eax
movw %ax, -0xa2(%rbp)
movq -0x8(%rbp), %rdi
movsbl -0x41(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x2e610
movw -0xa2(%rbp), %cx
movw %cx, 0x2(%rax)
jmp 0x2de90
movsbl -0x41(%rbp), %eax
addl $0x2, %eax
movb %al, -0x41(%rbp)
jmp 0x2dd7f
leaq -0x38(%rbp), %rdi
callq 0x60460
leaq -0x34(%rbp), %rdi
callq 0x60460
leaq -0x14(%rbp), %rdi
callq 0x60460
leaq -0x10(%rbp), %rdi
callq 0x60460
addq $0xb0, %rsp
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x60460
leaq -0x34(%rbp), %rdi
callq 0x60460
leaq -0x14(%rbp), %rdi
callq 0x60460
leaq -0x10(%rbp), %rdi
callq 0x60460
movq -0x20(%rbp), %rdi
callq 0x5920
nopl (%rax)