	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __card_clearstatus
___card_clearstatus:                    ## @__card_clearstatus
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_EXI_CHANNEL_0@GOTPCREL(%rip), %rax
	movq	_CARD_ERROR_NOCARD@GOTPCREL(%rip), %r12
	cmpq	%rdi, (%rax)
	jg	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	movq	_EXI_CHANNEL_2@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jle	LBB0_6
## %bb.2:
	movq	_EXI_DEVICE_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_EXI_SPEED16MHZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_EXI_Select
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movl	$137, -36(%rbp)
	movq	_EXI_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-36(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	xorl	%r8d, %r8d
	callq	_EXI_Imm
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_EXI_Sync
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_EXI_Deselect
	movq	_CARD_ERROR_NOCARD@GOTPCREL(%rip), %rcx
	movq	%rcx, %r12
	testq	%r15, %r15
	je	LBB0_5
## %bb.4:
	movq	_CARD_ERROR_READY@GOTPCREL(%rip), %r12
LBB0_5:
	testq	%r14, %r14
	cmoveq	%rcx, %r12
	testq	%rax, %rax
	cmoveq	%rcx, %r12
LBB0_6:
	movq	(%r12), %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXI_CHANNEL_0,8,3              ## @EXI_CHANNEL_0
	.comm	_EXI_CHANNEL_2,8,3              ## @EXI_CHANNEL_2
	.comm	_CARD_ERROR_NOCARD,8,3          ## @CARD_ERROR_NOCARD
	.comm	_EXI_DEVICE_0,4,2               ## @EXI_DEVICE_0
	.comm	_EXI_SPEED16MHZ,4,2             ## @EXI_SPEED16MHZ
	.comm	_EXI_WRITE,4,2                  ## @EXI_WRITE
	.comm	_CARD_ERROR_READY,8,3           ## @CARD_ERROR_READY
	.no_dead_strip	___card_clearstatus
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __card_clearstatus
___card_clearstatus:                    ; @__card_clearstatus
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
Lloh0:
	adrp	x8, _EXI_CHANNEL_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXI_CHANNEL_0@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _EXI_CHANNEL_2@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EXI_CHANNEL_2@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x0
	ccmp	x9, x0, #4, le
	b.gt	LBB0_2
; %bb.1:
Lloh6:
	adrp	x22, _CARD_ERROR_NOCARD@GOTPAGE
Lloh7:
	ldr	x22, [x22, _CARD_ERROR_NOCARD@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	mov	x19, x0
Lloh8:
	adrp	x8, _EXI_DEVICE_0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EXI_DEVICE_0@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _EXI_SPEED16MHZ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EXI_SPEED16MHZ@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_EXI_Select
Lloh14:
	adrp	x22, _CARD_ERROR_NOCARD@GOTPAGE
Lloh15:
	ldr	x22, [x22, _CARD_ERROR_NOCARD@GOTPAGEOFF]
	cbz	x0, LBB0_4
; %bb.3:
	mov	w8, #137
	str	w8, [sp, #12]
Lloh16:
	adrp	x8, _EXI_WRITE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EXI_WRITE@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #1
	mov	x4, #0
	bl	_EXI_Imm
	mov	x20, x0
	mov	x0, x19
	bl	_EXI_Sync
	mov	x21, x0
	mov	x0, x19
	bl	_EXI_Deselect
	cmp	x20, #0
	ccmp	x21, #0, #4, ne
	ccmp	x0, #0, #4, ne
Lloh19:
	adrp	x8, _CARD_ERROR_READY@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CARD_ERROR_READY@GOTPAGEOFF]
	csel	x22, x8, x22, ne
LBB0_4:
	ldr	x0, [x22]
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EXI_CHANNEL_0,8,3              ; @EXI_CHANNEL_0
	.comm	_EXI_CHANNEL_2,8,3              ; @EXI_CHANNEL_2
	.comm	_CARD_ERROR_NOCARD,8,3          ; @CARD_ERROR_NOCARD
	.comm	_EXI_DEVICE_0,4,2               ; @EXI_DEVICE_0
	.comm	_EXI_SPEED16MHZ,4,2             ; @EXI_SPEED16MHZ
	.comm	_EXI_WRITE,4,2                  ; @EXI_WRITE
	.comm	_CARD_ERROR_READY,8,3           ; @CARD_ERROR_READY
	.no_dead_strip	___card_clearstatus
.subsections_via_symbols
