// File: /workspace/github_cpp_makefile_star2_O3/vsklad[P]cgen/./bal/bal/linkedlistindex.hpp
// Function: bal::SimpleLinkedListsIndex<unsigned int>::append(unsigned int, unsigned int)
inline void append(const container_size_t instance_offset, const container_size_t container_offset) {
            if (instance_offset >= this->instances_.size_) {
                this->instances_.append(CONTAINER_END, instance_offset - this->instances_.size_ + 1);
                this->instances_last_.append(CONTAINER_END, instance_offset - instances_last_.size_ + 1);
            };
            
            this->reserve(1); // size_ is the valid offset for the new item
            this->data_[this->size_] = { CONTAINER_END, container_offset };
            if (this->instances_.data_[instance_offset] == CONTAINER_END) {
                // the instance list is empty
                assert(instances_last_.data_[instance_offset] == CONTAINER_END);
                this->instances_.data_[instance_offset] = this->size_;
            } else {
                // after the last item
                assert(instances_last_.data_[instance_offset] != CONTAINER_END);
                this->data_[instances_last_.data_[instance_offset]].next_offset = this->size_;
            }
            instances_last_.data_[instance_offset] = this->size_;
            this->size_++;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movl %esi, %r14d
movq %rdi, %rbx
movl 0x38(%rdi), %eax
cmpl %esi, %eax
ja 0x13f83
leaq 0x30(%rbx), %rdi
leal 0x1(%r14), %r12d
movl %r12d, %edx
subl %eax, %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x10ce8
leaq 0x60(%rbx), %rdi
subl 0x68(%rbx), %r12d
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl %r12d, %edx
callq 0x10ce8
movl 0x10(%rbx), %ecx
movl 0x20(%rbx), %edx
leal 0x1(%rcx), %r12d
cmpl %r12d, %edx
jae 0x13fcd
movl %edx, %eax
shrl %eax
addl %eax, %r12d
movq 0x8(%rbx), %rax
cmpl %r12d, %edx
je 0x1401b
testq %rax, %rax
je 0x13fd3
testl %r12d, %r12d
je 0x13ffc
movl %r12d, %esi
shlq $0x3, %rsi
movq %rax, %rdi
callq 0xb470
testq %rax, %rax
je 0x140a7
movq %rax, 0x8(%rbx)
movl 0x10(%rbx), %ecx
jmp 0x14017
movq 0x8(%rbx), %rax
jmp 0x1401b
testl %r12d, %r12d
je 0x1400c
movl %r12d, %edi
shlq $0x3, %rdi
callq 0xb380
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x140c6
movl $0x0, 0x10(%rbx)
xorl %ecx, %ecx
jmp 0x14017
movq %rax, %rdi
callq 0xb350
movq $0x0, 0x8(%rbx)
movl $0x0, 0x10(%rbx)
xorl %ecx, %ecx
xorl %eax, %eax
movl %r12d, 0x20(%rbx)
movl %ecx, %ecx
movl $0xffffffff, (%rax,%rcx,8) # imm = 0xFFFFFFFF
movl %r15d, 0x4(%rax,%rcx,8)
movq 0x30(%rbx), %rsi
movq 0x60(%rbx), %rcx
movl %r14d, %edx
cmpl $-0x1, (%rsi,%rdx,4)
movl (%rcx,%rdx,4), %edi
je 0x1404c
cmpl $-0x1, %edi
je 0x14069
movl 0x10(%rbx), %r8d
movl %r8d, (%rax,%rdi,8)
jmp 0x14059
cmpl $-0x1, %edi
jne 0x14088
movl 0x10(%rbx), %r8d
movl %r8d, (%rsi,%rdx,4)
movl %r8d, (%rcx,%rdx,4)
incl 0x10(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30553(%rip), %rdi     # 0x445c3
leaq 0x304a5(%rip), %rsi     # 0x4451c
leaq 0x304bc(%rip), %rcx     # 0x4453a
movl $0xbd, %edx
callq 0xb180
leaq 0x30455(%rip), %rdi     # 0x444e4
leaq 0x30486(%rip), %rsi     # 0x4451c
leaq 0x3049d(%rip), %rcx     # 0x4453a
movl $0xb9, %edx
callq 0xb180
leaq 0x2d1c9(%rip), %rdi     # 0x41277
leaq 0x2b6ee(%rip), %rsi     # 0x3f7a3
leaq 0x2e761(%rip), %rcx     # 0x4281d
movl $0x33, %edx
callq 0xb180
leaq 0x2b744(%rip), %rdi     # 0x3f811
leaq 0x2b6cf(%rip), %rsi     # 0x3f7a3
leaq 0x2e742(%rip), %rcx     # 0x4281d
movl $0x38, %edx
callq 0xb180
nop