	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_resize_volume              ## -- Begin function ubi_resize_volume
	.p2align	4, 0x90
_ubi_resize_volume:                     ## @ubi_resize_volume
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	movq	56(%rbx), %r14
	cmpq	$0, 40(%r14)
	je	LBB0_5
## %bb.1:
	movq	_EROFS@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r12d, %r12d
LBB0_3:
	subl	(%rax), %r12d
LBB0_4:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	%esi, %r15d
	movslq	(%rbx), %r13
	movl	32(%r14), %esi
	movl	4(%rbx), %ecx
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %edx
	movl	%r15d, %r8d
	callq	_dbg_gen
	movq	8(%rbx), %rax
	movq	_UBI_STATIC_VOLUME@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.6:
	movl	16(%rbx), %edx
	cmpl	%r15d, %edx
	jle	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_dbg_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_8:
	xorl	%r12d, %r12d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	cmpl	%r15d, 4(%rbx)
	je	LBB0_4
## %bb.9:
	leal	(,%r15,4), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movq	%r15, %rbx
	movq	%rax, %r15
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jle	LBB0_30
## %bb.11:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, %eax
	cmpl	$8, %ecx
	jb	LBB0_12
## %bb.14:
	movq	_UBI_LEB_UNMAPPED@GOTPCREL(%rip), %r8
	leaq	4(%r8), %rcx
	cmpq	%rcx, %r15
	jae	LBB0_17
## %bb.15:
	leaq	(%r15,%rax,4), %rcx
	cmpq	_UBI_LEB_UNMAPPED@GOTPCREL(%rip), %rcx
	jbe	LBB0_17
LBB0_12:
	xorl	%ecx, %ecx
LBB0_24:
	movq	%rcx, %r8
	notq	%r8
	addq	%rax, %r8
	movq	%rax, %rsi
	andq	$3, %rsi
	je	LBB0_27
## %bb.25:
	movq	_UBI_LEB_UNMAPPED@GOTPCREL(%rip), %rdi
	.p2align	4, 0x90
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdi), %edx
	movl	%edx, (%r15,%rcx,4)
	incq	%rcx
	decq	%rsi
	jne	LBB0_26
LBB0_27:
	cmpq	$3, %r8
	jb	LBB0_30
## %bb.28:
	movq	_UBI_LEB_UNMAPPED@GOTPCREL(%rip), %rdx
	.p2align	4, 0x90
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdx), %esi
	movl	%esi, (%r15,%rcx,4)
	movl	(%rdx), %esi
	movl	%esi, 4(%r15,%rcx,4)
	movl	(%rdx), %esi
	movl	%esi, 8(%r15,%rcx,4)
	movl	(%rdx), %esi
	movl	%esi, 12(%r15,%rcx,4)
	addq	$4, %rcx
	cmpq	%rcx, %rax
	jne	LBB0_29
	jmp	LBB0_30
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_17:
	movl	%eax, %ecx
	andl	$-8, %ecx
	leaq	-8(%rcx), %rdx
	movq	%rdx, %rsi
	shrq	$3, %rsi
	incq	%rsi
	testq	%rdx, %rdx
	je	LBB0_20
## %bb.18:
	movabsq	$4611686018427387900, %rdx      ## imm = 0x3FFFFFFFFFFFFFFC
	orq	$2, %rdx
	andq	%rsi, %rdx
	movd	(%r8), %xmm0                    ## xmm0 = mem[0],zero,zero,zero
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movdqu	%xmm0, (%r15,%rdi,4)
	movdqu	%xmm0, 16(%r15,%rdi,4)
	movdqu	%xmm0, 32(%r15,%rdi,4)
	movdqu	%xmm0, 48(%r15,%rdi,4)
	addq	$16, %rdi
	addq	$-2, %rdx
	jne	LBB0_19
	jmp	LBB0_21
LBB0_20:
	xorl	%edi, %edi
