// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/twister_main.cpp
// Function: main
int main(int argc, char **argv)
{
	// Set default values.
	set_globals_to_defaults();
	Manifold_type manifold_type = bundle;
	std::string manifold_name = "", handles = "", gluing = "", surface_file = "", surface_file_contents = "", output_file = "", warning_file = "";
	std::string manifold_contents = "";
	bool error_occured = false;
	
	try
	{
		// Parse the given command, extracting out all the interesting bits.
		parse_input(argc, argv, surface_file, output_file, warning_file, manifold_name, manifold_type, gluing, handles);
		surface_file_contents = load_file_contents(surface_file);
		
		// Build the manifold and get its information.
		manifold M(manifold_name, manifold_type);
		construct_manifold(M, surface_file_contents, gluing, handles);
		manifold_contents = M.to_string();
	}
	catch (...)
	{
		error_occured = true;
	}
	
	// Write out any messages stored in the GLOBAL_message_stream.
	try
	{
		if (GLOBAL_message_stream != "")
		{
			if (warning_file != "")
			{
				std::ofstream myfile(warning_file.c_str());
				if (not myfile.is_open())
					output_error("Unable to write to " + warning_file + ".");
				
				myfile << GLOBAL_message_stream;
				myfile.close();
			}
			else  // Else write it to std::cerr.
			{
				std::cerr << GLOBAL_message_stream << std::endl;
			}
		}
	}
	catch (...)
	{
		error_occured = true;
	}
	
	if (error_occured) exit(1);
	
	try
	{
		if (output_file != "")  // If we were given an output file, write it there.
		{
			std::ofstream myfile(output_file.c_str());
			if (not myfile.is_open())
				output_error("Unable to write to " + output_file + ".");
			
			myfile << manifold_contents;
			myfile.close();
		}
		else  // Else write it to std::cout.
		{
			std::cout << manifold_contents;
		}
	}
	catch (...)
	{
		error_occured = true;
	}
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rsi, %rbx
movl %edi, %ebp
callq 0x41ec
movl $0x1, 0x4(%rsp)
leaq 0xf8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1522(%rip), %r15      # 0x17339
leaq 0xe8(%rsp), %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x892e
leaq 0x158(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x148(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x892e
leaq 0xd8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x14da(%rip), %rdx      # 0x17339
leaq 0xc8(%rsp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0x892e
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x14b4(%rip), %rdx      # 0x17339
leaq 0xa8(%rsp), %rdi
movq %rdx, %rsi
callq 0x892e
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1491(%rip), %rdx      # 0x17339
leaq 0x88(%rsp), %rdi
movq %rdx, %rsi
callq 0x892e
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1471(%rip), %rdx      # 0x17339
leaq 0x68(%rsp), %rdi
movq %rdx, %rsi
callq 0x892e
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1454(%rip), %rdx      # 0x17339
leaq 0x48(%rsp), %rdi
movq %rdx, %rsi
callq 0x892e
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1437(%rip), %rdx      # 0x17339
leaq 0x28(%rsp), %rdi
movq %rdx, %rsi
callq 0x892e
subq $0x8, %rsp
leaq 0xc(%rsp), %rax
leaq 0xb0(%rsp), %rdx
leaq 0x70(%rsp), %rcx
leaq 0x50(%rsp), %r8
leaq 0xf0(%rsp), %r9
movl %ebp, %edi
movq %rbx, %rsi
pushq %r14
pushq %r15
pushq %rax
callq 0x14d1f
addq $0x20, %rsp
leaq 0x1f8(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1e8(%rsp), %rdi
callq 0x89c4
leaq 0x208(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0xa1fc
leaq 0x88(%rsp), %rdi
leaq 0x208(%rsp), %rbx
movq %rbx, %rsi
callq 0x32a0
movq (%rbx), %rdi
leaq 0x218(%rsp), %rax
cmpq %rax, %rdi
je 0x15fbe
movq 0x218(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0x1e8(%rsp), %rdi
cmpq %r14, %rdi
je 0x15fdb
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x3220
leaq 0x1d8(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0xe8(%rsp), %rsi
movq 0xf0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1c8(%rsp), %rdi
callq 0x89c4
movl 0x4(%rsp), %edx
leaq 0x208(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x1177e
movq 0x1c8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1603d
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x3220
leaq 0x1b8(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1a8(%rsp), %rdi
callq 0x89c4
leaq 0x198(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x188(%rsp), %rdi
callq 0x89c4
leaq 0x178(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x148(%rsp), %rsi
movq 0x150(%rsp), %rdx
addq %rsi, %rdx
leaq 0x168(%rsp), %rdi
callq 0x89c4
leaq 0x208(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
leaq 0x188(%rsp), %rdx
leaq 0x168(%rsp), %rcx
callq 0x72a1
movq 0x168(%rsp), %rdi
cmpq %rbp, %rdi
je 0x16103
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0x188(%rsp), %rdi
cmpq %r15, %rdi
je 0x16120
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0x1a8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1613d
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x3220
leaq 0x8(%rsp), %rdi
leaq 0x208(%rsp), %rsi
callq 0x132ee
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x32a0
movq (%rbx), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1617b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
leaq 0x208(%rsp), %rdi
callq 0x1189a
xorl %ebp, %ebp
leaq 0x81a7(%rip), %rbx      # 0x1e338
leaq 0x11a1(%rip), %rsi      # 0x17339
movq %rbx, %rdi
callq 0x30c0
testl %eax, %eax
je 0x16342
leaq 0x118a(%rip), %rsi      # 0x17339
leaq 0x48(%rsp), %rdi
callq 0x30c0
testl %eax, %eax
je 0x16244
movq 0x48(%rsp), %rsi
leaq 0x208(%rsp), %rdi
movl $0x10, %edx
callq 0x3260
leaq 0x278(%rsp), %rdi
callq 0x3090
testb %al, %al
jne 0x162e9
leaq 0x2116(%rip), %rsi      # 0x1830a
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x44d4
leaq 0xef8(%rip), %rsi       # 0x17102
leaq 0x8(%rsp), %rdi
callq 0x3420
leaq 0x138(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x16286
movq %rdx, 0x128(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x138(%rsp)
jmp 0x1628d
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x7d9e(%rip), %rdi      # 0x1dff0
callq 0x3280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3170
jmp 0x16342
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x128(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x43b0
movq 0x128(%rsp), %rdi
cmpq %r14, %rdi
je 0x162ce
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x3220
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x162e9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq 0x208(%rsp), %rdi
callq 0x3280
leaq 0x208(%rsp), %rdi
callq 0x32f0
movq 0x7cb7(%rip), %rax      # 0x1dfc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x210(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x208(%rsp,%rcx)
callq 0x31e0
leaq 0x300(%rsp), %rdi
callq 0x30e0
testb %bpl, %bpl
jne 0x16692
leaq 0xfe7(%rip), %rsi       # 0x17339
leaq 0x68(%rsp), %rdi
callq 0x30c0
testl %eax, %eax
je 0x163e7
movq 0x68(%rsp), %rsi
leaq 0x208(%rsp), %rdi
movl $0x10, %edx
callq 0x3260
leaq 0x278(%rsp), %rdi
callq 0x3090
testb %al, %al
jne 0x16465
leaq 0x1f73(%rip), %rsi      # 0x1830a
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x44d4
leaq 0xd55(%rip), %rsi       # 0x17102
leaq 0x8(%rsp), %rdi
callq 0x3420
leaq 0x118(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x16402
movq %rdx, 0x108(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x118(%rsp)
jmp 0x16409
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x7bd8(%rip), %rdi      # 0x1dfd0
callq 0x3280
jmp 0x164c1
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x108(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x43b0
movq 0x108(%rsp), %rdi
cmpq %r14, %rdi
je 0x1644a
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x3220
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16465
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x208(%rsp), %rdi
callq 0x3280
leaq 0x208(%rsp), %rdi
callq 0x32f0
movq 0x7b38(%rip), %rax      # 0x1dfc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x210(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x208(%rsp,%rcx)
callq 0x31e0
leaq 0x300(%rsp), %rdi
callq 0x30e0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x164dd
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x164f9
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x16515
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x1653a
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x1655f
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x16584
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0x148(%rsp), %rdi
cmpq %r13, %rdi
je 0x165a1
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0xe8(%rsp), %rdi
cmpq %r12, %rdi
je 0x165be
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x3220
xorl %eax, %eax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x128(%rsp), %rdi
cmpq %r14, %rdi
je 0x165f7
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x3220
jmp 0x165f7
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16673
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
jmp 0x16673
jmp 0x16670
movq %rax, %rbx
movq 0x108(%rsp), %rdi
cmpq %r14, %rdi
je 0x1663b
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x3220
jmp 0x1663b
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x167a6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
jmp 0x167a6
jmp 0x167a3
jmp 0x16668
jmp 0x16682
movq %rax, %rbx
jmp 0x167b3
movq %rax, %rbx
leaq 0x208(%rsp), %rdi
callq 0x3310
jmp 0x16685
movq %rax, %rbx
movq %rbx, %rdi
callq 0x3100
callq 0x3390
movl $0x1, %edi
callq 0x3290
jmp 0x16704
movq %rax, %rbx
movq 0x168(%rsp), %rdi
cmpq %rbp, %rdi
je 0x166c3
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x3220
jmp 0x166c3
movq %rax, %rbx
movq 0x188(%rsp), %rdi
cmpq %r15, %rdi
je 0x166e5
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x3220
jmp 0x166e5
movq %rax, %rbx
movq 0x1a8(%rsp), %rdi
cmpq %r14, %rdi
je 0x16707
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x3220
jmp 0x16707
movq %rax, %rbx
leaq 0x208(%rsp), %rdi
callq 0x1189a
jmp 0x16759
movq %rax, %rbx
movq 0x1c8(%rsp), %rdi
cmpq %r14, %rdi
je 0x16759
movq 0x1d8(%rsp), %rsi
jmp 0x1674a
jmp 0x16756
movq %rax, %rbx
movq 0x1e8(%rsp), %rdi
cmpq %r14, %rdi
je 0x16759
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x3220
jmp 0x16759
jmp 0x16756
movq %rax, %rbx
movq %rbx, %rdi
callq 0x3100
movb $0x1, %bpl
callq 0x3390
jmp 0x1618a
movq %rax, %rbx
jmp 0x167e4
movq %rax, %rbx
jmp 0x16800
movq %rax, %rbx
jmp 0x1681c
movq %rax, %rbx
jmp 0x16841
movq %rax, %rbx
jmp 0x16866
movq %rax, %rbx
jmp 0x1688b
movq %rax, %rbx
jmp 0x168a8
movq %rax, %rbx
leaq 0x208(%rsp), %rdi
callq 0x3310
movq %rbx, %rdi
callq 0x3100
callq 0x3390
jmp 0x164c1
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x167e4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x16800
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x1681c
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x16841
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x16866
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x1688b
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0x148(%rsp), %rdi
cmpq %r13, %rdi
je 0x168a8
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0xe8(%rsp), %rdi
cmpq %r12, %rdi
je 0x168c5
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x33e0