	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function au1xmmc_prepare_data
_au1xmmc_prepare_data:                  ## @au1xmmc_prepare_data
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rdx
	movl	4(%rsi), %r13d
	imull	(%rsi), %r13d
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rsi)
	je	LBB0_2
## %bb.1:
	movq	_HOST_F_RECV@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_2:
	movq	_HOST_F_XMIT@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rdx), %eax
	orl	(%rcx), %eax
	movl	%eax, (%rdx)
	movq	40(%rdx), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_5
## %bb.4:
	movq	_HOST_F_STOP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rdx)
LBB0_5:
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rdx)
	movl	12(%rdx), %edi
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	callq	_mmc_dev
	movq	16(%r15), %rsi
	movl	12(%r15), %edx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	8(%rcx), %ecx
	movl	%eax, %edi
	callq	_dma_map_sg
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, 4(%rdi)
	testl	%eax, %eax
	je	LBB0_21
## %bb.6:
	movl	4(%r15), %ebx
	decl	%ebx
	callq	_HOST_BLKSIZE
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	___raw_writel
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %eax
	movq	_HOST_F_DMA@GOTPCREL(%rip), %rcx
	movq	_HOST_F_DBDMA@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_17
## %bb.7:
	callq	_DMA_CHANNEL
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_au1xxx_dbdma_stop
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	4(%rdx), %eax
	testl	%eax, %eax
	jle	LBB0_24
## %bb.8:
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rdi
	movl	(%rdi,%r12,4), %ebx
	addq	%r14, %rdi
	cmpl	%ebx, %r13d
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	cmovll	%r13d, %ebx
	decl	%eax
	movq	_DDMA_FLAGS_NOIE@GOTPCREL(%rip), %rcx
	cmpq	%rax, %r12
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_DDMA_FLAGS_IE@GOTPCREL(%rip), %rcx
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	(%rcx), %r13
	movq	_HOST_F_XMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	andl	(%rdx), %r15d
	callq	_sg_phys
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	movl	%ebx, %edx
	movq	%r13, %rcx
	callq	_au1xxx_dbdma_put_source
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	movl	%ebx, %edx
	movq	%r13, %rcx
	callq	_au1xxx_dbdma_put_dest
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	testq	%rax, %rax
	je	LBB0_20
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
	subl	%ebx, %r13d
	incq	%r12
	movslq	4(%rdx), %rax
	addq	$4, %r14
	cmpq	%rax, %r12
	jl	LBB0_9
	jmp	LBB0_24
LBB0_17:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rdi)
	movl	%r13d, 16(%rdi)
	movq	_HOST_F_XMIT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_22
## %bb.18:
	movq	_SD_CONFIG_TH@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_20:
	movl	12(%rdx), %edi
	movq	%rdx, %rbx
	callq	_mmc_dev
	movq	16(%r15), %rsi
	movl	12(%r15), %edx
	movl	8(%rbx), %ecx
	movl	%eax, %edi
	callq	_dma_unmap_sg
LBB0_21:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_25
LBB0_22:
	movq	_SD_CONFIG_NE@GOTPCREL(%rip), %rax
LBB0_23:
	movl	(%rax), %esi
	callq	_IRQ_ON
LBB0_24:
	xorl	%eax, %eax
LBB0_25:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.comm	_HOST_F_RECV,4,2                ## @HOST_F_RECV
	.comm	_HOST_F_XMIT,4,2                ## @HOST_F_XMIT
	.comm	_HOST_F_STOP,4,2                ## @HOST_F_STOP
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_HOST_F_DMA,4,2                 ## @HOST_F_DMA
	.comm	_HOST_F_DBDMA,4,2               ## @HOST_F_DBDMA
	.comm	_DDMA_FLAGS_NOIE,8,3            ## @DDMA_FLAGS_NOIE
	.comm	_DDMA_FLAGS_IE,8,3              ## @DDMA_FLAGS_IE
	.comm	_SD_CONFIG_TH,4,2               ## @SD_CONFIG_TH
	.comm	_SD_CONFIG_NE,4,2               ## @SD_CONFIG_NE
	.no_dead_strip	_au1xmmc_prepare_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function au1xmmc_prepare_data