LBB0_21:
	testb	$1, %sil
	je	LBB0_23
## %bb.22:
	movd	(%r8), %xmm0                    ## xmm0 = mem[0],zero,zero,zero
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movdqu	%xmm0, (%r15,%rdi,4)
	movdqu	%xmm0, 16(%r15,%rdi,4)
LBB0_23:
	cmpq	%rax, %rcx
	jne	LBB0_24
LBB0_30:
	leaq	16(%r14), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	movl	20(%r12), %r13d
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_spin_unlock
	cmpl	$2, %r13d
	jl	LBB0_32
## %bb.31:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_42
LBB0_32:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %r13d
	subl	4(%r12), %r13d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	jle	LBB0_39
## %bb.33:
	movl	%r13d, %ebx
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_spin_lock
	movl	(%r14), %edx
	movl	%edx, %eax
	subl	%ebx, %eax
	jge	LBB0_35
## %bb.34:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_dbg_err
	movq	%r13, %rdi
	callq	_spin_unlock
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_42
LBB0_35:
	movl	%eax, (%r14)
	addl	%ebx, 4(%r14)
	cmpl	$0, 4(%r12)
	movq	24(%r12), %rdi
	movl	%ebx, %r13d
	jle	LBB0_38
## %bb.36:
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_37:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdi,%rax,4), %ecx
	movl	%ecx, (%r15,%rax,4)
	incq	%rax
	movslq	4(%r12), %rcx
	cmpq	%rcx, %rax
	jl	LBB0_37
LBB0_38:
	callq	_kfree
	movq	%r15, 24(%r12)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	movq	-72(%rbp), %rax                 ## 8-byte Reload
LBB0_39:
	leaq	(,%rax,4), %rsi
	addq	24(%r14), %rsi
	leaq	-80(%rbp), %r12
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_memcpy
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_be32
	movl	%eax, -80(%rbp)
	movq	%r14, %rbx
	movq	%r14, %rdi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movl	%r14d, %esi
	movq	%r12, %rdx
	callq	_ubi_change_vtbl_record
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_43
## %bb.40:
	testl	%r13d, %r13d
	jle	LBB0_42
LBB0_41:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_spin_lock
	subl	%r13d, 4(%rbx)
	addl	%r13d, (%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock
LBB0_42:
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_4
LBB0_43:
	testl	%r13d, %r13d
	movq	%rbx, %r12
	jns	LBB0_67
## %bb.44:
	movl	%r13d, %eax
	negl	%eax
	cmpl	$2, %eax
	movl	$1, %ecx
	cmovgel	%eax, %ecx
	movl	%ecx, -84(%rbp)                 ## 4-byte Spill
	xorl	%r14d, %r14d
LBB0_45:                                ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%r14), %edx
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_ubi_eba_unmap_leb
	testl	%eax, %eax
	jne	LBB0_55
## %bb.46:                              ##   in Loop: Header=BB0_45 Depth=1
	incl	%r14d
	cmpl	%r14d, -84(%rbp)                ## 4-byte Folded Reload
	movq	%rbx, %r12
	jne	LBB0_45
## %bb.47:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_spin_lock
	movl	4(%r12), %eax
	addl	%r13d, %eax
	movl	%eax, 4(%r12)
	movl	(%r12), %edx
	movl	8(%r12), %esi
	subl	%r13d, %edx
	movl	%edx, (%r12)
	movl	12(%r12), %ecx
	subl	%ecx, %esi
	jle	LBB0_50
## %bb.48:
	cmpl	%esi, %edx
	cmovll	%edx, %esi
	subl	%esi, %edx
	movl	%edx, (%r12)
	addl	%esi, %eax
	movl	%eax, 4(%r12)
	addl	%esi, %ecx
	movl	%ecx, 12(%r12)
	testl	%esi, %esi
	jle	LBB0_50
## %bb.49:
	leaq	L_.str.3(%rip), %rdi
	callq	_ubi_msg
