// File: shancheng[P]shancheng/src/sudoku.cpp
// Function: main
int main(int argc, char* argv[]) {
  po::options_description desc("Options");
  desc.add_options()
    ("file",         po::value<string>(),   "set input file")
    ("size",         po::value<uint32_t>(), "set size")
    ("debug",                               "debug mode")
    ("help",                                "show the help");
  po::variables_map vm;
  po::store(po::parse_command_line(argc, argv, desc), vm);
  po::notify(vm);
  if (vm.count("file") > 0) {
    options.opt_file = vm["file"].as<string>();
  }
  if (vm.count("size") > 0) {
    options.SetSize(vm["size"].as<uint32_t>());
  }
  if (vm.count("debug") > 0) {
    options.opt_debug = true;
  }
  if (vm.count("help") > 0 ) {
    cout << desc << "\n";
    return 0;
  }
  options.Print(cout);

  Sudoku sudoku;
  if (!sudoku.Init()) {
    cerr << "Failed to init the sudoku data\n";
    return 1;
  }
  sudoku.Solve();
  return 0;
}

// Assembly:
subq $0xb4a8, %rsp           # imm = 0xB4A8
movl $0x0, 0xb4a4(%rsp)
movl %edi, 0xb4a0(%rsp)
movq %rsi, 0xb498(%rsp)
leaq 0xb3f7(%rsp), %rdi
movq %rdi, 0xe0(%rsp)
callq 0x65e0
movq 0xe0(%rsp), %rdx
leaq 0x1074f(%rip), %rsi     # 0x17004
leaq 0xb3f8(%rsp), %rdi
callq 0x9f60
jmp 0x68c4
movq 0x1a6ad(%rip), %rax     # 0x20f78
movl (%rax), %edx
movl %edx, %ecx
shrl %ecx
leaq 0xb418(%rsp), %rdi
leaq 0xb3f8(%rsp), %rsi
callq 0x6470
jmp 0x68e8
leaq 0xb3f8(%rsp), %rdi
callq 0x6698
leaq 0xb3f7(%rsp), %rdi
callq 0x6330
leaq 0xb418(%rsp), %rdi
callq 0x63a0
movq %rax, 0xd8(%rsp)
jmp 0x6919
movq 0xd8(%rsp), %rax
movq %rax, 0xb3d8(%rsp)
callq 0xa020
movq %rax, 0xd0(%rsp)
jmp 0x6938
movq 0xd0(%rsp), %rdx
leaq 0x106cf(%rip), %rsi     # 0x17016
leaq 0x106be(%rip), %rcx     # 0x1700c
leaq 0xb3d8(%rsp), %rdi
callq 0x6640
movq %rax, 0xc8(%rsp)
jmp 0x6965
callq 0xa030
movq %rax, 0xc0(%rsp)
jmp 0x6974
movq 0xc0(%rsp), %rdx
movq 0xc8(%rsp), %rdi
leaq 0x10694(%rip), %rsi     # 0x1701f
leaq 0x10689(%rip), %rcx     # 0x1701b
callq 0x6640
movq %rax, 0xb8(%rsp)
jmp 0x69a1
movq 0xb8(%rsp), %rdi
leaq 0x10674(%rip), %rsi     # 0x17024
leaq 0x10673(%rip), %rdx     # 0x1702a
callq 0x6610
movq %rax, 0xb0(%rsp)
jmp 0x69c6
movq 0xb0(%rsp), %rdi
leaq 0x10669(%rip), %rsi     # 0x1703e
leaq 0x10659(%rip), %rdx     # 0x17035
callq 0x6610
jmp 0x69e3
leaq 0xb338(%rsp), %rdi
callq 0x6110
jmp 0x69f2
movl 0xb4a0(%rsp), %eax
movl %eax, 0xa4(%rsp)
movq 0xb498(%rsp), %rax
movq %rax, 0xa8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xb300(%rsp)
movaps %xmm0, 0xb2f0(%rsp)
leaq 0xb2f0(%rsp), %rdi
callq 0xa170
jmp 0x6a32
movq 0xa8(%rsp), %rdx
movl 0xa4(%rsp), %esi
leaq 0xb310(%rsp), %rdi
leaq 0xb418(%rsp), %rcx
xorl %r8d, %r8d
leaq 0xb2f0(%rsp), %r9
callq 0xa040
jmp 0x6a63
leaq 0xb310(%rsp), %rdi
leaq 0xb338(%rsp), %rsi
xorl %edx, %edx
callq 0x65b0
jmp 0x6a7c
leaq 0xb310(%rsp), %rdi
callq 0xa180
leaq 0xb2f0(%rsp), %rdi
callq 0xa190
leaq 0xb338(%rsp), %rdi
callq 0x6190
jmp 0x6aa5
leaq 0xb348(%rsp), %rax
movq %rax, 0x90(%rsp)
leaq 0xb2cf(%rsp), %rdi
movq %rdi, 0x98(%rsp)
callq 0x65e0
movq 0x98(%rsp), %rdx
leaq 0x1053d(%rip), %rsi     # 0x17016
leaq 0xb2d0(%rsp), %rdi
callq 0x9f60
jmp 0x6ae8
movq 0x90(%rsp), %rdi
leaq 0xb2d0(%rsp), %rsi
callq 0xa1b0
movq %rax, 0x88(%rsp)
jmp 0x6b07
leaq 0xb2d0(%rsp), %rdi
callq 0x6698
leaq 0xb2cf(%rsp), %rdi
callq 0x6330
movq 0x88(%rsp), %rax
cmpq $0x0, %rax
jbe 0x6d1b
leaq 0xb2a7(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0x65e0
movq 0x80(%rsp), %rdx
leaq 0x104bf(%rip), %rsi     # 0x17016
leaq 0xb2a8(%rsp), %rdi
callq 0x9f60
jmp 0x6b66
leaq 0xb338(%rsp), %rdi
leaq 0xb2a8(%rsp), %rsi
callq 0xa210
movq %rax, 0x78(%rsp)
jmp 0x6b82
movq 0x78(%rsp), %rdi
callq 0xa240
movq %rax, 0x70(%rsp)
jmp 0x6b93
movq 0x70(%rsp), %rsi
leaq 0x1a7d9(%rip), %rdi     # 0x21378
callq 0x6040
jmp 0x6ba6
leaq 0xb2a8(%rsp), %rdi
callq 0x6698
leaq 0xb2a7(%rsp), %rdi
callq 0x6330
jmp 0x6d1b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
jmp 0x6bfc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
leaq 0xb3f8(%rsp), %rdi
callq 0x6698
leaq 0xb3f7(%rsp), %rdi
callq 0x6330
jmp 0x7195
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
jmp 0x7188
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
jmp 0x717b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
jmp 0x6c77
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
leaq 0xb310(%rsp), %rdi
callq 0xa180
leaq 0xb2f0(%rsp), %rdi
callq 0xa190
jmp 0x717b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
jmp 0x6cc0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
leaq 0xb2d0(%rsp), %rdi
callq 0x6698
leaq 0xb2cf(%rsp), %rdi
callq 0x6330
jmp 0x717b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
jmp 0x6d09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
leaq 0xb2a8(%rsp), %rdi
callq 0x6698
leaq 0xb2a7(%rsp), %rdi
callq 0x6330
jmp 0x717b
leaq 0xb348(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0xb27f(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x65e0
movq 0x68(%rsp), %rdx
leaq 0x102d9(%rip), %rsi     # 0x1701f
leaq 0xb280(%rsp), %rdi
callq 0x9f60
jmp 0x6d55
movq 0x60(%rsp), %rdi
leaq 0xb280(%rsp), %rsi
callq 0xa1b0
movq %rax, 0x58(%rsp)
jmp 0x6d6e
leaq 0xb280(%rsp), %rdi
callq 0x6698
leaq 0xb27f(%rsp), %rdi
callq 0x6330
movq 0x58(%rsp), %rax
cmpq $0x0, %rax
jbe 0x6eb7
leaq 0xb257(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x65e0
movq 0x50(%rsp), %rdx
leaq 0x1026a(%rip), %rsi     # 0x1701f
leaq 0xb258(%rsp), %rdi
callq 0x9f60
jmp 0x6dc4
leaq 0xb338(%rsp), %rdi
leaq 0xb258(%rsp), %rsi
callq 0xa210
movq %rax, 0x48(%rsp)
jmp 0x6de0
movq 0x48(%rsp), %rdi
callq 0xa250
movq %rax, 0x40(%rsp)
jmp 0x6df1
movq 0x40(%rsp), %rax
movl (%rax), %esi
leaq 0x1a579(%rip), %rdi     # 0x21378
callq 0x71b0
jmp 0x6e06
leaq 0xb258(%rsp), %rdi
callq 0x6698
leaq 0xb257(%rsp), %rdi
callq 0x6330
jmp 0x6eb7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
jmp 0x6e5c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
leaq 0xb280(%rsp), %rdi
callq 0x6698
leaq 0xb27f(%rsp), %rdi
callq 0x6330
jmp 0x717b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
jmp 0x6ea5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
leaq 0xb258(%rsp), %rdi
callq 0x6698
leaq 0xb257(%rsp), %rdi
callq 0x6330
jmp 0x717b
leaq 0xb348(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0xb22f(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x65e0
movq 0x38(%rsp), %rdx
leaq 0x10142(%rip), %rsi     # 0x17024
leaq 0xb230(%rsp), %rdi
callq 0x9f60
jmp 0x6ef1
movq 0x30(%rsp), %rdi
leaq 0xb230(%rsp), %rsi
callq 0xa1b0
movq %rax, 0x28(%rsp)
jmp 0x6f0a
leaq 0xb230(%rsp), %rdi
callq 0x6698
leaq 0xb22f(%rsp), %rdi
callq 0x6330
movq 0x28(%rsp), %rax
cmpq $0x0, %rax
jbe 0x6f81
movb $0x1, 0x1a46a(%rip)     # 0x213a0
jmp 0x6f81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
jmp 0x6f6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
leaq 0xb230(%rsp), %rdi
callq 0x6698
leaq 0xb22f(%rsp), %rdi
callq 0x6330
jmp 0x717b
leaq 0xb348(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0xb207(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x65e0
movq 0x20(%rsp), %rdx
leaq 0x10092(%rip), %rsi     # 0x1703e
leaq 0xb208(%rsp), %rdi
callq 0x9f60
jmp 0x6fbb
movq 0x18(%rsp), %rdi
leaq 0xb208(%rsp), %rsi
callq 0xa1b0
movq %rax, 0x10(%rsp)
jmp 0x6fd4
leaq 0xb208(%rsp), %rdi
callq 0x6698
leaq 0xb207(%rsp), %rdi
callq 0x6330
movq 0x10(%rsp), %rax
cmpq $0x0, %rax
jbe 0x708f
movq 0x19fb4(%rip), %rdi     # 0x20fb8
leaq 0xb418(%rsp), %rsi
callq 0x6090
movq %rax, 0x8(%rsp)
jmp 0x7018
movq 0x8(%rsp), %rdi
leaq 0x10048(%rip), %rsi     # 0x1706c
callq 0x62e0
jmp 0x702b
movl $0x0, 0xb4a4(%rsp)
movl $0x1, 0xb200(%rsp)
jmp 0x7152
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
jmp 0x707d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
leaq 0xb208(%rsp), %rdi
callq 0x6698
leaq 0xb207(%rsp), %rdi
callq 0x6330
jmp 0x717b
leaq 0x1a2e2(%rip), %rdi     # 0x21378
movq 0x19f1b(%rip), %rsi     # 0x20fb8
callq 0x71f0
jmp 0x70a4
leaq 0xe8(%rsp), %rdi
callq 0x72d0
jmp 0x70b3
leaq 0xe8(%rsp), %rdi
callq 0x73a0
movb %al, 0x7(%rsp)
jmp 0x70c6
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x7120
jmp 0x70d0
movq 0x19f19(%rip), %rdi     # 0x20ff0
leaq 0xff65(%rip), %rsi      # 0x17043
callq 0x62e0
jmp 0x70e5
movl $0x1, 0xb4a4(%rsp)
movl $0x1, 0xb200(%rsp)
jmp 0x7145
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb3e8(%rsp)
movl %eax, 0xb3e4(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x7970
jmp 0x717b
leaq 0xe8(%rsp), %rdi
callq 0x7950
jmp 0x712f
movl $0x0, 0xb4a4(%rsp)
movl $0x1, 0xb200(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x7970
leaq 0xb338(%rsp), %rdi
callq 0xa260
leaq 0xb418(%rsp), %rdi
callq 0xa2c0
movl 0xb4a4(%rsp), %eax
addq $0xb4a8, %rsp           # imm = 0xB4A8
retq
leaq 0xb338(%rsp), %rdi
callq 0xa260
leaq 0xb418(%rsp), %rdi
callq 0xa2c0
movq 0xb3e8(%rsp), %rdi
callq 0x65c0
nopw %cs:(%rax,%rax)