// File: /workspace/github_cpp_makefile_star2_O2/MarkCBell[P]twister/./twister/kernel/twister_main.cpp
// Function: parse_input(int, char**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, Manifold_type&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void parse_input(int argc, char **argv, std::string &surface_file, std::string &output_file, std::string &warning_file, std::string &name, Manifold_type &manifold_type, std::string &gluing, std::string &handles)
{
	// Set default values.
	surface_file = "";
	output_file = "";
	GLOBAL_message_stream = "";
	name = "";
	manifold_type = bundle;
	gluing = "";
	handles = "";
	
	if (argc == 1)
	{
		print_help(std::cout);
		exit(0);
	}
	
	if (argc >= 2)
	{
		for (int i = 1; i < argc; i++)
		{
			if (strcmp(argv[i], "--help") == 0)
			{
				print_help(std::cout);
				exit(0);
			}
				else if (strcmp(argv[i], "--version") == 0)
			{
				std::cout << "Twister " + version << std::endl;
				exit(0);
			}
			else if (strcmp(argv[i], "-f") == 0 || strcmp(argv[i], "--surface") == 0)
			{
				// Really should check that the next entry is a word, _not_ a flag.
				if (++i == argc) 
					output_error("-f requires a surface file.");
				
				surface_file = argv[i];
			}
			else if (strcmp(argv[i], "-o") == 0 || strcmp(argv[i], "--output") == 0)
			{
				// Really should check that the next entry is a word, _not_ a flag.
				if (++i == argc) 
					output_error("-o requires an output file.");
				
				output_file = argv[i];
			}
			else if (strcmp(argv[i], "-ow") == 0 || strcmp(argv[i], "--output-warnings") == 0)
			{
				// Really should check that the next entry is a word, _not_ a flag.
				if (++i == argc) 
					output_error("-ow requires an output warning file.");
				
				warning_file = argv[i];
			}
			else if (strcmp(argv[i], "-s") == 0 || strcmp(argv[i], "--splitting") == 0)
			{
				// Really should check that the next entry is a gluing, _not_ a flag.
				if (++i == argc)
					output_error("-s requires a gluing.");
				
				manifold_type = splitting;
				gluing = argv[i];
			}
			else if (strcmp(argv[i], "-b") == 0 || strcmp(argv[i], "--bundle") == 0)
			{
				// Really should check that the next entry is a monodromy, _not_ a flag.
				if (++i == argc)
					output_error("-b requires a monodromy.");
				
				manifold_type = bundle;
				gluing = argv[i];
			}
			else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "--handles") == 0)
			{
				// Really should check that the next entry is a handles_list, _not_ a flag.
				if (++i == argc)
					output_error("-h requires a collecton of handles to attach.");
				
				handles = argv[i];
				manifold_type = splitting;
			}
			else if (strcmp(argv[i], "-n") == 0 || strcmp(argv[i], "--name") == 0)
			{
				// Really should check that the next entry is a name, _not_ a flag.
				if (++i == argc)
					output_error("-n requires a manifold name.");
				
				name = argv[i];
			}
			else if (strcmp(argv[i], "-p") == 0)
			{
				GLOBAL_calculate_peripheral_curves = false;
			}
			else if (strcmp(argv[i], "-w") == 0 || strcmp(argv[i], "--warnings") == 0)
			{
				GLOBAL_warnings = false;
			}
			else if (strcmp(argv[i], "-O") == 0 || strcmp(argv[i], "--optimisations") == 0)
			{
				GLOBAL_optimise = false;  // Turns off foldoff really.
			}
			else if (strcmp(argv[i], "-d") == 0 || strcmp(argv[i], "--debugging") == 0)
			{
				if (++i == argc)
					output_error("-d requires a debugging level.");
				if (! isdigit(argv[i][0]))
					output_error("debugging level must be an integer.");
				
				GLOBAL_debugging_level = atoi(argv[i]);
			}
			else
			{
				output_warning("Unexpected input at the command line.");
			}
		}
	}
	
	if (surface_file == "")
		output_error("No surface file specified.");
	
	// If no name was specified we rebuild the command given (in a nice order).
	if (name == "")
	{
		name = "-f \"" + surface_file + "\"";
		if (manifold_type == bundle) name += " -b \"" + gluing + "\"";
		else if (manifold_type == splitting) name += " -s \"" + gluing + "\" -h \"" + handles + "\"";
		
		if (GLOBAL_calculate_peripheral_curves == false) name += " -p ";
		if (GLOBAL_optimise == false) name += " -O ";
	}
	
	// SnapPea can't handle long names though.
	if (int(name.size()) > max_name_length)
	{
		output_warning("Name truncated. SnapPea can't handle triangulations with more that " + max_name_length_string + " character names.");
		name = name.substr(0, max_name_length);
	}
	
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %r9, %r13
movq %r8, 0x68(%rsp)
movq %rcx, %r12
movq %rsi, 0x10(%rsp)
movl %edi, %r14d
movq 0x280(%rsp), %r15
movq 0x270(%rsp), %rbp
leaq 0x13f6(%rip), %rbx      # 0x1130f
movq %rdx, 0x38(%rsp)
movq %rdx, %rdi
movq %rbx, %rsi
callq 0x3410
movq %r12, 0x70(%rsp)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3410
leaq 0x9408(%rip), %rdi      # 0x19348
movq %rbx, %rsi
callq 0x3410
movq %r13, 0x40(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3410
movl $0x1, (%rbp)
movq 0x278(%rsp), %rdi
movq %rbx, %rsi
callq 0x3410
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3410
movl %r14d, 0xc(%rsp)
cmpl $0x1, %r14d
je 0x1076d
jle 0x104ed
pushq $0x1
popq %r13
leaq 0x218(%rsp), %rbp
leaq 0x138(%rsp), %r14
leaq 0x118(%rsp), %r15
cmpl 0xc(%rsp), %r13d
jge 0x104ed
movq %rbp, %r12
movslq %r13d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rbp
movq %rbp, %rdi
leaq 0x209a(%rip), %rsi      # 0x12069
callq 0x32f0
testl %eax, %eax
je 0x1076d
movq %rbp, %rdi
leaq 0x208a(%rip), %rsi      # 0x12070
callq 0x32f0
testl %eax, %eax
je 0x10780
movb (%rbp), %bl
cmpb $0x2d, %bl
jne 0x1000b
cmpb $0x66, 0x1(%rbp)
jne 0x1000b
cmpb $0x0, 0x2(%rbp)
je 0x101f4
movq %rbp, %rdi
leaq 0x206e(%rip), %rsi      # 0x12083
callq 0x32f0
testl %eax, %eax
je 0x101f4
cmpb $0x2d, %bl
jne 0x10037
cmpb $0x6f, 0x1(%rbp)
jne 0x10037
cmpb $0x0, 0x2(%rbp)
je 0x1023b
movq %rbp, %rdi
leaq 0x2068(%rip), %rsi      # 0x120a9
callq 0x32f0
testl %eax, %eax
je 0x1023b
movq %rbp, %rdi
leaq 0x2076(%rip), %rsi      # 0x120ce
callq 0x32f0
testl %eax, %eax
je 0x1028a
movq %rbp, %rdi
leaq 0x2063(%rip), %rsi      # 0x120d2
callq 0x32f0
testl %eax, %eax
je 0x1028a
cmpb $0x2d, %bl
jne 0x10091
cmpb $0x73, 0x1(%rbp)
jne 0x10091
cmpb $0x0, 0x2(%rbp)
je 0x102d9
movq %rbp, %rdi
leaq 0x206e(%rip), %rsi      # 0x12109
callq 0x32f0
testl %eax, %eax
je 0x102d9
cmpb $0x2d, %bl
jne 0x100bd
cmpb $0x62, 0x1(%rbp)
jne 0x100bd
cmpb $0x0, 0x2(%rbp)
je 0x1031f
movq %rbp, %rdi
leaq 0x2064(%rip), %rsi      # 0x1212b
callq 0x32f0
testl %eax, %eax
je 0x1031f
cmpb $0x2d, %bl
jne 0x100e9
cmpb $0x68, 0x1(%rbp)
jne 0x100e9
cmpb $0x0, 0x2(%rbp)
je 0x10387
movq %rbp, %rdi
leaq 0x205a(%rip), %rsi      # 0x1214d
callq 0x32f0
testl %eax, %eax
je 0x10387
cmpb $0x2d, %bl
jne 0x10115
cmpb $0x6e, 0x1(%rbp)
jne 0x10115
cmpb $0x0, 0x2(%rbp)
je 0x103e6
movq %rbp, %rdi
leaq 0x2066(%rip), %rsi      # 0x12185
callq 0x32f0
testl %eax, %eax
je 0x103e6
cmpb $0x2d, %bl
jne 0x10151
cmpb $0x70, 0x1(%rbp)
jne 0x10141
cmpb $0x0, 0x2(%rbp)
je 0x104db
cmpb $0x77, 0x1(%rbp)
jne 0x10151
cmpb $0x0, 0x2(%rbp)
je 0x10435
movq %rbp, %rdi
leaq 0x204e(%rip), %rsi      # 0x121a9
callq 0x32f0
testl %eax, %eax
je 0x10435
cmpb $0x2d, %bl
jne 0x1017d
cmpb $0x4f, 0x1(%rbp)
jne 0x1017d
cmpb $0x0, 0x2(%rbp)
je 0x10441
movq %rbp, %rdi
leaq 0x202d(%rip), %rsi      # 0x121b4
callq 0x32f0
testl %eax, %eax
je 0x10441
cmpb $0x2d, %bl
jne 0x101a9
cmpb $0x64, 0x1(%rbp)
jne 0x101a9
cmpb $0x0, 0x2(%rbp)
je 0x1044d
movq %rbp, %rdi
leaq 0x2011(%rip), %rsi      # 0x121c4
callq 0x32f0
testl %eax, %eax
je 0x1044d
leaq 0xf8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x2041(%rip), %rsi      # 0x12213
leaq 0x18(%rsp), %rdx
callq 0x3e82
movq %rbx, %rdi
callq 0x3d6c
movq %r12, %rbp
movq %rbx, %rdi
callq 0x3458
jmp 0x1037f
incl %r13d
cmpl 0xc(%rsp), %r13d
movq %r12, %rbp
jne 0x10225
movq %rbp, %rdi
leaq 0x1e82(%rip), %rsi      # 0x1208d
leaq 0x18(%rsp), %rdx
callq 0x3e82
movq %rbp, %rdi
callq 0x3dec
movq %rbp, %rdi
callq 0x3458
movslq %r13d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rsi
movq 0x38(%rsp), %rdi
jmp 0x1037a
incl %r13d
cmpl 0xc(%rsp), %r13d
movq %r12, %rbp
jne 0x10274
leaq 0x1f8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x1e58(%rip), %rsi      # 0x120b2
leaq 0x18(%rsp), %rdx
callq 0x3e82
movq %rbx, %rdi
callq 0x3dec
movq %rbx, %rdi
callq 0x3458
movslq %r13d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rsi
movq 0x70(%rsp), %rdi
jmp 0x1037a
incl %r13d
cmpl 0xc(%rsp), %r13d
movq %r12, %rbp
jne 0x102c3
leaq 0x1d8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x1e3b(%rip), %rsi      # 0x120e4
leaq 0x18(%rsp), %rdx
callq 0x3e82
movq %rbx, %rdi
callq 0x3dec
movq %rbx, %rdi
callq 0x3458
movslq %r13d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rsi
movq 0x68(%rsp), %rdi
jmp 0x1037a
incl %r13d
cmpl 0xc(%rsp), %r13d
movq %r12, %rbp
jne 0x10312
leaq 0x1b8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x1e1d(%rip), %rsi      # 0x12115
leaq 0x18(%rsp), %rdx
callq 0x3e82
movq %rbx, %rdi
callq 0x3dec
movq %rbx, %rdi
callq 0x3458
movq 0x270(%rsp), %rax
andl $0x0, (%rax)
jmp 0x10366
incl %r13d
cmpl 0xc(%rsp), %r13d
movq %r12, %rbp
jne 0x10358
leaq 0x198(%rsp), %rbx
movq %rbx, %rdi
leaq 0x1df6(%rip), %rsi      # 0x12134
leaq 0x18(%rsp), %rdx
callq 0x3e82
movq %rbx, %rdi
callq 0x3dec
movq %rbx, %rdi
callq 0x3458
movq 0x270(%rsp), %rax
movl $0x1, (%rax)
movslq %r13d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rsi
movq 0x278(%rsp), %rdi
callq 0x3410
incl %r13d
jmp 0xffab
incl %r13d
cmpl 0xc(%rsp), %r13d
movq %r12, %rbp
jne 0x103c0
leaq 0x178(%rsp), %rbx
movq %rbx, %rdi
leaq 0x1db1(%rip), %rsi      # 0x12157
leaq 0x18(%rsp), %rdx
callq 0x3e82
movq %rbx, %rdi
callq 0x3dec
movq %rbx, %rdi
callq 0x3458
movslq %r13d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rsi
movq 0x280(%rsp), %rdi
callq 0x3410
movq 0x270(%rsp), %rax
andl $0x0, (%rax)
jmp 0x1037f
incl %r13d
cmpl 0xc(%rsp), %r13d
movq %r12, %rbp
jne 0x1041f
leaq 0x158(%rsp), %rbx
movq %rbx, %rdi
leaq 0x1d87(%rip), %rsi      # 0x1218c
leaq 0x18(%rsp), %rdx
callq 0x3e82
movq %rbx, %rdi
callq 0x3dec
movq %rbx, %rdi
callq 0x3458
movslq %r13d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rsi
movq 0x40(%rsp), %rdi
jmp 0x1037a
leaq 0x8dfc(%rip), %rax      # 0x19238
jmp 0x104e2
leaq 0x8df1(%rip), %rax      # 0x19239
jmp 0x104e2
incl %r13d
cmpl 0xc(%rsp), %r13d
movq %r12, %rbp
jne 0x10481
movq %r14, %rbx
movq %r14, %rdi
leaq 0x1d69(%rip), %rsi      # 0x121d0
leaq 0x18(%rsp), %rdx
callq 0x3e82
movq %rbx, %rdi
callq 0x3dec
movq %rbx, %rdi
callq 0x3458
movslq %r13d, %rbx
movq 0x10(%rsp), %rax
movq (%rax,%rbx,8), %rdi
movsbl (%rdi), %eax
addl $-0x30, %eax
cmpl $0xa, %eax
jb 0x104c8
movq %r15, %r12
movq %r15, %rdi
leaq 0x1d4a(%rip), %rsi      # 0x121ef
leaq 0x18(%rsp), %rdx
callq 0x3e82
movq %r12, %rdi
callq 0x3dec
movq %r12, %rdi
callq 0x3458
movq 0x10(%rsp), %rax
movq (%rax,%rbx,8), %rdi
callq 0x3340
leaq 0x8e6c(%rip), %rcx      # 0x19340
movl %eax, (%rcx)
jmp 0x1037f
leaq 0x8d58(%rip), %rax      # 0x1923a
movb $0x0, (%rax)
movq %r12, %rbp
jmp 0x1037f
leaq 0xe1b(%rip), %rsi       # 0x1130f
movq 0x38(%rsp), %rdi
callq 0x631c
testb %al, %al
movq 0x40(%rsp), %r14
je 0x1053a
leaq 0x1d2b(%rip), %rsi      # 0x12239
leaq 0xb8(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x3e82
leaq 0xb8(%rsp), %rdi
callq 0x3dec
leaq 0xb8(%rsp), %rdi
callq 0x3458
leaq 0xdce(%rip), %rsi       # 0x1130f
movq %r14, %rdi
callq 0x631c
testb %al, %al
je 0x106df
leaq 0x1cfc(%rip), %rsi      # 0x12254
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
movq 0x38(%rsp), %rdx
callq 0x3ebd
leaq 0x1cec(%rip), %rdx      # 0x1225d
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x3f33
leaq 0x18(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32a0
movq %rbx, %rdi
callq 0x3458
leaq 0x48(%rsp), %rdi
callq 0x3458
movq 0x270(%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
je 0x10608
cmpl $0x1, %eax
jne 0x106a9
leaq 0x1c9b(%rip), %rsi      # 0x12259
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
movq 0x278(%rsp), %rdx
callq 0x3ebd
leaq 0x1c83(%rip), %rdx      # 0x1225d
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x3f33
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x3420
leaq 0x18(%rsp), %rdi
callq 0x3458
leaq 0x48(%rsp), %rdi
jmp 0x106a4
leaq 0x1c50(%rip), %rsi      # 0x1225f
leaq 0xd8(%rsp), %rbx
movq %rbx, %rdi
movq 0x278(%rsp), %rdx
callq 0x3ebd
leaq 0x1c37(%rip), %rdx      # 0x12265
leaq 0x98(%rsp), %rdi
movq %rbx, %rsi
callq 0x3f33
leaq 0x48(%rsp), %rdi
leaq 0x98(%rsp), %rsi
movq 0x280(%rsp), %rdx
callq 0x6703
leaq 0x1bfe(%rip), %rdx      # 0x1225d
leaq 0x18(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x3f33
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x3420
leaq 0x18(%rsp), %rdi
callq 0x3458
leaq 0x48(%rsp), %rdi
callq 0x3458
leaq 0x98(%rsp), %rdi
callq 0x3458
leaq 0xd8(%rsp), %rdi
callq 0x3458
leaq 0x8b8a(%rip), %rax      # 0x1923a
cmpb $0x0, (%rax)
jne 0x106c4
leaq 0x1bb0(%rip), %rsi      # 0x1226c
movq %r14, %rdi
callq 0x3400
leaq 0x8b6e(%rip), %rax      # 0x19239
cmpb $0x0, (%rax)
jne 0x106df
leaq 0x1b9a(%rip), %rsi      # 0x12271
movq %r14, %rdi
callq 0x3400
cmpl $0x64, 0x8(%r14)
jl 0x1075b
leaq 0x1b89(%rip), %rsi      # 0x12276
leaq 0x8fc4(%rip), %rdx      # 0x196b8
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x3ebd
leaq 0x1bb2(%rip), %rdx      # 0x122ba
leaq 0x78(%rsp), %rdi
movq %rbx, %rsi
callq 0x3f33
leaq 0x78(%rsp), %rdi
callq 0x3d6c
leaq 0x78(%rsp), %rdi
callq 0x3458
leaq 0x18(%rsp), %rdi
callq 0x3458
leaq 0x18(%rsp), %rbx
pushq $0x63
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3260
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32a0
movq %rbx, %rdi
callq 0x3458
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x885c(%rip), %rdi      # 0x18fd0
callq 0xfbac
xorl %edi, %edi
callq 0x3290
leaq 0x18f3(%rip), %rsi      # 0x1207a
leaq 0x8f0a(%rip), %rdx      # 0x19698
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x3ebd
movq 0x882e(%rip), %rdi      # 0x18fd0
movq %rbx, %rsi
callq 0x3210
movq %rax, %rdi
callq 0x3120
leaq 0x18(%rsp), %rdi
callq 0x3458
jmp 0x10779
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
jmp 0x108f8
jmp 0x108de
movq %rax, %rbx
leaq 0x138(%rsp), %rdi
jmp 0x108f8
jmp 0x108de
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
jmp 0x108f8
jmp 0x108de
movq %rax, %rbx
leaq 0x158(%rsp), %rdi
jmp 0x108f8
jmp 0x108de
movq %rax, %rbx
leaq 0x178(%rsp), %rdi
jmp 0x108f8
jmp 0x108de
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3458
jmp 0x10839
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x3458
jmp 0x10848
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x3458
jmp 0x10869
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3458
jmp 0x108aa
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
jmp 0x108f8
jmp 0x108a7
movq %rax, %rbx
leaq 0x198(%rsp), %rdi
jmp 0x108f8
jmp 0x108de
jmp 0x108de
movq %rax, %rbx
leaq 0x1b8(%rsp), %rdi
jmp 0x108f8
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x3458
jmp 0x108f3
jmp 0x108f0
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x108f8
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
jmp 0x108f8
jmp 0x108de
movq %rax, %rbx
leaq 0x1d8(%rsp), %rdi
jmp 0x108f8
jmp 0x108de
jmp 0x108de
movq %rax, %rbx
leaq 0x1f8(%rsp), %rdi
jmp 0x108f8
movq %rax, %rbx
jmp 0x108fd
movq %rax, %rbx
leaq 0x218(%rsp), %rdi
jmp 0x108f8
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3458
movq %rbx, %rdi
callq 0x33d0