	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv_pcib_ofw_bus_attach
_mv_pcib_ofw_bus_attach:                ## @mv_pcib_ofw_bus_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	%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
	callq	_ofw_bus_get_node
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_device_get_softc
	movq	%rax, %r15
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	jle	LBB0_18
## %bb.1:
	movl	$1, (%r15)
	leaq	L_.str(%rip), %rsi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rdx
	movl	$4, %ecx
	callq	_OF_getencprop
	testq	%rax, %rax
	jle	LBB0_20
## %bb.2:
	movq	%r15, %rdx
	addq	$4, %rdx
	movl	$1, 4(%r15)
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	$4, %ecx
	callq	_OF_getencprop
	testq	%rax, %rax
	jle	LBB0_20
## %bb.3:
	movq	%rbx, %rdi
	callq	_OF_child
	testq	%rax, %rax
	jle	LBB0_18
## %bb.4:
	movq	%rax, %rbx
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_M_PCIB_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_free
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_OF_peer
	movq	%rax, %rbx
	testq	%rax, %rax
	jle	LBB0_18
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_M_PCIB_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	$8, %edi
	callq	_malloc
	movq	%rax, %r14
	movq	%rax, %r13
	addq	$4, %r13
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_ofw_bus_gen_setup_devinfo
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$-1, %edx
	callq	_device_add_child
	testq	%rax, %rax
	je	LBB0_10
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_resource_list_init
	movq	_mv_pcib_ctrl_compat@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ofw_bus_search_compatible
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edx
	movl	4(%rcx), %ecx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %r8
	callq	*%rax
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_device_set_ivars
	jmp	LBB0_16
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r13), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_device_printf
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rdi
	callq	_ofw_bus_gen_destroy_devinfo
	movq	_M_PCIB_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_free
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_17
LBB0_18:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_mv_pcib_ctrl_fill_ranges
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jns	LBB0_21
## %bb.19:
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_device_printf
LBB0_20:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"#address-cells"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"#size-cells"

	.comm	_M_PCIB_CTRL,4,2                ## @M_PCIB_CTRL
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_bootverbose,8,3                ## @bootverbose
L_.str.2:                               ## @.str.2
	.asciz	"Could not set up devinfo for PCI\n"

L_.str.3:                               ## @.str.3
	.asciz	"Could not add child: %s\n"

	.comm	_mv_pcib_ctrl_compat,4,2        ## @mv_pcib_ctrl_compat
L_.str.4:                               ## @.str.4
	.asciz	"could not get ranges\n"

	.no_dead_strip	_mv_pcib_ofw_bus_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv_pcib_ofw_bus_attach
_mv_pcib_ofw_bus_attach:                ; @mv_pcib_ofw_bus_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_ofw_bus_get_node
	mov	x20, x0
	mov	x0, x19
	bl	_device_get_softc
	mov	x21, x0
	str	x20, [sp, #8]                   ; 8-byte Folded Spill
	cmp	x20, #1
	b.lt	LBB0_17
; %bb.1:
	mov	w22, #1
	str	w22, [x21]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	ldr	x20, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x20
	mov	x2, x21
	mov	w3, #4
	bl	_OF_getencprop
	cmp	x0, #0
	b.le	LBB0_20
; %bb.2:
	mov	x2, x21
	str	w22, [x2, #4]!
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	w3, #4
	bl	_OF_getencprop
	cmp	x0, #0
	b.le	LBB0_20
; %bb.3:
	mov	x0, x20
	bl	_OF_child
	cmp	x0, #1
	b.lt	LBB0_17
; %bb.4:
	mov	x22, x0
Lloh4:
	adrp	x28, _M_PCIB_CTRL@GOTPAGE
Lloh5:
	ldr	x28, [x28, _M_PCIB_CTRL@GOTPAGEOFF]
Lloh6:
	adrp	x24, _M_WAITOK@GOTPAGE
Lloh7:
	ldr	x24, [x24, _M_WAITOK@GOTPAGEOFF]
Lloh8:
	adrp	x20, _M_ZERO@GOTPAGE
Lloh9:
	ldr	x20, [x20, _M_ZERO@GOTPAGEOFF]
Lloh10:
	adrp	x23, _bootverbose@GOTPAGE
Lloh11:
	ldr	x23, [x23, _bootverbose@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x26
	bl	_ofw_bus_gen_destroy_devinfo
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w1, [x28]
	mov	x0, x25
	bl	_free
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x22
	bl	_OF_peer
	mov	x22, x0
	cmp	x0, #0
	b.le	LBB0_17
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x28]
	ldr	w8, [x24]
	ldr	w9, [x20]
	orr	w2, w9, w8
	mov	w0, #8
	bl	_malloc
	mov	x25, x0
	add	x26, x0, #4
	mov	x0, x26
	mov	x1, x22
	bl	_ofw_bus_gen_setup_devinfo
	cbz	x0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x23]
	cbz	x8, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_device_printf
	b	LBB0_6
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	mov	x1, #0
	mov	w2, #-1
	bl	_device_add_child
	cbz	x0, LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x27, x0
	mov	x0, x25
	bl	_resource_list_init
Lloh14:
	adrp	x8, _mv_pcib_ctrl_compat@GOTPAGE
Lloh15:
	ldr	x8, [x8, _mv_pcib_ctrl_compat@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ofw_bus_search_compatible
	ldr	x8, [x0]
	cbz	x8, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	ldp	w2, w3, [x21]
	mov	x0, x27
	mov	x1, x22
	mov	x4, x25
	blr	x8
LBB0_14:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x27
	mov	x1, x25
	bl	_device_set_ivars
	b	LBB0_7
LBB0_15:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x23]
	cbz	x8, LBB0_5
; %bb.16:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x26]
	str	x8, [sp]
	mov	x0, x19
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_device_printf
	b	LBB0_5
LBB0_17:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x1, x21
	bl	_mv_pcib_ctrl_fill_ranges
	tbnz	x0, #63, LBB0_19
; %bb.18:
	mov	w0, #0
	b	LBB0_21
LBB0_19:
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_device_printf
LBB0_20:
Lloh21:
	adrp	x8, _ENXIO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
LBB0_21:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"#address-cells"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"#size-cells"

	.comm	_M_PCIB_CTRL,4,2                ; @M_PCIB_CTRL
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_bootverbose,8,3                ; @bootverbose
l_.str.2:                               ; @.str.2
	.asciz	"Could not set up devinfo for PCI\n"

l_.str.3:                               ; @.str.3
	.asciz	"Could not add child: %s\n"

	.comm	_mv_pcib_ctrl_compat,4,2        ; @mv_pcib_ctrl_compat
l_.str.4:                               ; @.str.4
	.asciz	"could not get ranges\n"

	.no_dead_strip	_mv_pcib_ofw_bus_attach
.subsections_via_symbols
