// File: /workspace/github_cpp_makefile_star2_O1/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 0xd7dc(%rip), %r14      # 0xffd0
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 0x97df(%rip), %r15      # 0xc004
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 0x97bf(%rip), %rsi      # 0xc04d
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 0x3aff
cmpl $0x1, %ebp
jg 0x2957
callq 0x2bad
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbx), %rbx
leaq 0x9704(%rip), %rsi      # 0xc066
movq %rbx, %rdi
callq 0x22e0
testl %eax, %eax
je 0x2a29
leaq 0x96f5(%rip), %rsi      # 0xc06e
movq %rbx, %rdi
callq 0x22e0
testl %eax, %eax
je 0x2a3d
leaq 0x96e3(%rip), %rsi      # 0xc073
movq %rbx, %rdi
callq 0x22e0
testl %eax, %eax
je 0x2a57
leaq 0x96d4(%rip), %rsi      # 0xc07b
movq %rbx, %rdi
callq 0x22e0
testl %eax, %eax
je 0x2a64
leaq 0x96c6(%rip), %rsi      # 0xc084
movq %rbx, %rdi
callq 0x22e0
testl %eax, %eax
je 0x2a71
leaq 0x96b8(%rip), %rsi      # 0xc08d
movq %rbx, %rdi
callq 0x22e0
testl %eax, %eax
jne 0x2943
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x968c(%rip), %rsi      # 0xc081
leaq 0x9687(%rip), %rdx      # 0xc083
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x2aea
movq %r14, %rdi
movq %rbx, %rsi
callq 0xbcec
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2948
movq 0x10(%rsp), %rsi
jmp 0x2ab3
cmpb $0x1, 0x19(%r14)
jne 0x2a4a
movq %r14, %rdi
callq 0x4224
jmp 0x2948
movq %r14, %rdi
callq 0x4dc4
jmp 0x2948
movq %r14, %rdi
callq 0x491f
jmp 0x2948
movq %r14, %rdi
callq 0x58e4
jmp 0x2948
movq %r14, %rdi
callq 0x6404
jmp 0x2948
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x9609(%rip), %rsi      # 0xc08a
leaq 0x9604(%rip), %rdx      # 0xc08c
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x2aea
movq %r14, %rdi
movq %rbx, %rsi
callq 0xbcec
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x2948
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2240
jmp 0x2948
movq %rax, %rbx
movq (%rsp), %rdi
jmp 0x2ad1
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x2ae1
movq (%r15), %rsi
incq %rsi
callq 0x2240
movq %rbx, %rdi
callq 0x23a0
nop