	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv_cp110_icu_attach
_mv_cp110_icu_attach:                   ## @mv_cp110_icu_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	callq	_device_get_softc
	movq	%rax, %r14
	movl	%ebx, 24(%rax)
	movl	%ebx, %edi
	callq	_ofw_bus_get_node
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	leaq	-36(%rbp), %rdx
	movl	%eax, %edi
	movl	$4, %ecx
	callq	_OF_getencprop
	testq	%rax, %rax
	jle	LBB0_1
## %bb.4:
	movl	-36(%rbp), %edi
	callq	_OF_device_from_xref
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	_mv_cp110_icu_res_spec@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	%ebx, %edi
	movq	%r14, %rdx
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	movl	%ebx, %edi
	callq	_device_printf
LBB0_3:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	%r15d, %edi
	callq	_OF_xref_from_node
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_intr_pic_register
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	_INTR_MAP_DATA_FDT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	$16, %esi
	callq	_intr_alloc_map_data
	movq	%rax, 8(%r14)
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_9:
	leaq	L_.str.4(%rip), %rsi
	movl	%ebx, %edi
	callq	_device_printf
	movl	(%r12), %esi
	movl	%ebx, %edi
	movq	%r14, %rdx
	callq	_bus_release_resources
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"msi-parent"

L_.str.1:                               ## @.str.1
	.asciz	"cannot find msi-parent property\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.2:                               ## @.str.2
	.asciz	"cannot find msi-parent device\n"

	.comm	_mv_cp110_icu_res_spec,4,2      ## @mv_cp110_icu_res_spec
L_.str.3:                               ## @.str.3
	.asciz	"cannot allocate resources for device\n"

L_.str.4:                               ## @.str.4
	.asciz	"Cannot register ICU\n"

	.comm	_INTR_MAP_DATA_FDT,4,2          ## @INTR_MAP_DATA_FDT
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.no_dead_strip	_mv_cp110_icu_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv_cp110_icu_attach
_mv_cp110_icu_attach:                   ; @mv_cp110_icu_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	x20, x0
	bl	_device_get_softc
	mov	x19, x0
	str	w20, [x0, #24]
	mov	x0, x20
	bl	_ofw_bus_get_node
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	mov	w3, #4
	bl	_OF_getencprop
	cmp	x0, #0
	b.le	LBB0_4
; %bb.1:
	ldr	w0, [sp, #12]
	bl	_OF_device_from_xref
	str	x0, [x19, #16]
	cbz	x0, LBB0_5
; %bb.2:
Lloh2:
	adrp	x22, _mv_cp110_icu_res_spec@GOTPAGE
Lloh3:
	ldr	x22, [x22, _mv_cp110_icu_res_spec@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	mov	x2, x19
	bl	_bus_alloc_resources
	cbz	x0, LBB0_9
; %bb.3:
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_6
LBB0_4:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	mov	x0, x20
	bl	_device_printf
LBB0_7:
Lloh10:
	adrp	x8, _ENXIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
LBB0_8:
	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
LBB0_9:
	mov	x0, x21
	bl	_OF_xref_from_node
	mov	x1, x0
	mov	x0, x20
	bl	_intr_pic_register
	cbz	x0, LBB0_11
; %bb.10:
Lloh13:
	adrp	x8, _INTR_MAP_DATA_FDT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _INTR_MAP_DATA_FDT@GOTPAGEOFF]
Lloh15:
	adrp	x9, _M_WAITOK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _M_WAITOK@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	ldr	w8, [x9]
Lloh19:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh20:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	w1, #16
	bl	_intr_alloc_map_data
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19, #8]
	b	LBB0_8
LBB0_11:
Lloh22:
	adrp	x1, l_.str.4@PAGE
Lloh23:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_device_printf
	ldr	w1, [x22]
	mov	x0, x20
	mov	x2, x19
	bl	_bus_release_resources
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"msi-parent"

l_.str.1:                               ; @.str.1
	.asciz	"cannot find msi-parent property\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.2:                               ; @.str.2
	.asciz	"cannot find msi-parent device\n"

	.comm	_mv_cp110_icu_res_spec,4,2      ; @mv_cp110_icu_res_spec
l_.str.3:                               ; @.str.3
	.asciz	"cannot allocate resources for device\n"

l_.str.4:                               ; @.str.4
	.asciz	"Cannot register ICU\n"

	.comm	_INTR_MAP_DATA_FDT,4,2          ; @INTR_MAP_DATA_FDT
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.no_dead_strip	_mv_cp110_icu_attach
.subsections_via_symbols
