	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wpas_p2p_listen                ## -- Begin function wpas_p2p_listen
	.p2align	4, 0x90
_wpas_p2p_listen:                       ## @wpas_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	movl	$-1, %ebx
	cmpq	$0, 8(%rax)
	je	LBB0_1
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.2:
	movq	%rdi, %r14
	cmpq	$0, 16(%rdi)
	je	LBB0_4
## %bb.3:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	jmp	LBB0_9
LBB0_4:
	movl	%esi, %r12d
	movq	%r14, %rdi
	callq	_wpa_supplicant_cancel_sched_scan
	movq	%r14, %rdi
	callq	_wpas_p2p_clear_pending_action_tx
	testl	%r12d, %r12d
	movl	$3600, %r15d                    ## imm = 0xE10
	cmovnel	%r12d, %r15d
	movq	_wpas_p2p_long_listen_timeout@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_eloop_cancel_timeout
	movl	$0, (%r14)
	movq	8(%r14), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_p2p_stop_find
LBB0_6:
	imull	$1000, %r15d, %r12d             ## imm = 0x3E8
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_wpas_p2p_listen_start
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	xorl	%ebx, %ebx
	cmpl	4(%r14), %r12d
	jbe	LBB0_9
## %bb.8:
	movl	%r12d, (%r14)
	movl	(%r13), %edx
	xorl	%ebx, %ebx
	movl	%r15d, %edi
	xorl	%esi, %esi
	movq	%r14, %rcx
	xorl	%r8d, %r8d
	callq	_eloop_register_timeout
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"P2P: Cannot start P2P listen, it is offloaded"

	.comm	_wpas_p2p_long_listen_timeout,4,2 ## @wpas_p2p_long_listen_timeout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wpas_p2p_listen                ; -- Begin function wpas_p2p_listen
	.p2align	2
_wpas_p2p_listen:                       ; @wpas_p2p_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
	ldr	x8, [x0, #8]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_3
LBB0_1:
	mov	w0, #-1
LBB0_2:
	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
LBB0_3:
	ldr	x8, [x8]
	cbz	x8, LBB0_1
; %bb.4:
	mov	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_6
; %bb.5:
Lloh0:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	b	LBB0_1
LBB0_6:
	mov	x20, x1
	mov	x0, x19
	bl	_wpa_supplicant_cancel_sched_scan
	mov	x0, x19
	bl	_wpas_p2p_clear_pending_action_tx
	mov	w8, #3600
	cmp	w20, #0
	csel	w20, w8, w20, eq
Lloh5:
	adrp	x22, _wpas_p2p_long_listen_timeout@GOTPAGE
Lloh6:
	ldr	x22, [x22, _wpas_p2p_long_listen_timeout@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x19
	mov	x2, #0
	bl	_eloop_cancel_timeout
	str	wzr, [x19]
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_p2p_stop_find
LBB0_8:
	mov	w8, #1000
	mul	w21, w20, w8
	mov	x0, x19
	mov	x1, x21
	bl	_wpas_p2p_listen_start
	cbnz	w0, LBB0_2
; %bb.9:
	ldr	w8, [x19, #4]
	cmp	w21, w8
	b.ls	LBB0_11
; %bb.10:
	str	w21, [x19]
	ldr	w2, [x22]
	mov	x0, x20
	mov	w1, #0
	mov	x3, x19
	mov	x4, #0
	bl	_eloop_register_timeout
LBB0_11:
	mov	w0, #0
	b	LBB0_2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"P2P: Cannot start P2P listen, it is offloaded"

	.comm	_wpas_p2p_long_listen_timeout,4,2 ; @wpas_p2p_long_listen_timeout
.subsections_via_symbols
