// File: /workspace/github_cpp_makefile_star2_O1/UBOdin[P]jitd-cpp/include/jitd.hpp
// Function: JITD<Record, PureLocalPolicy<Record>>::insert(std::shared_ptr<std::vector<Record, std::allocator<Record>>>)
void insert(Buffer<Tuple> records)
    {
      // Create a template for the new root structure
      ConcatCog<Tuple> *newRootCog = new ConcatCog<Tuple>(
        nullptr,
        CogHandle<Tuple>(new CogHandleBase<Tuple>(CogPtr<Tuple>(
          new ArrayCog<Tuple>(records))))
      );
      // newRootCog->lhs is a placeholder for the current root object
      
      // Define a new root handle to swap in
      CogHandle<Tuple> newRoot = 
        CogHandle<Tuple>(new CogHandleBase<Tuple>(CogPtr<Tuple>(newRootCog)));
      
      // As one atomic operation, perform:
      //   newRootCog->lhs = root
      //   root = newRoot
      swapInNewRoot(newRoot, newRootCog->lhs);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r13
movq %rdi, %r14
movl $0x30, %edi
callq 0x4270
movq %rax, -0x30(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movl $0x10, %edi
callq 0x4270
movq %rax, %r15
movl $0x30, %edi
callq 0x4270
movq %rax, %r12
movq (%r13), %rax
movq %rax, -0x50(%rbp)
movq 0x8(%r13), %rax
movq %rax, -0x48(%rbp)
testq %rax, %rax
je 0xbb94
movq 0xd43a(%rip), %rcx      # 0x18fc0
cmpb $0x0, (%rcx)
je 0xbb90
incl 0x8(%rax)
jmp 0xbb94
lock
incl 0x8(%rax)
movb $0x1, %bl
leaq -0x50(%rbp), %rsi
movb $0x1, %r13b
movq %r12, %rdi
callq 0xcea8
leaq -0x58(%rbp), %rdi
movq %r12, -0x8(%rdi)
xorl %r13d, %r13d
movq %r12, %rsi
callq 0x723c
movq -0x60(%rbp), %rax
movq %rax, (%r15)
movq -0x58(%rbp), %rax
movq %rax, 0x8(%r15)
testq %rax, %rax
je 0xbbe1
movq 0xd3ed(%rip), %rcx      # 0x18fc0
cmpb $0x0, (%rcx)
je 0xbbdd
incl 0x8(%rax)
jmp 0xbbe1
lock
incl 0x8(%rax)
leaq -0x98(%rbp), %rdi
movq %r15, -0x8(%rdi)
movq %r15, %rsi
callq 0x731a
leaq -0x70(%rbp), %rsi
leaq -0xa0(%rbp), %rbx
movq -0x30(%rbp), %rdi
movq %rbx, %rdx
callq 0x6734
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xbc19
callq 0x6810
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xbc27
callq 0x6810
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0xbc35
callq 0x6810
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0xbc43
callq 0x6810
movl $0x10, %edi
callq 0x4270
movq %rax, %r15
leaq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq %rsi, -0x8(%rdi)
callq 0x8806
movq -0x40(%rbp), %rax
movq %rax, (%r15)
movq -0x38(%rbp), %rax
movq %rax, 0x8(%r15)
testq %rax, %rax
je 0xbc8a
movq 0xd344(%rip), %rcx      # 0x18fc0
cmpb $0x0, (%rcx)
je 0xbc86
incl 0x8(%rax)
jmp 0xbc8a
lock
incl 0x8(%rax)
leaq -0x78(%rbp), %rdi
movq %r15, -0x8(%rdi)
movq %r15, %rsi
callq 0x731a
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xbca8
callq 0x6810
movq -0x30(%rbp), %r13
leaq 0x10(%r13), %r15
addq $0x18, %r13
leaq 0x8(%r14), %r12
movq (%r14), %rax
movq %rax, (%r15)
movq %r13, %rdi
movq %r12, %rsi
callq 0xcefa
movq -0x80(%rbp), %rax
movq -0x78(%rbp), %rcx
testq %rcx, %rcx
je 0xbceb
movq 0xd2e3(%rip), %rdx      # 0x18fc0
cmpb $0x0, (%rdx)
je 0xbce7
incl 0x8(%rcx)
jmp 0xbceb
lock
incl 0x8(%rcx)
movq %rax, -0x90(%rbp)
movq %rcx, -0x88(%rbp)
movq %r14, %rdi
movq %r15, %rsi
leaq -0x90(%rbp), %rdx
movl $0x5, %ecx
movl $0x5, %r8d
callq 0xcf40
movl %eax, %ebx
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0xbd29
callq 0x6810
testb %bl, %bl
je 0xbcb8
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0xbd3b
callq 0x6810
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xbd5b
callq 0x6810
xorl %eax, %eax
jmp 0xbd64
movq %rax, %r14
movb $0x1, %al
testb %al, %al
je 0xbde6
movl $0x10, %esi
movq %r15, %rdi
jmp 0xbde1
movq %rax, %r14
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xbd83
callq 0x6810
xorl %r13d, %r13d
xorl %ebx, %ebx
jmp 0xbd99
movq %rax, %r14
movb $0x1, %bl
jmp 0xbdb9
movq %rax, %r14
jmp 0xbdca
movq %rax, %r14
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0xbda7
callq 0x6810
testb %r13b, %r13b
je 0xbdb9
movl $0x30, %esi
movq %r12, %rdi
callq 0x4280
testb %bl, %bl
je 0xbdca
movl $0x10, %esi
movq %r15, %rdi
callq 0x4280
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0xbdd8
callq 0x6810
movl $0x30, %esi
movq -0x30(%rbp), %rdi
callq 0x4280
movq %r14, %rdi
callq 0x4400