	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hynix_nand_setup_read_retry
_hynix_nand_setup_read_retry:           ## @hynix_nand_setup_read_retry
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r12
	callq	_nand_get_manufacturer_data
	movq	%rax, %r14
	movq	(%rax), %rax
	movslq	(%rax), %rcx
	movslq	%r15d, %r15
	imulq	%rcx, %r15
	shlq	$2, %r15
	addq	16(%rax), %r15
	movq	_NAND_HYNIX_CMD_SET_PARAMS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_hynix_nand_cmd_op
	testl	%eax, %eax
	je	LBB0_1
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	(%r14), %rax
	cmpl	$0, (%rax)
	jle	LBB0_6
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rax), %rax
	movl	(%rax,%rbx,4), %esi
	movl	(%r15,%rbx,4), %edx
	movq	%r12, %rdi
	callq	_hynix_nand_reg_write_op
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movq	(%r14), %rax
	movslq	(%rax), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_4
LBB0_6:
	movq	_NAND_HYNIX_CMD_APPLY_PARAMS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hynix_nand_cmd_op              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_HYNIX_CMD_SET_PARAMS,4,2  ## @NAND_HYNIX_CMD_SET_PARAMS
	.comm	_NAND_HYNIX_CMD_APPLY_PARAMS,4,2 ## @NAND_HYNIX_CMD_APPLY_PARAMS
	.no_dead_strip	_hynix_nand_setup_read_retry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hynix_nand_setup_read_retry
_hynix_nand_setup_read_retry:           ; @hynix_nand_setup_read_retry
	.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	x21, x1
	mov	x19, x0
	bl	_nand_get_manufacturer_data
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x23, [x8, #16]
	ldr	w24, [x8]
Lloh0:
	adrp	x8, _NAND_HYNIX_CMD_SET_PARAMS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_HYNIX_CMD_SET_PARAMS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hynix_nand_cmd_op
	cbz	w0, LBB0_2
LBB0_1:
	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
LBB0_2:
	ldr	x8, [x20]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x22, #0
	mul	w9, w24, w21
	add	x21, x23, w9, sxtw #2
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x8, #8]
	lsl	x9, x22, #2
	ldr	w1, [x8, x9]
	ldr	w2, [x21, x9]
	mov	x0, x19
	bl	_hynix_nand_reg_write_op
	cbnz	w0, LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	ldr	x8, [x20]
	ldrsw	x9, [x8]
	cmp	x22, x9
	b.lt	LBB0_4
LBB0_6:
Lloh3:
	adrp	x8, _NAND_HYNIX_CMD_APPLY_PARAMS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NAND_HYNIX_CMD_APPLY_PARAMS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	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
	b	_hynix_nand_cmd_op
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_HYNIX_CMD_SET_PARAMS,4,2  ; @NAND_HYNIX_CMD_SET_PARAMS
	.comm	_NAND_HYNIX_CMD_APPLY_PARAMS,4,2 ; @NAND_HYNIX_CMD_APPLY_PARAMS
	.no_dead_strip	_hynix_nand_setup_read_retry
.subsections_via_symbols
