// File: /workspace/github_cpp_makefile_star2_O3/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
subq $0x18, %rsp
leaq 0x4c27e(%rip), %rax     # 0x5c2f8
incl (%rax)
movl (%rsi), %eax
testw %ax, %ax
js 0x10486
movl %eax, %r12d
andl $0x7fff, %r12d          # imm = 0x7FFF
je 0x104a5
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x1, %r12d
je 0x100c9
movl $0x1, %ecx
movl (%r15,%rcx,4), %esi
cmpl 0x4(%r15,%rcx,4), %esi
ja 0x10467
incq %rcx
cmpq %rcx, %r12
jne 0x100a8
cmpl $0x5, %r12d
jae 0x10150
cmpl $0xffff, %eax           # imm = 0xFFFF
jbe 0x104c4
testb $0x1, 0x4(%r15)
je 0x104e3
cmpl $0x1, %r12d
jne 0x10114
movb $0x1, %cl
movl %ecx, -0x2c(%rbp)
cmpl $0x40000, %eax          # imm = 0x40000
jb 0x101b0
leaq 0x314f0(%rip), %rdi     # 0x415ec
leaq 0x3119a(%rip), %rsi     # 0x4129d
leaq 0x312bf(%rip), %rcx     # 0x413c9
movl $0xb0, %edx
callq 0xb180
testb $0x1, 0x8(%r15)
je 0x10502
cmpl $0x3, %r12d
jae 0x10164
movb $0x1, %cl
movl %ecx, -0x2c(%rbp)
cmpl $0x100000, %eax         # imm = 0x100000
jb 0x101b0
leaq 0x31500(%rip), %rdi     # 0x41638
leaq 0x3115e(%rip), %rsi     # 0x4129d
leaq 0x31283(%rip), %rcx     # 0x413c9
movl $0xb1, %edx
callq 0xb180
cmpl $0x10000, %eax          # imm = 0x10000
jae 0x10521
movl $0x0, -0x2c(%rbp)
jmp 0x101b0
testb $0x1, 0xc(%r15)
je 0x10540
cmpl $0x4, %r12d
jne 0x101a0
movb $0x1, %al
movl %eax, -0x2c(%rbp)
testb $0x1, 0x10(%r15)
jne 0x101b0
leaq 0x31425(%rip), %rdi     # 0x415ad
leaq 0x3110e(%rip), %rsi     # 0x4129d
leaq 0x31233(%rip), %rcx     # 0x413c9
movl $0xaf, %edx
callq 0xb180
movb $0x1, %cl
movl %ecx, -0x2c(%rbp)
cmpl $0x1000000, %eax        # imm = 0x1000000
jae 0x1055f
movq (%rbx), %rax
movq %rbx, %rdi
movq %rdx, %rsi
movq %rdx, -0x38(%rbp)
callq *0x8(%rax)
movq -0x38(%rbp), %rdx
testb %al, %al
jne 0x102e9
movl 0x5c(%rbx), %eax
movl %eax, 0x4(%rdx)
movl $0xffffffff, (%rdx)     # imm = 0xFFFFFFFF
movl $0x7fff, %eax           # imm = 0x7FFF
andl (%r15), %eax
decl %eax
movl 0x4(%r15,%rax,4), %eax
shrl %eax
decl %eax
xorl %ecx, %ecx
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
cmpl 0x38(%rbx), %eax
jae 0x102c9
movq 0x30(%rbx), %rsi
movl %eax, %edi
movl (%rsi,%rdi,4), %r8d
cmpl $-0x1, %r8d
je 0x102c9
movq 0x8(%rbx), %rcx
leaq 0x4c0d9(%rip), %rdx     # 0x5c2f4
movl (%rdx), %esi
movw $0x7fff, %di            # imm = 0x7FFF
movl %r8d, %eax
movl %r8d, %r11d
leaq (%rcx,%r11,4), %r8
incl %esi
movl %esi, (%rdx)
movzwl 0xc(%r8), %r9d
andl $0x7fff, %r9d           # imm = 0x7FFF
movzwl (%r15), %r10d
andw %di, %r10w
je 0x10283
testw %r9w, %r9w
je 0x10283
leaq (%rcx,%r11,4), %r11
addq $0xc, %r11
movzwl %r10w, %r14d
movzwl %r9w, %r13d
movl (%r11,%r13,4), %r13d
cmpl %r13d, (%r15,%r14,4)
jne 0x10296
leal -0x1(%r10), %r14d
leal -0x1(%r9), %r13d
cmpw $0x1, %r9w
je 0x10289
movl %r13d, %r9d
cmpw $0x1, %r10w
movl %r14d, %r10d
jne 0x10253
jmp 0x10289
movl %r10d, %r14d
movl %r9d, %r13d
cmpw %r13w, %r14w
jb 0x10298
jne 0x102a8
jmp 0x10390
jae 0x102a8
movl 0x8(%r8), %r8d
cmpl $-0x1, %r8d
jne 0x10221
jmp 0x102bd
movl 0x4(%r8), %r8d
cmpl $-0x1, %r8d
jne 0x10221
movl $0x2, %ecx
jmp 0x102c2
movl $0x1, %ecx
movq -0x38(%rbp), %rdx
movl (%rdx), %r9d
movl %ecx, 0x8(%rdx)
movl %eax, 0xc(%rdx)
movl %r9d, %eax
cmpl $-0x1, %eax
jne 0x102e0
leaq 0x4c012(%rip), %rax     # 0x5c2f0
jmp 0x102e7
leaq 0x4c005(%rip), %rax     # 0x5c2ec
incl (%rax)
movl (%rdx), %r13d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %r13
je 0x10309
movl 0x50(%rbx), %eax
cmpl $-0x1, %eax
sete %cl
cmpl %r13d, %eax
setbe %al
orb %cl, %al
jne 0x10370
movq 0x8(%rbx), %rax
movl 0x10(%rbx), %esi
leaq (%rax,%rsi,4), %rcx
addq $0xc, %rcx
cmpq %r15, %rcx
je 0x1040f
movl 0x20(%rbx), %ecx
leal (%r12,%rsi), %r14d
addl $0x4, %r14d
cmpl %r14d, %ecx
jae 0x103ed
movl %ecx, %edx
shrl %edx
addl %edx, %r14d
cmpl %r14d, %ecx
je 0x103ed
testq %rax, %rax
je 0x103a5
testl %r14d, %r14d
je 0x103ce
movl %r14d, %esi
shlq $0x2, %rsi
movq %rax, %rdi
callq 0xb470
testq %rax, %rax
je 0x1057e
movq %rax, 0x8(%rbx)
movl 0x10(%rbx), %esi
jmp 0x103e9
cmpb $0x0, -0x2c(%rbp)
je 0x10458
movzwl 0x2(%r15), %eax
shll $0x10, %eax
movq 0x8(%rbx), %rcx
orl %eax, 0xc(%rcx,%r13,4)
jmp 0x10458
movq -0x38(%rbp), %rdx
movl $0x3, 0x8(%rdx)
movl %eax, 0xc(%rdx)
movl %eax, (%rdx)
jmp 0x102d2
testl %r14d, %r14d
je 0x103de
movl %r14d, %edi
shlq $0x2, %rdi
callq 0xb380
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x1059d
movl $0x0, 0x10(%rbx)
xorl %esi, %esi
jmp 0x103e9
movq %rax, %rdi
callq 0xb350
movq $0x0, 0x8(%rbx)
movl $0x0, 0x10(%rbx)
xorl %esi, %esi
xorl %eax, %eax
movl %r14d, 0x20(%rbx)
movl %r12d, %ecx
leaq 0x4(,%rcx,4), %rdx
leaq (%rax,%rsi,4), %rdi
addq $0xc, %rdi
movq %r15, %rsi
callq 0xb450
movl 0x10(%rbx), %esi
movq -0x38(%rbp), %rdx
cmpl $-0x1, %r13d
sete %al
movl -0x2c(%rbp), %ecx
xorb $0x1, %cl
orb %al, %cl
jne 0x10436
movq 0x8(%rbx), %rax
movzwl 0xe(%rax,%r13,4), %ecx
shll $0x10, %ecx
movl %esi, %esi
orl %ecx, 0xc(%rax,%rsi,4)
movl 0x10(%rbx), %esi
movq %rbx, %rdi
movq %rdx, %r14
callq 0x10908
movl $0x3, 0x8(%r14)
movl 0x10(%rbx), %eax
movl %eax, (%r14)
addl %r12d, %eax
addl $0x4, %eax
movl %eax, 0x10(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x31022(%rip), %rdi     # 0x41490
leaq 0x30e28(%rip), %rsi     # 0x4129d
leaq 0x30f4d(%rip), %rcx     # 0x413c9
movl $0xa6, %edx
callq 0xb180
leaq 0x30f18(%rip), %rdi     # 0x413a5
leaq 0x30e09(%rip), %rsi     # 0x4129d
leaq 0x30f2e(%rip), %rcx     # 0x413c9
movl $0x9e, %edx
callq 0xb180
leaq 0x30fb1(%rip), %rdi     # 0x4145d
leaq 0x30dea(%rip), %rsi     # 0x4129d
leaq 0x30f0f(%rip), %rcx     # 0x413c9
movl $0xa1, %edx
callq 0xb180
leaq 0x30ff8(%rip), %rdi     # 0x414c3
leaq 0x30dcb(%rip), %rsi     # 0x4129d
leaq 0x30ef0(%rip), %rcx     # 0x413c9
movl $0xab, %edx
callq 0xb180
leaq 0x31006(%rip), %rdi     # 0x414f0
leaq 0x30dac(%rip), %rsi     # 0x4129d
leaq 0x30ed1(%rip), %rcx     # 0x413c9
movl $0xac, %edx
callq 0xb180
leaq 0x31026(%rip), %rdi     # 0x4152f
leaq 0x30d8d(%rip), %rsi     # 0x4129d
leaq 0x30eb2(%rip), %rcx     # 0x413c9
movl $0xad, %edx
callq 0xb180
leaq 0x311a8(%rip), %rdi     # 0x416d0
leaq 0x30d6e(%rip), %rsi     # 0x4129d
leaq 0x30e93(%rip), %rcx     # 0x413c9
movl $0xb4, %edx
callq 0xb180
leaq 0x31027(%rip), %rdi     # 0x4156e
leaq 0x30d4f(%rip), %rsi     # 0x4129d
leaq 0x30e74(%rip), %rcx     # 0x413c9
movl $0xae, %edx
callq 0xb180
leaq 0x3111e(%rip), %rdi     # 0x41684
leaq 0x30d30(%rip), %rsi     # 0x4129d
leaq 0x30e55(%rip), %rcx     # 0x413c9
movl $0xb2, %edx
callq 0xb180
leaq 0x30cf2(%rip), %rdi     # 0x41277
leaq 0x2f217(%rip), %rsi     # 0x3f7a3
leaq 0x2f228(%rip), %rcx     # 0x3f7bb
movl $0x33, %edx
callq 0xb180
leaq 0x2f26d(%rip), %rdi     # 0x3f811
leaq 0x2f1f8(%rip), %rsi     # 0x3f7a3
leaq 0x2f209(%rip), %rcx     # 0x3f7bb
movl $0x38, %edx
callq 0xb180