// File: /workspace/github_cpp_makefile_star2_O1/biotomas[P]ipasir/sat/picosat961/picosat-961/picosat.c
// Function: picosat_humus
const int *
picosat_humus (PS * ps, 
               void (*callback)(void*state,int nmcs,int nhumus),
	       void * state)
{
  int lit, nmcs, j, nhumus;
  const int * mcs, * p;
  unsigned i;
  Var * v;
  enter (ps);
#ifndef NDEBUG
  for (i = 1; i <= ps->max_var; i++)
    {
      v = ps->vars + i;
      assert (!v->humuspos);
      assert (!v->humusneg);
    }
#endif
  nhumus = nmcs = 0;
  while ((mcs = picosat_next_minimal_correcting_subset_of_assumptions (ps)))
    {
      for (p = mcs; (lit = *p); p++)
	{
	  v = ps->vars + abs (lit);
	  if (lit < 0)
	    {
	      if (!v->humusneg)
		{
		  v->humusneg = 1;
		  nhumus++;
		}
	    }
	  else
	    {
	      if (!v->humuspos)
		{
		  v->humuspos = 1;
		  nhumus++;
		}
	    }
	}
      nmcs++;
      LOG ( fprintf (ps->out, 
             "%smcs %d of size %d humus %d\n",
	     ps->prefix, nmcs, (int)(p - mcs), nhumus));
      if (callback)
	callback (state, nmcs, nhumus);
    }
  assert (!ps->szhumus);
  ps->szhumus = 1;
  for (i = 1; i <= ps->max_var; i++)
    {
      v = ps->vars + i;
      if (v->humuspos)
	ps->szhumus++;
      if (v->humusneg)
	ps->szhumus++;
    }
  assert (nhumus + 1 == ps->szhumus);
  NEWN (ps->humus, ps->szhumus);
  j = 0;
  for (i = 1; i <= ps->max_var; i++)
    {
      v = ps->vars + i;
      if (v->humuspos)
	{
	  assert (j < nhumus);
	  ps->humus[j++] = (int) i;
	}
      if (v->humusneg)
	{
	  assert (j < nhumus);
	  assert (i < INT_MAX);
	  ps->humus[j++] = - (int) i;
	}
    }
  assert (j == nhumus);
  assert (j < ps->szhumus);
  ps->humus[j] = 0;
  leave (ps);
  return ps->humus;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
callq 0x3de6
movl 0x2c(%rbx), %eax
testl %eax, %eax
je 0xa334
movq 0x40(%rbx), %rcx
movl $0x1, %edx
movl %edx, %esi
shlq $0x4, %rsi
movl (%rcx,%rsi), %esi
btl $0xb, %esi
jb 0xa4fe
btl $0xc, %esi
jb 0xa4df
incl %edx
cmpl %eax, %edx
jbe 0xa311
movq %rbx, %rdi
callq 0xa2ae
testq %rax, %rax
je 0xa3b8
xorl %ebp, %ebp
xorl %r14d, %r14d
movl (%rax), %ecx
testl %ecx, %ecx
je 0xa397
addq $0x4, %rax
movl %ecx, %esi
negl %esi
cmovsl %ecx, %esi
movq 0x40(%rbx), %rdx
shlq $0x4, %rsi
movzwl (%rdx,%rsi), %edi
testl %ecx, %ecx
js 0xa38b
movw $0x800, %cx             # imm = 0x800
btl $0xb, %edi
jb 0xa37f
addq %rsi, %rdx
movzwl %cx, %ecx
orl %edi, %ecx
movw %cx, (%rdx)
incl %r14d
movl (%rax), %ecx
addq $0x4, %rax
testl %ecx, %ecx
jne 0xa350
jmp 0xa397
movw $0x1000, %cx            # imm = 0x1000
btl $0xc, %edi
jae 0xa371
jmp 0xa37f
incl %ebp
testq %r12, %r12
je 0xa3a9
movq %r15, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq *%r12
movq %rbx, %rdi
callq 0xa2ae
testq %rax, %rax
jne 0xa346
jmp 0xa3bb
xorl %r14d, %r14d
cmpl $0x0, 0x1b0(%rbx)
jne 0xa57a
movl $0x1, 0x1b0(%rbx)
movl 0x2c(%rbx), %edx
testl %edx, %edx
je 0xa416
movq 0x40(%rbx), %rax
incl %edx
cmpl $0x3, %edx
movl $0x2, %ecx
cmovael %edx, %ecx
shlq $0x4, %rcx
movl $0x10, %edx
testb $0x8, 0x1(%rax,%rdx)
je 0xa400
incl 0x1b0(%rbx)
testb $0x10, 0x1(%rax,%rdx)
je 0xa40d
incl 0x1b0(%rbx)
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0xa3f3
leal 0x1(%r14), %eax
movslq 0x1b0(%rbx), %rsi
cmpl %esi, %eax
jne 0xa599
shlq $0x2, %rsi
movq %rbx, %rdi
callq 0x9bf6
movq %rax, 0x1a8(%rbx)
cmpl $0x0, 0x2c(%rbx)
je 0xa4a6
movq 0x40(%rbx), %rdx
xorl %ecx, %ecx
movl $0x1, %esi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl %esi, %r8d
shlq $0x4, %r8
testb $0x8, 0x1(%rdx,%r8)
je 0xa473
cmpl %r14d, %ecx
jge 0xa51d
movslq %ecx, %r9
incl %ecx
movl %esi, (%rax,%r9,4)
addq %rdx, %r8
testb $0x10, 0x1(%r8)
je 0xa49b
cmpl %r14d, %ecx
jge 0xa55b
cmpl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
jae 0xa53c
movslq %ecx, %r8
incl %ecx
movl %edi, (%rax,%r8,4)
incl %esi
decl %edi
cmpl 0x2c(%rbx), %esi
jbe 0xa452
jmp 0xa4a8
xorl %ecx, %ecx
cmpl %r14d, %ecx
jne 0xa5b8
cmpl 0x1b0(%rbx), %ecx
jge 0xa5d7
movslq %ecx, %rcx
movl $0x0, (%rax,%rcx,4)
movq %rbx, %rdi
callq 0x41bd
movq 0x1a8(%rbx), %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8573(%rip), %rdi      # 0x12a59
leaq 0x7dbf(%rip), %rsi      # 0x122ac
leaq 0x8522(%rip), %rcx      # 0x12a16
movl $0x1e81, %edx           # imm = 0x1E81
callq 0x10b0
leaq 0x8504(%rip), %rdi      # 0x12a09
leaq 0x7da0(%rip), %rsi      # 0x122ac
leaq 0x8503(%rip), %rcx      # 0x12a16
movl $0x1e80, %edx           # imm = 0x1E80
callq 0x10b0
leaq 0x8569(%rip), %rdi      # 0x12a8d
leaq 0x7d81(%rip), %rsi      # 0x122ac
leaq 0x84e4(%rip), %rcx      # 0x12a16
movl $0x1eb4, %edx           # imm = 0x1EB4
callq 0x10b0
leaq 0x8555(%rip), %rdi      # 0x12a98
leaq 0x7d62(%rip), %rsi      # 0x122ac
leaq 0x84c5(%rip), %rcx      # 0x12a16
movl $0x1eba, %edx           # imm = 0x1EBA
callq 0x10b0
leaq 0x852b(%rip), %rdi      # 0x12a8d
leaq 0x7d43(%rip), %rsi      # 0x122ac
leaq 0x84a6(%rip), %rcx      # 0x12a16
movl $0x1eb9, %edx           # imm = 0x1EB9
callq 0x10b0
leaq 0x84e5(%rip), %rdi      # 0x12a66
leaq 0x7d24(%rip), %rsi      # 0x122ac
leaq 0x8487(%rip), %rcx      # 0x12a16
movl $0x1ea2, %edx           # imm = 0x1EA2
callq 0x10b0
leaq 0x84d3(%rip), %rdi      # 0x12a73
leaq 0x7d05(%rip), %rsi      # 0x122ac
leaq 0x8468(%rip), %rcx      # 0x12a16
movl $0x1eac, %edx           # imm = 0x1EAC
callq 0x10b0
leaq 0x84e5(%rip), %rdi      # 0x12aa4
leaq 0x7ce6(%rip), %rsi      # 0x122ac
leaq 0x8449(%rip), %rcx      # 0x12a16
movl $0x1ebe, %edx           # imm = 0x1EBE
callq 0x10b0
leaq 0x84d2(%rip), %rdi      # 0x12ab0
leaq 0x7cc7(%rip), %rsi      # 0x122ac
leaq 0x842a(%rip), %rcx      # 0x12a16
movl $0x1ebf, %edx           # imm = 0x1EBF
callq 0x10b0