	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nand_get_features_op
_nand_get_features_op:                  ## @nand_get_features_op
	.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
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	%esi, -76(%rbp)
	callq	_nand_has_exec_op
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	20(%r13), %rdi
	callq	_nand_get_sdr_timings
	movq	%rax, %r15
	movq	_NAND_CMD_GET_FEATURES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_NAND_OP_CMD
	movl	%eax, -64(%rbp)
	movl	8(%r15), %edi
	callq	_PSEC_TO_NSEC
	leaq	-76(%rbp), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	callq	_NAND_OP_ADDR
	movl	%eax, -60(%rbp)
	movl	4(%r15), %edi
	callq	_PSEC_TO_MSEC
	movl	%eax, %r12d
	movl	(%r15), %edi
	callq	_PSEC_TO_NSEC
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_NAND_OP_WAIT_RDY
	movl	%eax, -56(%rbp)
	movq	_ONFI_SUBFEATURE_PARAM_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_NAND_OP_8BIT_DATA_IN
	movl	%eax, -52(%rbp)
	movl	16(%r13), %edi
	leaq	-64(%rbp), %rsi
	callq	_NAND_OPERATION
	movl	%eax, -72(%rbp)
	leaq	-72(%rbp), %rsi
	movq	%r13, %rdi
	callq	_nand_exec_op
	movl	%eax, %r15d
	jmp	LBB0_6
LBB0_2:
	movq	_NAND_CMD_GET_FEATURES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r15d, %edx
	movl	$-1, %ecx
	callq	*8(%r13)
	movq	_ONFI_SUBFEATURE_PARAM_LEN@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_3
## %bb.4:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	*(%r13)
	movl	%eax, (%r14,%rbx,4)
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
	jmp	LBB0_6
LBB0_3:
	xorl	%r15d, %r15d
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_CMD_GET_FEATURES,4,2      ## @NAND_CMD_GET_FEATURES
	.comm	_ONFI_SUBFEATURE_PARAM_LEN,4,2  ## @ONFI_SUBFEATURE_PARAM_LEN
	.no_dead_strip	_nand_get_features_op
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nand_get_features_op
_nand_get_features_op:                  ; @nand_get_features_op
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	str	w1, [sp, #4]
	bl	_nand_has_exec_op
	cbz	x0, LBB0_2
; %bb.1:
	add	x0, x19, #20
	bl	_nand_get_sdr_timings
	mov	x21, x0
Lloh3:
	adrp	x8, _NAND_CMD_GET_FEATURES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NAND_CMD_GET_FEATURES@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_NAND_OP_CMD
	str	w0, [sp, #8]
	ldr	w0, [x21, #8]
	bl	_PSEC_TO_NSEC
	mov	x2, x0
	add	x1, sp, #4
	mov	w0, #1
	bl	_NAND_OP_ADDR
	str	w0, [sp, #12]
	ldr	w0, [x21, #4]
	bl	_PSEC_TO_MSEC
	mov	x22, x0
	ldr	w0, [x21]
	bl	_PSEC_TO_NSEC
	mov	x1, x0
	mov	x0, x22
	bl	_NAND_OP_WAIT_RDY
	str	w0, [sp, #16]
Lloh6:
	adrp	x8, _ONFI_SUBFEATURE_PARAM_LEN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ONFI_SUBFEATURE_PARAM_LEN@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x20
	mov	w2, #0
	bl	_NAND_OP_8BIT_DATA_IN
	str	w0, [sp, #20]
	ldr	w0, [x19, #16]
	add	x1, sp, #8
	bl	_NAND_OPERATION
	str	w0, [sp]
	mov	x1, sp
	mov	x0, x19
	bl	_nand_exec_op
	b	LBB0_6
LBB0_2:
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x9, _NAND_CMD_GET_FEATURES@GOTPAGE
Lloh10:
	ldr	x9, [x9, _NAND_CMD_GET_FEATURES@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x9]
	mov	x0, x19
	mov	x2, x21
	mov	w3, #-1
	blr	x8
Lloh12:
	adrp	x21, _ONFI_SUBFEATURE_PARAM_LEN@GOTPAGE
Lloh13:
	ldr	x21, [x21, _ONFI_SUBFEATURE_PARAM_LEN@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	mov	x0, x19
	blr	x8
	str	w0, [x20, x22, lsl #2]
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.lt	LBB0_4
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldr	x8, [sp, #24]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	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
	add	sp, sp, #80
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_CMD_GET_FEATURES,4,2      ; @NAND_CMD_GET_FEATURES
	.comm	_ONFI_SUBFEATURE_PARAM_LEN,4,2  ; @ONFI_SUBFEATURE_PARAM_LEN
	.no_dead_strip	_nand_get_features_op
.subsections_via_symbols
