	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __card_readcid
___card_readcid:                        ## @__card_readcid
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	movl	$0, -32(%rbp)
	testq	%rdi, %rdi
	js	LBB0_2
## %bb.1:
	movq	%rdi, %rbx
	movq	_MAX_DRIVE@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jle	LBB0_2
## %bb.3:
	movl	$10, -48(%rbp)
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$5, %edx
	callq	___card_writecmd
	testq	%rax, %rax
	jne	LBB0_8
## %bb.4:
	movq	__ioResponse@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	___card_readresponse
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	___check_response
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_6
LBB0_7:
	movq	%r14, %rax
	jmp	LBB0_8
LBB0_2:
	movq	_CARDIO_ERROR_NOCARD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_10
## %bb.9:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movq	_g_CID@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%rbx, %rdi
	movl	$16, %edx
	callq	___card_dataread
	testq	%rax, %rax
	jne	LBB0_8
	jmp	LBB0_7
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_DRIVE,8,3                  ## @MAX_DRIVE
	.comm	_CARDIO_ERROR_NOCARD,8,3        ## @CARDIO_ERROR_NOCARD
	.comm	__ioResponse,8,3                ## @_ioResponse
	.comm	_g_CID,8,3                      ## @g_CID
	.no_dead_strip	___card_readcid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __card_readcid
___card_readcid:                        ; @__card_readcid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	stp	xzr, xzr, [sp, #8]
	tbnz	x0, #63, LBB0_6
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _MAX_DRIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_DRIVE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x0
	b.le	LBB0_6
; %bb.2:
	mov	w8, #10
	str	w8, [sp, #4]
	add	x1, sp, #4
	mov	x0, x19
	mov	w2, #5
	bl	___card_writecmd
	cbnz	x0, LBB0_7
; %bb.3:
Lloh6:
	adrp	x20, __ioResponse@GOTPAGE
Lloh7:
	ldr	x20, [x20, __ioResponse@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x1, [x8, x19, lsl #3]
	mov	x0, x19
	mov	w2, #1
	bl	___card_readresponse
	cbnz	x0, LBB0_7
; %bb.4:
	ldr	x8, [x20]
	ldr	x8, [x8, x19, lsl #3]
	ldr	w1, [x8]
	mov	x0, x19
	bl	___check_response
	mov	x20, x0
	cbz	x0, LBB0_9
LBB0_5:
	mov	x0, x20
	b	LBB0_7
LBB0_6:
Lloh8:
	adrp	x8, _CARDIO_ERROR_NOCARD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CARDIO_ERROR_NOCARD@GOTPAGEOFF]
Lloh10:
	ldr	x0, [x8]
LBB0_7:
	ldr	x8, [sp, #24]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_9:
Lloh14:
	adrp	x8, _g_CID@GOTPAGE
Lloh15:
	ldr	x8, [x8, _g_CID@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldr	w1, [x8, x19, lsl #2]
	mov	x0, x19
	mov	w2, #16
	bl	___card_dataread
	cbnz	x0, LBB0_7
	b	LBB0_5
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_DRIVE,8,3                  ; @MAX_DRIVE
	.comm	_CARDIO_ERROR_NOCARD,8,3        ; @CARDIO_ERROR_NOCARD
	.comm	__ioResponse,8,3                ; @_ioResponse
	.comm	_g_CID,8,3                      ; @g_CID
	.no_dead_strip	___card_readcid
.subsections_via_symbols
