// File: Alcaro[P]bridges/game.cpp
// Function: (anonymous namespace)::game_impl::draw_island_fragment_border(int, int, bool, bool, bool, bool, unsigned int)
void draw_island_fragment_border(int x, int y, bool right, bool up, bool left, bool down, uint32_t border)
	{
		if (out.fmt == ifmt_argb8888 || out.fmt == ifmt_bargb8888) border |= 0xFF000000;
		
		int ymul = out.stride/sizeof(uint32_t);
		
		uint32_t* pixels = out.pixels32 + y*ymul + x;
		if (!up)
		{
			int xs = (left ? -11 : 2);
			int xe = (right ? 51 : 38);
			for (int x=xs;x<xe;x++) pixels[ymul*2 + x] = border;
		}
		if (!down)
		{
			int xs = (left ? -11 : 2);
			int xe = (right ? 51 : 38);
			for (int x=xs;x<xe;x++) pixels[ymul*37 + x] = border;
		}
		if (!left)
		{
			int ys = (up ? -11 : 2);
			int ye = (down ? 51 : 38);
			for (int y=ys;y<ye;y++) pixels[y*ymul + 2] = border;
		}
		if (!right)
		{
			int ys = (up ? -11 : 2);
			int ye = (down ? 51 : 38);
			for (int y=ys;y<ye;y++) pixels[y*ymul + 37] = border;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %r9d, -0x64(%rbp)
movl %r8d, -0x60(%rbp)
movl %ecx, %eax
movl -0x64(%rbp), %ecx
movl %edx, %r8d
movl -0x60(%rbp), %edx
movl %r8d, -0x5c(%rbp)
movl %esi, %r8d
movq %rdi, %r9
movl -0x5c(%rbp), %edi
movb %al, %sil
movl 0x18(%rbp), %eax
movb 0x10(%rbp), %al
movq %r9, -0x8(%rbp)
movl %r8d, -0xc(%rbp)
movl %edi, -0x10(%rbp)
andb $0x1, %sil
movb %sil, -0x11(%rbp)
andb $0x1, %dl
movb %dl, -0x12(%rbp)
andb $0x1, %cl
movb %cl, -0x13(%rbp)
andb $0x1, %al
movb %al, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpl $0x5, 0x30(%rax)
je 0x4e029
movq -0x58(%rbp), %rax
cmpl $0x8, 0x30(%rax)
jne 0x4e034
movl 0x18(%rbp), %eax
orl $0xff000000, %eax       # imm = 0xFF000000
movl %eax, 0x18(%rbp)
movq -0x58(%rbp), %rax
movl 0x34(%rax), %ecx
shrq $0x2, %rcx
movl %ecx, -0x18(%rbp)
movq 0x38(%rax), %rax
movl -0x10(%rbp), %ecx
imull -0x18(%rbp), %ecx
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movslq -0xc(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
testb $0x1, -0x12(%rbp)
jne 0x4e0c8
movb -0x13(%rbp), %dl
movl $0x2, %eax
movl $0xfffffff5, %ecx       # imm = 0xFFFFFFF5
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x24(%rbp)
movb -0x11(%rbp), %dl
movl $0x26, %eax
movl $0x33, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x4e0c6
movl 0x18(%rbp), %edx
movq -0x20(%rbp), %rax
movl -0x18(%rbp), %ecx
shll %ecx
addl -0x2c(%rbp), %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x4e09e
jmp 0x4e0c8
testb $0x1, -0x14(%rbp)
jne 0x4e129
movb -0x13(%rbp), %dl
movl $0x2, %eax
movl $0xfffffff5, %ecx       # imm = 0xFFFFFFF5
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x30(%rbp)
movb -0x11(%rbp), %dl
movl $0x26, %eax
movl $0x33, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x34(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x4e127
movl 0x18(%rbp), %edx
movq -0x20(%rbp), %rax
imull $0x25, -0x18(%rbp), %ecx
addl -0x38(%rbp), %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x4e100
jmp 0x4e129
testb $0x1, -0x13(%rbp)
jne 0x4e18d
movb -0x12(%rbp), %dl
movl $0x2, %eax
movl $0xfffffff5, %ecx       # imm = 0xFFFFFFF5
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x3c(%rbp)
movb -0x14(%rbp), %dl
movl $0x26, %eax
movl $0x33, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0x4e18b
movl 0x18(%rbp), %edx
movq -0x20(%rbp), %rax
movl -0x44(%rbp), %ecx
imull -0x18(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x4e161
jmp 0x4e18d
testb $0x1, -0x11(%rbp)
jne 0x4e1f1
movb -0x12(%rbp), %dl
movl $0x2, %eax
movl $0xfffffff5, %ecx       # imm = 0xFFFFFFF5
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x48(%rbp)
movb -0x14(%rbp), %dl
movl $0x26, %eax
movl $0x33, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4c(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x4e1ef
movl 0x18(%rbp), %edx
movq -0x20(%rbp), %rax
movl -0x50(%rbp), %ecx
imull -0x18(%rbp), %ecx
addl $0x25, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x4e1c5
jmp 0x4e1f1
popq %rbp
retq
nopw %cs:(%rax,%rax)