	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hynix_nand_init
_hynix_nand_init:                       ## @hynix_nand_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	%rdi, %r14
	callq	_nand_is_slc
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_NAND_BBM_FIRSTPAGE@GOTPCREL(%rip), %rcx
	movq	_NAND_BBM_SECONDPAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	%r14, %rcx
	jmp	LBB0_3
LBB0_1:
	movl	(%r14), %eax
	movq	_NAND_BBM_LASTPAGE@GOTPCREL(%rip), %rcx
LBB0_3:
	orl	(%rcx), %eax
	movl	%eax, (%r14)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_nand_set_manufacturer_data
	movq	%r14, %rdi
	callq	_hynix_nand_rr_init
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_hynix_nand_cleanup
	jmp	LBB0_8
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_6:
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_BBM_LASTPAGE,4,2          ## @NAND_BBM_LASTPAGE
	.comm	_NAND_BBM_FIRSTPAGE,4,2         ## @NAND_BBM_FIRSTPAGE
	.comm	_NAND_BBM_SECONDPAGE,4,2        ## @NAND_BBM_SECONDPAGE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_hynix_nand_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hynix_nand_init
_hynix_nand_init:                       ; @hynix_nand_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
	mov	x19, x0
	bl	_nand_is_slc
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _NAND_BBM_FIRSTPAGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_BBM_FIRSTPAGE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _NAND_BBM_SECONDPAGE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NAND_BBM_SECONDPAGE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	mov	x9, x19
	b	LBB0_3
LBB0_2:
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _NAND_BBM_LASTPAGE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NAND_BBM_LASTPAGE@GOTPAGEOFF]
LBB0_3:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19]
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.4:
	mov	x1, x0
	mov	x0, x19
	bl	_nand_set_manufacturer_data
	mov	x0, x19
	bl	_hynix_nand_rr_init
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.5:
	mov	x0, x19
	bl	_hynix_nand_cleanup
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_BBM_LASTPAGE,4,2          ; @NAND_BBM_LASTPAGE
	.comm	_NAND_BBM_FIRSTPAGE,4,2         ; @NAND_BBM_FIRSTPAGE
	.comm	_NAND_BBM_SECONDPAGE,4,2        ; @NAND_BBM_SECONDPAGE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_hynix_nand_init
.subsections_via_symbols
