	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nand_write_page_swecc
_nand_write_page_swecc:                 ## @nand_write_page_swecc
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	callq	_nand_to_mtd
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	8(%rbx), %r12d
	movq	40(%rbx), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testl	%r12d, %r12d
	je	LBB0_3
## %bb.1:
	movslq	4(%rbx), %rax
	movslq	(%rbx), %r14
	shlq	$2, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	shlq	$2, %r14
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	*32(%rbx)
	addq	-80(%rbp), %r13                 ## 8-byte Folded Reload
	addq	%r14, %r15
	decl	%r12d
	jne	LBB0_2
LBB0_3:
	movl	24(%rbx), %r8d
	movl	48(%rbx), %edx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	xorl	%ecx, %ecx
	callq	_mtd_ooblayout_set_eccbytes
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	16(%rbx), %rax
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	$1, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_nand_write_page_swecc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nand_write_page_swecc
_nand_write_page_swecc:                 ; @nand_write_page_swecc
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x20, x1
	mov	x21, x0
	bl	_nand_to_mtd
	mov	x22, x0
	ldr	w26, [x21, #8]
	ldr	x23, [x21, #40]
	cbz	w26, LBB0_3
; %bb.1:
	ldpsw	x9, x8, [x21]
	lsl	x27, x8, #2
	lsl	x28, x9, #2
	mov	x24, x20
	mov	x25, x23
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #32]
	mov	x0, x21
	mov	x1, x24
	mov	x2, x25
	blr	x8
	add	x25, x25, x27
	add	x24, x24, x28
	subs	w26, w26, #1
	b.ne	LBB0_2
LBB0_3:
	ldr	w2, [x21, #48]
	ldr	w4, [x21, #24]
	mov	x0, x22
	mov	x1, x23
	mov	w3, #0
	bl	_mtd_ooblayout_set_eccbytes
	cbz	w0, LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	x4, [x21, #16]
	mov	x0, x21
	mov	x1, x20
	mov	w2, #1
	mov	x3, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	br	x4
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_nand_write_page_swecc
.subsections_via_symbols
