// File: /workspace/github_cpp_makefile_star2_O2/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, %r15
movl %ecx, %ebx
movq %rdi, %r12
movq %rdx, %r13
movl %edx, %eax
movq %rsi, 0x10(%rsp)
imull %esi, %eax
xorl %ecx, %ecx
pushq $0xa
popq %rsi
testl %eax, %eax
je 0x6308
cltd
idivl %esi
incl %ecx
jmp 0x62fd
cmpl $0x3, %ecx
pushq $0x2
popq %rbp
cmovael %ecx, %ebp
leaq 0x50(%rsp), %rdi
callq 0x3180
leaq 0x60(%rsp), %rdi
movl %ebp, 0xc(%rsp)
movl %ebp, %r14d
testb %bl, %bl
movq %r15, 0x28(%rsp)
je 0x63bd
movq 0x60(%rsp), %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
movq %r14, 0x70(%rsp,%rax)
leaq 0x4355(%rip), %rsi      # 0xa6b2
callq 0x3240
leaq 0x4090(%rip), %rsi      # 0xa3f9
movq %rax, %rdi
callq 0x3240
xorl %ebx, %ebx
movq 0x10(%rsp), %rax
testl %eax, %eax
movl $0x0, %r15d
cmovgl %eax, %r15d
leaq 0x406e(%rip), %rbp      # 0xa3f9
cmpl %ebx, %r15d
je 0x6440
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
movq %r14, 0x70(%rsp,%rax)
leaq 0x60(%rsp), %rdi
movl %ebx, %esi
callq 0x33b0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x3240
incl %ebx
jmp 0x638b
xorl %eax, %eax
movq 0x10(%rsp), %rbp
testl %ebp, %ebp
cmovlel %eax, %ebp
testl %r13d, %r13d
cmovlel %eax, %r13d
movq %r13, 0x20(%rsp)
leaq 0x401d(%rip), %rbx      # 0xa3f9
cmpq 0x20(%rsp), %rax
je 0x6534
movq %rax, 0x18(%rsp)
imulq $0x18, %rax, %r15
xorl %r13d, %r13d
cmpq %r13, %rbp
je 0x642c
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
movq %r14, 0x70(%rsp,%rax)
movq (%r12), %rax
movq (%rax,%r15), %rax
movl (%rax,%r13,4), %esi
leaq 0x60(%rsp), %rdi
callq 0x33b0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3240
incq %r13
jmp 0x63f3
leaq 0x60(%rsp), %rdi
callq 0x30f0
movq 0x18(%rsp), %rax
incq %rax
jmp 0x63dc
leaq 0x60(%rsp), %rdi
callq 0x30f0
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
leaq 0x60(%rsp), %rbp
movq %rbp, %rdx
callq 0x65a8
xorl %eax, %eax
testl %r13d, %r13d
cmovlel %eax, %r13d
movq %r13, 0x20(%rsp)
xorl %r13d, %r13d
movl %r15d, %ebx
movq %rbp, %r15
leaq 0x4236(%rip), %rbp      # 0xa6b4
cmpq 0x20(%rsp), %r13
je 0x6534
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
movq %r14, 0x70(%rsp,%rax)
movq %r15, %rdi
movl %r13d, %esi
callq 0x33b0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x3240
movq %r13, 0x18(%rsp)
imulq $0x18, %r13, %r15
xorl %r13d, %r13d
cmpq %r13, %rbx
je 0x6509
movq (%r12), %rax
movq (%rax,%r15), %rax
movl (%rax,%r13,4), %esi
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
movq %r14, 0x70(%rsp,%rax)
testl %esi, %esi
je 0x64e8
leaq 0x60(%rsp), %rdi
callq 0x33b0
jmp 0x64f9
leaq 0x60(%rsp), %rdi
leaq 0x3f05(%rip), %rsi      # 0xa3f9
callq 0x3240
movq %rax, %rdi
movq %rbp, %rsi
callq 0x3240
incq %r13
jmp 0x64b9
leaq 0x60(%rsp), %r15
movq %r15, %rdi
callq 0x30f0
movq 0x18(%rsp), %r13
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
movq %r15, %rdx
callq 0x65a8
incq %r13
jmp 0x647e
leaq 0x68(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x3350
leaq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0x3210
leaq 0x30(%rsp), %rdi
callq 0x30e0
leaq 0x50(%rsp), %rdi
callq 0x31c0
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x30e0
jmp 0x6596
jmp 0x6593
jmp 0x6593
jmp 0x6593
jmp 0x6593
jmp 0x6593
jmp 0x6593
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x31c0
movq %rbx, %rdi
callq 0x33c0