	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdma_attach
_sdma_attach:                           ## @sdma_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %rbx
	movl	%r14d, 24(%rax)
	movq	_sdma_spec@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rbx), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_rman_get_bustag
	movl	%eax, 20(%rbx)
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_rman_get_bushandle
	movl	%eax, 16(%rbx)
	movq	_sdma_sc@GOTPCREL(%rip), %rax
	movq	%rbx, (%rax)
	movq	8(%rbx), %rax
	movl	4(%rax), %esi
	movq	_INTR_TYPE_MISC@GOTPCREL(%rip), %rax
	movq	_INTR_MPSAFE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_sdma_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, (%rsp)
	movl	%r14d, %edi
	xorl	%ecx, %ecx
	movq	%rbx, %r9
	callq	_bus_setup_intr
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movl	%r14d, %edi
	callq	_device_printf
LBB0_7:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %rdi
	callq	_load_firmware
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_boot_firmware
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	$-1, %ecx
	je	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_sdma_spec,4,2                  ## @sdma_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not allocate resources\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_sdma_sc,8,3                    ## @sdma_sc
	.comm	_INTR_TYPE_MISC,4,2             ## @INTR_TYPE_MISC
	.comm	_INTR_MPSAFE,4,2                ## @INTR_MPSAFE
	.comm	_sdma_intr,4,2                  ## @sdma_intr
L_.str.1:                               ## @.str.1
	.asciz	"Unable to alloc interrupt resource.\n"

	.no_dead_strip	_sdma_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdma_attach
_sdma_attach:                           ; @sdma_attach
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #24]
Lloh0:
	adrp	x8, _sdma_spec@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sdma_spec@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x2, [x0, #8]
	mov	x0, x19
	bl	_bus_alloc_resources
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	bl	_rman_get_bustag
	str	w0, [x20, #20]
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	bl	_rman_get_bushandle
	str	w0, [x20, #16]
Lloh5:
	adrp	x8, _sdma_sc@GOTPAGE
Lloh6:
	ldr	x8, [x8, _sdma_sc@GOTPAGEOFF]
Lloh7:
	str	x20, [x8]
	ldr	x8, [x20, #8]
	ldr	w1, [x8, #4]
Lloh8:
	adrp	x8, _INTR_TYPE_MISC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _INTR_TYPE_MISC@GOTPAGEOFF]
Lloh10:
	adrp	x9, _INTR_MPSAFE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _INTR_MPSAFE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh14:
	adrp	x8, _sdma_intr@GOTPAGE
Lloh15:
	ldr	x8, [x8, _sdma_intr@GOTPAGEOFF]
Lloh16:
	ldr	w4, [x8]
	mov	x0, x19
	mov	x3, #0
	mov	x5, x20
	mov	x6, x20
	bl	_bus_setup_intr
	cbz	w0, LBB0_7
; %bb.3:
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_device_printf
LBB0_5:
Lloh19:
	adrp	x8, _ENXIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x20
	bl	_load_firmware
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.8:
	mov	x0, x20
	bl	_boot_firmware
Lloh22:
	adrp	x8, _ENXIO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmn	w0, #1
	csel	w0, w8, wzr, eq
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_sdma_spec,4,2                  ; @sdma_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not allocate resources\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_sdma_sc,8,3                    ; @sdma_sc
	.comm	_INTR_TYPE_MISC,4,2             ; @INTR_TYPE_MISC
	.comm	_INTR_MPSAFE,4,2                ; @INTR_MPSAFE
	.comm	_sdma_intr,4,2                  ; @sdma_intr
l_.str.1:                               ; @.str.1
	.asciz	"Unable to alloc interrupt resource.\n"

	.no_dead_strip	_sdma_attach
.subsections_via_symbols
