// File: /workspace/github_cpp_makefile_star2_O1/jacky860226[P]JinkelaSat/src/include/JinkelaSat.hpp
// Function: MiniSat::JinkelaSat::propagate()
Clause *propagate() {
    Clause *confl = nullptr;
    int num_props = 0;
    while (qhead < trail.size()) {
      Literal p = trail[qhead++];
      std::vector<Watcher> &ws = watches[p];
      std::vector<Watcher>::iterator i, j;
      for (i = j = ws.begin(); i != ws.end();) {
        Literal blocker = i->blocker;
        if (value(blocker) == Status::True) {
          *j++ = *i++;
          continue;
        }
        auto cr = i->cref;
        Clause &c = *cr;
        if (c[0] == ~p)
          std::swap(c[0], c[1]);
        ++i;

        Literal first = c[0];
        Watcher w = Watcher(cr, first);
        if (first != blocker && value(first) == Status::True) {
          *j++ = w;
          continue;
        }

        for (size_t k = 2; k < c.size(); k++) {
          if (value(c[k]) != Status::False) {
            std::swap(c[1], c[k]);
            watches[~c[1]].emplace_back(w);
            goto NextClause;
          }
        }
        *j++ = w;
        if (value(first) == Status::False) {
          confl = cr;
          qhead = trail.size();
          while (i != ws.end())
            *j++ = *i++;
        } else
          uncheckedEnqueue(first, cr);
      NextClause:;
      }
      ws.resize(j - ws.begin());
    }
    simpDB_props -= num_props;
    return confl;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %rdx, %rax
jae 0x3412
leaq 0x120(%rdi), %rdx
movq %rdx, 0x30(%rsp)
movq $0x0, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
leaq 0x1(%rax), %rdx
movq %rdx, (%rdi)
movl (%rcx,%rax,4), %eax
movl %eax, 0x28(%rsp)
movl %eax, 0x18(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x47b4
movq %rax, %rbp
movq (%rax), %r14
cmpq 0x8(%rax), %r14
je 0x33da
movq %r14, %rbx
movq 0x8(%rsp), %rdi
movl 0x8(%r14), %ecx
movl %ecx, %eax
sarl %eax
movslq %eax, %rdx
movq 0x68(%rdi), %rax
movb (%rax,%rdx), %dl
cmpb $0x2, %dl
je 0x321e
movl %ecx, %esi
andb $0x1, %sil
xorb %sil, %dl
cmpb $0x1, %dl
jne 0x321e
movl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
movq (%r14), %rax
addq $0x10, %r14
leaq 0x10(%rbx), %r15
movq %rax, (%rbx)
movq %r15, %rbx
cmpq 0x8(%rbp), %r14
jne 0x31d6
jmp 0x33dd
movq (%r14), %r13
movq (%r13), %rdx
movl (%rdx), %esi
movl %esi, %r8d
xorl 0x28(%rsp), %r8d
cmpl $0x1, %r8d
jne 0x323f
movl 0x4(%rdx), %r8d
movl %r8d, (%rdx)
movl %esi, 0x4(%rdx)
addq $0x10, %r14
movl (%rdx), %r12d
movq %r13, 0x18(%rsp)
movl %r12d, 0x20(%rsp)
cmpl %ecx, %r12d
jne 0x330c
movq (%r13), %rcx
movq 0x8(%r13), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq $0x3, %rdx
setae %r15b
jb 0x3365
movl 0x8(%rcx), %r11d
movl %r11d, %esi
sarl %esi
movslq %esi, %r8
movl %r11d, %r9d
andb $0x1, %r9b
movl $0x2, %esi
cmpb %r9b, (%rax,%r8)
jne 0x32d0
movl $0x3, %r8d
subq %rdx, %r8
leaq (%r8,%rsi), %r9
cmpq $0x2, %r9
je 0x3365
movl 0x4(%rcx,%rsi,4), %r11d
movl %r11d, %r9d
sarl %r9d
movslq %r9d, %r9
movl %r11d, %r10d
andb $0x1, %r10b
incq %rsi
cmpb %r10b, (%rax,%r9)
je 0x329d
cmpq %rdx, %rsi
setb %r15b
movl 0x4(%rcx), %eax
movl %r11d, 0x4(%rcx)
movl %eax, (%rcx,%rsi,4)
movl 0x4(%rcx), %eax
xorl $0x1, %eax
movl %eax, 0x2c(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
callq 0x47b4
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x3346
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8(%rax)
jmp 0x3353
movl %r12d, %ecx
sarl %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
cmpb $0x2, %cl
je 0x3259
movl %r12d, %edx
andb $0x1, %dl
xorb %dl, %cl
cmpb $0x1, %cl
jne 0x3259
leaq 0x10(%rbx), %r15
movl 0x20(%rsp), %eax
movl %eax, 0x8(%rbx)
movq 0x18(%rsp), %rax
jmp 0x320d
movq %rax, %rdi
leaq 0x18(%rsp), %rdx
callq 0x4af6
movq 0x8(%rsp), %rdi
testb %r15b, %r15b
je 0x3365
movq %rbx, %r15
jmp 0x3210
leaq 0x10(%rbx), %r15
movl 0x20(%rsp), %eax
movl %eax, 0x8(%rbx)
movq 0x18(%rsp), %rax
movq %rax, (%rbx)
movl %r12d, %eax
sarl %eax
cltq
movq 0x68(%rdi), %rcx
movl %r12d, %edx
andb $0x1, %dl
cmpb %dl, (%rcx,%rax)
jne 0x33bb
movq 0x10(%rdi), %rax
subq 0x8(%rdi), %rax
sarq $0x2, %rax
movq %rax, (%rdi)
cmpq 0x8(%rbp), %r14
je 0x33d0
movl 0x8(%r14), %eax
movl %eax, 0x8(%r15)
movq (%r14), %rax
addq $0x10, %r14
movq %rax, (%r15)
addq $0x10, %r15
jmp 0x339d
movl %r12d, %esi
movq %r13, %rdx
callq 0x30f6
movq 0x8(%rsp), %rdi
jmp 0x3210
movq %r13, 0x10(%rsp)
jmp 0x3210
movq %r14, %r15
subq (%rbp), %r15
sarq $0x4, %r15
movq %rbp, %rdi
movq %r15, %rsi
callq 0x4780
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %rdx, %rax
jb 0x319d
jmp 0x341b
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop