// File: /workspace/github_cpp_makefile_star2_O1/MarkCBell[P]twister/./twister/kernel/twister.cpp
// Function: manifold::snap_print(std::ostream&)
void manifold::snap_print(std::ostream &o)
{
	output_debugging("print", 2);
	
	// Watch out - blank names will kill snappea.
	if (name == "")
		name = "Blank name disallowed";
	
	// Print basic information.
	o << "% Triangulation" << std::endl;
	o << name << std::endl;
	o << "not_attempted  0.00000000" << std::endl;
	o << "oriented_manifold" << std::endl;  // All manifolds we build are orientable, as all face gluings are odd. 
	o << "CS_unknown" << std::endl;
	o << std::endl;
	
	// As our manifold is orientable we must only have torus cusps, so we write them down.
	o << num_cusps << " 0" << std::endl;
	for (int i = 0; i < num_cusps; i++)
		o << "    torus  0.00000000  0.00000000" << std::endl;
	
	o << std::endl;
	
	// First assign each tetra a snap_index
	int i = 0; 
	for (tetra *current = first_tetra; current != NULL; current = current->get_next())
		current->snap_index = i++;
	
	// Print the number of tetrahedra.
	o << i << std::endl;
	
	// Finally, print the face gluings for each tetrahedron and the cusp data, if any.
	for (tetra *current = first_tetra; current != NULL; current = current->get_next())
		current->print_wrt(o);
	
	o << std::endl;
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4570(%rip), %rsi      # 0x17837
leaq 0x456e(%rip), %rdx      # 0x1783c
movq %rsp, %r15
movq %r15, %rdi
callq 0x86fe
movq %r15, %rdi
movl $0x2, %esi
callq 0x4209
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x132fc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3220
leaq 0x18(%r14), %r15
leaq 0x3ff2(%rip), %rsi      # 0x172f9
movq %r15, %rdi
callq 0x30c0
testl %eax, %eax
jne 0x1332e
movq 0x20(%r14), %rdx
leaq 0x451f(%rip), %rcx      # 0x1783d
movl $0x15, %r8d
movq %r15, %rdi
xorl %esi, %esi
callq 0x3340
leaq 0x451e(%rip), %rsi      # 0x17853
movl $0xf, %edx
movq %rbx, %rdi
callq 0x3280
movq (%rbx), %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
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdx
movq %rbx, %rdi
callq 0x3280
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3170
leaq 0x44b9(%rip), %rsi      # 0x17863
movl $0x19, %edx
movq %rbx, %rdi
callq 0x3280
movq (%rbx), %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
leaq 0x4498(%rip), %rsi      # 0x1787d
movl $0x11, %edx
movq %rbx, %rdi
callq 0x3280
movq (%rbx), %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
leaq 0x446f(%rip), %rsi      # 0x1788f
movl $0xa, %edx
movq %rbx, %rdi
callq 0x3280
movq (%rbx), %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
movq (%rbx), %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
movl 0x3c(%r14), %esi
movq %rbx, %rdi
callq 0x33c0
movq %rax, %r15
leaq 0x4492(%rip), %rsi      # 0x17923
movl $0x2, %edx
movq %rax, %rdi
callq 0x3280
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3170
cmpl $0x0, 0x3c(%r14)
jle 0x13514
xorl %ebp, %ebp
leaq 0x43c5(%rip), %r15      # 0x1789a
movl $0x21, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3280
movq (%rbx), %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
incl %ebp
cmpl 0x3c(%r14), %ebp
jl 0x134d5
movq (%rbx), %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
movq (%r14), %rax
xorl %esi, %esi
testq %rax, %rax
je 0x13552
movl %esi, 0xbc(%rax)
incl %esi
movq (%rax), %rax
jmp 0x13540
movq %rbx, %rdi
callq 0x33c0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3170
movq (%r14), %r14
testq %r14, %r14
je 0x13599
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1361a
jmp 0x13584
movq (%rbx), %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
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x135e6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x33e0