// File: /workspace/github_c_makefile_star2_O1/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 0x2315
movq %rsi, %rbx
movq 0x8(%rsi), %rax
testb $0x4, (%rax)
jne 0x2334
movq %rcx, %r14
movq %rdi, %r12
movq 0x58(%rdi), %rcx
incq %rcx
cmpq %rcx, 0x8(%rax)
ja 0x2353
movq %r8, %r13
movq %rdx, %r15
xorl %ebp, %ebp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x1dd1
cmpq %r15, %rax
je 0x223f
incq %rbp
movq 0x8(%rbx), %rax
cmpq 0x8(%rax), %rbp
jbe 0x2203
leaq 0x1512(%rip), %rdi      # 0x3739
leaq 0xdf7(%rip), %rsi       # 0x3025
leaq 0x14c9(%rip), %rcx      # 0x36fe
movl $0x2b3, %edx            # imm = 0x2B3
callq 0x10b0
movq 0x8(%rbx), %rdi
movq %rbp, %rsi
callq 0x124c
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0x2552
movq 0x8(%rbx), %rax
incq 0x8(%rax)
movq %rbx, %rdi
callq 0x12b9
movq 0x8(%rbx), %rdx
movq 0x8(%rdx), %rax
movq 0x58(%r12), %rcx
cmpq %rcx, %rax
jbe 0x22ef
movl (%rdx), %ebp
testb $0x4, %bpl
jne 0x2372
incq %rcx
cmpq %rcx, %rax
jne 0x2391
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1fcb
movq %rax, %r13
testb $0x1, %bpl
jne 0x22c7
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rsi
testq %rsi, %rsi
je 0x22db
movq (%rbx), %rdi
callq 0x25a5
movq %rax, %rsi
jmp 0x22dd
movq (%rsp), %rsi
movq %r12, %rdi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x2151
jmp 0x22ef
xorl %esi, %esi
movq (%rsp), %r8
movq %r12, %rdi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x21c0
movq %r15, %rdi
callq 0x12b9
movq %r14, %rdi
callq 0x12b9
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x12b9
leaq 0x12ec(%rip), %rdi      # 0x3608
leaq 0xd02(%rip), %rsi       # 0x3025
leaq 0x12e5(%rip), %rcx      # 0x360f
movl $0x32f, %edx            # imm = 0x32F
callq 0x10b0
leaq 0x132c(%rip), %rdi      # 0x3667
leaq 0xce3(%rip), %rsi       # 0x3025
leaq 0x12c6(%rip), %rcx      # 0x360f
movl $0x330, %edx            # imm = 0x330
callq 0x10b0
leaq 0x133d(%rip), %rdi      # 0x3697
leaq 0xcc4(%rip), %rsi       # 0x3025
leaq 0x12a7(%rip), %rcx      # 0x360f
movl $0x331, %edx            # imm = 0x331
callq 0x10b0
leaq 0x1357(%rip), %rdi      # 0x36d0
leaq 0xca5(%rip), %rsi       # 0x3025
leaq 0x13b4(%rip), %rcx      # 0x373b
movl $0x314, %edx            # imm = 0x314
callq 0x10b0
leaq 0x13d6(%rip), %rdi      # 0x376e
leaq 0xc86(%rip), %rsi       # 0x3025
leaq 0x1395(%rip), %rcx      # 0x373b
movl $0x315, %edx            # imm = 0x315
callq 0x10b0