	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mwifiex_cleanup_pcie
_mwifiex_cleanup_pcie:                  ## @mwifiex_cleanup_pcie
	.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
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movq	16(%rbx), %r12
	movq	24(%rbx), %r15
	leaq	8(%rbx), %rdi
	callq	_cancel_work_sync
	movl	4(%r12), %esi
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	callq	_mwifiex_read_reg
	movq	-40(%rbp), %rax
	movq	_FIRMWARE_READY_PCIE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_mwifiex_dbg
	movl	(%r12), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_mwifiex_write_reg
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_mwifiex_dbg
LBB0_3:
	movq	%r15, %rdi
	callq	_pci_disable_device
	movl	4(%rbx), %esi
	movq	%r15, %rdi
	callq	_pci_iounmap
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_pci_iounmap
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_pci_release_region
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_pci_release_region
	movq	%r14, %rdi
	callq	_mwifiex_pcie_free_buffers
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FIRMWARE_READY_PCIE,8,3        ## @FIRMWARE_READY_PCIE
	.comm	_INFO,4,2                       ## @INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Clearing driver ready signature\n"

	.comm	_ERROR,4,2                      ## @ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Failed to write driver not-ready signature\n"

	.no_dead_strip	_mwifiex_cleanup_pcie
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mwifiex_cleanup_pcie
_mwifiex_cleanup_pcie:                  ; @mwifiex_cleanup_pcie
	.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	x19, x0
	ldr	x21, [x0]
	ldp	x22, x20, [x21, #16]
	add	x0, x21, #8
	bl	_cancel_work_sync
	ldr	w1, [x22, #4]
	add	x2, sp, #8
	mov	x0, x19
	bl	_mwifiex_read_reg
	ldr	x8, [sp, #8]
Lloh0:
	adrp	x9, _FIRMWARE_READY_PCIE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FIRMWARE_READY_PCIE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _INFO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INFO@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mwifiex_dbg
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	bl	_mwifiex_write_reg
	cbz	x0, LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mwifiex_dbg
LBB0_3:
	mov	x0, x20
	bl	_pci_disable_device
	ldr	w1, [x21, #4]
	mov	x0, x20
	bl	_pci_iounmap
	ldr	w1, [x21]
	mov	x0, x20
	bl	_pci_iounmap
	mov	x0, x20
	mov	w1, #2
	bl	_pci_release_region
	mov	x0, x20
	mov	w1, #0
	bl	_pci_release_region
	mov	x0, x19
	bl	_mwifiex_pcie_free_buffers
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_FIRMWARE_READY_PCIE,8,3        ; @FIRMWARE_READY_PCIE
	.comm	_INFO,4,2                       ; @INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Clearing driver ready signature\n"

	.comm	_ERROR,4,2                      ; @ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Failed to write driver not-ready signature\n"

	.no_dead_strip	_mwifiex_cleanup_pcie
.subsections_via_symbols
