	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __card_getcntrlblock
___card_getcntrlblock:                  ## @__card_getcntrlblock
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_EXI_CHANNEL_0@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	ja	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	movq	_EXI_CHANNEL_2@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jbe	LBB0_6
## %bb.2:
	movq	%rsi, %r14
	callq	__CPU_ISR_Disable
	movq	_cardmap@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rbx,%rbx,2), %rcx
	cmpl	$0, 16(%rax,%rcx,8)
	je	LBB0_7
## %bb.3:
	leaq	(%rax,%rcx,8), %rdx
	movq	_CARD_ERROR_BUSY@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rbx
	cmpq	%rbx, (%rdx)
	je	LBB0_5
## %bb.4:
	movq	%rbx, (%rdx)
	movq	$0, 8(%rax,%rcx,8)
	movq	%rdx, (%r14)
	movq	_CARD_ERROR_READY@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_5:
	callq	__CPU_ISR_Restore
	jmp	LBB0_9
LBB0_6:
	movq	_CARD_ERROR_FATAL_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	callq	__CPU_ISR_Restore
	movq	_CARD_ERROR_NOCARD@GOTPCREL(%rip), %rax
LBB0_8:
	movq	(%rax), %rbx
LBB0_9:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r14
	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_FATAL_ERROR,8,3     ## @CARD_ERROR_FATAL_ERROR
	.comm	_cardmap,8,3                    ## @cardmap
	.comm	_CARD_ERROR_NOCARD,8,3          ## @CARD_ERROR_NOCARD
	.comm	_CARD_ERROR_BUSY,8,3            ## @CARD_ERROR_BUSY
	.comm	_CARD_ERROR_READY,8,3           ## @CARD_ERROR_READY
	.no_dead_strip	___card_getcntrlblock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __card_getcntrlblock
___card_getcntrlblock:                  ; @__card_getcntrlblock
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.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]
	b	LBB0_7
LBB0_2:
	mov	x19, x1
	mov	x20, x0
	bl	__CPU_ISR_Disable
Lloh8:
	adrp	x8, _cardmap@GOTPAGE
Lloh9:
	ldr	x8, [x8, _cardmap@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x8]
	mov	w8, #24
	madd	x8, x20, x8, x9
	ldr	w10, [x8, #16]
	cbz	w10, LBB0_6
; %bb.3:
Lloh11:
	adrp	x10, _CARD_ERROR_BUSY@GOTPAGE
Lloh12:
	ldr	x10, [x10, _CARD_ERROR_BUSY@GOTPAGEOFF]
Lloh13:
	ldr	x21, [x10]
	ldr	x10, [x8]
	cmp	x10, x21
	b.eq	LBB0_5
; %bb.4:
	str	x21, [x8]
	mov	w10, #24
	madd	x9, x20, x10, x9
	str	xzr, [x9, #8]
	str	x8, [x19]
Lloh14:
	adrp	x8, _CARD_ERROR_READY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CARD_ERROR_READY@GOTPAGEOFF]
Lloh16:
	ldr	x21, [x8]
LBB0_5:
	bl	__CPU_ISR_Restore
	b	LBB0_8
LBB0_6:
	bl	__CPU_ISR_Restore
Lloh17:
	adrp	x8, _CARD_ERROR_NOCARD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CARD_ERROR_NOCARD@GOTPAGEOFF]
LBB0_7:
	ldr	x21, [x8]
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	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_FATAL_ERROR,8,3     ; @CARD_ERROR_FATAL_ERROR
	.comm	_cardmap,8,3                    ; @cardmap
	.comm	_CARD_ERROR_NOCARD,8,3          ; @CARD_ERROR_NOCARD
	.comm	_CARD_ERROR_BUSY,8,3            ; @CARD_ERROR_BUSY
	.comm	_CARD_ERROR_READY,8,3           ; @CARD_ERROR_READY
	.no_dead_strip	___card_getcntrlblock
.subsections_via_symbols
