	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv_pcib_write_config
_mv_pcib_write_config:                  ## @mv_pcib_write_config
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r12d
	movl	%edx, %r13d
	movl	%esi, %ebx
	movl	%edi, %r15d
	callq	_device_get_softc
	movq	%rax, %r14
	movl	(%rax), %esi
	movl	4(%rax), %edi
	movq	_PCIE_REG_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_bus_space_read_4
	movq	_PCIE_STATUS_LINK_DOWN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_2
## %bb.1:
	movl	%r15d, %edi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	callq	_mv_pcib_root_slot
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mv_pcib_hw_cfgwrite            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PCIE_REG_STATUS,4,2            ## @PCIE_REG_STATUS
	.comm	_PCIE_STATUS_LINK_DOWN,4,2      ## @PCIE_STATUS_LINK_DOWN
	.no_dead_strip	_mv_pcib_write_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv_pcib_write_config
_mv_pcib_write_config:                  ; @mv_pcib_write_config
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x6
	mov	x20, x5
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x26, x0
	bl	_device_get_softc
	mov	x25, x0
	ldr	w0, [x0, #4]
	ldr	w1, [x25]
Lloh0:
	adrp	x8, _PCIE_REG_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCIE_REG_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_bus_space_read_4
Lloh3:
	adrp	x8, _PCIE_STATUS_LINK_DOWN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCIE_STATUS_LINK_DOWN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x26
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	bl	_mv_pcib_root_slot
	cbz	x0, LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x0, x25
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	mov	x4, x21
	mov	x5, x20
	mov	x6, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_mv_pcib_hw_cfgwrite
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PCIE_REG_STATUS,4,2            ; @PCIE_REG_STATUS
	.comm	_PCIE_STATUS_LINK_DOWN,4,2      ; @PCIE_STATUS_LINK_DOWN
	.no_dead_strip	_mv_pcib_write_config
.subsections_via_symbols
