	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv_pcib_init
_mv_pcib_init:                          ## @mv_pcib_init
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movl	%edx, -64(%rbp)                 ## 4-byte Spill
	testl	%edx, %edx
	js	LBB0_16
## %bb.1:
	movl	%esi, %r12d
	xorl	%r14d, %r14d
	movq	_PCIR_HDRTYPE@GOTPCREL(%rip), %r15
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	leal	1(%r14), %eax
	cmpl	-64(%rbp), %r14d                ## 4-byte Folded Reload
	movl	%eax, %r14d
	je	LBB0_16
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	xorl	%ebx, %ebx
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=2
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movq	_PCIR_HDRTYPE@GOTPCREL(%rip), %r15
LBB0_4:                                 ##   in Loop: Header=BB0_6 Depth=2
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=2
	leal	1(%rbx), %eax
	cmpl	-60(%rbp), %ebx                 ## 4-byte Folded Reload
	movl	%eax, %ebx
	jge	LBB0_2
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13), %edi
	movl	(%r15), %r8d
	movl	%r12d, %esi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	movl	$1, %r9d
	callq	_mv_pcib_read_config
	movq	%rax, %rdx
	movq	_PCIM_HDRTYPE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andq	%rdx, %rax
	movq	_PCI_MAXHDRTYPE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	testl	%ebx, %ebx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	_PCIR_COMMAND@GOTPCREL(%rip), %rcx
	movq	_PCIM_CMD_PORTEN@GOTPCREL(%rip), %r15
	jmp	LBB0_11
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=2
	movq	_PCIM_MFDEV@GOTPCREL(%rip), %rax
	testq	%rdx, (%rax)
	movq	_PCIR_COMMAND@GOTPCREL(%rip), %rcx
	movq	_PCIM_CMD_PORTEN@GOTPCREL(%rip), %r15
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	_PCI_FUNCMAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=2
	movl	(%r13), %edi
	movl	(%rcx), %r8d
	movl	%r12d, %esi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	%r14d, %edx
	movl	%ebx, %ecx
	movl	$1, %r9d
	callq	_mv_pcib_read_config
	movq	(%r15), %r15
	movq	_PCIM_CMD_MEMEN@GOTPCREL(%rip), %rcx
	orq	(%rcx), %r15
	notq	%r15
	andq	%rax, %r15
	movl	(%r13), %edi
	movq	_PCIR_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$1, (%rsp)
	movl	%r12d, %esi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	movq	%r15, %r9
	callq	_mv_pcib_write_config
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	callq	_mv_pcib_init_all_bars
	testl	%eax, %eax
	jne	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	_PCIM_CMD_BUSMASTEREN@GOTPCREL(%rip), %rax
	orq	(%rax), %r15
	movq	_PCIM_CMD_MEMEN@GOTPCREL(%rip), %rax
	orq	(%rax), %r15
	movq	_PCIM_CMD_PORTEN@GOTPCREL(%rip), %rax
	orq	(%rax), %r15
	movl	(%r13), %edi
	movq	_PCIR_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$1, (%rsp)
	movl	%r12d, %esi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	movq	%r15, %r9
	callq	_mv_pcib_write_config
	movl	(%r13), %edi
	movq	_PCIR_CLASS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%r12d, %esi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	movl	$1, %r9d
	callq	_mv_pcib_read_config
	movq	%rax, %r15
	movl	(%r13), %edi
	movq	_PCIR_SUBCLASS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%r12d, %esi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	movl	$1, %r9d
	callq	_mv_pcib_read_config
	movq	_PCIC_BRIDGE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r15
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	_PCIS_BRIDGE_PCI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	%r13, %rdi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %esi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	%r14d, %edx
	movl	%ebx, %ecx
	callq	_mv_pcib_init_bridge
	movq	_PCIR_HDRTYPE@GOTPCREL(%rip), %r15
	jmp	LBB0_5
LBB0_16:
	movq	%r13, %rdi
	movl	$251658240, %esi                ## imm = 0xF000000
	callq	_pcib_write_irq_mask
	xorl	%eax, %eax
LBB0_17:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCIR_HDRTYPE,4,2               ## @PCIR_HDRTYPE
	.comm	_PCIM_HDRTYPE,8,3               ## @PCIM_HDRTYPE
	.comm	_PCI_MAXHDRTYPE,8,3             ## @PCI_MAXHDRTYPE
	.comm	_PCIM_MFDEV,8,3                 ## @PCIM_MFDEV
	.comm	_PCI_FUNCMAX,4,2                ## @PCI_FUNCMAX
	.comm	_PCIR_COMMAND,4,2               ## @PCIR_COMMAND
	.comm	_PCIM_CMD_MEMEN,8,3             ## @PCIM_CMD_MEMEN
	.comm	_PCIM_CMD_PORTEN,8,3            ## @PCIM_CMD_PORTEN
	.comm	_PCIM_CMD_BUSMASTEREN,8,3       ## @PCIM_CMD_BUSMASTEREN
	.comm	_PCIR_CLASS,4,2                 ## @PCIR_CLASS
	.comm	_PCIR_SUBCLASS,4,2              ## @PCIR_SUBCLASS
	.comm	_PCIC_BRIDGE,8,3                ## @PCIC_BRIDGE
	.comm	_PCIS_BRIDGE_PCI,8,3            ## @PCIS_BRIDGE_PCI
	.no_dead_strip	_mv_pcib_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv_pcib_init
