// File: /workspace/github_cpp_makefile_star2_O2/biotomas[P]ipasir/sat/picosat961/picosat-961/picosat.c
// Function: picosat_pop
int 
picosat_pop (PS * ps)
{
  Lit * lit;
  int res;
  ABORTIF (ps->CLS == ps->clshead, "API usage: too many 'picosat_pop'");
  ABORTIF (ps->added != ps->ahead, "API usage: incomplete clause");

  if (ps->measurealltimeinlib)
    enter (ps);
  else
    check_ready (ps);

  if (ps->state != READY)
    reset_incremental_usage (ps);

  assert (ps->CLS < ps->clshead);
  lit = *--ps->clshead;
  LOG ( fprintf (ps->out, "%sclosing context %d at depth %ld after pop\n",
                 ps->prefix, LIT2INT (lit), (long)(ps->clshead - ps->CLS) + 1));

  if (ps->cilshead == ps->eocils)
    ENLARGE (ps->cils, ps->cilshead, ps->eocils);
  *ps->cilshead++ = LIT2INT (lit);

  if (ps->cilshead - ps->cils > MAXCILS) {
    LOG ( fprintf (ps->out,
                  "%srecycling %ld interals with forced simplification\n",
		  ps->prefix, (long)(ps->cilshead - ps->cils)));
    simplify (ps, 1);
  }

  res = picosat_context (ps);
  if (res)
    LOG ( fprintf (ps->out, "%snew context %d at depth %ld after pop\n",
		   ps->prefix, res, (long)(ps->clshead - ps->CLS)));
  else
    LOG ( fprintf (ps->out, "%souter most context reached after pop\n", ps->prefix));

  if (ps->measurealltimeinlib)
    leave (ps);
  
  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x118(%rdi), %rax
cmpq 0x120(%rdi), %rax
je 0x40e9
movq %rdi, %rbx
movq 0x258(%rdi), %rax
cmpq 0x260(%rdi), %rax
jne 0x40fc
cmpl $0x0, 0x35c(%rbx)
je 0x3fe8
movq %rbx, %rdi
callq 0x3703
jmp 0x3ff0
movq %rbx, %rdi
callq 0x3b54
cmpl $0x1, (%rbx)
je 0x3ffd
movq %rbx, %rdi
callq 0x3d4b
movq 0x120(%rbx), %rax
cmpq %rax, 0x118(%rbx)
jae 0x4117
leaq -0x8(%rax), %rcx
movq %rcx, 0x120(%rbx)
movq -0x8(%rax), %r15
movq 0x148(%rbx), %rax
movq 0x150(%rbx), %rcx
cmpq 0x158(%rbx), %rcx
jne 0x408e
cmpq %rcx, %rax
ja 0x4136
subq %rax, %rcx
movabsq $0x3fffffffc, %r14      # imm = 0x3FFFFFFFC
andq %rcx, %r14
shrq %rcx
testq %r14, %r14
movl %ecx, %ecx
pushq $0x1
popq %r12
cmovneq %rcx, %r12
leaq (,%r12,4), %rcx
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x3e40
movq %rax, 0x148(%rbx)
addq %rax, %r14
leaq (%rax,%r12,4), %rcx
movq %rcx, 0x158(%rbx)
movq %r14, %rcx
subl 0x38(%rbx), %r15d
movl %r15d, %edx
shrl %edx
movl %edx, %esi
negl %esi
testb $0x1, %r15b
cmovel %edx, %esi
leaq 0x4(%rcx), %rdx
movq %rdx, 0x150(%rbx)
movl %esi, (%rcx)
subq %rax, %rdx
cmpq $0x29, %rdx
jl 0x40c3
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x4155
movq %rbx, %rdi
callq 0x3b7b
movl %eax, %ebp
cmpl $0x0, 0x35c(%rbx)
je 0x40de
movq %rbx, %rdi
callq 0x3ade
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x13f08(%rip), %rax     # 0x17ff8
movq (%rax), %rsi
leaq 0xd1c1(%rip), %rdi      # 0x112bb
jmp 0x410d
movq 0x13ef5(%rip), %rax     # 0x17ff8
movq (%rax), %rsi
leaq 0xd1de(%rip), %rdi      # 0x112eb
callq 0x10c0
callq 0x1060
leaq 0xd1f8(%rip), %rdi      # 0x11316
leaq 0xd14f(%rip), %rsi      # 0x11274
leaq 0xd200(%rip), %rcx      # 0x1132c
movl $0x1a39, %edx           # imm = 0x1A39
callq 0x10b0
leaq 0xd205(%rip), %rdi      # 0x11342
leaq 0xd130(%rip), %rsi      # 0x11274
leaq 0xd1e1(%rip), %rcx      # 0x1132c
movl $0x1a3f, %edx           # imm = 0x1A3F
callq 0x10b0