	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_p2p_create_p2pdev
_brcmf_p2p_create_p2pdev:               ## @brcmf_p2p_create_p2pdev
	.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	24(%rdi), %rax
	movq	_P2PAPI_BSSCFG_DEVICE@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_3
## %bb.1:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_3:
	movq	%rdx, %rbx
	movq	%rdi, %r13
	movq	32(%rdi), %rdi
	movq	(%rdi), %r12
	movq	_NL80211_IFTYPE_P2P_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_brcmf_alloc_vif
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_bphy_err
	jmp	LBB0_15
LBB0_5:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	24(%r13), %rax
	movq	_P2PAPI_BSSCFG_PRIMARY@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	8(%rax), %r12
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.6:
	movq	8(%r12), %rsi
	movq	%rbx, %rdi
	callq	_ether_addr_equal
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_bphy_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_8:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_brcmf_p2p_generate_bss_mac
	movl	16(%r13), %esi
	movq	%r12, %rdi
	callq	_brcmf_p2p_set_firmware
	movq	32(%r13), %rdi
	movq	%r14, %rsi
	callq	_brcmf_cfg80211_arm_vif_event
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_brcmf_fweh_p2pdev_setup
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_brcmf_fil_iovar_int_set
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movq	32(%r13), %rdi
	movq	_BRCMF_E_IF_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BRCMF_VIF_EVENT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_brcmf_cfg80211_wait_vif_event
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	32(%r13), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_brcmf_cfg80211_arm_vif_event
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_brcmf_fweh_p2pdev_setup
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_11
## %bb.12:
	movq	8(%r14), %rdx
	movq	24(%r13), %rax
	movq	(%r15), %rcx
	movq	%rdx, %r15
	movq	%r14, (%rax,%rcx,8)
	movq	8(%rdx), %rdi
	movl	16(%r13), %esi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	movl	16(%r13), %esi
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_memcpy
	leaq	L_.str.5(%rip), %rsi
	leaq	-64(%rbp), %rdx
	movq	%r12, %rdi
	callq	_brcmf_fil_iovar_int_get
	testl	%eax, %eax
	js	LBB0_13
## %bb.16:
	movq	(%r15), %rax
	xorl	%edi, %edi
	cmpq	-64(%rbp), %rax
	setne	%dil
	callq	_WARN_ON
	leaq	12(%r13), %rdi
	callq	_init_completion
	leaq	4(%r13), %rbx
	leaq	8(%r13), %rdi
	movq	_brcmf_p2p_afx_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	%rbx, %rdi
	callq	_init_completion
	movq	%r13, %rdi
	callq	_init_completion
	jmp	LBB0_15
LBB0_9:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_bphy_err
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_brcmf_fweh_p2pdev_setup
	movq	32(%r13), %rdi
	xorl	%esi, %esi
	callq	_brcmf_cfg80211_arm_vif_event
	jmp	LBB0_14
