	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cb710_check_event
_cb710_check_event:                     ## @cb710_check_event
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_CB710_MMC_STATUS_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_cb710_read_port_16
	movl	%eax, %ebx
	movq	_CB710_MMC_S0_FIFO_UNDERFLOW@GOTPCREL(%rip), %r12
	testl	%eax, (%r12)
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_cb710_slot_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%ebx, %edx
	callq	_dev_dbg
	movq	_CB710_MMC_STATUS0_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	%r15, %rdi
	callq	_cb710_write_port_8
	movl	(%r12), %eax
	notl	%eax
	andl	%eax, %ebx
LBB0_2:
	movq	_CB710_MMC_STATUS_ERROR_EVENTS@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_cb710_slot_dev
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	movl	%ebx, %edx
	callq	_dev_dbg
	movq	_CB710_MMC_STATUS0_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%bl, %edx
	movq	%r15, %rdi
	callq	_cb710_write_port_8
	movq	_CB710_MMC_STATUS1_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CB710_MMC_S1_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_cb710_write_port_8
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_4:
	sarl	$8, %ebx
	testl	%r14d, %ebx
	je	LBB0_5
## %bb.6:
	movq	_CB710_MMC_STATUS1_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_cb710_write_port_8
	movl	$1, %eax
	jmp	LBB0_7
LBB0_5:
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CB710_MMC_STATUS_PORT,4,2      ## @CB710_MMC_STATUS_PORT
	.comm	_CB710_MMC_S0_FIFO_UNDERFLOW,4,2 ## @CB710_MMC_S0_FIFO_UNDERFLOW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CHECK : ignoring bit 6 in status %04X\n"

	.comm	_CB710_MMC_STATUS0_PORT,4,2     ## @CB710_MMC_STATUS0_PORT
	.comm	_CB710_MMC_STATUS_ERROR_EVENTS,4,2 ## @CB710_MMC_STATUS_ERROR_EVENTS
L_.str.1:                               ## @.str.1
	.asciz	"CHECK : returning EIO on status %04X\n"

	.comm	_CB710_MMC_STATUS1_PORT,4,2     ## @CB710_MMC_STATUS1_PORT
	.comm	_CB710_MMC_S1_RESET,4,2         ## @CB710_MMC_S1_RESET
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_cb710_check_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cb710_check_event
_cb710_check_event:                     ; @cb710_check_event
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _CB710_MMC_STATUS_PORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CB710_MMC_STATUS_PORT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_cb710_read_port_16
	mov	x21, x0
Lloh3:
	adrp	x23, _CB710_MMC_S0_FIFO_UNDERFLOW@GOTPAGE
Lloh4:
	ldr	x23, [x23, _CB710_MMC_S0_FIFO_UNDERFLOW@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh5:
	adrp	x22, _CB710_MMC_STATUS0_PORT@GOTPAGE
Lloh6:
	ldr	x22, [x22, _CB710_MMC_STATUS0_PORT@GOTPAGEOFF]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_cb710_slot_dev
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_dbg
	ldr	w1, [x22]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_cb710_write_port_8
	ldr	w8, [x23]
	bic	w21, w21, w8
LBB0_2:
Lloh9:
	adrp	x8, _CB710_MMC_STATUS_ERROR_EVENTS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CB710_MMC_STATUS_ERROR_EVENTS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_cb710_slot_dev
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_dev_dbg
	ldr	w1, [x22]
	and	w2, w21, #0xff
	mov	x0, x19
	bl	_cb710_write_port_8
Lloh14:
	adrp	x8, _CB710_MMC_STATUS1_PORT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CB710_MMC_STATUS1_PORT@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _CB710_MMC_S1_RESET@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CB710_MMC_S1_RESET@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_cb710_write_port_8
Lloh20:
	adrp	x8, _EIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_4:
	tst	w20, w21, asr #8
	b.eq	LBB0_6
; %bb.5:
Lloh23:
	adrp	x8, _CB710_MMC_STATUS1_PORT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _CB710_MMC_STATUS1_PORT@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_cb710_write_port_8
	mov	w0, #1
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_CB710_MMC_STATUS_PORT,4,2      ; @CB710_MMC_STATUS_PORT
	.comm	_CB710_MMC_S0_FIFO_UNDERFLOW,4,2 ; @CB710_MMC_S0_FIFO_UNDERFLOW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CHECK : ignoring bit 6 in status %04X\n"

	.comm	_CB710_MMC_STATUS0_PORT,4,2     ; @CB710_MMC_STATUS0_PORT
	.comm	_CB710_MMC_STATUS_ERROR_EVENTS,4,2 ; @CB710_MMC_STATUS_ERROR_EVENTS
l_.str.1:                               ; @.str.1
	.asciz	"CHECK : returning EIO on status %04X\n"

	.comm	_CB710_MMC_STATUS1_PORT,4,2     ; @CB710_MMC_STATUS1_PORT
	.comm	_CB710_MMC_S1_RESET,4,2         ; @CB710_MMC_S1_RESET
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_cb710_check_event
.subsections_via_symbols
