	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wlcore_remove                  ## -- Begin function wlcore_remove
	.p2align	4, 0x90
_wlcore_remove:                         ## @wlcore_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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_dev_get_platdata
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_platform_get_drvdata
	movq	%rax, %rbx
	movq	8(%rax), %rdi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_warn
LBB0_2:
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	$0, (%rax)
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	addq	$32, %rdi
	callq	_wait_for_completion
LBB0_5:
	cmpl	$0, 28(%rbx)
	je	LBB0_11
## %bb.6:
	cmpl	$0, 24(%rbx)
	js	LBB0_8
## %bb.7:
	movq	8(%rbx), %rdi
	callq	_dev_pm_clear_wake_irq
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, 24(%rbx)
LBB0_8:
	movq	8(%rbx), %rdi
	xorl	%esi, %esi
	callq	_device_init_wakeup
	cmpq	$0, 16(%rbx)
	je	LBB0_10
## %bb.9:
	movl	(%rbx), %edi
	callq	_disable_irq_wake
LBB0_10:
	movq	%rbx, %rdi
	callq	_wl1271_unregister_hw
	movq	8(%rbx), %rdi
	callq	_pm_runtime_put_sync
	movq	8(%rbx), %rdi
	callq	_pm_runtime_dont_use_autosuspend
	movq	8(%rbx), %rdi
	callq	_pm_runtime_disable
	movl	(%rbx), %edi
	movq	%rbx, %rsi
	callq	_free_irq
	movq	%rbx, %rdi
	callq	_wlcore_free_hw
LBB0_11:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PM runtime failed: %i\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wlcore_remove                  ; -- Begin function wlcore_remove
	.p2align	2
_wlcore_remove:                         ; @wlcore_remove
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_dev_get_platdata
	mov	x20, x0
	mov	x0, x19
	bl	_platform_get_drvdata
	mov	x19, x0
	ldr	x0, [x0, #8]
	bl	_pm_runtime_get_sync
	tbz	w0, #31, LBB0_2
; %bb.1:
	mov	x2, x0
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_2:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	str	xzr, [x8]
	ldr	x8, [x20]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
	add	x0, x19, #32
	bl	_wait_for_completion
LBB0_5:
	ldr	w8, [x19, #28]
	cbz	w8, LBB0_11
; %bb.6:
	ldr	w8, [x19, #24]
	tbnz	w8, #31, LBB0_8
; %bb.7:
	ldr	x0, [x19, #8]
	bl	_dev_pm_clear_wake_irq
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x19, #24]
LBB0_8:
	ldr	x0, [x19, #8]
	mov	w1, #0
	bl	_device_init_wakeup
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_10
; %bb.9:
	ldr	w0, [x19]
	bl	_disable_irq_wake
LBB0_10:
	mov	x0, x19
	bl	_wl1271_unregister_hw
	ldr	x0, [x19, #8]
	bl	_pm_runtime_put_sync
	ldr	x0, [x19, #8]
	bl	_pm_runtime_dont_use_autosuspend
	ldr	x0, [x19, #8]
	bl	_pm_runtime_disable
	ldr	w0, [x19]
	mov	x1, x19
	bl	_free_irq
	mov	x0, x19
	bl	_wlcore_free_hw
LBB0_11:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PM runtime failed: %i\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
.subsections_via_symbols
