	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cb710_mmc_fifo_hack
_cb710_mmc_fifo_hack:                   ## @cb710_mmc_fifo_hack
	.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
	movq	%rdi, %rbx
	movq	_CB710_MMC_DATA_PORT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_cb710_read_port_32
	movl	%eax, %r14d
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_cb710_read_port_32
	movl	%eax, %r15d
	movq	_CB710_MMC_STATUS0_PORT@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_cb710_read_port_8
	movq	_CB710_MMC_S0_FIFO_UNDERFLOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_1
## %bb.2:
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_cb710_write_port_8
	leaq	L_.str.1(%rip), %r12
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str.2(%rip), %r12
LBB0_3:
	movq	%rbx, %rdi
	callq	_cb710_slot_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%rbx, %rdi
	callq	_cb710_slot_dev
	movl	%r15d, %ecx
	orl	%r14d, %ecx
	leaq	L_.str.5(%rip), %rcx
	leaq	L_.str.4(%rip), %r8
	cmoveq	%rcx, %r8
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edi
	movl	%r14d, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CB710_MMC_DATA_PORT,4,2        ## @CB710_MMC_DATA_PORT
	.comm	_CB710_MMC_STATUS0_PORT,4,2     ## @CB710_MMC_STATUS0_PORT
	.comm	_CB710_MMC_S0_FIFO_UNDERFLOW,4,2 ## @CB710_MMC_S0_FIFO_UNDERFLOW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FIFO-read-hack: expected STATUS0 bit was %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"set."

L_.str.2:                               ## @.str.2
	.asciz	"NOT SET!"

L_.str.3:                               ## @.str.3
	.asciz	"FIFO-read-hack: dwords ignored: %08X %08X - %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"BAD (NOT ZERO)!"

L_.str.5:                               ## @.str.5
	.asciz	"ok"

	.no_dead_strip	_cb710_mmc_fifo_hack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cb710_mmc_fifo_hack
_cb710_mmc_fifo_hack:                   ; @cb710_mmc_fifo_hack
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x0
Lloh0:
	adrp	x21, _CB710_MMC_DATA_PORT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CB710_MMC_DATA_PORT@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_cb710_read_port_32
	mov	x19, x0
	ldr	w1, [x21]
	mov	x0, x20
	bl	_cb710_read_port_32
	mov	x21, x0
Lloh2:
	adrp	x22, _CB710_MMC_STATUS0_PORT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _CB710_MMC_STATUS0_PORT@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_cb710_read_port_8
Lloh4:
	adrp	x8, _CB710_MMC_S0_FIFO_UNDERFLOW@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CB710_MMC_S0_FIFO_UNDERFLOW@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	tst	w2, w0
	b.eq	LBB0_2
; %bb.1:
	ldr	w1, [x22]
	mov	x0, x20
	bl	_cb710_write_port_8
Lloh7:
	adrp	x22, l_.str.1@PAGE
Lloh8:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_2:
Lloh9:
	adrp	x22, l_.str.2@PAGE
Lloh10:
	add	x22, x22, l_.str.2@PAGEOFF
LBB0_3:
	mov	x0, x20
	bl	_cb710_slot_dev
	str	x22, [sp]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	x0, x20
	bl	_cb710_slot_dev
	orr	w8, w21, w19
Lloh13:
	adrp	x9, l_.str.4@PAGE
Lloh14:
	add	x9, x9, l_.str.4@PAGEOFF
Lloh15:
	adrp	x10, l_.str.5@PAGE
Lloh16:
	add	x10, x10, l_.str.5@PAGEOFF
	cmp	w8, #0
	csel	x8, x10, x9, eq
	stp	x21, x8, [sp, #8]
	str	x19, [sp]
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_dbg
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_CB710_MMC_DATA_PORT,4,2        ; @CB710_MMC_DATA_PORT
	.comm	_CB710_MMC_STATUS0_PORT,4,2     ; @CB710_MMC_STATUS0_PORT
	.comm	_CB710_MMC_S0_FIFO_UNDERFLOW,4,2 ; @CB710_MMC_S0_FIFO_UNDERFLOW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FIFO-read-hack: expected STATUS0 bit was %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"set."

l_.str.2:                               ; @.str.2
	.asciz	"NOT SET!"

l_.str.3:                               ; @.str.3
	.asciz	"FIFO-read-hack: dwords ignored: %08X %08X - %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"BAD (NOT ZERO)!"

l_.str.5:                               ; @.str.5
	.asciz	"ok"

	.no_dead_strip	_cb710_mmc_fifo_hack
.subsections_via_symbols
