	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcmf_p2p_add_vif              ## -- Begin function brcmf_p2p_add_vif
	.p2align	4, 0x90
_brcmf_p2p_add_vif:                     ## @brcmf_p2p_add_vif
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r13d
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	callq	_wiphy_to_cfg
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_cfg_to_ndev
	movl	%eax, %edi
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	16(%r15), %r14
	movq	%r15, %rdi
	callq	_brcmf_cfg80211_vif_event_armed
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_3:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_4:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%r13d, %ecx
	callq	_brcmf_dbg
	cmpl	$130, %r13d
	movl	%r13d, %esi
	je	LBB0_5
## %bb.6:
	cmpl	$129, %esi
	movq	%r15, %rbx
	je	LBB0_13
## %bb.7:
	cmpl	$128, %esi
	jne	LBB0_14
## %bb.8:
	movq	%r14, %r13
	movq	_BRCMF_FIL_P2P_IF_GO@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_5:
	movq	_BRCMF_FIL_P2P_IF_CLIENT@GOTPCREL(%rip), %rax
	movq	%r14, %r13
	movq	%r15, %rbx
LBB0_9:
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_brcmf_alloc_vif
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
LBB0_24:
	movq	%r12, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_brcmf_p2p_create_p2pdev        ## TAILCALL
LBB0_14:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_10:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_brcmf_cfg80211_arm_vif_event
	movl	8(%rbx), %edx
	movq	%rbx, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %ecx
	callq	_brcmf_p2p_request_p2p_if
	testl	%eax, %eax
	je	LBB0_15
## %bb.11:
	movl	%eax, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_brcmf_cfg80211_arm_vif_event
LBB0_12:
	movq	%r12, %rdi
	callq	_brcmf_free_vif
	movl	%r14d, %edi
	jmp	LBB0_3
LBB0_15:
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movq	_BRCMF_E_IF_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BRCMF_VIF_EVENT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_brcmf_cfg80211_wait_vif_event
	movl	%eax, %r15d
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_brcmf_cfg80211_arm_vif_event
	testl	%r15d, %r15d
	je	LBB0_16
## %bb.17:
	movq	(%r12), %r15
	testq	%r15, %r15
	je	LBB0_18
## %bb.19:
	movq	8(%r15), %rax
	movl	4(%rax), %edi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	$3, %edx
	callq	_strncpy
	movq	8(%r15), %rax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movb	%cl, (%rax)
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_brcmf_net_attach
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	movl	%eax, %r14d
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdi
	callq	_bphy_err
	movq	8(%r15), %rdi
	callq	_free_netdev
	jmp	LBB0_12
LBB0_16:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_bphy_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_18:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	callq	_bphy_err
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_21:
	movq	(%rbx), %rax
	movq	_P2PAPI_BSSCFG_CONNECTION@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%r12, (%rax,%rcx,8)
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_brcmf_fil_iovar_int_set
	movq	_BRCMF_FIL_P2P_IF_GO@GOTPCREL(%rip), %rax
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	cmpl	(%rax), %ecx
	jne	LBB0_23
## %bb.22:
	movq	_BRCMF_C_SET_SCB_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BRCMF_SCB_TIMEOUT_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_brcmf_fil_cmd_int_set
LBB0_23:
	movq	(%r15), %r12
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_INFO,4,2                       ## @INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"adding vif \"%s\" (type=%d)\n"

	.comm	_BRCMF_FIL_P2P_IF_CLIENT,4,2    ## @BRCMF_FIL_P2P_IF_CLIENT
	.comm	_BRCMF_FIL_P2P_IF_GO,4,2        ## @BRCMF_FIL_P2P_IF_GO
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_BRCMF_E_IF_ADD,4,2             ## @BRCMF_E_IF_ADD
	.comm	_BRCMF_VIF_EVENT_TIMEOUT,4,2    ## @BRCMF_VIF_EVENT_TIMEOUT
L_.str.1:                               ## @.str.1
	.asciz	"timeout occurred\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"no if pointer provided\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
L_.str.3:                               ## @.str.3
	.asciz	"Registering netdevice failed\n"

	.comm	_P2PAPI_BSSCFG_CONNECTION,8,3   ## @P2PAPI_BSSCFG_CONNECTION
L_.str.4:                               ## @.str.4
	.asciz	"roam_off"

	.comm	_BRCMF_C_SET_SCB_TIMEOUT,4,2    ## @BRCMF_C_SET_SCB_TIMEOUT
	.comm	_BRCMF_SCB_TIMEOUT_VALUE,4,2    ## @BRCMF_SCB_TIMEOUT_VALUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcmf_p2p_add_vif              ; -- Begin function brcmf_p2p_add_vif
	.p2align	2
_brcmf_p2p_add_vif:                     ; @brcmf_p2p_add_vif
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x4
	mov	x19, x3
	mov	x22, x2
	mov	x23, x1
	mov	x26, x0
	bl	_wiphy_to_cfg
	mov	x20, x0
	bl	_cfg_to_ndev
	bl	_netdev_priv
	mov	x25, x0
	ldr	x21, [x20, #16]
	mov	x0, x20
	bl	_brcmf_cfg80211_vif_event_armed
	cbz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_4:
Lloh2:
	adrp	x8, _INFO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INFO@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	mov	x3, x19
	bl	_brcmf_dbg
	cmp	w19, #130
	b.eq	LBB0_8
; %bb.5:
	cmp	w19, #129
	b.eq	LBB0_11
; %bb.6:
	cmp	w19, #128
	b.ne	LBB0_12
; %bb.7:
Lloh7:
	adrp	x8, _BRCMF_FIL_P2P_IF_GO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BRCMF_FIL_P2P_IF_GO@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh9:
	adrp	x8, _BRCMF_FIL_P2P_IF_CLIENT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BRCMF_FIL_P2P_IF_CLIENT@GOTPAGEOFF]
