// File: /workspace/github_cpp_makefile_star2_O1/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, 0x40(%rsp)
movq %rdi, %rbx
cmpb $0x1, 0x4c(%rdi)
movq %rdx, 0x38(%rsp)
jne 0x11e42
leaq 0x60(%rsp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq (%r15), %rax
movq 0x8(%r15), %rcx
movq %rcx, 0x48(%rsp)
cmpq %rcx, %rax
je 0x11b50
leaq 0x18(%rsp), %rbp
leaq 0x8(%rsp), %r12
leaq 0x58(%rsp), %r13
movq (%rax), %r15
movq %rax, 0x28(%rsp)
movq 0x8(%rax), %r14
cmpq %r14, %r15
je 0x11b40
movslq (%r15), %rax
movq 0x30(%rbx), %rcx
shlq $0x5, %rax
movq %rbp, 0x8(%rsp)
movq -0x20(%rcx,%rax), %rsi
movq -0x18(%rcx,%rax), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x83f0
movq %r13, %rdi
movq %r12, %rsi
callq 0x12330
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11b3a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
addq $0x4, %r15
jmp 0x11aee
movq 0x28(%rsp), %rax
addq $0x18, %rax
cmpq 0x48(%rsp), %rax
jne 0x11ae2
cmpl $0x0, 0x48(%rbx)
leaq 0x60(%rsp), %r14
jle 0x11e33
leaq 0x30(%rbx), %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x48(%rsp)
movl $0x1, %r13d
movl $0xd1b71759, %ebp       # imm = 0xD1B71759
movl $0x1, %r12d
cmpl $0xa, %r13d
jb 0x11bcf
movl $0x4, %r12d
movl %r13d, %eax
cmpl $0x63, %eax
jbe 0x11bc6
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x11bcc
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x11bcf
movl %eax, %ecx
imulq %rbp, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x11b96
addl $-0x3, %r12d
jmp 0x11bcf
addl $-0x2, %r12d
jmp 0x11bcf
decl %r12d
movl %r12d, %esi
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl $0x2d, %edx
callq 0x2270
movq 0x8(%rsp), %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x1221d
leaq 0x58(%rsp), %rdi
movq %r15, %rsi
callq 0x124c2
movq %rax, %r12
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x11c2a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
cmpq %r14, %r12
jne 0x11e22
movl $0x1, %r12d
cmpl $0xa, %r13d
leaq 0x8(%rsp), %r14
jb 0x11c86
movl $0x4, %r12d
movl %r13d, %eax
cmpl $0x63, %eax
jbe 0x11c7d
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x11c83
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x11c86
movl %eax, %ecx
imulq %rbp, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x11c4d
addl $-0x3, %r12d
jmp 0x11c86
addl $-0x2, %r12d
jmp 0x11c86
decl %r12d
movl %r12d, %esi
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r14, %rdi
movl $0x2d, %edx
callq 0x2270
movq 0x8(%rsp), %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x1221d
movq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x1254c
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x11cd9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
movq 0x38(%rbx), %r14
subq 0x30(%rbx), %r14
movl $0x1, %r12d
cmpl $0xa, %r13d
jb 0x11d2f
movl $0x4, %r12d
movl %r13d, %eax
cmpl $0x63, %eax
jbe 0x11d26
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x11d2c
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x11d2f
movl %eax, %ecx
imulq %rbp, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x11cf6
addl $-0x3, %r12d
jmp 0x11d2f
addl $-0x2, %r12d
jmp 0x11d2f
decl %r12d
movl %r12d, %esi
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl $0x2d, %edx
callq 0x2270
movq 0x8(%rsp), %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x1221d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1215c
shrq $0x5, %r14
movl %r14d, (%rax)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x11d8c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
movq 0x38(%rbx), %rax
subq 0x30(%rbx), %rax
shrq $0x5, %rax
movl %eax, 0x54(%rsp)
movl $0x1, %edx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
leaq 0x54(%rsp), %rsi
leaq 0x37(%rsp), %rcx
callq 0x121d8
leaq 0x60(%rsp), %r14
movq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0x12836
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x11de1
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq 0x38(%rsp), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq $0x2, %rax
jb 0x11e22
decl %eax
movl $0x0, 0x8(%rsp)
movl %eax, 0xc(%rsp)
movq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xafe4
leal 0x1(%r13), %eax
cmpl 0x48(%rbx), %r13d
movl %eax, %r13d
jl 0x11b81
leaq 0x58(%rsp), %rdi
callq 0x1228a
movq 0x38(%rsp), %r15
movq (%r15), %rax
movq 0x8(%r15), %rcx
cmpq %rcx, %rax
je 0x11e70
xorl %edx, %edx
movq 0x8(%rax), %r12
subq (%rax), %r12
shrq $0x2, %r12
cmpl %r12d, %edx
cmovgl %edx, %r12d
addq $0x18, %rax
movl %r12d, %edx
cmpq %rcx, %rax
jne 0x11e50
jmp 0x11e73
xorl %r12d, %r12d
movb 0x4c(%rbx), %al
movb %al, 0x28(%rsp)
leaq 0x18d46(%rip), %rsi     # 0x2abc7
movl $0x5, %edx
movq %rbx, %r14
movq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x2250
movq 0x8(%r15), %rsi
subq (%r15), %rsi
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
movq %rbx, %rdi
callq 0x2150
movq %rax, %r13
leaq 0x19e5c(%rip), %rbp     # 0x2bd1d
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2250
movq %r13, %rdi
movl %r12d, %esi
callq 0x2300
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2250
cmpb $0x0, 0x28(%rsp)
je 0x11f07
movq %r14, %r13
movl 0x48(%r14), %esi
movq %r12, %rdi
callq 0x2300
jmp 0x11f1e
movq 0x38(%r14), %rsi
movq %r14, %r13
subq 0x30(%r14), %rsi
sarq $0x5, %rsi
movq %r12, %rdi
callq 0x2150
leaq 0x58(%rsp), %rsi
movb $0xa, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x2250
movq 0x38(%rsp), %r12
movq 0x8(%r12), %rax
subq (%r12), %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
testl %eax, %eax
movq 0x40(%rsp), %rbx
jle 0x1204f
leaq 0x68(%rsp), %r14
xorl %r15d, %r15d
movq 0x40(%rsp), %rbp
movl $0x2, %edx
movq %rbx, %rdi
leaq 0x18c59(%rip), %rsi     # 0x2abcd
callq 0x2250
leaq 0x1(%r15), %rsi
movq %rbx, %rdi
movq %rsi, 0x28(%rsp)
callq 0x2300
movq (%r12), %rax
leaq (%r15,%r15,2), %rcx
movq (%rax,%rcx,8), %r12
movq 0x8(%rax,%rcx,8), %r15
cmpq %r15, %r12
je 0x1200b
movslq (%r12), %rbx
movl $0x1, %edx
movq %rbp, %rdi
leaq 0x19d6a(%rip), %rsi     # 0x2bd1d
callq 0x2250
movq 0x30(%r13), %rax
shlq $0x5, %rbx
movq %r14, 0x58(%rsp)
movq -0x20(%rax,%rbx), %rsi
movq -0x18(%rax,%rbx), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rdi
callq 0x83f0
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq %rbp, %rdi
callq 0x2250
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x12005
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x2210
addq $0x4, %r12
jmp 0x11f9b
movb $0xa, 0x58(%rsp)
movl $0x1, %edx
movq 0x40(%rsp), %rbx
movq %rbx, %rdi
leaq 0x58(%rsp), %rsi
callq 0x2250
movq 0x38(%rsp), %r12
movq 0x8(%r12), %rax
subq (%r12), %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
cltq
movq 0x28(%rsp), %r15
cmpq %rax, %r15
jl 0x11f65
movq 0x18(%r12), %r13
movq 0x20(%r12), %r14
cmpq %r14, %r13
je 0x120bb
leaq 0x58(%rsp), %r15
movl (%r13), %esi
movl 0x4(%r13), %ebp
incl %esi
movq %rbx, %rdi
callq 0x2300
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x19c96(%rip), %rsi     # 0x2bd1d
callq 0x2250
incl %ebp
movq %r12, %rdi
movq 0x40(%rsp), %rbx
movl %ebp, %esi
callq 0x2300
movb $0xa, 0x58(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2250
addq $0x8, %r13
cmpq %r14, %r13
jne 0x12063
movq %rbx, %rdi
callq 0x2160
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1210e
jmp 0x1210e
jmp 0x1210e
jmp 0x120fa
jmp 0x1210e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1212d
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
jmp 0x12128
jmp 0x120fa
jmp 0x1210e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
jne 0x12120
jmp 0x1212d
movq %rax, %rbx
jmp 0x1212d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1212d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
leaq 0x58(%rsp), %rdi
callq 0x1228a
jmp 0x12153
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x12153
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2310
nop