	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __card_stopreadresponse
___card_stopreadresponse:               ## @__card_stopreadresponse
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	js	LBB0_24
## %bb.1:
	movq	%rdi, %r12
	movq	_MAX_DRIVE@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jle	LBB0_24
## %bb.2:
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%r12, %rdi
	callq	___exi_wait
	movq	_EXI_DEVICE_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	__ioCardFreq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_EXI_Select
	testq	%rax, %rax
	je	LBB0_23
## %bb.3:
	movq	_CARDIO_ERROR_READY@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	__ioClrFlag@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movl	%eax, (%rbx)
	movq	_EXI_READWRITE@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movl	$1, %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_EXI_ImmEx
	testq	%rax, %rax
	je	LBB0_31
## %bb.4:
	movl	(%r14), %eax
	movl	%eax, (%rbx)
	movl	(%r13), %ecx
	movl	$1, %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_EXI_ImmEx
	testq	%rax, %rax
	je	LBB0_31
## %bb.5:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_gettick
	movq	%rax, %r13
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %r15d
	testb	$-128, %r15b
	je	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	__ioClrFlag@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_EXI_READWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$1, %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_EXI_ImmEx
	testq	%rax, %rax
	je	LBB0_31
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%rbx), %r15d
	testb	$-128, %r15b
	je	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	$1500, %edx                     ## imm = 0x5DC
	callq	___card_checktimeout
	testq	%rax, %rax
	je	LBB0_6
## %bb.10:
	movq	__ioClrFlag@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_EXI_READWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$1, %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_EXI_ImmEx
	testq	%rax, %rax
	je	LBB0_31
## %bb.11:
	movl	(%rbx), %r15d
	testb	$-128, %r15b
	je	LBB0_13
## %bb.12:
	movq	_CARDIO_ERROR_IOTIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_13:
	cmpl	$255, %r15d
	jne	LBB0_19
LBB0_14:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	_EXI_READWRITE@GOTPCREL(%rip), %r13
LBB0_15:
	movl	%r15d, (%rbx)
	cmpq	$2, %rdx
	jl	LBB0_25
## %bb.16:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	_CARDIO_ERROR_READY@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_26
## %bb.17:
	movq	__ioClrFlag@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	addq	$4, %rbx
	decq	%rdx
	movl	(%r13), %ecx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_EXI_ImmEx
	testq	%rax, %rax
	jne	LBB0_26
## %bb.18:
	movq	_CARDIO_ERROR_IOERROR@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	__ioClrFlag@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_EXI_READWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$1, %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_EXI_ImmEx
	testq	%rax, %rax
	je	LBB0_31
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	cmpl	$255, (%rbx)
	je	LBB0_14
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	$1500, %edx                     ## imm = 0x5DC
	callq	___card_checktimeout
	testq	%rax, %rax
	jne	LBB0_27
## %bb.22:                              ##   in Loop: Header=BB0_19 Depth=1
	cmpl	$255, (%rbx)
	jne	LBB0_19
	jmp	LBB0_14
LBB0_23:
	movq	%r12, %rdi
	callq	_EXI_Unlock
LBB0_24:
	movq	_CARDIO_ERROR_NOCARD@GOTPCREL(%rip), %rax
	jmp	LBB0_32
LBB0_25:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_26:
	movq	%r12, %rdi
	callq	_EXI_Deselect
	movq	%r12, %rdi
	callq	_EXI_Unlock
	jmp	LBB0_33
LBB0_27:
	movq	__ioClrFlag@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_EXI_READWRITE@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movl	$1, %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_EXI_ImmEx
	testq	%rax, %rax
	je	LBB0_31
## %bb.28:
	cmpl	$255, (%rbx)
	je	LBB0_30
## %bb.29:
	movq	_CARDIO_ERROR_IOTIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_30:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_31:
	movq	%r12, %rdi
	callq	_EXI_Deselect
	movq	%r12, %rdi
	callq	_EXI_Unlock
	movq	_CARDIO_ERROR_IOERROR@GOTPCREL(%rip), %rax
LBB0_32:
	movq	(%rax), %r14
LBB0_33:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_DRIVE,8,3                  ## @MAX_DRIVE
	.comm	_CARDIO_ERROR_NOCARD,8,3        ## @CARDIO_ERROR_NOCARD
	.comm	_EXI_DEVICE_0,4,2               ## @EXI_DEVICE_0
	.comm	__ioCardFreq,4,2                ## @_ioCardFreq
	.comm	_CARDIO_ERROR_READY,8,3         ## @CARDIO_ERROR_READY
	.comm	__ioClrFlag,4,2                 ## @_ioClrFlag
	.comm	_EXI_READWRITE,4,2              ## @EXI_READWRITE
	.comm	_CARDIO_ERROR_IOERROR,8,3       ## @CARDIO_ERROR_IOERROR
	.comm	_CARDIO_ERROR_IOTIMEOUT,8,3     ## @CARDIO_ERROR_IOTIMEOUT
	.no_dead_strip	___card_stopreadresponse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __card_stopreadresponse
___card_stopreadresponse:               ; @__card_stopreadresponse
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	tbnz	x0, #63, LBB0_22
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _MAX_DRIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_DRIVE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	b.le	LBB0_22
; %bb.2:
	mov	x22, x2
	mov	x21, x1
	mov	x0, x19
	bl	___exi_wait
