// File: /workspace/github_cpp_makefile_star2_O3/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
movl %esi, %ecx
movq %rdi, %rbp
movq 0x2a0(%rdi), %rsi
movq 0x2a8(%rdi), %rdi
cmpq %rsi, %rdi
jne 0xbab4
movl 0x41c(%rbp), %eax
movl %eax, 0x3b4(%rbp)
movl %ecx, 0x34(%rsp)
cmpl $0x64, %ecx
ja 0xbad3
movl 0x42c(%rbp), %eax
subl 0x3b8(%rbp), %eax
movq 0x2b0(%rbp), %rcx
movq %rcx, %rdx
subq %rdi, %rdx
movq %rdx, %rbx
shrq $0x3, %rbx
cmpl %ebx, %eax
jbe 0xb392
movl $0x1, %r15d
movabsq $0x7fffffff8, %r12      # imm = 0x7FFFFFFF8
movq %rdi, %r8
movq %rdi, %rax
cmpq %rcx, %rsi
ja 0xba4e
movq %r8, %r13
subq %rax, %r13
movq %rdx, %rax
shrq $0x2, %rax
testl %ebx, %ebx
movl %eax, %ebx
cmoveq %r15, %rbx
andq %r12, %rdx
leaq (,%rbx,8), %r14
movq %rbp, %rdi
movq %r14, %rcx
callq 0x473a
movq %rax, 0x2a0(%rbp)
andq %r12, %r13
addq %rax, %r13
movq %r13, %r8
movq %r13, 0x2a8(%rbp)
leaq (%rax,%rbx,8), %rcx
movq %rcx, 0x2b0(%rbp)
movl 0x42c(%rbp), %edi
subl 0x3b8(%rbp), %edi
movq %r14, %rdx
movq %rax, %rsi
cmpl %ebx, %edi
ja 0xb324
jmp 0xb395
movq %rdi, %r8
movl 0x39c(%rbp), %eax
cmpl 0x3e8(%rbp), %eax
jae 0xb3b3
movq 0x1e0(%rbp), %r15
cmpq 0x1e8(%rbp), %r15
jne 0xb3ba
movq 0x1f8(%rbp), %r15
cmpq 0x200(%rbp), %r15
je 0xb48b
movl $0x0, 0xc(%rsp)
xorl %edx, %edx
movq (%r15), %r14
testq %r14, %r14
je 0xb42f
movl %edx, %r12d
movl 0x4(%r14), %ebx
testb $0x4, %bl
jne 0xb42c
testb $0x1, %bl
jne 0xba6d
movl 0x39c(%rbp), %eax
cmpl 0x3e8(%rbp), %eax
jae 0xb427
movq %rbp, %rdi
movq %r14, %rsi
callq 0xcb44
testl %eax, %eax
je 0xb427
movl %ebx, %eax
orl $0x1, %eax
movl %eax, 0x4(%r14)
incl %r12d
testb $0x2, %bl
je 0xb42c
cmpl $0x3, (%r14)
sbbl $-0x1, 0xc(%rsp)
jmp 0xb42c
testb $0x2, %bl
jne 0xb44e
movl %r12d, %edx
addq $0x8, %r15
cmpq 0x1e8(%rbp), %r15
jne 0xb443
movq 0x1f8(%rbp), %r15
cmpq 0x200(%rbp), %r15
jne 0xb3d1
jmp 0xb47b
cmpl $0x3, (%r14)
movl %r12d, %edx
jb 0xb42f
movq 0x2a8(%rbp), %rax
cmpq 0x2b0(%rbp), %rax
jae 0xba95
leaq 0x8(%rax), %rcx
movq %rcx, 0x2a8(%rbp)
movq %r14, (%rax)
jmp 0xb42f
movq 0x2a8(%rbp), %r8
movq 0x2b0(%rbp), %rcx
jmp 0xb495
xorl %edx, %edx
movl $0x0, 0xc(%rsp)
cmpq %rcx, %r8
ja 0xbaf2
movl %edx, 0x30(%rsp)
movl 0x3e8(%rbp), %eax
movl %eax, 0x39c(%rbp)
movq 0x478(%rbp), %rax
cmpq 0x470(%rbp), %rax
jne 0xba8c
movq 0x2a0(%rbp), %r15
subq %r15, %r8
shrq $0x3, %r8
leal -0x1(%r8), %eax
movq %rax, 0x28(%rsp)
movq %r8, 0x20(%rsp)
cmpl $0xc, %r8d
movq %r15, 0x10(%rsp)
jge 0xb6fd
cmpl $0x2, 0x20(%rsp)
jl 0xb5a5
movl 0x28(%rsp), %ebx
incq %rbx
movq 0x10(%rsp), %r14
movq -0x10(%r14,%rbx,8), %rdi
movq -0x8(%r14,%rbx,8), %rsi
callq 0x10f3c
testl %eax, %eax
jle 0xb52a
movdqu -0x10(%r14,%rbx,8), %xmm0
pshufd $0x4e, %xmm0, %xmm0     # xmm0 = xmm0[2,3,0,1]
movdqu %xmm0, -0x10(%r14,%rbx,8)
decq %rbx
cmpq $0x1, %rbx
jg 0xb504
cmpl $0x2, 0x20(%rsp)
je 0xb5a5
movq 0x20(%rsp), %rbx
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movq 0x10(%rsp), %rax
leaq 0x10(%rax), %r15
movl $0x2, %r13d
movq 0x10(%rsp), %r12
movq -0x8(%r12,%r13,8), %rsi
movq (%r12,%r13,8), %r14
movq %r14, %rdi
callq 0x10f3c
testl %eax, %eax
js 0xb574
leaq (%r12,%r13,8), %r12
jmp 0xb595
movq %r15, %rcx
leaq -0x8(%rcx), %r12
movq -0x10(%rcx), %rsi
movq -0x8(%rcx), %rax
movq %rax, (%rcx)
movq %r14, %rdi
callq 0x10f3c
movq %r12, %rcx
testl %eax, %eax
js 0xb577
movq %r14, (%r12)
incq %r13
addq $0x8, %r15
cmpq %rbx, %r13
jne 0xb554
movq 0x478(%rbp), %rax
cmpq 0x470(%rbp), %rax
jne 0xba8c
xorl %ebx, %ebx
movq 0x28(%rsp), %r15
testl %r15d, %r15d
cmovlel %ebx, %r15d
shlq $0x3, %r15
movq 0x10(%rsp), %r14
cmpq %rbx, %r15
je 0xb5f7
movq (%r14,%rbx), %rdi
movq 0x8(%r14,%rbx), %rsi
callq 0x10f3c
addq $0x8, %rbx
testl %eax, %eax
jle 0xb5d0
leaq 0xa27f(%rip), %rdi      # 0x15871
jmp 0xba17
movl 0x42c(%rbp), %eax
subl 0xc(%rsp), %eax
jb 0xbb11
incl %eax
imull 0x34(%rsp), %eax
addl $0x63, %eax
imulq $0x51eb851f, %rax, %rcx # imm = 0x51EB851F
shrq $0x25, %rcx
movq 0x20(%rsp), %rax
cmpl %eax, %ecx
cmovael %eax, %ecx
leal (,%rcx,8), %eax
addq 0x2a0(%rbp), %rax
movq %rax, 0x2a8(%rbp)
testl %ecx, %ecx
movl 0x30(%rsp), %esi
je 0xb685
leaq -0x8(%rax), %rcx
movq %rcx, 0x2a8(%rbp)
movq -0x8(%rax), %rax
movl 0x4(%rax), %ecx
testb $0x1, %cl
jne 0xba2f
movl %ecx, %edx
orl $0x1, %edx
movl %edx, 0x4(%rax)
testb $0x2, %cl
je 0xb673
cmpl $0x3, (%rax)
sbbl $-0x1, 0xc(%rsp)
movq 0x2a8(%rbp), %rax
incl %esi
cmpq 0x2a0(%rbp), %rax
ja 0xb643
testl %esi, %esi
je 0xb6a9
incl 0x3a4(%rbp)
movq %rbp, %rdi
callq 0xcb86
movq %rbp, %rdi
movl $0x2, %esi
movl $0x2d, %edx
callq 0x87f9
cmpl $0x0, 0xc(%rsp)
jne 0xb6da
imull $0x6e, 0x3a8(%rbp), %eax
imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F
shrq $0x25, %rax
movl %eax, 0x3a8(%rbp)
movq %rbp, %rdi
movl $0x1, %esi
movl $0x2b, %edx
callq 0x87f9
movq 0x2a8(%rbp), %rax
cmpq 0x2a0(%rbp), %rax
jne 0xbb30
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r13d, %r13d
movq 0x28(%rsp), %rax
movl %eax, %r12d
movq %rbp, 0x38(%rsp)
leal (%r12,%r13), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movslq %r12d, %r14
movq -0x8(%r15,%r14,8), %rax
movslq %ecx, %rcx
movq (%r15,%rcx,8), %rdx
movq %rdx, -0x8(%r15,%r14,8)
movq %rax, (%r15,%rcx,8)
movslq %r13d, %rbx
movq (%r15,%rbx,8), %rdi
movq -0x8(%r15,%r14,8), %rsi
callq 0x10f3c
movq (%r15,%rbx,8), %rdi
testl %eax, %eax
jle 0xb75c
movq -0x8(%r15,%r14,8), %rax
movq %rdi, -0x8(%r15,%r14,8)
movq %rax, (%r15,%rbx,8)
movq %rax, %rdi
movq (%r15,%r14,8), %rsi
callq 0x10f3c
testl %eax, %eax
jle 0xb779
movq (%r15,%r14,8), %rax
movq (%r15,%rbx,8), %rcx
movq %rcx, (%r15,%r14,8)
movq %rax, (%r15,%rbx,8)
movq %r12, 0x50(%rsp)
movq -0x8(%r15,%r14,8), %rdi
movq (%r15,%r14,8), %rsi
callq 0x10f3c
testl %eax, %eax
jle 0xb7a3
movdqu -0x8(%r15,%r14,8), %xmm0
pshufd $0x4e, %xmm0, %xmm0     # xmm0 = xmm0[2,3,0,1]
movdqu %xmm0, -0x8(%r15,%r14,8)
leal -0x1(%r14), %r12d
movq %r14, %rax
movq -0x8(%r15,%r14,8), %r14
decq %rax
movq %rax, 0x40(%rsp)
leal 0x2(%r13), %eax
movslq %eax, %rbx
movq %r13, 0x48(%rsp)
movq %r13, 0x58(%rsp)
movslq %r13d, %rax
leaq (%r15,%rax,8), %r13
movq %rax, %r15
xorl %ebp, %ebp
movq 0x8(%r13,%rbp,8), %rdi
movq %r14, %rsi
callq 0x10f3c
incq %rbp
testl %eax, %eax
js 0xb7d4
movl %r15d, %eax
addq %rbp, %rax
movq %rax, 0x60(%rsp)
movslq %r12d, %r12
addq %rbp, %r15
movq %r15, 0x18(%rsp)
movq %r12, %r15
decq %r12
movq 0x10(%rsp), %rax
movq -0x8(%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x10f3c
cmpq %r15, %rbx
je 0xb81f
testl %eax, %eax
js 0xb7fe
cmpq %r12, 0x18(%rsp)
jge 0xb847
movq 0x10(%rsp), %r15
movq (%r15,%r12,8), %rax
movq (%r13,%rbp,8), %rcx
movq %rcx, (%r15,%r12,8)
movq %rax, (%r13,%rbp,8)
movq 0x60(%rsp), %r13
jmp 0xb7c3
movq 0x58(%rsp), %r8
leal (%r8,%rbp), %eax
decl %eax
movq 0x10(%rsp), %r15
movq 0x40(%rsp), %rsi
movq (%r15,%rsi,8), %rcx
movq (%r13,%rbp,8), %rdx
movq %rdx, (%r15,%rsi,8)
leal (%r8,%rbp), %edx
movq 0x48(%rsp), %rdi
subl %edi, %edx
movq 0x50(%rsp), %r12
movl %r12d, %esi
subl %r8d, %esi
subl %ebp, %esi
cmpl %esi, %edx
leal 0x1(%r8,%rbp), %edx
movl %eax, %esi
cmovll %r12d, %esi
movl %edi, %ebx
cmovll %edx, %ebx
cmovll %eax, %r12d
movq %rcx, (%r13,%rbp,8)
movq %rdi, %r13
cmovgel %edx, %r13d
movl %r12d, %ecx
subl %r13d, %ecx
movl %esi, %eax
subl %ebx, %eax
cmpl $0xb, %ecx
jl 0xb9c7
cmpl $0xa, %eax
movq 0x38(%rsp), %rbp
jle 0xba07
movq 0x478(%rbp), %r15
movq 0x480(%rbp), %r14
cmpq %r14, %r15
jne 0xb939
movl %esi, 0x18(%rsp)
movq 0x470(%rbp), %rsi
cmpq %r15, %rsi
ja 0xba10
subq %rsi, %r15
movq %r15, %rax
shrq %rax
movabsq $0x3fffffffc, %rcx      # imm = 0x3FFFFFFFC
andq %rcx, %r15
movl %eax, %r14d
movl $0x1, %eax
cmoveq %rax, %r14
leaq (,%r14,4), %rcx
movq %rbp, %rdi
movq %r15, %rdx
callq 0x473a
movq %rax, 0x470(%rbp)
addq %rax, %r15
leaq (%rax,%r14,4), %r14
movq %r14, 0x480(%rbp)
movl 0x18(%rsp), %esi
leaq 0x4(%r15), %rax
movq %rax, 0x478(%rbp)
movl %ebx, (%r15)
cmpq %r14, %rax
movq 0x10(%rsp), %r15
jne 0xb9b5
movl %esi, 0x18(%rsp)
movq 0x470(%rbp), %rsi
cmpq %r14, %rsi
ja 0xba10
subq %rsi, %r14
movq %r14, %rax
shrq %rax
movabsq $0x3fffffffc, %rcx      # imm = 0x3FFFFFFFC
andq %rcx, %r14
movl %eax, %ebx
movl $0x1, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rcx
movq %rbp, %rdi
movq %r14, %rdx
callq 0x473a
movq %rax, 0x470(%rbp)
addq %rax, %r14
leaq (%rax,%rbx,4), %rax
movq %rax, 0x480(%rbp)
movq %r14, %rax
movl 0x18(%rsp), %esi
leaq 0x4(%rax), %rcx
movq %rcx, 0x478(%rbp)
movl %esi, (%rax)
jmp 0xb70d
movl %esi, %r12d
movl %ebx, %r13d
cmpl $0xa, %eax
movq 0x38(%rsp), %rbp
jg 0xb70d
movq 0x478(%rbp), %rax
cmpq 0x470(%rbp), %rax
jbe 0xb4ed
movl -0x4(%rax), %r12d
leaq -0x8(%rax), %rcx
movq %rcx, 0x478(%rbp)
movl -0x8(%rax), %r13d
jmp 0xb70d
leaq 0x8a46(%rip), %rdi      # 0x14454
jmp 0xba17
leaq 0x8a5c(%rip), %rdi      # 0x14473
leaq 0x785e(%rip), %rsi      # 0x1327c
leaq 0x9e1a(%rip), %rcx      # 0x1583f
movl $0x15ae, %edx           # imm = 0x15AE
callq 0x10b0
leaq 0x8941(%rip), %rdi      # 0x14377
leaq 0x783f(%rip), %rsi      # 0x1327c
leaq 0x94d6(%rip), %rcx      # 0x14f1a
movl $0xbd9, %edx            # imm = 0xBD9
callq 0x10b0
leaq 0x8d7e(%rip), %rdi      # 0x147d3
leaq 0x7820(%rip), %rsi      # 0x1327c
leaq 0x9ddc(%rip), %rcx      # 0x1583f
movl $0x1581, %edx           # imm = 0x1581
callq 0x10b0
leaq 0x8903(%rip), %rdi      # 0x14377
leaq 0x7801(%rip), %rsi      # 0x1327c
leaq 0x9dbd(%rip), %rcx      # 0x1583f
movl $0x1594, %edx           # imm = 0x1594
callq 0x10b0
leaq 0x89a8(%rip), %rdi      # 0x1443b
jmp 0xba17
leaq 0x8d53(%rip), %rdi      # 0x147ef
leaq 0x77d9(%rip), %rsi      # 0x1327c
leaq 0x9d95(%rip), %rcx      # 0x1583f
movl $0x15a6, %edx           # imm = 0x15A6
callq 0x10b0
leaq 0x8c82(%rip), %rdi      # 0x1473d
leaq 0x77ba(%rip), %rsi      # 0x1327c
leaq 0x9d76(%rip), %rcx      # 0x1583f
movl $0x1577, %edx           # imm = 0x1577
callq 0x10b0
leaq 0x9d85(%rip), %rdi      # 0x1585f
leaq 0x779b(%rip), %rsi      # 0x1327c
leaq 0x9d57(%rip), %rcx      # 0x1583f
movl $0x157b, %edx           # imm = 0x157B
callq 0x10b0
leaq 0x925f(%rip), %rdi      # 0x14d58
leaq 0x777c(%rip), %rsi      # 0x1327c
leaq 0x9d38(%rip), %rcx      # 0x1583f
movl $0x15a9, %edx           # imm = 0x15A9
callq 0x10b0
leaq 0x9d92(%rip), %rdi      # 0x158aa
leaq 0x775d(%rip), %rsi      # 0x1327c
leaq 0x9d19(%rip), %rcx      # 0x1583f
movl $0x15b0, %edx           # imm = 0x15B0
callq 0x10b0
leaq 0x8c06(%rip), %rdi      # 0x1473d
leaq 0x773e(%rip), %rsi      # 0x1327c
leaq 0x9cfa(%rip), %rcx      # 0x1583f
movl $0x15d3, %edx           # imm = 0x15D3
callq 0x10b0