// File: 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_parent(unsigned int, unsigned int)
inline void _update_parent(const container_offset_t offset, const container_offset_t new_offset) {
            const container_offset_t* const p_item = _bti_item(this->data_, offset);
            const container_offset_t parent_offset = _bti_item_parent_offset(p_item);
            if (parent_offset != CONTAINER_END) {
                container_offset_t* const p_parent = _bti_item(this->data_, parent_offset);
                if (offset == _bti_item_right_offset(p_parent)) {
                    _bti_item_right_offset(p_parent) = new_offset;
                } else {
                    _assert_level_1(offset == _bti_item_left_offset(p_parent));
                    _bti_item_left_offset(p_parent) = new_offset;
                };
            } else {
                const container_offset_t instance_offset = instance_determiner(_bti_item_container_item(p_item));
                _assert_level_1(instance_offset < this->instances_.size_);
                _assert_level_1(this->instances_.data_[instance_offset] == offset);
                this->instances_.data_[instance_offset] = new_offset;
            };
            
            if (new_offset != CONTAINER_END) {
                _bti_parent_offset(this->data_, new_offset) = parent_offset;
            };
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq 0x8(%rax), %rax
movl -0xc(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
cmpl $-0x1, -0x1c(%rbp)
je 0x159c5
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x1c(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x15989
movl -0x10(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
jmp 0x159c0
movl -0xc(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jne 0x15997
jmp 0x159b6
leaq 0x48246(%rip), %rdi     # 0x5dbe4
leaq 0x47da9(%rip), %rsi     # 0x5d74e
movl $0xa6, %edx
leaq 0x48251(%rip), %rcx     # 0x5dc02
callq 0xd1c0
movl -0x10(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x15a47
movq -0x18(%rbp), %rdi
addq $0xc, %rdi
callq 0x157a0
movq -0x38(%rbp), %rcx
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl 0x38(%rcx), %eax
jae 0x159e3
jmp 0x15a02
leaq 0x48358(%rip), %rdi     # 0x5dd42
leaq 0x47d5d(%rip), %rsi     # 0x5d74e
movl $0xab, %edx
leaq 0x48205(%rip), %rcx     # 0x5dc02
callq 0xd1c0
movq -0x38(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x2c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
cmpl -0xc(%rbp), %eax
jne 0x15a17
jmp 0x15a36
leaq 0x4834d(%rip), %rdi     # 0x5dd6b
leaq 0x47d29(%rip), %rsi     # 0x5d74e
movl $0xac, %edx
leaq 0x481d1(%rip), %rcx     # 0x5dc02
callq 0xd1c0
movq -0x38(%rbp), %rax
movl -0x10(%rbp), %edx
movq 0x30(%rax), %rax
movl -0x2c(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
cmpl $-0x1, -0x10(%rbp)
je 0x15a5e
movq -0x38(%rbp), %rax
movl -0x1c(%rbp), %edx
movq 0x8(%rax), %rax
movl -0x10(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop