// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movl %edi, %ebp
movq 0xe7cc(%rip), %r14      # 0x10fd0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2180
movq %rax, %r12
leaq 0xa7cf(%rip), %r15      # 0xd004
movl $0x48, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2270
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2180
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2180
movq %rax, %r12
leaq 0xa7af(%rip), %rsi      # 0xd04d
movl $0x18, %edx
movq %rax, %rdi
callq 0x2270
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2180
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2180
movq %rax, %r14
movl $0x48, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2270
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2180
movl $0x40, %edi
callq 0x2230
movq %rax, %r14
movq %rax, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x3b13
cmpl $0x1, %ebp
jg 0x2967
callq 0x2bc1
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbx), %rbx
leaq 0xa6f4(%rip), %rsi      # 0xd066
movq %rbx, %rdi
callq 0x22e0
testl %eax, %eax
je 0x2a39
leaq 0xa6e5(%rip), %rsi      # 0xd06e
movq %rbx, %rdi
callq 0x22e0
testl %eax, %eax
je 0x2a4d
leaq 0xa6d3(%rip), %rsi      # 0xd073
movq %rbx, %rdi
callq 0x22e0
testl %eax, %eax
je 0x2a67
leaq 0xa6c4(%rip), %rsi      # 0xd07b
movq %rbx, %rdi
callq 0x22e0
testl %eax, %eax
je 0x2a74
leaq 0xa6b6(%rip), %rsi      # 0xd084
movq %rbx, %rdi
callq 0x22e0
testl %eax, %eax
je 0x2a81
leaq 0xa6a8(%rip), %rsi      # 0xd08d
movq %rbx, %rdi
callq 0x22e0
testl %eax, %eax
jne 0x2953
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xa67c(%rip), %rsi      # 0xd081
leaq 0xa677(%rip), %rdx      # 0xd083
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x2afa
movq %r14, %rdi
movq %rbx, %rsi
callq 0xbe58
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2958
movq 0x10(%rsp), %rsi
jmp 0x2ac3
cmpb $0x1, 0x19(%r14)
jne 0x2a5a
movq %r14, %rdi
callq 0x4260
jmp 0x2958
movq %r14, %rdi
callq 0x4d70
jmp 0x2958
movq %r14, %rdi
callq 0x4907
jmp 0x2958
movq %r14, %rdi
callq 0x5888
jmp 0x2958
movq %r14, %rdi
callq 0x6368
jmp 0x2958
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xa5f9(%rip), %rsi      # 0xd08a
leaq 0xa5f4(%rip), %rdx      # 0xd08c
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x2afa
movq %r14, %rdi
movq %rbx, %rsi
callq 0xbe58
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x2958
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2240
jmp 0x2958
movq %rax, %rbx
movq (%rsp), %rdi
jmp 0x2ae1
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x2af1
movq (%r15), %rsi
incq %rsi
callq 0x2240
movq %rbx, %rdi
callq 0x23a0
nop