// File: /workspace/github_cpp_makefile_star2_O2/dcx86r[P]rubikon/main.cpp
// Function: main
int main() {
	random_device rd;
	uint_fast32_t seed = rd();
	typedef linear_congruential_engine<uint_fast32_t, 134775813, 1, 4294967296> lce;
	lce rng{seed};
	discrete_distribution<short> color {2,6,6,6,4,2};
	char ph[] = {'+', '@', '#', '$', '%', '&'};	//blue, yellow, green, orange, red, white
	vector<string> str;
	short i, j, k, l;

	for (i = 0; i < 9; ++i) {
		str.push_back(string(3, ph[color(rng)]));
	}

	cout << "/* XPM */\n"
	"static char * rubik_xpm[] = {\n"
	"\"15 15 8 1\",\n"
	"\" 	c None\",\n"
	"\".	c #000000\",\n"
	"\"+	c #0000FF\",\n"
	"\"@	c #FFFF00\",\n"
	"\"#	c #008000\",\n"
	"\"$	c #FFA500\",\n"
	"\"%	c #FF0000\",\n"
	"\"&	c #FFFFFF\",\n"
	"\"               \",\n";

	l = 0;

	for (j = 0; j < 3; ++j) {
		cout << "\" ............. \",\n";
		for (k = 0; k < 3; ++k) {
			cout << "\" ." << str[l] << "."
			<< str[l+1] << "."
			<< str[l+2] << ". \",\n";
		}
		l += 3;
	}
	cout << "\" ............. \",\n"
	"\"               \"};" << endl;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1428, %rsp           # imm = 0x1428
leaq -0x1448(%rbp), %rbx
movq %rbx, %rdi
callq 0x255c
movq %rbx, %rdi
callq 0x2170
movl %eax, %eax
movq %rax, -0x58(%rbp)
movups 0xcf4(%rip), %xmm0      # 0x3038
leaq -0x90(%rbp), %rsi
movaps %xmm0, 0x20(%rsi)
movups 0xcd2(%rip), %xmm0      # 0x3028
movaps %xmm0, 0x10(%rsi)
movups 0xcb7(%rip), %xmm0      # 0x3018
movaps %xmm0, (%rsi)
leaq -0xc0(%rbp), %rdi
pushq $0x6
popq %rdx
callq 0x2746
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rax
andq $0x0, 0x10(%rax)
movaps %xmm0, (%rax)
movw $0x9, %bx
leaq -0x58(%rbp), %r15
leaq 0xcb7(%rip), %r14       # 0x3048
leaq -0x90(%rbp), %r12
pushq $0x3
popq %r13
subw $0x1, %bx
jb 0x23e6
leaq -0xc0(%rbp), %rdi
movq %r15, %rsi
callq 0x25b2
movswq %ax, %rax
movsbl (%rax,%r14), %edx
leaq -0x80(%rbp), %rax
movq %rax, -0x90(%rbp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x2150
leaq -0x50(%rbp), %rdi
movq %r12, %rsi
callq 0x2d18
movq %r12, %rdi
callq 0x2070
jmp 0x239c
movq 0x2beb(%rip), %rdi      # 0x4fd8
leaq 0xc5a(%rip), %rsi       # 0x304e
callq 0x2120
movq $0x0, -0x38(%rbp)
movq 0x2bd0(%rip), %rbx      # 0x4fd8
leaq 0xd13(%rip), %r12       # 0x3122
leaq 0xd04(%rip), %r13       # 0x311a
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
cmpw $0x3, %ax
je 0x24c0
movq %rbx, %rdi
leaq 0xcdd(%rip), %rsi       # 0x310c
callq 0x2120
movw $0x3, %r14w
movq -0x38(%rbp), %r15
shlq $0x5, %r15
subw $0x1, %r14w
jb 0x24b1
movq %rbx, %rdi
leaq 0xcce(%rip), %rsi       # 0x3120
callq 0x2120
movq -0x50(%rbp), %rsi
addq %r15, %rsi
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
movq %r12, %rsi
callq 0x2120
movq -0x50(%rbp), %rcx
leaq (%rcx,%r15), %rsi
addq $0x20, %rsi
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
movq %r12, %rsi
callq 0x2120
movq -0x50(%rbp), %rcx
leaq (%rcx,%r15), %rsi
addq $0x40, %rsi
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
movq %r13, %rsi
callq 0x2120
jmp 0x2441
addq $0x3, -0x38(%rbp)
movl -0x2c(%rbp), %eax
incl %eax
jmp 0x2418
movq 0x2b11(%rip), %rdi      # 0x4fd8
leaq 0xc56(%rip), %rsi       # 0x3124
callq 0x2120
movq %rax, %rdi
callq 0x2080
leaq -0x50(%rbp), %rdi
callq 0x25c0
leaq -0xc0(%rbp), %rdi
callq 0x26e8
leaq -0x1448(%rbp), %rdi
callq 0x25ec
xorl %eax, %eax
addq $0x1428, %rsp           # imm = 0x1428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2512
movq %rax, %rbx
jmp 0x2548
jmp 0x2530
jmp 0x2530
jmp 0x2530
jmp 0x2530
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x2070
jmp 0x2533
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x25c0
leaq -0xc0(%rbp), %rdi
callq 0x26e8
leaq -0x1448(%rbp), %rdi
callq 0x25ec
movq %rbx, %rdi
callq 0x21b0