// File: /workspace/github_cpp_makefile_star2_O3/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 0x49e6
movq %rdi, %rbx
movq 0x258(%rdi), %rax
cmpq 0x260(%rdi), %rax
jne 0x49eb
cmpl $0x0, 0x35c(%rbx)
je 0x48c4
movq %rbx, %rdi
callq 0x3eb1
jmp 0x48cc
movq %rbx, %rdi
callq 0x441c
cmpl $0x1, (%rbx)
je 0x48d9
movq %rbx, %rdi
callq 0x4601
movq 0x120(%rbx), %rax
cmpq %rax, 0x118(%rbx)
jae 0x49f0
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 0x496c
cmpq %rcx, %rax
ja 0x4a0f
subq %rax, %rcx
movabsq $0x3fffffffc, %r14      # imm = 0x3FFFFFFFC
andq %rcx, %r14
shrq %rcx
testq %r14, %r14
movl %ecx, %ecx
movl $0x1, %r12d
cmovneq %rcx, %r12
leaq (,%r12,4), %rcx
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x473a
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 0x49a3
movq %rbx, %rdi
movl $0x1, %esi
callq 0x4a2e
movq 0x120(%rbx), %rax
cmpq 0x118(%rbx), %rax
je 0x49c8
movl -0x8(%rax), %eax
subl 0x38(%rbx), %eax
movl %eax, %ecx
shrl %ecx
movl %ecx, %ebp
negl %ebp
testb $0x1, %al
cmovel %ecx, %ebp
jmp 0x49ca
xorl %ebp, %ebp
cmpl $0x0, 0x35c(%rbx)
je 0x49db
movq %rbx, %rdi
callq 0x4375
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x1320
callq 0x1304
leaq 0xe927(%rip), %rdi      # 0x1331e
leaq 0xe87e(%rip), %rsi      # 0x1327c
leaq 0xe92f(%rip), %rcx      # 0x13334
movl $0x1a39, %edx           # imm = 0x1A39
callq 0x10b0
leaq 0xe934(%rip), %rdi      # 0x1334a
leaq 0xe85f(%rip), %rsi      # 0x1327c
leaq 0xe910(%rip), %rcx      # 0x13334
movl $0x1a3f, %edx           # imm = 0x1A3F
callq 0x10b0