	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mscm_attach
_mscm_attach:                           ## @mscm_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %r15
	movq	_mscm_spec@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r15), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_6
LBB0_2:
	movq	(%r15), %rax
	movl	(%rax), %edi
	callq	_rman_get_bustag
	movl	%eax, 12(%r15)
	movq	(%r15), %rax
	movl	(%rax), %edi
	callq	_rman_get_bushandle
	movl	%eax, 8(%r15)
	movq	_VF_NINT@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_3
## %bb.4:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_MSCM_IRSPRC
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_WRITE2
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_5
	jmp	LBB0_6
LBB0_3:
	xorl	%r14d, %r14d
LBB0_6:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mscm_spec,4,2                  ## @mscm_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not allocate resources\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_VF_NINT,4,2                    ## @VF_NINT
	.no_dead_strip	_mscm_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mscm_attach
_mscm_attach:                           ; @mscm_attach
	.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
	mov	x20, x0
	bl	_device_get_softc
	mov	x19, x0
Lloh0:
	adrp	x8, _mscm_spec@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mscm_spec@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x2, [x0]
	mov	x0, x20
	bl	_bus_alloc_resources
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_device_printf
Lloh5:
	adrp	x8, _ENXIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_2:
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_rman_get_bustag
	str	w0, [x19, #12]
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_rman_get_bushandle
	str	w0, [x19, #8]
Lloh8:
	adrp	x21, _VF_NINT@GOTPAGE
Lloh9:
	ldr	x21, [x21, _VF_NINT@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	w20, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_MSCM_IRSPRC
	mov	x1, x0
	mov	x0, x19
	mov	w2, #1
	bl	_WRITE2
	add	w20, w20, #1
	ldr	w8, [x21]
	cmp	w20, w8
	b.lt	LBB0_4
LBB0_5:
	mov	w0, #0
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_mscm_spec,4,2                  ; @mscm_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not allocate resources\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_VF_NINT,4,2                    ; @VF_NINT
	.no_dead_strip	_mscm_attach
.subsections_via_symbols
