	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CARD_ProbeEx                   ## -- Begin function CARD_ProbeEx
	.p2align	4, 0x90
_CARD_ProbeEx:                          ## @CARD_ProbeEx
	.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
	cmpq	%rdi, (%rax)
	ja	LBB0_2
## %bb.1:
	movq	%rdi, %rbx
	movq	_EXI_CHANNEL_2@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jbe	LBB0_2
## %bb.3:
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	_cardmap@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	callq	__CPU_ISR_Disable
	movq	%rbx, %rdi
	callq	_EXI_ProbeEx
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rbx, %rax
	shlq	$5, %rax
	cmpq	$0, 24(%r12,%rax)
	je	LBB0_13
## %bb.6:
	cmpl	$0, (%r12,%rax)
	jle	LBB0_7
## %bb.8:
	testq	%r15, %r15
	je	LBB0_10
## %bb.9:
	movq	8(%r12,%rax), %rcx
	movq	%rcx, (%r15)
LBB0_10:
	testq	%r14, %r14
	je	LBB0_12
## %bb.11:
	movq	16(%r12,%rax), %rax
	movq	%rax, (%r14)
LBB0_12:
	callq	__CPU_ISR_Restore
	movq	_CARD_ERROR_READY@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	jmp	LBB0_24
LBB0_2:
	movq	_CARD_ERROR_FATAL_ERROR@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	jmp	LBB0_24
LBB0_4:
	movq	_CARD_ERROR_BUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_13:
	movq	%rbx, %rdi
	callq	_EXI_GetState
	movq	_EXI_FLAG_ATTACH@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_15
LBB0_14:
	movq	_CARD_ERROR_WRONGDEVICE@GOTPCREL(%rip), %rax
LBB0_22:
	movq	(%rax), %r12
LBB0_23:
	callq	__CPU_ISR_Restore
LBB0_24:
	movq	%r12, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	__CPU_ISR_Restore
	movq	_CARD_ERROR_BUSY@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	jmp	LBB0_24
LBB0_15:
	movq	_CARD_ERROR_BUSY@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_EXI_DEVICE_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_EXI_GetID
	testq	%rax, %rax
	je	LBB0_23
## %bb.16:
	movl	-36(%rbp), %edi
	callq	___card_iscard
	testl	%eax, %eax
	je	LBB0_14
## %bb.17:
	testq	%r15, %r15
	je	LBB0_19
## %bb.18:
	movl	-36(%rbp), %eax
	andl	$252, %eax
	movq	%rax, (%r15)
LBB0_19:
	testq	%r14, %r14
	je	LBB0_21
## %bb.20:
	movl	-36(%rbp), %edi
	movl	$23, %esi
	callq	__ROTL
                                        ## kill: def $eax killed $eax def $rax
	movq	_card_sector_size@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shrl	$2, %eax
	andl	$7, %eax
	movq	(%rcx,%rax,8), %rax
	movq	%rax, (%r14)
LBB0_21:
	movq	_CARD_ERROR_READY@GOTPCREL(%rip), %rax
	jmp	LBB0_22
	.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_FATAL_ERROR,8,3     ## @CARD_ERROR_FATAL_ERROR
	.comm	_cardmap,8,3                    ## @cardmap
	.comm	_CARD_ERROR_BUSY,8,3            ## @CARD_ERROR_BUSY
	.comm	_CARD_ERROR_NOCARD,8,3          ## @CARD_ERROR_NOCARD
	.comm	_CARD_ERROR_READY,8,3           ## @CARD_ERROR_READY
	.comm	_EXI_FLAG_ATTACH,4,2            ## @EXI_FLAG_ATTACH
	.comm	_CARD_ERROR_WRONGDEVICE,8,3     ## @CARD_ERROR_WRONGDEVICE
	.comm	_EXI_DEVICE_0,4,2               ## @EXI_DEVICE_0
	.comm	_card_sector_size,8,3           ## @card_sector_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CARD_ProbeEx                   ; -- Begin function CARD_ProbeEx
	.p2align	2
_CARD_ProbeEx:                          ; @CARD_ProbeEx
	.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, #0, ls
	b.hi	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _CARD_ERROR_FATAL_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CARD_ERROR_FATAL_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	x22, [x8]
	b	LBB0_15
LBB0_2:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh9:
	adrp	x8, _cardmap@GOTPAGE
Lloh10:
	ldr	x8, [x8, _cardmap@GOTPAGEOFF]
