	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_add_bss_if_needed
_ath6kl_add_bss_if_needed:              ## @ath6kl_add_bss_if_needed
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rdi, %rbx
	movq	_ADHOC_NETWORK@GOTPCREL(%rip), %rax
	andl	(%rax), %esi
	movq	_IEEE80211_BSS_TYPE_IBSS@GOTPCREL(%rip), %rax
	cmoveq	_IEEE80211_BSS_TYPE_ESS@GOTPCREL(%rip), %rax
	movq	_WLAN_CAPABILITY_IBSS@GOTPCREL(%rip), %rcx
	cmoveq	_WLAN_CAPABILITY_ESS@GOTPCREL(%rip), %rcx
	movq	16(%rdi), %r15
	movl	(%rax), %r9d
	movl	(%rcx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r15), %edi
	movq	(%rbx), %rcx
	movq	8(%rbx), %r8
	movq	_IEEE80211_PRIVACY_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	movq	%r14, %rsi
	pushq	%rax
	callq	_cfg80211_get_bss
	addq	$16, %rsp
	testq	%rax, %rax
	je	LBB0_1
## %bb.6:
	movq	%rax, %r13
	movq	_ATH6KL_DBG_WLAN_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_ath6kl_dbg
	jmp	LBB0_7
LBB0_1:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	leaq	2(%r14), %r13
	movq	8(%rbx), %rdi
	addq	%r13, %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r12
	movq	_WLAN_EID_SSID@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	movq	8(%rbx), %rax
	movq	%rax, 8(%r12)
	leaq	16(%r12), %rdi
	movq	(%rbx), %rsi
	movq	8(%rbx), %rdx
	callq	_memcpy
	movq	8(%rbx), %rax
	leaq	(%r12,%rax,8), %rdi
	addq	$16, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_memcpy
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	_CFG80211_BSS_FTYPE_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	addl	8(%rbx), %r13d
	movl	(%r15), %eax
	subq	$8, %rsp
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rcx
	xorl	%r8d, %r8d
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	pushq	%rax
	pushq	$0
	pushq	%r13
	pushq	%r12
	pushq	$100
	callq	_cfg80211_inform_bss
	addq	$48, %rsp
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_ATH6KL_DBG_WLAN_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_ath6kl_dbg
LBB0_5:
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_7
LBB0_2:
	xorl	%r13d, %r13d
LBB0_7:
	movq	%r13, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADHOC_NETWORK,4,2              ## @ADHOC_NETWORK
	.comm	_WLAN_CAPABILITY_IBSS,4,2       ## @WLAN_CAPABILITY_IBSS
	.comm	_IEEE80211_BSS_TYPE_IBSS,4,2    ## @IEEE80211_BSS_TYPE_IBSS
	.comm	_WLAN_CAPABILITY_ESS,4,2        ## @WLAN_CAPABILITY_ESS
	.comm	_IEEE80211_BSS_TYPE_ESS,4,2     ## @IEEE80211_BSS_TYPE_ESS
	.comm	_IEEE80211_PRIVACY_ANY,4,2      ## @IEEE80211_PRIVACY_ANY
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_WLAN_EID_SSID,8,3              ## @WLAN_EID_SSID
	.comm	_CFG80211_BSS_FTYPE_UNKNOWN,4,2 ## @CFG80211_BSS_FTYPE_UNKNOWN
	.comm	_ATH6KL_DBG_WLAN_CFG,4,2        ## @ATH6KL_DBG_WLAN_CFG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"added bss %pM to cfg80211\n"

L_.str.1:                               ## @.str.1
	.asciz	"cfg80211 already has a bss\n"

	.no_dead_strip	_ath6kl_add_bss_if_needed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_add_bss_if_needed
_ath6kl_add_bss_if_needed:              ; @ath6kl_add_bss_if_needed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x5
	mov	x24, x4
	mov	x20, x3
	mov	x19, x2
	mov	x22, x0
	ldr	x27, [x0, #16]
Lloh0:
	adrp	x8, _ADHOC_NETWORK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADHOC_NETWORK@GOTPAGEOFF]
Lloh2:
	adrp	x9, _IEEE80211_BSS_TYPE_ESS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IEEE80211_BSS_TYPE_ESS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x10, _IEEE80211_BSS_TYPE_IBSS@GOTPAGE
