	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wil_p2p_listen                 ## -- Begin function wil_p2p_listen
	.p2align	4, 0x90
_wil_p2p_listen:                        ## @wil_p2p_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r15
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r12
	callq	_wdev_to_vif
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_wil_dbg_misc
	movq	%r12, %rdi
	callq	_mutex_lock
	cmpl	$0, 16(%r13)
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_wil_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_11
LBB0_4:
	movq	%r13, %rdi
	addq	$40, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	$4, %edx
	callq	_memcpy
	movq	32(%r13), %rax
	incq	%rax
	movq	%rax, 32(%r13)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movl	%r14d, 20(%r13)
	leaq	16(%r12), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	cmpq	$0, 8(%r13)
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %r14
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_wil_dbg_misc
	movq	%rbx, 24(%r13)
	movl	$1, 16(%r13)
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_10
LBB0_6:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	%r13, %rdi
	callq	_wil_p2p_start_listen
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	movl	$1, 16(%r13)
	cmpq	$0, (%r13)
	jne	LBB0_9
## %bb.8:
	movq	%rbx, 8(%r12)
LBB0_9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%r14d, %ecx
	callq	_cfg80211_ready_on_channel
	xorl	%r15d, %r15d
LBB0_10:
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_11:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"p2p_listen: duration %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"discovery already ongoing\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.2:                               ## @.str.2
	.asciz	"Delaying p2p listen until scan done\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_listen                 ; -- Begin function wil_p2p_listen
	.p2align	2
_wil_p2p_listen:                        ; @wil_p2p_listen
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x4
	mov	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	bl	_wdev_to_vif
	cbz	x21, LBB0_3
; %bb.1:
	mov	x24, x0
	str	x22, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_wil_dbg_misc
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x24, #16]
	cbz	w8, LBB0_4
; %bb.2:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_wil_err
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_8
LBB0_3:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_9
LBB0_4:
	add	x0, x24, #40
	mov	x1, x21
	mov	w2, #4
	bl	_memcpy
	ldr	x8, [x24, #32]
	add	x8, x8, #1
	str	x8, [x24, #32]
	str	x8, [x23]
	str	w22, [x24, #20]
	add	x25, x19, #16
	mov	x0, x25
	bl	_mutex_lock
	ldr	x8, [x24, #8]
	cbz	x8, LBB0_7
; %bb.5:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_wil_dbg_misc
	str	x20, [x24, #24]
	mov	w8, #1
	str	w8, [x24, #16]
	mov	x0, x25
	bl	_mutex_unlock
LBB0_6:
	mov	w25, #0
	b	LBB0_8
LBB0_7:
	mov	x0, x25
	bl	_mutex_unlock
	mov	x0, x24
	bl	_wil_p2p_start_listen
	mov	x25, x0
	cbz	w0, LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_9:
	mov	x0, x25
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_10:
	mov	w8, #1
	str	w8, [x24, #16]
	ldr	x8, [x24]
	cbnz	x8, LBB0_12
; %bb.11:
	str	x20, [x19, #8]
LBB0_12:
	ldr	x1, [x23]
Lloh12:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh14:
	ldr	w4, [x8]
	mov	x0, x20
	mov	x2, x21
	mov	x3, x22
	bl	_cfg80211_ready_on_channel
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"p2p_listen: duration %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"discovery already ongoing\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.2:                               ; @.str.2
	.asciz	"Delaying p2p listen until scan done\n"

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