// File: /workspace/github_c_makefile_star2_O2/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 0x2232
movq %rsi, %rbx
movq 0x8(%rsi), %rax
testb $0x4, (%rax)
jne 0x2251
movq %rcx, %r14
movq %rdi, %r12
movq 0x8(%rax), %rax
movq 0x58(%rdi), %rcx
incq %rcx
cmpq %rcx, %rax
ja 0x2270
movq %r8, %r13
movq %rdx, %r15
xorl %ebp, %ebp
cmpq %rax, %rbp
ja 0x2213
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x1d30
cmpq %r15, %rax
je 0x214b
incq %rbp
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rax
jmp 0x2125
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 0x249f
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x2492
movq 0x8(%rbx), %rdx
movq 0x8(%rdx), %rax
movq 0x58(%r12), %rcx
cmpq %rcx, %rax
jbe 0x21ed
movl (%rdx), %ebp
testb $0x4, %bpl
jne 0x228f
incq %rcx
cmpq %rcx, %rax
jne 0x22ae
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1f24
movq %rax, %r13
testb $0x1, %bpl
jne 0x21db
movq %rbx, %rdi
callq 0x22cd
movq (%rsp), %r8
movq %r12, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x20df
jmp 0x21ed
movq (%rsp), %rsi
movq %r12, %rdi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x2070
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 0x151f(%rip), %rdi      # 0x3739
leaq 0xe04(%rip), %rsi       # 0x3025
leaq 0x14d6(%rip), %rcx      # 0x36fe
movl $0x2b3, %edx            # imm = 0x2B3
callq 0x10b0
leaq 0x13cf(%rip), %rdi      # 0x3608
leaq 0xde5(%rip), %rsi       # 0x3025
leaq 0x13c8(%rip), %rcx      # 0x360f
movl $0x32f, %edx            # imm = 0x32F
callq 0x10b0
leaq 0x140f(%rip), %rdi      # 0x3667
leaq 0xdc6(%rip), %rsi       # 0x3025
leaq 0x13a9(%rip), %rcx      # 0x360f
movl $0x330, %edx            # imm = 0x330
callq 0x10b0
leaq 0x1420(%rip), %rdi      # 0x3697
leaq 0xda7(%rip), %rsi       # 0x3025
leaq 0x138a(%rip), %rcx      # 0x360f
movl $0x331, %edx            # imm = 0x331
callq 0x10b0
leaq 0x143a(%rip), %rdi      # 0x36d0
leaq 0xd88(%rip), %rsi       # 0x3025
leaq 0x1497(%rip), %rcx      # 0x373b
movl $0x314, %edx            # imm = 0x314
callq 0x10b0
leaq 0x14b9(%rip), %rdi      # 0x376e
leaq 0xd69(%rip), %rsi       # 0x3025
leaq 0x1478(%rip), %rcx      # 0x373b
movl $0x315, %edx            # imm = 0x315
callq 0x10b0