Lloh6:
	ldr	x10, [x10, _IEEE80211_BSS_TYPE_IBSS@GOTPAGEOFF]
	tst	w8, w1
	csel	x8, x9, x10, eq
	ldr	w5, [x8]
Lloh7:
	adrp	x8, _WLAN_CAPABILITY_ESS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WLAN_CAPABILITY_ESS@GOTPAGEOFF]
Lloh9:
	adrp	x9, _WLAN_CAPABILITY_IBSS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _WLAN_CAPABILITY_IBSS@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w21, [x8]
	ldr	w0, [x27]
	ldp	x3, x4, [x22]
Lloh11:
	adrp	x8, _IEEE80211_PRIVACY_ANY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IEEE80211_PRIVACY_ANY@GOTPAGEOFF]
Lloh13:
	ldr	w6, [x8]
	mov	x1, x20
	bl	_cfg80211_get_bss
	cbz	x0, LBB0_2
; %bb.1:
	mov	x26, x0
Lloh14:
	adrp	x8, _ATH6KL_DBG_WLAN_CFG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ATH6KL_DBG_WLAN_CFG@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_ath6kl_dbg
	b	LBB0_7
LBB0_2:
	ldr	x8, [x22, #8]
	add	x28, x23, #2
	add	x0, x28, x8
Lloh19:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_6
; %bb.3:
	mov	x25, x0
Lloh22:
	adrp	x8, _WLAN_EID_SSID@GOTPAGE
Lloh23:
	ldr	x8, [x8, _WLAN_EID_SSID@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	str	x8, [x0]
	ldp	x1, x8, [x22]
	str	x8, [x0, #8]
	add	x26, x0, #16
	ldr	x2, [x22, #8]
	mov	x0, x26
	bl	_memcpy
	ldr	x8, [x22, #8]
	add	x0, x26, x8, lsl #3
	mov	x1, x24
	mov	x2, x23
	bl	_memcpy
	ldr	w0, [x27]
Lloh25:
	adrp	x8, _CFG80211_BSS_FTYPE_UNKNOWN@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CFG80211_BSS_FTYPE_UNKNOWN@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	ldr	w8, [x22, #8]
	add	w8, w28, w8
Lloh28:
	adrp	x9, _GFP_KERNEL@GOTPAGE
Lloh29:
	ldr	x9, [x9, _GFP_KERNEL@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	stp	wzr, w9, [sp, #4]
	str	w8, [sp]
	mov	x1, x20
	mov	x3, x19
	mov	w4, #0
	mov	x5, x21
	mov	w6, #100
	mov	x7, x25
	bl	_cfg80211_inform_bss
	mov	x26, x0
	cbz	x0, LBB0_5
; %bb.4:
Lloh31:
	adrp	x8, _ATH6KL_DBG_WLAN_CFG@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ATH6KL_DBG_WLAN_CFG@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh34:
	adrp	x1, l_.str@PAGE
Lloh35:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ath6kl_dbg
LBB0_5:
	mov	x0, x25
	bl	_kfree
	b	LBB0_7
LBB0_6:
	mov	x26, #0
LBB0_7:
	mov	x0, x26
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_ADHOC_NETWORK,4,2              ; @ADHOC_NETWORK
	.comm	_WLAN_CAPABILITY_IBSS,4,2       ; @WLAN_CAPABILITY_IBSS
	.comm	_IEEE80211_BSS_TYPE_IBSS,4,2    ; @IEEE80211_BSS_TYPE_IBSS
	.comm	_WLAN_CAPABILITY_ESS,4,2        ; @WLAN_CAPABILITY_ESS
	.comm	_IEEE80211_BSS_TYPE_ESS,4,2     ; @IEEE80211_BSS_TYPE_ESS
	.comm	_IEEE80211_PRIVACY_ANY,4,2      ; @IEEE80211_PRIVACY_ANY
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_WLAN_EID_SSID,8,3              ; @WLAN_EID_SSID
	.comm	_CFG80211_BSS_FTYPE_UNKNOWN,4,2 ; @CFG80211_BSS_FTYPE_UNKNOWN
	.comm	_ATH6KL_DBG_WLAN_CFG,4,2        ; @ATH6KL_DBG_WLAN_CFG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"added bss %pM to cfg80211\n"

l_.str.1:                               ; @.str.1
	.asciz	"cfg80211 already has a bss\n"

	.no_dead_strip	_ath6kl_add_bss_if_needed
.subsections_via_symbols
