	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_p2p_discover_listen
_brcmf_p2p_discover_listen:             ## @brcmf_p2p_discover_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	8(%rdi), %rax
	movq	8(%rax), %r13
	movq	16(%rdi), %rax
	movq	_P2PAPI_BSSCFG_DEVICE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %r14
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	_BRCMF_P2P_STATUS_DISCOVER_LISTEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%rbx), %r12
	movq	%r12, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_bphy_err
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_bphy_err
	movq	_EPERM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_4:
	movq	_BRCMF_P2P_STATUS_DISCOVER_LISTEN@GOTPCREL(%rip), %r13
	movl	%r15d, -48(%rbp)
	movq	_BRCMU_CHAN_BW_20@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	8(%rbx), %rax
	leaq	-56(%rbp), %rdi
	callq	*(%rax)
	movl	(%r14), %edi
	movq	_WL_P2P_DISC_ST_LISTEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-56(%rbp), %edx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_brcmf_p2p_set_discover_state
	testl	%eax, %eax
	je	LBB0_5
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	(%r13), %edi
	movq	%r12, %rsi
	callq	_set_bit
	incl	(%rbx)
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_P2PAPI_BSSCFG_DEVICE,8,3       ## @P2PAPI_BSSCFG_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Discovery is not set, so we have nothing to do\n"

	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_BRCMF_P2P_STATUS_DISCOVER_LISTEN,4,2 ## @BRCMF_P2P_STATUS_DISCOVER_LISTEN
L_.str.1:                               ## @.str.1
	.asciz	"Previous LISTEN is not completed yet\n"

	.comm	_BRCMU_CHAN_BW_20,4,2           ## @BRCMU_CHAN_BW_20
	.comm	_WL_P2P_DISC_ST_LISTEN,4,2      ## @WL_P2P_DISC_ST_LISTEN
	.no_dead_strip	_brcmf_p2p_discover_listen
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_p2p_discover_listen
_brcmf_p2p_discover_listen:             ; @brcmf_p2p_discover_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
	ldp	x8, x9, [x0, #8]
	ldr	x23, [x8, #8]
Lloh0:
	adrp	x8, _P2PAPI_BSSCFG_DEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _P2PAPI_BSSCFG_DEVICE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x25, [x9, x8, lsl #3]
	cbz	x25, LBB0_3
; %bb.1:
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
Lloh3:
	adrp	x24, _BRCMF_P2P_STATUS_DISCOVER_LISTEN@GOTPAGE
Lloh4:
	ldr	x24, [x24, _BRCMF_P2P_STATUS_DISCOVER_LISTEN@GOTPAGEOFF]
	ldr	w0, [x24]
	add	x21, x19, #4
	mov	x1, x21
	bl	_test_bit
	cbz	x0, LBB0_4
; %bb.2:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_bphy_err
	mov	w0, #0
	b	LBB0_6
LBB0_3:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_bphy_err
Lloh9:
	adrp	x8, _EPERM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_4:
Lloh12:
	adrp	x8, _BRCMU_CHAN_BW_20@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BRCMU_CHAN_BW_20@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	stp	w8, w22, [sp, #4]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, sp
	blr	x8
	ldr	w0, [x25]
Lloh15:
	adrp	x8, _WL_P2P_DISC_ST_LISTEN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WL_P2P_DISC_ST_LISTEN@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldr	w2, [sp]
	mov	x3, x20
	bl	_brcmf_p2p_set_discover_state
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	w0, [x24]
	mov	x1, x21
	bl	_set_bit
	mov	w0, #0
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_P2PAPI_BSSCFG_DEVICE,8,3       ; @P2PAPI_BSSCFG_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Discovery is not set, so we have nothing to do\n"

	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_BRCMF_P2P_STATUS_DISCOVER_LISTEN,4,2 ; @BRCMF_P2P_STATUS_DISCOVER_LISTEN
l_.str.1:                               ; @.str.1
	.asciz	"Previous LISTEN is not completed yet\n"

	.comm	_BRCMU_CHAN_BW_20,4,2           ; @BRCMU_CHAN_BW_20
	.comm	_WL_P2P_DISC_ST_LISTEN,4,2      ; @WL_P2P_DISC_ST_LISTEN
	.no_dead_strip	_brcmf_p2p_discover_listen
.subsections_via_symbols
