	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function brcmf_pcie_setup
LCPI0_0:
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	1                               ## 0x1
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
LCPI0_1:
	.quad	8                               ## 0x8
	.quad	8                               ## 0x8
LCPI0_2:
	.quad	16                              ## 0x10
	.quad	16                              ## 0x10
LCPI0_3:
	.quad	24                              ## 0x18
	.quad	24                              ## 0x18
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_brcmf_pcie_setup:                      ## @brcmf_pcie_setup
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	testl	%esi, %esi
	jne	LBB0_7
## %bb.1:
	movq	%rdx, %rbx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movq	8(%rax), %rax
	movq	(%rax), %r12
	movq	%r12, %rdi
	callq	_brcmf_pcie_attach
	movq	(%rbx), %rax
	movq	_BRCMF_PCIE_FW_CODE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	16(%rax,%rcx,8), %r13
	movq	_BRCMF_PCIE_FW_NVRAM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	(%rax,%rcx,8), %rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rax,%rcx,8), %r14
	movq	%rbx, %rdi
	callq	_kfree
	movl	52(%r12), %edi
	callq	_brcmf_chip_get_raminfo
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_brcmf_err
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_3:
	movq	8(%r13), %rsi
	movl	(%r13), %edx
	movq	%r12, %rdi
	callq	_brcmf_pcie_adjust_ramsize
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_brcmf_pcie_download_fw_nvram
	testl	%eax, %eax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_7
## %bb.4:
	movq	_BRCMFMAC_PCIE_STATE_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r12)
	movq	%r12, %rdi
	callq	_brcmf_pcie_init_ringbuffers
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movq	%r12, %rdi
	callq	_brcmf_pcie_init_scratchbuffers
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	_BCMA_CORE_PCIE2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_brcmf_pcie_select_core
	movq	%r12, %rdi
	callq	_brcmf_pcie_request_irq
	testl	%eax, %eax
	je	LBB0_8
LBB0_7:
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_device_release_driver          ## TAILCALL
LBB0_8:
	movq	_BRCMF_NROF_COMMON_MSGRINGS@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	testq	%r8, %r8
	je	LBB0_15
## %bb.9:
	cmpq	$1, %r8
	jne	LBB0_11
## %bb.10:
	xorl	%ecx, %ecx
	jmp	LBB0_13
LBB0_11:
	movq	%r8, %rdx
	andq	$-2, %rdx
	xorl	%ecx, %ecx
	movq	%r15, %rax
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	40(%r12), %rsi
	movq	(%rsi,%rcx,8), %rsi
	movq	(%rax), %rdi
	movq	24(%rdi), %rdi
	movq	%rsi, (%rdi,%rcx,8)
	movq	40(%r12), %rsi
	movq	8(%rsi,%rcx,8), %rsi
	movq	(%rax), %rdi
	movq	24(%rdi), %rdi
	movq	%rsi, 8(%rdi,%rcx,8)
	addq	$2, %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_12
LBB0_13:
	testb	$1, %r8b
	je	LBB0_15
## %bb.14:
	movq	40(%r12), %rax
	movq	(%rax,%rcx,8), %rax
	movq	(%r15), %rdx
	movq	24(%rdx), %rdx
	movq	%rax, (%rdx,%rcx,8)
LBB0_15:
	movq	16(%r12), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$8, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.16:
	movq	16(%r12), %r9
	testq	%r9, %r9
	je	LBB0_36
## %bb.17:
	cmpq	$4, %r9
	jb	LBB0_18
## %bb.19:
	leaq	40(%r12), %rdx
	cmpq	%rdx, %rax
	jae	LBB0_22
## %bb.20:
	leaq	(%rax,%r9,8), %rdx
	leaq	32(%r12), %rsi
	cmpq	%rdx, %rsi
	jae	LBB0_22
LBB0_18:
	xorl	%r8d, %r8d
LBB0_29:
	movq	%r8, %r10
	notq	%r10
	addq	%r9, %r10
	movq	%r9, %rdi
	andq	$3, %rdi
	je	LBB0_33
## %bb.30:
	leaq	(,%r8,4), %rbx
	negq	%rdi
	xorl	%edx, %edx
LBB0_31:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rcx
	addq	%rbx, %rcx
	movq	%rcx, (%rax,%rbx,2)
	decq	%rdx
	addq	$4, %rbx
	cmpq	%rdx, %rdi
	jne	LBB0_31
## %bb.32:
	subq	%rdx, %r8
LBB0_33:
	cmpq	$3, %r10
	jb	LBB0_36
## %bb.34:
	movq	%r9, %rsi
	subq	%r8, %rsi
	leaq	8(,%r8,4), %rdx
LBB0_35:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rcx
	addq	%rdx, %rcx
	addq	$-8, %rcx
	movq	%rcx, -16(%rax,%rdx,2)
	movq	32(%r12), %rcx
	addq	%rdx, %rcx
	addq	$-4, %rcx
	movq	%rcx, -8(%rax,%rdx,2)
	movq	32(%r12), %rcx
	addq	%rdx, %rcx
	movq	%rcx, (%rax,%rdx,2)
	movq	32(%r12), %rcx
	addq	%rdx, %rcx
	addq	$4, %rcx
	movq	%rcx, 8(%rax,%rdx,2)
	addq	$16, %rdx
	addq	$-4, %rsi
	jne	LBB0_35
	jmp	LBB0_36