LBB0_9:
	ldr	w24, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_brcmf_alloc_vif
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_13
LBB0_10:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	w2, [x24]
	mov	x0, x20
	mov	x1, x26
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_brcmf_p2p_create_p2pdev
LBB0_12:
Lloh11:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_2
LBB0_13:
	mov	x0, x20
	mov	x1, x19
	bl	_brcmf_cfg80211_arm_vif_event
	ldr	w2, [x20, #8]
	mov	x0, x20
	mov	x1, x25
	mov	x3, x24
	bl	_brcmf_p2p_request_p2p_if
	cbz	w0, LBB0_15
; %bb.14:
	mov	x26, x0
	mov	x0, x20
	mov	x1, #0
	bl	_brcmf_cfg80211_arm_vif_event
	b	LBB0_22
LBB0_15:
Lloh13:
	adrp	x8, _BRCMF_E_IF_ADD@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BRCMF_E_IF_ADD@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _BRCMF_VIF_EVENT_TIMEOUT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BRCMF_VIF_EVENT_TIMEOUT@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_brcmf_cfg80211_wait_vif_event
	mov	x25, x0
	mov	x0, x20
	mov	x1, #0
	bl	_brcmf_cfg80211_arm_vif_event
	cbz	w25, LBB0_19
; %bb.16:
	ldr	x25, [x19]
	cbz	x25, LBB0_20
; %bb.17:
	ldr	x8, [x25, #8]
	ldr	w0, [x8, #4]
	mov	x1, x23
	mov	w2, #3
	bl	_strncpy
	ldr	x8, [x25, #8]
	strb	w22, [x8]
	mov	x0, x25
	mov	w1, #1
	bl	_brcmf_net_attach
	cbz	w0, LBB0_23
; %bb.18:
	mov	x26, x0
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_bphy_err
	ldr	x0, [x25, #8]
	bl	_free_netdev
	b	LBB0_22
LBB0_19:
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_bphy_err
Lloh23:
	adrp	x8, _EIO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_21
LBB0_20:
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_bphy_err
Lloh27:
	adrp	x8, _ENOENT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_21:
	ldr	w8, [x8]
	neg	w26, w8
LBB0_22:
	mov	x0, x19
	bl	_brcmf_free_vif
	mov	x0, x26
	b	LBB0_3
LBB0_23:
	ldr	x8, [x20]
Lloh29:
	adrp	x9, _P2PAPI_BSSCFG_CONNECTION@GOTPAGE
Lloh30:
	ldr	x9, [x9, _P2PAPI_BSSCFG_CONNECTION@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	str	x19, [x8, x9, lsl #3]
Lloh32:
	adrp	x1, l_.str.4@PAGE
Lloh33:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x25
	mov	w2, #1
	bl	_brcmf_fil_iovar_int_set
Lloh34:
	adrp	x8, _BRCMF_FIL_P2P_IF_GO@GOTPAGE
Lloh35:
	ldr	x8, [x8, _BRCMF_FIL_P2P_IF_GO@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	cmp	w24, w8
	b.ne	LBB0_25
; %bb.24:
Lloh37:
	adrp	x8, _BRCMF_C_SET_SCB_TIMEOUT@GOTPAGE
Lloh38:
	ldr	x8, [x8, _BRCMF_C_SET_SCB_TIMEOUT@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
Lloh40:
	adrp	x8, _BRCMF_SCB_TIMEOUT_VALUE@GOTPAGE
Lloh41:
	ldr	x8, [x8, _BRCMF_SCB_TIMEOUT_VALUE@GOTPAGEOFF]
Lloh42:
	ldr	w2, [x8]
	mov	x0, x25
	bl	_brcmf_fil_cmd_int_set
LBB0_25:
	ldr	x19, [x25]
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_INFO,4,2                       ; @INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"adding vif \"%s\" (type=%d)\n"

	.comm	_BRCMF_FIL_P2P_IF_CLIENT,4,2    ; @BRCMF_FIL_P2P_IF_CLIENT
	.comm	_BRCMF_FIL_P2P_IF_GO,4,2        ; @BRCMF_FIL_P2P_IF_GO
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_BRCMF_E_IF_ADD,4,2             ; @BRCMF_E_IF_ADD
	.comm	_BRCMF_VIF_EVENT_TIMEOUT,4,2    ; @BRCMF_VIF_EVENT_TIMEOUT
l_.str.1:                               ; @.str.1
	.asciz	"timeout occurred\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"no if pointer provided\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
l_.str.3:                               ; @.str.3
	.asciz	"Registering netdevice failed\n"

	.comm	_P2PAPI_BSSCFG_CONNECTION,8,3   ; @P2PAPI_BSSCFG_CONNECTION
l_.str.4:                               ; @.str.4
	.asciz	"roam_off"

	.comm	_BRCMF_C_SET_SCB_TIMEOUT,4,2    ; @BRCMF_C_SET_SCB_TIMEOUT
	.comm	_BRCMF_SCB_TIMEOUT_VALUE,4,2    ; @BRCMF_SCB_TIMEOUT_VALUE
.subsections_via_symbols
