// File: /workspace/github_cpp_makefile_star2_O3/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 0x10b36
movl 0x5c(%r14), %eax
incl %eax
movl %eax, 0x5c(%r14)
cmpl $-0x1, %eax
je 0x10b55
movq 0x8(%r14), %r13
movl %r12d, %ebx
movl 0x8(%r15), %edx
testl %edx, %edx
je 0x109ad
cmpl $0x3, %edx
jne 0x10a0a
movl 0xc(%r15), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %rdx
je 0x10b74
cmpl $-0x1, (%r15)
je 0x10bd1
leaq (,%rdx,4), %rax
addq %r13, %rax
movl (%rax), %ecx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
cmpq %rsi, %rcx
je 0x10aa7
cmpl %edx, 0x4(%r13,%rcx,4)
jne 0x10ad8
leaq 0x4(,%rcx,4), %rsi
addq %r13, %rsi
jmp 0x10af0
movl %r12d, -0x2c(%rbp)
movl 0xc(%r15), %eax
cmpl $-0x1, %eax
je 0x10b93
leaq 0x30(%r14), %r12
movl %eax, %edx
subl 0x38(%r14), %edx
jb 0x109dd
incl %edx
movq %r12, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x10ce8
movl 0xc(%r15), %eax
movq (%r12), %rcx
movl %eax, %eax
cmpl $-0x1, (%rcx,%rax,4)
jne 0x10bf0
movl -0x2c(%rbp), %edx
movl %edx, (%rcx,%rax,4)
movq $-0x1, (%r13,%rbx,4)
movl $0xffffffff, 0x8(%r13,%rbx,4) # imm = 0xFFFFFFFF
jmp 0x10b27
cmpl $-0x1, (%r15)
jne 0x10bb2
movl 0xc(%r15), %ecx
cmpl 0x10(%r14), %ecx
jae 0x10c0f
movl %ecx, (%r13,%rbx,4)
movl 0xc(%r15), %eax
cmpl $0x2, %edx
je 0x10a70
cmpl $0x1, %edx
jne 0x10c2e
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 0x10a66
cmpl %ecx, (%r13,%rdx,4)
jne 0x10caa
movl %r12d, (%r13,%rdx,4)
movl %r12d, 0x8(%r13,%rax,4)
jmp 0x10b27
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 0x10a9d
cmpl %ecx, (%r13,%rdx,4)
jne 0x10cc9
movl %r12d, (%r13,%rdx,4)
movl %r12d, 0x4(%r13,%rax,4)
jmp 0x10b27
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 0x10c4d
movq 0x30(%r14), %rdi
movl %esi, %esi
cmpl %edx, (%rdi,%rsi,4)
jne 0x10c6c
leaq (%rdi,%rsi,4), %rsi
jmp 0x10af0
leaq (,%rcx,4), %rsi
addq %r13, %rsi
cmpl %edx, 0x8(%rsi)
jne 0x10c8b
addq $0x8, %rsi
movl %r12d, (%rsi)
cmpl $-0x1, %r12d
je 0x10afe
movl %ecx, (%r13,%rbx,4)
movl 0x4(%rax), %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %edx, 0x4(%r13,%rbx,4)
cmpq %rcx, %rdx
je 0x10b15
movl %r12d, (%r13,%rdx,4)
movl 0x8(%rax), %eax
movl %eax, 0x8(%r13,%rbx,4)
cmpq %rcx, %rax
je 0x10b27
movl %r12d, (%r13,%rax,4)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30bc0(%rip), %rdi     # 0x416fd
leaq 0x30be9(%rip), %rsi     # 0x4172d
leaq 0x30c00(%rip), %rcx     # 0x4174b
movl $0xfd, %edx
callq 0xb180
leaq 0x30e69(%rip), %rdi     # 0x419c5
leaq 0x30e81(%rip), %rsi     # 0x419e4
leaq 0x30e97(%rip), %rcx     # 0x41a01
movl $0x4b, %edx
callq 0xb180
leaq 0x30d0a(%rip), %rdi     # 0x41885
leaq 0x30bab(%rip), %rsi     # 0x4172d
leaq 0x30bc2(%rip), %rcx     # 0x4174b
movl $0x103, %edx            # imm = 0x103
callq 0xb180
leaq 0x30ceb(%rip), %rdi     # 0x41885
leaq 0x30b8c(%rip), %rsi     # 0x4172d
leaq 0x30ba3(%rip), %rcx     # 0x4174b
movl $0x110, %edx            # imm = 0x110
callq 0xb180
leaq 0x30d41(%rip), %rdi     # 0x418fa
leaq 0x30b6d(%rip), %rsi     # 0x4172d
leaq 0x30b84(%rip), %rcx     # 0x4174b
movl $0x11c, %edx            # imm = 0x11C
callq 0xb180
leaq 0x30cd5(%rip), %rdi     # 0x418ad
leaq 0x30b4e(%rip), %rsi     # 0x4172d
leaq 0x30b65(%rip), %rcx     # 0x4174b
movl $0x104, %edx            # imm = 0x104
callq 0xb180
leaq 0x30ce8(%rip), %rdi     # 0x418df
leaq 0x30b2f(%rip), %rsi     # 0x4172d
leaq 0x30b46(%rip), %rcx     # 0x4174b
movl $0x116, %edx            # imm = 0x116
callq 0xb180
leaq 0x30d16(%rip), %rdi     # 0x4192c
leaq 0x30b10(%rip), %rsi     # 0x4172d
leaq 0x30b27(%rip), %rcx     # 0x4174b
movl $0x11d, %edx            # imm = 0x11D
callq 0xb180
leaq 0x3706d(%rip), %rdi     # 0x47ca2
leaq 0x30af1(%rip), %rsi     # 0x4172d
leaq 0x30b08(%rip), %rcx     # 0x4174b
movl $0x131, %edx            # imm = 0x131
callq 0xb180
leaq 0x310cd(%rip), %rdi     # 0x41d21
leaq 0x30ad2(%rip), %rsi     # 0x4172d
leaq 0x30f7f(%rip), %rcx     # 0x41be1
movl $0xab, %edx
callq 0xb180
leaq 0x310d7(%rip), %rdi     # 0x41d4a
leaq 0x30ab3(%rip), %rsi     # 0x4172d
leaq 0x30f60(%rip), %rcx     # 0x41be1
movl $0xac, %edx
callq 0xb180
leaq 0x30f31(%rip), %rdi     # 0x41bc3
leaq 0x30a94(%rip), %rsi     # 0x4172d
leaq 0x30f41(%rip), %rcx     # 0x41be1
movl $0xa6, %edx
callq 0xb180
leaq 0x30ca0(%rip), %rdi     # 0x41951
leaq 0x30a75(%rip), %rsi     # 0x4172d
leaq 0x30a8c(%rip), %rcx     # 0x4174b
movl $0x124, %edx            # imm = 0x124
callq 0xb180
leaq 0x30cbb(%rip), %rdi     # 0x4198b
leaq 0x30a56(%rip), %rsi     # 0x4172d
leaq 0x30a6d(%rip), %rcx     # 0x4174b
movl $0x12c, %edx            # imm = 0x12C
callq 0xb180