// File: /workspace/github_cpp_makefile_star2_O1/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 0x2a8(%rdi), %rax
cmpq 0x2a0(%rdi), %rax
jne 0xb9f4
movq %rdi, %rbp
movl 0x41c(%rdi), %eax
movl %eax, 0x3b4(%rdi)
movl %esi, 0x34(%rsp)
cmpl $0x64, %esi
ja 0xba13
movl 0x42c(%rbp), %esi
subl 0x3b8(%rbp), %esi
movq 0x2a0(%rbp), %rax
movq 0x2b0(%rbp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
movq %rdx, %rbx
shrq $0x3, %rbx
cmpl %ebx, %esi
jbe 0xb285
movl $0x1, %r15d
movabsq $0x7fffffff8, %r12      # imm = 0x7FFFFFFF8
cmpq %rcx, %rax
ja 0xb98e
movq 0x2a8(%rbp), %r13
subq %rax, %r13
movq %rdx, %rcx
shrq $0x2, %rcx
testl %ebx, %ebx
movl %ecx, %ebx
cmoveq %r15, %rbx
andq %r12, %rdx
leaq (,%rbx,8), %r14
movq %rbp, %rdi
movq %rax, %rsi
movq %r14, %rcx
callq 0x4593
movq %rax, 0x2a0(%rbp)
andq %r12, %r13
addq %rax, %r13
movq %r13, 0x2a8(%rbp)
leaq (%rax,%rbx,8), %rcx
movq %rcx, 0x2b0(%rbp)
movl 0x42c(%rbp), %esi
subl 0x3b8(%rbp), %esi
movq %r14, %rdx
cmpl %ebx, %esi
ja 0xb218
movl 0x39c(%rbp), %eax
cmpl 0x3e8(%rbp), %eax
jae 0xb2a3
movq 0x1e0(%rbp), %r15
cmpq 0x1e8(%rbp), %r15
jne 0xb2aa
movq 0x1f8(%rbp), %r15
cmpq 0x200(%rbp), %r15
je 0xb36b
movl $0x0, 0x10(%rsp)
movl $0x0, 0x14(%rsp)
movq (%r15), %r14
testq %r14, %r14
je 0xb348
movl 0x4(%r14), %ebx
testb $0x4, %bl
jne 0xb348
testb $0x1, %bl
jne 0xb9ad
movl 0x39c(%rbp), %eax
cmpl 0x3e8(%rbp), %eax
jae 0xb31b
movq %rbp, %rdi
movq %r14, %rsi
callq 0xc9ef
testl %eax, %eax
je 0xb31b
movl %ebx, %eax
orl $0x1, %eax
movl %eax, 0x4(%r14)
incl 0x14(%rsp)
testb $0x2, %bl
je 0xb348
cmpl $0x3, (%r14)
sbbl $-0x1, 0x10(%rsp)
jmp 0xb348
testb $0x2, %bl
je 0xb348
cmpl $0x3, (%r14)
jb 0xb348
movq 0x2a8(%rbp), %rax
cmpq 0x2b0(%rbp), %rax
jae 0xb9d5
leaq 0x8(%rax), %rcx
movq %rcx, 0x2a8(%rbp)
movq %r14, (%rax)
addq $0x8, %r15
cmpq 0x1e8(%rbp), %r15
jne 0xb35c
movq 0x1f8(%rbp), %r15
cmpq 0x200(%rbp), %r15
jne 0xb2c7
jmp 0xb37b
movl $0x0, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movq 0x2a8(%rbp), %rax
cmpq 0x2b0(%rbp), %rax
ja 0xba32
movq %rax, %rcx
movl 0x3e8(%rbp), %eax
movl %eax, 0x39c(%rbp)
movq 0x478(%rbp), %rax
cmpq 0x470(%rbp), %rax
jne 0xb9cc
movq 0x2a0(%rbp), %r12
subq %r12, %rcx
shrq $0x3, %rcx
leal -0x1(%rcx), %eax
movq %rax, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
cmpl $0xc, %ecx
movq %r12, 0x8(%rsp)
jge 0xb5e9
cmpl $0x2, 0x20(%rsp)
jl 0xb419
movl 0x28(%rsp), %ebx
incq %rbx
movq -0x10(%r12,%rbx,8), %rdi
movq -0x8(%r12,%rbx,8), %rsi
callq 0x10e98
testl %eax, %eax
jle 0xb410
movq -0x10(%r12,%rbx,8), %rax
movq -0x8(%r12,%rbx,8), %rcx
movq %rax, -0x8(%r12,%rbx,8)
movq %rcx, -0x10(%r12,%rbx,8)
decq %rbx
cmpq $0x1, %rbx
jg 0xb3e9
cmpl $0x3, 0x20(%rsp)
jl 0xb48d
movq 0x20(%rsp), %rbx
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movq 0x8(%rsp), %rax
leaq 0x10(%rax), %r15
movl $0x2, %r12d
movq 0x8(%rsp), %r13
movq -0x8(%r13,%r12,8), %rsi
movq (%r13,%r12,8), %r14
movq %r14, %rdi
callq 0x10e98
testl %eax, %eax
js 0xb45c
leaq (%r13,%r12,8), %r13
jmp 0xb47d
movq %r15, %rcx
leaq -0x8(%rcx), %r13
movq -0x10(%rcx), %rsi
movq -0x8(%rcx), %rax
movq %rax, (%rcx)
movq %r14, %rdi
callq 0x10e98
movq %r13, %rcx
testl %eax, %eax
js 0xb45f
movq %r14, (%r13)
incq %r12
addq $0x8, %r15
cmpq %rbx, %r12
jne 0xb43a
movq 0x478(%rbp), %rax
cmpq 0x470(%rbp), %rax
jne 0xb9cc
xorl %ebx, %ebx
movq 0x28(%rsp), %r13
testl %r13d, %r13d
cmovlel %ebx, %r13d
shlq $0x3, %r13
movl 0x10(%rsp), %r14d
movl 0x14(%rsp), %r15d
movq 0x8(%rsp), %r12
cmpq %rbx, %r13
je 0xb4e9
movq (%r12,%rbx), %rdi
movq 0x8(%r12,%rbx), %rsi
callq 0x10e98
addq $0x8, %rbx
testl %eax, %eax
jle 0xb4c2
leaq 0x93f1(%rip), %rdi      # 0x148d5
jmp 0xb957
movl 0x42c(%rbp), %eax
subl %r14d, %eax
jb 0xba51
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
je 0xb572
leaq -0x8(%rax), %rcx
movq %rcx, 0x2a8(%rbp)
movq -0x8(%rax), %rax
movl 0x4(%rax), %ecx
testb $0x1, %cl
jne 0xb96f
movl %ecx, %edx
orl $0x1, %edx
movl %edx, 0x4(%rax)
testb $0x2, %cl
je 0xb55f
cmpl $0x3, (%rax)
sbbl $-0x1, %r14d
movq 0x2a8(%rbp), %rax
incl %r15d
cmpq 0x2a0(%rbp), %rax
ja 0xb530
testl %r15d, %r15d
je 0xb597
incl 0x3a4(%rbp)
movq %rbp, %rdi
callq 0xca31
movq %rbp, %rdi
movl $0x2, %esi
movl $0x2d, %edx
callq 0x8718
testl %r14d, %r14d
jne 0xb5c6
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 0x8718
movq 0x2a8(%rbp), %rax
cmpq 0x2a0(%rbp), %rax
jne 0xba70
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, %edi
movq %rbp, 0x38(%rsp)
leal (%rdi,%r13), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movq %rdi, 0x48(%rsp)
movslq %edi, %r15
movq -0x8(%r12,%r15,8), %rax
movslq %ecx, %rcx
movq (%r12,%rcx,8), %rdx
movq %rdx, -0x8(%r12,%r15,8)
movq %rax, (%r12,%rcx,8)
movslq %r13d, %rbx
movq (%r12,%rbx,8), %rdi
movq -0x8(%r12,%r15,8), %rsi
callq 0x10e98
testl %eax, %eax
jle 0xb649
movq -0x8(%r12,%r15,8), %rax
movq (%r12,%rbx,8), %rcx
movq %rcx, -0x8(%r12,%r15,8)
movq %rax, (%r12,%rbx,8)
movq (%r12,%rbx,8), %rdi
movq (%r12,%r15,8), %rsi
callq 0x10e98
testl %eax, %eax
jle 0xb66a
movq (%r12,%r15,8), %rax
movq (%r12,%rbx,8), %rcx
movq %rcx, (%r12,%r15,8)
movq %rax, (%r12,%rbx,8)
movq -0x8(%r12,%r15,8), %rdi
movq (%r12,%r15,8), %rsi
callq 0x10e98
testl %eax, %eax
jle 0xb68e
movq -0x8(%r12,%r15,8), %rax
movq (%r12,%r15,8), %rcx
movq %rax, (%r12,%r15,8)
movq %rcx, -0x8(%r12,%r15,8)
leal -0x1(%r15), %ebp
movq -0x8(%r12,%r15,8), %r14
decq %r15
movq %r15, 0x40(%rsp)
leal 0x2(%r13), %eax
movslq %eax, %r15
movq %r13, 0x18(%rsp)
movq %r13, 0x50(%rsp)
movslq %r13d, %rax
leaq (%r12,%rax,8), %rbx
movq %rax, %r12
xorl %r13d, %r13d
movq 0x8(%rbx,%r13,8), %rdi
movq %r14, %rsi
callq 0x10e98
incq %r13
testl %eax, %eax
js 0xb6bd
movl %r12d, %eax
addq %r13, %rax
movq %rax, 0x58(%rsp)
movslq %ebp, %rbp
addq %r13, %r12
movq %r12, 0x60(%rsp)
movq %rbp, %r12
decq %rbp
movq 0x8(%rsp), %rax
movq -0x8(%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0x10e98
cmpq %r12, %r15
je 0xb708
testl %eax, %eax
js 0xb6e7
cmpq %rbp, 0x60(%rsp)
jge 0xb72b
movq 0x8(%rsp), %r12
movq (%r12,%rbp,8), %rax
movq (%rbx,%r13,8), %rcx
movq %rcx, (%r12,%rbp,8)
movq %rax, (%rbx,%r13,8)
movq 0x58(%rsp), %r13
jmp 0xb6ab
movq 0x50(%rsp), %r9
leal (%r9,%r13), %eax
decl %eax
movq 0x8(%rsp), %r12
movq 0x40(%rsp), %rsi
movq (%r12,%rsi,8), %rcx
movq (%rbx,%r13,8), %rdx
movq %rdx, (%r12,%rsi,8)
leal (%r9,%r13), %edx
movq 0x18(%rsp), %r8
subl %r8d, %edx
movq 0x48(%rsp), %rdi
movl %edi, %esi
subl %r9d, %esi
subl %r13d, %esi
cmpl %esi, %edx
leal 0x1(%r9,%r13), %edx
movl %eax, %r14d
cmovll %edi, %r14d
movl %r8d, %r15d
cmovll %edx, %r15d
cmovll %eax, %edi
movq %rcx, (%rbx,%r13,8)
movq %r8, %r13
cmovgel %edx, %r13d
movl %edi, %ecx
subl %r13d, %ecx
movl %r14d, %eax
subl %r15d, %eax
cmpl $0xb, %ecx
jl 0xb8fd
cmpl $0xa, %eax
movq 0x38(%rsp), %rbp
jle 0xb947
movq 0x478(%rbp), %rbx
movq 0x480(%rbp), %rdx
cmpq %rdx, %rbx
jne 0xb844
movq %r13, 0x18(%rsp)
movq 0x470(%rbp), %rsi
cmpq %rdx, %rsi
ja 0xb950
movq %rdi, %r13
subq %rsi, %rbx
subq %rsi, %rdx
movq %rdx, %rax
shrq %rax
movabsq $0x3fffffffc, %rcx      # imm = 0x3FFFFFFFC
andq %rcx, %rdx
movl %eax, %r12d
movl $0x1, %eax
cmoveq %rax, %r12
leaq (,%r12,4), %rcx
movq %rbp, %rdi
callq 0x4593
movq %rax, 0x470(%rbp)
movabsq $0x3fffffffc, %rcx      # imm = 0x3FFFFFFFC
andq %rcx, %rbx
addq %rax, %rbx
movq %rbx, 0x478(%rbp)
leaq (%rax,%r12,4), %rax
movq %rax, 0x480(%rbp)
movq 0x8(%rsp), %r12
movq %r13, %rdi
movq 0x18(%rsp), %r13
movq 0x478(%rbp), %rax
leaq 0x4(%rax), %rbx
movq %rbx, 0x478(%rbp)
movl %r15d, (%rax)
movq 0x480(%rbp), %rdx
cmpq %rdx, %rbx
jne 0xb8e3
movq %r13, 0x18(%rsp)
movq 0x470(%rbp), %rsi
cmpq %rdx, %rsi
ja 0xb950
movq %rdi, %r13
subq %rsi, %rbx
subq %rsi, %rdx
movq %rdx, %rax
shrq %rax
movabsq $0x3fffffffc, %rcx      # imm = 0x3FFFFFFFC
andq %rcx, %rdx
movl %eax, %r15d
movl $0x1, %eax
cmoveq %rax, %r15
leaq (,%r15,4), %rcx
movq %rbp, %rdi
callq 0x4593
movq %rax, 0x470(%rbp)
movabsq $0x3fffffffc, %rcx      # imm = 0x3FFFFFFFC
andq %rcx, %rbx
addq %rax, %rbx
movq %rbx, 0x478(%rbp)
leaq (%rax,%r15,4), %rax
movq %rax, 0x480(%rbp)
movq %r13, %rdi
movq 0x18(%rsp), %r13
movq 0x478(%rbp), %rax
leaq 0x4(%rax), %rcx
movq %rcx, 0x478(%rbp)
movl %r14d, (%rax)
jmp 0xb5f8
movl %r14d, %edi
movl %r15d, %r13d
cmpl $0xa, %eax
movq 0x38(%rsp), %rbp
jg 0xb5f8
movq 0x478(%rbp), %rax
cmpq 0x470(%rbp), %rax
jbe 0xb3db
leaq -0x4(%rax), %rcx
movq %rcx, 0x478(%rbp)
movl -0x4(%rax), %edi
leaq -0x8(%rax), %rcx
movq %rcx, 0x478(%rbp)
movl -0x8(%rax), %r13d
jmp 0xb5f8
leaq 0x7b44(%rip), %rdi      # 0x13492
jmp 0xb957
leaq 0x7b5a(%rip), %rdi      # 0x134b1
leaq 0x694e(%rip), %rsi      # 0x122ac
leaq 0x8f3e(%rip), %rcx      # 0x148a3
movl $0x15ae, %edx           # imm = 0x15AE
callq 0x10b0
leaq 0x7a3f(%rip), %rdi      # 0x133b5
leaq 0x692f(%rip), %rsi      # 0x122ac
leaq 0x85fa(%rip), %rcx      # 0x13f7e
movl $0xbd9, %edx            # imm = 0xBD9
callq 0x10b0
leaq 0x7e7c(%rip), %rdi      # 0x13811
leaq 0x6910(%rip), %rsi      # 0x122ac
leaq 0x8f00(%rip), %rcx      # 0x148a3
movl $0x1581, %edx           # imm = 0x1581
callq 0x10b0
leaq 0x7a01(%rip), %rdi      # 0x133b5
leaq 0x68f1(%rip), %rsi      # 0x122ac
leaq 0x8ee1(%rip), %rcx      # 0x148a3
movl $0x1594, %edx           # imm = 0x1594
callq 0x10b0
leaq 0x7aa6(%rip), %rdi      # 0x13479
jmp 0xb957
leaq 0x7e51(%rip), %rdi      # 0x1382d
leaq 0x68c9(%rip), %rsi      # 0x122ac
leaq 0x8eb9(%rip), %rcx      # 0x148a3
movl $0x15a6, %edx           # imm = 0x15A6
callq 0x10b0
leaq 0x7d80(%rip), %rdi      # 0x1377b
leaq 0x68aa(%rip), %rsi      # 0x122ac
leaq 0x8e9a(%rip), %rcx      # 0x148a3
movl $0x1577, %edx           # imm = 0x1577
callq 0x10b0
leaq 0x8ea9(%rip), %rdi      # 0x148c3
leaq 0x688b(%rip), %rsi      # 0x122ac
leaq 0x8e7b(%rip), %rcx      # 0x148a3
movl $0x157b, %edx           # imm = 0x157B
callq 0x10b0
leaq 0x8383(%rip), %rdi      # 0x13dbc
leaq 0x686c(%rip), %rsi      # 0x122ac
leaq 0x8e5c(%rip), %rcx      # 0x148a3
movl $0x15a9, %edx           # imm = 0x15A9
callq 0x10b0
leaq 0x8eb6(%rip), %rdi      # 0x1490e
leaq 0x684d(%rip), %rsi      # 0x122ac
leaq 0x8e3d(%rip), %rcx      # 0x148a3
movl $0x15b0, %edx           # imm = 0x15B0
callq 0x10b0
leaq 0x7d04(%rip), %rdi      # 0x1377b
leaq 0x682e(%rip), %rsi      # 0x122ac
leaq 0x8e1e(%rip), %rcx      # 0x148a3
movl $0x15d3, %edx           # imm = 0x15D3
callq 0x10b0