	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wil_p2p_cancel_listen          ## -- Begin function wil_p2p_cancel_listen
	.p2align	4, 0x90
_wil_p2p_cancel_listen:                 ## @wil_p2p_cancel_listen
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r15
	callq	_vif_to_wil
	movq	%rax, %r14
	movq	%rax, %rbx
	addq	$20, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	8(%r15), %rdx
	cmpq	%r12, %rdx
	jne	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	callq	_wil_p2p_stop_discovery
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_mutex_unlock
	testl	%r12d, %r12d
	je	LBB0_3
## %bb.5:
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_vif_to_radio_wdev
	movq	8(%r15), %rsi
	leaq	16(%r15), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, %edi
	callq	_cfg80211_remain_on_channel_expired
	cmpq	$0, (%r15)
	jne	LBB0_7
## %bb.6:
	movq	8(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
LBB0_7:
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%r12, %rcx
	callq	_wil_info
	movq	%rbx, %rdi
	callq	_mutex_unlock
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_wil_err
LBB0_4:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cookie mismatch: 0x%016llx vs. 0x%016llx\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
L_.str.1:                               ## @.str.1
	.asciz	"listen not started\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wil_p2p_cancel_listen          ; -- Begin function wil_p2p_cancel_listen
	.p2align	2
_wil_p2p_cancel_listen:                 ; @wil_p2p_cancel_listen
	.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	x22, x1
	mov	x20, x0
	bl	_vif_to_wil
	mov	x19, x0
	add	x21, x0, #20
	mov	x0, x21
	bl	_mutex_lock
	ldr	x2, [x20, #8]
	cmp	x2, x22
	b.ne	LBB0_5
; %bb.1:
	mov	x0, x20
	bl	_wil_p2p_stop_discovery
	mov	x22, x0
	mov	x0, x21
	bl	_mutex_unlock
	cbz	w22, LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	mov	x1, x20
	bl	_vif_to_radio_wdev
	ldr	x1, [x20, #8]
	add	x2, x20, #16
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	bl	_cfg80211_remain_on_channel_expired
	ldr	x8, [x20]
	cbnz	x8, LBB0_4
; %bb.3:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	str	w8, [x19, #16]
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_8
LBB0_5:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x22
	bl	_wil_info
	mov	x0, x21
	bl	_mutex_unlock
	b	LBB0_7
LBB0_6:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_wil_err
LBB0_7:
Lloh7:
	adrp	x8, _ENOENT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cookie mismatch: 0x%016llx vs. 0x%016llx\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
l_.str.1:                               ; @.str.1
	.asciz	"listen not started\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
.subsections_via_symbols