LBB0_50:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	24(%rax), %rdi
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	jle	LBB0_66
## %bb.51:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %r8d
	xorl	%ecx, %ecx
	cmpl	$8, %eax
	jb	LBB0_62
## %bb.52:
	movq	%r15, %rax
	subq	%rdi, %rax
	cmpq	$32, %rax
	jb	LBB0_62
## %bb.53:
	movl	%r8d, %ecx
	andl	$-8, %ecx
	leaq	-8(%rcx), %rax
	movq	%rax, %rsi
	shrq	$3, %rsi
	incq	%rsi
	movl	%esi, %r9d
	andl	$3, %r9d
	cmpq	$24, %rax
	jae	LBB0_56
## %bb.54:
	xorl	%eax, %eax
	jmp	LBB0_58
LBB0_55:
	movl	%eax, %r12d
	testl	%r13d, %r13d
	jg	LBB0_41
	jmp	LBB0_42
LBB0_56:
	andq	$-4, %rsi
	xorl	%eax, %eax
LBB0_57:                                ## =>This Inner Loop Header: Depth=1
	movups	(%rdi,%rax,4), %xmm0
	movups	16(%rdi,%rax,4), %xmm1
	movups	%xmm0, (%r15,%rax,4)
	movups	%xmm1, 16(%r15,%rax,4)
	movups	32(%rdi,%rax,4), %xmm0
	movups	48(%rdi,%rax,4), %xmm1
	movups	%xmm0, 32(%r15,%rax,4)
	movups	%xmm1, 48(%r15,%rax,4)
	movups	64(%rdi,%rax,4), %xmm0
	movups	80(%rdi,%rax,4), %xmm1
	movups	%xmm0, 64(%r15,%rax,4)
	movups	%xmm1, 80(%r15,%rax,4)
	movdqu	96(%rdi,%rax,4), %xmm0
	movups	112(%rdi,%rax,4), %xmm1
	movdqu	%xmm0, 96(%r15,%rax,4)
	movups	%xmm1, 112(%r15,%rax,4)
	addq	$32, %rax
	addq	$-4, %rsi
	jne	LBB0_57
LBB0_58:
	testq	%r9, %r9
	je	LBB0_61
## %bb.59:
	leaq	(%r15,%rax,4), %rsi
	addq	$16, %rsi
	leaq	(%rdi,%rax,4), %rax
	addq	$16, %rax
	shlq	$5, %r9
	xorl	%edx, %edx
LBB0_60:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rax,%rdx), %xmm0
	movups	(%rax,%rdx), %xmm1
	movdqu	%xmm0, -16(%rsi,%rdx)
	movups	%xmm1, (%rsi,%rdx)
	addq	$32, %rdx
	cmpq	%rdx, %r9
	jne	LBB0_60
LBB0_61:
	cmpq	%r8, %rcx
	je	LBB0_66
LBB0_62:
	movq	%rcx, %rax
	notq	%rax
	addq	%r8, %rax
	movq	%r8, %rdx
	andq	$3, %rdx
	je	LBB0_64
LBB0_63:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdi,%rcx,4), %esi
	movl	%esi, (%r15,%rcx,4)
	incq	%rcx
	decq	%rdx
	jne	LBB0_63
LBB0_64:
	cmpq	$3, %rax
	jb	LBB0_66
LBB0_65:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdi,%rcx,4), %eax
	movl	%eax, (%r15,%rcx,4)
	movl	4(%rdi,%rcx,4), %eax
	movl	%eax, 4(%r15,%rcx,4)
	movl	8(%rdi,%rcx,4), %eax
	movl	%eax, 8(%r15,%rcx,4)
	movl	12(%rdi,%rcx,4), %eax
	movl	%eax, 12(%r15,%rcx,4)
	addq	$4, %rcx
	cmpq	%rcx, %r8
	jne	LBB0_65
