// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: pretty_print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void pretty_print(std::string s)
{
	attron(COLOR_PAIR(COLOR_WHITE));
	int current_line = 0;
	std::string line_so_far = "";
	std::string word_so_far = "";
	for(unsigned int i = 0; i<s.length();i++)
	{
		
		if(i == s.length()-1)
		{
			word_so_far += s[i];
			if(line_so_far.length() + word_so_far.length()+1 > viewport_width)
			{
				mvaddstr(current_line,0,(line_so_far+std::string(viewport_width-line_so_far.length(),' ')).c_str());
				mvaddstr(current_line+1,0,(word_so_far+std::string(viewport_width-word_so_far.length(),' ')).c_str());
				return;
			}
			else
			{
				line_so_far += " " + word_so_far;
				mvaddstr(current_line,0,(line_so_far+std::string(viewport_width-line_so_far.length(),' ')).c_str());
				return;
			}
		}
		else if(word_so_far.length() == viewport_width-1)
		{
			if(line_so_far.length())
			{
			mvaddstr(current_line,0,(line_so_far+std::string(viewport_width-line_so_far.length(),' ')).c_str());
			current_line++;
			line_so_far = "";
			}
			mvaddstr(current_line,0,(word_so_far + s[i]).c_str());
			current_line++;
			word_so_far = "";
		}
		else if(s[i] == ' ')
		{
			if(line_so_far.length() + word_so_far.length()+1 > viewport_width)
			{
				mvaddstr(current_line,0,(line_so_far+std::string(viewport_width-line_so_far.length(),' ')).c_str());
				line_so_far = word_so_far;
				word_so_far = "";
				current_line++;
			}
			else
			{
				line_so_far += " " + word_so_far;
				word_so_far = "";
			}
		}
		else if(s[i] == '\n')
		{
			if(line_so_far.length() + word_so_far.length() +1> viewport_width)
			{
				mvaddstr(current_line,0,(line_so_far+std::string(viewport_width-line_so_far.length(),' ')).c_str());
				line_so_far = word_so_far;
				word_so_far = "";
			}
			else
			{
				line_so_far += word_so_far;
				word_so_far = "";
				mvaddstr(current_line,0,(line_so_far+std::string(viewport_width-line_so_far.length(),' ')).c_str());
			}
			current_line++;
		}
		else
		{
			word_so_far += s[i];
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %r15
movq 0x17c82(%rip), %rax     # 0x1dfd8
movq (%rax), %rdi
xorl %r14d, %r14d
movl $0x700, %esi            # imm = 0x700
xorl %edx, %edx
callq 0x5150
leaq 0xfd4d(%rip), %rbx      # 0x160bc
leaq 0x48(%rsp), %rdi
leaq 0x68(%rsp), %rdx
movq %rbx, %rsi
callq 0x5110
leaq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %rbx, %rsi
callq 0x5110
leaq 0x68(%rsp), %r13
leaq 0x8(%rsp), %rbp
xorl %r12d, %r12d
movq 0x17c31(%rip), %rbx     # 0x1dfd8
movl %r12d, %r12d
movq 0x8(%r15), %rax
cmpq %r12, %rax
jbe 0x68c0
decq %rax
cmpq %r12, %rax
je 0x6727
movq 0x70(%rsp), %rax
cmpq $0x30, %rax
jne 0x64ca
cmpq $0x0, 0x50(%rsp)
je 0x6469
movq (%rbx), %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x5260
cmpl $-0x1, %eax
je 0x6455
movq (%rbx), %rbx
pushq $0x31
popq %rsi
subq 0x50(%rsp), %rsi
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x28(%rsp), %rbp
movq %rbp, %rdi
pushq $0x20
popq %rdx
callq 0x52a0
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movq %rbp, %rdx
callq 0x10d27
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
pushq $-0x1
popq %rdx
callq 0x50d0
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x5418
leaq 0x28(%rsp), %rdi
callq 0x5418
movq 0x17b83(%rip), %rbx     # 0x1dfd8
leaq 0x48(%rsp), %rdi
leaq 0xfc5b(%rip), %rsi      # 0x160bc
callq 0x53f0
incl %r14d
movq (%rbx), %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x5260
cmpl $-0x1, %eax
je 0x64b0
movq (%rbx), %rbx
movq (%r15), %rax
movsbl (%rax,%r12), %edx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x10cb0
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
pushq $-0x1
popq %rdx
callq 0x50d0
movq %rbp, %rdi
callq 0x5418
movq 0x17b28(%rip), %rbx     # 0x1dfd8
movq %r13, %rdi
leaq 0xfc02(%rip), %rsi      # 0x160bc
callq 0x53f0
incl %r14d
incl %r12d
jmp 0x63a7
movq (%r15), %rcx
movzbl (%rcx,%r12), %ecx
cmpl $0xa, %ecx
je 0x6592
cmpl $0x20, %ecx
jne 0x6640
movq 0x50(%rsp), %rcx
addq %rcx, %rax
addq $-0x31, %rax
cmpq $-0x33, %rax
ja 0x6650
movq (%rbx), %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x5260
cmpl $-0x1, %eax
je 0x6571
movq (%rbx), %rbx
pushq $0x31
popq %rsi
subq 0x50(%rsp), %rsi
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x28(%rsp), %rbp
movq %rbp, %rdi
pushq $0x20
popq %rdx
callq 0x52a0
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movq %rbp, %rdx
callq 0x10d27
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
pushq $-0x1
popq %rdx
callq 0x50d0
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x5418
leaq 0x28(%rsp), %rdi
callq 0x5418
movq 0x17a67(%rip), %rbx     # 0x1dfd8
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x5170
movq %r13, %rdi
leaq 0xfb34(%rip), %rsi      # 0x160bc
callq 0x53f0
jmp 0x64bf
movq 0x50(%rsp), %rcx
addq %rcx, %rax
addq $-0x31, %rax
cmpq $-0x33, %rax
ja 0x668b
movq (%rbx), %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x5260
cmpl $-0x1, %eax
je 0x661f
movq (%rbx), %rbx
pushq $0x31
popq %rsi
subq 0x50(%rsp), %rsi
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x28(%rsp), %rbp
movq %rbp, %rdi
pushq $0x20
popq %rdx
callq 0x52a0
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movq %rbp, %rdx
callq 0x10d27
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
pushq $-0x1
popq %rdx
callq 0x50d0
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x5418
leaq 0x28(%rsp), %rdi
callq 0x5418
movq 0x179b9(%rip), %rbx     # 0x1dfd8
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x5170
movq %r13, %rdi
leaq 0xfa86(%rip), %rsi      # 0x160bc
callq 0x53f0
jmp 0x64bf
movsbl %cl, %esi
movq %r13, %rdi
callq 0x51e0
jmp 0x64c2
movq %rbp, %rdi
leaq 0xfa61(%rip), %rsi      # 0x160bb
movq %r13, %rdx
callq 0x10d4b
leaq 0x48(%rsp), %rdi
movq %rbp, %rsi
callq 0x5400
movq %rbp, %rdi
callq 0x5418
movq %r13, %rdi
leaq 0xfa3b(%rip), %rsi      # 0x160bc
callq 0x53f0
jmp 0x64c2
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x5400
movq %r13, %rdi
leaq 0xfa1a(%rip), %rsi      # 0x160bc
callq 0x53f0
movq (%rbx), %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x5260
cmpl $-0x1, %eax
je 0x64bf
movq (%rbx), %rbx
pushq $0x31
popq %rsi
subq 0x50(%rsp), %rsi
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x28(%rsp), %rbp
movq %rbp, %rdi
pushq $0x20
popq %rdx
callq 0x52a0
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movq %rbp, %rdx
callq 0x10d27
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
pushq $-0x1
popq %rdx
callq 0x50d0
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x5418
leaq 0x28(%rsp), %rdi
callq 0x5418
movq 0x178b6(%rip), %rbx     # 0x1dfd8
jmp 0x64bf
movq (%r15), %rax
movsbl (%rax,%r12), %esi
leaq 0x68(%rsp), %rdi
callq 0x51e0
movq 0x50(%rsp), %rax
movq 0x70(%rsp), %rcx
addq %rcx, %rax
addq $-0x31, %rax
cmpq $-0x33, %rax
ja 0x6827
movq (%rbx), %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x5260
cmpl $-0x1, %eax
je 0x67c5
movq (%rbx), %rbx
pushq $0x31
popq %rsi
subq 0x50(%rsp), %rsi
leaq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
movq %rax, (%rdi)
pushq $0x20
popq %rdx
callq 0x52a0
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x10d27
movq 0x8(%rsp), %rsi
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x50d0
leaq 0x8(%rsp), %rdi
callq 0x5418
leaq 0x28(%rsp), %rdi
callq 0x5418
movq 0x17813(%rip), %rbx     # 0x1dfd8
movq (%rbx), %rdi
incl %r14d
movl %r14d, %esi
xorl %edx, %edx
callq 0x5260
cmpl $-0x1, %eax
je 0x68c0
movq (%rbx), %rbx
pushq $0x31
popq %rsi
subq 0x70(%rsp), %rsi
leaq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
movq %rax, (%rdi)
pushq $0x20
popq %rdx
callq 0x52a0
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x10d27
movq 0x8(%rsp), %rsi
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x50d0
jmp 0x68ac
leaq 0xf88d(%rip), %rsi      # 0x160bb
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x10d4b
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x5400
leaq 0x8(%rsp), %rdi
callq 0x5418
movq (%rbx), %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x5260
cmpl $-0x1, %eax
je 0x68c0
movq (%rbx), %rbx
pushq $0x31
popq %rsi
subq 0x50(%rsp), %rsi
leaq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
movq %rax, (%rdi)
pushq $0x20
popq %rdx
callq 0x52a0
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x10d27
movq 0x8(%rsp), %rsi
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x50d0
leaq 0x8(%rsp), %rdi
callq 0x5418
leaq 0x28(%rsp), %rdi
callq 0x5418
leaq 0x68(%rsp), %rdi
callq 0x5418
leaq 0x48(%rsp), %rdi
callq 0x5418
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6919
jmp 0x6919
jmp 0x6928
jmp 0x6928
jmp 0x6945
jmp 0x6945
jmp 0x6919
jmp 0x6928
jmp 0x6945
jmp 0x6934
jmp 0x6945
jmp 0x6919
jmp 0x6928
jmp 0x6945
jmp 0x6919
jmp 0x6928
jmp 0x6945
jmp 0x6919
jmp 0x6928
jmp 0x6945
movq %rax, %rbx
jmp 0x6952
jmp 0x6945
jmp 0x6934
jmp 0x6945
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5418
jmp 0x692b
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x693c
jmp 0x6945
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5418
jmp 0x6948
jmp 0x6945
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x5418
leaq 0x48(%rsp), %rdi
callq 0x5418
movq %rbx, %rdi
callq 0x53c0