	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gpmi_init
_gpmi_init:                             ## @gpmi_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, %rbx
	movq	(%rdi), %rdi
	xorl	%esi, %esi
	callq	_gpmi_reset_block
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movq	8(%rbx), %r14
	movq	%rbx, %rdi
	callq	_GPMI_IS_MXS
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_gpmi_reset_block
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_BM_GPMI_CTRL1_GPMI_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HW_GPMI_CTRL1_CLR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_writel
	movq	_BM_GPMI_CTRL1_ATA_IRQRDY_POLARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HW_GPMI_CTRL1_SET@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	addq	(%rbx), %rsi
	callq	_writel
	movq	_BM_GPMI_CTRL1_DEV_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r14), %rsi
	addq	(%rbx), %rsi
	callq	_writel
	movq	_BM_GPMI_CTRL1_BCH_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r14), %rsi
	addq	(%rbx), %rsi
	callq	_writel
	movq	_BM_GPMI_CTRL1_DECOUPLE_CS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r14), %rsi
	addq	(%rbx), %rsi
	callq	_writel
	xorl	%eax, %eax
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BM_GPMI_CTRL1_GPMI_MODE,4,2    ## @BM_GPMI_CTRL1_GPMI_MODE
	.comm	_HW_GPMI_CTRL1_CLR,8,3          ## @HW_GPMI_CTRL1_CLR
	.comm	_BM_GPMI_CTRL1_ATA_IRQRDY_POLARITY,4,2 ## @BM_GPMI_CTRL1_ATA_IRQRDY_POLARITY
	.comm	_HW_GPMI_CTRL1_SET,8,3          ## @HW_GPMI_CTRL1_SET
	.comm	_BM_GPMI_CTRL1_DEV_RESET,4,2    ## @BM_GPMI_CTRL1_DEV_RESET
	.comm	_BM_GPMI_CTRL1_BCH_MODE,4,2     ## @BM_GPMI_CTRL1_BCH_MODE
	.comm	_BM_GPMI_CTRL1_DECOUPLE_CS,4,2  ## @BM_GPMI_CTRL1_DECOUPLE_CS
	.no_dead_strip	_gpmi_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gpmi_init
_gpmi_init:                             ; @gpmi_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
	ldr	x0, [x0]
	mov	w1, #0
	bl	_gpmi_reset_block
	cbnz	w0, LBB0_3
; %bb.1:
	ldr	x20, [x19, #8]
	mov	x0, x19
	bl	_GPMI_IS_MXS
	mov	x1, x0
	mov	x0, x20
	bl	_gpmi_reset_block
	cbnz	w0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _BM_GPMI_CTRL1_GPMI_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BM_GPMI_CTRL1_GPMI_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _HW_GPMI_CTRL1_CLR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HW_GPMI_CTRL1_CLR@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh6:
	adrp	x8, _BM_GPMI_CTRL1_ATA_IRQRDY_POLARITY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BM_GPMI_CTRL1_ATA_IRQRDY_POLARITY@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	x8, [x19]
Lloh9:
	adrp	x20, _HW_GPMI_CTRL1_SET@GOTPAGE
Lloh10:
	ldr	x20, [x20, _HW_GPMI_CTRL1_SET@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
Lloh11:
	adrp	x8, _BM_GPMI_CTRL1_DEV_RESET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BM_GPMI_CTRL1_DEV_RESET@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
Lloh14:
	adrp	x8, _BM_GPMI_CTRL1_BCH_MODE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BM_GPMI_CTRL1_BCH_MODE@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
Lloh17:
	adrp	x8, _BM_GPMI_CTRL1_DECOUPLE_CS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BM_GPMI_CTRL1_DECOUPLE_CS@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BM_GPMI_CTRL1_GPMI_MODE,4,2    ; @BM_GPMI_CTRL1_GPMI_MODE
	.comm	_HW_GPMI_CTRL1_CLR,8,3          ; @HW_GPMI_CTRL1_CLR
	.comm	_BM_GPMI_CTRL1_ATA_IRQRDY_POLARITY,4,2 ; @BM_GPMI_CTRL1_ATA_IRQRDY_POLARITY
	.comm	_HW_GPMI_CTRL1_SET,8,3          ; @HW_GPMI_CTRL1_SET
	.comm	_BM_GPMI_CTRL1_DEV_RESET,4,2    ; @BM_GPMI_CTRL1_DEV_RESET
	.comm	_BM_GPMI_CTRL1_BCH_MODE,4,2     ; @BM_GPMI_CTRL1_BCH_MODE
	.comm	_BM_GPMI_CTRL1_DECOUPLE_CS,4,2  ; @BM_GPMI_CTRL1_DECOUPLE_CS
	.no_dead_strip	_gpmi_init
.subsections_via_symbols
