	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function at91_mci_post_dma_read
_at91_mci_post_dma_read:                ## @at91_mci_post_dma_read
	.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	%rdi, %r13
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	16(%r13), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.4:
	movq	(%r13), %rsi
	movq	8(%r13), %rax
	cmpq	%rax, %rsi
	jge	LBB0_12
## %bb.5:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_KM_BIO_SRC_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_kunmap_atomic
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	callq	_sg_page
	movl	%eax, %edi
	callq	_flush_dcache_page
	movl	(%r14), %eax
	addl	%eax, 8(%rbx)
	movq	(%r13), %rsi
	movq	8(%r13), %rax
	cmpq	%rax, %rsi
	jge	LBB0_12
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	16(%rbx), %r12
	movq	(%r13), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, (%r13)
	leaq	(%rax,%rax,2), %r15
	leaq	(%r12,%r15,4), %r14
	movl	8(%r12,%r15,4), %esi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	movl	(%r12,%r15,4), %edx
	movl	8(%r12,%r15,4), %esi
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edi, %edi
	callq	_dma_unmap_page
	xorl	%eax, %eax
	callq	_cpu_is_at91rm9200
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	callq	_sg_page
	movq	_KM_BIO_SRC_IRQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_kmap_atomic
	movslq	4(%r12,%r15,4), %rcx
	leaq	(%rax,%rcx,4), %r12
	movl	(%r14), %edx
	leaq	L_.str.5(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_pr_debug
	cmpl	$4, (%r14)
	jl	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12,%rbx,4), %edi
	callq	_swab32
	movl	%eax, (%r12,%rbx,4)
	incq	%rbx
	movl	(%r14), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movslq	%ecx, %rax
	cmpq	%rax, %rbx
	jl	LBB0_9
	jmp	LBB0_10
LBB0_12:
	cmpq	(%rbx), %rax
	jge	LBB0_14
## %bb.13:
	movq	%r13, %rdi
	callq	_at91_mci_pre_dma_read
	jmp	LBB0_15
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_16
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_16
LBB0_14:
	movq	_AT91_MCI_IDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AT91_MCI_ENDRX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_at91_mci_write
	movq	_AT91_MCI_IER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AT91_MCI_RXBUFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_at91_mci_write
LBB0_15:
	leaq	L_.str.6(%rip), %rdi
LBB0_16:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_debug                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"post dma read\n"

L_.str.1:                               ## @.str.1
	.asciz	"no command\n"

L_.str.2:                               ## @.str.2
	.asciz	"no data\n"

L_.str.3:                               ## @.str.3
	.asciz	"finishing index %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"Unmapping page %08X\n"

	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_KM_BIO_SRC_IRQ,4,2             ## @KM_BIO_SRC_IRQ
L_.str.5:                               ## @.str.5
	.asciz	"buffer = %p, length = %d\n"

	.comm	_AT91_MCI_IDR,4,2               ## @AT91_MCI_IDR
	.comm	_AT91_MCI_ENDRX,4,2             ## @AT91_MCI_ENDRX
	.comm	_AT91_MCI_IER,4,2               ## @AT91_MCI_IER
	.comm	_AT91_MCI_RXBUFF,4,2            ## @AT91_MCI_RXBUFF
L_.str.6:                               ## @.str.6
	.asciz	"post dma read done\n"

	.no_dead_strip	_at91_mci_post_dma_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function at91_mci_post_dma_read
_at91_mci_post_dma_read:                ; @at91_mci_post_dma_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_12
; %bb.1:
	ldr	x25, [x8]
	cbz	x25, LBB0_13
; %bb.2:
	ldp	x8, x9, [x19]
	cmp	x8, x9
	b.ge	LBB0_10
; %bb.3:
	mov	w26, #12
Lloh2:
	adrp	x21, l_.str.4@PAGE
Lloh3:
	add	x21, x21, l_.str.4@PAGEOFF
