	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_pcie_remove
_brcmf_pcie_remove:                     ## @brcmf_pcie_remove
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_PCIE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_brcmf_dbg
	movq	%r14, %rdi
	callq	_dev_get_drvdata
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %rbx
	movq	32(%rax), %rax
	movq	48(%rax), %r15
	movq	_BRCMFMAC_PCIE_STATE_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r15)
	cmpq	$0, 8(%r15)
	je	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	callq	_brcmf_pcie_intr_disable
LBB0_3:
	movq	%r14, %rdi
	callq	_brcmf_detach
	movq	%r14, %rdi
	callq	_brcmf_free
	movq	32(%rbx), %rdi
	callq	_kfree
	movq	16(%rbx), %rax
	movq	24(%rax), %rdi
	callq	_kfree
	movq	16(%rbx), %rdi
	callq	_kfree
	movq	%rbx, %rdi
	callq	_kfree
	movq	%r15, %rdi
	callq	_brcmf_pcie_release_irq
	movq	%r15, %rdi
	callq	_brcmf_pcie_release_scratchbuffers
	movq	%r15, %rdi
	callq	_brcmf_pcie_release_ringbuffers
	movq	%r15, %rdi
	callq	_brcmf_pcie_reset_device
	movq	%r15, %rdi
	callq	_brcmf_pcie_release_resource
	movq	8(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	callq	_brcmf_chip_detach
LBB0_5:
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_brcmf_release_module_param
LBB0_7:
	movq	%r15, %rdi
	callq	_kfree
	movq	%r14, %rdi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_set_drvdata                ## TAILCALL
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCIE,4,2                       ## @PCIE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enter\n"

	.comm	_BRCMFMAC_PCIE_STATE_DOWN,4,2   ## @BRCMFMAC_PCIE_STATE_DOWN
	.no_dead_strip	_brcmf_pcie_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_pcie_remove
_brcmf_pcie_remove:                     ; @brcmf_pcie_remove
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
Lloh0:
	adrp	x8, _PCIE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCIE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcmf_dbg
	mov	x0, x19
	bl	_dev_get_drvdata
	cbz	x0, LBB0_8
; %bb.1:
	mov	x21, x0
	ldr	x8, [x0, #32]
	ldr	x20, [x8, #48]
Lloh5:
	adrp	x8, _BRCMFMAC_PCIE_STATE_DOWN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BRCMFMAC_PCIE_STATE_DOWN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x20, #40]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_brcmf_pcie_intr_disable
LBB0_3:
	mov	x0, x19
	bl	_brcmf_detach
	mov	x0, x19
	bl	_brcmf_free
	ldr	x0, [x21, #32]
	bl	_kfree
	ldr	x8, [x21, #16]
	ldr	x0, [x8, #24]
	bl	_kfree
	ldr	x0, [x21, #16]
	bl	_kfree
	mov	x0, x21
	bl	_kfree
	mov	x0, x20
	bl	_brcmf_pcie_release_irq
	mov	x0, x20
	bl	_brcmf_pcie_release_scratchbuffers
	mov	x0, x20
	bl	_brcmf_pcie_release_ringbuffers
	mov	x0, x20
	bl	_brcmf_pcie_reset_device
	mov	x0, x20
	bl	_brcmf_pcie_release_resource
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_5
; %bb.4:
	bl	_brcmf_chip_detach
LBB0_5:
	ldr	x0, [x20]
	cbz	x0, LBB0_7
; %bb.6:
	bl	_brcmf_release_module_param
LBB0_7:
	mov	x0, x20
	bl	_kfree
	mov	x0, x19
	mov	x1, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_dev_set_drvdata
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PCIE,4,2                       ; @PCIE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enter\n"

	.comm	_BRCMFMAC_PCIE_STATE_DOWN,4,2   ; @BRCMFMAC_PCIE_STATE_DOWN
	.no_dead_strip	_brcmf_pcie_remove
.subsections_via_symbols
