	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_eba_copy_leb               ## -- Begin function ubi_eba_copy_leb
	.p2align	4, 0x90
_ubi_eba_copy_leb:                      ## @ubi_eba_copy_leb
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	48(%rcx), %rdi
	callq	_be32_to_cpu
	movl	%eax, %r13d
	movq	40(%r12), %rdi
	callq	_be32_to_cpu
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	movl	%r15d, -56(%rbp)                ## 4-byte Spill
	movl	%r15d, %ecx
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movl	%r14d, %r8d
	xorl	%eax, %eax
	callq	_dbg_wl
	movq	(%r12), %rax
	movq	_UBI_VID_STATIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	movq	%r12, -104(%rbp)                ## 8-byte Spill
	jne	LBB0_2
## %bb.1:
	movq	24(%r12), %rdi
	callq	_be32_to_cpu
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	32(%rbx), %esi
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%eax, %edi
	callq	_ALIGN
	movl	%eax, %r15d
	jmp	LBB0_3
LBB0_2:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %r15d
	movq	32(%r12), %rdi
	callq	_be32_to_cpu
	subl	%eax, %r15d
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
LBB0_3:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_vol_id2idx
	movq	%rbx, %r12
	movl	%eax, %r14d
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	movq	24(%r12), %rax
	movslq	%r14d, %rcx
	movq	(%rax,%rcx,8), %r14
	movq	%rbx, %rdi
	callq	_spin_unlock
	testq	%r14, %r14
	je	LBB0_4
