	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcmf_p2p_scan_prep            ## -- Begin function brcmf_p2p_scan_prep
	.p2align	4, 0x90
_brcmf_p2p_scan_prep:                   ## @brcmf_p2p_scan_prep
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	callq	_wiphy_to_cfg
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_brcmf_p2p_scan_is_p2p_request
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.1:
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	callq	_brcmf_p2p_find_listen_channel
	testl	%eax, %eax
	js	LBB0_4
## %bb.2:
	leaq	8(%r14), %rbx
	movl	%eax, 20(%r14)
	movq	_BRCMF_P2P_STATUS_GO_NEG_PHASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	addq	$16, %rsi
	callq	_clear_bit
	movq	_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_brcmf_dbg
	movq	%rbx, %rdi
	callq	_brcmf_p2p_enable_discovery
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_brcmf_p2p_run_escan@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BRCMF_P2P_STATUS_GO_NEG_PHASE,4,2 ## @BRCMF_P2P_STATUS_GO_NEG_PHASE
	.comm	_INFO,4,2                       ## @INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"P2P: GO_NEG_PHASE status cleared\n"

	.comm	_P2PAPI_BSSCFG_DEVICE,8,3       ## @P2PAPI_BSSCFG_DEVICE
	.comm	_brcmf_p2p_run_escan,4,2        ## @brcmf_p2p_run_escan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcmf_p2p_scan_prep            ; -- Begin function brcmf_p2p_scan_prep
	.p2align	2
_brcmf_p2p_scan_prep:                   ; @brcmf_p2p_scan_prep
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	bl	_wiphy_to_cfg
	mov	x19, x0
	mov	x0, x20
	bl	_brcmf_p2p_scan_is_p2p_request
	cbz	x0, LBB0_4
; %bb.1:
	ldp	w1, w0, [x20]
	bl	_brcmf_p2p_find_listen_channel
	tbnz	w0, #31, LBB0_4
; %bb.2:
	add	x20, x19, #8
	str	w0, [x19, #20]
Lloh0:
	adrp	x8, _BRCMF_P2P_STATUS_GO_NEG_PHASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BRCMF_P2P_STATUS_GO_NEG_PHASE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #16
	bl	_clear_bit
Lloh3:
	adrp	x8, _INFO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INFO@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcmf_dbg
	mov	x0, x20
	bl	_brcmf_p2p_enable_discovery
	cbnz	w0, LBB0_4
; %bb.3:
Lloh8:
	adrp	x8, _brcmf_p2p_run_escan@GOTPAGE
Lloh9:
	ldr	x8, [x8, _brcmf_p2p_run_escan@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BRCMF_P2P_STATUS_GO_NEG_PHASE,4,2 ; @BRCMF_P2P_STATUS_GO_NEG_PHASE
	.comm	_INFO,4,2                       ; @INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"P2P: GO_NEG_PHASE status cleared\n"

	.comm	_P2PAPI_BSSCFG_DEVICE,8,3       ; @P2PAPI_BSSCFG_DEVICE
	.comm	_brcmf_p2p_run_escan,4,2        ; @brcmf_p2p_run_escan
.subsections_via_symbols
