// File: biotomas[P]ipasir/sat/picosat961/picosat-961/picosat.c
// Function: propl
inline static void
propl (PS * ps, Lit * this)
{
  Lit **l, *other, *prev, *new_lit, **eol;
  Cls *next, **htp_ptr, **new_htp_ptr;
  Cls *c;
#ifdef STATS
  unsigned size;
#endif

  htp_ptr = LIT2HTPS (this);
  assert (this->val == FALSE);

  /* Traverse all non binary clauses with 'this'.  Head/Tail pointers are
   * updated as well.
   */
  for (c = *htp_ptr; c; c = next)
    {
      ps->visits++;
#ifdef STATS
      size = c->size;
      assert (size >= 3);
      ps->traversals++;	/* other is dereferenced at least */

      if (size == 3)
	ps->tvisits++;
      else if (size >= 4)
	{
	  ps->lvisits++;
	  ps->ltraversals++;
	}
#endif
#ifdef TRACE
      assert (!c->collected);
#endif
      assert (c->size > 0);

      other = c->lits[0];
      if (other != this)
	{
	  assert (c->size != 1);
	  c->lits[0] = this;
	  c->lits[1] = other;
	  next = c->next[1];
	  c->next[1] = c->next[0];
	  c->next[0] = next;
	}
      else if (c->size == 1)	/* With assumptions we need to
	                         * traverse unit clauses as well.
			         */
	{
	  assert (!ps->conflict);
	  ps->conflict = c;
	  break;
	}
      else
	{
	  assert (other == this && c->size > 1);
	  other = c->lits[1];
	  next = c->next[0];
	}
      assert (other == c->lits[1]);
      assert (this == c->lits[0]);
      assert (next == c->next[0]);
      assert (!c->collect);

      if (other->val == TRUE)
	{
#ifdef STATS
	  ps->othertrue++;
	  ps->othertruel++;
#endif
#ifndef NDSC
	  if (should_disconnect_head_tail (ps, other))
	    {
	      new_htp_ptr = LIT2DHTPS (other);
	      c->next[0] = *new_htp_ptr;
	      *new_htp_ptr = c;
#ifdef STATS
	      ps->othertruelu++;
#endif
	      *htp_ptr = next;
	      continue;
	    }
#endif
	  htp_ptr = c->next;
	  continue;
	}

      l = c->lits + 1;
      eol = c->lits + c->size;
      prev = this;

      while (++l != eol)
	{
#ifdef STATS
	  if (size >= 3)
	    {
	      ps->traversals++;
	      if (size > 3)
		ps->ltraversals++;
	    }
#endif
	  new_lit = *l;
	  *l = prev;
	  prev = new_lit;
	  if (new_lit->val != FALSE) break;
	}

      if (l == eol)
	{
	  while (l > c->lits + 2) 
	    {
	      new_lit = *--l;
	      *l = prev;
	      prev = new_lit;
	    }
	  assert (c->lits[0] == this);

	  assert (other == c->lits[1]);
	  if (other->val == FALSE)	/* found conflict */
	    {
	      assert (!ps->conflict);
	      ps->conflict = c;
	      return;
	    }

	  assign_forced (ps, other, c);		/* unit clause */
	  htp_ptr = c->next;
	}
      else
	{
	  assert (new_lit->val == TRUE || new_lit->val == UNDEF);
	  c->lits[0] = new_lit;
	  // *l = this;
	  new_htp_ptr = LIT2HTPS (new_lit);
	  c->next[0] = *new_htp_ptr;
	  *new_htp_ptr = c;
	  *htp_ptr = next;
	}
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rdx
movq 0x38(%rdx), %rdx
subq %rdx, %rcx
movl %ecx, %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $-0x1, %eax
jne 0x13342
jmp 0x13361
leaq 0xb37a(%rip), %rdi      # 0x1e6c3
leaq 0x9f54(%rip), %rsi      # 0x1d2a4
movl $0xf97, %edx            # imm = 0xF97
leaq 0xb998(%rip), %rcx      # 0x1ecf4
callq 0x10b0
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x1383e
movq -0x8(%rbp), %rax
movq 0x458(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x458(%rax)
movq -0x58(%rbp), %rax
cmpl $0x0, (%rax)
jbe 0x13398
jmp 0x133b7
leaq 0xb96d(%rip), %rdi      # 0x1ed0c
leaq 0x9efe(%rip), %rsi      # 0x1d2a4
movl $0xfaf, %edx            # imm = 0xFAF
leaq 0xb942(%rip), %rcx      # 0x1ecf4
callq 0x10b0
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x1343c
movq -0x58(%rbp), %rax
cmpl $0x1, (%rax)
je 0x133d8
jmp 0x133f7
leaq 0xb939(%rip), %rdi      # 0x1ed18
leaq 0x9ebe(%rip), %rsi      # 0x1d2a4
movl $0xfb4, %edx            # imm = 0xFB4
leaq 0xb902(%rip), %rcx      # 0x1ecf4
callq 0x10b0
movq -0x10(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x134d6
movq -0x58(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x13488
movq -0x8(%rbp), %rax
cmpq $0x0, 0x250(%rax)
jne 0x13455
jmp 0x13474
leaq 0xb017(%rip), %rdi      # 0x1e473
leaq 0x9e41(%rip), %rsi      # 0x1d2a4
movl $0xfbf, %edx            # imm = 0xFBF
leaq 0xb885(%rip), %rcx      # 0x1ecf4
callq 0x10b0
movq -0x58(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x250(%rax)
jmp 0x1383e
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x1349d
movq -0x58(%rbp), %rax
cmpl $0x1, (%rax)
jbe 0x1349d
jmp 0x134bc
leaq 0xb881(%rip), %rdi      # 0x1ed25
leaq 0x9df9(%rip), %rsi      # 0x1d2a4
movl $0xfc5, %edx            # imm = 0xFC5
leaq 0xb83d(%rip), %rcx      # 0x1ecf4
callq 0x10b0
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x134d6
movq -0x20(%rbp), %rax
movq -0x58(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x134e6
jmp 0x13505
leaq 0xb855(%rip), %rdi      # 0x1ed42
leaq 0x9db0(%rip), %rsi      # 0x1d2a4
movl $0xfc9, %edx            # imm = 0xFC9
leaq 0xb7f4(%rip), %rcx      # 0x1ecf4
callq 0x10b0
movq -0x10(%rbp), %rax
movq -0x58(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jne 0x13515
jmp 0x13534
leaq 0xb83a(%rip), %rdi      # 0x1ed56
leaq 0x9d81(%rip), %rsi      # 0x1d2a4
movl $0xfca, %edx            # imm = 0xFCA
leaq 0xb7c5(%rip), %rcx      # 0x1ecf4
callq 0x10b0
movq -0x40(%rbp), %rax
movq -0x58(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x13544
jmp 0x13563
leaq 0xb81e(%rip), %rdi      # 0x1ed69
leaq 0x9d52(%rip), %rsi      # 0x1d2a4
movl $0xfcb, %edx            # imm = 0xFCB
leaq 0xb796(%rip), %rcx      # 0x1ecf4
callq 0x10b0
movq -0x58(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x13574
jmp 0x13593
leaq 0xae79(%rip), %rdi      # 0x1e3f4
leaq 0x9d22(%rip), %rsi      # 0x1d2a4
movl $0xfcc, %edx            # imm = 0xFCC
leaq 0xb766(%rip), %rcx      # 0x1ecf4
callq 0x10b0
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x1, %eax
jne 0x13610
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x16a80
cmpl $0x0, %eax
je 0x135ff
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rdx
movq 0x38(%rdx), %rdx
subq %rdx, %rcx
movl %ecx, %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x58(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
jmp 0x13831
movq -0x58(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x48(%rbp)
jmp 0x13831
movq -0x58(%rbp), %rax
addq $0x18, %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x58(%rbp), %rax
addq $0x18, %rax
movq -0x58(%rbp), %rcx
movl (%rcx), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
cmpq -0x38(%rbp), %rax
je 0x13681
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $-0x1, %eax
je 0x1367f
jmp 0x13681
jmp 0x13641
movq -0x18(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x137a1
jmp 0x13691
movq -0x18(%rbp), %rax
movq -0x58(%rbp), %rcx
addq $0x18, %rcx
addq $0x10, %rcx
cmpq %rcx, %rax
jbe 0x136d2
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, -0x18(%rbp)
movq -0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x13691
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x136e2
jmp 0x13701
leaq 0xb693(%rip), %rdi      # 0x1ed7c
leaq 0x9bb4(%rip), %rsi      # 0x1d2a4
movl $0x1001, %edx           # imm = 0x1001
leaq 0xb5f8(%rip), %rcx      # 0x1ecf4
callq 0x10b0
movq -0x20(%rbp), %rax
movq -0x58(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x13711
jmp 0x13730
leaq 0xb62a(%rip), %rdi      # 0x1ed42
leaq 0x9b85(%rip), %rsi      # 0x1d2a4
movl $0x1003, %edx           # imm = 0x1003
leaq 0xb5c9(%rip), %rcx      # 0x1ecf4
callq 0x10b0
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $-0x1, %eax
jne 0x1377f
movq -0x8(%rbp), %rax
cmpq $0x0, 0x250(%rax)
jne 0x1374c
jmp 0x1376b
leaq 0xad20(%rip), %rdi      # 0x1e473
leaq 0x9b4a(%rip), %rsi      # 0x1d2a4
movl $0x1006, %edx           # imm = 0x1006
leaq 0xb58e(%rip), %rcx      # 0x1ecf4
callq 0x10b0
movq -0x58(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x250(%rax)
jmp 0x1383e
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x13850
movq -0x58(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x48(%rbp)
jmp 0x1382f
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x1, %eax
je 0x137b9
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x137bb
jmp 0x137da
leaq 0xb5cd(%rip), %rdi      # 0x1ed8f
leaq 0x9adb(%rip), %rsi      # 0x1d2a4
movl $0x1010, %edx           # imm = 0x1010
leaq 0xb51f(%rip), %rcx      # 0x1ecf4
callq 0x10b0
movq -0x30(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rdx
movq 0x38(%rdx), %rdx
subq %rdx, %rcx
movl %ecx, %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x58(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
jmp 0x13831
movq -0x40(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x1336c
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)