LBB0_66:
	callq	_kfree
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, 24(%rax)
	movq	%rbx, %rdi
	callq	_spin_unlock
LBB0_67:
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, 4(%rsi)
	movq	8(%rsi), %rax
	movq	_UBI_DYNAMIC_VOLUME@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_69
## %bb.68:
	movl	%r13d, 16(%rsi)
	movq	40(%rsi), %rax
	movq	%rax, 32(%rsi)
	movslq	%r13d, %rcx
	imulq	%rax, %rcx
	movq	%rcx, 48(%rsi)
LBB0_69:
	movq	_UBI_VOLUME_RESIZED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_ubi_volume_notify
	movq	%r12, %rdi
	callq	_paranoid_check_volumes
	testq	%rax, %rax
	movl	$0, %r12d
	je	LBB0_4
## %bb.70:
	leaq	L_.str.4(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_dbg_err
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_EROFS,4,2                      ## @EROFS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"re-size device %d, volume %d to from %d to %d PEBs"

	.comm	_UBI_STATIC_VOLUME,8,3          ## @UBI_STATIC_VOLUME
L_.str.1:                               ## @.str.1
	.asciz	"too small size %d, %d LEBs contain data"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_UBI_LEB_UNMAPPED,4,2           ## @UBI_LEB_UNMAPPED
	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.2:                               ## @.str.2
	.asciz	"not enough PEBs: requested %d, available %d"

	.comm	_ENOSPC,4,2                     ## @ENOSPC
L_.str.3:                               ## @.str.3
	.asciz	"reserve more %d PEBs"

	.comm	_UBI_DYNAMIC_VOLUME,8,3         ## @UBI_DYNAMIC_VOLUME
	.comm	_UBI_VOLUME_RESIZED,4,2         ## @UBI_VOLUME_RESIZED
L_.str.4:                               ## @.str.4
	.asciz	"check failed while re-sizing volume %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_resize_volume              ; -- Begin function ubi_resize_volume
	.p2align	2
_ubi_resize_volume:                     ; @ubi_resize_volume
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x22, [x0]
	ldr	x19, [x22, #56]
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _EROFS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EROFS@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w26, w8
LBB0_3:
	mov	x0, x26
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_4:
	mov	x21, x1
	ldr	w1, [x19, #32]
	ldp	w20, w3, [x22]
                                        ; kill: def $w20 killed $w20 def $x20
	sxtw	x20, w20
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	mov	x4, x21
	bl	_dbg_gen
	ldr	x8, [x22, #8]
Lloh4:
	adrp	x9, _UBI_STATIC_VOLUME@GOTPAGE
Lloh5:
	ldr	x9, [x9, _UBI_STATIC_VOLUME@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
	ldr	w8, [x22, #16]
	cmp	w8, w21
	b.le	LBB0_7
; %bb.6:
	str	x8, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_dbg_err
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_2
LBB0_7:
	ldr	w8, [x22, #4]
	cmp	w8, w21
	b.ne	LBB0_9
LBB0_8:
	mov	w26, #0
	b	LBB0_3
LBB0_9:
	lsl	w0, w21, #2
Lloh11:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_16
; %bb.10:
	mov	x23, x0
	cmp	w21, #1
	b.lt	LBB0_20
; %bb.11:
	mov	w9, w21
Lloh14:
	adrp	x8, _UBI_LEB_UNMAPPED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _UBI_LEB_UNMAPPED@GOTPAGEOFF]
	cmp	w21, #16
	b.lo	LBB0_17
; %bb.12:
	add	x10, x23, x9, lsl #2
	add	x11, x8, #4
	cmp	x23, x11
	ccmp	x10, x8, #0, lo
	b.hi	LBB0_17
; %bb.13:
	and	x10, x9, #0xfffffff0
	ld1r.4s	{ v0 }, [x8]
	add	x11, x23, #32
	mov	x12, x10
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	stp	q0, q0, [x11, #-32]
	stp	q0, q0, [x11], #64
	subs	x12, x12, #16
	b.ne	LBB0_14
; %bb.15:
	cmp	x10, x9
	b.ne	LBB0_18
	b	LBB0_20
LBB0_16:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
LBB0_17:
	mov	x10, #0
LBB0_18:
	add	x11, x23, x10, lsl #2
	sub	x9, x9, x10
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x8]
	str	w10, [x11], #4
	subs	x9, x9, #1
	b.ne	LBB0_19
LBB0_20:
	add	x24, x19, #16
	mov	x0, x24
	bl	_spin_lock
	ldr	w25, [x22, #20]
	mov	x0, x24
	bl	_spin_unlock
	cmp	w25, #1
	b.le	LBB0_22
; %bb.21:
Lloh18:
	adrp	x8, _EBUSY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_25
LBB0_22:
	ldr	w8, [x22, #4]
	sub	w25, w21, w8
	cmp	w25, #1
	b.lt	LBB0_31
; %bb.23:
	mov	x0, x24
	bl	_spin_lock
	ldr	w8, [x19]
	subs	w9, w8, w25
	b.ge	LBB0_27
; %bb.24:
	str	x8, [sp]
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x25
	bl	_dbg_err
	mov	x0, x24
	bl	_spin_unlock
Lloh22:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
LBB0_25:
	ldr	w8, [x8]
	neg	w26, w8
LBB0_26:
	mov	x0, x23
	bl	_kfree
	b	LBB0_3
LBB0_27:
	ldr	w8, [x19, #4]
	add	w8, w8, w25
	stp	w9, w8, [x19]
	ldr	w8, [x22, #4]
	ldr	x0, [x22, #24]
	cmp	w8, #1
	b.lt	LBB0_30
; %bb.28:
	mov	x8, #0
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	lsl	x9, x8, #2
	ldr	w10, [x0, x9]
	str	w10, [x23, x9]
	add	x8, x8, #1
	ldrsw	x9, [x22, #4]
	cmp	x8, x9
	b.lt	LBB0_29
LBB0_30:
	bl	_kfree
	str	x23, [x22, #24]
	mov	x0, x24
	bl	_spin_unlock
LBB0_31:
	ldr	x8, [x19, #24]
	add	x1, x8, x20, lsl #2
	add	x0, sp, #8
	mov	w2, #4
	bl	_memcpy
	mov	x0, x21
	bl	_cpu_to_be32
	str	w0, [sp, #8]
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	_ubi_change_vtbl_record
	mov	x26, x0
	cbz	w0, LBB0_34
; %bb.32:
	cmp	w25, #1
	b.lt	LBB0_26
LBB0_33:
	mov	x0, x24
	bl	_spin_lock
	ldp	w9, w8, [x19]
	sub	w8, w8, w25
	add	w9, w9, w25
	stp	w9, w8, [x19]
	mov	x0, x24
	bl	_spin_unlock
	b	LBB0_26
LBB0_34:
	tbz	w25, #31, LBB0_50
; %bb.35:
	mov	w27, #0
	neg	w8, w25
	cmp	w8, #1
	mov	w8, #1
	csneg	w28, w8, w25, le
LBB0_36:                                ; =>This Inner Loop Header: Depth=1
	add	w2, w21, w27
	mov	x0, x19
	mov	x1, x22
	bl	_ubi_eba_unmap_leb
	cbnz	w0, LBB0_54
; %bb.37:                               ;   in Loop: Header=BB0_36 Depth=1
	add	w27, w27, #1
	cmp	w28, w27
	b.ne	LBB0_36
; %bb.38:
	mov	x0, x24
	bl	_spin_lock
	ldp	w9, w8, [x19]
	add	w8, w8, w25
	sub	w10, w9, w25
	stp	w10, w8, [x19]
	ldp	w11, w9, [x19, #8]
	sub	w11, w11, w9
	cmp	w11, #1
	b.lt	LBB0_41
; %bb.39:
	cmp	w10, w11
	csel	w1, w10, w11, lt
	sub	w10, w10, w1
	add	w8, w1, w8
	stp	w10, w8, [x19]
	add	w8, w1, w9
	str	w8, [x19, #12]
	cmp	w1, #1
	b.lt	LBB0_41
; %bb.40:
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_ubi_msg
LBB0_41:
	ldr	x0, [x22, #24]
	cmp	w21, #1
	b.lt	LBB0_49
; %bb.42:
	mov	x9, #0
	mov	w8, w21
	cmp	w21, #16
	b.lo	LBB0_47
; %bb.43:
	sub	x10, x23, x0
	cmp	x10, #64
	b.lo	LBB0_47
; %bb.44:
	and	x9, x8, #0xfffffff0
	add	x10, x23, #32
	add	x11, x0, #32
	mov	x12, x9
LBB0_45:                                ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x11, #-32]
	ldp	q2, q3, [x11], #64
	stp	q0, q1, [x10, #-32]
	stp	q2, q3, [x10], #64
	subs	x12, x12, #16
	b.ne	LBB0_45
; %bb.46:
	cmp	x9, x8
	b.eq	LBB0_49
LBB0_47:
	lsl	x11, x9, #2
	add	x10, x23, x11
	add	x11, x0, x11
	sub	x8, x8, x9
LBB0_48:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x11], #4
	str	w9, [x10], #4
	subs	x8, x8, #1
	b.ne	LBB0_48
LBB0_49:
	bl	_kfree
	str	x23, [x22, #24]
	mov	x0, x24
	bl	_spin_unlock
LBB0_50:
	str	w21, [x22, #4]
	ldr	x8, [x22, #8]
Lloh26:
	adrp	x9, _UBI_DYNAMIC_VOLUME@GOTPAGE
Lloh27:
	ldr	x9, [x9, _UBI_DYNAMIC_VOLUME@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_52
; %bb.51:
	str	w21, [x22, #16]
	ldr	x8, [x22, #40]
	str	x8, [x22, #32]
	sxtw	x9, w21
	mul	x8, x8, x9
	str	x8, [x22, #48]
LBB0_52:
Lloh29:
	adrp	x8, _UBI_VOLUME_RESIZED@GOTPAGE
Lloh30:
	ldr	x8, [x8, _UBI_VOLUME_RESIZED@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x22
	bl	_ubi_volume_notify
	mov	x0, x19
	bl	_paranoid_check_volumes
	cbz	x0, LBB0_8
; %bb.53:
Lloh32:
	adrp	x0, l_.str.4@PAGE
Lloh33:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x20
	bl	_dbg_err
	b	LBB0_8
LBB0_54:
	mov	x26, x0
	cmp	w25, #1
	b.ge	LBB0_33
	b	LBB0_26
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_EROFS,4,2                      ; @EROFS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"re-size device %d, volume %d to from %d to %d PEBs"

	.comm	_UBI_STATIC_VOLUME,8,3          ; @UBI_STATIC_VOLUME
l_.str.1:                               ; @.str.1
	.asciz	"too small size %d, %d LEBs contain data"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_UBI_LEB_UNMAPPED,4,2           ; @UBI_LEB_UNMAPPED
	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.2:                               ; @.str.2
	.asciz	"not enough PEBs: requested %d, available %d"

	.comm	_ENOSPC,4,2                     ; @ENOSPC
l_.str.3:                               ; @.str.3
	.asciz	"reserve more %d PEBs"

	.comm	_UBI_DYNAMIC_VOLUME,8,3         ; @UBI_DYNAMIC_VOLUME
	.comm	_UBI_VOLUME_RESIZED,4,2         ; @UBI_VOLUME_RESIZED
l_.str.4:                               ; @.str.4
	.asciz	"check failed while re-sizing volume %d"

.subsections_via_symbols
