	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function micron_nand_read_page_on_die_ecc
_micron_nand_read_page_on_die_ecc:      ## @micron_nand_read_page_on_die_ecc
	.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, %r13d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_nand_to_mtd
	movq	%rax, %r15
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_micron_nand_on_die_ecc_setup
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.1:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_nand_read_page_op
	testl	%eax, %eax
	jne	LBB0_2
## %bb.3:
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	leaq	-52(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_nand_status_op
	testl	%eax, %eax
	je	LBB0_4
LBB0_2:
	movl	%eax, %r13d
	movq	%rbx, %r15
LBB0_13:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_micron_nand_on_die_ecc_setup
	testl	%r13d, %r13d
	cmovnel	%r13d, %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rbx, %r15
	movq	%rbx, %rdi
	callq	_nand_exit_status_op
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.5:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	callq	_nand_read_data_op
	movl	%eax, %r13d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_6
## %bb.7:
	testl	%r13d, %r13d
	movq	%r15, %rbx
	jne	LBB0_9
## %bb.8:
	movq	8(%rbx), %rsi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_nand_read_data_op
	movl	%eax, %r13d
	jmp	LBB0_9
LBB0_6:
	movq	%r15, %rbx
LBB0_9:
	cmpl	$4, (%rbx)
	movl	-52(%rbp), %esi
	movq	%rbx, %rdi
	jne	LBB0_11
## %bb.10:
	movq	%r12, %rdx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_micron_nand_on_die_ecc_status_4
	jmp	LBB0_12
LBB0_11:
	callq	_micron_nand_on_die_ecc_status_8
LBB0_12:
	movl	%eax, %r14d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_micron_nand_read_page_on_die_ecc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function micron_nand_read_page_on_die_ecc
_micron_nand_read_page_on_die_ecc:      ; @micron_nand_read_page_on_die_ecc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	bl	_nand_to_mtd
	mov	x24, x0
	mov	x0, x19
	mov	w1, #1
	bl	_micron_nand_on_die_ecc_setup
	cbnz	w0, LBB0_6
; %bb.1:
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	mov	x3, #0
	mov	w4, #0
	bl	_nand_read_page_op
	cbnz	w0, LBB0_4
; %bb.2:
	add	x1, sp, #12
	mov	x0, x19
	bl	_nand_status_op
	cbnz	w0, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_nand_exit_status_op
	cbz	w0, LBB0_7
LBB0_4:
	mov	x23, x0
	mov	w20, #0
LBB0_5:
	mov	x0, x19
	mov	w1, #0
	bl	_micron_nand_on_die_ecc_setup
	cmp	w23, #0
	csel	w0, w20, w23, eq
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_7:
	ldr	w2, [x24, #4]
	mov	x0, x19
	mov	x1, x22
	mov	w3, #0
	bl	_nand_read_data_op
	mov	x23, x0
	cbz	w20, LBB0_10
; %bb.8:
	cbnz	w23, LBB0_10
; %bb.9:
	ldr	x1, [x19, #8]
	ldr	w2, [x24]
	mov	x0, x19
	mov	w3, #0
	bl	_nand_read_data_op
	mov	x23, x0
LBB0_10:
	ldr	w8, [x19]
	ldr	w1, [sp, #12]
	mov	x0, x19
	cmp	w8, #4
	b.ne	LBB0_12
; %bb.11:
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	bl	_micron_nand_on_die_ecc_status_4
	b	LBB0_13
LBB0_12:
	bl	_micron_nand_on_die_ecc_status_8
LBB0_13:
	mov	x20, x0
	b	LBB0_5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_micron_nand_read_page_on_die_ecc
.subsections_via_symbols
