// File: biotomas[P]ipasir/sat/picosat961/picosat-961/picosat.c
// Function: extract_all_failed_assumptions
static void
extract_all_failed_assumptions (PS * ps)
{
  Lit ** p, ** eol;
  Var * v, * u;
  int pos;
  Cls * c;

  assert (!ps->extracted_all_failed_assumptions);

  assert (ps->failed_assumption);
  assert (ps->mhead == ps->marked);

  if (ps->marked == ps->eom)
    ENLARGE (ps->marked, ps->mhead, ps->eom);

  v = LIT2VAR (ps->failed_assumption);
  mark_var (ps, v);
  pos = 0;

  while (pos < ps->mhead - ps->marked)
    {
      v = ps->marked[pos++];
      assert (v->mark);
      c = var2reason (ps, v);
      if (!c)
	continue;
      eol = end_of_lits (c);
      for (p = c->lits; p < eol; p++)
	{
	  u = LIT2VAR (*p);
	  if (!u->mark)
	    mark_var (ps, u);
	}
#ifdef NO_BINARY_CLAUSES
      if (c == &ps->impl)
	resetimpl (ps);
#endif
    }

  for (p = ps->als; p < ps->alshead; p++)
    {
      u = LIT2VAR (*p);
      if (!u->mark) continue;
      u->failed = 1;
      LOG ( fprintf (ps->out,
                     "%sfailed assumption %d\n",
		     ps->prefix, LIT2INT (*p)));
    }

  while (ps->mhead > ps->marked)
    (*--ps->mhead)->mark = 0;

  ps->extracted_all_failed_assumptions = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1c0(%rax)
jne 0x835b
jmp 0x837a
leaq 0x15632(%rip), %rdi     # 0x1d994
leaq 0x14f3b(%rip), %rsi     # 0x1d2a4
movl $0x1985, %edx           # imm = 0x1985
leaq 0x17516(%rip), %rcx     # 0x1f88b
callq 0x10b0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1b8(%rax)
je 0x838a
jmp 0x83a9
leaq 0x151f1(%rip), %rdi     # 0x1d582
leaq 0x14f0c(%rip), %rsi     # 0x1d2a4
movl $0x1987, %edx           # imm = 0x1987
leaq 0x174e7(%rip), %rcx     # 0x1f88b
callq 0x10b0
movq -0x8(%rbp), %rax
movq 0x278(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x270(%rcx), %rax
jne 0x83c3
jmp 0x83e2
leaq 0x15ce4(%rip), %rdi     # 0x1e0ae
leaq 0x14ed3(%rip), %rsi     # 0x1d2a4
movl $0x1988, %edx           # imm = 0x1988
leaq 0x174ae(%rip), %rcx     # 0x1f88b
callq 0x10b0
movq -0x8(%rbp), %rax
movq 0x270(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x280(%rcx), %rax
jne 0x8522
jmp 0x8400
movq -0x8(%rbp), %rax
movq 0x280(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x270(%rcx), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x8430
movl -0x3c(%rbp), %eax
shll %eax
movl %eax, -0x64(%rbp)
jmp 0x843a
movl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x843a
movl -0x64(%rbp), %eax
movl %eax, %eax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x278(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x270(%rcx), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movl %eax, -0x4c(%rbp)
movq -0x8(%rbp), %rax
movq 0x270(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x280(%rcx), %rax
ja 0x847d
jmp 0x849c
leaq 0x16a86(%rip), %rdi     # 0x1ef0a
leaq 0x14e19(%rip), %rsi     # 0x1d2a4
movl $0x198b, %edx           # imm = 0x198B
leaq 0x173f4(%rip), %rcx     # 0x1f88b
callq 0x10b0
jmp 0x849e
movl -0x3c(%rbp), %eax
shlq $0x3, %rax
movq %rax, -0x58(%rbp)
movq -0x48(%rbp), %rax
shlq $0x3, %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x270(%rax), %rsi
movq -0x58(%rbp), %rdx
movq -0x60(%rbp), %rcx
callq 0x4f30
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x270(%rax)
movq -0x8(%rbp), %rax
movq 0x270(%rax), %rcx
movl -0x4c(%rbp), %eax
shlq $0x3, %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x278(%rax)
movq -0x8(%rbp), %rax
movq 0x270(%rax), %rcx
movq -0x48(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x280(%rax)
jmp 0x8522
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x1b8(%rcx), %rcx
movq -0x8(%rbp), %rdx
movq 0x38(%rdx), %rdx
subq %rdx, %rcx
shrl %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x18050
movl $0x0, -0x2c(%rbp)
movslq -0x2c(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x278(%rcx), %rcx
movq -0x8(%rbp), %rdx
movq 0x270(%rdx), %rdx
subq %rdx, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rax
jge 0x869a
movq -0x8(%rbp), %rax
movq 0x270(%rax), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x2c(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movw (%rax), %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x85c3
jmp 0x85e2
leaq 0x16a13(%rip), %rdi     # 0x1efdd
leaq 0x14cd3(%rip), %rsi     # 0x1d2a4
movl $0x1994, %edx           # imm = 0x1994
leaq 0x172ae(%rip), %rcx     # 0x1f88b
callq 0x10b0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x17d30
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x85ff
jmp 0x8563
movq -0x38(%rbp), %rdi
callq 0xb980
movq %rax, -0x18(%rbp)
movq -0x38(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x867b
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq -0x8(%rbp), %rdx
movq 0x38(%rdx), %rdx
subq %rdx, %rcx
shrl %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movw (%rax), %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
jne 0x866b
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x18050
jmp 0x866d
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
jmp 0x8618
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
addq $0x70, %rcx
cmpq %rcx, %rax
jne 0x8695
movq -0x8(%rbp), %rdi
callq 0x13ec0
jmp 0x8563
movq -0x8(%rbp), %rax
movq 0xf8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x100(%rcx), %rax
jae 0x871c
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq -0x8(%rbp), %rdx
movq 0x38(%rdx), %rdx
subq %rdx, %rcx
shrl %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movw (%rax), %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
jne 0x86f8
jmp 0x870e
movq -0x28(%rbp), %rax
movw (%rax), %cx
andw $-0x21, %cx
orw $0x20, %cx
movw %cx, (%rax)
jmp 0x870c
jmp 0x870e
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
jmp 0x86a9
jmp 0x871e
movq -0x8(%rbp), %rax
movq 0x278(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x270(%rcx), %rax
jbe 0x8763
movq -0x8(%rbp), %rcx
movq 0x278(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x278(%rcx)
movq -0x8(%rax), %rax
movw (%rax), %cx
andw $-0x2, %cx
orw $0x0, %cx
movw %cx, (%rax)
jmp 0x871e
movq -0x8(%rbp), %rax
movl $0x1, 0x1c0(%rax)
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)