// File: biotomas[P]ipasir/sat/picosat961/picosat-961/picomcs.c
// Function: main
int main (int argc, char ** argv) {
  const char * perr;
  int i, res;
  for (i = 1; i < argc; i++) {
    if (!strcmp (argv[i], "-h")) {
      printf ("usage: picomcs [-h][-v][-j][-n][<input>]\n");
      exit (0);
    }
    else if (!strcmp (argv[i], "-v")) verbose++;
    else if (!strcmp (argv[i], "-j")) join = 1;
    else if (!strcmp (argv[i], "-n")) noprint = 1;
    else if (argv[i][0] == '-') {
      fprintf (stderr, "*** picomcs: invalid option '%s'\n", argv[i]);
      exit (1);
    } else if (input_name) {
      fprintf (stderr, "*** picomcs: two input files specified\n");
      exit (1);
    } else if (!(input = fopen ((input_name = argv[i]), "r"))) {
      fprintf (stderr, "*** picomcs: can not read '%s'\n", argv[i]);
      exit (1);
    } else close_input = 1;
  }
  if (!input_name) input_name = "<stdin>", input = stdin;
  if ((perr = parse ())) {
    fprintf (stderr, "%s:%d: parse error: %s\n", input_name, lineno, perr);
    exit (1);
  }
  if (close_input) fclose (input);
  ps = picosat_init ();
  picosat_set_prefix (ps, "c [picosat] ");
  encode ();
  for (i = first_cid; i <= last_cid; i++) 
    picosat_set_default_phase_lit (ps, i, 1);
  for (i = first_cid; i <= last_cid; i++) picosat_assume (ps, i);
  res = picosat_sat (ps, -1);
  if (res == 10) printf ("s SATISFIABLE\n");
  else printf ("s UNSATISFIABLE\n");
  fflush (stdout);
  if (join) cumcs (); else camcs ();
  if (verbose) picosat_stats (ps);
  picosat_reset (ps);
  if (!noprint) {
    if (join) print_umcs (); else print_all_mcs ();
  }
  release ();
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x1582
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x18c25(%rip), %rsi     # 0x1a011
callq 0x1100
cmpl $0x0, %eax
jne 0x140b
leaq 0x18c17(%rip), %rdi     # 0x1a014
movb $0x0, %al
callq 0x10b0
xorl %edi, %edi
callq 0x11c0
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x18c20(%rip), %rsi     # 0x1a03e
callq 0x1100
cmpl $0x0, %eax
jne 0x143c
movl 0x1fcfa(%rip), %eax     # 0x21128
addl $0x1, %eax
movl %eax, 0x1fcf1(%rip)     # 0x21128
jmp 0x1570
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x18bf2(%rip), %rsi     # 0x1a041
callq 0x1100
cmpl $0x0, %eax
jne 0x1468
movl $0x1, 0x1fcc9(%rip)     # 0x2112c
jmp 0x156e
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x18bc9(%rip), %rsi     # 0x1a044
callq 0x1100
cmpl $0x0, %eax
jne 0x1494
movl $0x1, 0x1fca1(%rip)     # 0x21130
jmp 0x156c
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x14d6
movq 0x1fb49(%rip), %rax     # 0x20ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x18b82(%rip), %rsi     # 0x1a047
movb $0x0, %al
callq 0x1110
movl $0x1, %edi
callq 0x11c0
cmpq $0x0, 0x1fc5a(%rip)     # 0x21138
je 0x1502
movq 0x1fb11(%rip), %rax     # 0x20ff8
movq (%rax), %rdi
leaq 0x18b78(%rip), %rsi     # 0x1a069
movb $0x0, %al
callq 0x1110
movl $0x1, %edi
callq 0x11c0
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq %rdi, 0x1fc23(%rip)     # 0x21138
leaq 0x1b984(%rip), %rsi     # 0x1cea0
callq 0x1180
movq %rax, 0x1fc18(%rip)     # 0x21140
cmpq $0x0, %rax
jne 0x155c
movq 0x1fac3(%rip), %rax     # 0x20ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x18b46(%rip), %rsi     # 0x1a091
movb $0x0, %al
callq 0x1110
movl $0x1, %edi
callq 0x11c0
movl $0x1, 0x1fbe2(%rip)     # 0x21148
jmp 0x1568
jmp 0x156a
jmp 0x156c
jmp 0x156e
jmp 0x1570
jmp 0x1572
jmp 0x1574
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x13cd
cmpq $0x0, 0x1fbae(%rip)     # 0x21138
jne 0x15ab
leaq 0x18b1e(%rip), %rax     # 0x1a0b1
movq %rax, 0x1fb9e(%rip)     # 0x21138
movq 0x1fa37(%rip), %rax     # 0x20fd8
movq (%rax), %rax
movq %rax, 0x1fb95(%rip)     # 0x21140
callq 0x1740
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x15ed
movq 0x1fa37(%rip), %rax     # 0x20ff8
movq (%rax), %rdi
movq 0x1fb6d(%rip), %rdx     # 0x21138
movl 0x1fb37(%rip), %ecx     # 0x21108
movq -0x18(%rbp), %r8
leaq 0x18add(%rip), %rsi     # 0x1a0b9
movb $0x0, %al
callq 0x1110
movl $0x1, %edi
callq 0x11c0
cmpl $0x0, 0x1fb54(%rip)     # 0x21148
je 0x1602
movq 0x1fb43(%rip), %rdi     # 0x21140
callq 0x1090
callq 0x25a0
movq %rax, 0x1fb42(%rip)     # 0x21150
movq 0x1fb3b(%rip), %rdi     # 0x21150
leaq 0x18ab5(%rip), %rsi     # 0x1a0d1
callq 0x47d0
callq 0x1a10
movl 0x1fb2c(%rip), %eax     # 0x21158
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0x1fb24(%rip), %eax     # 0x2115c
jg 0x1659
movq 0x1fb0f(%rip), %rdi     # 0x21150
movl -0x1c(%rbp), %esi
movl $0x1, %edx
callq 0xb7e0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x162f
movl 0x1faf9(%rip), %eax     # 0x21158
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0x1faf1(%rip), %eax     # 0x2115c
jg 0x1687
movq 0x1fadc(%rip), %rdi     # 0x21150
movl -0x1c(%rbp), %esi
callq 0x5aa0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1662
movq 0x1fac2(%rip), %rdi     # 0x21150
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5d70
movl %eax, -0x20(%rbp)
cmpl $0xa, -0x20(%rbp)
jne 0x16b1
leaq 0x18a36(%rip), %rdi     # 0x1a0de
movb $0x0, %al
callq 0x10b0
jmp 0x16bf
leaq 0x18a35(%rip), %rdi     # 0x1a0ed
movb $0x0, %al
callq 0x10b0
movq 0x1f90a(%rip), %rax     # 0x20fd0
movq (%rax), %rdi
callq 0x1140
cmpl $0x0, 0x1fa57(%rip)     # 0x2112c
je 0x16de
callq 0x1aa0
jmp 0x16e3
callq 0x1ba0
cmpl $0x0, 0x1fa3e(%rip)     # 0x21128
je 0x16f8
movq 0x1fa5d(%rip), %rdi     # 0x21150
callq 0x9460
movq 0x1fa51(%rip), %rdi     # 0x21150
callq 0x48c0
cmpl $0x0, 0x1fa25(%rip)     # 0x21130
jne 0x1724
cmpl $0x0, 0x1fa18(%rip)     # 0x2112c
je 0x171d
callq 0x1d20
jmp 0x1722
callq 0x1da0
jmp 0x1724
callq 0x1de0
movl -0x20(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)