// File: 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
movq %rsp, %rbp
subq $0x2a0, %rsp            # imm = 0x2A0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x248(%rbp)
leaq 0x77d3(%rip), %rcx      # 0x9d48
addq $0x10, %rcx
movq %rcx, (%rax)
movq %rax, %rcx
addq $0x8, %rcx
movl $0x0, 0x8(%rax)
movq %rcx, %rax
addq $0x4, %rax
addq $0x144, %rcx            # imm = 0x144
movq %rcx, -0x240(%rbp)
movq %rax, -0x238(%rbp)
movq -0x238(%rbp), %rax
movq -0x240(%rbp), %rcx
movl $0x0, (%rax)
addq $0x4, %rax
cmpq %rcx, %rax
movq %rax, -0x238(%rbp)
jne 0x25a6
movq -0x248(%rbp), %rax
movq %rax, %rcx
addq $0x14c, %rcx            # imm = 0x14C
movl $0x0, 0x14c(%rax)
movq %rcx, %rax
addq $0x4, %rax
addq $0x144, %rcx            # imm = 0x144
movq %rcx, -0x258(%rbp)
movq %rax, -0x250(%rbp)
movq -0x250(%rbp), %rax
movq -0x258(%rbp), %rcx
movl $0x0, (%rax)
addq $0x4, %rax
cmpq %rcx, %rax
movq %rax, -0x250(%rbp)
jne 0x2601
movq -0x248(%rbp), %rax
movq %rax, %rcx
addq $0x290, %rcx            # imm = 0x290
movb $0x0, 0x290(%rax)
movq %rcx, %rax
addq $0x1, %rax
addq $0x51, %rcx
movq %rcx, -0x268(%rbp)
movq %rax, -0x260(%rbp)
movq -0x260(%rbp), %rax
movq -0x268(%rbp), %rcx
movb $0x0, (%rax)
addq $0x1, %rax
cmpq %rcx, %rax
movq %rax, -0x260(%rbp)
jne 0x2656
movq -0x248(%rbp), %rdi
addq $0x2e8, %rdi            # imm = 0x2E8
movq %rdi, -0x278(%rbp)
callq 0x3fb0
movq -0x248(%rbp), %rdi
addq $0x300, %rdi            # imm = 0x300
movq %rdi, -0x270(%rbp)
callq 0x3fd0
leaq -0x218(%rbp), %rdi
callq 0x2160
jmp 0x26b9
movq -0x10(%rbp), %rsi
leaq -0x218(%rbp), %rdi
movl $0x8, %edx
callq 0x20c0
jmp 0x26d0
movl $0x0, -0x228(%rbp)
cmpl $0x51, -0x228(%rbp)
jge 0x2817
movq -0x248(%rbp), %rax
movslq -0x228(%rbp), %rcx
leaq 0x8(%rax,%rcx,4), %rsi
leaq -0x218(%rbp), %rdi
callq 0x20b0
jmp 0x2708
movq -0x248(%rbp), %rax
movslq -0x228(%rbp), %rcx
cmpl $0x0, 0x8(%rax,%rcx,4)
jl 0x2736
movq -0x248(%rbp), %rax
movslq -0x228(%rbp), %rcx
cmpl $0x9, 0x8(%rax,%rcx,4)
jle 0x27be
movq 0x789b(%rip), %rdi      # 0x9fd8
leaq 0x490c(%rip), %rsi      # 0x7050
callq 0x2120
movq %rax, -0x280(%rbp)
jmp 0x2752
movq -0x280(%rbp), %rdi
movq 0x7868(%rip), %rsi      # 0x9fc8
callq 0x2150
jmp 0x2767
movq -0x248(%rbp), %rax
movb $0x0, 0x2e1(%rax)
movl $0x1, -0x22c(%rbp)
jmp 0x292c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x2941
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x2040
jmp 0x2941
movq -0x248(%rbp), %rax
movslq -0x228(%rbp), %rcx
movl 0x8(%rax,%rcx,4), %edx
xorl %ecx, %ecx
subl $0x1, %edx
sbbl %ecx, %ecx
movb %cl, %dl
movslq -0x228(%rbp), %rcx
andb $0x1, %dl
movb %dl, 0x290(%rax,%rcx)
movslq -0x228(%rbp), %rcx
movl 0x8(%rax,%rcx,4), %edx
movslq -0x228(%rbp), %rcx
movl %edx, 0x14c(%rax,%rcx,4)
movl -0x228(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x228(%rbp)
jmp 0x26da
movq -0x248(%rbp), %rdi
movq %rdi, %rsi
addq $0x8, %rsi
movq (%rdi), %rax
movq 0x20(%rax), %rax
callq *%rax
movb %al, -0x281(%rbp)
jmp 0x2836
movb -0x281(%rbp), %al
testb $0x1, %al
jne 0x2890
jmp 0x2842
movq 0x778f(%rip), %rdi      # 0x9fd8
leaq 0x4800(%rip), %rsi      # 0x7050
callq 0x2120
movq %rax, -0x290(%rbp)
jmp 0x285e
movq -0x290(%rbp), %rdi
movq 0x775c(%rip), %rsi      # 0x9fc8
callq 0x2150
jmp 0x2873
movq -0x248(%rbp), %rax
movb $0x0, 0x2e1(%rax)
movl $0x1, -0x22c(%rbp)
jmp 0x292c
movq -0x248(%rbp), %rdi
movq %rdi, %rsi
addq $0x8, %rsi
movq (%rdi), %rax
movq 0x28(%rax), %rax
callq *%rax
movb %al, -0x291(%rbp)
jmp 0x28af
movb -0x291(%rbp), %al
testb $0x1, %al
jne 0x2906
jmp 0x28bb
movq 0x7716(%rip), %rdi      # 0x9fd8
leaq 0x47a7(%rip), %rsi      # 0x7070
callq 0x2120
movq %rax, -0x2a0(%rbp)
jmp 0x28d7
movq -0x2a0(%rbp), %rdi
movq 0x76e3(%rip), %rsi      # 0x9fc8
callq 0x2150
jmp 0x28ec
movq -0x248(%rbp), %rax
movb $0x0, 0x2e1(%rax)
movl $0x1, -0x22c(%rbp)
jmp 0x292c
leaq -0x218(%rbp), %rdi
callq 0x2030
jmp 0x2914
movq -0x248(%rbp), %rax
movb $0x1, 0x2e1(%rax)
movl $0x0, -0x22c(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x2040
addq $0x2a0, %rsp            # imm = 0x2A0
popq %rbp
retq
movq -0x270(%rbp), %rdi
callq 0x3ff0
movq -0x278(%rbp), %rdi
callq 0x4050
movq -0x220(%rbp), %rdi
callq 0x21d0
nopw %cs:(%rax,%rax)