_mv_pcib_init:                          ; @mv_pcib_init
	.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
	str	w2, [sp, #12]                   ; 4-byte Folded Spill
	tbnz	w2, #31, LBB0_13
; %bb.1:
	mov	x21, x1
	mov	w22, #0
Lloh0:
	adrp	x25, _PCIR_HDRTYPE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _PCIR_HDRTYPE@GOTPAGEOFF]
Lloh2:
	adrp	x20, _PCIR_COMMAND@GOTPAGE
Lloh3:
	ldr	x20, [x20, _PCIR_COMMAND@GOTPAGEOFF]
Lloh4:
	adrp	x26, _PCIM_CMD_MEMEN@GOTPAGE
Lloh5:
	ldr	x26, [x26, _PCIM_CMD_MEMEN@GOTPAGEOFF]
Lloh6:
	adrp	x27, _PCIM_CMD_PORTEN@GOTPAGE
Lloh7:
	ldr	x27, [x27, _PCIM_CMD_PORTEN@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w8, w22, #1
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w22, w9
	mov	x22, x8
	b.eq	LBB0_13
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	mov	w23, #0
	mov	w28, #0
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=2
Lloh8:
	adrp	x25, _PCIR_HDRTYPE@GOTPAGE
Lloh9:
	ldr	x25, [x25, _PCIR_HDRTYPE@GOTPAGEOFF]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	w8, w23, #1
	cmp	w23, w28
	mov	x23, x8
	b.ge	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x19]
	ldr	w4, [x25]
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	mov	w5, #1
	bl	_mv_pcib_read_config
Lloh10:
	adrp	x8, _PCIM_HDRTYPE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PCIM_HDRTYPE@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	and	x8, x8, x0
Lloh13:
	adrp	x9, _PCI_MAXHDRTYPE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PCI_MAXHDRTYPE@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.gt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x24, x0
	cbnz	w23, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
Lloh16:
	adrp	x8, _PCIM_MFDEV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PCIM_MFDEV@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
Lloh19:
	adrp	x9, _PCI_FUNCMAX@GOTPAGE
Lloh20:
	ldr	x9, [x9, _PCI_FUNCMAX@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	x8, x24
	csel	w28, w28, w9, eq
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=2
	ldr	w0, [x19]
	ldr	w4, [x20]
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	mov	w5, #1
	bl	_mv_pcib_read_config
	ldr	x8, [x26]
	ldr	x9, [x27]
	orr	x8, x9, x8
	bic	x25, x0, x8
	ldr	w0, [x19]
	ldr	w4, [x20]
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	mov	x5, x25
	mov	w6, #1
	bl	_mv_pcib_write_config
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	mov	x4, x24
	bl	_mv_pcib_init_all_bars
	cbnz	w0, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=2
Lloh22:
	adrp	x8, _PCIM_CMD_BUSMASTEREN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PCIM_CMD_BUSMASTEREN@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	ldr	x9, [x26]
	ldr	x10, [x27]
	orr	x8, x8, x25
	orr	x8, x8, x9
	orr	x5, x8, x10
	ldr	w0, [x19]
	ldr	w4, [x20]
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	mov	w6, #1
	bl	_mv_pcib_write_config
	ldr	w0, [x19]
Lloh25:
	adrp	x8, _PCIR_CLASS@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PCIR_CLASS@GOTPAGEOFF]
Lloh27:
	ldr	w4, [x8]
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	mov	w5, #1
	bl	_mv_pcib_read_config
	mov	x24, x0
	ldr	w0, [x19]
Lloh28:
	adrp	x8, _PCIR_SUBCLASS@GOTPAGE
Lloh29:
	ldr	x8, [x8, _PCIR_SUBCLASS@GOTPAGEOFF]
Lloh30:
	ldr	w4, [x8]
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	mov	w5, #1
	bl	_mv_pcib_read_config
Lloh31:
	adrp	x8, _PCIC_BRIDGE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _PCIC_BRIDGE@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	cmp	x24, x8
	b.ne	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=2
Lloh34:
	adrp	x8, _PCIS_BRIDGE_PCI@GOTPAGE
Lloh35:
	ldr	x8, [x8, _PCIS_BRIDGE_PCI@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	bl	_mv_pcib_init_bridge
	b	LBB0_4
LBB0_13:
	mov	x0, x19
	mov	w1, #251658240
	bl	_pcib_write_irq_mask
	mov	w0, #0
LBB0_14:
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_PCIR_HDRTYPE,4,2               ; @PCIR_HDRTYPE
	.comm	_PCIM_HDRTYPE,8,3               ; @PCIM_HDRTYPE
	.comm	_PCI_MAXHDRTYPE,8,3             ; @PCI_MAXHDRTYPE
	.comm	_PCIM_MFDEV,8,3                 ; @PCIM_MFDEV
	.comm	_PCI_FUNCMAX,4,2                ; @PCI_FUNCMAX
	.comm	_PCIR_COMMAND,4,2               ; @PCIR_COMMAND
	.comm	_PCIM_CMD_MEMEN,8,3             ; @PCIM_CMD_MEMEN
	.comm	_PCIM_CMD_PORTEN,8,3            ; @PCIM_CMD_PORTEN
	.comm	_PCIM_CMD_BUSMASTEREN,8,3       ; @PCIM_CMD_BUSMASTEREN
	.comm	_PCIR_CLASS,4,2                 ; @PCIR_CLASS
	.comm	_PCIR_SUBCLASS,4,2              ; @PCIR_SUBCLASS
	.comm	_PCIC_BRIDGE,8,3                ; @PCIC_BRIDGE
	.comm	_PCIS_BRIDGE_PCI,8,3            ; @PCIS_BRIDGE_PCI
	.no_dead_strip	_mv_pcib_init
.subsections_via_symbols
