// File: /workspace/github_c_makefile_star2_O3/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, %r14
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x30(%rdi), %rax
movzwl 0x6(%rcx), %r12d
leaq 0x1(%r12), %r13
addq $0x8, %rax
xorl %ecx, %ecx
movq (%rax), %rdx
movzwl 0x2(%rdx), %esi
cmpw 0x4(%rdx), %si
jb 0x47a8
incq %rcx
addq $0x18, %rax
cmpq %rcx, %r13
jne 0x478d
jmp 0x47b4
testq %rcx, %rcx
je 0x4b3e
movl %ecx, %r13d
movslq %r13d, %rdi
shlq $0x3, %rdi
callq 0x21c0
testq %rax, %rax
je 0x4b61
movq %rax, %r15
movq %r13, -0x88(%rbp)
movq %r12, -0x48(%rbp)
xorl %r12d, %r12d
movzwl %r12w, %eax
leaq (%r15,%rax,8), %rsi
movq %rbx, %rdi
callq *0x20(%rbx)
testl %eax, %eax
jne 0x4b69
incl %r12d
movzwl %r12w, %eax
cmpl %eax, -0x88(%rbp)
ja 0x47da
movq %r15, -0x40(%rbp)
movq %r14, -0x90(%rbp)
xorl %edi, %edi
xorl %r14d, %r14d
movq -0x48(%rbp), %r13
movq %rbx, -0x98(%rbp)
movzwl %r14w, %edx
movq -0x40(%rbp), %r15
movq (%r15,%rdx,8), %rsi
cmpl %edi, %r13d
movq %r13, -0x48(%rbp)
movq %rdi, -0x80(%rbp)
movq %r14, -0x78(%rbp)
movq %rdx, -0x60(%rbp)
jle 0x4955
movq (%rbx), %rax
cmpw 0x6(%rax), %r14w
je 0x4bb4
movq 0x10(%rbx), %rdi
movq 0x30(%rbx), %rax
leaq (%rdx,%rdx,2), %rcx
movq 0x10(%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq %rbx, %r15
movq %rdx, %rbx
leaq -0x2c(%rbp), %rdx
callq 0x2777
movl -0x2c(%rbp), %r13d
testl %r13d, %r13d
jne 0x4b6e
movq 0x30(%r15), %rdx
leal (,%rbx,8), %ecx
leaq (%rcx,%rcx,2), %rcx
movq %rcx, -0x58(%rbp)
movq 0x8(%rdx,%rcx), %rsi
movq %r14, %rdx
movq 0x18(%rax), %r14
leaq 0xc(%r14), %rdi
movzwl 0x2(%rsi), %ecx
movl %ecx, %r13d
shrl %r13d
subl %r13d, %ecx
movw $0xf30a, (%r14)         # imm = 0xF30A
movw %dx, 0x6(%r14)
movw $0x4, 0x4(%r14)
movl $0x0, 0x8(%r14)
movw %r13w, 0x2(%rsi)
movw %cx, 0x2(%r14)
leaq (,%r13,2), %rdx
addq %r13, %rdx
leaq (%rsi,%rdx,4), %rbx
addq $0xc, %rbx
movzwl %cx, %ecx
shll $0x2, %ecx
leaq (%rcx,%rcx,2), %r15
movq %rax, -0x50(%rbp)
movq %rdi, -0xa0(%rbp)
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2180
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x20d0
movq -0x98(%rbp), %rbx
movq 0x30(%rbx), %rax
movq -0x58(%rbp), %rcx
movq (%rax,%rcx), %rdi
callq 0x27b8
movq -0x50(%rbp), %rdi
callq 0x27b8
movq -0x38(%rbp), %r15
subq %r13, %r15
jge 0x4a2d
movq -0xa0(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x48(%rbp), %r13
jmp 0x4a80
movq 0x10(%rbx), %rdi
leaq -0x2c(%rbp), %rdx
callq 0x2777
movl -0x2c(%rbp), %r13d
testl %r13d, %r13d
jne 0x4b7a
movq (%rbx), %r15
movq %r14, %r13
movq 0x18(%rax), %r14
leaq 0xc(%r15), %rsi
movq %rsi, -0x58(%rbp)
movq %rax, -0x50(%rbp)
leaq 0xc(%r14), %rdi
movzwl 0x2(%r15), %eax
movw $0xf30a, (%r14)         # imm = 0xF30A
movw %r13w, 0x6(%r14)
movw $0x4, 0x4(%r14)
movl $0x0, 0x8(%r14)
movw %ax, 0x2(%r14)
shll $0x2, %eax
leaq (%rax,%rax,2), %rdx
movq %rdx, -0x38(%rbp)
callq 0x2180
leal 0x1(%r13), %eax
movw %ax, 0x6(%r15)
movw $0x0, 0x2(%r15)
movq -0x58(%rbp), %rdi
xorl %esi, %esi
movq -0x38(%rbp), %rdx
callq 0x20d0
movq %rbx, %rdi
callq *0x18(%rbx)
movq -0x50(%rbp), %rdi
callq 0x27b8
movq 0x30(%rbx), %rax
movq -0x60(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rax,%rcx,8), %r15
movq %rbx, %rdi
callq 0x555b
testl %eax, %eax
jne 0x4b73
movq -0x48(%rbp), %r13
incl %r13d
movq 0x30(%rbx), %rax
leaq (,%r13,2), %rcx
addq %r13, %rcx
movq $0x0, 0x10(%rax,%rcx,8)
jmp 0x4a31
movq -0x48(%rbp), %r13
movl 0xc(%r14), %eax
cmpq $-0x1, %r15
movl %eax, -0x38(%rbp)
je 0x4a80
movq %rbx, %rdi
movq -0x80(%rbp), %rsi
movl $0x1, %edx
callq 0x435b
movq 0x30(%rbx), %rax
movq -0x60(%rbp), %rdx
leaq (%rdx,%rdx,2), %rcx
cmpq $0x0, 0x8(%rax,%rcx,8)
jne 0x4bd3
leaq (%rax,%rcx,8), %rax
movq -0x50(%rbp), %rcx
movq %rcx, (%rax)
movq %r14, 0x8(%rax)
movq %r15, 0x10(%rax)
movq -0x78(%rbp), %r14
jmp 0x4a98
movq -0x50(%rbp), %rdi
callq 0x27a8
movq $-0x1, %r15
movq -0x78(%rbp), %r14
movq -0x60(%rbp), %rdx
testw %r14w, %r14w
je 0x4adb
movw $0x0, -0x66(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0x70(%rbp)
movq -0x40(%rbp), %rax
movq -0x8(%rax,%rdx,8), %rax
movl %eax, -0x6c(%rbp)
shrq $0x20, %rax
movw %ax, -0x68(%rbp)
xorl %ecx, %ecx
cmpq $-0x1, -0xa8(%rbp)
setne %cl
movq %rbx, %rdi
movq -0x80(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x4bf2
incl %r14d
movzwl %r14w, %edi
movl -0x38(%rbp), %eax
movl %eax, -0x64(%rbp)
movq %r15, -0xa8(%rbp)
cmpl %edi, -0x88(%rbp)
ja 0x481a
xorl %ecx, %ecx
cmpq $-0x1, %r15
setne %cl
leaq -0x70(%rbp), %rdx
movw $0x0, 0xa(%rdx)
movl %eax, (%rdx)
movq -0x40(%rbp), %r14
movq -0x8(%r14,%rdi,8), %rax
movl %eax, 0x4(%rdx)
shrq $0x20, %rax
movw %ax, 0x8(%rdx)
movq %rdi, %rsi
movq %rbx, %rdi
callq 0x4bf2
movq %r14, %rdi
callq 0x2030
movq -0x90(%rbp), %r14
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
movl $0x1, %ecx
callq 0x4bf2
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4d52
jmp 0x4b9f
movl $0xc, %r13d
jmp 0x4b9f
movl %eax, %r13d
jmp 0x4b7a
movq %r15, %rbx
jmp 0x4b76
movl %eax, %r13d
movq -0x40(%rbp), %r15
testw %r12w, %r12w
je 0x4b97
movzwl %r12w, %r14d
decq %r14
movq (%r15,%r14,8), %rsi
movq %rbx, %rdi
callq *0x28(%rbx)
addq $-0x1, %r14
jb 0x4b87
movq %r15, %rdi
callq 0x2030
movl %r13d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1fd9(%rip), %rdi      # 0x6b94
leaq 0x1e29(%rip), %rsi      # 0x69eb
leaq 0x1fef(%rip), %rcx      # 0x6bb8
movl $0x34d, %edx            # imm = 0x34D
callq 0x20c0
leaq 0x1df6(%rip), %rdi      # 0x69d0
leaq 0x1e0a(%rip), %rsi      # 0x69eb
leaq 0x1e0d(%rip), %rcx      # 0x69f5
movl $0x23f, %edx            # imm = 0x23F
callq 0x20c0