	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtdswap_read_oob
_mtdswap_read_oob:                      ## @mtdswap_read_oob
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	4(%rdi), %edi
	callq	_mtd_read_oob
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_mtd_is_bitflip
	testq	%rax, %rax
	jne	LBB0_5
## %bb.1:
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.2:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_dev_warn
	jmp	LBB0_5
LBB0_3:
	movl	(%r12), %ecx
	movl	4(%r12), %edx
	xorl	%ebx, %ebx
	cmpl	%ecx, %edx
	jge	LBB0_5
## %bb.4:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r14d, %r8d
	xorl	%eax, %eax
	callq	_dev_warn
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Read OOB failed %d for block at %08llx\n"

L_.str.1:                               ## @.str.1
	.asciz	"Read OOB return short read (%zd bytes not %zd) for block at %08llx\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_mtdswap_read_oob
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtdswap_read_oob
_mtdswap_read_oob:                      ; @mtdswap_read_oob
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x2
	mov	x19, x1
	mov	x21, x0
	ldr	w0, [x0, #4]
	bl	_mtd_read_oob
	mov	x20, x0
	bl	_mtd_is_bitflip
	cbnz	x0, LBB0_6
; %bb.1:
	cbz	w20, LBB0_3
; %bb.2:
	ldr	w0, [x21]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	bl	_dev_warn
	b	LBB0_6
LBB0_3:
	ldp	w3, w2, [x22]
	cmp	w2, w3
	b.ge	LBB0_5
; %bb.4:
	ldr	w0, [x21]
	str	x19, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_5:
	mov	w20, #0
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Read OOB failed %d for block at %08llx\n"

l_.str.1:                               ; @.str.1
	.asciz	"Read OOB return short read (%zd bytes not %zd) for block at %08llx\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_mtdswap_read_oob
.subsections_via_symbols