## %bb.6:
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	-68(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_leb_write_trylock
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	movl	%r13d, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dbg_wl
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	movl	%r13d, %esi
	xorl	%eax, %eax
	callq	_dbg_wl
LBB0_5:
	movq	_MOVE_CANCEL_RACE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_42
LBB0_8:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	(%r14), %rax
	movslq	%ebx, %r13
	movl	(%rax,%r13,4), %r8d
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, %r8d
	jne	LBB0_9
## %bb.10:
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	leaq	4(%r12), %rdi
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	%ecx, %r14d
	callq	_mutex_lock
	leaq	L_.str.4(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_dbg_wl
	movl	12(%r12), %esi
	movq	%r12, %rdi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	movl	%r15d, %r8d
	callq	_ubi_io_read_data
	movq	_UBI_IO_BITFLIPS@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	cmpl	(%rcx), %eax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.5(%rip), %rdi
	movl	%eax, %esi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_ubi_warn
	movq	_MOVE_SOURCE_RD_ERR@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_9:
	leaq	L_.str.3(%rip), %rdi
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dbg_wl
	movq	_MOVE_CANCEL_RACE@GOTPCREL(%rip), %rax
	movl	%ebx, %edx
	movl	(%rax), %r12d
	jmp	LBB0_41
LBB0_13:
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movq	-104(%rbp), %r13                ## 8-byte Reload
	movq	(%r13), %rax
	movq	_UBI_VID_DYNAMIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.15:
	movl	12(%r12), %esi
	movq	%r12, %rdi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_ubi_calc_data_len
	movl	%eax, %r15d
	movl	%eax, %ebx
	jmp	LBB0_16
LBB0_14:
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
LBB0_16:
	xorl	%eax, %eax
	callq	_cond_resched
	movq	_UBI_CRC32_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%r12), %esi
	movl	%ebx, %edx
	callq	_crc32
	movl	%eax, %r12d
	xorl	%eax, %eax
	callq	_cond_resched
	testl	%ebx, %ebx
	jle	LBB0_18
## %bb.17:
	movl	$1, 8(%r13)
	movl	%ebx, %edi
	callq	_cpu_to_be32
	movq	%rax, 24(%r13)
	movl	%r12d, %edi
	callq	_cpu_to_be32
	movq	%rax, 16(%r13)
LBB0_18:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_next_sqnum
	movl	%eax, %edi
	callq	_cpu_to_be64
	movl	%eax, 12(%r13)
	movq	%r14, %rdi
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	movq	%r13, %rdx
	callq	_ubi_io_write_vid_hdr
	testl	%eax, %eax
	je	LBB0_23
## %bb.19:
	movl	%eax, %r12d
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r12d, %eax
	jne	LBB0_22
## %bb.20:
	movq	_MOVE_TARGET_WR_ERR@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %r12d
LBB0_22:
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
LBB0_40:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	-68(%rbp), %edx                 ## 4-byte Reload
LBB0_41:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	callq	_leb_write_unlock
LBB0_42:
	movl	%r12d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	xorl	%eax, %eax
	callq	_cond_resched
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	_ubi_io_read_vid_hdr
	testl	%eax, %eax
	je	LBB0_28
## %bb.24:
	movl	%eax, %r12d
	movq	_UBI_IO_BITFLIPS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_25
LBB0_35:
	movq	_MOVE_CANCEL_BITFLIPS@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_39
LBB0_28:
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	jle	LBB0_38
## %bb.29:
	movl	%r15d, %r14d
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	12(%r15), %esi
	movq	%r15, %rdi
	movl	%edx, %r13d
	xorl	%ecx, %ecx
	movl	%r14d, %r8d
	callq	_ubi_io_write_data
	testl	%eax, %eax
	je	LBB0_32
## %bb.30:
	movl	%eax, %r12d
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r12d, %eax
	jne	LBB0_39
## %bb.31:
	movq	_MOVE_TARGET_WR_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_39
LBB0_25:
	leaq	L_.str.6(%rip), %rdi
LBB0_26:
	movl	%r12d, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_ubi_warn
	movl	%r12d, %edi
	callq	_is_error_sane
	testq	%rax, %rax
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	je	LBB0_40
## %bb.27:
	movq	_MOVE_TARGET_RD_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_40
LBB0_32:
	xorl	%eax, %eax
	callq	_cond_resched
	movl	8(%r15), %esi
	movq	%r15, %rdi
	movl	%r13d, %edx
	xorl	%ecx, %ecx
	movl	%r14d, %r8d
	callq	_ubi_io_read_data
	testl	%eax, %eax
	je	LBB0_36
## %bb.33:
	movl	%eax, %r12d
	movq	_UBI_IO_BITFLIPS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	je	LBB0_35
## %bb.34:
	leaq	L_.str.7(%rip), %rdi
	jmp	LBB0_26
LBB0_36:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_cond_resched
	movl	8(%r15), %esi
	movl	12(%r15), %edi
	movl	%r14d, %edx
	callq	_memcmp
	testq	%rax, %rax
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_38
## %bb.37:
	leaq	L_.str.8(%rip), %rdi
	movl	%edx, %esi
	xorl	%eax, %eax
	callq	_ubi_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_39
LBB0_38:
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rax
	xorl	%edi, %edi
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax,%r13,4)
	sete	%dil
	movl	%edx, %r15d
	callq	_ubi_assert
	movq	(%r14), %rax
	movl	%r15d, (%rax,%r13,4)
	xorl	%r12d, %r12d
LBB0_39:
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_40
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"copy LEB %d:%d, PEB %d to PEB %d"

	.comm	_UBI_VID_STATIC,8,3             ## @UBI_VID_STATIC
L_.str.1:                               ## @.str.1
	.asciz	"volume %d is being removed, cancel"

	.comm	_MOVE_CANCEL_RACE,4,2           ## @MOVE_CANCEL_RACE
L_.str.2:                               ## @.str.2
	.asciz	"contention on LEB %d:%d, cancel"

L_.str.3:                               ## @.str.3
	.asciz	"LEB %d:%d is no longer mapped to PEB %d, mapped to PEB %d, cancel"

L_.str.4:                               ## @.str.4
	.asciz	"read %d bytes of data"

	.comm	_UBI_IO_BITFLIPS,4,2            ## @UBI_IO_BITFLIPS
L_.str.5:                               ## @.str.5
	.asciz	"error %d while reading data from PEB %d"

	.comm	_MOVE_SOURCE_RD_ERR,4,2         ## @MOVE_SOURCE_RD_ERR
	.comm	_UBI_VID_DYNAMIC,8,3            ## @UBI_VID_DYNAMIC
	.comm	_UBI_CRC32_INIT,4,2             ## @UBI_CRC32_INIT
	.comm	_EIO,4,2                        ## @EIO
	.comm	_MOVE_TARGET_WR_ERR,4,2         ## @MOVE_TARGET_WR_ERR
