// File: /workspace/github_cpp_makefile_star2_O3/vsklad[P]cgen/./bal/cnf/processor/cnfoptimizer.cpp
// Function: bal::CnfOptimizer::evaluate_clause(unsigned int)
inline processor_result_t CnfOptimizer::evaluate_clause(const uint32_t offset) {
        evaluations_++;
        
        processor_result_t result = erUndetermined;
        uint32_t* p_clause = _clauses_offset_clause(clauses_data_, offset);
        uint32_t dst[_clause_memory_size(p_clause)];
        
        // copy literals checking for constants and changes
        // if an aggregate, reduce/ensure literals are uncomplemented
        TRACE_CLAUSE(p_clause, offset);
        if (_clause_is_aggregated(p_clause)) {
            result = normalize_ca(p_clause, dst);
        } else {
            result = normalize_cu(p_clause, dst);
        };
        
        if (result == erUndetermined) {
            if (_clause_is_aggregated(dst)) {
                // recursive update may assign valiables so that subsequent evaluation results into this
                // need to avoid ideally; for that, separate normalization for assign_literal is needed
                _assert_level_1(offset == processed_offset_);
                TRACE_CLAUSE(dst, offset);
                result = evaluate_clause_a(dst, offset, offset);
            };
        } else if (result == erChangedC || result == erChangedV) {
            if (_clause_is_aggregated(dst)) {
                container_offset_t original_offset = CONTAINER_END;
                if (offset == processed_offset_
                    ) {
                    original_offset = offset;
                };
                // no transitive closure if the clause is changed
                // instead, the derived clause is saved and the closure is produced later
                exclude_clause(offset);
                TRACE_CLAUSE_RESOLVENT(dst);
                result = evaluate_clause_a(dst, CONTAINER_END,  original_offset);
            } else {
                Cnf::insertion_point_t insertion_point;
                __insertion_point_t_init(insertion_point);
                if (clauses_.transaction_offset_is_immutable(offset) || (offset < processed_offset_ && result == erChangedV)) {
                    exclude_clause(offset);
                    clauses_.append<false>(dst, insertion_point);
                    TRACE_CLAUSE_APPEND(dst);
                } else {
                    clauses_.find(dst, insertion_point);
                    if (insertion_point.container_offset == CONTAINER_END) {
                        TRACE_CLAUSE_REMOVE(offset);
                        // copying must occur afterwards to indentify old clause
                        clauses_.update(offset, insertion_point);
                        _assert_level_1(_clause_is_included(dst));
                        _clause_copy(dst, _clauses_offset_clause(clauses_data_, offset));
                        TRACE_CLAUSE_APPEND(dst);
                    } else {
                        exclude_clause(offset);
                        TRACE_LEVEL_NEXT;
                        TRACE_CLAUSE_RESOLVENT(dst);
                        TRACE_LEVEL_PREV;
                    };
                };
            };
        } else if (result == erSatisfied) {
            exclude_clause(offset);
        };
        
        return result;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %r12d
movq %rdi, %r14
incq 0xc0(%rdi)
movq 0x18(%rdi), %rax
movq (%rax), %rax
movl %esi, %ecx
movq %rcx, -0x30(%rbp)
leaq (%rax,%rcx,4), %r15
addq $0xc, %r15
movl $0x7fff, %r13d          # imm = 0x7FFF
movl (%r15), %eax
andl %r13d, %eax
leal 0x13(,%rax,4), %ecx
andl $-0x10, %ecx
movq %rsp, %rbx
subq %rcx, %rbx
movq %rbx, %rsp
movq 0x481d1(%rip), %rdi     # 0x5c310
testq %rdi, %rdi
je 0x14158
movq (%rdi), %rax
movq %r15, %rsi
movl %r12d, %edx
xorl %ecx, %ecx
callq *0x40(%rax)
andl (%r15), %r13d
movl %r13d, %eax
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
cmpl $0x4, %eax
ja 0x1416d
callq 0x12d5e
jmp 0x14172
callq 0x12fae
movl %eax, %r15d
testl %eax, %eax
je 0x14201
cmpl $0x2, %r15d
ja 0x1424c
movl (%rbx), %eax
andl $0x7fff, %eax           # imm = 0x7FFF
cmpl $0x4, %eax
ja 0x1428e
cmpl %r12d, 0xb0(%r14)
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmovel %r12d, %r15d
movq 0x48161(%rip), %rdi     # 0x5c310
movq 0x18(%r14), %rax
movq (%rax), %rdx
movq -0x30(%rbp), %rsi
movl 0xc(%rdx,%rsi,4), %ecx
testq %rdi, %rdi
je 0x14315
testw %cx, %cx
js 0x1433b
movq (%rdi), %rax
movl %r12d, %esi
callq *0x60(%rax)
movq 0x18(%r14), %rax
movq 0x4812c(%rip), %rdi     # 0x5c310
movq (%rax), %rax
movq -0x30(%rbp), %rcx
orl $0x8000, 0xc(%rax,%rcx,4) # imm = 0x8000
testq %rdi, %rdi
jne 0x1434a
jmp 0x1435d
movl $0x7fff, %eax           # imm = 0x7FFF
andl (%rbx), %eax
xorl %r15d, %r15d
cmpl $0x4, %eax
ja 0x144ed
cmpl %r12d, 0xb0(%r14)
jne 0x145ce
movq 0x480e8(%rip), %rdi     # 0x5c310
testq %rdi, %rdi
je 0x1423b
movq (%rdi), %rax
movq %rbx, %rsi
movl %r12d, %edx
xorl %ecx, %ecx
callq *0x40(%rax)
movq %r14, %rdi
movq %rbx, %rsi
movl %r12d, %edx
movl %r12d, %ecx
jmp 0x1436b
cmpl $0x3, %r15d
jne 0x144ed
movq 0x480b3(%rip), %rdi     # 0x5c310
movq 0x18(%r14), %rax
testq %rdi, %rdi
je 0x14321
movq (%rax), %rcx
movq -0x30(%rbp), %rbx
testb $-0x80, 0xd(%rcx,%rbx,4)
jne 0x14325
movq (%rdi), %rax
movl %r12d, %esi
callq *0x60(%rax)
movq 0x18(%r14), %rax
jmp 0x14325
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
movq 0x10(%r14), %rdi
movl 0x50(%rdi), %ecx
cmpl $-0x1, %ecx
setne %dl
cmpl %r12d, %ecx
seta %cl
testb %cl, %dl
jne 0x142c3
cmpl $0x2, %r15d
jne 0x14378
cmpl %r12d, 0xb0(%r14)
jbe 0x14378
movq 0x48046(%rip), %rax     # 0x5c310
movq 0x18(%r14), %rcx
testq %rax, %rax
je 0x142f5
movq (%rcx), %rdx
movq -0x30(%rbp), %rsi
testb $-0x80, 0xd(%rdx,%rsi,4)
jne 0x142f5
movq (%rax), %rcx
movq %rax, %rdi
movl %r12d, %esi
callq *0x60(%rcx)
movq 0x10(%r14), %rdi
movq 0x18(%r14), %rcx
movq (%rcx), %rax
movq -0x30(%rbp), %rcx
orl $0x8000, 0xc(%rax,%rcx,4) # imm = 0x8000
leaq -0x40(%rbp), %rdx
movq %rbx, %rsi
callq 0x10062
jmp 0x144d8
orl $0x8000, %ecx           # imm = 0x8000
movl %ecx, 0xc(%rdx,%rsi,4)
jmp 0x1435d
movq -0x30(%rbp), %rbx
movq (%rax), %rax
orl $0x8000, 0xc(%rax,%rbx,4) # imm = 0x8000
movl $0x3, %r15d
jmp 0x144ed
movq (%rax), %rax
movq -0x30(%rbp), %rcx
orl $0x8000, 0xc(%rax,%rcx,4) # imm = 0x8000
movq (%rdi), %rax
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq *0x40(%rax)
movq %r14, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %r15d, %ecx
callq 0x1460c
movl %eax, %r15d
jmp 0x144ed
movl 0x5c(%rdi), %ecx
movl %ecx, -0x3c(%rbp)
movl $0xffffffff, -0x40(%rbp) # imm = 0xFFFFFFFF
movl (%rbx,%rax,4), %ecx
shrl %ecx
decl %ecx
xorl %esi, %esi
cmpl 0x38(%rdi), %ecx
jae 0x1446e
movq 0x30(%rdi), %rdx
movl %ecx, %r8d
movl (%rdx,%r8,4), %edx
cmpl $-0x1, %edx
je 0x1446e
movq %rdi, -0x48(%rbp)
movq 0x8(%rdi), %rcx
movq %rcx, -0x50(%rbp)
leaq 0x47f36(%rip), %rcx     # 0x5c2f4
movl (%rcx), %r9d
movl %edx, %esi
incl %r9d
leaq 0x47f27(%rip), %rcx     # 0x5c2f4
movl %r9d, (%rcx)
movq -0x50(%rbp), %rcx
leaq (%rcx,%rsi,4), %r10
movzwl 0xc(%r10), %r11d
andl $0x7fff, %r11d          # imm = 0x7FFF
movl %edx, %ecx
testw %ax, %ax
je 0x1442f
testw %r11w, %r11w
je 0x1442f
movq -0x50(%rbp), %rdi
leaq (%rdi,%rsi,4), %r8
addq $0xc, %r8
movl %eax, %r13d
movzwl %r13w, %esi
movzwl %r11w, %edi
movl (%r8,%rdi,4), %edi
cmpl %edi, (%rbx,%rsi,4)
jne 0x14440
leal -0x1(%r13), %esi
leal -0x1(%r11), %edi
cmpw $0x1, %r11w
je 0x14434
movl %edi, %r11d
cmpw $0x1, %r13w
movl %esi, %r13d
jne 0x14400
jmp 0x14434
movl %eax, %esi
movl %r11d, %edi
cmpw %di, %si
jb 0x14442
jne 0x14451
jmp 0x144ff
jae 0x14451
movl 0x8(%r10), %edx
cmpl $-0x1, %edx
jne 0x143c1
jmp 0x14465
movl 0x4(%r10), %edx
cmpl $-0x1, %edx
jne 0x143c1
movl $0x2, %esi
jmp 0x1446a
movl $0x1, %esi
movq -0x48(%rbp), %rdi
movl %esi, -0x38(%rbp)
movl %ecx, -0x34(%rbp)
leaq 0x47e75(%rip), %rax     # 0x5c2f0
incl (%rax)
movq 0x47e8c(%rip), %rax     # 0x5c310
testq %rax, %rax
je 0x14499
movq (%rax), %rcx
movq %rax, %rdi
movl %r12d, %esi
callq *0x60(%rcx)
movq 0x10(%r14), %rdi
leaq -0x40(%rbp), %rdx
movl %r12d, %esi
callq 0x1554a
movl (%rbx), %eax
testw %ax, %ax
js 0x145ed
andl $0x7fff, %eax           # imm = 0x7FFF
leaq 0x4(,%rax,4), %rdx
movq 0x18(%r14), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
leaq (%rax,%rcx,4), %rdi
addq $0xc, %rdi
movq %rbx, %rsi
callq 0xb450
movq 0x47e31(%rip), %rdi     # 0x5c310
testq %rdi, %rdi
je 0x144ed
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x50(%rax)
movl %r15d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x3, -0x38(%rbp)
movl %ecx, -0x34(%rbp)
movl %ecx, -0x40(%rbp)
cmpl $-0x1, %edx
movq -0x48(%rbp), %rdi
je 0x14474
leaq 0x47dcc(%rip), %rax     # 0x5c2ec
incl (%rax)
movq 0x47de7(%rip), %rdi     # 0x5c310
movq 0x18(%r14), %rax
movq (%rax), %rdx
movq -0x30(%rbp), %rsi
movl 0xc(%rdx,%rsi,4), %ecx
testq %rdi, %rdi
je 0x1456c
testw %cx, %cx
js 0x1457b
movq (%rdi), %rax
movl %r12d, %esi
callq *0x60(%rax)
movq 0x18(%r14), %rax
movq 0x47dba(%rip), %rdi     # 0x5c310
movq (%rax), %rax
movq -0x30(%rbp), %rcx
orl $0x8000, 0xc(%rax,%rcx,4) # imm = 0x8000
testq %rdi, %rdi
jne 0x1458a
jmp 0x144ed
orl $0x8000, %ecx           # imm = 0x8000
movl %ecx, 0xc(%rdx,%rsi,4)
jmp 0x144ed
movq (%rax), %rax
movq -0x30(%rbp), %rcx
orl $0x8000, 0xc(%rax,%rcx,4) # imm = 0x8000
movq (%rdi), %rax
callq *0x20(%rax)
movq 0x47d79(%rip), %rdi     # 0x5c310
testq %rdi, %rdi
je 0x144ed
movq (%rdi), %rax
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq *0x40(%rax)
movq 0x47d56(%rip), %rdi     # 0x5c310
testq %rdi, %rdi
je 0x144ed
movq (%rdi), %rax
callq *0x28(%rax)
jmp 0x144ed
leaq 0x2e376(%rip), %rdi     # 0x4294b
leaq 0x2d82c(%rip), %rsi     # 0x41e08
leaq 0x2e384(%rip), %rcx     # 0x42967
movl $0xb9, %edx
callq 0xb180
leaq 0x2e3b9(%rip), %rdi     # 0x429ad
leaq 0x2d80d(%rip), %rsi     # 0x41e08
leaq 0x2e365(%rip), %rcx     # 0x42967
movl $0xd6, %edx
callq 0xb180