LBB0_22:
	movq	%r9, %r8
	andq	$-4, %r8
	leaq	-4(%r8), %rdx
	movq	%rdx, %rbx
	shrq	$2, %rbx
	incq	%rbx
	testq	%rdx, %rdx
	je	LBB0_25
## %bb.23:
	movq	%rbx, %rsi
	andq	$-2, %rsi
	movq	32(%r12), %xmm0                 ## xmm0 = mem[0],zero
	pshufd	$68, %xmm0, %xmm1               ## xmm1 = xmm0[0,1,0,1]
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0]
	xorl	%edi, %edi
	movdqa	LCPI0_1(%rip), %xmm2            ## xmm2 = [8,8]
	movdqa	LCPI0_2(%rip), %xmm3            ## xmm3 = [16,16]
	movdqa	LCPI0_3(%rip), %xmm4            ## xmm4 = [24,24]
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm0, %xmm5
	psllq	$2, %xmm5
	paddq	%xmm1, %xmm5
	movdqa	%xmm5, %xmm6
	paddq	%xmm2, %xmm6
	movdqu	%xmm5, (%rax,%rdi,8)
	movdqu	%xmm6, 16(%rax,%rdi,8)
	movdqa	%xmm5, %xmm6
	paddq	%xmm3, %xmm6
	paddq	%xmm4, %xmm5
	movdqu	%xmm6, 32(%rax,%rdi,8)
	movdqu	%xmm5, 48(%rax,%rdi,8)
	addq	$8, %rdi
	paddq	%xmm2, %xmm0
	addq	$-2, %rsi
	jne	LBB0_24
	jmp	LBB0_26
LBB0_25:
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0]
	xorl	%edi, %edi
LBB0_26:
	testb	$1, %bl
	je	LBB0_28
## %bb.27:
	movq	32(%r12), %xmm1                 ## xmm1 = mem[0],zero
	pshufd	$68, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,0,1]
	psllq	$2, %xmm0
	paddq	%xmm1, %xmm0
	movdqa	LCPI0_1(%rip), %xmm1            ## xmm1 = [8,8]
	paddq	%xmm0, %xmm1
	movdqu	%xmm0, (%rax,%rdi,8)
	movdqu	%xmm1, 16(%rax,%rdi,8)
LBB0_28:
	cmpq	%r8, %r9
	jne	LBB0_29
LBB0_36:
	movq	(%r15), %rcx
	movq	%rax, 16(%rcx)
	movl	28(%r12), %eax
	movl	%eax, 12(%rcx)
	movl	24(%r12), %eax
	movl	%eax, 8(%rcx)
	movq	%r9, (%rcx)
	leaq	8(%r12), %rdi
	callq	_init_waitqueue_head
	movq	%r12, %rdi
	callq	_brcmf_pcie_intr_enable
	movq	%r12, %rdi
	callq	_brcmf_pcie_hostready
	movq	(%r12), %rdi
	callq	_brcmf_attach
	testl	%eax, %eax
	jne	LBB0_7
## %bb.37:
	movq	%r12, %rdi
	xorl	%esi, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_brcmf_pcie_bus_console_read    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BRCMF_PCIE_FW_CODE,8,3         ## @BRCMF_PCIE_FW_CODE
	.comm	_BRCMF_PCIE_FW_NVRAM,8,3        ## @BRCMF_PCIE_FW_NVRAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get RAM info\n"

	.comm	_BRCMFMAC_PCIE_STATE_UP,4,2     ## @BRCMFMAC_PCIE_STATE_UP
	.comm	_BCMA_CORE_PCIE2,4,2            ## @BCMA_CORE_PCIE2
	.comm	_BRCMF_NROF_COMMON_MSGRINGS,8,3 ## @BRCMF_NROF_COMMON_MSGRINGS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_brcmf_pcie_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function brcmf_pcie_setup
lCPI0_0:
	.quad	0                               ; 0x0
	.quad	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_brcmf_pcie_setup:                      ; @brcmf_pcie_setup
	.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, x0
	cbnz	w1, LBB0_7
