	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_self_check_all_ff          ## -- Begin function ubi_self_check_all_ff
	.p2align	4, 0x90
_ubi_self_check_all_ff:                 ## @ubi_self_check_all_ff
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r13
	movl	(%rdi), %r14d
	imull	%esi, %r14d
	callq	_ubi_dbg_chk_io
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	_GFP_NOFS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PAGE_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %edi
	callq	___vmalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%r12, %rdx
	movq	%rax, %r12
	addl	-56(%rbp), %r14d                ## 4-byte Folded Reload
	movl	4(%r13), %edi
	leaq	-64(%rbp), %rcx
	movl	%r14d, %esi
	movq	%rdx, %r14
                                        ## kill: def $edx killed $edx killed $rdx
	movq	%rax, %r8
	callq	_mtd_read
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_mtd_is_bitflip
	testl	%eax, %eax
	je	LBB0_5
LBB0_6:
	movq	%r12, %rdi
	movl	$255, %esi
	movl	%r14d, %edx
	callq	_ubi_check_pattern
	testl	%eax, %eax
	je	LBB0_7
## %bb.10:
	movq	%r12, %rdi
	callq	_vfree
	jmp	LBB0_9
LBB0_2:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_ubi_err
	jmp	LBB0_9
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %ecx
	movl	%r14d, %r8d
	xorl	%eax, %eax
	callq	_ubi_err
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_ubi_err
	leal	(%r14,%rbx), %ecx
	leaq	L_.str.4(%rip), %rsi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_ubi_msg
	movq	_KERN_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DUMP_PREFIX_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.5(%rip), %rsi
	movl	$32, %ecx
	movl	$1, %r8d
	movq	%r12, %r9
	pushq	$1
	pushq	%r14
	xorl	%ebx, %ebx
	callq	_print_hex_dump
	addq	$16, %rsp
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_5:
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movq	-56(%rbp), %r9                  ## 8-byte Reload
                                        ## kill: def $r9d killed $r9d killed $r9
	xorl	%eax, %eax
	pushq	-64(%rbp)
	callq	_ubi_err
	addq	$16, %rsp
LBB0_8:
	xorl	%eax, %eax
	callq	_dump_stack
	movq	%r12, %rdi
	callq	_vfree
	movl	%ebx, %r15d
LBB0_9:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_NOFS,4,2                   ## @GFP_NOFS
	.comm	_PAGE_KERNEL,4,2                ## @PAGE_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot allocate memory to check for 0xFFs"

L_.str.1:                               ## @.str.1
	.asciz	"err %d while reading %d bytes from PEB %d:%d, read %zd bytes"

L_.str.2:                               ## @.str.2
	.asciz	"flash region at PEB %d:%d, length %d does not contain all 0xFF bytes"

L_.str.3:                               ## @.str.3
	.asciz	"self-check failed for PEB %d"

L_.str.4:                               ## @.str.4
	.asciz	"hex dump of the %d-%d region"

	.comm	_KERN_DEBUG,4,2                 ## @KERN_DEBUG
L_.str.5:                               ## @.str.5
	.space	1

	.comm	_DUMP_PREFIX_OFFSET,4,2         ## @DUMP_PREFIX_OFFSET
	.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_self_check_all_ff          ; -- Begin function ubi_self_check_all_ff
	.p2align	2
_ubi_self_check_all_ff:                 ; @ubi_self_check_all_ff
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x20, x3
	mov	x22, x2
	mov	x23, x1
	mov	x21, x0
	ldr	w24, [x0]
	bl	_ubi_dbg_chk_io
	cbz	w0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _GFP_NOFS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_NOFS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _PAGE_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	bl	___vmalloc
	cbz	x0, LBB0_7
; %bb.2:
	mov	x19, x0
	madd	w1, w24, w23, w22
	ldr	w0, [x21, #4]
	add	x3, sp, #40
	mov	x2, x20
	mov	x4, x19
	bl	_mtd_read
	cbz	w0, LBB0_4
; %bb.3:
	mov	x24, x0
	bl	_mtd_is_bitflip
	cbz	w0, LBB0_9
LBB0_4:
	mov	x0, x19
	mov	w1, #255
	mov	x2, x20
	bl	_ubi_check_pattern
	cbz	w0, LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_vfree
LBB0_6:
	mov	w24, #0
	b	LBB0_11
LBB0_7:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_ubi_err
	mov	w24, #0
	b	LBB0_11
LBB0_8:
	mov	x8, x20
	str	x8, [sp, #16]
	mov	x8, x22
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	stp	x23, x8, [sp]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_ubi_err
	str	x23, [sp]
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_ubi_err
	add	w3, w20, w22
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	bl	_ubi_msg
Lloh14:
	adrp	x8, _KERN_DEBUG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _KERN_DEBUG@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x8, _DUMP_PREFIX_OFFSET@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DUMP_PREFIX_OFFSET@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w3, #32
	mov	w4, #1
	mov	x5, x19
	mov	x6, x20
	mov	w7, #1
	bl	_print_hex_dump
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_10
LBB0_9:
	ldr	x8, [sp, #40]
	stp	x22, x8, [sp, #24]
	stp	x20, x23, [sp, #8]
	str	x24, [sp]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_ubi_err
LBB0_10:
	bl	_dump_stack
	mov	x0, x19
	bl	_vfree
LBB0_11:
	mov	x0, x24
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_NOFS,4,2                   ; @GFP_NOFS
	.comm	_PAGE_KERNEL,4,2                ; @PAGE_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot allocate memory to check for 0xFFs"

l_.str.1:                               ; @.str.1
	.asciz	"err %d while reading %d bytes from PEB %d:%d, read %zd bytes"

l_.str.2:                               ; @.str.2
	.asciz	"flash region at PEB %d:%d, length %d does not contain all 0xFF bytes"

l_.str.3:                               ; @.str.3
	.asciz	"self-check failed for PEB %d"

l_.str.4:                               ; @.str.4
	.asciz	"hex dump of the %d-%d region"

	.comm	_KERN_DEBUG,4,2                 ; @KERN_DEBUG
l_.str.5:                               ; @.str.5
	.space	1

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