	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxc_nand_set_features
_mxc_nand_set_features:                 ## @mxc_nand_set_features
	.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
	movq	%rdx, %r13
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	callq	_nand_to_mtd
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_nand_get_controller_data
	movq	%rax, %r12
	movq	$0, 16(%rax)
	movq	_ONFI_SUBFEATURE_PARAM_LEN@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_3
## %bb.1:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%r15,4), %esi
	movq	%rbx, %rdi
	callq	*(%rbx)
	incq	%r15
	movslq	(%r14), %rax
	cmpq	%rax, %r15
	jl	LBB0_2
LBB0_3:
	movl	8(%r12), %esi
	movl	12(%r12), %edi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edx
	callq	_memcpy32_toio
	movq	(%r12), %rax
	movq	_NAND_CMD_SET_FEATURES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	*8(%rax)
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	$-1, %edx
	callq	_mxc_do_addr_cycle
	movq	(%r12), %rax
	movq	_NFC_INPUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	callq	*(%rax)
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ONFI_SUBFEATURE_PARAM_LEN,4,2  ## @ONFI_SUBFEATURE_PARAM_LEN
	.comm	_NAND_CMD_SET_FEATURES,4,2      ## @NAND_CMD_SET_FEATURES
	.comm	_NFC_INPUT,4,2                  ## @NFC_INPUT
	.no_dead_strip	_mxc_nand_set_features
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxc_nand_set_features
_mxc_nand_set_features:                 ; @mxc_nand_set_features
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x2
	mov	x20, x1
	mov	x23, x0
	bl	_nand_to_mtd
	mov	x19, x0
	mov	x0, x23
	bl	_nand_get_controller_data
	mov	x21, x0
	str	xzr, [x0, #16]
Lloh0:
	adrp	x24, _ONFI_SUBFEATURE_PARAM_LEN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ONFI_SUBFEATURE_PARAM_LEN@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x25, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	w1, [x22, x25, lsl #2]
	mov	x0, x23
	blr	x8
	add	x25, x25, #1
	ldrsw	x8, [x24]
	cmp	x25, x8
	b.lt	LBB0_2
LBB0_3:
	ldp	w1, w0, [x21, #8]
	ldr	w2, [x19]
	bl	_memcpy32_toio
	ldr	x8, [x21]
	ldr	x8, [x8, #8]
Lloh2:
	adrp	x9, _NAND_CMD_SET_FEATURES@GOTPAGE
Lloh3:
	ldr	x9, [x9, _NAND_CMD_SET_FEATURES@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x9]
	mov	x0, x21
	mov	w2, #0
	blr	x8
	mov	x0, x19
	mov	x1, x20
	mov	w2, #-1
	bl	_mxc_do_addr_cycle
	ldr	x8, [x21]
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _NFC_INPUT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NFC_INPUT@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x9]
	mov	x0, x19
	blr	x8
	mov	w0, #0
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ONFI_SUBFEATURE_PARAM_LEN,4,2  ; @ONFI_SUBFEATURE_PARAM_LEN
	.comm	_NAND_CMD_SET_FEATURES,4,2      ; @NAND_CMD_SET_FEATURES
	.comm	_NFC_INPUT,4,2                  ; @NFC_INPUT
	.no_dead_strip	_mxc_nand_set_features
.subsections_via_symbols
