	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv_pcib_init_bar
_mv_pcib_init_bar:                      ## @mv_pcib_init_bar
	.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
	movl	%ecx, %r15d
	movl	%edx, %ebx
	movl	%esi, %r13d
	movq	%rdi, %r14
	movl	%r8d, %edi
	callq	_PCIR_BAR
	movl	%eax, %r12d
	movl	(%r14), %edi
	movl	$4, (%rsp)
	movl	%r13d, %esi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	movl	%eax, %r8d
	movl	$-1, %r9d
	callq	_mv_pcib_write_config
	movl	(%r14), %edi
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movl	%r13d, %esi
	movl	%r12d, %r13d
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edx
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movl	%r15d, %ecx
	movl	%r12d, %r8d
	movl	$4, %r9d
	callq	_mv_pcib_read_config
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %r15d
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_pcib_alloc
	movl	%eax, %r9d
	testl	%eax, %eax
	movl	-60(%rbp), %r12d                ## 4-byte Reload
	movl	$-1, %eax
	je	LBB0_7
## %bb.3:
	movq	%r14, %rcx
	movl	%r15d, %eax
	andl	$7, %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_5
## %bb.4:
	movl	%r9d, (%rsp)
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	%r14d, %ecx
	movl	%r13d, %r8d
	movl	%r9d, -52(%rbp)                 ## 4-byte Spill
	movl	%r15d, %r9d
	callq	_printf
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
LBB0_5:
	movl	(%rcx), %edi
	movl	$4, (%rsp)
	movl	%ebx, %esi
	movl	%r12d, %edx
	movq	%rcx, %rbx
	movl	%r14d, %ecx
	movl	%r13d, %r8d
	callq	_mv_pcib_write_config
	movl	$1, %eax
	cmpl	$4, -56(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_7
## %bb.6:
	movl	(%rbx), %edi
	addl	$4, %r13d
	movl	$4, (%rsp)
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%r13d, %r8d
	xorl	%r9d, %r9d
	callq	_mv_pcib_write_config
	movl	$2, %eax
	jmp	LBB0_7
LBB0_1:
	movl	$1, %eax
LBB0_7:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bootverbose,8,3                ## @bootverbose
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PCI %u:%u:%u: reg %x: smask=%08x: addr=%08x\n"

	.no_dead_strip	_mv_pcib_init_bar
.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_bar
_mv_pcib_init_bar:                      ; @mv_pcib_init_bar
	.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, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	mov	x0, x4
	bl	_PCIR_BAR
	mov	x23, x0
	ldr	w0, [x22]
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	mov	x4, x23
	mov	w5, #-1
	mov	w6, #4
	bl	_mv_pcib_write_config
	ldr	w0, [x22]
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	mov	x4, x23
	mov	w5, #4
	bl	_mv_pcib_read_config
	cbz	w0, LBB0_6
; %bb.1:
	mov	x25, x0
	mov	x0, x22
	mov	x1, x25
	bl	_pcib_alloc
	cbz	w0, LBB0_7
; %bb.2:
	mov	x24, x0
	and	w26, w25, #0x7
Lloh0:
	adrp	x8, _bootverbose@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	mov	x4, x23
	mov	x5, x25
	mov	x6, x24
	bl	_printf
LBB0_4:
	ldr	w0, [x22]
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	mov	x4, x23
	mov	x5, x24
	mov	w6, #4
	bl	_mv_pcib_write_config
	cmp	w26, #4
	b.ne	LBB0_6
; %bb.5:
	ldr	w0, [x22]
	add	w4, w23, #4
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	mov	w5, #0
	mov	w6, #4
	bl	_mv_pcib_write_config
	mov	w0, #2
	b	LBB0_8
LBB0_6:
	mov	w0, #1
	b	LBB0_8
LBB0_7:
	mov	w0, #-1
LBB0_8:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_bootverbose,8,3                ; @bootverbose
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PCI %u:%u:%u: reg %x: smask=%08x: addr=%08x\n"

	.no_dead_strip	_mv_pcib_init_bar
.subsections_via_symbols
