// File: /workspace/github_cpp_makefile_star2_O2/biotomas[P]ipasir/sat/picosat961/picosat-961/picosat.c
// Function: reduce
static void
reduce (PS * ps, unsigned percentage)
{
  unsigned redcount, lcollect, collect, target;
#ifdef STATS
  size_t bytes_collected;
#endif
  Cls **p, *c;

  assert (ps->rhead == ps->resolved);

  ps->lastreduceconflicts = ps->conflicts;

  assert (percentage <= 100);
  LOG ( fprintf (ps->out, 
                "%sreducing %u%% learned clauses\n",
		ps->prefix, percentage));

  while (ps->nlclauses - ps->llocked > (unsigned)(ps->eor - ps->resolved))
    ENLARGE (ps->resolved, ps->rhead, ps->eor);

  collect = 0;
  lcollect = 0;

  for (p = ((ps->fsimplify < ps->fixed) ? SOC : ps->lclauses); p != EOC; p = NXC (p))
    {
      c = *p;
      if (!c)
	continue;

#ifdef TRACE
      if (c->collected)
	continue;
#endif

      if (c->locked)
	continue;

      assert (!c->collect);
      if (ps->fsimplify < ps->fixed && clause_is_toplevel_satisfied (ps, c))
	{
	  mark_clause_to_be_collected (c);
	  collect++;

	  if (c->learned && c->size > 2)
	    lcollect++;

	  continue;
	}

      if (!c->learned)
	continue;

      if (c->size <= 2)
	continue;

      assert (ps->rhead < ps->eor);
      *ps->rhead++ = c;
    }
  assert (ps->rhead <= ps->eor);

  ps->fsimplify = ps->fixed;

  redcount = ps->rhead - ps->resolved;
  SORT (Cls *, cmp_glue_activity_size, ps->resolved, redcount);

  assert (ps->nlclauses >= lcollect);
  target = ps->nlclauses - lcollect + 1;

  target = (percentage * target + 99) / 100;

  if (target >= redcount)
    target = redcount;

  ps->rhead = ps->resolved + target;
  while (ps->rhead > ps->resolved)
    {
      c = *--ps->rhead;
      mark_clause_to_be_collected (c);

      collect++;
      if (c->learned && c->size > 2)	/* just for consistency */
	lcollect++;
    }

  if (collect)
    {
      ps->reductions++;
#ifdef STATS
      bytes_collected = 
#endif
      collect_clauses (ps);
#ifdef STATS
      ps->rrecycled += bytes_collected;
#endif
      report (ps, 2, '-');
    }

  if (!lcollect)
    inc_lreduce (ps);		/* avoid dead lock */

  assert (ps->rhead == ps->resolved);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq 0x2a0(%rdi), %rax
movq 0x2a8(%rdi), %rbx
cmpq %rax, %rbx
jne 0xabeb
movq %rdi, %rbp
movl 0x41c(%rdi), %ecx
movl %ecx, 0x3b4(%rdi)
cmpl $0x64, %esi
ja 0xac0a
movq 0x2b0(%rbp), %rcx
movabsq $0x7fffffff8, %r14      # imm = 0x7FFFFFFF8
movl 0x42c(%rbp), %edi
subl 0x3b8(%rbp), %edi
movq %rcx, %rdx
subq %rax, %rdx
movq %rdx, %r8
shrq $0x3, %r8
cmpl %r8d, %edi
jbe 0xa56c
cmpq %rcx, %rax
ja 0xab66
movl %esi, %r12d
subq %rax, %rbx
movq %rdx, %rcx
shrq $0x2, %rcx
testl %r8d, %r8d
movl %ecx, %r15d
pushq $0x1
popq %rcx
cmoveq %rcx, %r15
andq %r14, %rdx
leaq (,%r15,8), %rcx
movq %rbp, %rdi
movq %rax, %rsi
callq 0x3e40
movq %rax, 0x2a0(%rbp)
andq %r14, %rbx
addq %rax, %rbx
movq %rbx, 0x2a8(%rbp)
leaq (%rax,%r15,8), %rcx
movq %rcx, 0x2b0(%rbp)
movl %r12d, %esi
jmp 0xa4f1
movl %esi, 0x2c(%rsp)
movl 0x39c(%rbp), %eax
cmpl 0x3e8(%rbp), %eax
jae 0xa58e
movq 0x1e0(%rbp), %r15
cmpq 0x1e8(%rbp), %r15
jne 0xa595
movq 0x1f8(%rbp), %r15
xorl %edx, %edx
movl $0x0, 0x1c(%rsp)
cmpq 0x200(%rbp), %r15
je 0xa657
movq (%r15), %r14
testq %r14, %r14
je 0xa613
movl %edx, %r12d
movl 0x4(%r14), %ebx
testb $0x4, %bl
jne 0xa610
testb $0x1, %bl
jne 0xaba4
movl 0x39c(%rbp), %eax
cmpl 0x3e8(%rbp), %eax
jae 0xa605
movq %rbp, %rdi
movq %r14, %rsi
callq 0xbb55
testl %eax, %eax
je 0xa605
movq %r14, %rdi
callq 0xbb91
movl %r12d, %edx
incl %edx
testb $0x2, 0x4(%r14)
je 0xa613
cmpl $0x3, (%r14)
sbbl $-0x1, 0x1c(%rsp)
jmp 0xa613
testb $0x2, %bl
je 0xa610
cmpl $0x3, (%r14)
jae 0xa630
movl %r12d, %edx
addq $0x8, %r15
cmpq 0x1e8(%rbp), %r15
jne 0xa59f
movq 0x1f8(%rbp), %r15
jmp 0xa59f
movq 0x2a8(%rbp), %rax
cmpq 0x2b0(%rbp), %rax
jae 0xabcc
movl %r12d, %edx
leaq 0x8(%rax), %rcx
movq %rcx, 0x2a8(%rbp)
movq %r14, (%rax)
jmp 0xa613
movq 0x2a8(%rbp), %rcx
cmpq 0x2b0(%rbp), %rcx
ja 0xac29
movl %edx, 0x28(%rsp)
movl 0x3e8(%rbp), %eax
movl %eax, 0x39c(%rbp)
movq 0x478(%rbp), %rax
cmpq 0x470(%rbp), %rax
jne 0xabc3
movq 0x2a0(%rbp), %r15
subq %r15, %rcx
shrq $0x3, %rcx
leal -0x1(%rcx), %eax
movq %rax, 0x20(%rsp)
movq %rcx, 0x30(%rsp)
cmpl $0xc, %ecx
movq %r15, 0x8(%rsp)
jge 0xa85b
movl 0x20(%rsp), %ebx
testl %ebx, %ebx
jle 0xa6ea
movq -0x8(%r15,%rbx,8), %rdi
movq (%r15,%rbx,8), %rsi
callq 0xf4cf
testl %eax, %eax
jle 0xa6e5
movdqu -0x8(%r15,%rbx,8), %xmm0
pshufd $0x4e, %xmm0, %xmm0     # xmm0 = xmm0[2,3,0,1]
movdqu %xmm0, -0x8(%r15,%rbx,8)
decq %rbx
jmp 0xa6bc
movslq 0x30(%rsp), %rbx
addq $0x10, %r15
pushq $0x2
popq %r12
cmpq %rbx, %r12
jge 0xa733
movq 0x8(%rsp), %rax
movq (%rax,%r12,8), %r14
movq %r15, %r13
movq -0x8(%r13), %rsi
movq %r14, %rdi
callq 0xf4cf
testl %eax, %eax
jns 0xa726
movq -0x8(%r13), %rax
movq %rax, (%r13)
addq $-0x8, %r13
jmp 0xa708
movq %r14, (%r13)
incq %r12
addq $0x8, %r15
jmp 0xa6f7
movq 0x478(%rbp), %rax
cmpq 0x470(%rbp), %rax
jne 0xabc3
xorl %ebx, %ebx
movq 0x20(%rsp), %r12
testl %r12d, %r12d
cmovlel %ebx, %r12d
shlq $0x3, %r12
movl 0x2c(%rsp), %r14d
movl 0x1c(%rsp), %r15d
cmpq %rbx, %r12
je 0xa78f
movq 0x8(%rsp), %rax
movq (%rax,%rbx), %rdi
movq 0x8(%rax,%rbx), %rsi
callq 0xf4cf
addq $0x8, %rbx
testl %eax, %eax
jle 0xa763
leaq 0x90c5(%rip), %rdi      # 0x1384f
jmp 0xab8c
movl 0x42c(%rbp), %eax
subl %r15d, %eax
jb 0xac48
incl %eax
imull %r14d, %eax
addl $0x63, %eax
pushq $0x64
popq %rcx
xorl %edx, %edx
divl %ecx
movq 0x30(%rsp), %rcx
cmpl %ecx, %eax
cmovael %ecx, %eax
movq 0x2a0(%rbp), %rcx
leaq (%rcx,%rax,8), %rax
movq %rax, 0x2a8(%rbp)
movl 0x28(%rsp), %ebx
cmpq %rcx, %rax
jbe 0xa80b
leaq -0x8(%rax), %rcx
movq %rcx, 0x2a8(%rbp)
movq -0x8(%rax), %r14
movq %r14, %rdi
callq 0xbb91
testb $0x2, 0x4(%r14)
je 0xa7f9
cmpl $0x3, (%r14)
sbbl $-0x1, %r15d
movq 0x2a0(%rbp), %rcx
movq 0x2a8(%rbp), %rax
incl %ebx
jmp 0xa7ce
testl %ebx, %ebx
je 0xa82b
incl 0x3a4(%rbp)
movq %rbp, %rdi
callq 0xbbbf
pushq $0x2
popq %rsi
pushq $0x2d
popq %rdx
movq %rbp, %rdi
callq 0x7c11
testl %r15d, %r15d
jne 0xa838
movq %rbp, %rdi
callq 0xecd3
movq 0x2a8(%rbp), %rax
cmpq 0x2a0(%rbp), %rax
jne 0xac67
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r13d, %r13d
movq 0x20(%rsp), %rax
movl %eax, %edi
movq %rbp, 0x38(%rsp)
leal (%rdi,%r13), %eax
cltd
pushq $0x2
popq %rcx
idivl %ecx
movq %rdi, 0x50(%rsp)
movslq %edi, %r12
movq -0x8(%r15,%r12,8), %rcx
cltq
movq (%r15,%rax,8), %rdx
movq %rdx, -0x8(%r15,%r12,8)
movq %rcx, (%r15,%rax,8)
movslq %r13d, %rbx
movq (%r15,%rbx,8), %rdi
movq -0x8(%r15,%r12,8), %rsi
callq 0xf4cf
movq (%r15,%rbx,8), %rdi
testl %eax, %eax
jle 0xa8ba
movq -0x8(%r15,%r12,8), %rax
movq %rdi, -0x8(%r15,%r12,8)
movq %rax, (%r15,%rbx,8)
movq %rax, %rdi
movq (%r15,%r12,8), %rsi
callq 0xf4cf
testl %eax, %eax
jle 0xa8d7
movq (%r15,%r12,8), %rax
movq (%r15,%rbx,8), %rcx
movq %rcx, (%r15,%r12,8)
movq %rax, (%r15,%rbx,8)
movq -0x8(%r15,%r12,8), %rdi
movq (%r15,%r12,8), %rsi
callq 0xf4cf
testl %eax, %eax
jle 0xa8fc
movdqu -0x8(%r15,%r12,8), %xmm0
pshufd $0x4e, %xmm0, %xmm0     # xmm0 = xmm0[2,3,0,1]
movdqu %xmm0, -0x8(%r15,%r12,8)
leal -0x1(%r12), %ebp
movq -0x8(%r15,%r12,8), %r14
decq %r12
movq %r12, 0x40(%rsp)
leal 0x2(%r13), %eax
movslq %eax, %rbx
movq %r13, 0x48(%rsp)
movq %r13, 0x58(%rsp)
movslq %r13d, %rax
leaq (%r15,%rax,8), %r12
movq %rax, %r15
xorl %r13d, %r13d
movq 0x8(%r12,%r13,8), %rdi
movq %r14, %rsi
callq 0xf4cf
incq %r13
testl %eax, %eax
js 0xa92c
movl %r15d, %eax
addq %r13, %rax
movq %rax, 0x60(%rsp)
movslq %ebp, %rbp
addq %r13, %r15
movq %r15, 0x10(%rsp)
movq %rbp, %r15
decq %rbp
movq 0x8(%rsp), %rax
movq -0x8(%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0xf4cf
cmpq %r15, %rbx
je 0xa977
testl %eax, %eax
js 0xa956
cmpq %rbp, 0x10(%rsp)
jge 0xa99a
movq 0x8(%rsp), %r15
movq (%r15,%rbp,8), %rax
movq (%r12,%r13,8), %rcx
movq %rcx, (%r15,%rbp,8)
movq %rax, (%r12,%r13,8)
movq 0x60(%rsp), %r13
jmp 0xa91a
movq 0x58(%rsp), %r9
leal (%r9,%r13), %eax
decl %eax
movq 0x8(%rsp), %r15
movq 0x40(%rsp), %rsi
movq (%r15,%rsi,8), %rcx
movq (%r12,%r13,8), %rdx
movq %rdx, (%r15,%rsi,8)
leal (%r9,%r13), %edx
movq 0x48(%rsp), %r8
subl %r8d, %edx
movq 0x50(%rsp), %rdi
movl %edi, %esi
subl %r9d, %esi
subl %r13d, %esi
cmpl %esi, %edx
leal 0x1(%r9,%r13), %edx
movl %eax, %esi
cmovll %edi, %esi
movl %r8d, %ebx
cmovll %edx, %ebx
cmovll %eax, %edi
movq %rcx, (%r12,%r13,8)
movq %r8, %r13
cmovgel %edx, %r13d
movl %edi, %ecx
subl %r13d, %ecx
movl %esi, %eax
subl %ebx, %eax
cmpl $0xb, %ecx
jl 0xab1f
cmpl $0xa, %eax
movq 0x38(%rsp), %rbp
jle 0xab5d
movq 0x478(%rbp), %r15
movq 0x480(%rbp), %r14
cmpq %r14, %r15
jne 0xaa8d
movl %esi, 0x10(%rsp)
movq 0x470(%rbp), %rsi
cmpq %r15, %rsi
ja 0xab85
movq %rdi, %r12
subq %rsi, %r15
movq %r15, %rax
shrq %rax
movabsq $0x3fffffffc, %rcx      # imm = 0x3FFFFFFFC
andq %rcx, %r15
movl %eax, %r14d
pushq $0x1
popq %rax
cmoveq %rax, %r14
leaq (,%r14,4), %rcx
movq %rbp, %rdi
movq %r15, %rdx
callq 0x3e40
movq %rax, 0x470(%rbp)
addq %rax, %r15
leaq (%rax,%r14,4), %r14
movq %r14, 0x480(%rbp)
movq %r12, %rdi
movl 0x10(%rsp), %esi
leaq 0x4(%r15), %rax
movq %rax, 0x478(%rbp)
movl %ebx, (%r15)
cmpq %r14, %rax
movq 0x8(%rsp), %r15
jne 0xab0d
movl %esi, 0x10(%rsp)
movq 0x470(%rbp), %rsi
cmpq %r14, %rsi
ja 0xab85
movq %rdi, %r12
subq %rsi, %r14
movq %r14, %rax
shrq %rax
movabsq $0x3fffffffc, %rcx      # imm = 0x3FFFFFFFC
andq %rcx, %r14
movl %eax, %ebx
pushq $0x1
popq %rax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rcx
movq %rbp, %rdi
movq %r14, %rdx
callq 0x3e40
movq %rax, 0x470(%rbp)
addq %rax, %r14
leaq (%rax,%rbx,4), %rax
movq %rax, 0x480(%rbp)
movq %r14, %rax
movq %r12, %rdi
movl 0x10(%rsp), %esi
leaq 0x4(%rax), %rcx
movq %rcx, 0x478(%rbp)
movl %esi, (%rax)
jmp 0xa86a
movl %esi, %edi
movl %ebx, %r13d
cmpl $0xa, %eax
movq 0x38(%rsp), %rbp
jg 0xa86a
movq 0x478(%rbp), %rax
cmpq 0x470(%rbp), %rax
jbe 0xa6b8
movl -0x4(%rax), %edi
leaq -0x8(%rax), %rcx
movq %rcx, 0x478(%rbp)
movl -0x8(%rax), %r13d
jmp 0xa86a
leaq 0x78e8(%rip), %rdi      # 0x1244c
jmp 0xab8c
leaq 0x7c5e(%rip), %rdi      # 0x127cb
leaq 0x6700(%rip), %rsi      # 0x11274
leaq 0x8ca2(%rip), %rcx      # 0x1381d
movl $0x1581, %edx           # imm = 0x1581
callq 0x10b0
leaq 0x78df(%rip), %rdi      # 0x1246b
leaq 0x66e1(%rip), %rsi      # 0x11274
leaq 0x8c83(%rip), %rcx      # 0x1381d
movl $0x15ae, %edx           # imm = 0x15AE
callq 0x10b0
leaq 0x77c4(%rip), %rdi      # 0x1236f
leaq 0x66c2(%rip), %rsi      # 0x11274
leaq 0x8c64(%rip), %rcx      # 0x1381d
movl $0x1594, %edx           # imm = 0x1594
callq 0x10b0
leaq 0x7869(%rip), %rdi      # 0x12433
jmp 0xab8c
leaq 0x7c14(%rip), %rdi      # 0x127e7
leaq 0x669a(%rip), %rsi      # 0x11274
leaq 0x8c3c(%rip), %rcx      # 0x1381d
movl $0x15a6, %edx           # imm = 0x15A6
callq 0x10b0
leaq 0x7b43(%rip), %rdi      # 0x12735
leaq 0x667b(%rip), %rsi      # 0x11274
leaq 0x8c1d(%rip), %rcx      # 0x1381d
movl $0x1577, %edx           # imm = 0x1577
callq 0x10b0
leaq 0x8c2c(%rip), %rdi      # 0x1383d
leaq 0x665c(%rip), %rsi      # 0x11274
leaq 0x8bfe(%rip), %rcx      # 0x1381d
movl $0x157b, %edx           # imm = 0x157B
callq 0x10b0
leaq 0x8120(%rip), %rdi      # 0x12d50
leaq 0x663d(%rip), %rsi      # 0x11274
leaq 0x8bdf(%rip), %rcx      # 0x1381d
movl $0x15a9, %edx           # imm = 0x15A9
callq 0x10b0
leaq 0x8c39(%rip), %rdi      # 0x13888
leaq 0x661e(%rip), %rsi      # 0x11274
leaq 0x8bc0(%rip), %rcx      # 0x1381d
movl $0x15b0, %edx           # imm = 0x15B0
callq 0x10b0
leaq 0x7ac7(%rip), %rdi      # 0x12735
leaq 0x65ff(%rip), %rsi      # 0x11274
leaq 0x8ba1(%rip), %rcx      # 0x1381d
movl $0x15d3, %edx           # imm = 0x15D3
callq 0x10b0