	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_ap_add_vif
_brcmf_ap_add_vif:                      ## @brcmf_ap_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	callq	_wiphy_to_cfg
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_cfg_to_ndev
	movl	%eax, %edi
	callq	_netdev_priv
	movq	%rax, %r13
	movq	(%rbx), %r14
	movq	%rbx, %rdi
	callq	_brcmf_cfg80211_vif_event_armed
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_3:
	movq	_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	callq	_brcmf_dbg
	movq	_NL80211_IFTYPE_AP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_brcmf_alloc_vif
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
LBB0_14:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_brcmf_cfg80211_arm_vif_event
	movq	%r13, %rdi
	callq	_brcmf_cfg80211_request_ap_if
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r13d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_brcmf_cfg80211_arm_vif_event
LBB0_12:
	movq	%r15, %rdi
	callq	_brcmf_free_vif
	movl	%r13d, %edi
	jmp	LBB0_2
LBB0_6:
	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, -44(%rbp)                 ## 4-byte Spill
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_brcmf_cfg80211_arm_vif_event
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
## %bb.8:
	movq	(%r15), %rbx
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.10:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	movl	$3, %edx
	callq	_strncpy
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_brcmf_net_attach
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	movl	%eax, %r13d
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_bphy_err
	movq	8(%rbx), %rdi
	callq	_free_netdev
	jmp	LBB0_12
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_bphy_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_12
LBB0_9:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_bphy_err
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_12
LBB0_13:
	movq	(%rbx), %r15
	jmp	LBB0_14
	.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\"\n"

	.comm	_NL80211_IFTYPE_AP,4,2          ## @NL80211_IFTYPE_AP
	.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"

	.no_dead_strip	_brcmf_ap_add_vif
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_ap_add_vif
_brcmf_ap_add_vif:                      ; @brcmf_ap_add_vif
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	bl	_wiphy_to_cfg
	mov	x22, x0
	bl	_cfg_to_ndev
	bl	_netdev_priv
	mov	x23, x0
	ldr	x20, [x22]
	mov	x0, x22
	bl	_brcmf_cfg80211_vif_event_armed
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_2:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_3:
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
	mov	x2, x21
	bl	_brcmf_dbg
Lloh8:
	adrp	x8, _NL80211_IFTYPE_AP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NL80211_IFTYPE_AP@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_brcmf_alloc_vif
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_5
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x0, x22
	mov	x1, x19
	bl	_brcmf_cfg80211_arm_vif_event
	mov	x0, x23
	bl	_brcmf_cfg80211_request_ap_if
	cbz	w0, LBB0_7
; %bb.6:
	mov	x23, x0
	mov	x0, x22
	mov	x1, #0
	bl	_brcmf_cfg80211_arm_vif_event
	b	LBB0_14
LBB0_7:
Lloh11:
	adrp	x8, _BRCMF_E_IF_ADD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BRCMF_E_IF_ADD@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _BRCMF_VIF_EVENT_TIMEOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BRCMF_VIF_EVENT_TIMEOUT@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_brcmf_cfg80211_wait_vif_event
	mov	x23, x0
	mov	x0, x22
	mov	x1, #0
	bl	_brcmf_cfg80211_arm_vif_event
	cbz	w23, LBB0_11
; %bb.8:
	ldr	x22, [x19]
	cbz	x22, LBB0_12
; %bb.9:
	ldr	x8, [x22, #8]
	ldr	w0, [x8]
	mov	x1, x21
	mov	w2, #3
	bl	_strncpy
	mov	x0, x22
	mov	w1, #1
	bl	_brcmf_net_attach
	cbz	w0, LBB0_15
; %bb.10:
	mov	x23, x0
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_bphy_err
	ldr	x0, [x22, #8]
	bl	_free_netdev
	b	LBB0_14
LBB0_11:
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_bphy_err
Lloh21:
	adrp	x8, _EIO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_bphy_err
Lloh25:
	adrp	x8, _ENOENT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_14:
	mov	x0, x19
	bl	_brcmf_free_vif
	mov	x0, x23
	b	LBB0_2
LBB0_15:
	ldr	x19, [x22]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.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\"\n"

	.comm	_NL80211_IFTYPE_AP,4,2          ; @NL80211_IFTYPE_AP
	.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"

	.no_dead_strip	_brcmf_ap_add_vif
.subsections_via_symbols
