// File: /workspace/github_cpp_makefile_star2_O2/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 0xb9f7
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 0xba16
testq %rdx, %rdx
sete %sil
orb %dl, %sil
testb $0x1, %sil
jne 0xb92f
movl 0x4(%rdx), %esi
testb $0x4, %sil
je 0xba35
movl %esi, %edi
andl $-0x5, %edi
movl %edi, 0x4(%rdx)
testb $0x2, %sil
je 0xb92f
cmpl $0x3, (%rdx)
jb 0xb92f
movl 0x3b8(%r14), %edx
testl %edx, %edx
je 0xba54
decl %edx
movl %edx, 0x3b8(%r14)
addq %rcx, %rax
xorl %edx, %edx
movb %dl, (%rbx)
movq 0x38(%r14), %rsi
movq %rbx, %rcx
subq %rsi, %rcx
movq %rcx, %rdi
xorq $0x1, %rdi
movb %dl, (%rsi,%rdi)
subq 0x40(%r14), %rax
movq 0x48(%r14), %rsi
sarq %rax
testl $0x3fffffff, 0x4(%rsi,%rax) # imm = 0x3FFFFFFF
jne 0xb971
addq %rax, %rsi
movq %r14, %rdi
callq 0xa357
movq %rbx, %rcx
subq 0x38(%r14), %rcx
movq 0x60(%r14), %rdx
movl %ecx, %ecx
movq (%rdx,%rcx,8), %rax
andq $0x0, (%rdx,%rcx,8)
pushq $0x10
popq %rcx
pushq $0x8
popq %rdx
testq %rax, %rax
je 0xb9d0
movq 0x18(%rax), %rsi
movq 0x20(%rax), %r8
cmpq %rbx, %rsi
je 0xb9a2
movq %rdx, %rdi
cmpq %rbx, %r8
je 0xb9a8
jmp 0xb9d8
movq %rcx, %rdi
movq %r8, %rsi
movq (%rax,%rdi), %r8
movl %esi, %r9d
subl 0x38(%r14), %r9d
movq 0x58(%r14), %r10
movq (%r10,%r9,8), %r9
movq %r9, (%rax,%rdi)
movq 0x58(%r14), %rdi
subl 0x38(%r14), %esi
movq %rax, (%rdi,%rsi,8)
movq %r8, %rax
jmp 0xb986
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x67c7(%rip), %rdi      # 0x121a6
leaq 0x588e(%rip), %rsi      # 0x11274
leaq 0x677a(%rip), %rcx      # 0x12167
movl $0xba5, %edx            # imm = 0xBA5
callq 0x10b0
leaq 0x6758(%rip), %rdi      # 0x12156
leaq 0x586f(%rip), %rsi      # 0x11274
leaq 0x675b(%rip), %rcx      # 0x12167
movl $0xb71, %edx            # imm = 0xB71
callq 0x10b0
leaq 0x6765(%rip), %rdi      # 0x12182
leaq 0x5850(%rip), %rsi      # 0x11274
leaq 0x673c(%rip), %rcx      # 0x12167
movl $0xb79, %edx            # imm = 0xB79
callq 0x10b0
leaq 0x6c87(%rip), %rdi      # 0x126c3
leaq 0x5831(%rip), %rsi      # 0x11274
leaq 0x671d(%rip), %rcx      # 0x12167
movl $0xb82, %edx            # imm = 0xB82
callq 0x10b0
leaq 0x673b(%rip), %rdi      # 0x12196
leaq 0x5812(%rip), %rsi      # 0x11274
leaq 0x66fe(%rip), %rcx      # 0x12167
movl $0xb86, %edx            # imm = 0xB86
callq 0x10b0