// File: iTruth[P]klotski/klotski_board.cpp
// Function: klotski_board::klotski_board(std::basic_fstream<char, std::char_traits<char>>&, int, int)
klotski_board::klotski_board(std::fstream& file, int dx, int dy):
	dx(dx), dy(dy),
	x_distribution(std::uniform_int_distribution<>(0, dx-1)),
	y_distribution(std::uniform_int_distribution<>(0, dy-1)){
		if(!file.is_open()){
			throw std::runtime_error("file is not open");
		}
		resize_board_to_fit();
		for(auto& i:situation){
			for(int& n: i){
				if(file.eof()){
					throw std::runtime_error("file is not fit");
				}
				file>>n;
				if(file.fail()){
					throw std::runtime_error("file is not a valid board file");
				}

			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x70(%rbp)
leaq 0x17460(%rip), %rax     # 0x23ca8
movq %rax, (%rdi)
movl -0x14(%rbp), %eax
movl %eax, 0x8(%rdi)
movl -0x18(%rbp), %eax
movl %eax, 0xc(%rdi)
movl $0x0, 0x10(%rdi)
movl $0x0, 0x14(%rdi)
addq $0x18, %rdi
movq %rdi, -0x78(%rbp)
callq 0xb7d0
movq -0x70(%rbp), %rdi
addq $0x30, %rdi
movl -0x14(%rbp), %edx
decl %edx
xorl %esi, %esi
callq 0xb7f0
jmp 0xc888
movq -0x70(%rbp), %rdi
addq $0x38, %rdi
movl -0x18(%rbp), %edx
decl %edx
xorl %esi, %esi
callq 0xb7f0
jmp 0xc89e
movq -0x70(%rbp), %rdi
addq $0x40, %rdi
movsd 0xb842(%rip), %xmm0     # 0x180f0
callq 0xb820
jmp 0xc8b5
movq -0x10(%rbp), %rdi
callq 0x34c0
movb %al, -0x79(%rbp)
jmp 0xc8c3
movb -0x79(%rbp), %al
testb $0x1, %al
jne 0xc93e
jmp 0xc8cc
movl $0x10, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x88(%rbp)
leaq 0xbe47(%rip), %rsi      # 0x18731
callq 0x30d0
jmp 0xc8f1
movq -0x88(%rbp), %rdi
movq 0x176f1(%rip), %rsi     # 0x23ff0
movq 0x1768a(%rip), %rdx     # 0x23f90
callq 0x34b0
jmp 0xcb2b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xcb19
movq -0x88(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x3210
jmp 0xcb19
movq -0x70(%rbp), %rdi
callq 0xc7a0
jmp 0xc949
movq -0x70(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x8f50
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x8f80
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xb880
testb $0x1, %al
jne 0xc985
jmp 0xcb10
leaq -0x38(%rbp), %rdi
callq 0x9800
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0xafb0
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
callq 0xae40
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xb8c0
testb $0x1, %al
jne 0xc9ca
jmp 0xcb00
leaq -0x58(%rbp), %rdi
callq 0xb900
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3510
movb %al, -0x89(%rbp)
jmp 0xc9f2
movb -0x89(%rbp), %al
testb $0x1, %al
jne 0xc9fe
jmp 0xca5f
movl $0x10, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x98(%rbp)
leaq 0xbd26(%rip), %rsi      # 0x18742
callq 0x30d0
jmp 0xca23
movq -0x98(%rbp), %rdi
movq 0x175bf(%rip), %rsi     # 0x23ff0
movq 0x17558(%rip), %rdx     # 0x23f90
callq 0x34b0
jmp 0xcb2b
movq -0x98(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x3210
jmp 0xcb19
movq -0x10(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x3190
jmp 0xca6e
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3030
movb %al, -0x99(%rbp)
jmp 0xca89
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0xca95
jmp 0xcaf0
movl $0x10, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xa8(%rbp)
leaq 0xb977(%rip), %rsi      # 0x1842a
callq 0x30d0
jmp 0xcaba
movq -0xa8(%rbp), %rdi
movq 0x17528(%rip), %rsi     # 0x23ff0
movq 0x174c1(%rip), %rdx     # 0x23f90
callq 0x34b0
jmp 0xcb2b
movq -0xa8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x3210
jmp 0xcb19
jmp 0xcaf2
leaq -0x58(%rbp), %rdi
callq 0xb9f0
jmp 0xc9b4
jmp 0xcb02
leaq -0x38(%rbp), %rdi
callq 0x9820
jmp 0xc96f
addq $0xb0, %rsp
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x74b0
movq -0x20(%rbp), %rdi
callq 0x34e0
nopl (%rax,%rax)