	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function au1xmmc_receive_pio
_au1xmmc_receive_pio:                   ## @au1xmmc_receive_pio
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_HOST_F_RECV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_27
## %bb.1:
	movq	%rdi, %r14
	movl	8(%rdi), %r12d
	movq	16(%rdi), %r15
	xorl	%ebx, %ebx
	cmpq	40(%rdi), %r15
	jae	LBB0_2
## %bb.3:
	movq	48(%r14), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r13
	leaq	(,%r15,4), %rdi
	addq	%r13, %rdi
	callq	_sg_page
	movl	%eax, %edi
	callq	_kmap_atomic
	movslq	(%r13,%r15,4), %rcx
	addq	%rax, %rcx
	movslq	24(%r14), %r15
	addq	%rcx, %r15
	movq	16(%r14), %rdi
	shlq	$2, %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	(%rax), %rdi
	callq	_sg_dma_len
	subl	24(%r14), %eax
	cmpl	%r12d, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	cmovll	%eax, %r12d
	jmp	LBB0_4
LBB0_2:
	xorl	%r15d, %r15d
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
LBB0_4:
	movq	_AU1XMMC_MAX_TRANSFER@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	cmpl	%r13d, %r12d
	cmovll	%r12d, %r13d
	testl	%r13d, %r13d
	jle	LBB0_18
## %bb.5:
	movl	%r13d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	je	LBB0_17
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_HOST_STATUS
	movl	%eax, %edi
	callq	___raw_readl
	movq	_SD_STATUS_NE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_18
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_SD_STATUS_RC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_SD_STATUS_RO@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_SD_STATUS_RU@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	callq	_HOST_RXPORT
	movl	%eax, %edi
	callq	___raw_readl
	testq	%r15, %r15
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_6 Depth=1
	movb	%al, (%r15,%rbx)
	jmp	LBB0_16
LBB0_17:
	movl	%r13d, %ebx
	jmp	LBB0_18
LBB0_8:
	movq	32(%r14), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_9
LBB0_11:
	movq	32(%r14), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_9
LBB0_13:
	movq	32(%r14), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
	leaq	L_.str.2(%rip), %rdi
LBB0_9:
	movl	%ebx, %ecx
	callq	_DBG
LBB0_18:
	testq	%r15, %r15
	je	LBB0_20
## %bb.19:
	movq	%r15, %rdi
	callq	_kunmap_atomic
LBB0_20:
	movl	8(%r14), %eax
	movl	%eax, %ecx
	subl	%ebx, %ecx
	movl	%ecx, 8(%r14)
	addl	%ebx, 24(%r14)
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	je	LBB0_23
## %bb.21:
	cmpl	%ecx, %ebx
	jne	LBB0_23
## %bb.22:
	incq	16(%r14)
	movl	$0, 24(%r14)
LBB0_23:
	cmpl	%ebx, %eax
	jne	LBB0_27
## %bb.24:
	movq	_SD_CONFIG_NE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_IRQ_OFF
	movq	_HOST_F_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_26
## %bb.25:
	movq	%r14, %rdi
	callq	_SEND_STOP
LBB0_26:
	addq	$4, %r14
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tasklet_schedule               ## TAILCALL
LBB0_27:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HOST_F_RECV,4,2                ## @HOST_F_RECV
	.comm	_AU1XMMC_MAX_TRANSFER,4,2       ## @AU1XMMC_MAX_TRANSFER
	.comm	_SD_STATUS_NE,4,2               ## @SD_STATUS_NE
	.comm	_SD_STATUS_RC,4,2               ## @SD_STATUS_RC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RX CRC Error [%d + %d].\n"

	.comm	_SD_STATUS_RO,4,2               ## @SD_STATUS_RO
L_.str.1:                               ## @.str.1
	.asciz	"RX Overrun [%d + %d]\n"

	.comm	_SD_STATUS_RU,4,2               ## @SD_STATUS_RU
L_.str.2:                               ## @.str.2
	.asciz	"RX Underrun [%d + %d]\n"

	.comm	_SD_CONFIG_NE,4,2               ## @SD_CONFIG_NE
	.comm	_HOST_F_STOP,4,2                ## @HOST_F_STOP
	.no_dead_strip	_au1xmmc_receive_pio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function au1xmmc_receive_pio
