// File: /workspace/github_cpp_makefile_star2_O1/biotomas[P]ipasir/sat/picosat961/picosat-961/picosat.c
// Function: mss
static const int *
mss (PS * ps, int * a, int size)
{
  int i, j, k, res;

  assert (!ps->mtcls);

  if (ps->szmssass)
    DELETEN (ps->mssass, ps->szmssass);

  ps->szmssass = 0;
  ps->mssass = 0;

  ps->szmssass = size + 1;
  NEWN (ps->mssass, ps->szmssass);

  LOG ( fprintf (ps->out, "%ssearch MSS over %d assumptions\n", ps->prefix, size));

  k = 0;
  for (i = k; i < size; i++)
    {
      for (j = 0; j < k; j++)
	picosat_assume (ps, ps->mssass[j]);

      LOG ( fprintf (ps->out, 
             "%strying to add assumption %d to MSS : %d\n", 
	     ps->prefix, i, a[i])); 

      picosat_assume (ps, a[i]);

      res = picosat_sat (ps, -1);
      if (res == 10)
	{
	  LOG ( fprintf (ps->out, 
		 "%sadding assumption %d to MSS : %d\n", ps->prefix, i, a[i])); 

	  ps->mssass[k++] = a[i];

	  for (j = i + 1; j < size; j++)
	    {
	      if (picosat_deref (ps, a[j]) <= 0)
		continue;

	      LOG ( fprintf (ps->out, 
		     "%salso adding assumption %d to MSS : %d\n", 
		     ps->prefix, j, a[j])); 

	      ps->mssass[k++] = a[j];

	      if (++i != j)
		{
		  int tmp = a[i];
		  a[i] = a[j];
		  a[j] = tmp;
		}
	    }
	}
      else
	{
	  assert (res == 20);

	  LOG ( fprintf (ps->out, 
		 "%signoring assumption %d in MSS : %d\n", ps->prefix, i, a[i])); 
	}
    }
  ps->mssass[k] = 0;
  LOG ( fprintf (ps->out, "%sfound MSS of size %d\n", ps->prefix, k));

  return ps->mssass;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
cmpq $0x0, 0x248(%rdi)
jne 0x9f1a
movl %edx, %r12d
movq %rdi, %rbx
movslq 0x190(%rdi), %rdx
testq %rdx, %rdx
je 0x9da4
movq 0x188(%rbx), %rsi
shlq $0x2, %rdx
movq %rbx, %rdi
callq 0x9b29
movq $0x0, 0x188(%rbx)
movq $0x0, 0x188(%rbx)
leal 0x1(%r12), %eax
movl %eax, 0x190(%rbx)
movslq %r12d, %r14
leaq 0x4(,%r14,4), %rsi
movq %rbx, %rdi
callq 0x9bf6
movq %rax, 0x188(%rbx)
xorl %r15d, %r15d
testl %r14d, %r14d
jle 0x9edd
leal -0x1(%r12), %ebp
xorl %r13d, %r13d
movq %r12, 0x8(%rsp)
testl %r13d, %r13d
jle 0x9e13
movl %r13d, %r14d
xorl %r12d, %r12d
movq 0x188(%rbx), %rax
movl (%rax,%r12,4), %esi
movq %rbx, %rdi
callq 0x777e
incq %r12
cmpq %r12, %r14
jne 0x9df8
movslq %r15d, %r14
movq 0x10(%rsp), %r12
movl (%r12,%r14,4), %esi
movq %rbx, %rdi
callq 0x777e
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x7927
cmpl $0x14, %eax
je 0x9ec4
cmpl $0xa, %eax
jne 0x9efb
movl (%r12,%r14,4), %eax
movq 0x188(%rbx), %rcx
movslq %r13d, %rdx
incl %r13d
movl %eax, (%rcx,%rdx,4)
incl %r14d
cmpl 0x8(%rsp), %r14d
jge 0x9ec4
movslq %r14d, %rax
leaq (%r12,%rax,4), %r14
movl %r15d, %r12d
movl (%r14), %esi
movq %rbx, %rdi
callq 0x8b25
testl %eax, %eax
jle 0x9eb0
movl (%r14), %eax
movq 0x188(%rbx), %rcx
movslq %r13d, %rdx
incl %r13d
movl %eax, (%rcx,%rdx,4)
leal 0x1(%r12), %eax
cmpl %r12d, %r15d
je 0x9eb3
movslq %eax, %rcx
movq 0x10(%rsp), %rdi
movl (%rdi,%rcx,4), %edx
movl (%r14), %esi
movl %esi, (%rdi,%rcx,4)
movl %edx, (%r14)
jmp 0x9eb3
movl %r12d, %eax
incl %r15d
addq $0x4, %r14
movl %eax, %r12d
cmpl %r15d, %ebp
jne 0x9e6e
jmp 0x9ec7
movl %r15d, %eax
incl %eax
movl %eax, %r15d
movq 0x8(%rsp), %r12
cmpl %r12d, %eax
jl 0x9ded
movslq %r13d, %r15
movq 0x188(%rbx), %rax
movl $0x0, (%rax,%r15,4)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8993(%rip), %rdi      # 0x12895
leaq 0x83a3(%rip), %rsi      # 0x122ac
leaq 0xa875(%rip), %rcx      # 0x14785
movl $0x1da8, %edx           # imm = 0x1DA8
callq 0x10b0
leaq 0x9393(%rip), %rdi      # 0x132b4
leaq 0x8384(%rip), %rsi      # 0x122ac
leaq 0xa856(%rip), %rcx      # 0x14785
movl $0x1d72, %edx           # imm = 0x1D72
callq 0x10b0