	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdricoh_reset
_sdricoh_reset:                         ## @sdricoh_reset
	.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
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	_R2F0_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$65537, %edx                    ## imm = 0x10001
	callq	_sdricoh_writel
	movq	_R2E0_INIT@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$65536, %edx                    ## imm = 0x10000
	callq	_sdricoh_writel
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_sdricoh_readl
	cmpl	$65536, %eax                    ## imm = 0x10000
	jne	LBB0_1
## %bb.2:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$65543, %edx                    ## imm = 0x10007
	callq	_sdricoh_writel
	movq	_R224_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$33554432, %edx                 ## imm = 0x2000000
	callq	_sdricoh_writel
	movq	_R228_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$224, %edx
	callq	_sdricoh_writel
	movq	_R21C_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$24, %edx
	callq	_sdricoh_writel
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reset\n"

	.comm	_R2F0_RESET,4,2                 ## @R2F0_RESET
	.comm	_R2E0_INIT,4,2                  ## @R2E0_INIT
	.comm	_EIO,4,2                        ## @EIO
	.comm	_R224_MODE,4,2                  ## @R224_MODE
	.comm	_R228_POWER,4,2                 ## @R228_POWER
	.comm	_R21C_STATUS,4,2                ## @R21C_STATUS
	.no_dead_strip	_sdricoh_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdricoh_reset
_sdricoh_reset:                         ; @sdricoh_reset
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	mov	w20, #65537
	ldr	w0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh2:
	adrp	x8, _R2F0_RESET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _R2F0_RESET@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #65537
	bl	_sdricoh_writel
Lloh5:
	adrp	x21, _R2E0_INIT@GOTPAGE
Lloh6:
	ldr	x21, [x21, _R2E0_INIT@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #65536
	bl	_sdricoh_writel
	ldr	w1, [x21]
	mov	x0, x19
	bl	_sdricoh_readl
	cmp	w0, #16, lsl #12                ; =65536
	b.ne	LBB0_2
; %bb.1:
	ldr	w1, [x21]
	add	w2, w20, #6
	mov	x0, x19
	bl	_sdricoh_writel
Lloh7:
	adrp	x8, _R224_MODE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _R224_MODE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #33554432
	bl	_sdricoh_writel
Lloh10:
	adrp	x8, _R228_POWER@GOTPAGE
Lloh11:
	ldr	x8, [x8, _R228_POWER@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #224
	bl	_sdricoh_writel
Lloh13:
	adrp	x8, _R21C_STATUS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _R21C_STATUS@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #24
	bl	_sdricoh_writel
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset\n"

	.comm	_R2F0_RESET,4,2                 ; @R2F0_RESET
	.comm	_R2E0_INIT,4,2                  ; @R2E0_INIT
	.comm	_EIO,4,2                        ; @EIO
	.comm	_R224_MODE,4,2                  ; @R224_MODE
	.comm	_R228_POWER,4,2                 ; @R228_POWER
	.comm	_R21C_STATUS,4,2                ; @R21C_STATUS
	.no_dead_strip	_sdricoh_reset
.subsections_via_symbols
