	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aw_mmc_setup_dma
_aw_mmc_setup_dma:                      ## @aw_mmc_setup_dma
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	24(%rdi), %edi
	callq	_bus_get_dma_tag
	movq	_AW_MMC_DMA_ALIGN@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_BUS_SPACE_MAXADDR_32BIT@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movq	_BUS_SPACE_MAXADDR@GOTPCREL(%rip), %r12
	movl	(%r12), %r8d
	movq	_AW_MMC_DMA_DESC_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leaq	36(%rbx), %rdi
	movq	%rdi, 56(%rsp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%rsp)
	movl	%edx, 24(%rsp)
	movl	%edx, 8(%rsp)
	movl	$0, 32(%rsp)
	movl	$1, 16(%rsp)
	movq	$0, (%rsp)
	movl	%eax, %edi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_bus_dma_tag_create
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movl	36(%rbx), %edi
	leaq	28(%rbx), %rsi
	movq	_BUS_DMA_COHERENT@GOTPCREL(%rip), %rax
	movq	_BUS_DMA_WAITOK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_BUS_DMA_ZERO@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	leaq	32(%rbx), %rcx
	callq	_bus_dmamem_alloc
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movl	36(%rbx), %edi
	movl	28(%rbx), %edx
	movl	32(%rbx), %esi
	movl	(%r13), %ecx
	movq	_aw_dma_desc_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$0, (%rsp)
	movq	%rbx, %r9
	callq	_bus_dmamap_load
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movl	(%rbx), %eax
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movl	24(%rbx), %edi
	callq	_bus_get_dma_tag
	movl	(%r14), %esi
	movl	(%r15), %ecx
	movl	(%r12), %r8d
	movq	16(%rbx), %rdx
	movl	(%rdx), %r9d
	movq	_AW_MMC_DMA_SEGS@GOTPCREL(%rip), %rdi
	movl	(%rdi), %r10d
	movl	%r10d, %edi
	imull	%r9d, %edi
	movq	_BUS_DMA_ALLOCNOW@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r11d
	leaq	8(%rbx), %rdx
	movq	%rdx, 56(%rsp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%rsp)
	movl	%r11d, 32(%rsp)
	movl	%r9d, 24(%rsp)
	movl	%r10d, 16(%rsp)
	movl	%edi, 8(%rsp)
	movq	$0, (%rsp)
	movl	%eax, %edi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_bus_dma_tag_create
	testl	%eax, %eax
	je	LBB0_6
LBB0_5:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	8(%rbx), %edi
	addq	$4, %rbx
	xorl	%esi, %esi
	movq	%rbx, %rdx
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bus_dmamap_create              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AW_MMC_DMA_ALIGN,4,2           ## @AW_MMC_DMA_ALIGN
	.comm	_BUS_SPACE_MAXADDR_32BIT,4,2    ## @BUS_SPACE_MAXADDR_32BIT
	.comm	_BUS_SPACE_MAXADDR,4,2          ## @BUS_SPACE_MAXADDR
	.comm	_AW_MMC_DMA_DESC_SIZE,4,2       ## @AW_MMC_DMA_DESC_SIZE
	.comm	_BUS_DMA_COHERENT,4,2           ## @BUS_DMA_COHERENT
	.comm	_BUS_DMA_WAITOK,4,2             ## @BUS_DMA_WAITOK
	.comm	_BUS_DMA_ZERO,4,2               ## @BUS_DMA_ZERO
	.comm	_aw_dma_desc_cb,4,2             ## @aw_dma_desc_cb
	.comm	_AW_MMC_DMA_SEGS,4,2            ## @AW_MMC_DMA_SEGS
	.comm	_BUS_DMA_ALLOCNOW,4,2           ## @BUS_DMA_ALLOCNOW
	.no_dead_strip	_aw_mmc_setup_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aw_mmc_setup_dma