Lloh11:
	ldr	x22, [x8]
	bl	__CPU_ISR_Disable
	mov	x0, x21
	bl	_EXI_ProbeEx
	cbz	x0, LBB0_10
; %bb.3:
	add	x8, x22, x21, lsl #5
	ldr	x8, [x8, #24]
	cbz	x8, LBB0_11
; %bb.4:
	lsl	x8, x21, #5
	ldr	w8, [x22, x8]
	cmp	w8, #0
	b.le	LBB0_16
; %bb.5:
	cbz	x20, LBB0_7
; %bb.6:
	add	x8, x22, x21, lsl #5
	ldr	x8, [x8, #8]
	str	x8, [x20]
LBB0_7:
	cbz	x19, LBB0_9
; %bb.8:
	add	x8, x22, x21, lsl #5
	ldr	x8, [x8, #16]
	str	x8, [x19]
LBB0_9:
	bl	__CPU_ISR_Restore
Lloh12:
	adrp	x8, _CARD_ERROR_READY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CARD_ERROR_READY@GOTPAGEOFF]
Lloh14:
	ldr	x22, [x8]
	b	LBB0_15
LBB0_10:
Lloh15:
	adrp	x8, _CARD_ERROR_BUSY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CARD_ERROR_BUSY@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
	mov	x0, x21
	bl	_EXI_GetState
Lloh17:
	adrp	x8, _EXI_FLAG_ATTACH@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EXI_FLAG_ATTACH@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_17
LBB0_12:
Lloh20:
	adrp	x8, _CARD_ERROR_WRONGDEVICE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CARD_ERROR_WRONGDEVICE@GOTPAGEOFF]
LBB0_13:
	ldr	x22, [x8]
LBB0_14:
	bl	__CPU_ISR_Restore
LBB0_15:
	mov	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
LBB0_16:
	bl	__CPU_ISR_Restore
Lloh22:
	adrp	x8, _CARD_ERROR_BUSY@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CARD_ERROR_BUSY@GOTPAGEOFF]
Lloh24:
	ldr	x22, [x8]
	b	LBB0_15
LBB0_17:
Lloh25:
	adrp	x8, _CARD_ERROR_BUSY@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CARD_ERROR_BUSY@GOTPAGEOFF]
Lloh27:
	ldr	x22, [x8]
Lloh28:
	adrp	x8, _EXI_DEVICE_0@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EXI_DEVICE_0@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x21
	bl	_EXI_GetID
	cbz	x0, LBB0_14
; %bb.18:
	ldr	w0, [sp, #12]
	bl	___card_iscard
	cbz	w0, LBB0_12
; %bb.19:
	cbz	x20, LBB0_21
; %bb.20:
	ldr	w8, [sp, #12]
	and	x8, x8, #0xfc
	str	x8, [x20]
LBB0_21:
	cbz	x19, LBB0_23
; %bb.22:
	ldr	w0, [sp, #12]
	mov	w1, #23
	bl	__ROTL
Lloh31:
	adrp	x8, _card_sector_size@GOTPAGE
Lloh32:
	ldr	x8, [x8, _card_sector_size@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	ubfx	w9, w0, #2, #3
	ldr	x8, [x8, w9, uxtw #3]
	str	x8, [x19]
LBB0_23:
Lloh34:
	adrp	x8, _CARD_ERROR_READY@GOTPAGE
Lloh35:
	ldr	x8, [x8, _CARD_ERROR_READY@GOTPAGEOFF]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.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_FATAL_ERROR,8,3     ; @CARD_ERROR_FATAL_ERROR
	.comm	_cardmap,8,3                    ; @cardmap
	.comm	_CARD_ERROR_BUSY,8,3            ; @CARD_ERROR_BUSY
	.comm	_CARD_ERROR_NOCARD,8,3          ; @CARD_ERROR_NOCARD
	.comm	_CARD_ERROR_READY,8,3           ; @CARD_ERROR_READY
	.comm	_EXI_FLAG_ATTACH,4,2            ; @EXI_FLAG_ATTACH
	.comm	_CARD_ERROR_WRONGDEVICE,8,3     ; @CARD_ERROR_WRONGDEVICE
	.comm	_EXI_DEVICE_0,4,2               ; @EXI_DEVICE_0
	.comm	_card_sector_size,8,3           ; @card_sector_size
.subsections_via_symbols
