	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_p2p_enable_discovery
_brcmf_p2p_enable_discovery:            ## @brcmf_p2p_enable_discovery
	.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	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	(%rax), %r14
	movq	_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_brcmf_dbg
	movq	8(%rbx), %rax
	movq	_P2PAPI_BSSCFG_DEVICE@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_1
## %bb.2:
	movq	_BRCMF_P2P_STATUS_ENABLED@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_brcmf_dbg
	xorl	%r15d, %r15d
	jmp	LBB0_12
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_bphy_err
	movq	_EPERM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_12
LBB0_4:
	movq	8(%rbx), %rax
	movq	_P2PAPI_BSSCFG_PRIMARY@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edx
	callq	_brcmf_fil_iovar_int_set
	testl	%eax, %eax
	js	LBB0_5
## %bb.7:
	movq	8(%rbx), %rax
	movq	(%r13), %rcx
	movq	(%rax,%rcx,8), %r13
	movl	(%r13), %edi
	movq	_WL_P2P_DISC_ST_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_brcmf_p2p_set_discover_state
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movl	(%r13), %edi
	movq	_AES_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.6(%rip), %rsi
	callq	_brcmf_fil_bsscfg_int_set
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_set_bit
	jmp	LBB0_12
LBB0_5:
	movl	%eax, %r15d
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_6
LBB0_8:
	movl	%eax, %r15d
	leaq	L_.str.5(%rip), %rsi
LBB0_6:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_bphy_err
	jmp	LBB0_12
LBB0_10:
	leaq	L_.str.7(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_bphy_err
LBB0_12:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRACE,4,2                      ## @TRACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enter\n"

	.comm	_P2PAPI_BSSCFG_DEVICE,8,3       ## @P2PAPI_BSSCFG_DEVICE
L_.str.1:                               ## @.str.1
	.asciz	"P2P config device not available\n"

	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_BRCMF_P2P_STATUS_ENABLED,4,2   ## @BRCMF_P2P_STATUS_ENABLED
	.comm	_INFO,4,2                       ## @INFO
L_.str.2:                               ## @.str.2
	.asciz	"P2P config device already configured\n"

	.comm	_P2PAPI_BSSCFG_PRIMARY,8,3      ## @P2PAPI_BSSCFG_PRIMARY
L_.str.3:                               ## @.str.3
	.asciz	"p2p_disc"

L_.str.4:                               ## @.str.4
	.asciz	"set p2p_disc error\n"

	.comm	_WL_P2P_DISC_ST_SCAN,4,2        ## @WL_P2P_DISC_ST_SCAN
L_.str.5:                               ## @.str.5
	.asciz	"unable to set WL_P2P_DISC_ST_SCAN\n"

L_.str.6:                               ## @.str.6
	.asciz	"wsec"

	.comm	_AES_ENABLED,4,2                ## @AES_ENABLED
L_.str.7:                               ## @.str.7
	.asciz	"wsec error %d\n"

	.no_dead_strip	_brcmf_p2p_enable_discovery
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_p2p_enable_discovery
_brcmf_p2p_enable_discovery:            ; @brcmf_p2p_enable_discovery
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x0
	ldr	x8, [x0, #16]
	ldr	x19, [x8]
Lloh0:
	adrp	x8, _TRACE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TRACE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcmf_dbg
	ldr	x8, [x20, #8]
Lloh5:
	adrp	x23, _P2PAPI_BSSCFG_DEVICE@GOTPAGE
Lloh6:
	ldr	x23, [x23, _P2PAPI_BSSCFG_DEVICE@GOTPAGEOFF]
	ldr	x9, [x23]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_3
; %bb.1:
Lloh7:
	adrp	x22, _BRCMF_P2P_STATUS_ENABLED@GOTPAGE
Lloh8:
	ldr	x22, [x22, _BRCMF_P2P_STATUS_ENABLED@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_4
; %bb.2:
Lloh9:
	adrp	x8, _INFO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _INFO@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_brcmf_dbg
	mov	w21, #0
	b	LBB0_12
LBB0_3:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_bphy_err
Lloh16:
	adrp	x8, _EPERM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
LBB0_4:
	ldr	x8, [x20, #8]
Lloh19:
	adrp	x9, _P2PAPI_BSSCFG_PRIMARY@GOTPAGE
Lloh20:
	ldr	x9, [x9, _P2PAPI_BSSCFG_PRIMARY@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w0, [x8]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w2, #1
	bl	_brcmf_fil_iovar_int_set
	tbnz	w0, #31, LBB0_8
; %bb.5:
	ldr	x8, [x20, #8]
	ldr	x9, [x23]
	ldr	x23, [x8, x9, lsl #3]
	ldr	w0, [x23]
Lloh24:
	adrp	x8, _WL_P2P_DISC_ST_SCAN@GOTPAGE
Lloh25:
	ldr	x8, [x8, _WL_P2P_DISC_ST_SCAN@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	w2, #0
	mov	w3, #0
	bl	_brcmf_p2p_set_discover_state
	tbnz	w0, #31, LBB0_9
; %bb.6:
	ldr	w0, [x23]
Lloh27:
	adrp	x8, _AES_ENABLED@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AES_ENABLED@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
Lloh30:
	adrp	x1, l_.str.6@PAGE
Lloh31:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_brcmf_fil_bsscfg_int_set
	mov	x21, x0
	tbnz	w0, #31, LBB0_10
; %bb.7:
	ldr	w0, [x22]
	mov	x1, x20
	bl	_set_bit
	b	LBB0_12
LBB0_8:
	mov	x21, x0
Lloh32:
	adrp	x1, l_.str.4@PAGE
Lloh33:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_11
LBB0_9:
	mov	x21, x0
Lloh34:
	adrp	x1, l_.str.5@PAGE
Lloh35:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_11
LBB0_10:
	str	x21, [sp]
Lloh36:
	adrp	x1, l_.str.7@PAGE
Lloh37:
	add	x1, x1, l_.str.7@PAGEOFF
LBB0_11:
	mov	x0, x19
	bl	_bphy_err
LBB0_12:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_TRACE,4,2                      ; @TRACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enter\n"

	.comm	_P2PAPI_BSSCFG_DEVICE,8,3       ; @P2PAPI_BSSCFG_DEVICE
l_.str.1:                               ; @.str.1
	.asciz	"P2P config device not available\n"

	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_BRCMF_P2P_STATUS_ENABLED,4,2   ; @BRCMF_P2P_STATUS_ENABLED
	.comm	_INFO,4,2                       ; @INFO
l_.str.2:                               ; @.str.2
	.asciz	"P2P config device already configured\n"

	.comm	_P2PAPI_BSSCFG_PRIMARY,8,3      ; @P2PAPI_BSSCFG_PRIMARY
l_.str.3:                               ; @.str.3
	.asciz	"p2p_disc"

l_.str.4:                               ; @.str.4
	.asciz	"set p2p_disc error\n"

	.comm	_WL_P2P_DISC_ST_SCAN,4,2        ; @WL_P2P_DISC_ST_SCAN
l_.str.5:                               ; @.str.5
	.asciz	"unable to set WL_P2P_DISC_ST_SCAN\n"

l_.str.6:                               ; @.str.6
	.asciz	"wsec"

	.comm	_AES_ENABLED,4,2                ; @AES_ENABLED
l_.str.7:                               ; @.str.7
	.asciz	"wsec error %d\n"

	.no_dead_strip	_brcmf_p2p_enable_discovery
.subsections_via_symbols
