// File: Myyura[P]MyyuraSat/./source/./solver_simplify.cpp
// Function: MyyuraSat::Solver::subsume0(unsigned int)
void Solver::subsume0(CRARef cr) {
    // TODO : flag to turn off
    Clause& c = _ca[cr];

    int min_i = 0;
    for (int i = 0; i < c.size(); i++) {
        if (_occur_lit[c[i]].size() < _occur_lit[c[min_i]].size()) {
            min_i = i;
        }
    }

    Vector<CRARef>& crs = _occur_lit[c[min_i]];
    for (int i = 0; i < crs.size(); i++) {
        if (is_removed(crs[i])) { continue; }

        Clause& cp = _ca[crs[i]];
        if (cr != crs[i] && c.subsumes(cp) == LITERAL_UNDEF) {
            // _subsumption_removed++;
            remove_clause(crs[i]);
        }
    }
    
    check_garbage();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x48(%rbp)
addq $0xf8, %rdi
movl -0xc(%rbp), %esi
callq 0x7aa0
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8b00
movl %eax, %ecx
movl -0x4c(%rbp), %eax
cmpl %ecx, %eax
jge 0x5927
movq -0x48(%rbp), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x8ee0
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x7d40
movq %rax, %rdi
callq 0x7d70
movl %eax, %ecx
movq -0x48(%rbp), %rax
movl %ecx, -0x50(%rbp)
addq $0x1a0, %rax            # imm = 0x1A0
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x8ee0
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x7d40
movq %rax, %rdi
callq 0x7d70
movl %eax, %ecx
movl -0x50(%rbp), %eax
cmpl %ecx, %eax
jge 0x5917
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x5919
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x588b
movq -0x48(%rbp), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x8ee0
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0x7d40
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x6c(%rbp)
movq -0x28(%rbp), %rdi
callq 0x7d70
movl %eax, %ecx
movl -0x6c(%rbp), %eax
cmpl %ecx, %eax
jge 0x5a33
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x7d90
movq -0x48(%rbp), %rdi
movl (%rax), %esi
callq 0x7f00
testb $0x1, %al
jne 0x5991
jmp 0x5996
jmp 0x5a25
movq -0x48(%rbp), %rax
addq $0xf8, %rax
movq %rax, -0x80(%rbp)
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x7d90
movq -0x80(%rbp), %rdi
movl (%rax), %esi
callq 0x7aa0
movq %rax, -0x38(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x74(%rbp)
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x7d90
movl -0x74(%rbp), %ecx
movq %rax, %rdx
xorl %eax, %eax
cmpl (%rdx), %ecx
movb %al, -0x6d(%rbp)
je 0x5a03
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x9220
movl %eax, -0x3c(%rbp)
leaq -0x3c(%rbp), %rdi
leaq 0x10751(%rip), %rsi     # 0x1614c
callq 0x7820
movb %al, -0x6d(%rbp)
movb -0x6d(%rbp), %al
testb $0x1, %al
jne 0x5a0c
jmp 0x5a23
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x7d90
movq -0x48(%rbp), %rdi
movl (%rax), %esi
callq 0x38e0
jmp 0x5a25
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x5958
movq -0x48(%rbp), %rdi
callq 0x9470
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)