// File: /workspace/github_cpp_makefile_star2_O1/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 0x6c65
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 0x6c44
cmpl $0x3, %eax
movl $0x2, %r12d
cmovael %eax, %r12d
leaq 0x50(%rsp), %rdi
callq 0x3180
testb %bl, %bl
je 0x6e91
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 0x39fb(%rip), %rsi      # 0xa6b2
movl $0x1, %edx
movq %rbx, %rdi
callq 0x3290
leaq 0x372e(%rip), %rsi      # 0xa3f9
movl $0x1, %edx
movq %rbx, %rdi
callq 0x3290
cmpl $0x0, 0xc(%rsp)
jle 0x6d1a
xorl %ebx, %ebx
leaq 0x3711(%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 0x6ce8
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 0x700a
movl 0x10(%rsp), %eax
testl %eax, %eax
jle 0x6f46
movl %eax, %eax
movq %rax, 0x28(%rsp)
movl 0xc(%rsp), %r15d
xorl %ebx, %ebx
movl %r12d, 0x18(%rsp)
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
movq %rbp, 0x70(%rsp,%rax)
movq %r13, %rdi
movl %ebx, %esi
callq 0x33c0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3917(%rip), %rsi      # 0xa6b4
callq 0x3290
cmpl $0x0, 0xc(%rsp)
jle 0x6e40
leaq (%rbx,%rbx,2), %r13
xorl %r12d, %r12d
movq %r13, 0x10(%rsp)
movq (%r14), %rax
movq (%rax,%r13,8), %rax
movl (%rax,%r12,4), %esi
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
testl %esi, %esi
je 0x6de2
movq %rbp, 0x70(%rsp,%rax)
leaq 0x60(%rsp), %rdi
callq 0x33c0
jmp 0x6e20
movq %rbp, 0x70(%rsp,%rax)
movl $0x1, %edx
movq %r15, %r13
movq %r14, %r15
movq %rbp, %r14
movq %rbx, %rbp
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
leaq 0x35f2(%rip), %rsi      # 0xa3f9
callq 0x3290
movq %rbx, %rax
movq %rbp, %rbx
movq %r14, %rbp
movq %r15, %r14
movq %r13, %r15
movq 0x10(%rsp), %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3885(%rip), %rsi      # 0xa6b4
callq 0x3290
incq %r12
cmpq %r12, %r15
jne 0x6db9
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 0x700a
incq %rbx
cmpq 0x28(%rsp), %rbx
jne 0x6d76
jmp 0x6f46
testl %ebp, %ebp
jle 0x6f46
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 0x6f05
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 0x3501(%rip), %rsi      # 0xa3f9
callq 0x3290
incq %r15
cmpq %r15, %rbp
jne 0x6ec8
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 0x6eb5
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 0x6f84
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x7fed(%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 0x6fe3
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x6fe3
jmp 0x6fe0
jmp 0x6fe0
jmp 0x6fe0
jmp 0x6fe0
jmp 0x6fe0
jmp 0x6fe0
movq %rax, %rbx
movq 0x7f8e(%rip), %rsi      # 0xef78
leaq 0x50(%rsp), %rdi
callq 0x31c0
leaq 0xd0(%rsp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x33d0
nop