; %bb.1:
	mov	x23, x2
	mov	x0, x19
	bl	_dev_get_drvdata
	mov	x21, x0
	ldr	x8, [x0, #8]
	ldr	x20, [x8]
	mov	x0, x20
	bl	_brcmf_pcie_attach
	ldr	x8, [x23]
Lloh0:
	adrp	x9, _BRCMF_PCIE_FW_CODE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BRCMF_PCIE_FW_CODE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	mov	w10, #24
	madd	x9, x9, x10, x8
	ldr	x22, [x9, #16]
Lloh3:
	adrp	x9, _BRCMF_PCIE_FW_NVRAM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BRCMF_PCIE_FW_NVRAM@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	madd	x8, x9, x10, x8
	ldp	x25, x24, [x8]
	mov	x0, x23
	bl	_kfree
	ldr	w0, [x20, #52]
	bl	_brcmf_chip_get_raminfo
	cbz	w0, LBB0_3
; %bb.2:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_brcmf_err
	b	LBB0_7
LBB0_3:
	ldr	x1, [x22, #8]
	ldr	w2, [x22]
	mov	x0, x20
	bl	_brcmf_pcie_adjust_ramsize
	mov	x0, x20
	mov	x1, x22
	mov	x2, x24
	mov	x3, x25
	bl	_brcmf_pcie_download_fw_nvram
	cbnz	w0, LBB0_7
; %bb.4:
Lloh8:
	adrp	x8, _BRCMFMAC_PCIE_STATE_UP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BRCMFMAC_PCIE_STATE_UP@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x20, #48]
	mov	x0, x20
	bl	_brcmf_pcie_init_ringbuffers
	cbnz	w0, LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_brcmf_pcie_init_scratchbuffers
	cbnz	w0, LBB0_7
; %bb.6:
Lloh11:
	adrp	x8, _BCMA_CORE_PCIE2@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BCMA_CORE_PCIE2@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_brcmf_pcie_select_core
	mov	x0, x20
	bl	_brcmf_pcie_request_irq
	cbz	w0, LBB0_8
LBB0_7:
	mov	x0, 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	_device_release_driver
LBB0_8:
Lloh14:
	adrp	x8, _BRCMF_NROF_COMMON_MSGRINGS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BRCMF_NROF_COMMON_MSGRINGS@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.9:
	mov	x9, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x20, #40]
	lsl	x11, x9, #3
	ldr	x10, [x10, x11]
	ldr	x12, [x21]
	ldr	x12, [x12, #24]
	str	x10, [x12, x11]
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_10
LBB0_11:
	ldr	x0, [x20, #16]
Lloh17:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_kcalloc
	cbz	x0, LBB0_7
; %bb.12:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_21
; %bb.13:
	cmp	x8, #8
	b.lo	LBB0_18
; %bb.14:
	add	x9, x0, x8, lsl #3
	add	x10, x20, #32
	add	x11, x20, #40
	cmp	x0, x11
	ccmp	x10, x9, #2, lo
	b.lo	LBB0_18
; %bb.15:
	and	x9, x8, #0xfffffffffffffff8
	ld1r.2d	{ v0 }, [x10]
Lloh20:
	adrp	x10, lCPI0_0@PAGE
Lloh21:
	ldr	q1, [x10, lCPI0_0@PAGEOFF]
	add	x10, x0, #32
	mov	w11, #24
	dup.2d	v2, x11
	mov	w11, #16
	dup.2d	v3, x11
	mov	w11, #8
	dup.2d	v4, x11
	mov	x11, x9
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	shl.2d	v5, v1, #2
	add.2d	v6, v0, v5
	add.2d	v5, v5, v0
	add.2d	v7, v5, v4
	add.2d	v16, v5, v3
	add.2d	v5, v5, v2
	stp	q6, q7, [x10, #-32]
	stp	q16, q5, [x10], #64
	add.2d	v1, v1, v4
	subs	x11, x11, #8
	b.ne	LBB0_16
; %bb.17:
	cmp	x8, x9
	b.ne	LBB0_19
	b	LBB0_21
LBB0_18:
	mov	x9, #0
LBB0_19:
	sub	x10, x8, x9
	lsl	x11, x9, #2
	add	x9, x0, x9, lsl #3
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x20, #32]
	add	x12, x12, x11
	str	x12, [x9], #8
	add	x11, x11, #4
	subs	x10, x10, #1
	b.ne	LBB0_20
LBB0_21:
	ldr	x9, [x21]
	str	x0, [x9, #16]
	ldr	d0, [x20, #24]
	str	d0, [x9, #8]
	str	x8, [x9]
	add	x0, x20, #8
	bl	_init_waitqueue_head
	mov	x0, x20
	bl	_brcmf_pcie_intr_enable
	mov	x0, x20
	bl	_brcmf_pcie_hostready
	ldr	x0, [x20]
	bl	_brcmf_attach
	cbnz	w0, LBB0_7
; %bb.22:
	mov	x0, x20
	mov	w1, #0
	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	_brcmf_pcie_bus_console_read
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdr	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_BRCMF_PCIE_FW_CODE,8,3         ; @BRCMF_PCIE_FW_CODE
	.comm	_BRCMF_PCIE_FW_NVRAM,8,3        ; @BRCMF_PCIE_FW_NVRAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get RAM info\n"

	.comm	_BRCMFMAC_PCIE_STATE_UP,4,2     ; @BRCMFMAC_PCIE_STATE_UP
	.comm	_BCMA_CORE_PCIE2,4,2            ; @BCMA_CORE_PCIE2
	.comm	_BRCMF_NROF_COMMON_MSGRINGS,8,3 ; @BRCMF_NROF_COMMON_MSGRINGS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_brcmf_pcie_setup
.subsections_via_symbols
