// File: /workspace/github_cpp_makefile_star2_O2/vsklad[P]cgen/./bal/cnf/processor/cnfprocessor.hpp
// Function: void bal::CnfProcessor::rebuild_clauses<bal::CnfOptimizer, &bal::CnfOptimizer::_update_clause_variables(unsigned int*) const>(bal::CnfOptimizer const*, bool) const
inline void rebuild_clauses(const CALLER_T* const p_caller, const bool b_safe_mode) const {
            _assert_level_1(!cnf_.transaction_is_in());
            if (b_safe_mode) {
                // make a sorted list of all used container offsets
                // then basically d the same thing as unsafe while limiting to these offsets
                std::vector<container_offset_t> offsets;
                for (auto it: cnf_.clauses()) {
                    offsets.push_back((container_offset_t)(it - clauses_data_));
                };
                std::sort(offsets.begin(), offsets.end());
                // rollback after collecting the offsets
                cnf_.rollback(0, 0, 0);
                // add the clauses back
                for (auto i = 0; i < offsets.size(); i++) {
                    uint32_t* const p_clause = _clauses_offset_clause(clauses_data_, offsets[i]);
                    if ((p_caller->*p_update_clause)(p_clause)) {
                        Cnf::insertion_point_t insertion_point;
                        __insertion_point_t_init(insertion_point);
                        clauses_.append<false>(p_clause, insertion_point);
                    };
                };
            } else {
                const container_size_t original_size_ = cnf_.size_;
                cnf_.rollback(0, 0, 0);
                uint32_t offset = 0;
                while (offset < original_size_) {
                    uint32_t* const p_clause = _clauses_offset_clause(clauses_data_, offset);
                    // p_clause size may change
                    const clause_size_t clause_size = _clause_size(p_clause);
                    if ((p_caller->*p_update_clause)(p_clause)) {
                        Cnf::insertion_point_t insertion_point;
                        __insertion_point_t_init(insertion_point);
                        clauses_.append<false>(p_clause, insertion_point);
                    };
                    _clauses_offset_size_next(offset, clause_size);
                };
            };
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, -0x58(%rbp)
movq 0x8(%rdi), %rax
cmpl $-0x1, 0xc8(%rax)
jne 0x10f6e
movq %rdi, %r14
leaq 0x78(%rax), %rdi
testb %dl, %dl
je 0x10e76
andq $0x0, -0x40(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
leaq -0x80(%rbp), %rsi
movq %rdi, (%rsi)
leaq -0x78(%rbp), %rdi
callq 0x115a2
movq -0x80(%rbp), %rax
movl 0x38(%rax), %r12d
leaq -0x78(%rbp), %r15
leaq -0x50(%rbp), %rbx
leaq -0x2c(%rbp), %r13
cmpl %r12d, -0x60(%rbp)
jne 0x10e4b
cmpl $-0x1, -0x5c(%rbp)
je 0x10edf
movq %r15, %rdi
callq 0x115c0
movq 0x18(%r14), %rcx
subq (%rcx), %rax
shrq $0x2, %rax
movl %eax, -0x2c(%rbp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0xe0d2
movq %r15, %rdi
callq 0x11fa0
jmp 0x10e3b
movl 0x88(%rax), %r13d
movq 0x78(%rax), %rax
xorl %r15d, %r15d
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq *(%rax)
cmpl %r13d, %r15d
jae 0x10f5f
movq 0x18(%r14), %rax
movq (%rax), %rax
movl %r15d, %ecx
leaq (%rax,%rcx,4), %r12
addq $0xc, %r12
movl (%r12), %ebx
movl $0x7fff, %eax           # imm = 0x7FFF
andl %eax, %ebx
movq -0x58(%rbp), %rdi
movq %r12, %rsi
callq 0x15374
testb %al, %al
je 0x10ed6
orl $-0x1, -0x74(%rbp)
movq 0x10(%r14), %rdi
movq %r12, %rsi
leaq -0x78(%rbp), %rdx
callq 0xf540
addl %ebx, %r15d
addl $0x4, %r15d
jmp 0x10e8c
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x12036
movq 0x8(%r14), %rdi
movq 0x78(%rdi), %rax
addq $0x78, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq *(%rax)
xorl %r13d, %r13d
leaq -0x78(%rbp), %r15
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r13, %rcx
jbe 0x10f56
movq 0x18(%r14), %rcx
movq (%rcx), %rcx
movl (%rax,%r13,4), %eax
leaq (%rcx,%rax,4), %r12
addq $0xc, %r12
movq -0x58(%rbp), %rdi
movq %r12, %rsi
callq 0x15374
testb %al, %al
je 0x10f51
orl $-0x1, -0x74(%rbp)
movq 0x10(%r14), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xf540
incq %r13
jmp 0x10f07
leaq -0x50(%rbp), %rdi
callq 0x12486
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2330f(%rip), %rdi     # 0x34284
leaq 0x23322(%rip), %rsi     # 0x3429e
leaq 0x25b31(%rip), %rcx     # 0x36ab4
pushq $0x52
popq %rdx
callq 0xc180
jmp 0x10f93
jmp 0x10f93
jmp 0x10f93
jmp 0x10f93
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x12486
movq %rbx, %rdi
callq 0xc4c0
nop