// File: /workspace/github_cpp_makefile_star2_O1/vsklad[P]cgen/./bal/bal/binarytreeindex.hpp
// Function: bal::AvlTreesIndex<unsigned int, true, &int bal::compare_clauses<false>(unsigned int const*, unsigned int const*), &unsigned int bal::clause_index_variable_id<false>(unsigned int const*)>::_update(unsigned int, bal::avl_tree_insertion_point_t const&)
inline void _update(const container_offset_t offset, const insertion_point_t& insertion_point) {
            _assert_level_1(this->insertion_point_is_valid(insertion_point));
            this->insertion_point_invalidate();
            
            container_offset_t* const p_item = _bti_item(this->data_, offset);
            
            if (insertion_point.kind == btipkCurrent) {
                _assert_level_0(insertion_point.offset != CONTAINER_END);
                _assert_level_0(insertion_point.container_offset != CONTAINER_END);
                const container_offset_t* const p_original_item = _bti_item(this->data_, insertion_point.offset);
                _update_parent(insertion_point.offset, offset);
                _bti_item_right_offset(p_item) = _bti_item_right_offset(p_original_item);
                if (_bti_item_right_offset(p_item) != CONTAINER_END) {
                    _bti_parent_offset(this->data_, _bti_item_right_offset(p_item)) = offset;
                };
                _bti_item_left_offset(p_item) = _bti_item_left_offset(p_original_item);
                if (_bti_item_left_offset(p_item) != CONTAINER_END) {
                    _bti_parent_offset(this->data_, _bti_item_left_offset(p_item)) = offset;
                };
            } else if (insertion_point.kind == btipkRoot) {
                _assert_level_1(insertion_point.offset != CONTAINER_END);
                
                if (insertion_point.offset >= this->instances_.size_) {
                    this->instances_.append(CONTAINER_END, insertion_point.offset - this->instances_.size_ + 1);
                };
                container_offset_t* const p_offset = this->instances_.data_ + insertion_point.offset;
                _assert_level_1(*p_offset == CONTAINER_END);
                *p_offset = offset;
                _bti_item_parent_offset(p_item) = CONTAINER_END;
                _bti_item_right_offset(p_item) = CONTAINER_END;
                _bti_item_left_offset(p_item) = CONTAINER_END;
            } else {
                _assert_level_0(insertion_point.container_offset == CONTAINER_END);
                _assert_level_1(insertion_point.offset < this->size_);
                _bti_item_parent_offset(p_item) = insertion_point.offset;
                container_offset_t* const p_parent = _bti_item(this->data_, insertion_point.offset);
                if (insertion_point.kind == btipkLeft) {
                    _bti_item_right_offset(p_item) = CONTAINER_END;
                    _bti_item_left_offset(p_item) = _bti_item_left_offset(p_parent);
                    if (_bti_item_left_offset(p_item) != CONTAINER_END) {
                        _assert_level_2(_bti_parent_offset(this->data_, _bti_item_left_offset(p_item)) == _bti_item_parent_offset(p_item));
                        _bti_parent_offset(this->data_, _bti_item_left_offset(p_item)) = offset;
                    };
                    _bti_item_left_offset(p_parent) = offset;
                } else if (insertion_point.kind == btipkRight) {
                    _bti_item_left_offset(p_item) = CONTAINER_END;
                    _bti_item_right_offset(p_item) = _bti_item_right_offset(p_parent);
                    if (_bti_item_right_offset(p_item) != CONTAINER_END) {
                        _assert_level_2(_bti_parent_offset(this->data_, _bti_item_right_offset(p_item)) == _bti_item_parent_offset(p_item));
                        _bti_parent_offset(this->data_, _bti_item_right_offset(p_item)) = offset;
                    };
                    _bti_item_right_offset(p_parent) = offset;
                } else {
                    _assert_level_0(false);
                };
            };
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %r14
movq (%rdi), %rax
movq %rdx, %rsi
callq *0x8(%rax)
testb %al, %al
je 0x11ee2
movl 0x5c(%r14), %eax
incl %eax
movl %eax, 0x5c(%r14)
cmpl $-0x1, %eax
je 0x11f01
movq 0x8(%r14), %r13
movl %r12d, %ebx
movl 0x8(%r15), %edx
testl %edx, %edx
je 0x11d5d
cmpl $0x3, %edx
jne 0x11db6
movl 0xc(%r15), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %rdx
je 0x11f20
cmpl $-0x1, (%r15)
je 0x11f7d
leaq (,%rdx,4), %rax
addq %r13, %rax
movl (%rax), %ecx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
cmpq %rsi, %rcx
je 0x11e53
cmpl %edx, 0x4(%r13,%rcx,4)
jne 0x11e84
leaq 0x4(,%rcx,4), %rsi
addq %r13, %rsi
jmp 0x11e9c
movl %r12d, -0x2c(%rbp)
movl 0xc(%r15), %edx
cmpl $-0x1, %edx
je 0x11f3f
leaq 0x30(%r14), %r12
subl 0x38(%r14), %edx
jb 0x11d87
incl %edx
movq %r12, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x12094
movq (%r12), %rax
movl 0xc(%r15), %ecx
cmpl $-0x1, (%rax,%rcx,4)
jne 0x11f9c
movl -0x2c(%rbp), %edx
movl %edx, (%rax,%rcx,4)
movq $-0x1, (%r13,%rbx,4)
movl $0xffffffff, 0x8(%r13,%rbx,4) # imm = 0xFFFFFFFF
jmp 0x11ed3
cmpl $-0x1, (%r15)
jne 0x11f5e
movl 0xc(%r15), %ecx
cmpl 0x10(%r14), %ecx
jae 0x11fbb
movl %ecx, (%r13,%rbx,4)
movl 0xc(%r15), %eax
cmpl $0x2, %edx
je 0x11e1c
cmpl $0x1, %edx
jne 0x11fda
movl $0xffffffff, 0x4(%r13,%rbx,4) # imm = 0xFFFFFFFF
movl 0x8(%r13,%rax,4), %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl %edx, 0x8(%r13,%rbx,4)
cmpq %rsi, %rdx
je 0x11e12
cmpl %ecx, (%r13,%rdx,4)
jne 0x12056
movl %r12d, (%r13,%rdx,4)
movl %r12d, 0x8(%r13,%rax,4)
jmp 0x11ed3
movl $0xffffffff, 0x8(%r13,%rbx,4) # imm = 0xFFFFFFFF
movl 0x4(%r13,%rax,4), %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl %edx, 0x4(%r13,%rbx,4)
cmpq %rsi, %rdx
je 0x11e49
cmpl %ecx, (%r13,%rdx,4)
jne 0x12075
movl %r12d, (%r13,%rdx,4)
movl %r12d, 0x4(%r13,%rax,4)
jmp 0x11ed3
movl $0x7fff, %esi           # imm = 0x7FFF
andl 0xc(%rax), %esi
decl %esi
movl 0x10(%rax,%rsi,4), %esi
shrl %esi
decl %esi
cmpl 0x38(%r14), %esi
jae 0x11ff9
movq 0x30(%r14), %rdi
movl %esi, %esi
cmpl %edx, (%rdi,%rsi,4)
jne 0x12018
leaq (%rdi,%rsi,4), %rsi
jmp 0x11e9c
leaq (,%rcx,4), %rsi
addq %r13, %rsi
cmpl %edx, 0x8(%rsi)
jne 0x12037
addq $0x8, %rsi
movl %r12d, (%rsi)
cmpl $-0x1, %r12d
je 0x11eaa
movl %ecx, (%r13,%rbx,4)
movl 0x4(%rax), %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %edx, 0x4(%r13,%rbx,4)
cmpq %rcx, %rdx
je 0x11ec1
movl %r12d, (%r13,%rdx,4)
movl 0x8(%rax), %eax
movl %eax, 0x8(%r13,%rbx,4)
cmpq %rcx, %rax
je 0x11ed3
movl %r12d, (%r13,%rax,4)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x31824(%rip), %rdi     # 0x4370d
leaq 0x3184d(%rip), %rsi     # 0x4373d
leaq 0x31864(%rip), %rcx     # 0x4375b
movl $0xfd, %edx
callq 0xc180
leaq 0x31acd(%rip), %rdi     # 0x439d5
leaq 0x31ae5(%rip), %rsi     # 0x439f4
leaq 0x31afb(%rip), %rcx     # 0x43a11
movl $0x4b, %edx
callq 0xc180
leaq 0x3196e(%rip), %rdi     # 0x43895
leaq 0x3180f(%rip), %rsi     # 0x4373d
leaq 0x31826(%rip), %rcx     # 0x4375b
movl $0x103, %edx            # imm = 0x103
callq 0xc180
leaq 0x3194f(%rip), %rdi     # 0x43895
leaq 0x317f0(%rip), %rsi     # 0x4373d
leaq 0x31807(%rip), %rcx     # 0x4375b
movl $0x110, %edx            # imm = 0x110
callq 0xc180
leaq 0x319a5(%rip), %rdi     # 0x4390a
leaq 0x317d1(%rip), %rsi     # 0x4373d
leaq 0x317e8(%rip), %rcx     # 0x4375b
movl $0x11c, %edx            # imm = 0x11C
callq 0xc180
leaq 0x31939(%rip), %rdi     # 0x438bd
leaq 0x317b2(%rip), %rsi     # 0x4373d
leaq 0x317c9(%rip), %rcx     # 0x4375b
movl $0x104, %edx            # imm = 0x104
callq 0xc180
leaq 0x3194c(%rip), %rdi     # 0x438ef
leaq 0x31793(%rip), %rsi     # 0x4373d
leaq 0x317aa(%rip), %rcx     # 0x4375b
movl $0x116, %edx            # imm = 0x116
callq 0xc180
leaq 0x3197a(%rip), %rdi     # 0x4393c
leaq 0x31774(%rip), %rsi     # 0x4373d
leaq 0x3178b(%rip), %rcx     # 0x4375b
movl $0x11d, %edx            # imm = 0x11D
callq 0xc180
leaq 0x37cb1(%rip), %rdi     # 0x49c92
leaq 0x31755(%rip), %rsi     # 0x4373d
leaq 0x3176c(%rip), %rcx     # 0x4375b
movl $0x131, %edx            # imm = 0x131
callq 0xc180
leaq 0x31d31(%rip), %rdi     # 0x43d31
leaq 0x31736(%rip), %rsi     # 0x4373d
leaq 0x31be3(%rip), %rcx     # 0x43bf1
movl $0xab, %edx
callq 0xc180
leaq 0x31d3b(%rip), %rdi     # 0x43d5a
leaq 0x31717(%rip), %rsi     # 0x4373d
leaq 0x31bc4(%rip), %rcx     # 0x43bf1
movl $0xac, %edx
callq 0xc180
leaq 0x31b95(%rip), %rdi     # 0x43bd3
leaq 0x316f8(%rip), %rsi     # 0x4373d
leaq 0x31ba5(%rip), %rcx     # 0x43bf1
movl $0xa6, %edx
callq 0xc180
leaq 0x31904(%rip), %rdi     # 0x43961
leaq 0x316d9(%rip), %rsi     # 0x4373d
leaq 0x316f0(%rip), %rcx     # 0x4375b
movl $0x124, %edx            # imm = 0x124
callq 0xc180
leaq 0x3191f(%rip), %rdi     # 0x4399b
leaq 0x316ba(%rip), %rsi     # 0x4373d
leaq 0x316d1(%rip), %rcx     # 0x4375b
movl $0x12c, %edx            # imm = 0x12C
callq 0xc180