// File: /workspace/github_cpp_makefile_star2_O3/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 0xa01e
movl %edx, %r12d
movq %rdi, %r14
movslq 0x190(%rdi), %rdx
testq %rdx, %rdx
je 0x9eb4
movq 0x188(%r14), %rsi
shlq $0x2, %rdx
movq %r14, %rdi
callq 0x9c31
movq $0x0, 0x188(%r14)
leal 0x1(%r12), %eax
movl %eax, 0x190(%r14)
movslq %r12d, %rbx
leaq 0x4(,%rbx,4), %rsi
movq %r14, %rdi
callq 0x9cfe
movq %rax, 0x188(%r14)
xorl %r15d, %r15d
testl %ebx, %ebx
jle 0x9fe8
leal -0x1(%r12), %ebp
xorl %r13d, %r13d
movq %r12, 0x8(%rsp)
testl %r13d, %r13d
jle 0x9f23
movl %r13d, %ebx
xorl %r12d, %r12d
movq 0x188(%r14), %rax
movl (%rax,%r12,4), %esi
movq %r14, %rdi
callq 0x777f
incq %r12
cmpq %r12, %rbx
jne 0x9f08
movslq %r15d, %rbx
movq 0x10(%rsp), %r12
movl (%r12,%rbx,4), %esi
movq %r14, %rdi
callq 0x777f
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x7917
cmpl $0x14, %eax
je 0x9fc8
cmpl $0xa, %eax
jne 0x9fff
movl (%r12,%rbx,4), %eax
movq 0x188(%r14), %rcx
movslq %r13d, %rdx
incl %r13d
movl %eax, (%rcx,%rdx,4)
incl %ebx
cmpl 0x8(%rsp), %ebx
jge 0x9fc8
movslq %ebx, %rax
leaq (%r12,%rax,4), %rbx
movl %r15d, %r12d
movl (%rbx), %esi
movq %r14, %rdi
callq 0x8c19
testl %eax, %eax
jle 0x9fb4
movl (%rbx), %ecx
movq 0x188(%r14), %rax
movslq %r13d, %rdx
incl %r13d
movl %ecx, (%rax,%rdx,4)
leal 0x1(%r12), %eax
cmpl %r12d, %r15d
je 0x9fb7
movslq %eax, %rdx
movq 0x10(%rsp), %rdi
movl (%rdi,%rdx,4), %esi
movl %ecx, (%rdi,%rdx,4)
movl %esi, (%rbx)
jmp 0x9fb7
movl %r12d, %eax
incl %r15d
addq $0x4, %rbx
movl %eax, %r12d
cmpl %r15d, %ebp
jne 0x9f78
jmp 0x9fcb
movl %r15d, %eax
incl %eax
movl %eax, %r15d
movq 0x8(%rsp), %r12
cmpl %r12d, %eax
jl 0x9efd
movq 0x188(%r14), %rax
movslq %r13d, %r15
movl $0x0, (%rax,%r15,4)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x985f(%rip), %rdi      # 0x13865
leaq 0x926f(%rip), %rsi      # 0x1327c
leaq 0xb70d(%rip), %rcx      # 0x15721
movl $0x1da8, %edx           # imm = 0x1DA8
callq 0x10b0
leaq 0xa251(%rip), %rdi      # 0x14276
leaq 0x9250(%rip), %rsi      # 0x1327c
leaq 0xb6ee(%rip), %rcx      # 0x15721
movl $0x1d72, %edx           # imm = 0x1D72
callq 0x10b0