LBB0_11:
	leaq	L_.str.4(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_bphy_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_13:
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_bphy_err
LBB0_14:
	movq	%r14, %rdi
	callq	_brcmf_free_vif
	movl	%ebx, %edi
	callq	_ERR_PTR
	movq	%rax, %r14
LBB0_15:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_P2PAPI_BSSCFG_DEVICE,8,3       ## @P2PAPI_BSSCFG_DEVICE
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_NL80211_IFTYPE_P2P_DEVICE,4,2  ## @NL80211_IFTYPE_P2P_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not create discovery vif\n"

	.comm	_P2PAPI_BSSCFG_PRIMARY,8,3      ## @P2PAPI_BSSCFG_PRIMARY
L_.str.1:                               ## @.str.1
	.asciz	"discovery vif must be different from primary interface\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"p2p_disc"

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

	.comm	_BRCMF_E_IF_ADD,4,2             ## @BRCMF_E_IF_ADD
	.comm	_BRCMF_VIF_EVENT_TIMEOUT,4,2    ## @BRCMF_VIF_EVENT_TIMEOUT
L_.str.4:                               ## @.str.4
	.asciz	"timeout occurred\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
L_.str.5:                               ## @.str.5
	.asciz	"p2p_dev"

L_.str.6:                               ## @.str.6
	.asciz	"retrieving discover bsscfg index failed\n"

	.comm	_brcmf_p2p_afx_handler,4,2      ## @brcmf_p2p_afx_handler
	.no_dead_strip	_brcmf_p2p_create_p2pdev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_p2p_create_p2pdev
_brcmf_p2p_create_p2pdev:               ; @brcmf_p2p_create_p2pdev
	.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
	ldr	x8, [x0, #24]
Lloh0:
	adrp	x24, _P2PAPI_BSSCFG_DEVICE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _P2PAPI_BSSCFG_DEVICE@GOTPAGEOFF]
	ldr	x9, [x24]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	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
	b	_ERR_PTR
LBB0_3:
	mov	x23, x2
	mov	x20, x0
	ldr	x0, [x0, #32]
	ldr	x21, [x0]
Lloh4:
	adrp	x8, _NL80211_IFTYPE_P2P_DEVICE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _NL80211_IFTYPE_P2P_DEVICE@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_brcmf_alloc_vif
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.4:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_bphy_err
	b	LBB0_16
LBB0_5:
	ldr	x8, [x20, #24]
Lloh9:
	adrp	x9, _P2PAPI_BSSCFG_PRIMARY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _P2PAPI_BSSCFG_PRIMARY@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x22, [x8, #8]
	cbz	x23, LBB0_8
; %bb.6:
	ldr	x1, [x22, #8]
	mov	x0, x23
	bl	_ether_addr_equal
	cbz	x0, LBB0_8
; %bb.7:
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_bphy_err
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_2
LBB0_8:
	mov	x0, x20
	mov	x1, x23
	bl	_brcmf_p2p_generate_bss_mac
	ldr	w1, [x20, #16]
	mov	x0, x22
	bl	_brcmf_p2p_set_firmware
	ldr	x0, [x20, #32]
	mov	x1, x19
	bl	_brcmf_cfg80211_arm_vif_event
	mov	x0, x22
	mov	w1, #1
	bl	_brcmf_fweh_p2pdev_setup
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	mov	w2, #1
	bl	_brcmf_fil_iovar_int_set
	tbnz	w0, #31, LBB0_12
; %bb.9:
	ldr	x0, [x20, #32]
Lloh18:
	adrp	x8, _BRCMF_E_IF_ADD@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BRCMF_E_IF_ADD@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _BRCMF_VIF_EVENT_TIMEOUT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _BRCMF_VIF_EVENT_TIMEOUT@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	bl	_brcmf_cfg80211_wait_vif_event
	mov	x23, x0
	ldr	x0, [x20, #32]
	mov	x1, #0
	bl	_brcmf_cfg80211_arm_vif_event
	mov	x0, x22
	mov	w1, #0
	bl	_brcmf_fweh_p2pdev_setup
	cbz	w23, LBB0_13
; %bb.10:
	ldr	x8, [x20, #24]
	ldr	x9, [x24]
	str	x19, [x8, x9, lsl #3]
	ldr	x24, [x19, #8]
	ldr	x0, [x24, #8]
	ldr	w1, [x20, #16]
Lloh24:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	bl	_memcpy
	ldr	w1, [x20, #16]
	mov	x0, x19
	mov	w2, #4
	bl	_memcpy
Lloh27:
	adrp	x1, l_.str.5@PAGE
Lloh28:
	add	x1, x1, l_.str.5@PAGEOFF
	add	x2, sp, #8
	mov	x0, x22
	bl	_brcmf_fil_iovar_int_get
	tbnz	w0, #31, LBB0_14
; %bb.11:
	ldr	x8, [x24]
	ldr	x9, [sp, #8]
	cmp	x8, x9
	cset	w0, ne
	bl	_WARN_ON
	add	x0, x20, #12
	bl	_init_completion
	add	x21, x20, #4
	add	x0, x20, #8
Lloh29:
	adrp	x8, _brcmf_p2p_afx_handler@GOTPAGE
Lloh30:
	ldr	x8, [x8, _brcmf_p2p_afx_handler@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	bl	_INIT_WORK
	mov	x0, x21
	bl	_init_completion
	mov	x0, x20
	bl	_init_completion
	b	LBB0_16
LBB0_12:
	mov	x23, x0
Lloh32:
	adrp	x1, l_.str.3@PAGE
Lloh33:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_bphy_err
	mov	x0, x22
	mov	w1, #0
	bl	_brcmf_fweh_p2pdev_setup
	ldr	x0, [x20, #32]
	mov	x1, #0
	bl	_brcmf_cfg80211_arm_vif_event
	b	LBB0_15
LBB0_13:
Lloh34:
	adrp	x1, l_.str.4@PAGE
Lloh35:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_bphy_err
Lloh36:
	adrp	x8, _EIO@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_15
LBB0_14:
	mov	x23, x0
Lloh39:
	adrp	x1, l_.str.6@PAGE
Lloh40:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x21
	bl	_bphy_err
LBB0_15:
	mov	x0, x19
	bl	_brcmf_free_vif
	mov	x0, x23
	bl	_ERR_PTR
	mov	x19, x0
LBB0_16:
	mov	x0, x19
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_P2PAPI_BSSCFG_DEVICE,8,3       ; @P2PAPI_BSSCFG_DEVICE
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_NL80211_IFTYPE_P2P_DEVICE,4,2  ; @NL80211_IFTYPE_P2P_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not create discovery vif\n"

	.comm	_P2PAPI_BSSCFG_PRIMARY,8,3      ; @P2PAPI_BSSCFG_PRIMARY
l_.str.1:                               ; @.str.1
	.asciz	"discovery vif must be different from primary interface\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"p2p_disc"

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

	.comm	_BRCMF_E_IF_ADD,4,2             ; @BRCMF_E_IF_ADD
	.comm	_BRCMF_VIF_EVENT_TIMEOUT,4,2    ; @BRCMF_VIF_EVENT_TIMEOUT
l_.str.4:                               ; @.str.4
	.asciz	"timeout occurred\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
l_.str.5:                               ; @.str.5
	.asciz	"p2p_dev"

l_.str.6:                               ; @.str.6
	.asciz	"retrieving discover bsscfg index failed\n"

	.comm	_brcmf_p2p_afx_handler,4,2      ; @brcmf_p2p_afx_handler
	.no_dead_strip	_brcmf_p2p_create_p2pdev
.subsections_via_symbols
