// File: vsklad[P]cgen/./bal/cnf/processor/cnfoptimizer.cpp
// Function: bal::CnfOptimizer::assign_variable_values_unoptimized()
inline bool CnfOptimizer::assign_variable_values_unoptimized() {
        clauses_.transaction_begin();
        
        const literalid_t* const variables = variables_.data();
        for (auto i = 0; i < variables_.size(); i++) {
            if (variable_t__literal_id(i) != variables[i]) {
                if (literal_t__is_constant(variables[i])) {
                    // unit clause
                    uint32_t unit_clause[_clause_size_memory_size(1)] = _clause_c1_make(literal_t__negated_onlyif(variable_t__literal_id(i), literal_t__is_constant_0(variables[i])));
                    Cnf::insertion_point_t insertion_point;
                    __insertion_point_t_init(insertion_point);
                    clauses_.find(unit_clause, insertion_point);
                    if (insertion_point.container_offset == CONTAINER_END) {
                        clauses_.append<true>(unit_clause, insertion_point);
                    } else {
                        // check that the value is the same, otherwise generate conflict
                        if (_clauses_offset_flags(clauses_data_, insertion_point.container_offset) != _clause_flags(unit_clause)) {
                            __print_conflict(variables_.data(), _clauses_offset_clause(clauses_data_, insertion_point.container_offset));
                            clauses_.transaction_rollback();
                            return false;
                        };
                    };
                } else if (literal_t__is_variable(variables[i])) {
                    // equality, 2 clauses
                    clauses_.append_clause_l(variable_t__literal_id(i), literal_t__negated(variables[i]));
                    clauses_.append_clause_l(literal_t__negated(variable_t__literal_id(i)), variables[i]);
                } else {
                    _assert_level_0(false);
                };
            };
        };
        
        clauses_.transaction_commit();
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x10(%rax), %rdi
callq 0x16820
movq -0x40(%rbp), %rax
movq 0xb8(%rax), %rdi
callq 0x10310
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x40(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, -0x44(%rbp)
movq 0xb8(%rax), %rdi
callq 0x102f0
movl %eax, %ecx
movl -0x44(%rbp), %eax
cmpl %ecx, %eax
jae 0x164b0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
shll %eax
orl $0x1, %eax
movq -0x18(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
je 0x164a0
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpl $0x1, (%rax,%rcx,4)
ja 0x16401
movq -0x40(%rbp), %rax
movl -0x1c(%rbp), %esi
addl $0x1, %esi
shll %esi
orl $0x1, %esi
movq -0x18(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
movl (%rcx,%rdx,4), %edi
xorl %ecx, %ecx
movl $0x1, %edx
cmpl $0x0, %edi
cmovel %edx, %ecx
xorl %ecx, %esi
andl $0x1, %esi
movl $0x2, %ecx
movl $0x1, %edx
cmpl $0x0, %esi
cmovel %edx, %ecx
shll $0x10, %ecx
orl $0x1, %ecx
movl %ecx, -0x24(%rbp)
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
shll %ecx
orl $0x1, %ecx
movq -0x18(%rbp), %rdx
movslq -0x1c(%rbp), %rsi
movl (%rdx,%rsi,4), %edi
xorl %edx, %edx
movl $0x1, %esi
cmpl $0x0, %edi
cmovel %esi, %edx
xorl %edx, %ecx
orl $0x1, %ecx
movl %ecx, -0x20(%rbp)
movl $0xffffffff, -0x30(%rbp) # imm = 0xFFFFFFFF
movq 0x10(%rax), %rdi
leaq -0x24(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x15190
cmpl $-0x1, -0x34(%rbp)
jne 0x1638e
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x24(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x17350
jmp 0x163fc
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movl -0x34(%rbp), %ecx
movl 0xc(%rax,%rcx,4), %eax
shrl $0x10, %eax
movzwl %ax, %eax
movl -0x24(%rbp), %ecx
shrl $0x10, %ecx
movzwl %cx, %ecx
cmpl %ecx, %eax
je 0x163fa
movq -0x40(%rbp), %rax
movq 0xb8(%rax), %rdi
callq 0x10310
movq %rax, %rdi
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rsi
movl -0x34(%rbp), %eax
shlq $0x2, %rax
addq %rax, %rsi
addq $0xc, %rsi
callq 0x12940
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x16a20
movb $0x0, -0x1(%rbp)
jmp 0x164c1
jmp 0x163fc
jmp 0x1649e
movq -0x18(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
xorl %eax, %eax
cmpl $0x1, (%rcx,%rdx,4)
movb %al, -0x45(%rbp)
jbe 0x16426
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpl $-0x2, (%rax,%rcx,4)
setbe %al
movb %al, -0x45(%rbp)
movb -0x45(%rbp), %al
testb $0x1, %al
jne 0x1642f
jmp 0x1647d
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x1c(%rbp), %esi
addl $0x1, %esi
shll %esi
orl $0x1, %esi
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
xorl $0x1, %edx
callq 0x13ae0
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x1c(%rbp), %esi
addl $0x1, %esi
shll %esi
orl $0x1, %esi
xorl $0x1, %esi
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
callq 0x13ae0
jmp 0x1649c
leaq 0x4d9e3(%rip), %rdi     # 0x63e67
leaq 0x47a89(%rip), %rsi     # 0x5df14
movl $0x4e3, %edx            # imm = 0x4E3
leaq 0x47b6f(%rip), %rcx     # 0x5e006
callq 0xd1c0
jmp 0x1649e
jmp 0x164a0
jmp 0x164a2
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x16298
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x17850
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)