// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r15d
movl %esi, %ebx
movq %rdi, %r14
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2bbe8
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2bbe8
callq 0x41d0
movq %rax, %r12
callq 0x41d0
movq %rax, %rcx
shrq $0x3f, %rcx
addl %eax, %ecx
andl $0xfffe, %ecx           # imm = 0xFFFE
subl %ecx, %eax
movswl %r15w, %ecx
leal -0x1(%rcx), %r13d
imull %r13d, %eax
movslq %ecx, %r15
testb $0x1, %r12b
jne 0x1828d
movw %ax, -0x2e(%rbp)
callq 0x41d0
imulq $0x55555556, %r15, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
movslq %ecx, %rcx
cqto
idivq %rcx
addl %edx, %ecx
movw %cx, -0x30(%rbp)
jmp 0x182b8
movw %ax, -0x30(%rbp)
callq 0x41d0
imulq $0x55555556, %r15, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
movslq %ecx, %rcx
cqto
idivq %rcx
addl %edx, %ecx
movw %cx, -0x2e(%rbp)
movswl -0x30(%rbp), %ecx
movl %ecx, %eax
cltd
idivl %r13d
testl %edx, %edx
je 0x18303
movswl -0x2e(%rbp), %eax
addl %r15d, %eax
decl %eax
addl %r13d, %r13d
cltd
idivl %r13d
movw %dx, -0x36(%rbp)
callq 0x41d0
imulq $0x55555556, %r15, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
movslq %ecx, %rcx
cqto
idivq %rcx
addl %edx, %ecx
movw %cx, -0x38(%rbp)
jmp 0x1833b
leal (%r15,%rcx), %eax
decl %eax
addl %r13d, %r13d
cltd
idivl %r13d
movw %dx, -0x38(%rbp)
callq 0x41d0
imulq $0x55555556, %r15, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
movslq %ecx, %rcx
cqto
idivq %rcx
addl %edx, %ecx
movw %cx, -0x36(%rbp)
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2bbe8
leaq -0x30(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x2bc42
movl %eax, %r15d
leaq -0x34(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2bbe8
leaq -0x38(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x2bc42
movl %eax, %r12d
leaq -0x34(%rbp), %rdi
callq 0x2bbf6
leaq -0x2c(%rbp), %rdi
callq 0x2bbf6
cmpw %r12w, %r15w
jle 0x183a4
movl -0x30(%rbp), %eax
leaq -0x2c(%rbp), %rdi
movl %eax, (%rdi)
movl -0x38(%rbp), %ecx
movl %ecx, -0x30(%rbp)
movl %eax, -0x38(%rbp)
callq 0x2bbf6
movzwl -0x38(%rbp), %eax
movzwl -0x36(%rbp), %ecx
subw -0x30(%rbp), %ax
subw -0x2e(%rbp), %cx
movswl %ax, %esi
movswl %cx, %edx
leaq -0x2c(%rbp), %rdi
callq 0x2bbe8
xorl %eax, %eax
subw -0x2a(%rbp), %ax
movswl -0x2c(%rbp), %edx
movswl %ax, %esi
leaq -0x34(%rbp), %rdi
callq 0x2bbe8
leaq -0x3c(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2bbe8
leaq -0x34(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0x2bbfc
movss %xmm0, -0x40(%rbp)
leaq -0x3c(%rbp), %rdi
callq 0x2bbf6
movswl -0x34(%rbp), %eax
leal (%rax,%rax,8), %ecx
leal (%rcx,%rcx,2), %ecx
addl %eax, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss -0x40(%rbp), %xmm1
mulss 0x146cf(%rip), %xmm1    # 0x2caf0
divss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, -0x34(%rbp)
movswl -0x32(%rbp), %eax
leal (%rax,%rax,8), %ecx
leal (%rcx,%rcx,2), %ecx
addl %eax, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
divss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, -0x32(%rbp)
movsbl %bl, %ecx
leal 0x1(%rcx), %esi
movswl -0x2c(%rbp), %eax
cltd
idivl %esi
cmpw $0x15, %ax
movl $0x15, %edi
cmovgel %edi, %eax
movw %ax, -0x2c(%rbp)
movswl -0x2a(%rbp), %eax
cltd
idivl %esi
cmpw $0x15, %ax
cmovll %eax, %edi
movw %di, -0x2a(%rbp)
testb %cl, %cl
jle 0x184f1
movq (%r14), %rax
movzbl %bl, %ecx
movl $0x1, %edx
movzwl -0x2c(%rbp), %esi
imulw %dx, %si
addw -0x30(%rbp), %si
addw -0x34(%rbp), %si
movw %si, -0x4(%rax,%rdx,4)
movzwl -0x2a(%rbp), %esi
imulw %dx, %si
addw -0x2e(%rbp), %si
addw -0x32(%rbp), %si
movw %si, -0x2(%rax,%rdx,4)
cmpq %rcx, %rdx
jae 0x184e2
movzwl -0x2c(%rbp), %esi
imulw %dx, %si
addw -0x30(%rbp), %si
subw -0x34(%rbp), %si
movw %si, (%rax,%rdx,4)
movzwl -0x2a(%rbp), %esi
imulw %dx, %si
addw -0x2e(%rbp), %si
subw -0x32(%rbp), %si
movw %si, 0x2(%rax,%rdx,4)
leaq 0x2(%rdx), %rsi
incq %rdx
cmpq %rcx, %rdx
movq %rsi, %rdx
jb 0x1848a
leaq -0x34(%rbp), %rdi
callq 0x2bbf6
leaq -0x2c(%rbp), %rdi
callq 0x2bbf6
leaq -0x38(%rbp), %rdi
callq 0x2bbf6
leaq -0x30(%rbp), %rdi
callq 0x2bbf6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x3c(%rbp), %rdi
callq 0x2bbf6
jmp 0x1853b
jmp 0x18538
jmp 0x18548
jmp 0x18556
movq %rax, %rbx
leaq -0x34(%rbp), %rdi
callq 0x2bbf6
jmp 0x1854b
jmp 0x18548
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
callq 0x2bbf6
jmp 0x18559
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x2bbf6
leaq -0x30(%rbp), %rdi
callq 0x2bbf6
movq %rbx, %rdi
callq 0x4750
movq %rax, %rbx
jmp 0x18562