// File: /workspace/github_cpp_makefile_star2_O2/vsklad[P]cgen/./bal/cnf/cnf/cnfclausescontainer.hpp
// Function: void bal::CnfClausesIndexedContainer<false>::append<false>(unsigned int const*, bal::avl_tree_insertion_point_t&)
inline void append(const uint32_t* const p_clause, insertion_point_t& insertion_point) {
            __append_clause_++;
            
            _assert_level_0(_clause_is_included(p_clause));
            
            const clause_size_t clause_size = _clause_size(p_clause);
            _assert_level_0(clause_size != 0 && clause_size <= CLAUSE_SIZE_MAX);
            
            // should be sorted at this stage
            // check is sorted; remove later for performance reasons
            for (auto i = 1; i < clause_size; i++) {
                _assert_level_1(_clause_literal(p_clause, i - 1) <= _clause_literal(p_clause, i));
            };
            
            // validity of literals and flags
            if (_clause_size_is_aggregated(clause_size)) {
                _assert_level_1(_clause_flags(p_clause) != 0);
                _assert_level_1(clause_size < 1 || !literal_t__is_negation(_clause_literal(p_clause, 0)));
                _assert_level_1(clause_size < 2 || !literal_t__is_negation(_clause_literal(p_clause, 1)));
                _assert_level_1(clause_size < 3 || !literal_t__is_negation(_clause_literal(p_clause, 2)));
                _assert_level_1(clause_size < 4 || !literal_t__is_negation(_clause_literal(p_clause, 3)));
                _assert_level_1(clause_size != 1 || (_clause_flags(p_clause) & 0xFFFC) == 0);
                _assert_level_1(clause_size != 2 || (_clause_flags(p_clause) & 0xFFF0) == 0);
                _assert_level_1(clause_size != 3 || (_clause_flags(p_clause) & 0xFF00) == 0);
            } else {
                _assert_level_1(_clause_flags(p_clause) == 0);
            };
            
            // check if the clause exists by looking up the first literal index
            // find insertion pont at the same time
            // if avoid_merging is true, this is only used for verification
            if (!this->insertion_point_is_valid(insertion_point)) {
                _assert_level_1(!avoid_merging);
                find(p_clause, insertion_point);
            };
            
            // if a match for an aggregated clause is found, check if should
            // merge existing header from an immutable clause then still insert it
            // immediately in front of the existing clause
            // avoid_merging would ignore duplicate for any clause
            const container_offset_t existing_offset = insertion_point.container_offset;
            
            if (avoid_merging || existing_offset == CONTAINER_END || this->transaction_offset_is_immutable(existing_offset)) {
                // move the clause if necessary
                if (p_clause != _clauses_offset_clause(this->data_, this->size_)) {
                    this->reserve(_clauses_offset_size_memory_size(clause_size));
                    _clause_copy_size(p_clause, _clauses_offset_clause(this->data_, this->size_), clause_size);
                };
                // merge the existing clause into the new one if appropriate
                if (existing_offset != CONTAINER_END && _clause_size_is_aggregated(clause_size)) {
                    if (avoid_merging) {
                        // the existing clause should always be merged into the new one
                        _assert_level_1((_clauses_offset_flags(this->data_, existing_offset) & ~_clause_flags(p_clause)) == 0);
                    } else {
                        _clauses_offset_flags_include(this->data_, this->size_, _clauses_offset_flags(this->data_, existing_offset));
                    };
                };
                // clause not added yet but clauses_size_ is its valid offset
                base_t::_update(this->size_, insertion_point);
                insertion_point.kind = btipkCurrent;
                insertion_point.container_offset = this->size_;
                _clauses_offset_size_next(this->size_, clause_size); // "commits" the clause
            } else if (_clause_size_is_aggregated(clause_size)) {
                // a matching aggregated clause is found; it is enough to merge headers
                _assert_level_1(existing_offset != CONTAINER_END);
                _clauses_offset_flags_include(this->data_, existing_offset, _clause_flags(p_clause));
                // insertion point contains offset of the clause
            } else {
                // a duplicate for an existing non-aggregated clause - ignore
                // insertion point contains offset of the clause
            };
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x41d93(%rip), %rax     # 0x512e8
incl (%rax)
movl (%rsi), %eax
testw %ax, %ax
js 0xf7a3
movl %eax, %r12d
andl $0x7fff, %r12d          # imm = 0x7FFF
je 0xf7c2
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x1
popq %rcx
cmpq %rcx, %r12
je 0xf5b4
movl (%r15,%rcx,4), %edx
leaq 0x1(%rcx), %rsi
cmpl 0x4(%r15,%rcx,4), %edx
movq %rsi, %rcx
jbe 0xf57e
leaq 0x23ef4(%rip), %rdi     # 0x33490
leaq 0x23cfa(%rip), %rsi     # 0x3329d
leaq 0x23e1f(%rip), %rcx     # 0x333c9
movl $0xa6, %edx
callq 0xc180
cmpl $0x5, %r12d
jae 0xf600
cmpl $0xffff, %eax           # imm = 0xFFFF
jbe 0xf7e1
testb $0x1, 0x4(%r15)
je 0xf81f
cmpl $0x1, %r12d
jne 0xf703
cmpl $0x40000, %eax          # imm = 0x40000
jb 0xf60b
leaq 0x24004(%rip), %rdi     # 0x335ec
leaq 0x23cae(%rip), %rsi     # 0x3329d
leaq 0x23dd3(%rip), %rcx     # 0x333c9
movl $0xb0, %edx
callq 0xc180
cmpl $0x10000, %eax          # imm = 0x10000
jae 0xf800
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x8(%rax)
testb %al, %al
jne 0xf629
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xfccc
movl (%r14), %r13d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %r13
je 0xf64d
movl 0x50(%rbx), %eax
cmpl $-0x1, %eax
sete %cl
cmpl %r13d, %eax
setbe %al
orb %cl, %al
jne 0xf6ea
movq 0x8(%rbx), %rax
movl 0x10(%rbx), %esi
leaq (%rax,%rsi,4), %rax
addq $0xc, %rax
cmpq %r15, %rax
je 0xf691
leaq 0x8(%rbx), %rdi
leal 0x4(%r12), %esi
callq 0xf470
leaq 0x4(,%r12,4), %rdx
movq 0x8(%rbx), %rax
movl 0x10(%rbx), %ecx
leaq (%rax,%rcx,4), %rdi
addq $0xc, %rdi
movq %r15, %rsi
callq 0xc440
movl 0x10(%rbx), %esi
cmpl $0x5, %r12d
setae %al
cmpl $-0x1, %r13d
sete %cl
orb %al, %cl
jne 0xf6b9
movq 0x8(%rbx), %rax
movzwl 0xe(%rax,%r13,4), %ecx
shll $0x10, %ecx
movl %esi, %edx
orl %ecx, 0xc(%rax,%rdx,4)
movl 0x10(%rbx), %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0xfcf8
movl $0x3, 0x8(%r14)
movl 0x10(%rbx), %eax
movl %eax, (%r14)
addl %r12d, %eax
addl $0x4, %eax
movl %eax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x4, %r12d
ja 0xf6db
movzwl 0x2(%r15), %eax
shll $0x10, %eax
movq 0x8(%rbx), %rcx
orl %eax, 0xc(%rcx,%r13,4)
jmp 0xf6db
testb $0x1, 0x8(%r15)
je 0xf83e
cmpl $0x3, %r12d
jae 0xf73e
cmpl $0x100000, %eax         # imm = 0x100000
jb 0xf60b
leaq 0x23f12(%rip), %rdi     # 0x33638
leaq 0x23b70(%rip), %rsi     # 0x3329d
leaq 0x23c95(%rip), %rcx     # 0x333c9
movl $0xb1, %edx
callq 0xc180
testb $0x1, 0xc(%r15)
je 0xf85d
cmpl $0x4, %r12d
jne 0xf779
testb $0x1, 0x10(%r15)
jne 0xf60b
leaq 0x23e4c(%rip), %rdi     # 0x335ad
leaq 0x23b35(%rip), %rsi     # 0x3329d
leaq 0x23c5a(%rip), %rcx     # 0x333c9
movl $0xaf, %edx
callq 0xc180
cmpl $0x1000000, %eax        # imm = 0x1000000
jb 0xf60b
leaq 0x23ef9(%rip), %rdi     # 0x33684
leaq 0x23b0b(%rip), %rsi     # 0x3329d
leaq 0x23c30(%rip), %rcx     # 0x333c9
movl $0xb2, %edx
callq 0xc180
leaq 0x23bfb(%rip), %rdi     # 0x333a5
leaq 0x23aec(%rip), %rsi     # 0x3329d
leaq 0x23c11(%rip), %rcx     # 0x333c9
movl $0x9e, %edx
callq 0xc180
leaq 0x23c94(%rip), %rdi     # 0x3345d
leaq 0x23acd(%rip), %rsi     # 0x3329d
leaq 0x23bf2(%rip), %rcx     # 0x333c9
movl $0xa1, %edx
callq 0xc180
leaq 0x23cdb(%rip), %rdi     # 0x334c3
leaq 0x23aae(%rip), %rsi     # 0x3329d
leaq 0x23bd3(%rip), %rcx     # 0x333c9
movl $0xab, %edx
callq 0xc180
leaq 0x23ec9(%rip), %rdi     # 0x336d0
leaq 0x23a8f(%rip), %rsi     # 0x3329d
leaq 0x23bb4(%rip), %rcx     # 0x333c9
movl $0xb4, %edx
callq 0xc180
leaq 0x23cca(%rip), %rdi     # 0x334f0
leaq 0x23a70(%rip), %rsi     # 0x3329d
leaq 0x23b95(%rip), %rcx     # 0x333c9
movl $0xac, %edx
callq 0xc180
leaq 0x23cea(%rip), %rdi     # 0x3352f
leaq 0x23a51(%rip), %rsi     # 0x3329d
leaq 0x23b76(%rip), %rcx     # 0x333c9
movl $0xad, %edx
callq 0xc180
leaq 0x23d0a(%rip), %rdi     # 0x3356e
leaq 0x23a32(%rip), %rsi     # 0x3329d
leaq 0x23b57(%rip), %rcx     # 0x333c9
movl $0xae, %edx
callq 0xc180