_aw_mmc_setup_dma:                      ; @aw_mmc_setup_dma
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x0
	ldr	w0, [x0, #24]
	bl	_bus_get_dma_tag
Lloh0:
	adrp	x20, _AW_MMC_DMA_ALIGN@GOTPAGE
Lloh1:
	ldr	x20, [x20, _AW_MMC_DMA_ALIGN@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x21, _BUS_SPACE_MAXADDR_32BIT@GOTPAGE
Lloh3:
	ldr	x21, [x21, _BUS_SPACE_MAXADDR_32BIT@GOTPAGEOFF]
Lloh4:
	adrp	x22, _BUS_SPACE_MAXADDR@GOTPAGE
Lloh5:
	ldr	x22, [x22, _BUS_SPACE_MAXADDR@GOTPAGEOFF]
	ldr	w3, [x21]
	ldr	w4, [x22]
Lloh6:
	adrp	x23, _AW_MMC_DMA_DESC_SIZE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _AW_MMC_DMA_DESC_SIZE@GOTPAGEOFF]
	ldr	w7, [x23]
	add	x8, x19, #36
	stp	xzr, xzr, [sp, #16]
	str	x8, [sp, #32]
	stp	w7, wzr, [sp, #4]
	mov	w8, #1
	str	w8, [sp]
	mov	w2, #0
	mov	x5, #0
	mov	x6, #0
	bl	_bus_dma_tag_create
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x19, #36]
	add	x1, x19, #28
Lloh8:
	adrp	x8, _BUS_DMA_COHERENT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BUS_DMA_COHERENT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _BUS_DMA_WAITOK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BUS_DMA_WAITOK@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _BUS_DMA_ZERO@GOTPAGE
Lloh15:
	ldr	x9, [x9, _BUS_DMA_ZERO@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w2, w8, w9
	add	x3, x19, #32
	bl	_bus_dmamem_alloc
	cbnz	w0, LBB0_5
; %bb.2:
	ldp	w1, w0, [x19, #32]
	ldr	w2, [x19, #28]
	ldr	w3, [x23]
Lloh17:
	adrp	x8, _aw_dma_desc_cb@GOTPAGE
Lloh18:
	ldr	x8, [x8, _aw_dma_desc_cb@GOTPAGEOFF]
Lloh19:
	ldr	w4, [x8]
	mov	x5, x19
	mov	w6, #0
	bl	_bus_dmamap_load
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	w0, [x19]
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	w0, [x19, #24]
	bl	_bus_get_dma_tag
	ldr	w1, [x20]
	ldr	w3, [x21]
	ldr	w4, [x22]
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _AW_MMC_DMA_SEGS@GOTPAGE
Lloh21:
	ldr	x9, [x9, _AW_MMC_DMA_SEGS@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	mul	w7, w9, w8
Lloh23:
	adrp	x10, _BUS_DMA_ALLOCNOW@GOTPAGE
Lloh24:
	ldr	x10, [x10, _BUS_DMA_ALLOCNOW@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	add	x11, x19, #8
	stp	xzr, xzr, [sp, #16]
	str	x11, [sp, #32]
	stp	w8, w10, [sp, #4]
	str	w9, [sp]
	mov	w2, #0
	mov	x5, #0
	mov	x6, #0
	bl	_bus_dma_tag_create
	cbz	w0, LBB0_6
LBB0_5:
	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
	add	sp, sp, #112
	ret
LBB0_6:
	ldr	w0, [x19, #8]
	add	x2, x19, #4
	mov	w1, #0
	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
	add	sp, sp, #112
	b	_bus_dmamap_create
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_AW_MMC_DMA_ALIGN,4,2           ; @AW_MMC_DMA_ALIGN
	.comm	_BUS_SPACE_MAXADDR_32BIT,4,2    ; @BUS_SPACE_MAXADDR_32BIT
	.comm	_BUS_SPACE_MAXADDR,4,2          ; @BUS_SPACE_MAXADDR
	.comm	_AW_MMC_DMA_DESC_SIZE,4,2       ; @AW_MMC_DMA_DESC_SIZE
	.comm	_BUS_DMA_COHERENT,4,2           ; @BUS_DMA_COHERENT
	.comm	_BUS_DMA_WAITOK,4,2             ; @BUS_DMA_WAITOK
	.comm	_BUS_DMA_ZERO,4,2               ; @BUS_DMA_ZERO
	.comm	_aw_dma_desc_cb,4,2             ; @aw_dma_desc_cb
	.comm	_AW_MMC_DMA_SEGS,4,2            ; @AW_MMC_DMA_SEGS
	.comm	_BUS_DMA_ALLOCNOW,4,2           ; @BUS_DMA_ALLOCNOW
	.no_dead_strip	_aw_mmc_setup_dma
.subsections_via_symbols
