// File: /workspace/github_cpp_makefile_star2_O3/vsklad[P]cgen/./bal/cnf/processor/cnfsubsumption.cpp
// Function: bal::processor_result_t bal::CnfSubsumptionOptimizer::process_clause_subsumption_ca<(unsigned short)4>(unsigned int*)
inline processor_result_t CnfSubsumptionOptimizer::process_clause_subsumption_ca(uint32_t* const p_clause) {
        static_assert(_clause_size_is_aggregated(ca_size), "invalid clause size");
        _assert_level_0(ca_size == _clause_size(p_clause));
        
        CnfProcessor::clauses_iterator_t<ca_size> iterator(clauses_index_, *this);
        container_offset_t ca_variables[ca_size];
        for (auto i = 0; i < ca_size; i++) {
            ca_variables[i] = literal_t__variable_id(_clause_literal(p_clause, i));
        };
        container_offset_t ci_offset = iterator.first(ca_variables);
        while (ci_offset != CLAUSES_END) {
            uint32_t* p_ci = _clauses_offset_clause(clauses_data_, ci_offset);
            const clause_size_t ci_size = _clause_size(p_ci);
            if (ca_size == 2) {
                if (iterator.instance_bits == 0b11) {
                    if (ci_size == 3) {
                        if (_clause_literal(p_clause, 0) == _clause_literal(p_ci, 1)) {
                            __process_clause_subsumption_caca<2, 3, 1, 2>(p_clause, p_ci);
                        } else if (_clause_literal(p_clause, 1) == _clause_literal(p_ci, 1)) {
                            __process_clause_subsumption_caca<2, 3, 0, 1>(p_clause, p_ci);
                        } else {
                            __process_clause_subsumption_caca<2, 3, 0, 2>(p_clause, p_ci);
                        };
                    } else if (ci_size == 4) {
                        if (_clause_literal(p_clause, 0) == _clause_literal(p_ci, 2)) {
                            __process_clause_subsumption_caca<2, 4, 2, 3>(p_clause, p_ci);
                        } else if (_clause_literal(p_clause, 1) == _clause_literal(p_ci, 1)) {
                            __process_clause_subsumption_caca<2, 4, 0, 1>(p_clause, p_ci);
                        } else if (_clause_literal(p_clause, 0) == _clause_literal(p_ci, 0)) {
                            if (_clause_literal(p_clause, 1) == _clause_literal(p_ci, 2)) {
                                __process_clause_subsumption_caca<2, 4, 0, 2>(p_clause, p_ci);
                            } else {
                                __process_clause_subsumption_caca<2, 4, 0, 3>(p_clause, p_ci);
                            };
                        } else {
                            if (_clause_literal(p_clause, 1) == _clause_literal(p_ci, 2)) {
                                __process_clause_subsumption_caca<2, 4, 1, 2>(p_clause, p_ci);
                            } else {
                                __process_clause_subsumption_caca<2, 4, 1, 3>(p_clause, p_ci);
                            };
                        };
                    };
                };
            } else if (ca_size == 3) {
                if (ci_size == 2) {
                    switch(iterator.instance_bits) {
                        case 0b0011:
                            __process_clause_subsumption_caca<2, 3, 0, 1>(p_ci, p_clause);
                            break;
                        case 0b0101:
                            __process_clause_subsumption_caca<2, 3, 0, 2>(p_ci, p_clause);
                            break;
                        case 0b0110:
                            __process_clause_subsumption_caca<2, 3, 1, 2>(p_ci, p_clause);
                            break;
                    };
                } else if (ci_size == 4 && iterator.instance_bits == 0b0111) {
                    if (_clause_literal(p_clause, 0) == _clause_literal(p_ci, 1)) {
                        __process_clause_subsumption_caca<3, 4, 1, 2, 3>(p_clause, p_ci);
                    } else if (_clause_literal(p_clause, 2) == _clause_literal(p_ci, 2)) {
                        __process_clause_subsumption_caca<3, 4, 0, 1, 2>(p_clause, p_ci);
                    } else if (_clause_literal(p_clause, 1) == _clause_literal(p_ci, 1)) {
                        __process_clause_subsumption_caca<3, 4, 0, 1, 3>(p_clause, p_ci);
                    } else {
                        _assert_level_3(_clause_literal(p_clause, 1) == _clause_literal(p_ci, 2));
                        __process_clause_subsumption_caca<3, 4, 0, 2, 3>(p_clause, p_ci);
                    };
                };
            } else if (ca_size == 4) {
                if (ci_size == 2) {
                    switch(iterator.instance_bits) {
                        case 0b0011:
                            __process_clause_subsumption_caca<2, 4, 0, 1>(p_ci, p_clause);
                            break;
                        case 0b0101:
                            __process_clause_subsumption_caca<2, 4, 0, 2>(p_ci, p_clause);
                            break;
                        case 0b0110:
                            __process_clause_subsumption_caca<2, 4, 1, 2>(p_ci, p_clause);
                            break;
                        case 0b1001:
                            __process_clause_subsumption_caca<2, 4, 0, 3>(p_ci, p_clause);
                            break;
                        case 0b1010:
                            __process_clause_subsumption_caca<2, 4, 1, 3>(p_ci, p_clause);
                            break;
                        case 0b1100:
                            __process_clause_subsumption_caca<2, 4, 2, 3>(p_ci, p_clause);
                            break;
                    };
                } else if (ci_size == 3) {
                    switch(iterator.instance_bits) {
                        case 0b0111:
                            __process_clause_subsumption_caca<3, 4, 0, 1, 2>(p_ci, p_clause);
                            break;
                        case 0b1011:
                            __process_clause_subsumption_caca<3, 4, 0, 1, 3>(p_ci, p_clause);
                            break;
                        case 0b1101:
                            __process_clause_subsumption_caca<3, 4, 0, 2, 3>(p_ci, p_clause);
                            break;
                        case 0b1110:
                            __process_clause_subsumption_caca<3, 4, 1, 2, 3>(p_ci, p_clause);
                            break;
                    };
                };
            };
            
            if (_clause_is_included(p_clause)) {
                ci_offset = iterator.next();
            } else {
                break;
            };
        };
        
        return erUndetermined;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl $0x7fff, %eax           # imm = 0x7FFF
andl (%rsi), %eax
cmpl $0x4, %eax
jne 0x18352
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x30(%rdi), %rax
leaq -0x54(%rbp), %rcx
movq %rax, -0x74(%rcx)
movq %rdi, 0x4(%rcx)
movq %rcx, 0xc(%rcx)
xorl %eax, %eax
movl 0x4(%rbx,%rax,4), %ecx
shrl %ecx
decl %ecx
movl %ecx, -0x40(%rbp,%rax,4)
incq %rax
cmpq $0x4, %rax
jne 0x17f60
leaq -0x60(%rbp), %rax
movq $0x0, (%rax)
movl 0x68(%r14), %edx
xorl %ecx, %ecx
xorl %esi, %esi
movl -0x40(%rbp,%rcx,4), %r9d
cmpl %edx, %r9d
jae 0x18007
movq 0x60(%r14), %rdi
movl (%rdi,%r9,4), %r8d
cmpl $-0x1, %r8d
je 0x18007
leaq (%rcx,%rcx,2), %rdi
leaq (%rax,%rdi,8), %rdi
addq $-0x60, %rdi
movl $0x1, %r10d
shll %cl, %r10d
movl %r10d, (%rdi)
movl %r9d, 0x4(%rdi)
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
movl %r8d, 0xc(%rdi)
testq %rsi, %rsi
je 0x17fd7
cmpl %r8d, 0xc(%rsi)
jbe 0x17fe2
movq %rsi, %r10
jmp 0x17fda
xorl %r10d, %r10d
movq %rax, %r9
movq %rdi, %rsi
jmp 0x18000
movq %rsi, %r10
movq %r10, %r9
movq 0x10(%r10), %r10
testq %r10, %r10
je 0x17ff9
cmpl %r8d, 0xc(%r10)
jb 0x17fe5
jmp 0x17ffc
xorl %r10d, %r10d
addq $0x10, %r9
movq %r10, 0x10(%rdi)
movq %rdi, (%r9)
incq %rcx
cmpq $0x4, %rcx
jne 0x17f88
testq %rsi, %rsi
je 0x1833e
movq 0x38(%r14), %rax
movl 0xc(%rsi), %ecx
movl 0x4(%rax,%rcx,8), %eax
leaq -0xc8(%rbp), %rdi
movl %eax, 0x70(%rdi)
callq 0x1855c
cmpl $-0x1, %eax
je 0x1833e
leaq 0x2ccf9(%rip), %r12     # 0x44d40
leaq -0xc8(%rbp), %r15
leaq 0x2cd0b(%rip), %r13     # 0x44d60
movq 0x18(%r14), %rcx
movq (%rcx), %rcx
movl %eax, %eax
movl 0xc(%rcx,%rax,4), %ecx
movl %ecx, %eax
andl $0x7fff, %eax           # imm = 0x7FFF
cmpl $0x3, %eax
je 0x180b3
cmpl $0x2, %eax
jne 0x182fb
movq -0x48(%rbp), %rax
movl (%rax), %eax
addl $-0x3, %eax
cmpl $0x9, %eax
ja 0x182fb
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movl (%rbx), %eax
movl %eax, %edx
shrl $0x10, %edx
shrl $0x10, %ecx
movl %ecx, %esi
shll $0x4, %esi
orl %ecx, %esi
movl %esi, %ecx
shll $0x8, %ecx
orl %esi, %ecx
movzwl %cx, %esi
jmp 0x18257
movq -0x48(%rbp), %rax
movl (%rax), %eax
addl $-0x7, %eax
cmpl $0x7, %eax
ja 0x182fb
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movl (%rbx), %eax
movl %eax, %edx
shrl $0x10, %edx
shrl $0x10, %ecx
movl %ecx, %esi
shll $0x8, %esi
movzwl %si, %esi
orl %ecx, %esi
jmp 0x18257
movl (%rbx), %eax
movl %eax, %edx
shrl $0x10, %edx
movl %ecx, %esi
shrl $0x10, %esi
andl $0x3, %esi
movl %ecx, %edi
shrl $0xe, %edi
andl $0x30, %edi
orl %esi, %edi
movl %ecx, %esi
shrl $0xc, %esi
andl $0x300, %esi            # imm = 0x300
orl %edi, %esi
shrl $0xa, %ecx
andl $0x3000, %ecx           # imm = 0x3000
orl %esi, %ecx
leal (%rcx,%rcx,4), %esi
jmp 0x18257
movl (%rbx), %eax
movl %eax, %edx
shrl $0x10, %edx
movl %ecx, %esi
shrl $0x10, %esi
andl $0xf, %esi
movl %ecx, %edi
shrl $0xc, %edi
andl $0xff0, %edi            # imm = 0xFF0
orl %esi, %edi
shrl $0x8, %ecx
andl $0xf000, %ecx           # imm = 0xF000
orl %edi, %ecx
movl %ecx, %esi
notl %esi
andl %edx, %esi
je 0x182f4
testl %ecx, %edx
je 0x182fb
shll $0x10, %esi
movzwl %ax, %eax
orl %esi, %eax
jmp 0x182f9
movl (%rbx), %eax
movl %eax, %edx
shrl $0x10, %edx
movl %ecx, %esi
shrl $0x10, %esi
andl $0x1, %esi
movl %ecx, %edi
shrl $0xf, %edi
andl $0x4, %edi
orl %esi, %edi
movl %ecx, %esi
shrl $0xe, %esi
andl $0x10, %esi
orl %edi, %esi
movl %ecx, %edi
shrl $0xd, %edi
andl $0x40, %edi
orl %esi, %edi
movl %ecx, %esi
shrl $0xc, %esi
andl $0x100, %esi            # imm = 0x100
orl %edi, %esi
movl %ecx, %edi
shrl $0xb, %edi
andl $0x400, %edi            # imm = 0x400
orl %esi, %edi
movl %ecx, %esi
shrl $0xa, %esi
andl $0x1000, %esi           # imm = 0x1000
orl %edi, %esi
shrl $0x9, %ecx
andl $0x4000, %ecx           # imm = 0x4000
orl %esi, %ecx
leal (%rcx,%rcx), %esi
orl %ecx, %esi
movzwl %si, %esi
jmp 0x18257
movl (%rbx), %eax
movl %eax, %edx
shrl $0x10, %edx
movl %ecx, %esi
shrl $0x10, %esi
andl $0x1, %esi
movl %ecx, %edi
shrl $0xf, %edi
andl $0x4, %edi
orl %esi, %edi
movl %ecx, %esi
shrl $0xe, %esi
andl $0x10, %esi
orl %edi, %esi
shrl $0xd, %ecx
andl $0x40, %ecx
orl %esi, %ecx
imull $0x303, %ecx, %esi      # imm = 0x303
jmp 0x18257
shrl $0x10, %ecx
leal -0x1(%rcx), %edx
cmpl $0x7, %edx
ja 0x18371
movl (%rbx), %eax
leaq 0x2cb69(%rip), %rsi     # 0x44d88
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
cmpl $0x4, %ecx
movl $0xf000, %ecx           # imm = 0xF000
movl $0xf00, %edx            # imm = 0xF00
jmp 0x182d6
movl (%rbx), %eax
movl %eax, %edx
shrl $0x10, %edx
movl %ecx, %esi
shrl $0x10, %esi
andl $0x3, %esi
shrl $0xe, %ecx
andl $0x30, %ecx
orl %esi, %ecx
imull $0x505, %ecx, %esi      # imm = 0x505
movl %esi, %ecx
notl %ecx
andl %edx, %ecx
je 0x182f4
testl %esi, %edx
je 0x182fb
shll $0x10, %ecx
movzwl %ax, %eax
orl %ecx, %eax
jmp 0x182f9
shrl $0x10, %ecx
leal -0x1(%rcx), %edx
cmpl $0x7, %edx
ja 0x1839f
movl (%rbx), %eax
leaq 0x2cb38(%rip), %rsi     # 0x44dc8
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
cmpl $0x4, %ecx
movl $0xaa00, %ecx           # imm = 0xAA00
movl $0x5500, %edx           # imm = 0x5500
jmp 0x182d6
shrl $0x10, %ecx
leal -0x1(%rcx), %edx
cmpl $0x7, %edx
ja 0x18388
movl (%rbx), %eax
leaq 0x2cae8(%rip), %rsi     # 0x44da8
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
cmpl $0x4, %ecx
movl $0xcc00, %ecx           # imm = 0xCC00
movl $0x3300, %edx           # imm = 0x3300
cmovel %edx, %ecx
movl %eax, %esi
shrl $0x10, %esi
movl %ecx, %edx
notl %edx
andl %esi, %edx
je 0x182f4
testl %esi, %ecx
je 0x182fb
shll $0x10, %edx
movzwl %ax, %eax
orl %edx, %eax
jmp 0x182f9
orl $0x8000, %eax           # imm = 0x8000
movl %eax, (%rbx)
testb $-0x80, 0x1(%rbx)
jne 0x1833e
movq %r15, %rdi
callq 0x1855c
cmpl $-0x1, %eax
jne 0x18055
jmp 0x1833e
movl $0xf0, %ecx
jmp 0x182d9
movl $0xf, %ecx
jmp 0x182d9
movl $0xaa, %ecx
jmp 0x182d9
movl $0x55, %ecx
jmp 0x182d9
movl $0xcc, %ecx
jmp 0x182d9
movl $0x33, %ecx
jmp 0x182d9
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2cac4(%rip), %rdi     # 0x44e1d
leaq 0x2caec(%rip), %rsi     # 0x44e4c
leaq 0x2cec3(%rip), %rcx     # 0x4522a
movl $0x2a, %edx
callq 0xb180
leaq 0x2cb79(%rip), %rdi     # 0x44ef1
leaq 0x2ae1d(%rip), %rsi     # 0x4319c
leaq 0x2cbbe(%rip), %rcx     # 0x44f44
jmp 0x183b4
leaq 0x2cb62(%rip), %rdi     # 0x44ef1
leaq 0x2ae06(%rip), %rsi     # 0x4319c
leaq 0x2cd25(%rip), %rcx     # 0x450c2
jmp 0x183b4
leaq 0x2cb4b(%rip), %rdi     # 0x44ef1
leaq 0x2adef(%rip), %rsi     # 0x4319c
leaq 0x2cc4f(%rip), %rcx     # 0x45003
movl $0xaf, %edx
callq 0xb180