_au1xmmc_receive_pio:                   ; @au1xmmc_receive_pio
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _HOST_F_RECV@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HOST_F_RECV@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_23
; %bb.1:
	mov	x19, x0
	ldr	w21, [x0, #8]
	ldr	x8, [x0, #16]
	ldr	x9, [x0, #40]
	cmp	x8, x9
	b.hs	LBB0_3
; %bb.2:
	ldr	x9, [x19, #48]
	ldr	x22, [x9]
	ldr	x9, [x22]
	add	x20, x9, x8, lsl #2
	mov	x0, x20
	bl	_sg_page
	bl	_kmap_atomic
	ldrsw	x8, [x20]
	ldrsw	x9, [x19, #24]
	add	x8, x0, x8
	add	x20, x8, x9
	ldr	x8, [x22]
	ldr	x9, [x19, #16]
	add	x0, x8, x9, lsl #2
	bl	_sg_dma_len
	ldr	w8, [x19, #24]
	sub	w22, w0, w8
	cmp	w22, w21
	csel	w21, w22, w21, lt
	b	LBB0_4
LBB0_3:
	mov	x20, #0
	mov	w22, #0
LBB0_4:
Lloh3:
	adrp	x8, _AU1XMMC_MAX_TRANSFER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AU1XMMC_MAX_TRANSFER@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w21, w8
	csel	w23, w21, w8, lt
	cmp	w23, #1
	b.lt	LBB0_13
; %bb.5:
	mov	x21, #0
Lloh6:
	adrp	x24, _SD_STATUS_NE@GOTPAGE
Lloh7:
	ldr	x24, [x24, _SD_STATUS_NE@GOTPAGEOFF]
Lloh8:
	adrp	x25, _SD_STATUS_RC@GOTPAGE
Lloh9:
	ldr	x25, [x25, _SD_STATUS_RC@GOTPAGEOFF]
Lloh10:
	adrp	x26, _SD_STATUS_RO@GOTPAGE
Lloh11:
	ldr	x26, [x26, _SD_STATUS_RO@GOTPAGEOFF]
Lloh12:
	adrp	x27, _SD_STATUS_RU@GOTPAGE
Lloh13:
	ldr	x27, [x27, _SD_STATUS_RU@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x21, x21, #1
	cmp	x23, x21
	b.eq	LBB0_14
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_HOST_STATUS
	bl	___raw_readl
	ldr	w8, [x24]
	tst	w8, w0
	b.eq	LBB0_28
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x25]
	tst	w8, w0
	b.ne	LBB0_24
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x26]
	tst	w8, w0
	b.ne	LBB0_25
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x27]
	tst	w8, w0
	b.ne	LBB0_26
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_HOST_RXPORT
	bl	___raw_readl
	cbz	x20, LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	strb	w0, [x20, x21]
	b	LBB0_6
LBB0_13:
	mov	w23, #0
LBB0_14:
	cbz	x20, LBB0_16
LBB0_15:
	mov	x0, x20
	bl	_kunmap_atomic
LBB0_16:
	ldr	w8, [x19, #8]
	sub	w9, w8, w23
	str	w9, [x19, #8]
	ldr	w9, [x19, #24]
	add	w9, w9, w23
	str	w9, [x19, #24]
	cbz	w22, LBB0_19
; %bb.17:
	cmp	w23, w22
	b.ne	LBB0_19
; %bb.18:
	ldr	x9, [x19, #16]
	add	x9, x9, #1
	str	x9, [x19, #16]
	str	wzr, [x19, #24]
LBB0_19:
	cmp	w8, w23
	b.ne	LBB0_23
; %bb.20:
Lloh14:
	adrp	x8, _SD_CONFIG_NE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SD_CONFIG_NE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_IRQ_OFF
	ldr	w8, [x19]
Lloh17:
	adrp	x9, _HOST_F_STOP@GOTPAGE
Lloh18:
	ldr	x9, [x9, _HOST_F_STOP@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_22
; %bb.21:
	mov	x0, x19
	bl	_SEND_STOP
LBB0_22:
	add	x0, x19, #4
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_tasklet_schedule
LBB0_23:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_24:
	ldr	x8, [x19, #32]
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_27
LBB0_25:
	ldr	x8, [x19, #32]
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_27
LBB0_26:
	ldr	x8, [x19, #32]
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_27:
	mov	x3, x21
	bl	_DBG
LBB0_28:
	mov	x23, x21
	cbnz	x20, LBB0_15
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_HOST_F_RECV,4,2                ; @HOST_F_RECV
	.comm	_AU1XMMC_MAX_TRANSFER,4,2       ; @AU1XMMC_MAX_TRANSFER
	.comm	_SD_STATUS_NE,4,2               ; @SD_STATUS_NE
	.comm	_SD_STATUS_RC,4,2               ; @SD_STATUS_RC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RX CRC Error [%d + %d].\n"

	.comm	_SD_STATUS_RO,4,2               ; @SD_STATUS_RO
l_.str.1:                               ; @.str.1
	.asciz	"RX Overrun [%d + %d]\n"

	.comm	_SD_STATUS_RU,4,2               ; @SD_STATUS_RU
l_.str.2:                               ; @.str.2
	.asciz	"RX Underrun [%d + %d]\n"

	.comm	_SD_CONFIG_NE,4,2               ; @SD_CONFIG_NE
	.comm	_HOST_F_STOP,4,2                ; @HOST_F_STOP
	.no_dead_strip	_au1xmmc_receive_pio
.subsections_via_symbols
