	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gpmi_ecc_read_page
_gpmi_ecc_read_page:                    ## @gpmi_ecc_read_page
	.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
	pushq	%rax
	.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, %r14
	callq	_nand_get_controller_data
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_nand_to_mtd
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_gpmi_bch_layout_std
	movl	$1, (%rbx)
	movl	24(%rbx), %r8d
	movq	%r14, %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	movq	%r12, %rcx
	callq	_nand_read_page_op
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movl	16(%rbx), %r8d
	movl	20(%rbx), %ecx
	movq	%r14, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_gpmi_count_bitflips
	movl	%eax, %r13d
	movq	8(%rbx), %rdx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_block_mark_swapping
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_3
## %bb.2:
	movq	(%r14), %rdi
	movl	(%r15), %edx
	movl	$-1, %esi
	callq	_memset
	movq	8(%rbx), %rax
	movl	(%rax), %eax
	movq	(%r14), %rcx
	movl	%eax, (%rcx)
LBB0_3:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_gpmi_ecc_read_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gpmi_ecc_read_page
_gpmi_ecc_read_page:                    ; @gpmi_ecc_read_page
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x24, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_nand_get_controller_data
	mov	x20, x0
	mov	x0, x19
	bl	_nand_to_mtd
	mov	x23, x0
	mov	x0, x20
	bl	_gpmi_bch_layout_std
	mov	w8, #1
	str	w8, [x20]
	ldr	w4, [x20, #24]
	mov	x0, x19
	mov	x1, x24
	mov	w2, #0
	mov	x3, x22
	bl	_nand_read_page_op
	mov	x24, x0
	cbnz	w0, LBB0_3
; %bb.1:
	ldp	w4, w3, [x20, #16]
	mov	x0, x19
	mov	x1, x22
	mov	w2, #0
	bl	_gpmi_count_bitflips
	mov	x24, x0
	ldr	x2, [x20, #8]
	mov	x0, x20
	mov	x1, x22
	bl	_block_mark_swapping
	cbz	w21, LBB0_3
; %bb.2:
	ldr	x0, [x19]
	ldr	w2, [x23]
	mov	w1, #-1
	bl	_memset
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	ldr	x9, [x19]
	str	w8, [x9]
LBB0_3:
	mov	x0, x24
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_gpmi_ecc_read_page
.subsections_via_symbols
