// File: /workspace/github_c_makefile_star2_O3/CkTD[P]btree/btree.c
// Function: bt_node_none_leaf_insert
static void bt_node_none_leaf_insert(BTree * bt, BTreeNode *parent, BTreeNode *left, BTreeNode *new, uint64_t key)
{
    uint64_t index;

    assert(parent);
    assert(!(bt_node_get_type(parent) & BT_NODE_TYPE_LEAF));
    assert(bt_node_get_key_count(parent) <= bt_get_max_keys(bt) + 1);

    index = bt_node_get_child_index(parent, left);
    bt_node_none_leaf_make_space(parent, index);
    bt_node_set_key_and_link(parent, index, key, left, new);
    bt_node_set_key_count(parent, bt_node_get_key_count(parent) + 1);
    if (bt_node_get_key_count(parent) > bt_get_max_keys(bt))
        bt_node_none_leaf_split(bt, parent);

    bt_node_marked_dirty(left);
    bt_node_marked_dirty(new);
    bt_node_marked_dirty(parent);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x2350
movq %rsi, %rbx
movq 0x8(%rsi), %rax
testb $0x4, (%rax)
jne 0x236f
movq %rcx, %r14
movq %rdi, %r12
movq 0x58(%rdi), %rcx
incq %rcx
cmpq %rcx, 0x8(%rax)
ja 0x238e
movq %r8, %r13
movq %rdx, %r15
xorl %ebp, %ebp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x1e0d
cmpq %r15, %rax
je 0x227a
incq %rbp
movq 0x8(%rbx), %rax
cmpq 0x8(%rax), %rbp
jbe 0x223e
leaq 0x14d7(%rip), %rdi      # 0x3739
leaq 0xdbc(%rip), %rsi       # 0x3025
leaq 0x148e(%rip), %rcx      # 0x36fe
movl $0x2b3, %edx            # imm = 0x2B3
callq 0x10b0
movq 0x8(%rbx), %rdi
movq %rbp, %rsi
callq 0x125c
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0x259a
movq 0x8(%rbx), %rax
incq 0x8(%rax)
movq %rbx, %rdi
callq 0x12c9
movq 0x8(%rbx), %rdx
movq 0x8(%rdx), %rax
movq 0x58(%r12), %rcx
cmpq %rcx, %rax
jbe 0x232a
movl (%rdx), %ebp
testb $0x4, %bpl
jne 0x23ad
incq %rcx
cmpq %rcx, %rax
jne 0x23cc
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2006
movq %rax, %r13
testb $0x1, %bpl
jne 0x2302
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rsi
testq %rsi, %rsi
je 0x2316
movq (%rbx), %rdi
callq 0x25ed
movq %rax, %rsi
jmp 0x2318
movq (%rsp), %rsi
movq %r12, %rdi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x218c
jmp 0x232a
xorl %esi, %esi
movq (%rsp), %r8
movq %r12, %rdi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x21fb
movq %r15, %rdi
callq 0x12c9
movq %r14, %rdi
callq 0x12c9
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x12c9
leaq 0x12b1(%rip), %rdi      # 0x3608
leaq 0xcc7(%rip), %rsi       # 0x3025
leaq 0x12aa(%rip), %rcx      # 0x360f
movl $0x32f, %edx            # imm = 0x32F
callq 0x10b0
leaq 0x12f1(%rip), %rdi      # 0x3667
leaq 0xca8(%rip), %rsi       # 0x3025
leaq 0x128b(%rip), %rcx      # 0x360f
movl $0x330, %edx            # imm = 0x330
callq 0x10b0
leaq 0x1302(%rip), %rdi      # 0x3697
leaq 0xc89(%rip), %rsi       # 0x3025
leaq 0x126c(%rip), %rcx      # 0x360f
movl $0x331, %edx            # imm = 0x331
callq 0x10b0
leaq 0x131c(%rip), %rdi      # 0x36d0
leaq 0xc6a(%rip), %rsi       # 0x3025
leaq 0x1379(%rip), %rcx      # 0x373b
movl $0x314, %edx            # imm = 0x314
callq 0x10b0
leaq 0x139b(%rip), %rdi      # 0x376e
leaq 0xc4b(%rip), %rsi       # 0x3025
leaq 0x135a(%rip), %rcx      # 0x373b
movl $0x315, %edx            # imm = 0x315
callq 0x10b0