	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dbdma_allocate_channel         ## -- Begin function dbdma_allocate_channel
	.p2align	4, 0x90
_dbdma_allocate_channel:                ## @dbdma_allocate_channel
	.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	%r8, %r12
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r15d
	movl	%esi, %r13d
	movq	%rdi, %r14
	movq	_M_DBDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	$4, %edi
	callq	_malloc
	movq	%rax, %rbx
	movq	%rax, (%r12)
	movq	%r14, 32(%rax)
	movl	%r13d, 24(%rax)
	movq	%rax, %rdi
	callq	_dbdma_stop
	movq	$0, 16(%rbx)
	movq	_BUS_SPACE_MAXADDR_32BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_BUS_SPACE_MAXADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	leaq	12(%rbx), %rdx
	movq	%rdx, 56(%rsp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%rsp)
	movl	%eax, 24(%rsp)
	movl	%eax, 8(%rsp)
	movl	$0, 32(%rsp)
	movl	$1, 16(%rsp)
	movq	$0, (%rsp)
	movl	%r15d, %edi
	movl	$16, %esi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_bus_dma_tag_create
	movl	12(%rbx), %edi
	leaq	4(%rbx), %rsi
	movq	_BUS_DMA_WAITOK@GOTPCREL(%rip), %rax
	movq	_BUS_DMA_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	leaq	8(%rbx), %rcx
	callq	_bus_dmamem_alloc
	movl	12(%rbx), %edi
	movl	4(%rbx), %edx
	movl	8(%rbx), %esi
	movl	(%r14), %ecx
	movq	_dbdma_phys_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$0, (%rsp)
	movq	%rbx, %r9
	callq	_bus_dmamap_load
	movl	%eax, %r14d
	movq	_CHAN_CMDPTR_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_dbdma_write_reg
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_M_DBDMA,4,2                    ## @M_DBDMA
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_BUS_SPACE_MAXADDR_32BIT,4,2    ## @BUS_SPACE_MAXADDR_32BIT
	.comm	_BUS_SPACE_MAXADDR,4,2          ## @BUS_SPACE_MAXADDR
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_BUS_DMA_WAITOK,4,2             ## @BUS_DMA_WAITOK
	.comm	_BUS_DMA_ZERO,4,2               ## @BUS_DMA_ZERO
	.comm	_dbdma_phys_callback,4,2        ## @dbdma_phys_callback
	.comm	_CHAN_CMDPTR_HI,4,2             ## @CHAN_CMDPTR_HI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dbdma_allocate_channel         ; -- Begin function dbdma_allocate_channel
	.p2align	2
_dbdma_allocate_channel:                ; @dbdma_allocate_channel
	.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	x21, x4
	mov	x19, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
Lloh0:
	adrp	x8, _M_DBDMA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _M_DBDMA@GOTPAGEOFF]
Lloh2:
	adrp	x9, _M_WAITOK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _M_WAITOK@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	ldr	w8, [x9]
Lloh6:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	w0, #4
	bl	_malloc
	mov	x20, x0
	str	x0, [x21]
	str	x24, [x0, #32]
	str	w23, [x0, #24]
	bl	_dbdma_stop
	str	xzr, [x20, #16]
Lloh9:
	adrp	x8, _BUS_SPACE_MAXADDR_32BIT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BUS_SPACE_MAXADDR_32BIT@GOTPAGEOFF]
Lloh11:
	adrp	x9, _BUS_SPACE_MAXADDR@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BUS_SPACE_MAXADDR@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
Lloh14:
	ldr	w4, [x9]
Lloh15:
	adrp	x21, _PAGE_SIZE@GOTPAGE
Lloh16:
	ldr	x21, [x21, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w7, [x21]
	add	x8, x20, #12
	stp	xzr, xzr, [sp, #16]
	str	x8, [sp, #32]
	stp	w7, wzr, [sp, #4]
	mov	w8, #1
	str	w8, [sp]
	mov	x0, x22
	mov	w1, #16
	mov	w2, #0
	mov	x5, #0
	mov	x6, #0
	bl	_bus_dma_tag_create
	ldr	w0, [x20, #12]
	add	x1, x20, #4
Lloh17:
	adrp	x8, _BUS_DMA_WAITOK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BUS_DMA_WAITOK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _BUS_DMA_ZERO@GOTPAGE
Lloh21:
	ldr	x9, [x9, _BUS_DMA_ZERO@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w2, w9, w8
	add	x3, x20, #8
	bl	_bus_dmamem_alloc
	ldp	w1, w0, [x20, #8]
	ldr	w2, [x20, #4]
	ldr	w3, [x21]
Lloh23:
	adrp	x8, _dbdma_phys_callback@GOTPAGE
Lloh24:
	ldr	x8, [x8, _dbdma_phys_callback@GOTPAGEOFF]
Lloh25:
	ldr	w4, [x8]
	mov	x5, x20
	mov	w6, #0
	bl	_bus_dmamap_load
	mov	x21, x0
Lloh26:
	adrp	x8, _CHAN_CMDPTR_HI@GOTPAGE
Lloh27:
	ldr	x8, [x8, _CHAN_CMDPTR_HI@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_dbdma_write_reg
	str	w19, [x20]
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_M_DBDMA,4,2                    ; @M_DBDMA
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_BUS_SPACE_MAXADDR_32BIT,4,2    ; @BUS_SPACE_MAXADDR_32BIT
	.comm	_BUS_SPACE_MAXADDR,4,2          ; @BUS_SPACE_MAXADDR
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_BUS_DMA_WAITOK,4,2             ; @BUS_DMA_WAITOK
	.comm	_BUS_DMA_ZERO,4,2               ; @BUS_DMA_ZERO
	.comm	_dbdma_phys_callback,4,2        ; @dbdma_phys_callback
	.comm	_CHAN_CMDPTR_HI,4,2             ; @CHAN_CMDPTR_HI
.subsections_via_symbols