L_.str.6:                               ## @.str.6
	.asciz	"error %d while reading VID header back from PEB %d"

	.comm	_MOVE_TARGET_RD_ERR,4,2         ## @MOVE_TARGET_RD_ERR
	.comm	_MOVE_CANCEL_BITFLIPS,4,2       ## @MOVE_CANCEL_BITFLIPS
L_.str.7:                               ## @.str.7
	.asciz	"error %d while reading data back from PEB %d"

L_.str.8:                               ## @.str.8
	.asciz	"read data back from PEB %d and it is different"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_eba_copy_leb               ; -- Begin function ubi_eba_copy_leb
	.p2align	2
_ubi_eba_copy_leb:                      ; @ubi_eba_copy_leb
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x25, x3
	mov	x22, x2
	mov	x24, x1
	mov	x20, x0
	ldr	x0, [x3, #48]
	bl	_be32_to_cpu
	mov	x19, x0
	ldr	x0, [x25, #40]
	bl	_be32_to_cpu
	mov	x21, x0
	stp	x24, x22, [sp, #8]
	mov	x8, x0
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_dbg_wl
	ldr	x8, [x25]
Lloh2:
	adrp	x9, _UBI_VID_STATIC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _UBI_VID_STATIC@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x0, [x25, #24]
	bl	_be32_to_cpu
	mov	x27, x0
	ldr	w1, [x20, #32]
	bl	_ALIGN
	mov	x26, x0
	b	LBB0_3
LBB0_2:
	ldr	w23, [x20]
	ldr	x0, [x25, #32]
	bl	_be32_to_cpu
	sub	w26, w23, w0
	mov	x27, x26
LBB0_3:
	mov	x0, x20
	mov	x1, x19
	bl	_vol_id2idx
	mov	x23, x0
	add	x28, x20, #16
	mov	x0, x28
	bl	_spin_lock
	ldr	x8, [x20, #24]
	ldr	x23, [x8, w23, sxtw #3]
	mov	x0, x28
	bl	_spin_unlock
	cbz	x23, LBB0_6
; %bb.4:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_leb_write_trylock
	cbz	w0, LBB0_8
; %bb.5:
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	str	x21, [sp]
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_7:
	mov	x1, x19
	bl	_dbg_wl
Lloh9:
	adrp	x8, _MOVE_CANCEL_RACE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MOVE_CANCEL_RACE@GOTPAGEOFF]
Lloh11:
	ldr	w24, [x8]
	b	LBB0_21
LBB0_8:
	ldr	x8, [x23]
	ldr	w8, [x8, w21, sxtw #2]
	cmp	w8, w24
	b.ne	LBB0_12
; %bb.9:
	add	x28, x20, #4
	mov	x0, x28
	bl	_mutex_lock
Lloh12:
	adrp	x0, l_.str.4@PAGE
Lloh13:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x26
	bl	_dbg_wl
	ldr	w1, [x20, #12]
	mov	x0, x20
	mov	x2, x24
	mov	w3, #0
	mov	x4, x26
	bl	_ubi_io_read_data
Lloh14:
	adrp	x8, _UBI_IO_BITFLIPS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _UBI_IO_BITFLIPS@GOTPAGEOFF]
	cbz	w0, LBB0_13
; %bb.10:
	mov	x1, x0
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_13
; %bb.11:
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	str	x24, [sp]
Lloh16:
	adrp	x0, l_.str.5@PAGE
Lloh17:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_ubi_warn
Lloh18:
	adrp	x8, _MOVE_SOURCE_RD_ERR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MOVE_SOURCE_RD_ERR@GOTPAGEOFF]
Lloh20:
	ldr	w24, [x8]
	b	LBB0_19
LBB0_12:
	str	x8, [sp, #16]
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	mov	x8, x21
	stp	x8, x24, [sp]
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_dbg_wl
Lloh23:
	adrp	x8, _MOVE_CANCEL_RACE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MOVE_CANCEL_RACE@GOTPAGEOFF]
Lloh25:
	ldr	w24, [x8]
	b	LBB0_20
LBB0_13:
	ldr	x8, [x25]
Lloh26:
	adrp	x9, _UBI_VID_DYNAMIC@GOTPAGE
Lloh27:
	ldr	x9, [x9, _UBI_VID_DYNAMIC@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x8, x9
	str	x28, [sp, #24]                  ; 8-byte Folded Spill
	b.ne	LBB0_15
; %bb.14:
	ldr	w1, [x20, #12]
	mov	x0, x20
	mov	x2, x27
	bl	_ubi_calc_data_len
	mov	x26, x0
	mov	x27, x0
LBB0_15:
	bl	_cond_resched
Lloh29:
	adrp	x8, _UBI_CRC32_INIT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _UBI_CRC32_INIT@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	ldr	w1, [x20, #12]
	mov	x2, x27
	bl	_crc32
	mov	x28, x0
	bl	_cond_resched
	cmp	w27, #1
	b.lt	LBB0_17
; %bb.16:
	mov	w8, #1
	str	w8, [x25, #8]
	mov	x0, x27
	bl	_cpu_to_be32
	str	x0, [x25, #24]
	mov	x0, x28
	bl	_cpu_to_be32
	str	x0, [x25, #16]
LBB0_17:
	mov	x0, x20
	bl	_next_sqnum
	bl	_cpu_to_be64
	str	w0, [x25, #12]
	mov	x0, x20
	mov	x1, x22
	mov	x2, x25
	bl	_ubi_io_write_vid_hdr
	cbz	w0, LBB0_22
; %bb.18:
Lloh32:
	adrp	x8, _EIO@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
Lloh35:
	adrp	x9, _MOVE_TARGET_WR_ERR@GOTPAGE
Lloh36:
	ldr	x9, [x9, _MOVE_TARGET_WR_ERR@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	cmn	w0, w8
	csel	w24, w9, w0, eq
	ldr	x28, [sp, #24]                  ; 8-byte Folded Reload
LBB0_19:
	mov	x0, x28
	bl	_mutex_unlock
LBB0_20:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_leb_write_unlock
LBB0_21:
	mov	x0, x24
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_22:
	bl	_cond_resched
	mov	x0, x20
	mov	x1, x22
	mov	x2, x25
	mov	w3, #1
	bl	_ubi_io_read_vid_hdr
	ldr	x28, [sp, #24]                  ; 8-byte Folded Reload
	cbz	w0, LBB0_25
; %bb.23:
	mov	x25, x0
Lloh38:
	adrp	x8, _UBI_IO_BITFLIPS@GOTPAGE
Lloh39:
	ldr	x8, [x8, _UBI_IO_BITFLIPS@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_28
LBB0_24:
Lloh41:
	adrp	x8, _MOVE_CANCEL_BITFLIPS@GOTPAGE
Lloh42:
	ldr	x8, [x8, _MOVE_CANCEL_BITFLIPS@GOTPAGEOFF]
Lloh43:
	ldr	w24, [x8]
	b	LBB0_19
LBB0_25:
	cmp	w27, #1
	b.lt	LBB0_35
; %bb.26:
	ldr	w1, [x20, #12]
	mov	x0, x20
	mov	x2, x22
	mov	w3, #0
	mov	x4, x26
	bl	_ubi_io_write_data
	cbz	w0, LBB0_30
; %bb.27:
Lloh44:
	adrp	x8, _EIO@GOTPAGE
Lloh45:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
Lloh47:
	adrp	x9, _MOVE_TARGET_WR_ERR@GOTPAGE
Lloh48:
	ldr	x9, [x9, _MOVE_TARGET_WR_ERR@GOTPAGEOFF]
Lloh49:
	ldr	w9, [x9]
	cmn	w0, w8
	csel	w24, w9, w0, eq
	b	LBB0_19
LBB0_28:
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	str	x22, [sp]
Lloh50:
	adrp	x0, l_.str.6@PAGE
Lloh51:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_29:
	mov	x1, x25
	bl	_ubi_warn
	mov	x0, x25
	bl	_is_error_sane
Lloh52:
	adrp	x8, _MOVE_TARGET_RD_ERR@GOTPAGE
Lloh53:
	ldr	x8, [x8, _MOVE_TARGET_RD_ERR@GOTPAGEOFF]
Lloh54:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w24, w25, w8, eq
	b	LBB0_19
LBB0_30:
	bl	_cond_resched
	ldr	w1, [x20, #8]
	mov	x0, x20
	mov	x2, x22
	mov	w3, #0
	mov	x4, x26
	bl	_ubi_io_read_data
	cbz	w0, LBB0_33
; %bb.31:
	mov	x25, x0
Lloh55:
	adrp	x8, _UBI_IO_BITFLIPS@GOTPAGE
Lloh56:
	ldr	x8, [x8, _UBI_IO_BITFLIPS@GOTPAGEOFF]
Lloh57:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_24
; %bb.32:
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	str	x22, [sp]
Lloh58:
	adrp	x0, l_.str.7@PAGE
Lloh59:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_29
LBB0_33:
	bl	_cond_resched
	ldp	w1, w0, [x20, #8]
	mov	x2, x26
	bl	_memcmp
	cbz	x0, LBB0_35
; %bb.34:
Lloh60:
	adrp	x0, l_.str.8@PAGE
Lloh61:
	add	x0, x0, l_.str.8@PAGEOFF
	mov	x1, x22
	bl	_ubi_warn
Lloh62:
	adrp	x8, _EINVAL@GOTPAGE
Lloh63:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh64:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_19
LBB0_35:
	sxtw	x8, w21
	ldr	x9, [x23]
	lsl	x25, x8, #2
	ldr	w8, [x9, x25]
	cmp	w8, w24
	cset	w0, eq
	bl	_ubi_assert
	mov	w24, #0
	ldr	x8, [x23]
	str	w22, [x8, x25]
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpAdd	Lloh60, Lloh61
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"copy LEB %d:%d, PEB %d to PEB %d"

	.comm	_UBI_VID_STATIC,8,3             ; @UBI_VID_STATIC
l_.str.1:                               ; @.str.1
	.asciz	"volume %d is being removed, cancel"

	.comm	_MOVE_CANCEL_RACE,4,2           ; @MOVE_CANCEL_RACE
l_.str.2:                               ; @.str.2
	.asciz	"contention on LEB %d:%d, cancel"

l_.str.3:                               ; @.str.3
	.asciz	"LEB %d:%d is no longer mapped to PEB %d, mapped to PEB %d, cancel"

l_.str.4:                               ; @.str.4
	.asciz	"read %d bytes of data"

	.comm	_UBI_IO_BITFLIPS,4,2            ; @UBI_IO_BITFLIPS
l_.str.5:                               ; @.str.5
	.asciz	"error %d while reading data from PEB %d"

	.comm	_MOVE_SOURCE_RD_ERR,4,2         ; @MOVE_SOURCE_RD_ERR
	.comm	_UBI_VID_DYNAMIC,8,3            ; @UBI_VID_DYNAMIC
	.comm	_UBI_CRC32_INIT,4,2             ; @UBI_CRC32_INIT
	.comm	_EIO,4,2                        ; @EIO
	.comm	_MOVE_TARGET_WR_ERR,4,2         ; @MOVE_TARGET_WR_ERR
l_.str.6:                               ; @.str.6
	.asciz	"error %d while reading VID header back from PEB %d"

	.comm	_MOVE_TARGET_RD_ERR,4,2         ; @MOVE_TARGET_RD_ERR
	.comm	_MOVE_CANCEL_BITFLIPS,4,2       ; @MOVE_CANCEL_BITFLIPS
l_.str.7:                               ; @.str.7
	.asciz	"error %d while reading data back from PEB %d"

l_.str.8:                               ; @.str.8
	.asciz	"read data back from PEB %d and it is different"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
