// File: /workspace/github_c_makefile_star2_O2/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_ext_insert
int
ext4_ext_insert(struct ext4_ext_cursor *cur, struct ext4_extent *next)
{
	int ret;

	ret = ext4_ext_ensure_unfull(cur);
	if (ret)
		return ret;

	ext4_ext_insert_item(cur, 0, (union ext4_extent_item *)next, true);
	ext4_ext_update_index(cur, 0, 0);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x30(%rdi), %rax
movzwl 0x6(%rcx), %ecx
movq %rcx, -0x60(%rbp)
leaq 0x1(%rcx), %r13
addq $0x8, %rax
xorl %ecx, %ecx
cmpq %rcx, %r13
je 0x456c
movq (%rax), %rdx
movzwl 0x2(%rdx), %esi
cmpw 0x4(%rdx), %si
jb 0x4560
incq %rcx
addq $0x18, %rax
jmp 0x4545
testq %rcx, %rcx
je 0x48d5
movl %ecx, %r13d
movslq %r13d, %rdi
shlq $0x3, %rdi
callq 0x21c0
testq %rax, %rax
je 0x45b8
movq %rax, %r12
movq %r14, -0xa8(%rbp)
xorl %r15d, %r15d
movq %r13, -0x88(%rbp)
movzwl %r15w, %r14d
cmpl %r14d, %r13d
jle 0x45c1
leaq (%r12,%r14,8), %rsi
movq %rbx, %rdi
callq *0x20(%rbx)
testl %eax, %eax
jne 0x486b
incl %r15d
movq -0x88(%rbp), %r13
jmp 0x4591
pushq $0xc
popq %r13
jmp 0x48f4
xorl %ecx, %ecx
movq %r12, -0x50(%rbp)
movzwl %cx, %r15d
cmpl %r15d, %r13d
jle 0x4870
movq (%r12,%r15,8), %rsi
cmpl %r15d, -0x60(%rbp)
movq %rcx, -0x40(%rbp)
movq %r15, -0x68(%rbp)
jle 0x46e5
movq (%rbx), %rax
cmpw 0x6(%rax), %cx
je 0x4909
movq 0x10(%rbx), %rdi
movq 0x30(%rbx), %rax
imulq $0x18, %r15, %r15
movq 0x10(%rax,%r15), %r12
leaq -0x2c(%rbp), %rdx
callq 0x26d8
movl -0x2c(%rbp), %r13d
testl %r13d, %r13d
jne 0x48ab
movq 0x30(%rbx), %rcx
movq 0x8(%rcx,%r15), %rsi
movq %r15, -0x58(%rbp)
movq 0x18(%rax), %r15
movq %rax, -0x38(%rbp)
leaq 0xc(%r15), %rdi
movzwl 0x2(%rsi), %ecx
movl %ecx, %r13d
movw $0xf30a, (%r15)         # imm = 0xF30A
movq -0x40(%rbp), %rdx
movw %dx, 0x6(%r15)
movw $0x4, 0x4(%r15)
andl $0x0, 0x8(%r15)
shrl %r13d
subl %r13d, %ecx
movw %r13w, 0x2(%rsi)
movw %cx, 0x2(%r15)
imulq $0xc, %r13, %rdx
addq %rdx, %rsi
addq $0xc, %rsi
movq %rsi, -0xb0(%rbp)
movzwl %cx, %eax
imulq $0xc, %rax, %rdx
movq %rdx, -0xb8(%rbp)
callq 0x2180
movq -0xb0(%rbp), %rdi
xorl %esi, %esi
movq -0xb8(%rbp), %rdx
callq 0x20d0
movq 0x30(%rbx), %rax
movq -0x58(%rbp), %rcx
movq (%rax,%rcx), %rdi
callq 0x2710
movq -0x38(%rbp), %rdi
callq 0x2710
subq %r13, %r12
pushq $-0x1
popq %rax
cmovlq %rax, %r12
movq -0x38(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq %r15, -0x98(%rbp)
movq %r12, -0x90(%rbp)
jmp 0x47c7
movq 0x10(%rbx), %rdi
leaq -0x2c(%rbp), %rdx
callq 0x26d8
movl -0x2c(%rbp), %r13d
testl %r13d, %r13d
jne 0x48bb
movq (%rbx), %r12
movq 0x18(%rax), %r15
movq %rax, -0x38(%rbp)
movzwl 0x2(%r12), %eax
movw $0xf30a, (%r15)         # imm = 0xF30A
movq -0x40(%rbp), %rcx
movw %cx, 0x6(%r15)
movw $0x4, 0x4(%r15)
andl $0x0, 0x8(%r15)
leaq 0xc(%r12), %rsi
movq %rsi, -0x58(%rbp)
leaq 0xc(%r15), %rdi
movw %ax, 0x2(%r15)
imulq $0xc, %rax, %r13
movq %r13, %rdx
callq 0x2180
movq -0x40(%rbp), %rax
incl %eax
movw %ax, 0x6(%r12)
andw $0x0, 0x2(%r12)
movq -0x58(%rbp), %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x20d0
movq %rbx, %rdi
callq *0x18(%rbx)
movq -0x38(%rbp), %r13
movq %r13, %rdi
callq 0x2710
movq 0x30(%rbx), %rax
imulq $0x18, -0x68(%rbp), %rcx
movq 0x10(%rax,%rcx), %r12
movq %r13, -0xa0(%rbp)
movq %r15, -0x98(%rbp)
movq %r12, -0x90(%rbp)
movq %rbx, %rdi
callq 0x525f
testl %eax, %eax
jne 0x48a8
movq -0x60(%rbp), %rcx
incl %ecx
movq 0x30(%rbx), %rax
movq %rcx, -0x60(%rbp)
imulq $0x18, %rcx, %rcx
andq $0x0, 0x10(%rax,%rcx)
movl 0xc(%r15), %r15d
cmpq $-0x1, %r12
movq -0x88(%rbp), %r13
je 0x4806
movq %rbx, %rdi
movl %r15d, -0x38(%rbp)
movq -0x68(%rbp), %r15
movl %r15d, %esi
pushq $0x1
popq %rdx
callq 0x417f
movq %rbx, %rdi
movl %r15d, %esi
movl -0x38(%rbp), %r15d
leaq -0xa0(%rbp), %rdx
callq 0x4227
jmp 0x4812
leaq -0xa0(%rbp), %rdi
callq 0x41f5
movq -0x40(%rbp), %rcx
testw %cx, %cx
je 0x4858
andw $0x0, -0x6a(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x74(%rbp)
movq -0x50(%rbp), %rax
movq -0x68(%rbp), %rsi
movq -0x8(%rax,%rsi,8), %rax
movl %eax, -0x70(%rbp)
shrq $0x20, %rax
movw %ax, -0x6c(%rbp)
xorl %ecx, %ecx
cmpq $-0x1, -0x80(%rbp)
setne %cl
movq %rbx, %rdi
leaq -0x74(%rbp), %rdx
callq 0x4928
movq -0x40(%rbp), %rcx
incl %ecx
movq %r12, -0x80(%rbp)
movl %r15d, -0x44(%rbp)
movq -0x50(%rbp), %r12
jmp 0x45c7
movl %eax, %r13d
jmp 0x48bb
leaq -0x74(%rbp), %rdx
andw $0x0, 0xa(%rdx)
movl -0x44(%rbp), %eax
movl %eax, (%rdx)
movq -0x8(%r12,%r15,8), %rax
movl %eax, 0x4(%rdx)
shrq $0x20, %rax
movw %ax, 0x8(%rdx)
xorl %ecx, %ecx
cmpq $-0x1, -0x80(%rbp)
setne %cl
movq %rbx, %rdi
movl %r15d, %esi
callq 0x4928
xorl %r13d, %r13d
jmp 0x48c1
movl %eax, %r13d
movq -0x50(%rbp), %r12
jmp 0x48bb
movq (%r12,%r14,8), %rsi
movq %rbx, %rdi
callq *0x28(%rbx)
subq $0x1, %r14
jae 0x48b1
movq %r12, %rdi
callq 0x2030
testl %r13d, %r13d
movq -0xa8(%rbp), %r14
jne 0x48f4
xorl %r13d, %r13d
pushq $0x1
popq %rcx
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x4928
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4a98
movl %r13d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2274(%rip), %rdi      # 0x6b84
leaq 0x20c4(%rip), %rsi      # 0x69db
leaq 0x228a(%rip), %rcx      # 0x6ba8
movl $0x34d, %edx            # imm = 0x34D
callq 0x20c0