	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function macronix_nand_onfi_init
_macronix_nand_onfi_init:               ## @macronix_nand_onfi_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	24(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	(%rax), %rax
	movq	_MACRONIX_READ_RETRY_BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_3
## %bb.2:
	movq	%rdi, %rbx
	movq	_MACRONIX_NUM_READ_RETRY_MODES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rdi)
	movq	_macronix_nand_setup_read_retry@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rdi)
	cmpq	$0, 16(%rdi)
	je	LBB0_3
## %bb.4:
	movl	12(%rbx), %edi
	movq	_ONFI_FEATURE_ADDR_READ_RETRY@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	$1, %edx
	callq	_bitmap_set
	movl	8(%rbx), %edi
	movl	(%r14), %esi
	movl	$1, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_bitmap_set                     ## TAILCALL
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MACRONIX_READ_RETRY_BIT,4,2    ## @MACRONIX_READ_RETRY_BIT
	.comm	_MACRONIX_NUM_READ_RETRY_MODES,4,2 ## @MACRONIX_NUM_READ_RETRY_MODES
	.comm	_macronix_nand_setup_read_retry,4,2 ## @macronix_nand_setup_read_retry
	.comm	_ONFI_FEATURE_ADDR_READ_RETRY,4,2 ## @ONFI_FEATURE_ADDR_READ_RETRY
	.no_dead_strip	_macronix_nand_onfi_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function macronix_nand_onfi_init
_macronix_nand_onfi_init:               ; @macronix_nand_onfi_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x8, [x8]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _MACRONIX_READ_RETRY_BIT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MACRONIX_READ_RETRY_BIT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	mov	x19, x0
Lloh3:
	adrp	x8, _MACRONIX_NUM_READ_RETRY_MODES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MACRONIX_NUM_READ_RETRY_MODES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _macronix_nand_setup_read_retry@GOTPAGE
Lloh7:
	ldr	x9, [x9, _macronix_nand_setup_read_retry@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w8, [x0]
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w0, [x19, #12]
Lloh9:
	adrp	x20, _ONFI_FEATURE_ADDR_READ_RETRY@GOTPAGE
Lloh10:
	ldr	x20, [x20, _ONFI_FEATURE_ADDR_READ_RETRY@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w2, #1
	bl	_bitmap_set
	ldr	w0, [x19, #8]
	ldr	w1, [x20]
	mov	w2, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_bitmap_set
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MACRONIX_READ_RETRY_BIT,4,2    ; @MACRONIX_READ_RETRY_BIT
	.comm	_MACRONIX_NUM_READ_RETRY_MODES,4,2 ; @MACRONIX_NUM_READ_RETRY_MODES
	.comm	_macronix_nand_setup_read_retry,4,2 ; @macronix_nand_setup_read_retry
	.comm	_ONFI_FEATURE_ADDR_READ_RETRY,4,2 ; @ONFI_FEATURE_ADDR_READ_RETRY
	.no_dead_strip	_macronix_nand_onfi_init
.subsections_via_symbols
