// File: akinanop[P]mvl-solver/src/Main.cc
// Function: main
int main(int argc, char ** argv)
{
  //Start Solver Time
  cout<<endl<<"************************************************************************"<<endl;

  cout<<endl<<"Finite Domain Sat Solver"<<endl;

  cout<<endl<<"************************************************************************"<<endl;

  //Parse commandline info
  CommandLine * clineinfo = new CommandLine;
  ParseCommandLine(clineinfo, argc, argv);

  //Check what option is selected and call appropriate function
  if(argc <= 1)
    {
      PrintHelp();
    }

  else if(!strcmp(argv[1], "-genben"))
    {
      //if option is to generate finite domain
      if(clineinfo->BOOL_FINITE)
	{
	  //Call GenBenFunction
	  GenBenFin(clineinfo);
	}
      //else generate boolean domain
      else
	{
	  //Call GenBenBool
	  GenBenBool(clineinfo);
	}

    }

  else if(!strcmp(argv[1], "-b2f"))
    {
      //Call Boolean2Finite
      Boolean2Finite(clineinfo);
    }

  else if(!strcmp(argv[1], "-linenc"))
    {
      //Call LinearEncode
      LinearEncode(clineinfo);
    }

  else if(!strcmp(argv[1], "-quadenc"))
    {
      //Call QuadraticEncode
      QuadraticEncode(clineinfo);
    }

  else if(!strcmp(argv[1], "-solvech"))
    {
        SolveFinite(clineinfo, "ch");
    }
    //Call SolveFinite

  else if(!strcmp(argv[1], "-solvenc"))
    {
      //Call SolveFinite
      SolveFinite(clineinfo, "nc");

    }

  else
    {
      PrintHelp();
    }

  //return nothing

  return 0;
}

// Assembly:
subq $0x98, %rsp
movl $0x0, 0x94(%rsp)
movl %edi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq 0x1b7c8(%rip), %rdi     # 0x1dfd0
movq 0x1b7b1(%rip), %rsi     # 0x1dfc0
callq 0x2260
movq %rax, %rdi
leaq 0x147e6(%rip), %rsi     # 0x17004
callq 0x2220
movq %rax, %rdi
movq 0x1b793(%rip), %rsi     # 0x1dfc0
callq 0x2260
movq 0x1b797(%rip), %rdi     # 0x1dfd0
movq 0x1b780(%rip), %rsi     # 0x1dfc0
callq 0x2260
movq %rax, %rdi
leaq 0x147fe(%rip), %rsi     # 0x1704d
callq 0x2220
movq %rax, %rdi
movq 0x1b762(%rip), %rsi     # 0x1dfc0
callq 0x2260
movq 0x1b766(%rip), %rdi     # 0x1dfd0
movq 0x1b74f(%rip), %rsi     # 0x1dfc0
callq 0x2260
movq %rax, %rdi
leaq 0x14784(%rip), %rsi     # 0x17004
callq 0x2220
movq %rax, %rdi
movq 0x1b731(%rip), %rsi     # 0x1dfc0
callq 0x2260
movl $0x40, %edi
callq 0x2230
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdi
movl 0x90(%rsp), %esi
movq 0x88(%rsp), %rdx
callq 0x3ac0
cmpl $0x1, 0x90(%rsp)
jg 0x28d6
callq 0x2f00
jmp 0x2b24
movq 0x88(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x1477d(%rip), %rsi     # 0x17066
callq 0x2350
cmpl $0x0, %eax
jne 0x2922
movq 0x80(%rsp), %rax
testb $0x1, 0x19(%rax)
je 0x2910
movq 0x80(%rsp), %rdi
callq 0x4690
jmp 0x291d
movq 0x80(%rsp), %rdi
callq 0x52b0
jmp 0x2b22
movq 0x88(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x14739(%rip), %rsi     # 0x1706e
callq 0x2350
cmpl $0x0, %eax
jne 0x2951
movq 0x80(%rsp), %rdi
callq 0x5a10
jmp 0x2b20
movq 0x88(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x1470f(%rip), %rsi     # 0x17073
callq 0x2350
cmpl $0x0, %eax
jne 0x2980
movq 0x80(%rsp), %rdi
callq 0x8db0
jmp 0x2b1e
movq 0x88(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x146e8(%rip), %rsi     # 0x1707b
callq 0x2350
cmpl $0x0, %eax
jne 0x29af
movq 0x80(%rsp), %rdi
callq 0x9e00
jmp 0x2b1c
movq 0x88(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x146c2(%rip), %rsi     # 0x17084
callq 0x2350
cmpl $0x0, %eax
jne 0x2a65
movq 0x80(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x5f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x2420
movq 0x18(%rsp), %rdx
leaq 0x14692(%rip), %rsi     # 0x1708a
leaq 0x60(%rsp), %rdi
callq 0x2b40
jmp 0x2a04
movq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x15e20
jmp 0x2a15
leaq 0x60(%rsp), %rdi
callq 0x2170
leaq 0x5f(%rsp), %rdi
callq 0x2280
jmp 0x2b1a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0x2a56
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x2170
leaq 0x5f(%rsp), %rdi
callq 0x2280
jmp 0x2b2e
movq 0x88(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x14615(%rip), %rsi     # 0x1708d
callq 0x2350
cmpl $0x0, %eax
jne 0x2b13
movq 0x80(%rsp), %rax
movq %rax, (%rsp)
leaq 0x27(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x2420
movq 0x8(%rsp), %rdx
leaq 0x145d4(%rip), %rsi     # 0x17081
leaq 0x28(%rsp), %rdi
callq 0x2b40
jmp 0x2ab9
movq (%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x15e20
jmp 0x2ac9
leaq 0x28(%rsp), %rdi
callq 0x2170
leaq 0x27(%rsp), %rdi
callq 0x2280
jmp 0x2b18
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0x2b07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x2170
leaq 0x27(%rsp), %rdi
callq 0x2280
jmp 0x2b2e
callq 0x2f00
jmp 0x2b1a
jmp 0x2b1c
jmp 0x2b1e
jmp 0x2b20
jmp 0x2b22
jmp 0x2b24
xorl %eax, %eax
addq $0x98, %rsp
retq
movq 0x50(%rsp), %rdi
callq 0x2410
nopl (%rax,%rax)