	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p2p_listen_in_find
_p2p_listen_in_find:                    ## @p2p_listen_in_find
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	40(%rdi), %edi
	callq	_p2p_state_txt
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_p2p_dbg
	cmpl	$0, (%rbx)
	je	LBB0_3
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_p2p_dbg                        ## TAILCALL
LBB0_3:
	movq	24(%rbx), %rax
	movl	20(%rax), %esi
	movl	24(%rax), %edi
	callq	_p2p_channel_to_freq
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	%eax, %r14d
	leaq	-36(%rbp), %rdi
	movl	$4, %esi
	callq	_os_get_random
	testq	%rax, %rax
	js	LBB0_7
## %bb.6:
	movl	-36(%rbp), %eax
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_7:
	movl	$0, -36(%rbp)
	xorl	%eax, %eax
LBB0_8:
	movl	12(%rbx), %ecx
	movl	4(%rbx), %esi
	movl	8(%rbx), %edi
	subl	%edi, %esi
	incl	%esi
	xorl	%edx, %edx
	divl	%esi
	addl	%edi, %edx
	imull	$100, %edx, %eax
	cmpl	%ecx, %eax
	cmovbl	%eax, %ecx
	cmpl	$100, %ecx
	movl	$100, %r12d
	cmovael	%ecx, %r12d
	testl	%r15d, %r15d
	cmovnel	%ecx, %r12d
	movq	24(%rbx), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	movl	%r12d, %ecx
	shll	$10, %ecx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	shrq	$38, %rcx
	cmpl	%eax, %ecx
	jbe	LBB0_11
## %bb.10:
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	leal	1023(%rax), %r12d
	testl	%eax, %eax
	cmovnsl	%eax, %r12d
	sarl	$10, %r12d
LBB0_11:
	testl	%r12d, %r12d
	je	LBB0_12
## %bb.13:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_p2p_build_probe_resp_ies
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:
	movq	%rax, %r15
	movl	%r14d, (%rbx)
	movq	$0, 32(%rbx)
	shll	$10, %r12d
	movl	%r12d, 16(%rbx)
	movq	24(%rbx), %rax
	movl	16(%rax), %edi
	imulq	$274877907, %r12, %rdx          ## imm = 0x10624DD3
	shrq	$38, %rdx
	movl	%r14d, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	movq	%r15, %rcx
	callq	*8(%rax)
	testq	%rax, %rax
	jns	LBB0_16
## %bb.15:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_p2p_dbg
	movl	$0, (%rbx)
LBB0_16:
	movq	%r15, %rdi
	callq	_wpabuf_free
	jmp	LBB0_17
LBB0_12:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_p2p_dbg
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_p2p_set_timeout
LBB0_17:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Starting short listen state (state=%s)"

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

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

L_.str.3:                               ## @.str.3
	.asciz	"Skip listen state since duration was 0 TU"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to start listen mode"

	.no_dead_strip	_p2p_listen_in_find
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p2p_listen_in_find
_p2p_listen_in_find:                    ; @p2p_listen_in_find
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	mov	x19, x0
	ldr	w0, [x0, #40]
	bl	_p2p_state_txt
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_p2p_dbg
	ldr	w8, [x19]
	cbz	w8, LBB0_3
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_2:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_p2p_dbg
LBB0_3:
	ldr	x8, [x19, #24]
	ldp	w1, w0, [x8, #20]
	bl	_p2p_channel_to_freq
	tbnz	w0, #31, LBB0_6
; %bb.4:
	mov	x20, x0
	add	x0, sp, #12
	mov	w1, #4
	bl	_os_get_random
	tbnz	x0, #63, LBB0_7
; %bb.5:
	ldr	w8, [sp, #12]
	b	LBB0_8
LBB0_6:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_7:
	mov	w8, #0
	str	wzr, [sp, #12]
LBB0_8:
	ldp	w11, w9, [x19, #8]
	ldr	w10, [x19, #4]
	sub	w10, w10, w11
	add	w10, w10, #1
	udiv	w12, w8, w10
	msub	w8, w12, w10, w8
	add	w8, w8, w11
	mov	w10, #100
	mul	w8, w8, w10
	cmp	w8, w9
	csel	w8, w8, w9, lo
	cmp	w8, #100
	ccmp	w21, #0, #0, lo
	csel	w22, w10, w8, eq
	ldr	x8, [x19, #24]
	ldr	w8, [x8]
	cbz	w8, LBB0_10
; %bb.9:
	lsl	w9, w22, #10
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	umull	x9, w9, w10
	lsr	x9, x9, #38
	mov	w10, #1000
	mul	w10, w8, w10
	add	w11, w10, #1023
	cmp	w10, #0
	csel	w10, w11, w10, lt
	asr	w10, w10, #10
	cmp	w9, w8
	csel	w22, w22, w10, ls
LBB0_10:
	cbz	w22, LBB0_15
; %bb.11:
	mov	x0, x19
	mov	x1, #0
	mov	w2, #0
	bl	_p2p_build_probe_resp_ies
	cbz	x0, LBB0_16
; %bb.12:
	mov	x21, x0
	str	w20, [x19]
	str	xzr, [x19, #32]
	lsl	w8, w22, #10
	str	w8, [x19, #16]
	ldr	x9, [x19, #24]
	ldr	x10, [x9, #8]
	ldr	w0, [x9, #16]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	umull	x8, w8, w9
	lsr	x2, x8, #38
	mov	x1, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	x3, x21
	blr	x10
	tbz	x0, #63, LBB0_14
; %bb.13:
Lloh6:
	adrp	x1, l_.str.4@PAGE
Lloh7:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_p2p_dbg
	str	wzr, [x19]
LBB0_14:
	mov	x0, x21
	bl	_wpabuf_free
	b	LBB0_16
LBB0_15:
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_p2p_dbg
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_p2p_set_timeout
LBB0_16:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Starting short listen state (state=%s)"

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

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

l_.str.3:                               ; @.str.3
	.asciz	"Skip listen state since duration was 0 TU"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to start listen mode"

	.no_dead_strip	_p2p_listen_in_find
.subsections_via_symbols
