// File: /workspace/github_cpp_makefile_star2_O3/iTruth[P]klotski/klotski_board.cpp
// Function: klotski_board::print_board(std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>> const&, int, int, bool, std::ostream&)
void klotski_board::print_board(const situation_type& situation, int dx, int dy, bool display_board, std::ostream& os){
	int space_n = 0;
	int max_n = dx*dy;
	while(max_n != 0){
		max_n/=10;
		++space_n;
	}
	if(space_n < 2){
		space_n = 2;
	}

	std::stringstream output_stream;
	if(display_board){
		output_stream<<std::left<<std::setw(space_n)<<"+"<<" ";
		for(int j=0; j<dx; ++j){
			output_stream<<std::setw(space_n)<<j<<" ";
		}
		output_stream<<std::endl;
		print_line(dx, space_n, output_stream);
		for(int i=0; i<dy; ++i){
			output_stream<<std::setw(space_n)<<i<<"|";
			for(int j=0; j<dx; ++j){
				if(situation[i][j] == 0){
					output_stream<<std::setw(space_n)<<" "<<"|";
				}else{
					output_stream<<std::setw(space_n)<<situation[i][j]<<"|";
				}
			}
			output_stream<<std::endl;
			print_line(dx, space_n, output_stream);
		}
	}else{
		for(int i=0; i<dy; ++i){
			for(int j=0; j<dx; ++j){
				output_stream<<std::setw(space_n)<<situation[i][j]<<" ";
			}
			output_stream<<std::endl;
		}
	}
	os<<output_stream.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %r8, 0x20(%rsp)
movl %ecx, %ebx
movl %edx, %ebp
movq %rdi, %r14
movl %edx, %ecx
movl %esi, 0xc(%rsp)
imull %esi, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x6c35
movslq %ecx, %rdx
imulq $0x66666667, %rdx, %rcx # imm = 0x66666667
movq %rcx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rcx
addl %esi, %ecx
incl %eax
addl $0x9, %edx
cmpl $0x12, %edx
ja 0x6c14
cmpl $0x3, %eax
movl $0x2, %r12d
cmovael %eax, %r12d
leaq 0x50(%rsp), %rdi
callq 0x3180
testb %bl, %bl
je 0x6e3f
movl %ebp, 0x10(%rsp)
leaq 0x60(%rsp), %rbx
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl $0xffffff4f, %edx       # imm = 0xFFFFFF4F
andl 0x78(%rsp,%rcx), %edx
orl $0x20, %edx
movl %edx, 0x78(%rsp,%rcx)
movq -0x18(%rax), %rax
movl %r12d, %ebp
movq %rbp, 0x70(%rsp,%rax)
leaq 0x3a5b(%rip), %rsi      # 0xa6e2
movl $0x1, %edx
movq %rbx, %rdi
callq 0x3290
leaq 0x375e(%rip), %rsi      # 0xa3f9
movl $0x1, %edx
movq %rbx, %rdi
callq 0x3290
cmpl $0x0, 0xc(%rsp)
jle 0x6cea
xorl %ebx, %ebx
leaq 0x3741(%rip), %r15      # 0xa3f9
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
movq %rbp, 0x70(%rsp,%rax)
leaq 0x60(%rsp), %rdi
movl %ebx, %esi
callq 0x33c0
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x3290
incl %ebx
cmpl %ebx, 0xc(%rsp)
jne 0x6cb8
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rdi
leaq 0x60(%rsp), %r13
addq %r13, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movl 0xc(%rsp), %edi
movl %r12d, %esi
movq %r13, %rdx
callq 0x6fb8
movl 0x10(%rsp), %eax
testl %eax, %eax
jle 0x6ef4
movl %eax, %eax
movq %rax, 0x28(%rsp)
movl 0xc(%rsp), %r15d
xorl %esi, %esi
movl %r12d, 0x18(%rsp)
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
movq %rbp, 0x70(%rsp,%rax)
movq %r13, %rdi
movq %rsi, 0x10(%rsp)
callq 0x33c0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3974(%rip), %rsi      # 0xa6e4
callq 0x3290
cmpl $0x0, 0xc(%rsp)
jle 0x6de9
movq 0x10(%rsp), %rax
leaq (%rax,%rax,2), %r13
xorl %r12d, %r12d
movq (%r14), %rax
movq (%rax,%r13,8), %rax
movl (%rax,%r12,4), %esi
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
movq %rbp, 0x70(%rsp,%rax)
testl %esi, %esi
je 0x6db1
leaq 0x60(%rsp), %rdi
callq 0x33c0
jmp 0x6dcd
movl $0x1, %edx
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
leaq 0x3634(%rip), %rsi      # 0xa3f9
callq 0x3290
movq %rbx, %rax
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3908(%rip), %rsi      # 0xa6e4
callq 0x3290
incq %r12
cmpq %r12, %r15
jne 0x6d88
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rdi
leaq 0x60(%rsp), %r13
addq %r13, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movl 0xc(%rsp), %edi
movl 0x18(%rsp), %esi
movq %r13, %rdx
callq 0x6fb8
movq 0x10(%rsp), %rsi
incq %rsi
cmpq 0x28(%rsp), %rsi
jne 0x6d46
jmp 0x6ef4
testl %ebp, %ebp
jle 0x6ef4
leaq 0x60(%rsp), %rbx
movl %r12d, %r12d
movl %ebp, %eax
movq %rax, 0x18(%rsp)
movl 0xc(%rsp), %ebp
movq $0x0, 0x10(%rsp)
cmpl $0x0, 0xc(%rsp)
jle 0x6eb3
movq 0x10(%rsp), %rax
leaq (%rax,%rax,2), %r13
xorl %r15d, %r15d
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
movq %r12, 0x70(%rsp,%rax)
movq (%r14), %rax
movq (%rax,%r13,8), %rax
movl (%rax,%r15,4), %esi
movq %rbx, %rdi
callq 0x33c0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3553(%rip), %rsi      # 0xa3f9
callq 0x3290
incq %r15
cmpq %r15, %rbp
jne 0x6e76
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq 0x10(%rsp), %rcx
incq %rcx
movq %rcx, 0x10(%rsp)
cmpq 0x18(%rsp), %rcx
jne 0x6e63
leaq 0x68(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x3360
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x3290
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6f32
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x803f(%rip), %rsi      # 0xef78
leaq 0x50(%rsp), %rdi
callq 0x31c0
leaq 0xd0(%rsp), %rdi
callq 0x3090
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6f91
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x6f91
jmp 0x6f8e
jmp 0x6f8e
jmp 0x6f8e
jmp 0x6f8e
jmp 0x6f8e
jmp 0x6f8e
movq %rax, %rbx
movq 0x7fe0(%rip), %rsi      # 0xef78
leaq 0x50(%rsp), %rdi
callq 0x31c0
leaq 0xd0(%rsp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x33d0
nop