	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function onenand_read_oob
_onenand_read_oob:                      ## @onenand_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
	movl	$-129, %eax
	addl	(%rdx), %eax
	cmpl	$2, %eax
	jae	LBB0_1
## %bb.2:
	movq	%rdx, %rbx
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	(%rdi), %r12
	movq	_FL_READING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_onenand_get_device
	cmpq	$0, 8(%rbx)
	je	LBB0_6
## %bb.3:
	movq	%r12, %rdi
	callq	_ONENAND_IS_MLC
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	callq	_onenand_mlc_read_ops_nolock
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_6:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	callq	_onenand_read_oob_nolock
	jmp	LBB0_7
LBB0_5:
	callq	_onenand_read_ops_nolock
LBB0_7:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_onenand_release_device
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FL_READING,4,2                 ## @FL_READING
	.no_dead_strip	_onenand_read_oob
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function onenand_read_oob
_onenand_read_oob:                      ; @onenand_read_oob
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w8, [x2]
	sub	w8, w8, #129
	cmp	w8, #2
	b.hs	LBB0_4
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x0]
Lloh0:
	adrp	x8, _FL_READING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FL_READING@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_onenand_get_device
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_5
; %bb.2:
	mov	x0, x22
	bl	_ONENAND_IS_MLC
	cbz	x0, LBB0_6
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_onenand_mlc_read_ops_nolock
	b	LBB0_7
LBB0_4:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
LBB0_5:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_onenand_read_oob_nolock
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_onenand_read_ops_nolock
LBB0_7:
	mov	x20, x0
	mov	x0, x19
	bl	_onenand_release_device
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FL_READING,4,2                 ; @FL_READING
	.no_dead_strip	_onenand_read_oob
.subsections_via_symbols
