	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_sdma_controller
_find_sdma_controller:                  ## @find_sdma_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_DMAS_TOTAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	shlq	$3, %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movl	8(%r14), %edi
	callq	_ofw_bus_get_node
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_OF_getproplen
	testl	%eax, %eax
	jle	LBB0_1
## %bb.3:
	movl	%eax, %ecx
	cmpq	%rcx, %rbx
	jne	LBB0_4
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edi
	movq	%r15, %rdx
	movl	%eax, %ecx
	callq	_OF_getencprop
	movq	8(%r15), %rax
	movq	%rax, 24(%r14)
	movq	40(%r15), %rax
	movq	%rax, 16(%r14)
	movq	(%r15), %rdi
	callq	_OF_node_from_xref
	leaq	L_.str.2(%rip), %rdi
	callq	_devclass_find
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_devclass_get_device
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rax, %rdi
	callq	_device_get_softc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_4:
	movl	8(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_1
LBB0_7:
	movl	8(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_device_printf
LBB0_1:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_11
## %bb.10:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DMAS_TOTAL,4,2                 ## @DMAS_TOTAL
	.comm	_ENXIO,4,2                      ## @ENXIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dmas"

L_.str.1:                               ## @.str.1
	.asciz	"\"dmas\" property length is invalid: %d (expected %d)"

L_.str.2:                               ## @.str.2
	.asciz	"sdma"

L_.str.3:                               ## @.str.3
	.asciz	"No sDMA found. Can't operate\n"

	.no_dead_strip	_find_sdma_controller
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_sdma_controller
_find_sdma_controller:                  ; @find_sdma_controller
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _DMAS_TOTAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMAS_TOTAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x21, x8, #3
	mov	x9, x21
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x21, #15
	and	x9, x9, #0xffffffff0
	sub	x20, x8, x9
	mov	sp, x20
	ldr	w0, [x0, #8]
	bl	_ofw_bus_get_node
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.1:
	mov	x22, x0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_OF_getproplen
	cmp	w0, #0
	b.le	LBB0_8
; %bb.2:
	mov	x3, x0
	cmp	x21, w0, uxtw
	b.ne	LBB0_6
; %bb.3:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x20
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_OF_getencprop
	ldr	x8, [x20, #40]
	ldp	x0, x9, [x20]
	stp	x8, x9, [x19, #16]
	bl	_OF_node_from_xref
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_devclass_find
	mov	w1, #0
	bl	_devclass_get_device
	cbz	x0, LBB0_7
; %bb.4:
	bl	_device_get_softc
	cbz	x0, LBB0_7
; %bb.5:
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19]
	b	LBB0_9
LBB0_6:
	ldr	w0, [x19, #8]
	stp	x3, x21, [sp, #-16]!
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_device_printf
	add	sp, sp, #16
	b	LBB0_8
LBB0_7:
	ldr	w0, [x19, #8]
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_device_printf
LBB0_8:
Lloh18:
	adrp	x8, _ENXIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
LBB0_9:
	ldur	x8, [x29, #-40]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAS_TOTAL,4,2                 ; @DMAS_TOTAL
	.comm	_ENXIO,4,2                      ; @ENXIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dmas"

l_.str.1:                               ; @.str.1
	.asciz	"\"dmas\" property length is invalid: %d (expected %d)"

l_.str.2:                               ; @.str.2
	.asciz	"sdma"

l_.str.3:                               ; @.str.3
	.asciz	"No sDMA found. Can't operate\n"

	.no_dead_strip	_find_sdma_controller
.subsections_via_symbols
