	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CARD_GetStatus                 ## -- Begin function CARD_GetStatus
	.p2align	4, 0x90
_CARD_GetStatus:                        ## @CARD_GetStatus
	.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	$0, -40(%rbp)
	movq	_EXI_CHANNEL_0@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jg	LBB0_8
## %bb.1:
	movq	_EXI_CHANNEL_2@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jle	LBB0_8
## %bb.2:
	movq	%rsi, %rbx
	testq	%rsi, %rsi
	js	LBB0_9
## %bb.3:
	movq	_CARD_MAXFILES@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jle	LBB0_9
## %bb.4:
	movq	%rdx, %r14
	leaq	-40(%rbp), %rsi
	callq	___card_getcntrlblock
	testq	%rax, %rax
	js	LBB0_11
## %bb.5:
	movq	-40(%rbp), %rdi
	callq	___card_getdirblock
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	(%rax), %r15
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r15,%rbx,8), %r12
	movl	36(%r14), %edi
	movl	36(%r15,%rbx,8), %esi
	movl	$4, %edx
	callq	_memcpy
	movl	32(%r14), %edi
	movl	32(%r15,%rbx,8), %esi
	movl	$2, %edx
	callq	_memcpy
	movl	28(%r14), %edi
	movl	28(%r15,%rbx,8), %esi
	movq	_CARD_FILENAMELEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	movq	-40(%rbp), %rax
	movl	(%rax), %eax
	imull	(%r15,%rbx,8), %eax
	movl	%eax, (%r14)
	movl	24(%r15,%rbx,8), %eax
	movl	%eax, 24(%r14)
	movl	20(%r15,%rbx,8), %eax
	movl	%eax, 20(%r14)
	movups	4(%r15,%rbx,8), %xmm0
	movups	%xmm0, 4(%r14)
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	___card_updateiconoffsets
LBB0_7:
	movq	-40(%rbp), %rdi
	movq	_CARD_ERROR_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	___card_putcntrlblock
	jmp	LBB0_11
LBB0_8:
	movq	_CARD_ERROR_NOCARD@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_CARD_ERROR_FATAL_ERROR@GOTPCREL(%rip), %rax
LBB0_10:
	movq	(%rax), %rax
LBB0_11:
	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	_CARD_MAXFILES,8,3              ## @CARD_MAXFILES
	.comm	_CARD_ERROR_FATAL_ERROR,8,3     ## @CARD_ERROR_FATAL_ERROR
	.comm	_CARD_FILENAMELEN,4,2           ## @CARD_FILENAMELEN
	.comm	_CARD_ERROR_READY,4,2           ## @CARD_ERROR_READY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CARD_GetStatus                 ; -- Begin function CARD_GetStatus
	.p2align	2
_CARD_GetStatus:                        ; @CARD_GetStatus
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	str	xzr, [sp, #8]
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	x8, _CARD_ERROR_NOCARD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CARD_ERROR_NOCARD@GOTPAGEOFF]
	b	LBB0_9
LBB0_2:
	mov	x20, x1
	tbnz	x1, #63, LBB0_8
; %bb.3:
Lloh8:
	adrp	x8, _CARD_MAXFILES@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CARD_MAXFILES@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x8, x20
	b.le	LBB0_8
; %bb.4:
	mov	x19, x2
	add	x1, sp, #8
	bl	___card_getcntrlblock
	tbnz	x0, #63, LBB0_10
; %bb.5:
	ldr	x0, [sp, #8]
	bl	___card_getdirblock
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x8, [x0]
	mov	w9, #40
	madd	x20, x20, x9, x8
	ldr	w0, [x19, #36]
	ldr	w1, [x20, #36]
	mov	w2, #4
	bl	_memcpy
	ldr	w0, [x19, #32]
	ldr	w1, [x20, #32]
	mov	w2, #2
	bl	_memcpy
	ldr	w0, [x19, #28]
	ldr	w1, [x20, #28]
Lloh11:
	adrp	x8, _CARD_FILENAMELEN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CARD_FILENAMELEN@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_memcpy
	ldr	w8, [x20]
	ldr	x9, [sp, #8]
	ldr	w9, [x9]
	mul	w8, w9, w8
	str	w8, [x19]
	ldur	d0, [x20, #20]
	stur	d0, [x19, #20]
	ldur	q0, [x20, #4]
	stur	q0, [x19, #4]
	mov	x0, x20
	mov	x1, x19
	bl	___card_updateiconoffsets
LBB0_7:
	ldr	x0, [sp, #8]
Lloh14:
	adrp	x8, _CARD_ERROR_READY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CARD_ERROR_READY@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	___card_putcntrlblock
	b	LBB0_10
LBB0_8:
Lloh17:
	adrp	x8, _CARD_ERROR_FATAL_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CARD_ERROR_FATAL_ERROR@GOTPAGEOFF]
LBB0_9:
	ldr	x0, [x8]
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	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	_CARD_MAXFILES,8,3              ; @CARD_MAXFILES
	.comm	_CARD_ERROR_FATAL_ERROR,8,3     ; @CARD_ERROR_FATAL_ERROR
	.comm	_CARD_FILENAMELEN,4,2           ; @CARD_FILENAMELEN
	.comm	_CARD_ERROR_READY,4,2           ; @CARD_ERROR_READY
.subsections_via_symbols
