// File: /workspace/github_c_makefile_star2_O3/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 $0x58, %rsp
movq %rdi, %r12
leaq -0x29(%rbp), %rsi
callq 0x5e66
testl %eax, %eax
jne 0x5d10
leaq -0x29(%rbp), %rbx
movq %r12, -0x68(%rbp)
cmpb $0x1, -0x29(%rbp)
jne 0x5d1f
movq (%r12), %rsi
movzwl 0x6(%rsi), %r13d
testl %r13d, %r13d
je 0x5cdc
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rdi
movq 0x38(%r12), %rcx
callq 0x427f
testq %rax, %rax
je 0x5d23
movq %rax, -0x38(%rbp)
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x44c1
testl %eax, %eax
jne 0x5d2a
movq (%r12), %r15
movzwl 0x4(%r15), %eax
movl %eax, -0x44(%rbp)
movzwl 0x2(%r15), %r14d
movl $0x1, %edi
movl $0x3c, %esi
callq 0x2140
movq %rax, %rbx
leal -0x1(%r13), %esi
movq (%r15), %rax
movq %rax, (%rbx)
movq %r15, -0x58(%rbp)
movl 0x8(%r15), %eax
movl %eax, 0x8(%rbx)
movw %si, 0x6(%rbx)
testl %r14d, %r14d
je 0x5be5
movq %r13, -0x70(%rbp)
movq %rbx, -0x50(%rbp)
leaq 0xc(%rbx), %r13
movl %esi, -0x3c(%rbp)
movl %esi, %eax
xorl %edi, %edi
movq $-0x1, -0x60(%rbp)
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
movl %r14d, -0x40(%rbp)
movl %r14d, %r15d
movq -0x38(%rbp), %rbx
movq 0x30(%r12), %rax
movq (%rax,%rsi), %rcx
movq 0x30(%rbx), %rdx
movq (%rdx,%rsi), %rdx
movq 0x8(%rdx), %rdx
cmpq 0x8(%rcx), %rdx
jne 0x5b70
leaq (%rax,%rsi), %rcx
movl %edi, %edx
addq 0x10(%rcx), %rdx
movq %rdx, -0x60(%rbp)
movq %rsi, %r14
movq 0x8(%rax,%rsi), %rsi
movzwl 0x2(%rsi), %eax
addl %eax, %edi
movl %edi, -0x38(%rbp)
cmpl -0x44(%rbp), %edi
ja 0x5d2e
addq $0xc, %rsi
shll $0x2, %eax
leaq (%rax,%rax,2), %r12
movq %r13, %rdi
movq %r12, %rdx
callq 0x2180
movq %rbx, %rdi
movl -0x3c(%rbp), %esi
leaq -0x78(%rbp), %rdx
leaq -0x2a(%rbp), %rcx
callq 0x5d86
movq %rbx, %rdi
testl %eax, %eax
jne 0x5cf1
callq 0x4492
movq -0x78(%rbp), %rbx
cmpb $0x1, -0x2a(%rbp)
je 0x5c01
addq %r12, %r13
decl %r15d
movq -0x68(%rbp), %r12
movl -0x38(%rbp), %edi
movq %r14, %rsi
jne 0x5b47
jmp 0x5c14
movq %r12, %rdi
movl $0x2, %edx
callq 0x435b
movq $-0x1, %r15
xorl %eax, %eax
movq -0x38(%rbp), %r14
jmp 0x5c64
testq %rbx, %rbx
je 0x5c0e
movq %rbx, %rdi
callq 0x4492
xorl %ebx, %ebx
movq -0x68(%rbp), %r12
movq %rbx, %r13
movq %r12, %rdi
movl -0x3c(%rbp), %esi
movl $0x2, %edx
callq 0x435b
movl -0x40(%rbp), %ebx
movq -0x58(%rbp), %rax
leaq 0x14(%rax), %r15
movl -0x4(%r15), %eax
movzwl (%r15), %esi
shlq $0x20, %rsi
orq %rax, %rsi
movq %r12, %rdi
callq *0x28(%r12)
addq $0xc, %r15
decq %rbx
jne 0x5c32
movq %r13, %r14
movq -0x70(%rbp), %r13
movq -0x50(%rbp), %rbx
movq -0x60(%rbp), %r15
movl -0x38(%rbp), %eax
movw %ax, 0x2(%rbx)
movups 0x10(%rbx), %xmm0
movups 0x20(%rbx), %xmm1
movups 0x2c(%rbx), %xmm2
movq -0x58(%rbp), %rcx
movups %xmm2, 0x2c(%rcx)
movups %xmm1, 0x20(%rcx)
movups %xmm0, 0x10(%rcx)
movzwl (%rbx), %eax
movw %ax, (%rcx)
movzwl 0x2(%rbx), %eax
movw %ax, 0x2(%rcx)
movq 0x4(%rbx), %rax
movq %rax, 0x4(%rcx)
movl 0xc(%rbx), %eax
movl %eax, 0xc(%rcx)
movq %r12, %rdi
callq 0x555b
cmpq $-0x1, %r15
je 0x5d4d
movq 0x30(%r12), %rax
movl %r13d, %ecx
leaq (%rcx,%rcx,2), %rcx
movq %r15, -0x8(%rax,%rcx,8)
movq %rbx, %rdi
callq 0x2030
testq %r14, %r14
leaq -0x29(%rbp), %rbx
je 0x5cdc
movq %r14, %rdi
callq 0x4492
movq %r12, %rdi
movq %rbx, %rsi
callq 0x5e66
testl %eax, %eax
je 0x5a83
jmp 0x5d10
movl %eax, %ebx
movq %rdi, -0x38(%rbp)
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x5d05
callq 0x2030
movq -0x38(%rbp), %rdi
callq 0x4492
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x5d10
movl $0xc, %eax
jmp 0x5d10
movl %eax, %ebx
jmp 0x5d05
leaq 0x1127(%rip), %rdi      # 0x6e5c
leaq 0xcaf(%rip), %rsi       # 0x69eb
leaq 0x1130(%rip), %rcx      # 0x6e73
movl $0x727, %edx            # imm = 0x727
callq 0x20c0
leaq 0x114f(%rip), %rdi      # 0x6ea3
leaq 0xc90(%rip), %rsi       # 0x69eb
leaq 0x1111(%rip), %rcx      # 0x6e73
movl $0x744, %edx            # imm = 0x744
callq 0x20c0