	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mwifiex_pcie_remove
_mwifiex_pcie_remove:                   ## @mwifiex_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	callq	_pci_get_drvdata
	movq	%rax, %rbx
	leaq	16(%rax), %rdi
	callq	_wait_for_completion
	movq	8(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_9
## %bb.1:
	cmpl	$0, 4(%r14)
	je	LBB0_9
## %bb.2:
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%r14, %rdi
	callq	_mwifiex_read_reg
	movl	-20(%rbp), %eax
	jmp	LBB0_5
LBB0_4:
	movl	$-1, -20(%rbp)
	movl	$-1, %eax
LBB0_5:
	movq	_FIRMWARE_READY_PCIE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.6:
	cmpl	$0, (%r14)
	jne	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_mwifiex_deauthenticate_all
	movq	_MWIFIEX_BSS_ROLE_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mwifiex_get_priv
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_mwifiex_disable_auto_ds
	movq	_MWIFIEX_FUNC_SHUTDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mwifiex_init_shutdown_fw
LBB0_8:
	movq	%r14, %rdi
	callq	_mwifiex_remove_card
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FIRMWARE_READY_PCIE,4,2        ## @FIRMWARE_READY_PCIE
	.comm	_MWIFIEX_BSS_ROLE_ANY,4,2       ## @MWIFIEX_BSS_ROLE_ANY
	.comm	_MWIFIEX_FUNC_SHUTDOWN,4,2      ## @MWIFIEX_FUNC_SHUTDOWN
	.no_dead_strip	_mwifiex_pcie_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mwifiex_pcie_remove
_mwifiex_pcie_remove:                   ; @mwifiex_pcie_remove
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	bl	_pci_get_drvdata
	mov	x20, x0
	add	x0, x0, #16
	bl	_wait_for_completion
	ldr	x19, [x20, #8]
	cbz	x19, LBB0_9
; %bb.1:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_9
; %bb.2:
	ldr	x8, [x20]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_mwifiex_read_reg
	ldr	w8, [sp, #12]
	b	LBB0_5
LBB0_4:
	mov	w8, #-1
	str	w8, [sp, #12]
LBB0_5:
Lloh0:
	adrp	x9, _FIRMWARE_READY_PCIE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FIRMWARE_READY_PCIE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.6:
	ldr	w8, [x19]
	cbnz	w8, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_mwifiex_deauthenticate_all
Lloh3:
	adrp	x8, _MWIFIEX_BSS_ROLE_ANY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MWIFIEX_BSS_ROLE_ANY@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mwifiex_get_priv
	mov	x20, x0
	bl	_mwifiex_disable_auto_ds
Lloh6:
	adrp	x8, _MWIFIEX_FUNC_SHUTDOWN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MWIFIEX_FUNC_SHUTDOWN@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mwifiex_init_shutdown_fw
LBB0_8:
	mov	x0, x19
	bl	_mwifiex_remove_card
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_FIRMWARE_READY_PCIE,4,2        ; @FIRMWARE_READY_PCIE
	.comm	_MWIFIEX_BSS_ROLE_ANY,4,2       ; @MWIFIEX_BSS_ROLE_ANY
	.comm	_MWIFIEX_FUNC_SHUTDOWN,4,2      ; @MWIFIEX_FUNC_SHUTDOWN
	.no_dead_strip	_mwifiex_pcie_remove
.subsections_via_symbols
