// File: /workspace/github_cpp_makefile_star2_O1/bestcoder12[P]Sudoku_Game/functions.cpp
// Function: s_brd::Sudoku::Sudoku()
Sudoku::Sudoku() 
{
	/*
	 * Taking a string input for difficulty of the board so as 
	 * to enhance the readablity of the code and to remember 
	 * what value corresponds to which difficulty 
	 */
	
    string Difficulty; 
      
	cout << "Choose the difficulty from one of the below options: " << "\n";
	cout << "\n\tEasy\n";
	cout << "\tMedium\n";
	cout << "\tHard" << "\n";
	cout << "\n" << "\n";
	cout << "Your choice: ";		
	getline(cin,Difficulty); 
		
	
    if(Difficulty.compare("Easy") == 0) 
	{			
		filled = 30; 
	}
	else if(Difficulty.compare("Medium") == 0)
	{ 
		
		filled = 25; 
	}
	else if(Difficulty.compare("Hard") == 0)
	{
		
		filled = 20;  
	}
	else
	{
		cout << "Invalid option selected, defaulting to Easy..." << "\n";
		filled = 30;
	}

	/*
	 * Initializing the board with valid values
	 * that is initializing every element or cells of the board
	 * so as to have a solved board at the beginning from which 
	 * cells of required amount are unfilled.
	 */

	srand(time(0));
	
	/* Random numbers to be put in 1st row */
	int rand_nums[9];
	
	for (int o = 0; o < 9; o++)
	{
		rand_nums[o] = o+1; 
	}
	random_shuffle(rand_nums,rand_nums+9,mix_numbers);

	for (int i = 0; i < 9; i++)
	{
		
		board[0][i].set_Val(rand_nums[i],false);
	}
	
	for (int j = 1; j < 9; j++)
	{
		if (j%3 == 0)
		{
			shift_one(board,j);
		}
		else
		{
			shift_three(board,j);
		}
	}

	/* Copying solution board to sol_board */
	for (int k = 0; k < 9; k++)
	{
		for (int l = 0; l < 9; l++)
		{
			sol_board[k][l] = board[k][l];
		}
	}

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
movq 0x3b79(%rip), %rdi      # 0x5fc8
leaq 0x1bd2(%rip), %rsi      # 0x4028
movl $0x35, %edx
callq 0x2130
movq 0x3b61(%rip), %rdi      # 0x5fc8
leaq 0x1f70(%rip), %rsi      # 0x43de
movl $0x1, %edx
callq 0x2130
movq 0x3b49(%rip), %rdi      # 0x5fc8
leaq 0x1bd8(%rip), %rsi      # 0x405e
movl $0x7, %edx
callq 0x2130
movq 0x3b31(%rip), %rdi      # 0x5fc8
leaq 0x1bc8(%rip), %rsi      # 0x4066
movl $0x8, %edx
callq 0x2130
movq 0x3b19(%rip), %rdi      # 0x5fc8
leaq 0x1bb9(%rip), %rsi      # 0x406f
movl $0x5, %edx
callq 0x2130
movq 0x3b01(%rip), %rdi      # 0x5fc8
leaq 0x1f10(%rip), %rsi      # 0x43de
movl $0x1, %edx
callq 0x2130
movq 0x3ae9(%rip), %rdi      # 0x5fc8
leaq 0x1ef8(%rip), %rsi      # 0x43de
movl $0x1, %edx
callq 0x2130
movq 0x3ad1(%rip), %rdi      # 0x5fc8
leaq 0x1ee0(%rip), %rsi      # 0x43de
movl $0x1, %edx
callq 0x2130
movq 0x3ab9(%rip), %rdi      # 0x5fc8
leaq 0x1b5f(%rip), %rsi      # 0x4075
movl $0xd, %edx
callq 0x2130
movq 0x3ab1(%rip), %rdi      # 0x5fd8
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %edx
movq 0x3a96(%rip), %rdi      # 0x5fd8
movq %rsp, %rsi
callq 0x21c0
leaq 0x1b32(%rip), %rsi      # 0x4083
movq %rsp, %rdi
callq 0x2060
movl $0x1e, %ebp
testl %eax, %eax
je 0x25c6
leaq 0x1b1f(%rip), %rsi      # 0x4088
movq %rsp, %rdi
callq 0x2060
testl %eax, %eax
je 0x25ba
leaq 0x1af4(%rip), %rsi      # 0x4070
movq %rsp, %rdi
callq 0x2060
testl %eax, %eax
je 0x25c1
movq 0x3a39(%rip), %rdi      # 0x5fc8
leaq 0x1af9(%rip), %rsi      # 0x408f
movl $0x2e, %edx
callq 0x2130
movq 0x3a21(%rip), %rdi      # 0x5fc8
leaq 0x1e30(%rip), %rsi      # 0x43de
movl $0x1, %edx
callq 0x2130
jmp 0x25c6
movl $0x19, %ebp
jmp 0x25c6
movl $0x14, %ebp
movl %ebp, 0x288(%rbx)
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x20e0
movl %eax, %edi
callq 0x20f0
leaq 0x1(%r15), %rax
movl %eax, 0x20(%rsp,%r15,4)
movq %rax, %r15
cmpq $0x9, %rax
jne 0x25dd
movl $0x4, %r15d
movl $0x2, %ebp
callq 0x2050
cltd
idivl %ebp
movslq %edx, %rax
shlq $0x2, %rax
cmpq %rax, %r15
je 0x2620
movl 0x20(%rsp,%r15), %ecx
movl 0x20(%rsp,%rax), %edx
movl %edx, 0x20(%rsp,%r15)
movl %ecx, 0x20(%rsp,%rax)
addq $0x4, %r15
incl %ebp
cmpq $0x24, %r15
jne 0x25fa
xorl %eax, %eax
movl 0x20(%rsp,%rax,4), %ecx
movl %ecx, (%rbx,%rax,8)
movb $0x0, 0x4(%rbx,%rax,8)
incq %rax
cmpq $0x9, %rax
jne 0x262e
leaq 0x78(%rbx), %rsi
leaq 0x88(%rbx), %rdi
movl $0x1, %r8d
movabsq $-0x1c71c71c71c71c71, %r9 # imm = 0xE38E38E38E38E38F
movq %rbx, %r10
imull $0xaaaaaaab, %r8d, %eax # imm = 0xAAAAAAAB
cmpl $0x55555556, %eax       # imm = 0x55555556
jb 0x26ab
movl $0x6, %ecx
xorl %r11d, %r11d
movq %rcx, %rax
mulq %r9
andq $-0x8, %rdx
leaq (%rdx,%rdx,8), %rax
movq %rsi, %rdx
subq %rax, %rdx
movb 0x4(%r10,%r11,8), %al
movb %al, 0x4(%rdx,%r11,8)
movl (%r10,%r11,8), %eax
movl %eax, (%rdx,%r11,8)
incq %r11
incq %rcx
cmpq $0x9, %r11
jne 0x2677
jmp 0x26e5
movl $0x8, %ecx
xorl %r11d, %r11d
movq %rcx, %rax
mulq %r9
andq $-0x8, %rdx
leaq (%rdx,%rdx,8), %rax
movq %rdi, %rdx
subq %rax, %rdx
movb 0x4(%r10,%r11,8), %al
movb %al, 0x4(%rdx,%r11,8)
movl (%r10,%r11,8), %eax
movl %eax, (%rdx,%r11,8)
incq %r11
incq %rcx
cmpq $0x9, %r11
jne 0x26b3
incq %r8
addq $0x48, %rsi
addq $0x48, %r10
addq $0x48, %rdi
cmpq $0x9, %r8
jne 0x2661
addq $0x28c, %rbx            # imm = 0x28C
xorl %eax, %eax
xorl %ecx, %ecx
movb -0x288(%rbx,%rcx,8), %dl
movb %dl, 0x4(%rbx,%rcx,8)
movl -0x28c(%rbx,%rcx,8), %edx
movl %edx, (%rbx,%rcx,8)
incq %rcx
cmpq $0x9, %rcx
jne 0x2709
incq %rax
addq $0x48, %rbx
cmpq $0x9, %rax
jne 0x2707
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x274a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2120
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x276e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2120
movq %rbx, %rdi
callq 0x21b0