	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __card_datares
___card_datares:                        ## @__card_datares
	.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
	pushq	%rax
	.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, %r15
	movq	_MAX_DRIVE@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jle	LBB0_24
## %bb.2:
	movq	%rsi, %rbx
	movq	%r15, %rdi
	callq	___exi_wait
	movq	_EXI_DEVICE_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	__ioCardFreq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_EXI_Select
	testq	%rax, %rax
	je	LBB0_23
## %bb.3:
	movq	_CARDIO_ERROR_READY@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	__ioClrFlag@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_EXI_READWRITE@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_EXI_ImmEx
	testq	%rax, %rax
	je	LBB0_22
## %bb.4:
	xorl	%eax, %eax
	callq	_gettick
	movq	%rax, %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	testb	$16, (%rbx)
	je	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	__ioClrFlag@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movl	(%r13), %ecx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_EXI_ImmEx
	testq	%rax, %rax
	je	LBB0_22
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	testb	$16, (%rbx)
	je	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$1500, %edx                     ## imm = 0x5DC
	callq	___card_checktimeout
	testq	%rax, %rax
	je	LBB0_5
## %bb.9:
	movq	__ioClrFlag@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movl	(%r13), %ecx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_EXI_ImmEx
	testq	%rax, %rax
	je	LBB0_22
## %bb.10:
	testb	$16, (%rbx)
	je	LBB0_12
## %bb.11:
	movq	_CARDIO_ERROR_IOTIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
LBB0_12:
	movq	__ioClrFlag@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	addq	$4, %rbx
	movl	(%r13), %ecx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_EXI_ImmEx
	testq	%rax, %rax
	je	LBB0_22
## %bb.13:
	xorl	%eax, %eax
	callq	_gettick
	movq	%rax, %r12
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rbx)
	jne	LBB0_21
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	__ioClrFlag@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movl	(%r13), %ecx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_EXI_ImmEx
	testq	%rax, %rax
	je	LBB0_22
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpl	$0, (%rbx)
	jne	LBB0_21
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$1500, %edx                     ## imm = 0x5DC
	callq	___card_checktimeout
	testq	%rax, %rax
	je	LBB0_14
## %bb.18:
	movq	__ioClrFlag@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movl	(%r13), %ecx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_EXI_ImmEx
	testq	%rax, %rax
	je	LBB0_22
## %bb.19:
	cmpl	$0, (%rbx)
	jne	LBB0_21
## %bb.20:
	movq	_CARDIO_ERROR_IOTIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
LBB0_21:
	movq	%r15, %rdi
	callq	_EXI_Deselect
	movq	%r15, %rdi
	callq	_EXI_Unlock
	jmp	LBB0_26
LBB0_22:
	movq	%r15, %rdi
	callq	_EXI_Deselect
	movq	%r15, %rdi
	callq	_EXI_Unlock
	movq	_CARDIO_ERROR_IOERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_23:
	movq	%r15, %rdi
	callq	_EXI_Unlock
LBB0_24:
	movq	_CARDIO_ERROR_NOCARD@GOTPCREL(%rip), %rax
LBB0_25:
	movq	(%rax), %r14
LBB0_26:
	movq	%r14, %rax
	addq	$8, %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_datares
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __card_datares
___card_datares:                        ; @__card_datares
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	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	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	x8, _CARDIO_ERROR_READY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CARDIO_ERROR_READY@GOTPAGEOFF]
Lloh11:
	adrp	x23, __ioClrFlag@GOTPAGE
Lloh12:
	ldr	x23, [x23, __ioClrFlag@GOTPAGEOFF]
Lloh13:
	ldr	x20, [x8]
	ldr	w8, [x23]
	str	w8, [x21]
Lloh14:
	adrp	x24, _EXI_READWRITE@GOTPAGE
Lloh15:
	ldr	x24, [x24, _EXI_READWRITE@GOTPAGEOFF]
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_EXI_ImmEx
	cbz	x0, LBB0_20
; %bb.4:
	bl	_gettick
	mov	x22, x0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x21]
	tbz	w8, #4, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x23]
	str	w8, [x21]
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_EXI_ImmEx
	cbz	x0, LBB0_20
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrb	w8, [x21]
	tbz	w8, #4, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	w2, #1500
	bl	___card_checktimeout
	cbz	x0, LBB0_5
; %bb.9:
	ldr	w8, [x23]
	str	w8, [x21]
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_EXI_ImmEx
	cbz	x0, LBB0_20
; %bb.10:
Lloh16:
	adrp	x8, _CARDIO_ERROR_IOTIMEOUT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CARDIO_ERROR_IOTIMEOUT@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	ldrb	w9, [x21]
	tst	w9, #0x10
	csel	x20, x20, x8, eq
LBB0_11:
	ldr	w8, [x23]
	str	w8, [x21, #4]!
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_EXI_ImmEx
	cbz	x0, LBB0_20
; %bb.12:
	bl	_gettick
	mov	x22, x0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21]
	cbnz	w8, LBB0_19
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x23]
	str	w8, [x21]
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_EXI_ImmEx
	cbz	x0, LBB0_20
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x21]
	cbnz	w8, LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	w2, #1500
	bl	___card_checktimeout
	cbz	x0, LBB0_13
; %bb.17:
	ldr	w8, [x23]
	str	w8, [x21]
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_EXI_ImmEx
	cbz	x0, LBB0_20
; %bb.18:
	ldr	w8, [x21]
Lloh19:
	adrp	x9, _CARDIO_ERROR_IOTIMEOUT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _CARDIO_ERROR_IOTIMEOUT@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	w8, #0
	csel	x20, x9, x20, eq
LBB0_19:
	mov	x0, x19
	bl	_EXI_Deselect
	mov	x0, x19
	bl	_EXI_Unlock
	b	LBB0_24
LBB0_20:
	mov	x0, x19
	bl	_EXI_Deselect
	mov	x0, x19
	bl	_EXI_Unlock
Lloh22:
	adrp	x8, _CARDIO_ERROR_IOERROR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CARDIO_ERROR_IOERROR@GOTPAGEOFF]
	b	LBB0_23
LBB0_21:
	mov	x0, x19
	bl	_EXI_Unlock
LBB0_22:
Lloh24:
	adrp	x8, _CARDIO_ERROR_NOCARD@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CARDIO_ERROR_NOCARD@GOTPAGEOFF]
LBB0_23:
	ldr	x20, [x8]
LBB0_24:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.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_datares
.subsections_via_symbols
