// File: /workspace/github_cpp_makefile_star2_O3/SilentAssassinMa[P]Sudoku-Solver/SudokuSolver.cpp
// Function: SudokuSolver::SudokuSolver(char const*)
SudokuSolver::SudokuSolver(const char *inputfilename)
{
    ifstream infile;
    infile.open(inputfilename, ios::in);

    for (int i = 0; i < 81; i++)
    {
        infile >> OriginalSudoku[i];
        if (OriginalSudoku[i] < 0 || OriginalSudoku[i] > 9)
        {
            cout << "Error : Input Sudoku Is Wrong !" << endl;
            isSolvable = false;
            return;
        }

        isChangeable[i] = OriginalSudoku[i] == 0 ? true : false;
        Current[i] = OriginalSudoku[i];
    }

    if (!CheckConsistency(OriginalSudoku))
    {
        cout << "Error : Input Sudoku Is Wrong !" << endl;
        isSolvable = false;
        return;
    }

    if (!CheckEmpty(OriginalSudoku))
    {
        cout << "Error : The Input Sudoku Has Already Been Fiiled Out" << endl;
        isSolvable = false;
        return;
    }

    infile.close();

    isSolvable = true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x379e(%rip), %rax      # 0x5d60
movq %rax, (%rdi)
leaq 0x8(%rdi), %r14
movl $0x2d9, %edx            # imm = 0x2D9
movq %r14, %rdi
xorl %esi, %esi
callq 0x20c0
xorps %xmm0, %xmm0
movups %xmm0, 0x2e8(%rbx)
movups %xmm0, 0x2f8(%rbx)
movups %xmm0, 0x308(%rbx)
movq %rsp, %rdi
callq 0x2180
movq %rsp, %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x20e0
movl $0x290, %r13d           # imm = 0x290
movq %rsp, %r15
movq %r14, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x20d0
movl (%r12), %eax
cmpl $0xa, %eax
jae 0x2677
testl %eax, %eax
sete (%rbx,%r13)
movl %eax, 0x144(%r12)
addq $0x4, %r12
incq %r13
cmpq $0x2e1, %r13            # imm = 0x2E1
jne 0x2614
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x20(%rax)
testb %al, %al
je 0x26bf
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x28(%rax)
testb %al, %al
je 0x26cd
movb $0x1, %bpl
movq %rsp, %rdi
callq 0x2040
jmp 0x2715
movq 0x395a(%rip), %r14      # 0x5fd8
leaq 0x19db(%rip), %rsi      # 0x4060
movl $0x1f, %edx
movq %r14, %rdi
callq 0x2190
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq 0x3928(%rip), %rdi      # 0x5fd8
callq 0x2030
movq %rax, %rdi
callq 0x2100
jmp 0x2713
movl $0x1f, %edx
leaq 0x1995(%rip), %rsi      # 0x4060
jmp 0x26d9
movl $0x34, %edx
leaq 0x19a7(%rip), %rsi      # 0x4080
movq 0x38f8(%rip), %r14      # 0x5fd8
movq %r14, %rdi
callq 0x2190
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq 0x38d2(%rip), %rdi      # 0x5fd8
callq 0x2030
movq %rax, %rdi
callq 0x2100
xorl %ebp, %ebp
movb %bpl, 0x2e1(%rbx)
movq %rsp, %rdi
callq 0x2050
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x274a
jmp 0x273f
jmp 0x273f
movq %rax, %r14
movq %rsp, %rdi
callq 0x2050
leaq 0x2e8(%rbx), %r15
leaq 0x300(%rbx), %rdi
callq 0x38b8
movq (%r15), %rdi
testq %rdi, %rdi
je 0x2774
movq 0x2f8(%rbx), %rsi
subq %rdi, %rsi
callq 0x2170
movq %r14, %rdi
callq 0x2220