	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	4(%rsi), %r15d
	imull	(%rsi), %r15d
	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	(%rbx), %eax
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
	movq	40(%rbx), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_5
## %bb.4:
	movq	_HOST_F_STOP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
LBB0_5:
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movl	12(%rbx), %edi
	callq	_mmc_dev
	movq	16(%r14), %rsi
	movl	12(%r14), %edx
	movl	8(%rbx), %ecx
	movl	%eax, %edi
	callq	_dma_map_sg
	movl	%eax, 4(%rbx)
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	4(%r14), %r14d
	decl	%r14d
	movq	%rbx, %rdi
	callq	_HOST_BLKSIZE
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_au_writel
	movl	(%rbx), %eax
	movq	_HOST_F_DMA@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	testl	%eax, (%rcx)
	jne	LBB0_12
## %bb.8:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	movl	%r15d, 16(%rbx)
	movq	_HOST_F_XMIT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.9:
	movq	_SD_CONFIG_TH@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_6:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_10:
	movq	_SD_CONFIG_NE@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_IRQ_ON
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	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	_SD_CONFIG_TH,4,2               ## @SD_CONFIG_TH
	.comm	_SD_CONFIG_NE,4,2               ## @SD_CONFIG_NE
	.comm	_DDMA_FLAGS_IE,8,3              ## @DDMA_FLAGS_IE
	.comm	_DDMA_FLAGS_NOIE,8,3            ## @DDMA_FLAGS_NOIE
	.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	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, 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_9
; %bb.6:
	ldr	w8, [x20, #4]
	sub	w20, w8, #1
	mov	x0, x19
	bl	_HOST_BLKSIZE
	mov	x1, x0
	mov	x0, x20
	bl	_au_writel
	ldr	w8, [x19]
Lloh13:
	adrp	x9, _HOST_F_DMA@GOTPAGE
Lloh14:
	ldr	x9, [x9, _HOST_F_DMA@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_12
; %bb.7:
	mul	w9, w22, w21
	stp	xzr, xzr, [x19, #24]
	str	w9, [x19, #16]
Lloh16:
	adrp	x9, _HOST_F_XMIT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _HOST_F_XMIT@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.8:
Lloh19:
	adrp	x8, _SD_CONFIG_TH@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SD_CONFIG_TH@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh21:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_10:
Lloh24:
	adrp	x8, _SD_CONFIG_NE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SD_CONFIG_NE@GOTPAGEOFF]
LBB0_11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_IRQ_ON
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 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	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.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	_SD_CONFIG_TH,4,2               ; @SD_CONFIG_TH
	.comm	_SD_CONFIG_NE,4,2               ; @SD_CONFIG_NE
	.comm	_DDMA_FLAGS_IE,8,3              ; @DDMA_FLAGS_IE
	.comm	_DDMA_FLAGS_NOIE,8,3            ; @DDMA_FLAGS_NOIE
	.no_dead_strip	_au1xmmc_prepare_data
.subsections_via_symbols
