// File: MarkCBell[P]twister/./twister/kernel/parsing.cpp
// Function: format_command(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
void format_command(std::string &command,
	const std::vector<std::string> &annulus_name,
	const std::vector<std::string> &annulus_name_inverse,
	const std::vector<std::string> &rectangle_name,
	const std::vector<std::string> &rectangle_name_inverse,
	const std::vector<std::string> &macro_name,
	const std::vector<std::string> &macro)
{
	// We now combine together all the curve names for formatting.
	std::set<std::string> valid_names;
	valid_names.insert(annulus_name.begin(), annulus_name.end());
	valid_names.insert(annulus_name_inverse.begin(), annulus_name_inverse.end());
	valid_names.insert(rectangle_name.begin(), rectangle_name.end());
	valid_names.insert(rectangle_name_inverse.begin(), rectangle_name_inverse.end());
	valid_names.insert(macro_name.begin(), macro_name.end());
	
	std::vector<std::string> names, inverse_names;
	names.insert(names.end(), annulus_name.begin(), annulus_name.end());
	names.insert(names.end(), annulus_name_inverse.begin(), annulus_name_inverse.end());
	names.insert(names.end(), rectangle_name.begin(), rectangle_name.end());
	names.insert(names.end(), rectangle_name_inverse.begin(), rectangle_name_inverse.end());
	inverse_names.insert(inverse_names.end(), annulus_name_inverse.begin(), annulus_name_inverse.end());
	inverse_names.insert(inverse_names.end(), annulus_name.begin(), annulus_name.end());
	inverse_names.insert(inverse_names.end(), rectangle_name_inverse.begin(), rectangle_name_inverse.end());
	inverse_names.insert(inverse_names.end(), rectangle_name.begin(), rectangle_name.end());
	
	nicen_command(command);
	tokenise_command(command, valid_names);
	replace_macros(command, macro_name, macro);
	expand_brackets(command, names, inverse_names);
	cleanup_command(command);
	
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2c0, %rsp            # imm = 0x2C0
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
leaq -0x60(%rbp), %rdi
movq %rdi, -0x238(%rbp)
callq 0x14ed0
movq -0x10(%rbp), %rdi
callq 0x14f30
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
callq 0x14f60
movq -0x238(%rbp), %rdi
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0x14ef0
jmp 0x14737
movq -0x18(%rbp), %rdi
callq 0x14f30
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rdi
callq 0x14f60
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rsi
movq -0x90(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x14ef0
jmp 0x14770
movq -0x20(%rbp), %rdi
callq 0x14f30
movq %rax, -0x98(%rbp)
movq -0x20(%rbp), %rdi
callq 0x14f60
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rsi
movq -0xa0(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x14ef0
jmp 0x147a9
movq -0x28(%rbp), %rdi
callq 0x14f30
movq %rax, -0xa8(%rbp)
movq -0x28(%rbp), %rdi
callq 0x14f60
movq %rax, -0xb0(%rbp)
movq -0xa8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x14ef0
jmp 0x147e2
movq -0x30(%rbp), %rdi
callq 0x14f30
movq %rax, -0xb8(%rbp)
movq -0x30(%rbp), %rdi
callq 0x14f60
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x14ef0
jmp 0x1481b
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x248(%rbp)
callq 0x8bd0
leaq -0xf0(%rbp), %rdi
callq 0x8bd0
movq -0x248(%rbp), %rdi
callq 0x9890
movq %rax, -0x100(%rbp)
leaq -0xf8(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x98c0
movq -0x10(%rbp), %rdi
callq 0x14f30
movq %rax, -0x108(%rbp)
movq -0x10(%rbp), %rdi
callq 0x14f60
movq -0x248(%rbp), %rdi
movq %rax, -0x110(%rbp)
movq -0xf8(%rbp), %rsi
movq -0x108(%rbp), %rdx
movq -0x110(%rbp), %rcx
callq 0x14f90
movq %rax, -0x240(%rbp)
jmp 0x148aa
movq -0x240(%rbp), %rax
movq %rax, -0x118(%rbp)
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x258(%rbp)
callq 0x9890
movq %rax, -0x128(%rbp)
leaq -0x120(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x98c0
movq -0x18(%rbp), %rdi
callq 0x14f30
movq %rax, -0x130(%rbp)
movq -0x18(%rbp), %rdi
callq 0x14f60
movq -0x258(%rbp), %rdi
movq %rax, -0x138(%rbp)
movq -0x120(%rbp), %rsi
movq -0x130(%rbp), %rdx
movq -0x138(%rbp), %rcx
callq 0x14f90
movq %rax, -0x250(%rbp)
jmp 0x1492f
movq -0x250(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0x9890
movq %rax, -0x150(%rbp)
leaq -0x148(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x98c0
movq -0x20(%rbp), %rdi
callq 0x14f30
movq %rax, -0x158(%rbp)
movq -0x20(%rbp), %rdi
callq 0x14f60
movq -0x268(%rbp), %rdi
movq %rax, -0x160(%rbp)
movq -0x148(%rbp), %rsi
movq -0x158(%rbp), %rdx
movq -0x160(%rbp), %rcx
callq 0x14f90
movq %rax, -0x260(%rbp)
jmp 0x149b4
movq -0x260(%rbp), %rax
movq %rax, -0x168(%rbp)
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x278(%rbp)
callq 0x9890
movq %rax, -0x178(%rbp)
leaq -0x170(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x98c0
movq -0x28(%rbp), %rdi
callq 0x14f30
movq %rax, -0x180(%rbp)
movq -0x28(%rbp), %rdi
callq 0x14f60
movq -0x278(%rbp), %rdi
movq %rax, -0x188(%rbp)
movq -0x170(%rbp), %rsi
movq -0x180(%rbp), %rdx
movq -0x188(%rbp), %rcx
callq 0x14f90
movq %rax, -0x270(%rbp)
jmp 0x14a39
movq -0x270(%rbp), %rax
movq %rax, -0x190(%rbp)
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x288(%rbp)
callq 0x9890
movq %rax, -0x1a0(%rbp)
leaq -0x198(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x98c0
movq -0x18(%rbp), %rdi
callq 0x14f30
movq %rax, -0x1a8(%rbp)
movq -0x18(%rbp), %rdi
callq 0x14f60
movq -0x288(%rbp), %rdi
movq %rax, -0x1b0(%rbp)
movq -0x198(%rbp), %rsi
movq -0x1a8(%rbp), %rdx
movq -0x1b0(%rbp), %rcx
callq 0x14f90
movq %rax, -0x280(%rbp)
jmp 0x14abe
movq -0x280(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x298(%rbp)
callq 0x9890
movq %rax, -0x1c8(%rbp)
leaq -0x1c0(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x98c0
movq -0x10(%rbp), %rdi
callq 0x14f30
movq %rax, -0x1d0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x14f60
movq -0x298(%rbp), %rdi
movq %rax, -0x1d8(%rbp)
movq -0x1c0(%rbp), %rsi
movq -0x1d0(%rbp), %rdx
movq -0x1d8(%rbp), %rcx
callq 0x14f90
movq %rax, -0x290(%rbp)
jmp 0x14b43
movq -0x290(%rbp), %rax
movq %rax, -0x1e0(%rbp)
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x2a8(%rbp)
callq 0x9890
movq %rax, -0x1f0(%rbp)
leaq -0x1e8(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
callq 0x98c0
movq -0x28(%rbp), %rdi
callq 0x14f30
movq %rax, -0x1f8(%rbp)
movq -0x28(%rbp), %rdi
callq 0x14f60
movq -0x2a8(%rbp), %rdi
movq %rax, -0x200(%rbp)
movq -0x1e8(%rbp), %rsi
movq -0x1f8(%rbp), %rdx
movq -0x200(%rbp), %rcx
callq 0x14f90
movq %rax, -0x2a0(%rbp)
jmp 0x14bc8
movq -0x2a0(%rbp), %rax
movq %rax, -0x208(%rbp)
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x2b8(%rbp)
callq 0x9890
movq %rax, -0x218(%rbp)
leaq -0x210(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x98c0
movq -0x20(%rbp), %rdi
callq 0x14f30
movq %rax, -0x220(%rbp)
movq -0x20(%rbp), %rdi
callq 0x14f60
movq -0x2b8(%rbp), %rdi
movq %rax, -0x228(%rbp)
movq -0x210(%rbp), %rsi
movq -0x220(%rbp), %rdx
movq -0x228(%rbp), %rcx
callq 0x14f90
movq %rax, -0x2b0(%rbp)
jmp 0x14c4d
movq -0x2b0(%rbp), %rax
movq %rax, -0x230(%rbp)
movq -0x8(%rbp), %rdi
callq 0x122c0
jmp 0x14c66
movq -0x8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x134e0
jmp 0x14c75
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq 0x10(%rbp), %rdx
callq 0x13bc0
jmp 0x14c88
movq -0x8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
callq 0x13fd0
jmp 0x14ca1
movq -0x8(%rbp), %rdi
callq 0x14660
jmp 0x14cac
leaq -0xf0(%rbp), %rdi
callq 0x9930
leaq -0xd8(%rbp), %rdi
callq 0x9930
leaq -0x60(%rbp), %rdi
callq 0x15040
addq $0x2c0, %rsp            # imm = 0x2C0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x14d08
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x9930
leaq -0xd8(%rbp), %rdi
callq 0x9930
leaq -0x60(%rbp), %rdi
callq 0x15040
movq -0x78(%rbp), %rdi
callq 0x3550
nopw (%rax,%rax)