Lloh3:
	adrp	x8, _EXI_DEVICE_0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EXI_DEVICE_0@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, __ioCardFreq@GOTPAGE
Lloh7:
	ldr	x8, [x8, __ioCardFreq@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_EXI_Select
	cbz	x0, LBB0_21
; %bb.3:
Lloh9:
	adrp	x26, _CARDIO_ERROR_READY@GOTPAGE
Lloh10:
	ldr	x26, [x26, _CARDIO_ERROR_READY@GOTPAGEOFF]
Lloh11:
	adrp	x25, __ioClrFlag@GOTPAGE
Lloh12:
	ldr	x25, [x25, __ioClrFlag@GOTPAGEOFF]
	ldr	x20, [x26]
	ldr	w8, [x25]
	str	w8, [x21]
Lloh13:
	adrp	x24, _EXI_READWRITE@GOTPAGE
Lloh14:
	ldr	x24, [x24, _EXI_READWRITE@GOTPAGEOFF]
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_EXI_ImmEx
	cbz	x0, LBB0_25
; %bb.4:
	ldr	w8, [x25]
	str	w8, [x21]
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_EXI_ImmEx
	cbz	x0, LBB0_25
; %bb.5:
	bl	_gettick
	mov	x23, x0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w27, [x21]
	tbz	w27, #7, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x25]
	str	w8, [x21]
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_EXI_ImmEx
	cbz	x0, LBB0_25
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w27, [x21]
	tbz	w27, #7, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	mov	x1, x23
	mov	w2, #1500
	bl	___card_checktimeout
	cbz	x0, LBB0_6
; %bb.10:
	ldr	w8, [x25]
	str	w8, [x21]
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_EXI_ImmEx
	cbz	x0, LBB0_25
; %bb.11:
	ldr	w27, [x21]
Lloh15:
	adrp	x8, _CARDIO_ERROR_IOTIMEOUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CARDIO_ERROR_IOTIMEOUT@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	tst	w27, #0x80
	csel	x20, x20, x8, eq
LBB0_12:
	cmp	w27, #255
	b.ne	LBB0_17
LBB0_13:
	str	w27, [x21]
	cmp	x22, #2
	b.lt	LBB0_16
; %bb.14:
	ldr	x8, [x26]
	cmp	x20, x8
	b.ne	LBB0_16
; %bb.15:
	ldr	w8, [x25]
	str	w8, [x21, #4]!
	sub	x2, x22, #1
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x21
	bl	_EXI_ImmEx
Lloh18:
	adrp	x8, _CARDIO_ERROR_IOERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CARDIO_ERROR_IOERROR@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x0, #0
	csel	x20, x8, x20, eq
LBB0_16:
	mov	x0, x19
	bl	_EXI_Deselect
	mov	x0, x19
	bl	_EXI_Unlock
	b	LBB0_27
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x25]
	str	w8, [x21]
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_EXI_ImmEx
	cbz	x0, LBB0_25
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	w8, [x21]
	cmp	w8, #255
	b.eq	LBB0_13
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	x0, x19
	mov	x1, x23
	mov	w2, #1500
	bl	___card_checktimeout
	cbnz	x0, LBB0_23
; %bb.20:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	w8, [x21]
	cmp	w8, #255
	b.ne	LBB0_17
	b	LBB0_13
LBB0_21:
	mov	x0, x19
	bl	_EXI_Unlock
LBB0_22:
Lloh21:
	adrp	x8, _CARDIO_ERROR_NOCARD@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CARDIO_ERROR_NOCARD@GOTPAGEOFF]
	b	LBB0_26
LBB0_23:
	ldr	w8, [x25]
	str	w8, [x21]
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_EXI_ImmEx
	cbz	x0, LBB0_25
; %bb.24:
	ldr	w8, [x21]
Lloh23:
	adrp	x9, _CARDIO_ERROR_IOTIMEOUT@GOTPAGE
Lloh24:
	ldr	x9, [x9, _CARDIO_ERROR_IOTIMEOUT@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	w8, #255
	csel	x20, x20, x9, eq
	b	LBB0_13
LBB0_25:
	mov	x0, x19
	bl	_EXI_Deselect
	mov	x0, x19
	bl	_EXI_Unlock
Lloh26:
	adrp	x8, _CARDIO_ERROR_IOERROR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _CARDIO_ERROR_IOERROR@GOTPAGEOFF]
LBB0_26:
	ldr	x20, [x8]
LBB0_27:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_DRIVE,8,3                  ; @MAX_DRIVE
	.comm	_CARDIO_ERROR_NOCARD,8,3        ; @CARDIO_ERROR_NOCARD
	.comm	_EXI_DEVICE_0,4,2               ; @EXI_DEVICE_0
	.comm	__ioCardFreq,4,2                ; @_ioCardFreq
	.comm	_CARDIO_ERROR_READY,8,3         ; @CARDIO_ERROR_READY
	.comm	__ioClrFlag,4,2                 ; @_ioClrFlag
	.comm	_EXI_READWRITE,4,2              ; @EXI_READWRITE
	.comm	_CARDIO_ERROR_IOERROR,8,3       ; @CARDIO_ERROR_IOERROR
	.comm	_CARDIO_ERROR_IOTIMEOUT,8,3     ; @CARDIO_ERROR_IOTIMEOUT
	.no_dead_strip	___card_stopreadresponse
.subsections_via_symbols
