	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tmio_mmc_pio_irq
_tmio_mmc_pio_irq:                      ## @tmio_mmc_pio_irq
	.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	16(%rdi), %r12
	testq	%r12, %r12
	je	LBB0_7
## %bb.1:
	movq	%rdi, %r14
	leaq	-40(%rbp), %rsi
	callq	_tmio_mmc_kmap_atomic
	movl	%eax, %r15d
	movl	(%r14), %edx
	addl	%edx, %r15d
	movq	8(%r14), %rax
	movl	(%rax), %ebx
	subl	%edx, %ebx
	movl	(%r12), %eax
	movl	4(%r12), %ecx
	cmpl	%eax, %ebx
	cmovael	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%ebx, %ecx
	shrl	%ecx
	movq	_CTL_SD_DATA_PORT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	testl	%eax, 4(%r12)
	je	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_sd_ctrl_read16_rep
	jmp	LBB0_4
LBB0_7:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_debug                       ## TAILCALL
LBB0_3:
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_sd_ctrl_write16_rep
LBB0_4:
	addl	%ebx, (%r14)
	leaq	-40(%rbp), %rsi
	movq	%r14, %rdi
	callq	_tmio_mmc_kunmap_atomic
	movl	(%r14), %eax
	movq	8(%r14), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_tmio_mmc_next_sg
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Spurious PIO IRQ\n"

L_.str.1:                               ## @.str.1
	.asciz	"count: %08x offset: %08x flags %08x\n"

	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.comm	_CTL_SD_DATA_PORT,4,2           ## @CTL_SD_DATA_PORT
	.no_dead_strip	_tmio_mmc_pio_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tmio_mmc_pio_irq
_tmio_mmc_pio_irq:                      ; @tmio_mmc_pio_irq
	.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
	ldr	x22, [x0, #16]
	cbz	x22, LBB0_3
; %bb.1:
	mov	x19, x0
	add	x1, sp, #24
	bl	_tmio_mmc_kmap_atomic
	ldr	w8, [x19]
	add	w20, w8, w0
	ldr	x9, [x19, #8]
	ldr	w9, [x9]
	ldp	w10, w11, [x22]
	sub	w9, w9, w8
	cmp	w9, w10
	csel	w21, w9, w10, lo
	stp	x8, x11, [sp, #8]
	str	x21, [sp]
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	ldr	w8, [x22, #4]
Lloh2:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _CTL_SD_DATA_PORT@GOTPAGE
Lloh6:
	ldr	x10, [x10, _CTL_SD_DATA_PORT@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x10]
	lsr	w3, w21, #1
	mov	x0, x19
	mov	x2, x20
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	bl	_sd_ctrl_read16_rep
	b	LBB0_5
LBB0_3:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	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
	b	_pr_debug
LBB0_4:
	bl	_sd_ctrl_write16_rep
LBB0_5:
	ldr	w8, [x19]
	add	w8, w8, w21
	str	w8, [x19]
	add	x1, sp, #24
	mov	x0, x19
	bl	_tmio_mmc_kunmap_atomic
	ldr	w8, [x19]
	ldr	x9, [x19, #8]
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_tmio_mmc_next_sg
LBB0_7:
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Spurious PIO IRQ\n"

l_.str.1:                               ; @.str.1
	.asciz	"count: %08x offset: %08x flags %08x\n"

	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.comm	_CTL_SD_DATA_PORT,4,2           ; @CTL_SD_DATA_PORT
	.no_dead_strip	_tmio_mmc_pio_irq
.subsections_via_symbols
