	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function edma_attach
_edma_attach:                           ## @edma_attach
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %r12
	movl	%r14d, 76(%rax)
	movl	%r14d, %edi
	callq	_ofw_bus_get_node
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_OF_getproplen
	testl	%eax, %eax
	jle	LBB0_9
## %bb.2:
	leaq	L_.str(%rip), %rsi
	leaq	-44(%rbp), %rdx
	movl	%ebx, %edi
	movl	%eax, %ecx
	callq	_OF_getencprop
	movl	-44(%rbp), %eax
	movl	%eax, (%r12)
	movq	_dma_stop@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%r12)
	movq	_dma_setup@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 68(%r12)
	movq	_dma_request@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%r12)
	movq	_channel_configure@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%r12)
	movq	_channel_free@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%r12)
	movq	_edma_spec@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r12), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_8
LBB0_4:
	movq	8(%r12), %rax
	movl	(%rax), %edi
	callq	_rman_get_bustag
	movq	%rax, 48(%r12)
	movq	8(%r12), %rax
	movl	(%rax), %edi
	callq	_rman_get_bushandle
	movq	%rax, 40(%r12)
	movq	8(%r12), %rax
	movl	4(%rax), %edi
	callq	_rman_get_bustag
	movq	%rax, 32(%r12)
	movq	8(%r12), %rax
	movl	4(%rax), %edi
	callq	_rman_get_bushandle
	movq	%rax, 24(%r12)
	movq	8(%r12), %rax
	movq	_INTR_TYPE_BIO@GOTPCREL(%rip), %r13
	movq	_INTR_MPSAFE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	orl	(%r13), %edx
	movl	8(%rax), %esi
	movq	_edma_transfer_complete_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	16(%r12), %rax
	movq	%rax, (%rsp)
	xorl	%r15d, %r15d
	movl	%r14d, %edi
	xorl	%ecx, %ecx
	movq	%r12, %r9
	callq	_bus_setup_intr
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_8
LBB0_6:
	movq	8(%r12), %rax
	movl	(%rbx), %edx
	orl	(%r13), %edx
	movl	12(%rax), %esi
	movq	_edma_err_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r12, %rax
	addq	$4, %rax
	movq	%rax, (%rsp)
	movl	%r14d, %edi
	xorl	%ecx, %ecx
	movq	%r12, %r9
	callq	_bus_setup_intr
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
LBB0_8:
	movl	%r14d, %edi
	callq	_device_printf
LBB0_9:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"device-id"

	.comm	_dma_stop,4,2                   ## @dma_stop
	.comm	_dma_setup,4,2                  ## @dma_setup
	.comm	_dma_request,4,2                ## @dma_request
	.comm	_channel_configure,4,2          ## @channel_configure
	.comm	_channel_free,4,2               ## @channel_free
	.comm	_edma_spec,4,2                  ## @edma_spec
L_.str.1:                               ## @.str.1
	.asciz	"could not allocate resources\n"

	.comm	_INTR_TYPE_BIO,4,2              ## @INTR_TYPE_BIO
	.comm	_INTR_MPSAFE,4,2                ## @INTR_MPSAFE
	.comm	_edma_transfer_complete_intr,4,2 ## @edma_transfer_complete_intr
L_.str.2:                               ## @.str.2
	.asciz	"Unable to alloc DMA intr resource.\n"

	.comm	_edma_err_intr,4,2              ## @edma_err_intr
L_.str.3:                               ## @.str.3
	.asciz	"Unable to alloc DMA Err intr resource.\n"

	.no_dead_strip	_edma_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function edma_attach
_edma_attach:                           ; @edma_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	bl	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #76]
	mov	x0, x19
	bl	_ofw_bus_get_node
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_OF_getproplen
	cmp	w0, #0
	b.le	LBB0_9
