// File: /workspace/github_cpp_makefile_star2_O2/MarkCBell[P]twister/./twister/kernel/parsing.cpp
// Function: nicen_command(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void nicen_command(std::string &command)
{
	command = separator + remove_whitespace(command) + separator;
	find_and_replace(command, "(", separator + "(" + separator);
	find_and_replace(command, ")", separator + ")" + separator);
	find_and_replace(command, ")" + separator + "^", ")^");
	find_and_replace(command, drill, separator + drill);
	
	size_t marker = 0;
	for (find_next_substring(command, ")", marker); marker != 0; find_next_substring(command, ")", marker))
		if (command.substr(marker,1) != "^")
			command.replace(marker, 0, "^1");
	
	for (find_next_substring(command, "^", marker); marker != 0; find_next_substring(command, "^", marker))
	{
		if ((! isdigit(command[marker])) && (command[marker] != '-'))
			output_error("In commands ^ must be followed by an integer power.");
		if (command.substr(marker-2,1) != ")")
			output_error("Substrings of a command must be enclosed in ( ) to raise them to a power.");
	}
	
	for (find_next_substring(command, drill, marker); marker != 0; find_next_substring(command, drill, marker))
		if (valid_arc_name_characters.find(command[marker]) == std::string::npos)
			output_error("In commands ! must be followed by a curve to drill.");
	
	int c = 0;
	for (find_next_substring(command, "()", marker); marker != 0; find_next_substring(command, "()", marker))
	{
		if (command.substr(marker-1,1) == "(") c++;
		if (command.substr(marker-1,1) == ")") c--;
		if (c < 0) output_error("Unbalanced braces.");
	}
	if (c != 0) output_error("Unbalanced braces.");
	
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq %rdi, %rbx
leaq 0x188(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32e0
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x81d5
leaq 0x10fd0(%rip), %rsi     # 0x194f8
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x9c2d
leaq 0x10fba(%rip), %rdx     # 0x194f8
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x6703
leaq 0x28(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x32a0
movq %r14, %rdi
callq 0x3458
leaq 0x8(%rsp), %rdi
callq 0x3458
leaq 0x48(%rsp), %rdi
callq 0x3458
leaq 0x188(%rsp), %rdi
callq 0x3458
leaq 0x8ddb(%rip), %rsi      # 0x11368
leaq 0x28(%rsp), %rdi
leaq 0x3(%rsp), %rdx
callq 0x3e82
leaq 0x10f55(%rip), %rsi     # 0x194f8
leaq 0x8dbe(%rip), %rdx      # 0x11368
leaq 0x48(%rsp), %rdi
callq 0x658d
leaq 0x10f3d(%rip), %rdx     # 0x194f8
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x6703
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x844e
leaq 0x8(%rsp), %rdi
callq 0x3458
leaq 0x48(%rsp), %rdi
callq 0x3458
leaq 0x28(%rsp), %rdi
callq 0x3458
leaq 0x9323(%rip), %rsi      # 0x11924
leaq 0x28(%rsp), %rdi
leaq 0x3(%rsp), %rdx
callq 0x3e82
leaq 0x10ee1(%rip), %rsi     # 0x194f8
leaq 0x9306(%rip), %rdx      # 0x11924
leaq 0x48(%rsp), %rdi
callq 0x658d
leaq 0x10ec9(%rip), %rdx     # 0x194f8
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x6703
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x844e
leaq 0x8(%rsp), %rdi
callq 0x3458
leaq 0x48(%rsp), %rdi
callq 0x3458
leaq 0x28(%rsp), %rdi
callq 0x3458
leaq 0x92af(%rip), %rsi      # 0x11924
leaq 0x10e7c(%rip), %rdx     # 0x194f8
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x3ebd
leaq 0x8cdb(%rip), %rdx      # 0x1136b
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x3f33
leaq 0x8cc6(%rip), %rsi      # 0x1136a
leaq 0x48(%rsp), %rdi
leaq 0x3(%rsp), %rdx
callq 0x3e82
leaq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rdx
movq %rbx, %rdi
callq 0x844e
leaq 0x48(%rsp), %rdi
callq 0x3458
leaq 0x28(%rsp), %rdi
callq 0x3458
leaq 0x8(%rsp), %rdi
callq 0x3458
leaq 0x10e0e(%rip), %rsi     # 0x194f8
leaq 0x10e27(%rip), %r14     # 0x19518
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x9c51
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x844e
leaq 0x28(%rsp), %rdi
callq 0x3458
andq $0x0, 0x8(%rsp)
leaq 0x168(%rsp), %rdi
movq %rbx, %rsi
callq 0x32e0
leaq 0x91ee(%rip), %rsi      # 0x11924
leaq 0xc8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x3e82
leaq 0x368(%rsp), %rdi
leaq 0x168(%rsp), %rbp
leaq 0xc8(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rbp, %rsi
callq 0x8133
leaq 0x368(%rsp), %rdi
callq 0x3458
leaq 0xc8(%rsp), %rdi
callq 0x3458
leaq 0x28(%rsp), %r14
leaq 0x328(%rsp), %r15
leaq 0x408(%rsp), %r13
movq %rbp, %rdi
callq 0x3458
movq 0x8(%rsp), %rbp
testq %rbp, %rbp
je 0x8843
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
pushq $0x1
popq %rcx
callq 0x3260
movq %r14, %rdi
leaq 0x8b9e(%rip), %rsi      # 0x1136b
callq 0x62e5
movl %eax, %r12d
movq %r14, %rdi
callq 0x3458
testb %r12b, %r12b
je 0x87f6
movq %rbx, %rdi
movq %rbp, %rsi
xorl %edx, %edx
leaq 0x8b7c(%rip), %rcx      # 0x1136d
callq 0x3180
leaq 0x348(%rsp), %rbp
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x32e0
movq %r15, %rdi
leaq 0x9111(%rip), %rsi      # 0x11924
movq %r14, %rdx
callq 0x3e82
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
leaq 0x8(%rsp), %rcx
callq 0x8133
movq %r13, %rdi
callq 0x3458
movq %r15, %rdi
callq 0x3458
jmp 0x879c
leaq 0x148(%rsp), %rdi
movq %rbx, %rsi
callq 0x32e0
leaq 0x8b11(%rip), %rsi      # 0x1136b
leaq 0xa8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x3e82
leaq 0x308(%rsp), %rdi
leaq 0x148(%rsp), %rbp
leaq 0xa8(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rbp, %rsi
callq 0x8133
leaq 0x308(%rsp), %rdi
callq 0x3458
leaq 0xa8(%rsp), %rdi
callq 0x3458
leaq 0x28(%rsp), %r14
leaq 0x2a8(%rsp), %r13
leaq 0x288(%rsp), %r12
movq %rbp, %rdi
callq 0x3458
movq 0x8(%rsp), %rbp
testq %rbp, %rbp
je 0x89c7
movq (%rbx), %rax
movsbl (%rax,%rbp), %eax
cmpl $0x2d, %eax
sete %cl
addl $-0x30, %eax
cmpl $0xa, %eax
setb %al
orb %cl, %al
jne 0x891a
leaq 0x2e8(%rsp), %r15
movq %r15, %rdi
leaq 0x8a6e(%rip), %rsi      # 0x11370
movq %r14, %rdx
callq 0x3e82
movq %r15, %rdi
callq 0x3dec
movq %r15, %rdi
callq 0x3458
addq $-0x2, %rbp
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
pushq $0x1
popq %rcx
callq 0x3260
movq %r14, %rdi
leaq 0x8feb(%rip), %rsi      # 0x11924
callq 0x62e5
movl %eax, %ebp
movq %r14, %rdi
callq 0x3458
testb %bpl, %bpl
leaq 0x2c8(%rsp), %rbp
je 0x8977
movq %rbp, %rdi
leaq 0x8a45(%rip), %rsi      # 0x113a4
movq %r14, %rdx
callq 0x3e82
movq %rbp, %rdi
callq 0x3dec
movq %rbp, %rdi
callq 0x3458
movq %r13, %rdi
movq %rbx, %rsi
callq 0x32e0
movq %r12, %rdi
leaq 0x89df(%rip), %rsi      # 0x1136b
movq %r14, %rdx
callq 0x3e82
leaq 0x3e8(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
leaq 0x8(%rsp), %rcx
callq 0x8133
movq %r15, %rdi
callq 0x3458
movq %r12, %rdi
callq 0x3458
movq %r13, %rbp
jmp 0x88c0
leaq 0x128(%rsp), %rdi
movq %rbx, %rsi
callq 0x32e0
leaq 0x10b3a(%rip), %rsi     # 0x19518
leaq 0x108(%rsp), %rdi
callq 0x32e0
leaq 0x3c8(%rsp), %r14
leaq 0x128(%rsp), %rbp
leaq 0x108(%rsp), %r13
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x8133
leaq 0x248(%rsp), %r15
leaq 0x228(%rsp), %r12
movq %r14, %rdi
callq 0x3458
movq %r13, %rdi
callq 0x3458
movq %rbp, %rdi
callq 0x3458
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x8ad3
movq (%rbx), %rcx
movsbl (%rcx,%rax), %esi
leaq 0x10a7e(%rip), %rdi     # 0x194d8
xorl %edx, %edx
callq 0x32d0
cmpq $-0x1, %rax
jne 0x8a93
leaq 0x268(%rsp), %r14
movq %r14, %rdi
leaq 0x8975(%rip), %rsi      # 0x113ee
leaq 0x28(%rsp), %rdx
callq 0x3e82
movq %r14, %rdi
callq 0x3dec
movq %r14, %rdi
callq 0x3458
movq %r15, %rdi
movq %rbx, %rsi
callq 0x32e0
movq %r12, %rdi
leaq 0x10a70(%rip), %rsi     # 0x19518
callq 0x32e0
leaq 0x3a8(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
leaq 0x8(%rsp), %rcx
callq 0x8133
movq %r12, %r13
movq %r15, %rbp
jmp 0x8a26
leaq 0xe8(%rsp), %rdi
movq %rbx, %rsi
callq 0x32e0
leaq 0x8e39(%rip), %rsi      # 0x11923
leaq 0x88(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x3e82
leaq 0x208(%rsp), %rdi
leaq 0xe8(%rsp), %r12
leaq 0x88(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r12, %rsi
callq 0x8133
leaq 0x208(%rsp), %rdi
callq 0x3458
leaq 0x88(%rsp), %rdi
callq 0x3458
movl $0x0, 0x4(%rsp)
leaq 0x28(%rsp), %r14
leaq 0x1e8(%rsp), %r15
movq %r12, %rdi
callq 0x3458
movq 0x8(%rsp), %r12
testq %r12, %r12
je 0x8c56
decq %r12
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
pushq $0x1
popq %rcx
callq 0x3260
movq %r14, %rdi
leaq 0x87e4(%rip), %rsi      # 0x11368
callq 0x631c
movl %eax, %ebp
movq %r14, %rdi
callq 0x3458
movzbl %bpl, %eax
movl 0x4(%rsp), %r13d
addl %eax, %r13d
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
pushq $0x1
popq %rcx
callq 0x3260
movq %r14, %rdi
leaq 0x8d6a(%rip), %rsi      # 0x11924
callq 0x631c
movl %eax, %ebp
movq %r14, %rdi
callq 0x3458
movzbl %bpl, %eax
leaq 0x388(%rsp), %rbp
subl %eax, %r13d
movl %r13d, 0x4(%rsp)
leaq 0x1a8(%rsp), %r13
leaq 0x1c8(%rsp), %r12
jns 0x8c11
movq %r15, %rdi
leaq 0x8829(%rip), %rsi      # 0x11422
movq %r14, %rdx
callq 0x3e82
movq %r15, %rdi
callq 0x3dec
movq %r15, %rdi
callq 0x3458
movq %r12, %rdi
movq %rbx, %rsi
callq 0x32e0
movq %r13, %rdi
leaq 0x8cfd(%rip), %rsi      # 0x11923
movq %r14, %rdx
callq 0x3e82
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
leaq 0x8(%rsp), %rcx
callq 0x8133
movq %rbp, %rdi
callq 0x3458
movq %r13, %rdi
callq 0x3458
jmp 0x8b50
cmpl $0x0, 0x4(%rsp)
je 0x8c87
leaq 0x87be(%rip), %rsi      # 0x11422
leaq 0x68(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x3e82
leaq 0x68(%rsp), %rdi
callq 0x3dec
leaq 0x68(%rsp), %rdi
callq 0x3458
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x8e8b
jmp 0x8dec
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x3458
jmp 0x8cc0
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
jmp 0x8e8b
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x3458
jmp 0x8ce2
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
jmp 0x8e8b
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x3458
jmp 0x8d04
movq %rax, %rbx
leaq 0x148(%rsp), %rdi
jmp 0x8e8b
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x3458
jmp 0x8d26
movq %rax, %rbx
leaq 0x168(%rsp), %rdi
jmp 0x8e8b
jmp 0x8d89
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x3458
jmp 0x8d47
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3458
jmp 0x8d56
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x8e8b
jmp 0x8d6b
jmp 0x8d7a
jmp 0x8d89
jmp 0x8dec
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3458
jmp 0x8d7d
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x3458
jmp 0x8d8c
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x8e8b
jmp 0x8dec
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3458
jmp 0x8daa
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x3458
jmp 0x8db9
movq %rax, %rbx
leaq 0x188(%rsp), %rdi
jmp 0x8e8b
movq %rax, %rbx
leaq 0x1e8(%rsp), %rdi
jmp 0x8e8b
jmp 0x8dec
movq %rax, %rbx
leaq 0x268(%rsp), %rdi
jmp 0x8e8b
jmp 0x8dec
jmp 0x8dec
movq %rax, %rbx
jmp 0x8e90
movq %rax, %rbx
leaq 0x2e8(%rsp), %rdi
jmp 0x8e8b
movq %rax, %rbx
leaq 0x2c8(%rsp), %rdi
jmp 0x8e8b
movq %rax, %rbx
jmp 0x8e26
movq %rax, %rbx
leaq 0x1a8(%rsp), %rdi
callq 0x3458
leaq 0x1c8(%rsp), %rdi
jmp 0x8e8b
movq %rax, %rbx
jmp 0x8e45
movq %rax, %rbx
leaq 0x228(%rsp), %rdi
callq 0x3458
leaq 0x248(%rsp), %rdi
jmp 0x8e8b
movq %rax, %rbx
jmp 0x8e64
movq %rax, %rbx
leaq 0x288(%rsp), %rdi
callq 0x3458
leaq 0x2a8(%rsp), %rdi
jmp 0x8e8b
movq %rax, %rbx
jmp 0x8e83
movq %rax, %rbx
leaq 0x328(%rsp), %rdi
callq 0x3458
leaq 0x348(%rsp), %rdi
callq 0x3458
movq %rbx, %rdi
callq 0x33d0