// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r9, 0x58(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
movq %rdx, %rbp
movq %rdi, 0x90(%rsp)
leaq 0x68(%rsp), %r14
movl $0x0, (%r14)
xorl %eax, %eax
movq %rax, 0x8(%r14)
movq %r14, 0x10(%r14)
movq %r14, 0x18(%r14)
movq %rax, 0x20(%r14)
movq (%rsi), %rbx
movq %rsi, 0x50(%rsp)
movq 0x8(%rsi), %r13
leaq 0x60(%rsp), %rax
movq %rax, (%rsp)
cmpq %r13, %rbx
je 0xd308
leaq 0x60(%rsp), %r15
movq %rsp, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0xd6e0
addq $0x20, %rbx
cmpq %r13, %rbx
jne 0xd2ee
movq (%rbp), %rbx
movq 0x8(%rbp), %r13
leaq 0x60(%rsp), %rax
movq %rax, (%rsp)
cmpq %r13, %rbx
je 0xd340
leaq 0x60(%rsp), %r15
movq %rsp, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0xd6e0
addq $0x20, %rbx
cmpq %r13, %rbx
jne 0xd326
movq 0x28(%rsp), %rax
movq (%rax), %rbx
movq 0x8(%rax), %r13
leaq 0x60(%rsp), %rax
movq %rax, (%rsp)
cmpq %r13, %rbx
je 0xd37c
leaq 0x60(%rsp), %r15
movq %rsp, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0xd6e0
addq $0x20, %rbx
cmpq %r13, %rbx
jne 0xd362
movq 0x20(%rsp), %rax
movq (%rax), %rbx
movq 0x8(%rax), %r13
leaq 0x60(%rsp), %rax
movq %rax, (%rsp)
cmpq %r13, %rbx
je 0xd3b8
leaq 0x60(%rsp), %r15
movq %rsp, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0xd6e0
addq $0x20, %rbx
cmpq %r13, %rbx
jne 0xd39e
movq 0x58(%rsp), %rax
movq (%rax), %rbx
movq 0x8(%rax), %r13
leaq 0x60(%rsp), %rax
movq %rax, (%rsp)
cmpq %r13, %rbx
je 0xd3f4
leaq 0x60(%rsp), %r15
movq %rsp, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0xd6e0
addq $0x20, %rbx
cmpq %r13, %rbx
jne 0xd3da
xorl %eax, %eax
movq %rsp, %rdi
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movq %rax, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movq 0x50(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
xorl %esi, %esi
callq 0xd990
movq %rsp, %rdi
movq 0x8(%rdi), %rsi
movq (%rbp), %rdx
movq 0x8(%rbp), %rcx
callq 0xd990
movq %rsp, %rdi
movq 0x8(%rdi), %rsi
movq 0x28(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
callq 0xd990
movq %rsp, %rdi
movq 0x8(%rdi), %rsi
movq 0x20(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
callq 0xd990
leaq 0x30(%rsp), %rdi
movq 0x8(%rdi), %rsi
movq (%rbp), %rdx
movq 0x8(%rbp), %rcx
callq 0xd990
leaq 0x30(%rsp), %rdi
movq 0x8(%rdi), %rsi
movq 0x50(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
callq 0xd990
movq 0x90(%rsp), %rbx
leaq 0x30(%rsp), %rdi
movq 0x8(%rdi), %rsi
movq 0x20(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
callq 0xd990
leaq 0x30(%rsp), %rdi
movq 0x8(%rdi), %rsi
movq 0x28(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
callq 0xd990
movq %rbx, %rdi
callq 0xa9b7
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq 0xbd61
movq 0xd0(%rsp), %rdx
movq %rbx, %rdi
movq 0x58(%rsp), %rsi
callq 0xc460
movq %rsp, %rsi
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0xc976
movq %rbx, %rdi
callq 0xd206
leaq 0x30(%rsp), %rdi
callq 0x8772
movq %rsp, %rdi
callq 0x8772
leaq 0x60(%rsp), %rdi
callq 0xd5de
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd550
jmp 0xd550
jmp 0xd550
jmp 0xd550
jmp 0xd550
jmp 0xd550
jmp 0xd550
jmp 0xd550
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x8772
movq %rsp, %rdi
callq 0x8772
jmp 0xd572
jmp 0xd56f
jmp 0xd56f
jmp 0xd56f
jmp 0xd56f
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0xd5de
movq %rbx, %rdi
callq 0x33e0