// File: /workspace/github_cpp_makefile_star2_O1/biotomas[P]ipasir/sat/picosat961/picosat-961/picosat.c
// Function: unassign
static void
unassign (PS * ps, Lit * lit)
{
  Cls *reason;
  Var *v;
  Rnk *r;

  assert (lit->val == TRUE);

  LOG ( fprintf (ps->out, "%sunassign %d\n", ps->prefix, LIT2INT (lit)));

  v = LIT2VAR (lit);
  reason = v->reason;

#ifdef NO_BINARY_CLAUSES
  assert (reason != &ps->impl);
  if (ISLITREASON (reason))
    {
      /* DO NOTHING */
    }
  else
#endif
  if (reason)
    {
      assert (reason->locked);
      reason->locked = 0;
      if (reason->learned && reason->size > 2)
	{
	  assert (ps->llocked > 0);
	  ps->llocked--;
	}
    }

  lit->val = UNDEF;
  NOTLIT (lit)->val = UNDEF;

  r = VAR2RNK (v);
  if (!r->pos)
    hpush (ps, r);

#ifndef NDSC
  {
    Cls * p, * next, ** q;

    q = LIT2DHTPS (lit);
    p = *q;
    *q = 0;

    while (p)
      {
	Lit * other = p->lits[0];

	if (other == lit)
	  {
	    other = p->lits[1];
	    q = p->next + 1;
	  }
	else
	  {
	    assert (p->lits[1] == lit);
	    q = p->next;
	  }

	next = *q;
	*q = *LIT2HTPS (other);
	*LIT2HTPS (other) = p;
	p = next;
      }
  }
#endif

#ifndef NADC
  if (v->adotabpos)
    {
      assert (ps->nadotab);
      assert (*v->adotabpos == v->ado);

      *v->adotabpos = 0;
      v->adotabpos = 0;

      ps->nadotab--;
    }
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x1, (%rsi)
jne 0xc891
movq %rsi, %rbx
movq %rdi, %r14
movq 0x40(%rdi), %rax
movl 0x38(%rdi), %edx
movl %ebx, %ecx
subl %edx, %ecx
shrl %ecx
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %rdx
leaq 0x70(%rdi), %rsi
cmpq %rsi, %rdx
je 0xc8b0
testq %rdx, %rdx
sete %sil
orb %dl, %sil
testb $0x1, %sil
jne 0xc7c9
movl 0x4(%rdx), %esi
testb $0x4, %sil
je 0xc8cf
movl %esi, %edi
andl $-0x5, %edi
movl %edi, 0x4(%rdx)
testb $0x2, %sil
je 0xc7c9
cmpl $0x3, (%rdx)
jb 0xc7c9
movl 0x3b8(%r14), %edx
testl %edx, %edx
je 0xc8ee
decl %edx
movl %edx, 0x3b8(%r14)
addq %rcx, %rax
xorl %ecx, %ecx
movb %cl, (%rbx)
movq 0x38(%r14), %rdx
movq %rbx, %rsi
subq %rdx, %rsi
xorq $0x1, %rsi
movb %cl, (%rdx,%rsi)
subq 0x40(%r14), %rax
movq 0x48(%r14), %rsi
sarq %rax
testl $0x3fffffff, 0x4(%rsi,%rax) # imm = 0x3FFFFFFF
jne 0xc801
addq %rax, %rsi
movq %r14, %rdi
callq 0xb043
movq 0x60(%r14), %rcx
movl 0x38(%r14), %eax
movl %ebx, %edx
subl %eax, %edx
movq (%rcx,%rdx,8), %rax
movq $0x0, (%rcx,%rdx,8)
testq %rax, %rax
je 0xc86a
movq 0x18(%rax), %rcx
movq 0x20(%rax), %rsi
cmpq %rbx, %rcx
je 0xc837
movl $0x8, %edx
cmpq %rbx, %rsi
je 0xc83f
jmp 0xc872
movl $0x10, %edx
movq %rsi, %rcx
movq (%rax,%rdx), %rsi
movq 0x58(%r14), %rdi
movl %ecx, %r8d
subl 0x38(%r14), %r8d
movq (%rdi,%r8,8), %rdi
movq %rdi, (%rax,%rdx)
subl 0x38(%r14), %ecx
movq 0x58(%r14), %rdx
movq %rax, (%rdx,%rcx,8)
movq %rsi, %rax
testq %rsi, %rsi
jne 0xc81e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x6973(%rip), %rdi      # 0x131ec
leaq 0x5a2c(%rip), %rsi      # 0x122ac
leaq 0x6926(%rip), %rcx      # 0x131ad
movl $0xba5, %edx            # imm = 0xBA5
callq 0x10b0
leaq 0x6904(%rip), %rdi      # 0x1319c
leaq 0x5a0d(%rip), %rsi      # 0x122ac
leaq 0x6907(%rip), %rcx      # 0x131ad
movl $0xb71, %edx            # imm = 0xB71
callq 0x10b0
leaq 0x6911(%rip), %rdi      # 0x131c8
leaq 0x59ee(%rip), %rsi      # 0x122ac
leaq 0x68e8(%rip), %rcx      # 0x131ad
movl $0xb79, %edx            # imm = 0xB79
callq 0x10b0
leaq 0x6e33(%rip), %rdi      # 0x13709
leaq 0x59cf(%rip), %rsi      # 0x122ac
leaq 0x68c9(%rip), %rcx      # 0x131ad
movl $0xb82, %edx            # imm = 0xB82
callq 0x10b0
leaq 0x68e7(%rip), %rdi      # 0x131dc
leaq 0x59b0(%rip), %rsi      # 0x122ac
leaq 0x68aa(%rip), %rcx      # 0x131ad
movl $0xb86, %edx            # imm = 0xB86
callq 0x10b0