// File: /workspace/github_cpp_makefile_star2_O1/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 0x4df29(%rip), %rax     # 0x5f2f8
incl (%rax)
movl (%rsi), %eax
testw %ax, %ax
js 0x116c0
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl %eax, %r12d
andl $0x7fff, %r12d          # imm = 0x7FFF
cmpq $0x1, %r12
je 0x1141a
testl %r12d, %r12d
je 0x116df
movl $0x1, %ecx
movl (%r15,%rcx,4), %edx
cmpl 0x4(%r15,%rcx,4), %edx
ja 0x116a1
incq %rcx
cmpq %rcx, %r12
jne 0x11403
cmpl $0x5, %r12d
jae 0x1148f
cmpl $0xffff, %eax           # imm = 0xFFFF
jbe 0x116fe
testb $0x1, 0x4(%r15)
je 0x1171d
cmpl $0x1, %r12d
je 0x11447
testb $0x1, 0x8(%r15)
je 0x1173c
cmpl $0x3, %r12d
jb 0x11458
testb $0x1, 0xc(%r15)
je 0x1175b
leal -0x1(%r12), %ecx
cmpl $0x3, %ecx
ja 0x11505
leaq 0x30937(%rip), %rdx     # 0x41da4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
cmpl $0x40000, %eax          # imm = 0x40000
jae 0x11799
cmpl $0x3, %r12d
je 0x114fa
cmpl $0x2, %r12d
je 0x114d4
jmp 0x11505
cmpl $0x10000, %eax          # imm = 0x10000
jb 0x11505
leaq 0x32243(%rip), %rdi     # 0x436e0
leaq 0x31e09(%rip), %rsi     # 0x432ad
leaq 0x31f2e(%rip), %rcx     # 0x433d9
movl $0xb4, %edx
callq 0xc180
testb $0x1, 0x10(%r15)
je 0x117b8
cmpl $0x3, %r12d
je 0x114fa
cmpl $0x2, %r12d
je 0x114d4
cmpl $0x1, %r12d
je 0x11476
jmp 0x11505
cmpl $0x100000, %eax         # imm = 0x100000
jb 0x11505
leaq 0x32166(%rip), %rdi     # 0x43648
leaq 0x31dc4(%rip), %rsi     # 0x432ad
leaq 0x31ee9(%rip), %rcx     # 0x433d9
movl $0xb1, %edx
callq 0xc180
cmpl $0x1000000, %eax        # imm = 0x1000000
jae 0x1177a
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x8(%rax)
testb %al, %al
jne 0x11523
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x11b5a
movl (%r14), %r13d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %r13
je 0x11543
movl 0x50(%rbx), %eax
cmpl $-0x1, %eax
sete %cl
cmpl %r13d, %eax
setbe %al
orb %cl, %al
jne 0x115ab
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %eax
leaq (%rdi,%rax,4), %rax
addq $0xc, %rax
cmpq %r15, %rax
je 0x11647
movq %r14, -0x30(%rbp)
movl 0x10(%rbx), %ecx
movl 0x20(%rbx), %eax
leal (%r12,%rcx), %r14d
addl $0x4, %r14d
cmpl %r14d, %eax
jae 0x1161c
movl %eax, %ecx
shrl %ecx
addl %ecx, %r14d
cmpl %r14d, %eax
je 0x1161c
testq %rdi, %rdi
je 0x115cb
testl %r14d, %r14d
je 0x11604
movl %r14d, %esi
shlq $0x2, %rsi
callq 0xc470
testq %rax, %rax
je 0x117d7
movq %rax, 0x8(%rbx)
jmp 0x11618
cmpl $0x4, %r12d
ja 0x11692
movzwl 0x2(%r15), %eax
shll $0x10, %eax
movq 0x8(%rbx), %rcx
orl %eax, 0xc(%rcx,%r13,4)
jmp 0x11692
testl %r14d, %r14d
je 0x11611
movl %r14d, %edi
shlq $0x2, %rdi
callq 0xc380
movq %rax, 0x8(%rbx)
testq %rax, %rax
jne 0x11611
leaq 0x30239(%rip), %rdi     # 0x41825
leaq 0x301c4(%rip), %rsi     # 0x417b7
leaq 0x301d5(%rip), %rcx     # 0x417cf
movl $0x38, %edx
callq 0xc180
callq 0xc350
movq $0x0, 0x8(%rbx)
movl $0x0, 0x10(%rbx)
movl %r14d, 0x20(%rbx)
movl %r12d, %eax
leaq (%r15,%rax,4), %rdx
addq $0x4, %rdx
subq %r15, %rdx
movq -0x30(%rbp), %r14
je 0x11647
movq 0x8(%rbx), %rax
movl 0x10(%rbx), %ecx
leaq (%rax,%rcx,4), %rdi
addq $0xc, %rdi
movq %r15, %rsi
callq 0xc450
cmpl $0x5, %r12d
setae %al
cmpl $-0x1, %r13d
sete %cl
orb %al, %cl
jne 0x1166d
movq 0x8(%rbx), %rax
movzwl 0xe(%rax,%r13,4), %ecx
shll $0x10, %ecx
movl 0x10(%rbx), %edx
orl %ecx, 0xc(%rax,%rdx,4)
movl 0x10(%rbx), %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x11cb8
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
leaq 0x31df8(%rip), %rdi     # 0x434a0
leaq 0x31bfe(%rip), %rsi     # 0x432ad
leaq 0x31d23(%rip), %rcx     # 0x433d9
movl $0xa6, %edx
callq 0xc180
leaq 0x31cee(%rip), %rdi     # 0x433b5
leaq 0x31bdf(%rip), %rsi     # 0x432ad
leaq 0x31d04(%rip), %rcx     # 0x433d9
movl $0x9e, %edx
callq 0xc180
leaq 0x31d87(%rip), %rdi     # 0x4346d
leaq 0x31bc0(%rip), %rsi     # 0x432ad
leaq 0x31ce5(%rip), %rcx     # 0x433d9
movl $0xa1, %edx
callq 0xc180
leaq 0x31dce(%rip), %rdi     # 0x434d3
leaq 0x31ba1(%rip), %rsi     # 0x432ad
leaq 0x31cc6(%rip), %rcx     # 0x433d9
movl $0xab, %edx
callq 0xc180
leaq 0x31ddc(%rip), %rdi     # 0x43500
leaq 0x31b82(%rip), %rsi     # 0x432ad
leaq 0x31ca7(%rip), %rcx     # 0x433d9
movl $0xac, %edx
callq 0xc180
leaq 0x31dfc(%rip), %rdi     # 0x4353f
leaq 0x31b63(%rip), %rsi     # 0x432ad
leaq 0x31c88(%rip), %rcx     # 0x433d9
movl $0xad, %edx
callq 0xc180
leaq 0x31e1c(%rip), %rdi     # 0x4357e
leaq 0x31b44(%rip), %rsi     # 0x432ad
leaq 0x31c69(%rip), %rcx     # 0x433d9
movl $0xae, %edx
callq 0xc180
leaq 0x31f13(%rip), %rdi     # 0x43694
leaq 0x31b25(%rip), %rsi     # 0x432ad
leaq 0x31c4a(%rip), %rcx     # 0x433d9
movl $0xb2, %edx
callq 0xc180
leaq 0x31e5c(%rip), %rdi     # 0x435fc
leaq 0x31b06(%rip), %rsi     # 0x432ad
leaq 0x31c2b(%rip), %rcx     # 0x433d9
movl $0xb0, %edx
callq 0xc180
leaq 0x31dfe(%rip), %rdi     # 0x435bd
leaq 0x31ae7(%rip), %rsi     # 0x432ad
leaq 0x31c0c(%rip), %rcx     # 0x433d9
movl $0xaf, %edx
callq 0xc180
leaq 0x2ffc5(%rip), %rdi     # 0x417a3
leaq 0x2ffd2(%rip), %rsi     # 0x417b7
leaq 0x2ffe3(%rip), %rcx     # 0x417cf
movl $0x33, %edx
callq 0xc180