Lloh4:
	adrp	x27, _DMA_FROM_DEVICE@GOTPAGE
Lloh5:
	ldr	x27, [x27, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh6:
	adrp	x28, _KM_BIO_SRC_IRQ@GOTPAGE
Lloh7:
	ldr	x28, [x28, _KM_BIO_SRC_IRQ@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x28]
	mov	x0, x24
	bl	_kunmap_atomic
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	bl	_sg_page
	bl	_flush_dcache_page
	ldr	w8, [x23]
	ldr	w9, [x25, #8]
	add	w8, w9, w8
	str	w8, [x25, #8]
	ldp	x8, x9, [x19]
	cmp	x8, x9
	b.ge	LBB0_10
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	str	x8, [sp]
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_debug
	ldr	x24, [x25, #16]
	ldr	x22, [x19]
	add	x8, x22, #1
	str	x8, [x19]
	madd	x23, x22, x26, x24
	ldr	w8, [x23, #8]
	str	x8, [sp]
	mov	x0, x21
	bl	_pr_debug
	ldr	w1, [x23, #8]
	ldr	w2, [x23]
	ldr	w3, [x27]
	mov	x0, #0
	bl	_dma_unmap_page
	bl	_cpu_is_at91rm9200
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	bl	_sg_page
	ldr	w1, [x28]
	bl	_kmap_atomic
	madd	x8, x22, x26, x24
	ldrsw	x8, [x8, #4]
	add	x24, x0, x8, lsl #2
	ldr	w8, [x23]
	stp	x24, x8, [sp]
Lloh10:
	adrp	x0, l_.str.5@PAGE
Lloh11:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pr_debug
	ldr	w8, [x23]
	cmp	w8, #4
	b.lt	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x22, #0
LBB0_9:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x20, x22, #2
	ldr	w0, [x24, x20]
	bl	_swab32
	str	w0, [x24, x20]
	add	x22, x22, #1
	ldr	w8, [x23]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	cmp	x22, w8, sxtw
	b.lt	LBB0_9
	b	LBB0_4
LBB0_10:
	ldr	x8, [x25]
	cmp	x9, x8
	b.ge	LBB0_14
; %bb.11:
	mov	x0, x19
	bl	_at91_mci_pre_dma_read
	b	LBB0_15
LBB0_12:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_16
LBB0_13:
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_14:
Lloh16:
	adrp	x8, _AT91_MCI_IDR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AT91_MCI_IDR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x8, _AT91_MCI_ENDRX@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AT91_MCI_ENDRX@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_at91_mci_write
Lloh22:
	adrp	x8, _AT91_MCI_IER@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AT91_MCI_IER@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
Lloh25:
	adrp	x8, _AT91_MCI_RXBUFF@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AT91_MCI_RXBUFF@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_at91_mci_write
LBB0_15:
Lloh28:
	adrp	x0, l_.str.6@PAGE
Lloh29:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_16:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_pr_debug
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"post dma read\n"

l_.str.1:                               ; @.str.1
	.asciz	"no command\n"

l_.str.2:                               ; @.str.2
	.asciz	"no data\n"

l_.str.3:                               ; @.str.3
	.asciz	"finishing index %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"Unmapping page %08X\n"

	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_KM_BIO_SRC_IRQ,4,2             ; @KM_BIO_SRC_IRQ
l_.str.5:                               ; @.str.5
	.asciz	"buffer = %p, length = %d\n"

	.comm	_AT91_MCI_IDR,4,2               ; @AT91_MCI_IDR
	.comm	_AT91_MCI_ENDRX,4,2             ; @AT91_MCI_ENDRX
	.comm	_AT91_MCI_IER,4,2               ; @AT91_MCI_IER
	.comm	_AT91_MCI_RXBUFF,4,2            ; @AT91_MCI_RXBUFF
l_.str.6:                               ; @.str.6
	.asciz	"post dma read done\n"

	.no_dead_strip	_at91_mci_post_dma_read
.subsections_via_symbols
