	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nand_read_oob
_nand_read_oob:                         ## @nand_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, %r15d
	callq	_mtd_to_nand
	movq	%rax, %r14
	movq	$0, 16(%r12)
	movq	(%r12), %rax
	movq	_MTD_OPS_PLACE_OOB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.1:
	movq	_MTD_OPS_AUTO_OOB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.2:
	movq	_MTD_OPS_RAW@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_4:
	movq	%r14, %rdi
	callq	_nand_get_device
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:
	cmpl	$0, 8(%r12)
	je	LBB0_6
## %bb.7:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%r12, %rdx
	callq	_nand_do_read_ops
	jmp	LBB0_8
LBB0_6:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%r12, %rdx
	callq	_nand_do_read_oob
LBB0_8:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_nand_release_device
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTD_OPS_PLACE_OOB,8,3          ## @MTD_OPS_PLACE_OOB
	.comm	_MTD_OPS_AUTO_OOB,8,3           ## @MTD_OPS_AUTO_OOB
	.comm	_MTD_OPS_RAW,8,3                ## @MTD_OPS_RAW
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.no_dead_strip	_nand_read_oob
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nand_read_oob
_nand_read_oob:                         ; @nand_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
	mov	x20, x2
	mov	x21, x1
	bl	_mtd_to_nand
	str	xzr, [x20, #16]
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _MTD_OPS_PLACE_OOB@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MTD_OPS_PLACE_OOB@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _MTD_OPS_AUTO_OOB@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MTD_OPS_AUTO_OOB@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
Lloh6:
	adrp	x11, _MTD_OPS_RAW@GOTPAGE
Lloh7:
	ldr	x11, [x11, _MTD_OPS_RAW@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	b.ne	LBB0_4
; %bb.1:
	mov	x19, x0
	bl	_nand_get_device
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.2:
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_5
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_nand_do_read_ops
	b	LBB0_6
LBB0_4:
Lloh9:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_nand_do_read_oob
LBB0_6:
	mov	x22, x0
	mov	x0, x19
	bl	_nand_release_device
LBB0_7:
	mov	x0, x22
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MTD_OPS_PLACE_OOB,8,3          ; @MTD_OPS_PLACE_OOB
	.comm	_MTD_OPS_AUTO_OOB,8,3           ; @MTD_OPS_AUTO_OOB
	.comm	_MTD_OPS_RAW,8,3                ; @MTD_OPS_RAW
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.no_dead_strip	_nand_read_oob
.subsections_via_symbols
