// File: /workspace/github_c_makefile_star2_O1/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 $0x88, %rsp
movq %rsi, %r13
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x30(%rdi), %rax
movzwl 0x6(%rcx), %r15d
leaq 0x1(%r15), %r14
addq $0x8, %rax
xorl %ecx, %ecx
movq (%rax), %rdx
movzwl 0x2(%rdx), %esi
cmpw 0x4(%rdx), %si
jb 0x48b9
incq %rcx
addq $0x18, %rax
cmpq %rcx, %r14
jne 0x489e
jmp 0x48bc
movl %ecx, %r14d
testl %r14d, %r14d
je 0x4c9f
movslq %r14d, %rdi
shlq $0x3, %rdi
callq 0x21c0
movl $0x2, %r12d
movq %rax, -0x58(%rbp)
testq %rax, %rax
je 0x4cae
movq %r14, %rax
movl $0x0, %r14d
movq %rax, -0xa0(%rbp)
testl %eax, %eax
jle 0x4928
xorl %r14d, %r14d
movzwl %r14w, %eax
movq -0x58(%rbp), %rcx
leaq (%rcx,%rax,8), %rsi
movq %rbx, %rdi
callq *0x20(%rbx)
movl %r14d, %ecx
testl %eax, %eax
jne 0x4d0c
incl %ecx
movzwl %cx, %eax
cmpl %eax, -0xa0(%rbp)
movl %ecx, %r14d
jg 0x48fb
movl %r14d, -0x34(%rbp)
movq %r13, -0x90(%rbp)
xorl %r13d, %r13d
xorl %edi, %edi
movzwl %r13w, %r12d
movq -0x58(%rbp), %rax
movq (%rax,%r12,8), %rsi
cmpl %edi, %r15d
movq %r15, -0x60(%rbp)
movq %rdi, -0x98(%rbp)
jle 0x4a6d
movq (%rbx), %rax
cmpw 0x6(%rax), %r13w
je 0x4d86
movq 0x10(%rbx), %rdi
movq 0x30(%rbx), %rax
leaq (%r12,%r12,2), %rcx
movq 0x10(%rax,%rcx,8), %r15
leaq -0x3c(%rbp), %rdx
callq 0x281f
movl -0x3c(%rbp), %r14d
testl %r14d, %r14d
jne 0x4a59
movq 0x30(%rbx), %rdx
leal (,%r12,8), %ecx
leaq (%rcx,%rcx,2), %rcx
movq %rcx, -0x68(%rbp)
movq 0x8(%rdx,%rcx), %r8
movq 0x18(%rax), %rsi
movq %rax, -0x48(%rbp)
leaq 0xc(%rsi), %rdi
movzwl 0x2(%r8), %ecx
movq %r15, -0x30(%rbp)
movl %ecx, %r15d
shrl %r15d
subl %r15d, %ecx
movw $0xf30a, (%rsi)         # imm = 0xF30A
movw %r13w, 0x6(%rsi)
movw $0x4, 0x4(%rsi)
movl $0x0, 0x8(%rsi)
movw %r15w, 0x2(%r8)
movq %rsi, -0x70(%rbp)
movw %cx, 0x2(%rsi)
leaq (%r15,%r15,2), %rdx
leaq (%r8,%rdx,4), %rsi
addq $0xc, %rsi
movq %rsi, -0xa8(%rbp)
movzwl %cx, %eax
shll $0x2, %eax
movq %r12, -0x50(%rbp)
leaq (%rax,%rax,2), %r12
movq %r12, %rdx
callq 0x2180
xorl %r14d, %r14d
movq -0xa8(%rbp), %rdi
xorl %esi, %esi
movq %r12, %rdx
movq -0x50(%rbp), %r12
callq 0x20d0
movq 0x30(%rbx), %rax
movq -0x68(%rbp), %rcx
movq (%rax,%rcx), %rdi
callq 0x2863
movq -0x48(%rbp), %rdi
callq 0x2863
movq -0x30(%rbp), %rcx
subq %r15, %rcx
movq $-0x1, %rax
cmovlq %rax, %rcx
movq %rcx, -0x30(%rbp)
testl %r14d, %r14d
je 0x4b49
movl $0x2, %r12d
jmp 0x4b41
movq %r12, -0x50(%rbp)
movq 0x10(%rbx), %rdi
leaq -0x3c(%rbp), %rdx
callq 0x281f
movl -0x3c(%rbp), %r14d
testl %r14d, %r14d
jne 0x4b20
movq %rax, %r12
movq (%rbx), %r14
movq 0x18(%rax), %rdx
leaq 0xc(%r14), %rsi
movq %rsi, -0x30(%rbp)
leaq 0xc(%rdx), %rdi
movzwl 0x2(%r14), %eax
movw $0xf30a, (%rdx)         # imm = 0xF30A
movw %r13w, 0x6(%rdx)
movw $0x4, 0x4(%rdx)
movl $0x0, 0x8(%rdx)
movq %rdx, -0x70(%rbp)
movw %ax, 0x2(%rdx)
shll $0x2, %eax
leaq (%rax,%rax,2), %r15
movq %r15, %rdx
callq 0x2180
leal 0x1(%r13), %eax
movw %ax, 0x6(%r14)
movw $0x0, 0x2(%r14)
xorl %r14d, %r14d
movq -0x30(%rbp), %rdi
xorl %esi, %esi
movq %r15, %rdx
movq -0x60(%rbp), %r15
callq 0x20d0
movq %rbx, %rdi
callq *0x18(%rbx)
movq %r12, %rdi
callq 0x2863
movq 0x30(%rbx), %rax
movq -0x50(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq %r12, -0x48(%rbp)
movl $0x2, %r12d
testl %r14d, %r14d
jne 0x4b41
incl %r15d
movq %rbx, %rdi
callq 0x5829
testl %eax, %eax
je 0x4b57
movl %eax, %r14d
movq %r15, -0x60(%rbp)
xorl %r15d, %r15d
jmp 0x4c3b
movq %r12, -0x50(%rbp)
movq -0x30(%rbp), %r12
movq -0x60(%rbp), %r15
jmp 0x4b6f
movq 0x30(%rbx), %rax
movl %r15d, %ecx
leaq (%rcx,%rcx,2), %rcx
movq $0x0, 0x10(%rax,%rcx,8)
movq -0x30(%rbp), %r12
movq -0x70(%rbp), %r14
movl 0xc(%r14), %eax
cmpq $-0x1, %r12
movq %r15, -0x60(%rbp)
movl %eax, -0x68(%rbp)
je 0x4bc5
movq %rbx, %rdi
movq -0x98(%rbp), %rsi
movl $0x1, %edx
callq 0x445b
movq 0x30(%rbx), %rax
movq -0x50(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
cmpq $0x0, 0x8(%rax,%rcx,8)
jne 0x4da5
leaq (%rax,%rcx,8), %rax
movq -0x48(%rbp), %rcx
movq %rcx, (%rax)
movq %r14, 0x8(%rax)
movq %r12, 0x10(%rax)
jmp 0x4bce
testq %r14, %r14
jne 0x4c5d
movq %r12, -0x30(%rbp)
movb $0x1, %r15b
xorl %r14d, %r14d
testw %r13w, %r13w
je 0x4c2b
movq $0x0, -0x80(%rbp)
movl $0x0, -0x78(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x80(%rbp)
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
movq -0x8(%rax,%rcx,8), %rax
movl %eax, -0x7c(%rbp)
shrq $0x20, %rax
movw %ax, -0x78(%rbp)
xorl %ecx, %ecx
cmpq $-0x1, -0x88(%rbp)
setne %cl
movq %rbx, %rdi
movq -0x98(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x4dc4
movq %r12, -0x88(%rbp)
movl -0x68(%rbp), %eax
movl %eax, -0x38(%rbp)
xorl %r12d, %r12d
testb %r15b, %r15b
je 0x4d03
incl %r13d
movzwl %r13w, %edi
cmpl %edi, -0xa0(%rbp)
movq -0x60(%rbp), %r15
ja 0x4938
jmp 0x4cbd
cmpq $0x0, -0x48(%rbp)
jne 0x4c79
movq $0x0, -0x70(%rbp)
movq $0x0, -0x30(%rbp)
jmp 0x4bd2
movq -0x48(%rbp), %rdi
callq 0x2853
movq $0x0, -0x70(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x48(%rbp)
jmp 0x4bd2
xorl %r12d, %r12d
movl $0x0, -0x34(%rbp)
xorl %r14d, %r14d
jmp 0x4d1c
movl $0xc, %r14d
movl $0x0, -0x34(%rbp)
jmp 0x4d12
xorl %ecx, %ecx
cmpq $-0x1, -0x88(%rbp)
setne %cl
leaq -0x80(%rbp), %rdx
movq $0x0, (%rdx)
movl $0x0, 0x8(%rdx)
movl -0x38(%rbp), %eax
movl %eax, (%rdx)
movq -0x58(%rbp), %rax
movq -0x8(%rax,%rdi,8), %rax
movl %eax, 0x4(%rdx)
shrq $0x20, %rax
movw %ax, 0x8(%rdx)
movq %rdi, %rsi
movq %rbx, %rdi
callq 0x4dc4
xorl %r12d, %r12d
movq -0x90(%rbp), %r13
jmp 0x4d12
movl %eax, %r14d
movl %ecx, -0x34(%rbp)
testb $0x1, %r12b
movq -0x58(%rbp), %r12
jne 0x4d4b
testq %r12, %r12
je 0x4d4b
testl %r14d, %r14d
je 0x4d41
movzwl -0x34(%rbp), %eax
testl %eax, %eax
je 0x4d41
movl %eax, %r15d
movq -0x8(%r12,%r15,8), %rsi
movq %rbx, %rdi
callq *0x28(%rbx)
decq %r15
jne 0x4d31
movq %r12, %rdi
callq 0x2030
jmp 0x4d4b
testl %r14d, %r14d
jne 0x4d71
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
movq %r13, %rdx
movl $0x1, %ecx
callq 0x4dc4
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4f25
movl %r14d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2e20(%rip), %rdi      # 0x7bad
leaq 0x2c6f(%rip), %rsi      # 0x7a03
leaq 0x2e36(%rip), %rcx      # 0x7bd1
movl $0x34d, %edx            # imm = 0x34D
callq 0x20c0
leaq 0x2c3c(%rip), %rdi      # 0x79e8
leaq 0x2c50(%rip), %rsi      # 0x7a03
leaq 0x2c53(%rip), %rcx      # 0x7a0d
movl $0x23f, %edx            # imm = 0x23F
callq 0x20c0