// File: /workspace/github_cpp_makefile_star2_O2/Laakeri[P]Triangulator/src/IO.cpp
// Function: IO::printTreeDecomposition(std::ostream&, std::pair<std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int>>>>)
void IO::printTreeDecomposition(ostream& out, pair<vector<vector<int> >, vector<pair<int, int> > > treeDecomposition) {
	if (paceTreeWidth) {
		set<string> hasVertices;
		for (auto& bag : treeDecomposition.F) {
			for (int x : bag) {
				hasVertices.insert(vertexId(x));
			}
		}
		for (int i = 1; i <= paceVertices; i++) {
			if (!hasVertices.count(to_string(i))) {
				verticeLabels.push_back(to_string(i));
				vertices[to_string(i)] = verticeLabels.size();
				treeDecomposition.F.push_back({(int)verticeLabels.size()});
				
				if (treeDecomposition.F.size() > 1) {
					treeDecomposition.S.push_back({0, (int)treeDecomposition.F.size()-1});
				}
			}
		}
	}
	int maxBag = 0;
	for (auto& bag : treeDecomposition.F) {
		maxBag = max(maxBag, (int)bag.size());
	}
	if (paceTreeWidth) {
		out<<"s td "<<treeDecomposition.F.size()<<" "<<maxBag<<" "<<paceVertices<<'\n';
	}
	else {
		out<<"s td "<<treeDecomposition.F.size()<<" "<<maxBag<<" "<<verticeLabels.size()<<'\n';
	}
	for (int i = 0; i < (int)treeDecomposition.F.size(); i++) {
		out<<"b "<<i+1;
		for (int x : treeDecomposition.F[i]) {
			out<<" "<<vertexId(x);
		}
		out<<'\n';
	}
	for (auto e : treeDecomposition.S) {
		out<<e.F+1<<" "<<e.S+1<<'\n';
	}
	out.flush();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r15
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
cmpb $0x1, 0x4c(%rdi)
movq %rdx, 0x28(%rsp)
jne 0xd8c0
leaq 0x60(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movq (%r15), %rbp
movq 0x8(%r15), %rax
movq %rax, 0x18(%rsp)
leaq 0x30(%rsp), %r12
leaq 0x58(%rsp), %r13
cmpq 0x18(%rsp), %rbp
je 0xd7a8
movq (%rbp), %rbx
movq 0x8(%rbp), %r15
cmpq %r15, %rbx
je 0xd79d
movl (%rbx), %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0xd60a
movq %r13, %rdi
movq %r12, %rsi
callq 0xdd56
movq %r12, %rdi
callq 0x20d0
addq $0x4, %rbx
jmp 0xd772
addq $0x18, %rbp
movq 0x28(%rsp), %r15
jmp 0xd763
leaq 0x30(%r14), %rax
movq %rax, 0x18(%rsp)
leaq 0x18(%r15), %rax
movq %rax, 0x50(%rsp)
pushq $0x1
popq %rbp
leaq 0x30(%rsp), %r13
leaq 0x58(%rsp), %rbx
cmpl 0x48(%r14), %ebp
jg 0xd8b6
movq %r13, %rdi
movl %ebp, %esi
callq 0xdb28
movq %rbx, %rdi
movq %r13, %rsi
callq 0xdb0e
movq %rax, %r12
movq %r13, %rdi
callq 0x20d0
testq %r12, %r12
jne 0xd8af
movq %r13, %rdi
movl %ebp, %esi
callq 0xdb28
movq %rbx, %r12
movq 0x18(%rsp), %rdi
movq %r13, %rsi
callq 0xdf64
movq %r13, %rdi
callq 0x20d0
movq 0x38(%r14), %rbx
subq 0x30(%r14), %rbx
movq %r13, %rdi
movl %ebp, %esi
callq 0xdb28
movq %r14, %rdi
movq %r13, %rsi
callq 0xdb82
shrq $0x5, %rbx
movl %ebx, (%rax)
movq %r13, %rdi
callq 0x20d0
movq 0x38(%r14), %rax
subq 0x30(%r14), %rax
shrq $0x5, %rax
movl %eax, 0x24(%rsp)
movq %r13, %rdi
leaq 0x24(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0xf(%rsp), %rcx
callq 0xdbe8
movq %r15, %rdi
movq %r13, %rsi
callq 0xe194
movq %r12, %rbx
movq %r13, %rdi
callq 0x38e4
movq 0x8(%r15), %rax
subq (%r15), %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
cmpq $0x2, %rax
jb 0xd8af
decl %eax
andl $0x0, 0x30(%rsp)
movl %eax, 0x34(%rsp)
movq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0x92ce
incl %ebp
jmp 0xd7c7
leaq 0x58(%rsp), %rdi
callq 0xdcb8
movq (%r15), %rax
movq 0x8(%r15), %rcx
xorl %ebp, %ebp
cmpq %rcx, %rax
je 0xd8e6
movq 0x8(%rax), %rdx
subq (%rax), %rdx
shrq $0x2, %rdx
cmpl %edx, %ebp
cmovgl %ebp, %edx
addq $0x18, %rax
movl %edx, %ebp
jmp 0xd8c9
movq %r14, %rbx
movb 0x4c(%r14), %r14b
leaq 0x132e3(%rip), %rsi     # 0x20bd7
movq 0x10(%rsp), %rdi
callq 0x2210
movq %rax, %rdi
movq 0x8(%r15), %rax
subq (%r15), %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
movq %rax, %rsi
callq 0x2160
leaq 0x1440e(%rip), %r12     # 0x21d2d
movq %rax, %rdi
movq %r12, %rsi
callq 0x2210
movq %rax, %rdi
movl %ebp, %esi
callq 0x2330
movq %rax, %rdi
movq %r12, %rsi
callq 0x2210
testb %r14b, %r14b
je 0xd954
movq %rbx, %r13
movl 0x48(%rbx), %esi
movq %rax, %rdi
callq 0x2330
jmp 0xd96b
movq 0x38(%rbx), %rsi
movq %rbx, %r13
subq 0x30(%rbx), %rsi
sarq $0x5, %rsi
movq %rax, %rdi
callq 0x2160
movq %rax, %rdi
xorl %r14d, %r14d
leaq 0x58(%rsp), %r12
pushq $0xa
popq %rsi
callq 0x2280
movq 0x8(%r15), %rax
subq (%r15), %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
cltq
cmpq %rax, %r14
jge 0xda21
movq 0x10(%rsp), %rdi
leaq 0x13239(%rip), %rsi     # 0x20bdd
callq 0x2210
leaq 0x1(%r14), %rsi
movq %rax, %rdi
movq %rsi, 0x18(%rsp)
callq 0x2330
movq (%r15), %rax
imulq $0x18, %r14, %rcx
movq (%rax,%rcx), %rbx
movq 0x8(%rax,%rcx), %r15
cmpq %r15, %rbx
je 0xda0d
movl (%rbx), %r14d
movq 0x10(%rsp), %rdi
leaq 0x1434f(%rip), %rsi     # 0x21d2d
callq 0x2210
movq %rax, %rbp
movq %r12, %rdi
movq %r13, %rsi
movl %r14d, %edx
callq 0xd60a
movq %rbp, %rdi
movq %r12, %rsi
callq 0x21f0
movq %r12, %rdi
callq 0x20d0
addq $0x4, %rbx
jmp 0xd9ca
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r14
movq 0x28(%rsp), %r15
jmp 0xd976
movq 0x18(%r15), %r12
movq 0x20(%r15), %r13
leaq 0x142fd(%rip), %r14     # 0x21d2d
pushq $0xa
popq %rbp
cmpq %r13, %r12
je 0xda76
movl (%r12), %esi
movl 0x4(%r12), %r15d
incl %esi
movq 0x10(%rsp), %rdi
callq 0x2330
movq %rax, %rdi
movq %r14, %rsi
callq 0x2210
incl %r15d
movq %rax, %rdi
movl %r15d, %esi
callq 0x2330
movq %rax, %rdi
movl %ebp, %esi
callq 0x2280
addq $0x8, %r12
jmp 0xda33
movq 0x10(%rsp), %rdi
callq 0x2170
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xdab1
jmp 0xdab1
jmp 0xdab1
jmp 0xdab6
jmp 0xdab1
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x38e4
jmp 0xdac3
jmp 0xdab6
jmp 0xdab1
jmp 0xdab6
movq %rax, %rbx
jmp 0xdac3
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x20d0
leaq 0x58(%rsp), %rdi
callq 0xdcb8
jmp 0xdadc
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2340