// File: /workspace/github_c_makefile_star2_O1/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_ext_tree_shrink
static int
ext4_ext_tree_shrink(struct ext4_ext_cursor *cur)
{
	int ret;
	bool shrinkable;

	ret = ext4_ext_shrinkable(cur, &shrinkable);
	if (ret)
		return ret;

	while (shrinkable) {
		ret = __ext4_ext_shrink(cur);
		if (ret)
			break;

		ret = ext4_ext_shrinkable(cur, &shrinkable);
		if (ret)
			break;
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r15
leaq -0x29(%rbp), %rsi
callq 0x628f
testl %eax, %eax
je 0x5e5f
movl %eax, %r12d
movl %r12d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x29(%rbp), %rbx
cmpb $0x1, -0x29(%rbp)
jne 0x6148
movq (%r15), %rsi
movzwl 0x6(%rsi), %r13d
testl %r13d, %r13d
je 0x5eae
movq 0x8(%r15), %rdx
movq 0x10(%r15), %rdi
movq 0x38(%r15), %rcx
callq 0x4377
testq %rax, %rax
je 0x5ebc
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x45c1
testl %eax, %eax
je 0x5ec7
movl %eax, %r12d
xorl %r13d, %r13d
jmp 0x6103
xorl %r13d, %r13d
xorl %r14d, %r14d
xorl %r12d, %r12d
jmp 0x6103
movl $0xc, %r12d
jmp 0x611d
movq (%r15), %rbx
movzwl 0x4(%rbx), %eax
movl %eax, -0x5c(%rbp)
movzwl 0x2(%rbx), %r12d
movl $0x1, %edi
movl $0x3c, %esi
callq 0x2140
movq %rbx, -0x80(%rbp)
movq %r13, -0x78(%rbp)
leal -0x1(%r13), %edx
movq %rax, %rcx
movq (%rbx), %rax
movq %rax, (%rcx)
movl 0x8(%rbx), %eax
movq %r12, %rbx
movl %eax, 0x8(%rcx)
movw %dx, 0x6(%rcx)
testl %ebx, %ebx
movq %rcx, -0x68(%rbp)
movl %edx, -0x3c(%rbp)
je 0x6037
movq %r15, -0x48(%rbp)
movq %rcx, %r15
addq $0xc, %r15
movl %edx, %eax
xorl %r13d, %r13d
movq $-0x1, -0x58(%rbp)
shlq $0x3, %rax
movq %rax, -0x88(%rbp)
movq %rbx, -0x70(%rbp)
movq -0x48(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x88(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx), %rdx
movq 0x30(%r14), %rsi
movq (%rsi,%rcx), %rsi
movq 0x8(%rsi), %rsi
cmpq 0x8(%rdx), %rsi
jne 0x5f75
leaq (%rax,%rcx), %rdx
movl %r13d, %esi
addq 0x10(%rdx), %rsi
movq %rsi, -0x58(%rbp)
movq 0x8(%rax,%rcx), %rsi
movzwl 0x2(%rsi), %eax
addl %eax, %r13d
cmpl -0x5c(%rbp), %r13d
ja 0x6150
addq $0xc, %rsi
shll $0x2, %eax
leaq (%rax,%rax,2), %rdx
movq %r15, %rdi
movq %rdx, -0x50(%rbp)
callq 0x2180
movq %r14, %rdi
movl -0x3c(%rbp), %esi
leaq -0x90(%rbp), %rdx
leaq -0x2a(%rbp), %rcx
callq 0x61a8
movl %eax, %r12d
movq %r14, %rdi
movl $0x2, %r14d
testl %eax, %eax
jne 0x5ff7
callq 0x4592
xorl %r14d, %r14d
movq -0x90(%rbp), %rdi
cmpb $0x1, -0x2a(%rbp)
jne 0x5ff7
movl $0x3, %r14d
testq %rdi, %rdi
je 0x5fed
callq 0x4592
movq $0x0, -0x38(%rbp)
jmp 0x5ffb
movq %rdi, -0x38(%rbp)
testl %r14d, %r14d
jne 0x6012
addq -0x50(%rbp), %r15
decl %ebx
movq -0x38(%rbp), %r14
jne 0x5f3d
jmp 0x604f
cmpl $0x1, %r14d
je 0x613e
cmpl $0x2, %r14d
movq -0x38(%rbp), %r14
jne 0x604f
movq -0x48(%rbp), %r15
leaq -0x29(%rbp), %rbx
movq -0x68(%rbp), %r13
jmp 0x6103
movq %r14, -0x38(%rbp)
xorl %r13d, %r13d
movq $-0x1, -0x58(%rbp)
movl $0x0, -0x50(%rbp)
jmp 0x605b
movl %r12d, -0x50(%rbp)
movq -0x48(%rbp), %r15
movq -0x70(%rbp), %rbx
movq %r15, %rdi
movl -0x3c(%rbp), %esi
movl $0x2, %edx
callq 0x445b
testl %ebx, %ebx
movq -0x80(%rbp), %r12
je 0x609f
shll $0x2, %ebx
leaq (%rbx,%rbx,2), %rbx
xorl %r14d, %r14d
movl 0x10(%r12,%r14), %eax
movzwl 0x14(%r12,%r14), %esi
shlq $0x20, %rsi
orq %rax, %rsi
movq %r15, %rdi
callq *0x28(%r15)
addq $0xc, %r14
cmpq %r14, %rbx
jne 0x607d
movq -0x68(%rbp), %rax
movw %r13w, 0x2(%rax)
movq %rax, %r13
movups 0x10(%rax), %xmm0
movups 0x20(%rax), %xmm1
movups 0x2c(%rax), %xmm2
movups %xmm2, 0x2c(%r12)
movups %xmm1, 0x20(%r12)
movups %xmm0, 0x10(%r12)
movups (%rax), %xmm0
movups %xmm0, (%r12)
movq %r15, %rdi
callq 0x5829
movq -0x58(%rbp), %rdx
cmpq $-0x1, %rdx
je 0x616f
movq 0x30(%r15), %rax
movl -0x78(%rbp), %ecx
leaq (%rcx,%rcx,2), %rcx
movq %rdx, -0x8(%rax,%rcx,8)
leaq -0x29(%rbp), %rbx
movq -0x38(%rbp), %r14
movl -0x50(%rbp), %r12d
testq %r13, %r13
je 0x6110
movq %r13, %rdi
callq 0x2030
testq %r14, %r14
je 0x611d
movq %r14, %rdi
callq 0x4592
testl %r12d, %r12d
jne 0x5e4d
movq %r15, %rdi
movq %rbx, %rsi
callq 0x628f
testl %eax, %eax
je 0x5e63
jmp 0x5e4a
movq -0x48(%rbp), %r15
leaq -0x29(%rbp), %rbx
jmp 0x611d
xorl %r12d, %r12d
jmp 0x5e4d
leaq 0x1d1e(%rip), %rdi      # 0x7e75
leaq 0x18a5(%rip), %rsi      # 0x7a03
leaq 0x1d27(%rip), %rcx      # 0x7e8c
movl $0x727, %edx            # imm = 0x727
callq 0x20c0
leaq 0x1d46(%rip), %rdi      # 0x7ebc
leaq 0x1886(%rip), %rsi      # 0x7a03
leaq 0x1d08(%rip), %rcx      # 0x7e8c
movl $0x744, %edx            # imm = 0x744
callq 0x20c0