	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_edma_controller
_find_edma_controller:                  ## @find_edma_controller
	.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
	movq	%rdi, %r12
	movl	16(%rdi), %edi
	callq	_ofw_bus_get_node
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_OF_getproplen
	testl	%eax, %eax
	jle	LBB0_1
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	callq	_OF_getproplen
	testl	%eax, %eax
	jle	LBB0_1
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	callq	_OF_getproplen
	testl	%eax, %eax
	jle	LBB0_1
## %bb.5:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rsi
	leaq	-44(%rbp), %r14
	movl	%ebx, %edi
	movq	%r14, %rdx
	movl	%eax, %ecx
	callq	_OF_getencprop
	movl	-44(%rbp), %r15d
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movq	%r14, %rdx
	movl	%r13d, %ecx
	callq	_OF_getencprop
	movl	-44(%rbp), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movq	%r14, %rdx
	movl	%r13d, %ecx
	callq	_OF_getencprop
	movl	-44(%rbp), %edi
	callq	_OF_node_from_xref
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edi
	callq	_OF_getproplen
	testl	%eax, %eax
	jle	LBB0_1
## %bb.6:
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	leaq	L_.str.3(%rip), %rsi
	leaq	-44(%rbp), %rdx
	movl	%ebx, %edi
	movl	%eax, %ecx
	callq	_OF_getencprop
	movq	_EDMA_NUM_DEVICES@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_11
## %bb.7:
	movl	-44(%rbp), %r15d
	xorl	%ebx, %ebx
	leaq	L_.str.4(%rip), %r13
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	incl	%ebx
	cmpl	(%r14), %ebx
	jge	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_devclass_find
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_devclass_get_device
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%rax, %rdi
	callq	_device_get_softc
	cmpl	%r15d, (%rax)
	jne	LBB0_10
## %bb.12:
	movq	%rax, 8(%r12)
	movq	%rax, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	*8(%rax)
	movl	%eax, (%r12)
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	sarl	$31, %eax
	andl	(%rcx), %eax
	jmp	LBB0_13
LBB0_11:
	movl	16(%r12), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_device_printf
LBB0_1:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_13:
	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	"edma-controller"

L_.str.1:                               ## @.str.1
	.asciz	"edma-src-transmit"

L_.str.2:                               ## @.str.2
	.asciz	"edma-mux-group"

L_.str.3:                               ## @.str.3
	.asciz	"device-id"

	.comm	_EDMA_NUM_DEVICES,4,2           ## @EDMA_NUM_DEVICES
L_.str.4:                               ## @.str.4
	.asciz	"edma"

L_.str.5:                               ## @.str.5
	.asciz	"no eDMA. can't operate\n"

	.no_dead_strip	_find_edma_controller
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_edma_controller
_find_edma_controller:                  ; @find_edma_controller
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	w0, [x0, #16]
	bl	_ofw_bus_get_node
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.1:
	mov	x22, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_OF_getproplen
	cmp	w0, #0
	b.le	LBB0_12
; %bb.2:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_OF_getproplen
	cmp	w0, #0
	b.le	LBB0_12
; %bb.3:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_OF_getproplen
	cmp	w0, #0
	b.le	LBB0_12
; %bb.4:
	mov	x23, x0
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #12
	mov	x0, x22
	mov	x3, x23
	bl	_OF_getencprop
	ldr	w20, [sp, #12]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #12
	mov	x0, x22
	mov	x3, x23
	bl	_OF_getencprop
	ldr	w21, [sp, #12]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	mov	x0, x22
	mov	x3, x23
	bl	_OF_getencprop
	ldr	w0, [sp, #12]
	bl	_OF_node_from_xref
	mov	x22, x0
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_OF_getproplen
	cmp	w0, #0
	b.le	LBB0_12
; %bb.5:
	mov	x3, x0
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x2, sp, #12
	mov	x0, x22
	bl	_OF_getencprop
Lloh16:
	adrp	x24, _EDMA_NUM_DEVICES@GOTPAGE
Lloh17:
	ldr	x24, [x24, _EDMA_NUM_DEVICES@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.6:
	mov	w22, #0
	ldr	w25, [sp, #12]
Lloh18:
	adrp	x23, l_.str.4@PAGE
Lloh19:
	add	x23, x23, l_.str.4@PAGEOFF
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w22, w22, #1
	ldr	w8, [x24]
	cmp	w22, w8
	b.ge	LBB0_11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_devclass_find
	mov	x1, x22
	bl	_devclass_get_device
	cbz	x0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	bl	_device_get_softc
	ldr	w8, [x0]
	cmp	w8, w25
	b.ne	LBB0_7
; %bb.10:
	str	x0, [x19, #8]
	ldr	x8, [x0, #8]
	mov	x1, x21
	mov	x2, x20
	blr	x8
	str	w0, [x19]
Lloh20:
	adrp	x8, _ENXIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	and	w0, w8, w0, asr #31
	b	LBB0_13
LBB0_11:
	ldr	w0, [x19, #16]
Lloh23:
	adrp	x1, l_.str.5@PAGE
Lloh24:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_device_printf
LBB0_12:
Lloh25:
	adrp	x8, _ENXIO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"edma-controller"

l_.str.1:                               ; @.str.1
	.asciz	"edma-src-transmit"

l_.str.2:                               ; @.str.2
	.asciz	"edma-mux-group"

l_.str.3:                               ; @.str.3
	.asciz	"device-id"

	.comm	_EDMA_NUM_DEVICES,4,2           ; @EDMA_NUM_DEVICES
l_.str.4:                               ; @.str.4
	.asciz	"edma"

l_.str.5:                               ; @.str.5
	.asciz	"no eDMA. can't operate\n"

	.no_dead_strip	_find_edma_controller
.subsections_via_symbols