; %bb.2:
	mov	x3, x0
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	mov	x0, x21
	bl	_OF_getencprop
	ldr	w8, [sp, #12]
	str	w8, [x20]
Lloh4:
	adrp	x8, _dma_stop@GOTPAGE
Lloh5:
	ldr	x8, [x8, _dma_stop@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x20, #72]
Lloh7:
	adrp	x8, _dma_setup@GOTPAGE
Lloh8:
	ldr	x8, [x8, _dma_setup@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _dma_request@GOTPAGE
Lloh11:
	ldr	x9, [x9, _dma_request@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #64]
Lloh13:
	adrp	x8, _channel_configure@GOTPAGE
Lloh14:
	ldr	x8, [x8, _channel_configure@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _channel_free@GOTPAGE
Lloh17:
	ldr	x9, [x9, _channel_free@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #56]
Lloh19:
	adrp	x8, _edma_spec@GOTPAGE
Lloh20:
	ldr	x8, [x8, _edma_spec@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	x2, [x20, #8]
	mov	x0, x19
	bl	_bus_alloc_resources
	cbz	x0, LBB0_4
; %bb.3:
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_4:
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	bl	_rman_get_bustag
	str	x0, [x20, #48]
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	bl	_rman_get_bushandle
	str	x0, [x20, #40]
	ldr	x8, [x20, #8]
	ldr	w0, [x8, #4]
	bl	_rman_get_bustag
	str	x0, [x20, #32]
	ldr	x8, [x20, #8]
	ldr	w0, [x8, #4]
	bl	_rman_get_bushandle
	str	x0, [x20, #24]
	ldr	x8, [x20, #8]
	ldr	w1, [x8, #8]
Lloh24:
	adrp	x21, _INTR_TYPE_BIO@GOTPAGE
Lloh25:
	ldr	x21, [x21, _INTR_TYPE_BIO@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh26:
	adrp	x22, _INTR_MPSAFE@GOTPAGE
Lloh27:
	ldr	x22, [x22, _INTR_MPSAFE@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w2, w9, w8
Lloh28:
	adrp	x8, _edma_transfer_complete_intr@GOTPAGE
Lloh29:
	ldr	x8, [x8, _edma_transfer_complete_intr@GOTPAGEOFF]
Lloh30:
	ldr	w4, [x8]
	add	x6, x20, #16
	mov	x0, x19
	mov	x3, #0
	mov	x5, x20
	bl	_bus_setup_intr
	cbz	x0, LBB0_6
; %bb.5:
Lloh31:
	adrp	x1, l_.str.2@PAGE
Lloh32:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_6:
	ldr	x8, [x20, #8]
	ldr	w1, [x8, #12]
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w2, w9, w8
Lloh33:
	adrp	x8, _edma_err_intr@GOTPAGE
Lloh34:
	ldr	x8, [x8, _edma_err_intr@GOTPAGEOFF]
Lloh35:
	ldr	w4, [x8]
	add	x6, x20, #4
	mov	x0, x19
	mov	x3, #0
	mov	x5, x20
	bl	_bus_setup_intr
	cbz	x0, LBB0_10
; %bb.7:
Lloh36:
	adrp	x1, l_.str.3@PAGE
Lloh37:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_8:
	mov	x0, x19
	bl	_device_printf
LBB0_9:
Lloh38:
	adrp	x8, _ENXIO@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
LBB0_10:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"device-id"

	.comm	_dma_stop,4,2                   ; @dma_stop
	.comm	_dma_setup,4,2                  ; @dma_setup
	.comm	_dma_request,4,2                ; @dma_request
	.comm	_channel_configure,4,2          ; @channel_configure
	.comm	_channel_free,4,2               ; @channel_free
	.comm	_edma_spec,4,2                  ; @edma_spec
l_.str.1:                               ; @.str.1
	.asciz	"could not allocate resources\n"

	.comm	_INTR_TYPE_BIO,4,2              ; @INTR_TYPE_BIO
	.comm	_INTR_MPSAFE,4,2                ; @INTR_MPSAFE
	.comm	_edma_transfer_complete_intr,4,2 ; @edma_transfer_complete_intr
l_.str.2:                               ; @.str.2
	.asciz	"Unable to alloc DMA intr resource.\n"

	.comm	_edma_err_intr,4,2              ; @edma_err_intr
l_.str.3:                               ; @.str.3
	.asciz	"Unable to alloc DMA Err intr resource.\n"

	.no_dead_strip	_edma_attach
.subsections_via_symbols
