	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_pcie_select_core
_brcmf_pcie_select_core:                ## @brcmf_pcie_select_core
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r12
	movl	(%rbx), %edi
	movl	%r15d, %esi
	callq	_brcmf_chip_get_core
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %rbx
	movq	(%rax), %rdx
	movq	%rdx, -40(%rbp)
	movq	_BRCMF_PCIE_BAR0_WINDOW@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_pci_write_config_dword
	movl	(%r15), %esi
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pci_read_config_dword
	testq	%rax, %rax
	jne	LBB0_4
## %bb.2:
	movq	(%rbx), %rdx
	cmpq	%rdx, -40(%rbp)
	je	LBB0_4
## %bb.3:
	movq	%rdx, -40(%rbp)
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_pci_write_config_dword
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_brcmf_err                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BRCMF_PCIE_BAR0_WINDOW,4,2     ## @BRCMF_PCIE_BAR0_WINDOW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported core selected %x\n"

	.no_dead_strip	_brcmf_pcie_select_core
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_pcie_select_core
_brcmf_pcie_select_core:                ; @brcmf_pcie_select_core
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x20, x0
	ldr	x19, [x0, #8]
	mov	x0, x19
	bl	_dev_get_drvdata
	mov	x22, x0
	ldr	w0, [x20]
	mov	x1, x21
	bl	_brcmf_chip_get_core
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	x2, [x0]
	str	x2, [sp, #8]
Lloh0:
	adrp	x21, _BRCMF_PCIE_BAR0_WINDOW@GOTPAGE
Lloh1:
	ldr	x21, [x21, _BRCMF_PCIE_BAR0_WINDOW@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_pci_write_config_dword
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	bl	_pci_read_config_dword
	cbnz	x0, LBB0_4
; %bb.2:
	ldr	x8, [sp, #8]
	ldr	x2, [x20]
	cmp	x8, x2
	b.eq	LBB0_4
; %bb.3:
	str	x2, [sp, #8]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_pci_write_config_dword
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_5:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_brcmf_err
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_BRCMF_PCIE_BAR0_WINDOW,4,2     ; @BRCMF_PCIE_BAR0_WINDOW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported core selected %x\n"

	.no_dead_strip	_brcmf_pcie_select_core
.subsections_via_symbols
