	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function au1xmmc_dbdma_init
_au1xmmc_dbdma_init:                    ## @au1xmmc_dbdma_init
	.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, %r14
	movq	24(%rdi), %rdi
	movq	_IORESOURCE_DMA@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movl	(%rax), %ebx
	movq	24(%r14), %rdi
	movl	(%r15), %esi
	movl	$1, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_9
## %bb.2:
	movq	_memid@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	testl	%edi, %edi
	je	LBB0_9
## %bb.3:
	movl	(%rax), %r15d
	movq	_au1xmmc_dbdma_callback@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	%ebx, %esi
	movq	%r14, %rcx
	callq	_au1xxx_dbdma_chan_alloc
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movl	(%r12), %esi
	movl	(%r13), %edx
	movl	%r15d, %edi
	movq	%r14, %rcx
	callq	_au1xxx_dbdma_chan_alloc
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	16(%r14), %rdi
	movl	$8, %esi
	callq	_au1xxx_dbdma_set_devwidth
	movq	8(%r14), %rdi
	movl	$8, %esi
	callq	_au1xxx_dbdma_set_devwidth
	movq	16(%r14), %rdi
	movq	_AU1XMMC_DESCRIPTOR_COUNT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_au1xxx_dbdma_ring_alloc
	movq	8(%r14), %rdi
	movl	(%rbx), %esi
	callq	_au1xxx_dbdma_ring_alloc
	movq	_HOST_F_DMA@GOTPCREL(%rip), %rax
	movq	_HOST_F_DBDMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	%ecx, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_6:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_7:
	movq	24(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_9
LBB0_8:
	movq	24(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	16(%r14), %rdi
	callq	_au1xxx_dbdma_chan_free
LBB0_9:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_10:
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IORESOURCE_DMA,4,2             ## @IORESOURCE_DMA
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_memid,4,2                      ## @memid
	.comm	_au1xmmc_dbdma_callback,4,2     ## @au1xmmc_dbdma_callback
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot allocate TX DMA\n"

L_.str.1:                               ## @.str.1
	.asciz	"cannot allocate RX DMA\n"

	.comm	_AU1XMMC_DESCRIPTOR_COUNT,4,2   ## @AU1XMMC_DESCRIPTOR_COUNT
	.comm	_HOST_F_DMA,4,2                 ## @HOST_F_DMA
	.comm	_HOST_F_DBDMA,4,2               ## @HOST_F_DBDMA
	.no_dead_strip	_au1xmmc_dbdma_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function au1xmmc_dbdma_init
_au1xmmc_dbdma_init:                    ; @au1xmmc_dbdma_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x0, [x0, #24]
Lloh0:
	adrp	x21, _IORESOURCE_DMA@GOTPAGE
Lloh1:
	ldr	x21, [x21, _IORESOURCE_DMA@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w2, #0
	bl	_platform_get_resource
	cbz	x0, LBB0_8
; %bb.1:
	ldr	w20, [x0]
	ldr	x0, [x19, #24]
	ldr	w1, [x21]
	mov	w2, #1
	bl	_platform_get_resource
	cbz	x0, LBB0_8
; %bb.2:
Lloh2:
	adrp	x22, _memid@GOTPAGE
Lloh3:
	ldr	x22, [x22, _memid@GOTPAGEOFF]
	ldr	w8, [x22]
	cbz	w8, LBB0_8
; %bb.3:
	ldr	w21, [x0]
Lloh4:
	adrp	x23, _au1xmmc_dbdma_callback@GOTPAGE
Lloh5:
	ldr	x23, [x23, _au1xmmc_dbdma_callback@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x8
	mov	x1, x20
	mov	x3, x19
	bl	_au1xxx_dbdma_chan_alloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_6
; %bb.4:
	ldr	w1, [x22]
	ldr	w2, [x23]
	mov	x0, x21
	mov	x3, x19
	bl	_au1xxx_dbdma_chan_alloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_7
; %bb.5:
	ldr	x0, [x19, #16]
	mov	w1, #8
	bl	_au1xxx_dbdma_set_devwidth
	ldr	x0, [x19, #8]
	mov	w1, #8
	bl	_au1xxx_dbdma_set_devwidth
	ldr	x0, [x19, #16]
Lloh6:
	adrp	x20, _AU1XMMC_DESCRIPTOR_COUNT@GOTPAGE
Lloh7:
	ldr	x20, [x20, _AU1XMMC_DESCRIPTOR_COUNT@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_au1xxx_dbdma_ring_alloc
	ldr	x0, [x19, #8]
	ldr	w1, [x20]
	bl	_au1xxx_dbdma_ring_alloc
	mov	w0, #0
Lloh8:
	adrp	x8, _HOST_F_DMA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HOST_F_DMA@GOTPAGEOFF]
Lloh10:
	adrp	x9, _HOST_F_DBDMA@GOTPAGE
Lloh11:
	ldr	x9, [x9, _HOST_F_DBDMA@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19]
	orr	w8, w8, w9
	str	w8, [x19]
	b	LBB0_9
LBB0_6:
	ldr	x0, [x19, #24]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_8
LBB0_7:
	ldr	x0, [x19, #24]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	ldr	x0, [x19, #16]
	bl	_au1xxx_dbdma_chan_free
LBB0_8:
Lloh18:
	adrp	x8, _ENODEV@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_IORESOURCE_DMA,4,2             ; @IORESOURCE_DMA
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_memid,4,2                      ; @memid
	.comm	_au1xmmc_dbdma_callback,4,2     ; @au1xmmc_dbdma_callback
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot allocate TX DMA\n"

l_.str.1:                               ; @.str.1
	.asciz	"cannot allocate RX DMA\n"

	.comm	_AU1XMMC_DESCRIPTOR_COUNT,4,2   ; @AU1XMMC_DESCRIPTOR_COUNT
	.comm	_HOST_F_DMA,4,2                 ; @HOST_F_DMA
	.comm	_HOST_F_DBDMA,4,2               ; @HOST_F_DBDMA
	.no_dead_strip	_au1xmmc_dbdma_init
.subsections_via_symbols
