	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcma_core_pci_fixup_pcibridge
_bcma_core_pci_fixup_pcibridge:         ## @bcma_core_pci_fixup_pcibridge
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_bcma_core_pci_hostmode_read_config@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_PCI_SLOT
	testq	%rax, %rax
	je	LBB0_2
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, %rdi
	callq	_pci_name
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_info
	movq	%rbx, %rdi
	callq	_pci_set_master
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_pcibios_enable_device
	testq	%rax, %rax
	js	LBB0_5
## %bb.3:
	movq	_BCMA_PCI_BAR1_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$3, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_pci_write_config_dword         ## TAILCALL
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_pr_err                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_bcma_core_pci_hostmode_read_config,8,3 ## @bcma_core_pci_hostmode_read_config
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PCI: Fixing up bridge %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"PCI: BCMA bridge enable failed\n"

	.comm	_BCMA_PCI_BAR1_CONTROL,4,2      ## @BCMA_PCI_BAR1_CONTROL
	.no_dead_strip	_bcma_core_pci_fixup_pcibridge
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcma_core_pci_fixup_pcibridge
_bcma_core_pci_fixup_pcibridge:         ; @bcma_core_pci_fixup_pcibridge
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _bcma_core_pci_hostmode_read_config@GOTPAGE
Lloh1:
	ldr	x9, [x9, _bcma_core_pci_hostmode_read_config@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0]
	bl	_PCI_SLOT
	cbz	x0, LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x0, x19
	bl	_pci_name
	mov	x1, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	mov	x0, x19
	bl	_pci_set_master
	mov	x0, x19
	mov	w1, #-1
	bl	_pcibios_enable_device
	tbnz	x0, #63, LBB0_5
; %bb.4:
Lloh5:
	adrp	x8, _BCMA_PCI_BAR1_CONTROL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BCMA_PCI_BAR1_CONTROL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #3
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pci_write_config_dword
LBB0_5:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pr_err
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_bcma_core_pci_hostmode_read_config,8,3 ; @bcma_core_pci_hostmode_read_config
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PCI: Fixing up bridge %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"PCI: BCMA bridge enable failed\n"

	.comm	_BCMA_PCI_BAR1_CONTROL,4,2      ; @BCMA_PCI_BAR1_CONTROL
	.no_dead_strip	_bcma_core_pci_fixup_pcibridge
.subsections_via_symbols