_au1xmmc_prepare_data:                  ; @au1xmmc_prepare_data
	.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
	mov	x20, x1
	mov	x19, x0
	ldp	w21, w22, [x1]
	ldr	w8, [x1, #8]
Lloh0:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _HOST_F_RECV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HOST_F_RECV@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
Lloh5:
	adrp	x8, _HOST_F_XMIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HOST_F_XMIT@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	x9, [x19, #40]
	ldr	x9, [x9]
	cbz	x9, LBB0_5
; %bb.4:
Lloh7:
	adrp	x9, _HOST_F_STOP@GOTPAGE
Lloh8:
	ldr	x9, [x9, _HOST_F_STOP@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19]
LBB0_5:
Lloh10:
	adrp	x8, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	ldr	w0, [x19, #12]
	bl	_mmc_dev
	ldr	x1, [x20, #16]
	ldr	w2, [x20, #12]
	ldr	w3, [x19, #8]
	bl	_dma_map_sg
	str	w0, [x19, #4]
	cbz	w0, LBB0_14
; %bb.6:
	mul	w24, w22, w21
	ldr	w8, [x20, #4]
	sub	w21, w8, #1
	mov	x0, x19
	bl	_HOST_BLKSIZE
	mov	x1, x0
	mov	x0, x21
	bl	___raw_writel
	ldr	w8, [x19]
Lloh13:
	adrp	x9, _HOST_F_DMA@GOTPAGE
Lloh14:
	ldr	x9, [x9, _HOST_F_DMA@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x10, _HOST_F_DBDMA@GOTPAGE
Lloh17:
	ldr	x10, [x10, _HOST_F_DBDMA@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_15
; %bb.7:
	mov	x0, x19
	bl	_DMA_CHANNEL
	mov	x21, x0
	bl	_au1xxx_dbdma_stop
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.8:
	mov	x25, #0
	mov	x26, #0
Lloh19:
	adrp	x27, _HOST_F_XMIT@GOTPAGE
Lloh20:
	ldr	x27, [x27, _HOST_F_XMIT@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	bl	_au1xxx_dbdma_put_dest
	cbz	x0, LBB0_13
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	sub	w24, w24, w22
	add	x26, x26, #1
	ldrsw	x8, [x19, #4]
	add	x25, x25, #4
	cmp	x26, x8
	b.ge	LBB0_19
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #16]
	add	x0, x9, x25
	ldr	w9, [x9, x26, lsl #2]
	cmp	w24, w9
	csel	w22, w24, w9, lt
	sub	w8, w8, #1
	cmp	x26, x8
Lloh21:
	adrp	x8, _DDMA_FLAGS_IE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DDMA_FLAGS_IE@GOTPAGEOFF]
Lloh23:
	adrp	x9, _DDMA_FLAGS_NOIE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _DDMA_FLAGS_NOIE@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	x23, [x8]
	ldr	w8, [x19]
	ldr	w9, [x27]
	and	w28, w9, w8
	bl	_sg_phys
	mov	x1, x0
	mov	x0, x21
	mov	x2, x22
	mov	x3, x23
	cbz	w28, LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	bl	_au1xxx_dbdma_put_source
	cbnz	x0, LBB0_10
LBB0_13:
	ldr	w0, [x19, #12]
	bl	_mmc_dev
	ldr	x1, [x20, #16]
	ldr	w2, [x20, #12]
	ldr	w3, [x19, #8]
	bl	_dma_unmap_sg
LBB0_14:
Lloh25:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_20
LBB0_15:
	stp	xzr, xzr, [x19, #24]
	str	w24, [x19, #16]
Lloh28:
	adrp	x9, _HOST_F_XMIT@GOTPAGE
Lloh29:
	ldr	x9, [x9, _HOST_F_XMIT@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.16:
Lloh31:
	adrp	x8, _SD_CONFIG_TH@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SD_CONFIG_TH@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh33:
	adrp	x8, _SD_CONFIG_NE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _SD_CONFIG_NE@GOTPAGEOFF]
LBB0_18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_IRQ_ON
LBB0_19:
	mov	w0, #0
LBB0_20:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.comm	_HOST_F_RECV,4,2                ; @HOST_F_RECV
	.comm	_HOST_F_XMIT,4,2                ; @HOST_F_XMIT
	.comm	_HOST_F_STOP,4,2                ; @HOST_F_STOP
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_HOST_F_DMA,4,2                 ; @HOST_F_DMA
	.comm	_HOST_F_DBDMA,4,2               ; @HOST_F_DBDMA
	.comm	_DDMA_FLAGS_NOIE,8,3            ; @DDMA_FLAGS_NOIE
	.comm	_DDMA_FLAGS_IE,8,3              ; @DDMA_FLAGS_IE
	.comm	_SD_CONFIG_TH,4,2               ; @SD_CONFIG_TH
	.comm	_SD_CONFIG_NE,4,2               ; @SD_CONFIG_NE
	.no_dead_strip	_au1xmmc_prepare_data
.subsections_via_symbols
