	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p2p_listen                     ## -- Begin function p2p_listen
	.p2align	4, 0x90
_p2p_listen:                            ## @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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	callq	_p2p_dbg
	cmpl	$0, (%rbx)
	je	LBB0_3
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movq	%rbx, %rdi
	callq	_p2p_dbg
	movl	$-1, %r15d
LBB0_14:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	24(%rbx), %rax
	movl	12(%rax), %esi
	movl	16(%rax), %edi
	callq	_p2p_channel_to_freq
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	%eax, %r12d
	movl	%r14d, %eax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	shrq	$38, %rax
	movl	%eax, 4(%rbx)
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	movl	%r14d, %ecx
	subl	%eax, %ecx
	imull	$1000, %ecx, %eax               ## imm = 0x3E8
	movl	%eax, 8(%rbx)
	cmpq	$0, 32(%rbx)
	je	LBB0_9
## %bb.6:
	movq	16(%rbx), %rax
	movq	_P2P_AFTER_SCAN_CONNECT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_p2p_dbg
	jmp	LBB0_13
LBB0_4:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_9:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_p2p_build_probe_resp_ies
	movl	$-1, %r15d
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:
	movq	%rax, %r13
	movl	%r12d, (%rbx)
	movq	24(%rbx), %rax
	movl	8(%rax), %edi
	movl	%r12d, %esi
	movl	%r14d, %edx
	movq	%r13, %rcx
	callq	*(%rax)
	testq	%rax, %rax
	js	LBB0_11
## %bb.12:
	movq	%r13, %rdi
	callq	_wpabuf_free
	movq	_P2P_LISTEN_ONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_p2p_set_state
	jmp	LBB0_13
LBB0_8:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	callq	_p2p_dbg
	movq	_P2P_AFTER_SCAN_LISTEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
LBB0_13:
	xorl	%r15d, %r15d
	jmp	LBB0_14
LBB0_11:
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	callq	_p2p_dbg
	movl	$0, (%rbx)
	movq	%r13, %rdi
	callq	_wpabuf_free
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Going to listen(only) state"

L_.str.1:                               ## @.str.1
	.asciz	"p2p_listen command pending already"

L_.str.2:                               ## @.str.2
	.asciz	"Unknown regulatory class/channel"

	.comm	_P2P_AFTER_SCAN_CONNECT,8,3     ## @P2P_AFTER_SCAN_CONNECT
L_.str.3:                               ## @.str.3
	.asciz	"p2p_scan running - connect is already pending - skip listen"

L_.str.4:                               ## @.str.4
	.asciz	"p2p_scan running - delay start of listen state"

	.comm	_P2P_AFTER_SCAN_LISTEN,8,3      ## @P2P_AFTER_SCAN_LISTEN
L_.str.5:                               ## @.str.5
	.asciz	"Failed to start listen mode"

	.comm	_P2P_LISTEN_ONLY,4,2            ## @P2P_LISTEN_ONLY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p2p_listen                     ; -- Begin function p2p_listen
	.p2align	2
_p2p_listen:                            ; @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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_p2p_dbg
	ldr	w8, [x19]
	cbz	w8, LBB0_5
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_2:
	mov	x0, x19
	bl	_p2p_dbg
LBB0_3:
	mov	w0, #-1
LBB0_4:
	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_5:
	ldr	x8, [x19, #24]
	ldp	w1, w0, [x8, #12]
	bl	_p2p_channel_to_freq
	tbnz	w0, #31, LBB0_9
; %bb.6:
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	umull	x8, w20, w8
	lsr	x8, x8, #38
	mov	w9, #1000
	msub	w10, w8, w9, w20
	mul	w9, w10, w9
	stp	w8, w9, [x19, #4]
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_10
; %bb.7:
	ldr	x8, [x19, #16]
Lloh4:
	adrp	x9, _P2P_AFTER_SCAN_CONNECT@GOTPAGE
Lloh5:
	ldr	x9, [x9, _P2P_AFTER_SCAN_CONNECT@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.8:
Lloh7:
	adrp	x1, l_.str.3@PAGE
Lloh8:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_p2p_dbg
	b	LBB0_13
LBB0_9:
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_10:
	mov	x21, x0
	mov	x0, x19
	mov	x1, #0
	mov	w2, #0
	bl	_p2p_build_probe_resp_ies
	cbz	x0, LBB0_3
; %bb.11:
	mov	x22, x0
	str	w21, [x19]
	ldr	x8, [x19, #24]
	ldr	x9, [x8]
	ldr	w0, [x8, #8]
	mov	x1, x21
	mov	x2, x20
	mov	x3, x22
	blr	x9
	tbnz	x0, #63, LBB0_15
; %bb.12:
	mov	x0, x22
	bl	_wpabuf_free
Lloh11:
	adrp	x8, _P2P_LISTEN_ONLY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _P2P_LISTEN_ONLY@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_p2p_set_state
LBB0_13:
	mov	w0, #0
	b	LBB0_4
LBB0_14:
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_p2p_dbg
	mov	w0, #0
Lloh16:
	adrp	x8, _P2P_AFTER_SCAN_LISTEN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _P2P_AFTER_SCAN_LISTEN@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	str	x8, [x19, #16]
	b	LBB0_4
LBB0_15:
Lloh19:
	adrp	x1, l_.str.5@PAGE
Lloh20:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_p2p_dbg
	str	wzr, [x19]
	mov	x0, x22
	bl	_wpabuf_free
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Going to listen(only) state"

l_.str.1:                               ; @.str.1
	.asciz	"p2p_listen command pending already"

l_.str.2:                               ; @.str.2
	.asciz	"Unknown regulatory class/channel"

	.comm	_P2P_AFTER_SCAN_CONNECT,8,3     ; @P2P_AFTER_SCAN_CONNECT
l_.str.3:                               ; @.str.3
	.asciz	"p2p_scan running - connect is already pending - skip listen"

l_.str.4:                               ; @.str.4
	.asciz	"p2p_scan running - delay start of listen state"

	.comm	_P2P_AFTER_SCAN_LISTEN,8,3      ; @P2P_AFTER_SCAN_LISTEN
l_.str.5:                               ; @.str.5
	.asciz	"Failed to start listen mode"

	.comm	_P2P_LISTEN_ONLY,4,2            ; @P2P_LISTEN_ONLY
.subsections_via_symbols
